	mtspr	SPRN_DAWR, r6
	mtspr	SPRN_DAWRX, r7
END_FTR_SECTION_IFSET(CPU_FTR_ARCH_207S)
BEGIN_FTR_SECTION
	ld	r5, STACK_SLOT_TID(r1)
	ld	r6, STACK_SLOT_PSSCR(r1)
	ld	r7, STACK_SLOT_PID(r1)
	mtspr	SPRN_TIDR, r5
	mtspr	SPRN_PSSCR, r6
	mtspr	SPRN_PID, r7
END_FTR_SECTION_IFSET(CPU_FTR_ARCH_300)

#ifdef CONFIG_PPC_RADIX_MMU
	/*
	 * Are we running hash or radix ?
	 */
	ld	r5, VCPU_KVM(r9)
	lbz	r0, KVM_RADIX(r5)
	cmpwi	cr2, r0, 0
	beq	cr2, 2f

	/*
	 * Radix: do eieio; tlbsync; ptesync sequence in case we
	 * interrupted the guest between a tlbie and a ptesync.
	 */
	eieio
	tlbsync
	ptesync

	/* Radix: Handle the case where the guest used an illegal PID */
	LOAD_REG_ADDR(r4, mmu_base_pid)
	lwz	r3, VCPU_GUEST_PID(r9)
	lwz	r5, 0(r4)
	cmpw	cr0,r3,r5
	blt	2f

	/*
	 * Illegal PID, the HW might have prefetched and cached in the TLB
	 * some translations for the  LPID 0 / guest PID combination which
	 * Linux doesn't know about, so we need to flush that PID out of
	 * the TLB. First we need to set LPIDR to 0 so tlbiel applies to
	 * the right context.
	*/
	li	r0,0
	mtspr	SPRN_LPID,r0
	isync

	/* Then do a congruence class local flush */
	ld	r6,VCPU_KVM(r9)
	lwz	r0,KVM_TLB_SETS(r6)
	mtctr	r0
	li	r7,0x400		/* IS field = 0b01 */
	ptesync
	sldi	r0,r3,32		/* RS has PID */
1:	PPC_TLBIEL(7,0,2,1,1)		/* RIC=2, PRS=1, R=1 */
	addi	r7,r7,0x1000
	bdnz	1b
	ptesync

2:
#endif /* CONFIG_PPC_RADIX_MMU */

	/*
	 * POWER7/POWER8 guest -> host partition switch code.
	 * We don't have to lock against tlbies but we do
	 * have to coordinate the hardware threads.
	 * Here STACK_SLOT_TRAP(r1) contains the trap number.
	 */
kvmhv_switch_to_host:
	/* Secondary threads wait for primary to do partition switch */
	ld	r5,HSTATE_KVM_VCORE(r13)
	ld	r4,VCORE_KVM(r5)	/* pointer to struct kvm */
	lbz	r3,HSTATE_PTID(r13)
	cmpwi	r3,0
	beq	15f
	HMT_LOW
13:	lbz	r3,VCORE_IN_GUEST(r5)
	cmpwi	r3,0
	bne	13b
	HMT_MEDIUM
	b	16f

	/*


='covered-line'>
7

        let result_var = MonoType::Var(self.gen.fresh());

453

7

        let func_type = param_types

454

7

            .iter()

455

7

            .rev()

456

8

            .
fold7
(
result_var7
.
clone7
(), |acc, param_ty| {

457

8

                MonoType::Function(Box::new(param_ty.clone()), Box::new(acc))

458

8

            });

459

7

        self.env = self.env.extend(name, TypeScheme::mono(func_type.clone()));

460

        // Infer body type

461

7

        let
body_ty6
 = self.infer_expr(body)
?1
;

462

6

        self.unifier.unify(&result_var, &body_ty)
?0
;

463

6

        self.env = old_env;
<


��를 도와주는 함수.
   *
   * `async`함수 또는 `Promise`를 반환하는 함수일때에만 사용한다.
   * `.catch()` 구문을 작성할 필요 없이, 에러를 `throw` 하기만 하면 해당 에러가 에러핸들링 미들웨어로 전파된다.
   *
   * @example
   * withErrorCatch(async (req, res, next) => {
   *   await new Promise(resolve => setTimeout(() => resolve()), 50);
   *   throw new createError[ERROR_CODE](ERROR_MESSAGE);
   * })
   * @author hwasurr
   */
    withErrorCatch: middleware.withErrorCatch,
    /**
   * 라우터의 사용하지 않는 메소드 핸들러의 경우 해당 함수를 미들웨어로 두어
   * 405에러 (Method Not Allowed) 를 발생시키도록 하는 미들웨어.
   * @param req `express.Request`
   * @param res `express.Response`
   * @param next `express.NextFunction`
   * @example
   * // get과 patch 메소드만을 사용하는 엔드포인트의 경우
   * router.route('/some-end-point')
   *   .get((req, res, next) => {
   *     // some middleware
   *   })
   *   .post(unusedMethod)
   *   .put(unusedMethod)
   *   .patch(someMiddleware)
   *   .delete(unusedMethod)
   * @author hwasurr
   */
    unusedMethod: middleware.unusedMethod,
  }
};
import { Router } from 'express';
import { parseISO } from 'date-fns';

import AppointmentsRepository from '../repositories/AppointmentsRepository';
import CreateAppointmentService from '../services/CreateAppointmentService';

const appointmentsRouter = Router();

// instanciando a classe criada no repositories
const appointmentsRepository = new AppointmentsRepository();

// SoC: Separation of Concerns (Separação de preocupações)

/**
 * Movido para o appointmentsRepository
 // Esta falando que o appointments é um array de Appointments do interface do models (TS)
 const appointments: Appointment[] = [];
 */
appointmentsRouter.get('/', (request, response) => {
  const appointments = appointmentsRepository.all();

  return response.json(appointments);
});

appointmentsRouter.post('/', (request, response) => {
  try {
    const { provider, date } = request.body;

    const parsedDate = parseISO(date);

    const createAppointment = new CreateAppointmentService(
      appointmentsRepository,
    );

    const appointment = createAppointment.execute({
      date: parsedDate,
      provider,
    });

    return response.json(appointment);
  } catch (error) {
    return response.status(400).json({ error: error.message });
  }
});

export default appointmentsRouter;
import { Component } from '@angular/core';
//agregamos esta importacion(control de formularios)
import { FormControl, FormGroup } from '@angular/forms';

@Component({
  selector: 'app-home',
  templateUrl: 'home.page.html',
  styleUrls: ['home.page.scss'],
})
export class HomePage {
  //EN SU INTERIOR SE DECLARAN LOS OBJETOS A INJECTAR EN LA PAGINA TYPESCRIPT
  constructor() {}

  //DEFIMICIO DE VARIABLES nombre: "valor inicial"
  // String, number, boolean, any(cualquier dato), array(definicion de arreglo)
  rut:String ="453534";
  nombreCompleto:String ="";
  edad:Number;
  //Declaracion de objetos de tipo formulario
  //elrut = new FormControl('');
  //elnombre = new FormControl('');
  //laedad = new FormControl('');

  //grupo de


833 48.275V33.333c2.304 0 4.167 -1.863 4.167 -4.167V16.667c0 -4.596 -3.738 -8.333 -8.333 -8.333H33.333C28.738 8.333 25 12.071 25 16.667v12.5c0 2.304 1.867 4.167 4.167 4.167v14.942L23.275 54.167C21.721 55.717 20.833 57.867 20.833 60.058V66.667c0 2.304 1.867 4.167 4.167 4.167h20.833v12.5L50 91.667zM33.333 16.667h33.333v8.333H33.333V16.667zM29.167 60.058l7.113 -7.113C37.063 52.167 37.5 51.108 37.5 50V33.333h25v16.667c0 1.108 0.438 2.167 1.221 2.946L70.833 60.058V62.5H29.167V60.058z"></path></svg>');
}
body.cc-custom-icons svg.folder {
  -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path fill="red" d="M83.333 20.833h-35.775L40.446 13.721C39.667 12.938 38.604 12.5 37.5 12.5H16.667C12.071 12.5 8.333 16.238 8.333 20.833v58.333c0 4.596 3.738 8.333 8.333 8.333h66.667c4.596 0 8.333 -3.738 8.333 -8.333V29.167C91.667 24.571 87.929 20.833 83.333 20.833zM16.667 79.167V29.167h29.167h4.167h33.333l0.008 50H16.667z"></path></svg>');
}
body.cc-custom-icons svg.fullscreen {
  -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path fill="red" d="M20.833 20.833L41.667 20.833 41.667 12.5 12.5 12.5 12.5 41.667 20.833 41.667zM41.667 79.167L20.833 79.167 20.833 58.333 12.5 58.333 12.5 87.5 41.667 87.5zM87.5 58.333L79.167 58.333 79.167 79.167 58.333 79.167 58.333 87.5 87.5 87.5zM79.167 41.667L87.5 41.667 87.5 12.5 58.333 12.5 58.333 20.833 79.167 20.833z"></path></svg>');
}
body.cc-custom-icons svg.gear {
  -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path fill="red" d="M50 66.667c9.192 0 16.667 -7.475 16.667 -16.667s-7.475 -16.667 -16.667 -16.667s-16.667 7.475 -16.667 16.667S40.808 66.667 50 66.667zM50 41.667c4.517 0 8.333 3.817 8.333 8.333s-3.817 8.333 -8.333 8.333s-8.


order-sm-1,#rtb .order-sm-1{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}#rtb-modal .order-sm-2,#rtb .order-sm-2{-webkit-box-ordinal-group:3;-ms-flex-order:2;order:2}#rtb-modal .order-sm-3,#rtb .order-sm-3{-webkit-box-ordinal-group:4;-ms-flex-order:3;order:3}#rtb-modal .order-sm-4,#rtb .order-sm-4{-webkit-box-ordinal-group:5;-ms-flex-order:4;order:4}#rtb-modal .order-sm-5,#rtb .order-sm-5{-webkit-box-ordinal-group:6;-ms-flex-order:5;order:5}#rtb-modal .order-sm-6,#rtb .order-sm-6{-webkit-box-ordinal-group:7;-ms-flex-order:6;order:6}#rtb-modal .order-sm-7,#rtb .order-sm-7{-webkit-box-ordinal-group:8;-ms-flex-order:7;order:7}#rtb-modal .order-sm-8,#rtb .order-sm-8{-webkit-box-ordinal-group:9;-ms-flex-order:8;order:8}#rtb-modal .order-sm-9,#rtb .order-sm-9{-webkit-box-ordinal-group:10;-ms-flex-order:9;order:9}#rtb-modal .order-sm-10,#rtb .order-sm-10{-webkit-box-ordinal-group:11;-ms-flex-order:10;order:10}#rtb-modal .order-sm-11,#rtb .order-sm-11{-webkit-box-ordinal-group:12;-ms-flex-order:11;order:11}#rtb-modal .order-sm-12,#rtb .order-sm-12{-webkit-box-ordinal-group:13;-ms-flex-order:12;order:12}#rtb-modal .offset-sm-0,#rtb .offset-sm-0{margin-left:0}#rtb-modal .offset-sm-1,#rtb .offset-sm-1{margin-left:8.33333%}#rtb-modal .offset-sm-2,#rtb .offset-sm-2{margin-left:16.66667%}#rtb-modal .offset-sm-3,#rtb .offset-sm-3{margin-left:25%}#rtb-modal .offset-sm-4,#rtb .offset-sm-4{margin-left:33.33333%}#rtb-modal .offset-sm-5,#rtb .offset-sm-5{margin-left:41.66667%}#rtb-modal .offset-sm-6,#rtb .offset-sm-6{margin-left:50%}#rtb-modal .offset-sm-7,#rtb .offset-sm-7{margin-left:58.33333%}#rtb-modal .offset-sm-8,#rtb .offset-sm-8{margin-left:66.66667%}#rtb-modal .offset-sm-9,#rtb .offset-sm-9{margin-left:75%}#rtb-modal .offset-sm-10,#rtb .offset-sm-10{margin-left:83.33333%}#rtb-modal .offset-sm-11,#rtb .offset-sm-11{margin-left:91.66667%}}@media (min-width:768px){#rtb-modal .col-md,#rtb .col-md{-ms-flex-preferred-size:0;flex-basis:0;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;max-width


bara Instrument Group
	0001  SBIG Astronomy Camera (without firmware)
	0101  SBIG Astronomy Camera (with firmware)
0d98  Mars Semiconductor Corp.
	0300  Avaya Wireless Card
	1007  Discovery Kids Digital Camera
0d99  Trazer Technologies, Inc.
0d9a  RTX AS
	0001  Bluetooth Device
0d9b  Tat Shing Electrical Co.
0d9c  Chee Chen Hi-Technology Co., Ltd
0d9d  Sanwa Supply, Inc.
0d9e  Avaya
	0300  Wireless Card
0d9f  Powercom Co., Ltd
	0001  Uninterruptible Power Supply
	0002  Black Knight PRO / WOW Uninterruptible Power Supply (Cypress HID->COM RS232)
	00a2  Imperial Uninterruptible Power Supply (HID PDC)
	00a3  Smart King PRO Uninterruptible Power Supply (HID PDC)
	00a4  WOW Uninterruptible Power Supply (HID PDC)
	00a5  Vanguard Uninterruptible Power Supply (HID PDC)
	00a6  Black Knight PRO Uninterruptible Power Supply (HID PDC)
0da0  Danger Research
0da1  Suzhou Peter's Precise Industrial Co., Ltd
0da2  Land Instruments International, Ltd
0da3  Nippon Electro-Sensory Devices Corp.
0da4  Polar Electro Oy
	0001  Interface
	0008  Loop
0da7  IOGear, Inc.
0da8  softDSP Co., Ltd
	0001  SDS 200A Oscilloscope
0dab  Cubig Group
	0100  DVR/CVR-M140 MP3 Player
0dad  Westover Scientific
0db0  Micro Star International
	1020  PC2PC WLAN Card
	1967  Bluetooth Dongle
	3713  Primo 73
	3801  Motorola Bluetooth 2.1+EDR Device
	4011  Medion Flash XL V2.0 Card Reader
	4023  Lexar Mobile Card Reader
	4600  802.11b/g Turbo Wireless Adapter
	5501  Mass Storage Device
	5502  Mass Storage Device
	5513  MP3 Player
	5515  MP3 Player
	5516  MP3 Player
	5580  Mega Sky 580 DVB-T Tuner [M902x]
	5581  Mega Sky 580 DVB-T Tuner [GL861]
	6823  UB11B/MS-6823 802.11b Wi-Fi adapter
	6826  IEEE 802.11g Wireless Network Adapter
	6855  Bluetooth Device
	6861  MSI-6861 802.11g WiFi adapter
	6865  RT2570
	6869  RT2570
	6874  RT2573
	6877  RT2573
	6881  Bluetooth Class I EDR Device
	688a  Bluetooth Class I EDR Device
	6899  802.11bgn 1T1R Mini Card Wireless Adapter
	6970  MS-6970 BToes Bluetooth adapter
	697a  Bluetooth Dongle
	6982  Medion Flash XL Card Reader
	a861  RT2573
	a874  RT2573
	a970  Bluetooth dongle
	a97a  Bluetooth EDR Device
	b970  Bluetooth EDR Device
	b97a  Bluetooth EDR Device
0db1  Wen Te Electronics Co., Ltd
0db2  Shian Hwi Plug Parts, Plastic Factory
0db3  Tekram Technology Co., Ltd
0db4  Chung Fu Chen Yeh Enterprise Corp.
0db5  Access IS
	0139  Barcode Module - CDC serial
	013a  Barcode Module - Virtual Keyboard
	013b  Barcode Module - HID
	0160  NFC and Smartcard Module (NSM)
0db7  ELCON Systemtechnik
	0002  Goldpfeil P-LAN
0dba  Digidesign
	1000  Mbox 1 [Mbox]
	3000  Mbox 2
	b011  Eleven Rack
0dbc  A&D Medical
	0003  AND Serial Cable [


// 'new BigNumber() number type has more than 15 significant digits: {n}'
                        if ( num && ERRORS && len > 15 ) raise( id, tooManyDigits, x.s * n );

                        e = e - i - 1;

                        // Overflow?
                        if ( e > MAX_EXP ) {

                            // Infinity.
                            x.c = x.e = null;

                            // Underflow?
                        } else if ( e < MIN_EXP ) {

                            // Zero.
                            x.c = [ x.e = 0 ];
                        } else {
                            x.e = e;
                            x.c = [];

                            // Transform base

                            // e is the base 10 exponent.
                            // i is where to slice str to get the first element of the coefficient array.
                            i = ( e + 1 ) % LOG_BASE;
                            if ( e < 0 ) i += LOG_BASE;

                            if ( i < len ) {
                                if (i) x.c.push( +str.slice( 0, i ) );

                                for ( len -= LOG_BASE; i < len; ) {
                                    x.c.push( +str.slice( i, i += LOG_BASE ) );
                                }

                                str = str.slice(i);
                                i = LOG_BASE - str.length;
                            } else {
                                i -= len;
                            }

                            for ( ; i--; str += '0' );
                            x.c.push( +str );
                        }
                    } else {

                        // Zero.
                        x.c = [ x.e = 0 ];
                    }

                    id = 0;
                }

                // CONSTRUCTOR PROPERTIES

                BigNumber.another = another;

                BigNumber.ROUND_UP = 0;
                BigNumber.ROUND_DOWN = 1;
                BigNumber.ROUND_CEIL = 2;
                BigNumber.ROUND_FLOOR = 3;
                BigNumber.ROUND_HALF_UP = 4;
                BigNumber.ROUND_HALF_DOWN = 5;
                BigNumber.ROUND_HALF_EVEN = 6;
                BigNumber.ROUND_HALF_CEIL = 7;
                BigNumber.ROUND_HALF_FLOOR = 8;
                BigNumber.EUCLID = 9;

                /*
         * Configure infrequently-changing library-wide settings.
         *
         * Accept an object or an argument list, with one or many of the following properties or
         * parameters respectively:
         *
         *   DECIMAL_PLACES  {number}  Integer, 0 to MAX inclusive
         *   ROUNDING_MODE   {number}  Integer, 0 to 8 inclusive
         *   EXPONENTIAL_AT  {number|number[]}  Integer, -MAX to MAX inclusive or
         *                                      [integer -MAX to 0 incl., 0 to MAX incl.]
         *   RANGE           {number|number[]}  Non-zero integer, -MAX to MAX inclusive or
         *                                      [integer -MAX to -1 incl., integer 1 to MAX incl.]
         *   ERRORS          {boolean|number}   true, false, 1 or 0
         *   CRYPTO          {boolean|number}   true, false, 1 or 0
         *   MODULO_MODE     {number}           0 to 9 inclusive
         *   POW_PRECISION   {number}           0 to MAX inclusive
         *   FORMAT          {object}           See BigNumber.prototype.toFormat
         *      decimalSeparator       {string}
         *      groupSeparator         {string}
         *      groupSize              {number}
         *      secondaryGroupSize     {number}
         *      fractionGroupSeparator {string}
         *      fractionGroupSize      {number}
         *
         * (The values assigned to the above FORMAT object properties are not checked for validity.)
         *
         * E.g.


/****************************************************************************
**
** Copyright (C) 2015 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Designer of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see http://www.qt.io/terms-conditions. For further
** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 or version 3 as published by the Free
** Software Foundation and appearing in the file LICENSE.LGPLv21 and
** LICENSE.LGPLv3 included in the packaging of this file. Please review the
** following information to ensure the GNU Lesser General Public License
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** As a special exception, The Qt Company gives you certain additional
** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3.0 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file.  Please review the following information to
** ensure the GNU General Public License version 3.0 requirements will be
** met: http://www.gnu.org/copyleft/gpl.html.
**
** $QT_END_LICENSE$
**
****************************************************************************/

#ifndef Q3VIEW3D_PLUGIN_H
#define Q3VIEW3D_PLUGIN_H

#include <QtCore/QList>
#include <QtCore/QHash>
#include <QtDesigner/QDesignerFormEditorPluginInterface>
#include "view3d_global.h"

QT_BEGIN_NAMESPACE

class QView3DTool;
class QAction;

class VIEW3D_EXPORT QView3DPlugin : public QObject, public QDesignerFormEditorPluginInterface
{
    Q_OBJECT
    Q_INTERFACES(QDesignerFormEditorPluginInterface)

public:
    QView3DPlugin();
    virtual bool isInitialized() const;
    virtual void initialize(QDesignerFormEditorInterface *core);
    virtual QAction *action() const;
    virtual QDesignerFormEditorInterface *core() const;

public slots:
    void activeFormWindowChanged(QDesignerFormWindowInterface *formWindow);

private slots:
    void addFormWindow(QDesignerFormWindowInterface *formWindow);
    void removeFormWindow(QDesignerFormWindowInterface *formWindow);

private:
    QPointer<QDesignerFormEditorInterface> m_core;
    QHash<QDesignerFormWindowInterface*, QView3DTool*> m_tool_list;
    QAction *m_action;
};

#endif // QVIEW3D_PLUGIN_H

QT_END_NAMESPACE


 PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 */

#include <machine/asm.h>

/*
 * Custom bus_space I/O functions for Simtec IDE podule
 */

/*
 * Fast read multiple
 */

ENTRY(simide_rm_2)
	add	r0, r1, r2, lsl r0
	mov	r1, r3
	ldr	r2, [sp, #0]
	b	_inswm8

/*
 * Fast write multiple
 */

ENTRY(simide_wm_2)
	add	r0, r1, r2, lsl r0
	mov	r1, r3
	ldr	r2, [sp, #0]
	b	_outswm8


和物联网安全的主要安全研究热点。

启明星辰安全研究员王启泽介绍了TrustZone技术的背景，安全技术架构及在TrustZone安全技术的研究。着重对TrustZone技术的缺陷和攻击面做了介绍，并提出了TrustZone在内核安全加固方面的思路。

冰血封情：信息泄露蝴蝶效应从民众到国家安全

邪恶八进制信息安全团队创始人冰血封情带着对安全永不磨灭的情怀来到了xKungfoo，他表示每个人在安全中都是一个至关重要的环节，也许你会觉得自己只是沧海中的一粟，其实不然，你可能就是掘开堤坝的那个蚁穴。

一个网民信息不会造成毁灭性的伤害，但是上千万的网民数据泄露可能就会掀起一场腥风。一切非公开信息的泄露都可能危及国家安全！比如医院的某类重点药材信息泄露，敌方可能就会趁机做点手脚，危及医院全部病人的安全。

李丹：釜山行之进化僵尸——从僵尸网络看网络攻防

去年10月低，美国东海岸地区大面积网络瘫痪。原因就是攻击者利用全球的IoT设备向Dyn公司发动了大规模的DDoS攻击。

绿盟科技威胁情报与网络安全实验室的安全研究员李丹基于botnet实例，从攻击链角度对网络攻防现状进行分析，并提出了一个解决方案。比如自动化处理、自动捕获样本、自动运行样本、自动识�


efc2"))
}

print("Test case 1")
local shared_secret = PVSS.pooling_shares(valid_shares, {1,2,3,4,5}, t)
assert(shared_secret:x() == sage_secret[1])
assert(shared_secret:y() == sage_secret[2])
assert(shared_secret == (GENERATORS.G*s))

print("Test case 2")
assert(shared_secret == PVSS.pooling_shares({valid_shares[2], valid_shares[3], valid_shares[5]}, {2,3, 5}, t))

print('----------------------------------------------')

print("TEST sage 2")

-- SECRET KEYS
local sage_secret_keys = {
    BIG.new(O.from_hex("0x541945c9a80aff78ad101d29370f56661035f108a53292f92e826cb5afe0f7bb")),
    BIG.new(O.from_hex("0x58761bb3a41593ad3c9161656f89143b3ea1df79b59db86901b552024a6d320a")),
    BIG.new(O.from_hex("0x0c38e44f57de7cc0d3b103201cd8b294c5b80fea88591c32c26fcbdda254c5dc")),
    BIG.new(O.from_hex("0x23d24a231ae14e142a3652e64889af518760c7008b838415294ad135f1d3d777")),
    BIG.new(O.from_hex("0x5ddcb66bd07d1c1c4f68cd67153eda92f0f30b030188818e3f496a0e5fe512a9")),
}
-- PUBLIC KEYS
local sage_public_keys = {
    { BIG.new(O.from_hex("0x0e9bc85e97f9bb2d32a2fe6caecd345e5d30da85c1512e5f4d166fe15552e789dc118fcdb280510413a5293bfcb9a649")), BIG.new(O.from_hex("0x097761dc398787de573d9284b49bde4be3f1dbf647df41d8bd69549463937f89b908223b77d1d8ed04188f46000e1c6e"))},
    { BIG.new(O.from_hex("0x0658f6d7a7c70e16c6bff84ba8d6c6c51fcab34ac83c21641f8e9bc1e148d75d10841a9c96110dd17ea4ddb01426a558")), BIG.new(O.from_hex("0x183c760f84e8f772a5e0df7a5cd3e562612697716b4e5ae7188cc923c4a54a54e8e9b40364c0abd128fd954d499c9ada"))},
    { BIG.new(O.from_hex("0x0d85965bf7ab23dc29961715bbd43e53873698e61ca80bd952633bfb74d97471fb6470113054a9590301495a64e37def")), BIG.new(O.from_hex("0x17d8507c3efb791206ce9b908b828694204346661ab6a6d590790944eeaf8f856c3fb8bc29d13fc0da7896273bad636a"))},
    { BIG.new(O.from_hex("0x192b1099ec575e9a081446155cb4969c57a0a168eba6092303770286d3a2948b72aefd


 = (overrides?): Partial<LetterHttpRequest> => ({
  body: requestBodyFactory.build(overrides),
});

const mockInvalidRequests = [
  ['empty request', {}],
  ['null \'message_content\' property', buildMockRequest({ message_content: null })],
  ['empty \'address_line_1\' value', buildMockRequest({ address_line_1: '' })],
  ['undefined \'address_line_2\' value', buildMockRequest({ address_line_2: undefined })],
  ['numeric \'postcode\' value', buildMockRequest({ postcode: 12345678 })],
  ['object \'name\' value', buildMockRequest({ name: { foo: 'bar' } })],
  ['null \'target\' value', buildMockRequest({ target: null })],
  ['numeric \'reference\' value', buildMockRequest({ reference: 1234 })],
  ['numeric \'context_id\' value', buildMockRequest({ reference: 1234 })],
];

describe('LetterRequest class', () => {
  describe('isValid method', () => {
    describe('if the request is valid', () => {
      test('returns true', () => {
        const mockReq = buildMockRequest();

        const request = new LetterRequest(mockReq as any);
        const isValid = request.isValid();

        expect(isValid).toEqual(true);
      });

      describe('optional properties not required', () => {
        test('returns true', () => {
          const mockReq = buildMockRequest();
          delete mockReq.body.address_line_3;
          delete mockReq.body.address_line_4;
          delete mockReq.body.address_line_5;
          delete mockReq.body.address_line_6;
          delete mockReq.body.reference;
          delete mockReq.body.context_id;

          const request = new LetterRequest(mockReq as any);
          const isValid = request.isValid();

          expect(isValid).toEqual(true);
        });
      });

      describe('target property case insensitive', () => {
        test('returns true', () => {
          const mockReq = buildMockRequest();
          (mockReq.body.target as string) = 'NI';

          const request = new LetterRequest(mockReq as any);
          const isValid = request.isValid();

          expect(isValid).toEqual(true);
        });
      });
    });

    describe('if the request is invalid:', () => {
      describe.each(mockInvalidRequests)('%s', (name, mockInvalidReq) => {
        test('returns false', () => {
          const request = new LetterRequest(mockInvalidReq as any);
          const isValid = request.isValid();

          expect(isValid).toEqual(false);
        });
      });

      describe('missing required property', () => {
        test('returns false', () => {
          const mockInvalidReq = buildMockRequest();
          delete mockInvalidReq.body.name;

          const request = new LetterRequest(mockInvalidReq as any);
          const isValid = request.isValid();

          expect(isValid).toEqual(false);
        });
      });

      describe('random extraneous property', () => {
        test('returns false', () => {
          const mockInvalidReq = buildMockRequest();
          mockInvalidReq.body.foo = 'bar';

          const request = new LetterRequest(mockInvalidReq);
          const isValid = request.isValid();

          expect(isValid).toEqual(false);
        });
      });
    });
  });

  describe('mapToQueueRecord method', () => {
    test('converts the request to a queue record', () => {
      const mockReq = {
        body: {
          message_content: 'messageContent',
          target: 'GB',


riptor.value;

			if (!(process.env.IS_PROD != "true" && context.environment === "development")) {
				return originalMethod;
			}

			const log = (message: string) => {
				console.log(message, 'color: red;');
			};

			const debouncedLog = LogUtilities.debounce(log, 1000);
			const parentName = ((target || {}).constructor || <any>{}).name || 'UNKNOWN';
			const caller = `${parentName}:${key}`;
			let calls = 0;
			let totalElapsed = 0;

			descriptor.value = function() {
				calls++;
				const p = require('perf_hooks');
				const t0 = p.performance.now();
				const result = originalMethod.apply(this, arguments);
				const t1 = p.performance.now();
				const elapsed = Math.round((t1 - t0) * 10) / 10;

				totalElapsed += elapsed;

				if (elapsed > whenExceedsTimeInMs || totalElapsed > whenExceedsTimeInMs || calls > whenExceedsCalls) {
					const elapsedStr = LogUtilities.padStart(Math.round(elapsed).toLocaleString(), ' ', 10);
					const totalStr = LogUtilities.padEnd(Math.round(totalElapsed).toLocaleString() + 'ms', ' ', 10);
					const callsStr = LogUtilities.padEnd(calls.toLocaleString(), ' ', 10);
					const message = `%c ${elapsedStr}ms | total: ${totalStr} | calls: ${callsStr} | ${caller}`;
					debouncedLog(message);
				}

				return result;
			};

			return descriptor;
		};
	}

	namespace LogUtilities{
		export function padStart(val: string, padStr: string, len: number): string {
			return pad(val, padStr, len, false);
		}

		export function padEnd(val: string, padStr: string, len: number): string {
			return pad(val, padStr, len, true);
		}

		export function pad(val: string, padStr: string, len: number, toEnd: boolean): string {
			if (val.length > len) {
				return val;
			} else {
				len -= val.length;

				while (len > padStr.length) {
					padStr += padStr;
				}

				return toEnd ? val + padStr.slice(0, len) : padStr.slice(0, len) + val;
			}
		}

		export function debounce(func: (...args: any[]) => void, wait: number): (...args: any[]) => void {
			let timeout: any;

			return function() {
				const context = this;
				const args = arguments;
				const later = function() {
					timeout = null;
					func.apply(context, args);
				};

				clearTimeout(timeout);
				timeout = setTimeout(later, wait);
			};
		}
	}

}import { Character } from '../models/character';
import {
  LOAD_CHARACTER_DETAILS,
  LOAD_CHARACTER_DETAILS_FAIL,
  LOAD_CHARACTER_DETAILS_SUCCESS,
  LoadDetailsActions
} from './actions/load-details.actions';

export interface CharacterDetailsState {
  details: Character;
}

const initialState: CharacterDetailsState = {
  details: null
};

export function characterDetailsReducer (state = initialState, action: LoadDetailsActions) {
  switch (action.type) {
    case LOAD_CHARACTER_DETAILS:
      return {
        ...state
      };
    case LOAD_CHARACTER_DETAILS_SUCCESS:
      return {
        ...state,
        details: action.payload
      };
    case LOAD_CHARACTER_DETAILS_FAIL:
      return {


--------- | ------------------------------------------------------------------------------------------------------------------------------------ |
| Super Key     | Set of attributes that can uniquely identify records       | {  ID }, {  Email  }                         |
| Candidate Key | Minimal super key; unique identifiers with no redundancies | {  ID }, {   Email  }  (if both are minimal) |
| Primary Key   | Chosen candidate key; unique and cannot be NULL                                                        | ID (if it’s selected as primary)                                                         |
|                                                           |                                                                                |                                                                                |

**Example**:

- `ID` in the instructor table could be a primary key.
- Multiple candidate keys can exist, but only one is selected as the primary key.

1. Instructor Table :

| ID | name | deptname | tot cred |
| ---------------------------------------------- | ------------------------------------------------ | ---------------------------------------------------- | ---------------------------------------------------- |
| 10101                                          | Alice                                            | Biology                                              | 120                                                  |
| 12121                                          | Bob                                              | Comp.Sci.                                            | 150                                                  |
| 15151                                          |


e"] = 1455,
	["Thunder Bluff"] = 1456,
	["Darnassus"] = 1457,
	["Undercity"] = 1458,
	["Alterac Valley"] = 1459,
	["Eversong Woods"] = 1941,
	["Ghostlands"] = 1942,
	["Azuremyst Isle"] = 1943,
	["Hellfire Peninsula"] = 1944,
	["Zangarmarsh"] = 1946,
	["The Exodar"] = 1947,
	["Shadowmoon Valley"] = 1948,
	["Blade's Edge Mountains"] = 1949,
	["Bloodmyst Isle"] = 1950,
	["Nagrand"] = 1951,
	["Terokkar Forest"] = 1952,
	["Netherstorm"] = 1953,
	["Silvermoon City"] = 1954,
	["Shattrath City"] = 1955,
	["Isle of Quel'Danas"] = 1957,
	["Kalimdor"] = 1414,
	["Eastern Kingdoms"] = 1415,
	["Outland"] = 1945 --987?
}

addon.FPbyZone = {
    ["Horde"] = {
        [1448] = 48,
        [1418] = 21,
        [1450] = 69,
        [1451] = 72,
        [1452] = 53,
        [1454] = 23,
        [1425] = 76,
        [1458] = 11,
        [1428] = 70,
        [1456] = 22,
        [1444] = 42,
        [1442] = 29,
        [1435] = 56,
        [1421] = 10,
        [1449] = 79,
        [1423] = 68,
        [1427] = 75,
        [1441] = 30,
        [1411] = 23,
        [1443] = 38,
        [1445] = 55,
        [1446] = 40,
        [1447] = 44,
        [1412] = 22,
    },
    ["Alliance"] = {
        [1448] = 65,
        [1449] = 79,
        [1450] = 49,
        [1451] = 73,
        [1452] = 52,
        [1422] = 66,
        [1423] = 67,
        [1455] = 6,
        [1425] = 43,
        [1426] = 6,
        [1427] = 74,
        [1428] = 71,
        [1431] = 12,
        [1432] = 8,
        [1436] = 4,
        [1437] = 7,
        [1438] = 27,
        [1439] = 26,
        [1440] = 28,
        [1442] = 33,
        [1443] = 37,
        [1413] = 80,
        [1445] = 32,
        [1446] = 39,
        [1447] = 64,
        [1419] = 45,
        [1453] = 2,
    },
}

addon.professionID = {
    alchemy = {2259, 3101, 3464, 11611, 28596, 51304},
    blacksmithing = {2018, 3100, 3538, 9785, 29844, 51300},
    enchanting = {13920, 7411, 7412, 7413, 28029, 51313},
    engineering = {4036, 4037, 4038, 12656, 30350, 51306},
    herbalism = {2383},
    inscription = {45357, 45358, 45359, 45360, 45361, 45363},
    jewelcrafting = {25229, 25230, 28894, 28895, 28897, 51311},
    leatherworking = {2108, 3104, 3811, 10662, 32549, 51302},
    mining = {2656},
    skinning = {8613, 8617, 8618, 10768, 32678, 50305},
    tailoring = {3908, 3909, 3910, 12180, 26790, 51309},
    cooking


guage governing permissions and
// limitations under the License.
// </copyright>
//

using System;

namespace Rock.ViewModels.Blocks.Crm.FamilyPreRegistration
{
    /// <summary>
    /// The bag that contains all the information for getting schedules in the Family Pre-Registration block.
    /// </summary>
    public class FamilyPreRegistrationGetScheduleDatesRequestBag
    {
        /// <summary>
        /// Gets or sets the campus unique identifier.
        /// </summary>
        public Guid? CampusGuid { get; set; }
    }
}


N(put, 8, mmx)
DEFINE_FN(avg, 8, mmx)
DEFINE_FN(put, 16, mmx)
DEFINE_FN(avg, 16, mmx)
#endif

av_cold void ff_rv40dsp_init_x86(RV34DSPContext *c)
{
    int cpu_flags = av_get_cpu_flags();

#if HAVE_MMX_INLINE
    if (INLINE_MMX(cpu_flags)) {
        c->put_pixels_tab[0][15] = put_rv40_qpel16_mc33_mmx;
        c->put_pixels_tab[1][15] = put_rv40_qpel8_mc33_mmx;
        c->avg_pixels_tab[0][15] = avg_rv40_qpel16_mc33_mmx;
        c->avg_pixels_tab[1][15] = avg_rv40_qpel8_mc33_mmx;
    }
#endif /* HAVE_MMX_INLINE */

#if HAVE_YASM
    if (EXTERNAL_MMX(cpu_flags)) {
        c->put_chroma_pixels_tab[0] = ff_put_rv40_chroma_mc8_mmx;
        c->put_chroma_pixels_tab[1] = ff_put_rv40_chroma_mc4_mmx;
#if ARCH_X86_32
        QPEL_MC_SET(put_, _mmx)
#endif
    }
    if (EXTERNAL_AMD3DNOW(cpu_flags)) {
        c->avg_chroma_pixels_tab[0] = ff_avg_rv40_chroma_mc8_3dnow;
        c->avg_chroma_pixels_tab[1] = ff_avg_rv40_chroma_mc4_3dnow;
#if ARCH_X86_32
        QPEL_MC_SET(avg_, _3dnow)
#endif
    }
    if (EXTERNAL_MMXEXT(cpu_flags)) {
        c->avg_pixels_tab[1][15]        = avg_rv40_qpel8_mc33_mmxext;
        c->avg_chroma_pixels_tab[0]     = ff_avg_rv40_chroma_mc8_mmxext;
        c->avg_chroma_pixels_tab[1]     = ff_avg_rv40_chroma_mc4_mmxext;
        c->rv40_weight_pixels_tab[0][0] = ff_rv40_weight_func_rnd_16_mmxext;
        c->rv40_weight_pixels_tab[0][1] = ff_rv40_weight_func_rnd_8_mmxext;
        c->rv40_weight_pixels_tab[1][0] = ff_rv40_weight_func_nornd_16_mmxext;
        c->rv40_weight_pixels_tab[1][1] = ff_rv40_weight_func_nornd_8_mmxext;
#if ARCH_X86_32
        QPEL_MC_SET(avg_, _mmxext)
#endif
    }
    if (EXTERNAL_SSE2(cpu_flags)) {
        c->put_pixels_tab[0][15]        = put_rv40_qpel16_mc33_sse2;
        c->avg_pixels_tab[0][15]        = avg_rv40_qpel16_mc33_sse2;
        c->rv40_weight_pixels_tab[0][0] = ff_rv40_weight_func_rnd_16_sse2;
        c->rv40_weight_pixels_tab[0][1] = ff_rv40_weight_func_rnd_8_sse2;
        c->rv40_weight_pixels_tab[1][0] = ff_rv40_weight_func_nornd_16_sse2;
        c->rv40_weight_pixels_tab[1][1] = ff_rv40_weight_func_nornd_8_sse2;
        QPEL_MC_SET(put_, _sse2)
        QPEL_MC_SET(avg_, _sse2)
    }
    if (EXTERNAL_SSSE3(cpu_flags)) {
        c->put_pixels_tab[0][15]        = put_rv40_qpel16_mc33_ssse3;
        c->put_pixels_tab[1][15]        = put_rv40_qpel8_mc33_ssse3;
        c->avg_pixels_tab[0][15]        = avg_rv40_qpel16_mc33_ssse3;
        c->avg_pixels_tab[1][15]        = avg_rv40_qpel8_mc33_ssse3;
        c->rv40_weight_pixels_tab[0][0] = ff_rv40_weight_func_rnd_16_ssse3;
        c->rv40_weight_pixels_tab[0][1] = ff_rv40_weight_func_rnd_8_ssse3;
        c->rv40_weight_pixels_tab[1][0] = ff_rv40_weight_func_nornd_16_ssse3;
        c->rv40_weight_pixels_tab[1][1] = ff_rv40_weight_func_nornd_8_ssse3;
        QPEL_MC_SET(put_, _ssse3)
        QPEL_MC_SET(avg_, _ssse3)
    }
#endif /* HAVE_YASM */
}


l.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);
            gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
            gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);

            // -- Render
            gl.clearColor(0.0, 0.0, 0.0, 1.0);
            gl.clear(gl.COLOR_BUFFER_BIT);

            gl.bindVertexArray(vertexArray);

            var matrix = new Float32Array([
                1.0, 0.0, 0.0, 0.0,
                0.0, 1.0, 0.0, 0.0,
                0.0, 0.0, 1.0, 0.0,
                0.0, 0.0, 0.0, 1.0
            ]);

            // No offset
            gl.useProgram(programBicubic);
            gl.uniformMatrix4fv(mvpLocation, false, matrix);
            gl.uniform1i(diffuseLocation, 0);

            gl.viewport(viewports[Corners.RIGHT].x, viewports[Corners.RIGHT].y, viewports[Corners.RIGHT].z, viewports[Corners.RIGHT].w);
            gl.drawArrays(gl.TRIANGLES, 0, 6);

            // Offset
            gl.useProgram(programOffsetBicubic);
            gl.uniformMatrix4fv(mvpOffsetLocation, false, matrix);
            gl.uniform1i(diffuseOffsetLocation, 0);

            var offset = new Int32Array([100, -80]);
            gl.uniform2iv(offsetUniformLocation, offset);

            gl.viewport(viewports[Corners.LEFT].x, viewports[Corners.LEFT].y, viewports[Corners.LEFT].z, viewports[Corners.LEFT].w);
            gl.drawArrays(gl.TRIANGLES, 0, 6);

            // Delete WebGL resources
            gl.deleteBuffer(vertexPosBuffer);
            gl.deleteBuffer(vertexTexBuffer);
            gl.deleteTexture(texture);
            gl.deleteProgram(programOffsetBicubic);
            gl.deleteProgram(programBicubic);
            gl.deleteVertexArray(vertexArray);
        });
    })();
    </script>

#L72-L90

<!DOCTYPE html>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <title>webgpu-samples: twoCubes</title>

    <meta
      http-equiv="origin-trial"
      content="Aktu7041jFm00ls336/bRinubASRzg1tPs4wxXOZkF1uP0LaIURinGC7ti0Vf352Q9OKFL1siRfpptLjNIKpKQcAAABheyJvcmlnaW4iOiJodHRwczovL3dlYmdwdS5naXRodWIuaW86NDQzIiwiZmVhdHVyZSI6IldlYkdQVUNvbXBhdGliaWxpdHlNb2RlIiwiZXhwaXJ5IjoxNzc2NzI5NjAwfQ=="
    />

    <meta
      http-equiv="origin-trial"
      content="AqW27Ayelg5vbcAaYcweU+sLjZq5r6idHCWU4MJgnkP1YBgmOMqazdGuakSnGylTkyA/bRHkCJZFdfYjFlylOgAAAABaeyJvcmlnaW4iOiJodHRwOi8vbG9jYWxob3N0OjgwODAiLCJmZWF0dXJlIjoiV2ViR1BVQ29tcGF0aWJpbGl0eU1vZGUiLCJleHBpcnkiOjE3NzY3Mjk2MDB9"
    />


///

  /// 12345678-1234-1234-1234-123456789012
  ///

  ///

  ///
  /// Parameter [s3KeyPrefix] :
  /// Specifies the Amazon S3 key prefix that comes after the name of the bucket
  /// you have designated for log file delivery. For more information, see Finding
  /// Your CloudTrail Log Files. The maximum length is 200 characters.
  ///
  /// Parameter [snsTopicName] :
  /// Specifies the name of the Amazon SNS topic defined for notification of log
  /// file delivery. The maximum length is 256 characters.
  Future<CreateTrailResponse> createTrail({
    required String name,
    required String s3BucketName,
    String? cloudWatchLogsLogGroupArn,
    String? cloudWatchLogsRoleArn,
    bool? enableLogFileValidation,
    bool? includeGlobalServiceEvents,
    bool? isMultiRegionTrail,
    bool? isOrganizationTrail,
    String? kmsKeyId,
    String? s3KeyPrefix,
    String? snsTopicName,
    List<Tag>? tagsList,
  }) async {
    final headers = <String, String>{
      'Content-Type': 'application/x-amz-json-1.1',
      'X-Amz-Target':
          'com.amazonaws.cloudtrail.v20131101.CloudTrail_20131101.CreateTrail'
    };
    final jsonResponse = await _protocol.send(
      method: 'POST',
      requestUri: '/',
      exceptionFnMap: _exceptionFns,
      // TODO queryParams
      headers: headers,
      payload: {
        'Name': name,
        'S3BucketName': s3BucketName,
        if (cloudWatchLogsLogGroupArn != null)
          'CloudWatchLogsLogGroupArn': cloudWatchLogsLogGroupArn,
        if (cloudWatchLogsRoleArn != null)
          'CloudWatchLogsRoleArn': cloudWatchLogsRoleArn,
        if (enableLogFileValidation != null)
          'EnableLogFileValidation': enableLogFileValidation,
        if (includeGlobalServiceEvents != null)
          'IncludeGlobalServiceEvents': includeGlobalServiceEvents,
        if (isMultiRegionTrail != null)
          'IsMultiRegionTrail': isMultiRegionTrail,
        if (isOrganizationTrail != null)
          'IsOrganizationTrail': isOrganizationTrail,
        if (kmsKeyId != null) 'KmsKeyId': kmsKeyId,
        if (s3KeyPrefix != null) 'S3KeyPrefix': s3KeyPrefix,
        if (snsTopicName != null) 'SnsTopicName': snsTopicName,
        if (tagsList != null) 'TagsList': tagsList,
      },
    );

    return CreateTrailResponse.fromJson(jsonResponse.body);
  }

  /// Deletes a channel.
  ///
  /// May throw [ChannelARNInvalidException].
  /// May throw [ChannelNotFoundException].
  /// May throw [OperationNotPermittedException].
  /// May throw [UnsupportedOperationException].
  ///
  /// Parameter [channel] :
  /// The ARN or the UUID value of the channel that you want to
  /// delete.
  Future<void> deleteChannel({
    required String channel,
  }) async {
    final headers = <String, String>{
      'Content-Type': 'application/x-amz-json-1.1',
      'X-Amz-Target':
          'com.amazonaws.cloudtrail.v20131101.CloudTrail_20131101.DeleteChannel'
    };
    await _protocol.send(
      method: 'POST',
      requestUri: '/',
      exceptionFnMap: _exceptionFns,
      // TODO queryParams
      headers: headers,
      payload: {
        'Channel': channel,
      },
    );
  }

  /// Disables the event data store specified by EventDataStore


h of the companion trait
    #[test]
    fn dyn_dispatch() {
        let a = ArcSwap::from_pointee(42);
        check_dyn_dispatch_direct(&a);
        check_dyn_dispatch(&a);
    }

    fn check_transition<A>(a: A)
    where
        A: Access<usize>,
        A::Guard: 'static,
    {
        check_dyn_dispatch_direct(&a)
    }

    /// Tests we can easily transition from the static dispatch trait to the dynamic one
    #[test]
    fn transition() {
        let a = ArcSwap::from_pointee(42);
        check_transition(&a);
        check_transition(a);
    }

    /// Test we can dispatch from Arc<ArcSwap<_>> or similar.
    #[test]
    fn indirect() {
        let a = Arc::new(ArcSwap::from_pointee(42));
        check_static_dispatch(&a);
        check_dyn_dispatch(&a);
    }

    struct Cfg {
        value: usize,
    }

    #[test]
    fn map() {
        let a = ArcSwap::from_pointee(Cfg { value: 42 });
        let map = a.map(|a: &Cfg| &a.value);
        check_static_dispatch_direct(&map);
        check_dyn_dispatch_direct(&map);
    }

    #[test]
    fn map_option_some() {
        let a = ArcSwapOption::from_pointee(Cfg { value: 42 });
        let map = a.map(|a: &Option<Arc<Cfg>>| a.as_ref().map(|c| &c.value).unwrap());
        check_static_dispatch_direct(&map);
        check_dyn_dispatch_direct(&map);
    }

    #[test]
    fn map_option_none() {
        let a = ArcSwapOption::empty();
        let map = a.map(|a: &Option<Arc<Cfg>>| a.as_ref().map(|c| &c.value).unwrap_or(&42));
        check_static_dispatch_direct(&map);
        check_dyn_dispatch_direct(&map);
    }

    #[test]
    fn constant() {
        let c = Constant(42);
        check_static_dispatch_direct(&c);
        check_dyn_dispatch_direct(&c);
        check_static_dispatch_direct(c);
    }

    #[test]
    fn map_reload() {
        let a = ArcSwap::from_pointee(Cfg { value: 0 });
        let map = a.map(|cfg: &Cfg| &cfg.value);
        assert_eq!(0, *Access::load(&map));
        a.store(Arc::new(Cfg { value: 42 }));
        assert_eq!(42, *Access::load(&map));
    }
}
//! # crossdylib
//!
//! This library can be used to achieve shared state across shared libraries/modules.
//!
//! ## Support
//!
//! Supported platforms
//!
//! * Windows
//! * Linux
//!
//! # Example
//!
//! ### `a.dll`
//!
//! ```ignore
//! #[macro_use] extern crate crossdylib;
//!
//! crossdylib! {
//! 	static THE_ANSWER: std::sync::Mutex<u32> = std::sync::Mutex::new(39);
//! }
//!
//! #[no_mangle]
//! pub unsafe extern "C" fn increment() {
//! 	THE_ANSWER.sync().unwrap();
//!
//! 	let mut lock = THE_ANSWER.lock().unwrap();
//! 	*lock += 1;
//! 	assert_eq!(*lock, 40);
//! }
//! ```
//!
//! ### `b.dll`
//!
//! ```ignore
//! #[macro_use] extern crate crossdylib;
//!
//! crossdylib! {
//! 	static THE_ANSWER: std::sync::Mutex<u32> = std::sync::Mutex::new(39);
//! }
//!
//! #[no_mangle]
//! pub unsafe extern "C" fn increment() {
//! 	THE_ANSWER.sync().unwrap();
//!
//!


�到Cursor应用。
- 用户能够实时接收到Cursor应用执行命令后的结果。
- 支持的命令类型包括但不限于：聊天 (chat, agent, ask模式)、动作 (新建聊天, 清除聊天, 保存代码, 运行代码)。

## 3. 建议解决方案概述 (基于项目简报)

采用Supabase作为后端即服务 (BaaS)平台，核心变更包括：
- **数据通信迁移**: 使用Supabase的实时数据库 (PostgreSQL + Realtime) 替代Redis Pub/Sub。
- **数据模型**:
    - `commands` 表：存储从客户端发送的指令 (指令内容, 状态, 时间戳)。`user_id` 字段作为未来用户认证的占位符。
    - `results` 表：存储Cursor执行结果 (关联的指令ID, 时间戳, 结果内容, 错误信息)。
- **客户端改造**: 使用Supabase SDK将指令写入`commands`表，并实时订阅`commands`表的状态变更以获取结果通知。
- **服务器端改造**: 使用Supabase SDK订阅`commands`表中的新指令，处理后将结果写入`results`表，并更新`commands`表状态。
- **安全性**: 初期行级安全 (RLS) 策略将允许认证的服务器角色进行必要操作，客户端操作将基于匿名或公共角色（待细化）。由于初期不实现用户认证，数据隔离不是首要目标。

## 4. 详细需求

### 4.1. 数据模型

#### 4.1.1. `commands` 表
| 字段名        | 类型        | 描述                                     | 约束/备注                                     |
|---------------|-------------|------------------------------------------|-----------------------------------------------|
| id            | UUID        | 主键，唯一标识                           | Supabase自动生成 (PK)                         |
| created_at    | TIMESTAMPTZ | 创建时间戳                               | Supabase自动生成, `now()`                      |
| command_text  | TEXT        | 命令内容 (用户输入的自然语言)            | NOT NULL                                      |
| status        | TEXT        | 命令状态 (例如: 'pending', 'processing', 'completed', 'error') | NOT NULL, 默认 'pending'                 |
| user_id       | UUID        | (可选) 用户标识                           | 占位符，供未来用户认证功能使用，当前可为空 |
| raw_command   | JSONB       | (可选) 结构化的原始命令数据              |                                               |
| attempts      | INTEGER     | (可选) 重试次数                           | 默认 0                                        |
| last_error    | TEXT        | (可选) 最后一次错误信息                   |                                               |

#### 4.1.2. `results` 表


inject.Singleton
import org.junit.jupiter.api.Assertions
import org.junit.jupiter.api.Test
import org.junit.jupiter.api.function.Executable
import java.util.*
import java.util.Map
import kotlin.collections.listOf

@Property(name = "spec.name", value = "docexpressions")
@Property(name = "micronaut.http.client.read-timeout", value = "3600s")
@MicronautTest
class SecuredExpressionsTest {
    @Inject
    @field:Client("/")
    lateinit var httpClient: HttpClient

    @Test
    fun authenticatedByEmail() {
        val client = httpClient.toBlocking()
        val response: HttpResponse<*> = client.exchange<Any, Any>(HttpRequest.GET<Any>("/authenticated/email").basicAuth("sherlock", "password"))
        Assertions.assertEquals(HttpStatus.OK, response.status())

        var e = Executable { client.exchange<Any, Any>(HttpRequest.GET<Any>("/authenticated/email").basicAuth("moriarty", "password")) }
        var thrown = Assertions.assertThrows(HttpClientResponseException::class.java, e)

        Assertions.assertEquals(HttpStatus.FORBIDDEN, thrown.status)

        e = Executable { client.exchange<Any, Any>(HttpRequest.GET<Any>("/authenticated/email").basicAuth("watson", "password")) }
        thrown = Assertions.assertThrows(HttpClientResponseException::class.java, e)
        Assertions.assertEquals(HttpStatus.UNAUTHORIZED, thrown.status)
    }

    @Requires(property = "spec.name", value = "docexpressions")
    @Singleton
    internal class AuthenticationProviderUserPassword :
        MockAuthenticationProvider<HttpRequest<Any>, Any, Any>(
            Arrays.asList(
                SuccessAuthenticationScenario("sherlock", listOf("ROLE_ADMIN"), Map.of<String, Any>("email", "sherlock@micronaut.example")),
                SuccessAuthenticationScenario("moriarty", listOf("ROLE_ADMIN"), Map.of<String, Any>("email", "moriarty@micronaut.example"))
            )
        )
}
package io.micronaut.test.kotest5

import io.kotest.core.spec.Spec
import io.kotest.core.spec.style.BehaviorSpec
import io.kotest.matchers.shouldBe
import io.kotest.matchers.shouldNotBe
import io.micronaut.test.extensions.kotest5.annotation.MicronautTest
import io.micronaut.transaction.SynchronousTransactionManager
import io.micronaut.transaction.support.DefaultTransactionDefinition
import jakarta.persistence.EntityManager

@MicronautTest(rollback = false)
@DbProperties
class JpaNoRollbackTest(
    private val entityManager: EntityManager,
    private val transactionManager: SynchronousTransactionManager<Any>
) : BehaviorSpec() {

    init {
        given("no rollback between tests") {
            `when`("test persist one") {
                val book = Book()
                book.title = "The Stand"
                entityManager.persist(book)

                then("the book is persisted") {
                    entityManager.find(Book::class.java, book.id) shouldNotBe null

                    val query = entityManager.criteriaBuilder.createQuery(Book::class.java)
                    query.from(Book::class.java)
                    entityManager.createQuery(query).resultList.size shouldBe 1
                }
            }
        }

        given("a new transaction") {
            `when`("test persist two") {
                val book = Book()
                book.title = "The Shining"
                entityManager.persist(book)

                then("the book is persisted") {
                    entityManager.find(Book::class.java, book.id) shouldNotBe null

                    val query = entityManager.criteriaBuilder.createQuery(Book::class.java)


using System;
using System.Collections.Generic;
using System.Linq;
using Castle.Windsor;
using Microsoft.AspNet.SignalR;

namespace Abp.Web.SignalR
{
    /// <summary>
    /// Replaces <see cref="DefaultDependencyResolver"/> to resolve dependencies from Castle Windsor (<see cref="IWindsorContainer"/>).
    /// </summary>
    public class WindsorDependencyResolver : DefaultDependencyResolver
    {
        private readonly IWindsorContainer _windsorContainer;

        /// <summary>
        /// Initializes a new instance of the <see cref="WindsorDependencyResolver"/> class.
        /// </summary>
        /// <param name="windsorContainer">The windsor container.</param>
        public


up Tasks.

## -see-also

CVssWriter::Initialize

IVssBackupComponents

IVssBackupComponents::PrepareForBackup

IVssExamineWriterMetadata::GetIdentity

VSS_COMPONENT_TYPE---
UID: NF:vsbackup.IVssBackupComponents.PostRestore
title: IVssBackupComponents::PostRestore (vsbackup.h)
description: The PostRestore method will cause VSS to generate a PostRestore event, signaling writers that the current restore operation has finished.
helpviewer_keywords: ["IVssBackupComponents interface [VSS]","PostRestore method","IVssBackupComponents.PostRestore","IVssBackupComponents::PostRestore","PostRestore","PostRestore method [VSS]","PostRestore method [VSS]","IVssBackupComponents interface","_win32_ivssbackupcomponents_postrestore","base.ivssbackupcomponents_postrestore","vsbackup/IVssBackupComponents::PostRestore"]
old-location: base\ivssbackupcomponents_postrestore.htm
tech.root: base
ms.assetid: 01cf3931-59ef-4572-9f2e-aa210da0ac2d
ms.date: 12/05/2018
ms.keywords: IVssBackupComponents interface [VSS],PostRestore method, IVssBackupComponents.PostRestore, IVssBackupComponents::PostRestore, PostRestore, PostRestore method [VSS], PostRestore method [VSS],IVssBackupComponents interface, _win32_ivssbackupcomponents_postrestore, base.ivssbackupcomponents_postrestore, vsbackup/IVssBackupComponents::PostRestore
req.header: vsbackup.h
req.include-header: VsBackup.h, Vss.h, VsWriter.h
req.target-type: Windows
req.target-min-winverclnt: Windows XP [desktop apps only]
req.target-min-winversvr: Windows Server 2003 [desktop apps only]
req.kmdf-ver:
req.umdf-ver:
req.ddi-compliance:
req.unicode-ansi:
req.idl:
req.max-support:
req.namespace:
req.assembly:
req.type-library:
req.lib: VssApi.lib
req.dll:
req.irql:
targetos: Windows
req.typenames:
req.redist:
ms.custom: 19H1
f1_keywords:
 - IVssBackupComponents::PostRestore
 - vsbackup/IVssBackupComponents::PostRestore
dev_langs:
 - c++
topic_type:
 - APIRef
 - kbSyntax
api_type:
 - COM
api_location:
 - VssApi.lib
 - VssApi.dll
api_name:
 - IVssBackupComponents.PostRestore
---

# IVssBackupComponents::PostRestore

## -description

The
PostRestore method will cause VSS to generate a
PostRestore event, signaling writers that the current restore operation has finished.

## -parameters

### -param ppAsync [out]

Doubly indirect pointer to an
IVssAsync object that contains status data for the signaled event.

## -returns

The following are the valid return codes for this method.

Value
Meaning

S_OK

Successfully returned the provider support information.

E_ACCESSDENIED

</


PermissionLogController: {},
      },
    };

    const newStorage = await migration70.migrate(oldStorage);
    expect(newStorage).toStrictEqual({
      meta: {
        version: 70,
      },
      data: {
        FooController: { a: 'b' },
        PermissionLogController: {},
      },
    });
  });
});
export const FIXTURES_PREFERENCES = {
  preferences: {
    hideZeroBalanceTokens: false,
    showExtensionInFullSizeView: false,
    showFiatInTestnets: true,
    showTestNetworks: true,
    smartTransactionsOptInStatus: true,
    useNativeCurrencyAsPrimaryCurrency: true,
    petnamesEnabled: true,
    featureNotificationsEnabled: true,
    showTokenAutodetectModal: false,
    showNftAutodetectModal: false,
    showConfirmationAdvancedDetails: false,
    privacyMode: false,
  },
  featureFlags: {
    sendHexData: true,
  },
  firstTimeFlowType: 'import',
  completedOnboarding: true,
  currentLocale: 'en',
  knownMethodData: {},
  use4ByteResolution: true,
  participateInMetaMetrics: true,
  dataCollectionForMarketing: true,
  useNftDetection: true,
  usePhishDetect: true,
  useTokenDetection: true,
  useCurrencyRateCheck: true,
  useMultiAccountBalanceChecker: true,
  theme: 'light',
  useExternalNameSources: true,
  useTransactionSimulations: true,
  enableMV3TimestampSave: true,
  useExternalServices: true,
  isBackupAndSyncEnabled: true,
  isAccountSyncingEnabled: true,
};
import { v4 as uuidv4 } from 'uuid';

/**
 * Generates a specified number of unread notifications for the given account.
 *
 * @param {string} account - The account address to use in the notifications.
 * @param {number} numNotifications - The number of unread notifications to generate.
 * @returns {object} The generated unread notifications object.
 */
export const withUnreadNotifications = (account, numNotifications) => {
  const notifications = [];

  for (let i = 0; i < numNotifications; i++) {
    const id = uuidv4();
    const triggerId = uuidv4();
    const txHash = `0x${uuidv4().replace(/-/gu, '').padEnd(64, '0')}`;

    const notification = {
      address: account,
      block_number: 59796924,
      block_timestamp: '1721922504',
      chain_id: 1,
      created_at: new Date().toISOString(),
      data: {
        to: account,
        from: account,
        kind: 'eth_received',
        amount: {
          eth: '0.000100000000000000',
          usd: '0.27',
        },
        network_fee: {
          gas_price: '30000000078',
          native_token_price_in_usd: '0.497927',
        },
      },
      id,
      trigger_id: triggerId,
      tx_hash: txHash,
      unread: true,
      type: 'eth_received',
      createdAt: new Date().toISOString(),
      isRead: false,
    };

    notifications.push(notification);
  }

  const notificationServicesController = {
    isFeatureAnnouncementsEnabled: true,
    isMetamaskNotificationsFeatureSeen: true,
    isNotificationServicesEnabled: true,
    metamaskNotificationsReadList: [],
    metamaskNotificationsList: notifications,
  };
  return notificationServicesController;
};
import EventEmitter from '@metamask/safe-event-emitter';
import ExtensionPlatform from '../platforms/extension';
import {
  NOTIFICATION_HEIGHT,
  NOTIFICATION_WIDTH,
} from '../../../shared/constants/notifications';

export const NOTIFICATION_MANAGER_EVENTS = {
  POPUP_CLOSED: 'onPopupClosed',
};

/**
 * A collection of methods for controlling the showing and hiding of the notification popup.
 */
export default class NotificationManager extends Eve


rse = white,
    backgroundSurfaceSecondary = black,
    backgroundSurfaceRaised = grey_11,
    backgroundDisabled = grey_06,
    backgroundInverse = grey_10,
    backgroundInverseHover = grey_09,
    backgroundInversePressed = grey_08,
    backgroundSelected = grey_01,
    backgroundAction = grey_01,
    backgroundActionHover = white,
    backgroundActionDisabled = grey_06,
    backgroundActionPressed = grey_02,
    backgroundAccentGreenBold = green_05,
    backgroundAccentGreenBrand = green_05,
    backgroundAccentGreenSubtle = green_09,
    backgroundAccentBlueBold = blue_05,
    backgroundAccentBlueSubtle = blue_09,
    backgroundAccentOrangeSubtle = orange_09,
    backgroundAccentPurpleSubtle = purple_09,
    backgroundDangerBold = red_05,
    backgroundDangerSubtle = red_10,
    backgroundDangerBoldPressed = red_03,
    backgroundDangerBoldHovered = red_04,
    backgroundDangerSubtleHovered = red_08,
    backgroundAccentGrayBold = grey_06,
    backgroundAccentGraySubtle = grey_09,
    backgroundWarningBold = yellow_05,
    backgroundWarningSubtle = yellow_10,
    backgroundScheduledTag = grey_07,

    // Border Colors
    borderAccentBlueBold = blue_03,
    borderAccentBlueSubtle = blue_08,
    borderAccentGreenSubtle = green_08,
    borderWarningBold = yellow_03,
    borderWarningSubtle = yellow_08,
    borderDisabled = grey_09,
    borderBoldHover = grey_03,
    borderSubtleHover = white,
    borderActive = grey_01,
    borderBold = grey_06,
    borderDangerBold = red_03,
    borderDangerSubtle = red_08,
    borderSubtle = grey_08,
    borderFocus = blue_05,

    // Icon Colors
    icon = grey_02,
    iconDanger = red_03,
    iconWarning = yellow_03,
    iconSubtle = grey_05,
    iconInverse = grey_08,
    iconInfo = blue_03,
    iconDisabled = grey_06,

    // OLD COLORS
    // Greens
    kds_create_100 = kds_create_700,
    kds_create_300 = kds_create_500,
    kds_create_500 = kds_create_300,
    kds_create_700 = kds_create_100,

    // BLUES
    kds_trust_100 = kds_trust_700,
    kds_trust_300 = kds_trust_500,
    kds_trust_500 = kds_trust_300,
    kds_trust_700 = kds_trust_100,

    // CORALS
    kds_celebrate_100 = kds_celebrate_700,
    kds_celebrate_300 = kds_celebrate_500,
    kds_celebrate_500 = kds_celebrate_300,
    kds_celebrate_700 = kds_celebrate_100,

    // GREYS
    kds_white = kds_black,
    kds_support_100 = kds_support_700,
    kds_support_200 = kds_support_500,
    kds_support_300 = kds_support_400,
    kds_support_400 = kds_support_300,
    kds_support_500 = kds_support_200,
    kds_support_700 = kds_support_100,
    kds_black = kds_white,

    // FUNCTIONAL COLORS
    kds_alert = kds_celebrate_500,
    kds_warn = kds_warn,
    kds_inform = kds_inform,
    facebook_blue = facebook_blue,


-- author:Manistein
-- desc:A tool to show lua bytecode proto
-- date:2018-08-25

local file_name, output_file_name = ...
print(string.format("file_name = %s", file_name))

local define = {}
define.size = {
    int = 0,
    size_t = 0,
    instruction = 0,
    lua_integer = 0,
    lua_number = 0,
}
define.signature = "\x1bLua"
define.signature_hex_str = "1b4c7561"
define.luac_data = "\x19\x93\r\n\x1a\n"
define.version = 0x53
define.official = 0x00
define.luac_num = 370.5
define.big_endian_code = 0x5678
define.endianess = 0 -- 1 is little endian

-------------------------------------------------------------------------------------
-- opcode define
-------------------------------------------------------------------------------------
local optype = {
    iABC     = 0,
    iABx     = 1,
    iAsBx    = 2,
    iAx      = 3,
}

local opargmask = {
    OpArgN   = 0,
    OpArgU   = 1,
    OpArgK   = 2,
    OpArgR   = 3,
}

local opname2code = {
-------------------------------------------------------------------------
-- name                         args    description
------------------------------------------------------------------------
OP_MOVE             = 0,     -- A B     R(A) := R(B)
OP_LOADK            = 1,     -- A Bx    R(A) := Kst(Bx)
OP_LOADKX           = 2,     -- A       R(A) := Kst(extra arg)
OP_LOADBOOL         = 3,     -- A B C   R(A) := (Bool)B; if (C) pc++
OP_LOADNIL          = 4,     -- A B     R(A), R(A+1), ..., R(A+B) := nil
OP_GETUPVAL         = 5,     -- A B     R(A) := UpValue[B]

OP_GETTABUP         = 6,     -- A B C   R(A) := UpValue[B][RK(C)]
OP_GETTABLE         = 7,     -- A B C   R(A) := R(B)[RK(C)]

OP_SETTABUP         = 8,     -- A B C   UpValue[A][RK(B)] := RK(C)
OP_SETUPVAL         = 9,     -- A B     UpValue[B] := R(A)
OP_SETTABLE         = 10,    -- A B C   R(A)[RK(B)] := RK(C)

OP_NEWTABLE         = 11,    -- A B C   R(A) := {} (size = B,C)

OP_SELF             = 12,    -- A B C   R(A+1) := R(B); R(A) := R(B)[RK(C)]

OP_ADD              = 13,    -- A B C   R(A) := RK(B) + RK(C)
OP_SUB              = 14,    -- A B C   R(A) := RK(B) - RK(C)
OP_MUL              = 15,    -- A B C   R(A) := RK(B) * RK(C)
OP_MOD              = 16,    -- A B C   R(A) := RK(B) % RK(C)
OP_POW              = 17,    -- A B C   R(A) := RK(B) ^ RK(C)
OP_DIV              = 18,    --


 "<space>wa", vim.lsp.buf.remove_workspace_folder, opts)
  map("n", "<space>wd", function() vim.notify(vim.inspect(vim.lsp.buf.list_workspace_folders())) end, opts)
  map("n", "<space>rn", require("plugins.lsp.rename").lsp_rename, opts)
  map("n", "<space>gr", vim.lsp.buf.references, opts)
  map({ "n", "v" }, "<space>ca", vim.lsp.buf.code_action, opts)
  map("n", "<space>f", formatting(buffer), opts)

  if client.server_capabilities.documentFormattingProvider then
    if client.name == "null-ls" and is_none_formatting_enabled(buffer) or client.name ~= "null-ls" then
      vim.bo[buffer].formatexpr = "v:lua.vim.lsp.formatexpr()"
      map("n", "<space>gq", formatting(buffer), opts)
    else
      vim.bo[buffer].formatexpr = nil
    end
  end

  local LSP_GROUP = vim.api.nvim_create_augroup("LSPGroup", {})
  if client.supports_method("textDocument/codeLens") then
    autocmd({ "BufEnter", "InsertLeave", "BufWritePost", "CursorHold" }, {
      callback = vim.lsp.codelens.refresh,
      group = LSP_GROUP,
      buffer = buffer,
    })
  end

  if client.config.flags then client.config.flags.allow_incremental_sync = true end
  if navic_ok and client.server_capabilities.documentSymbolProvider then navic.attach(client, buffer) end
  client.server_capabilities.semanticTokensProvider = nil
end


hBuilder.Field("add").Index(i).Field("name"), add.GetName()))
		if add.GetValue() == "" {
			err.AddViolationAt(pathBuilder.Field("add").Index(i).Field("value"), "cannot be empty")
		}
	}
	for i, remove := range headers.GetRemove() {
		err.Add(validateHeaderName(pathBuilder.Field("remove").Index(i).Field("name"), remove.GetName()))
	}
	return err
}

func validateHeaderName(pathBuilder validators.PathBuilder, headerName string) validators.ValidationError {
	var err validators.ValidationError
	if headerName == "" {
		err.AddViolationAt(pathBuilder, "cannot be empty")
		return err
	}
	if headerName[0] == ':' || headerName == "host" || headerName == "Host" {
		err.AddViolationAt(pathBuilder, "host header and HTTP/2 pseudo-headers are not allowed to be modified")
	}
	return err
}

func (d *TrafficRouteResource) validateSplitAndDestination(pathBuilder validators.PathBuilder, split []*mesh_proto.TrafficRoute_Split, destination map[string]string) validators.ValidationError {
	var err validators.ValidationError
	if split == nil && destination == nil {
		err.AddViolationAt(pathBuilder, `requires either "destination" or "split"`)
	}
	if split != nil && destination != nil {
		err.AddViolationAt(pathBuilder, `"split" cannot be defined at the same time as "destination"`)
	}

	if split != nil {
		err.Add(d.validateSplit(pathBuilder.Field("split"), split))
	}
	if destination != nil {
		err.Add(d.validateDestination(pathBuilder.Field("destination"), destination))
	}
	return err
}

func (d *TrafficRouteResource) validateHTTPMatch(pathBuilder validators.PathBuilder, match *mesh_proto.TrafficRoute_Http_Match) validators.ValidationError {
	var err validators.ValidationError
	if match.GetPath() == nil && match.GetMethod() == nil && match.GetHeaders() == nil {
		err.AddViolationAt(pathBuilder, `must be present and contain at least one of the elements: "method", "path" or "headers"`)
		return err
	}
	if match.GetMethod() != nil {
		err.Add(d.validateStringMatcher(pathBuilder.Field("method"), match.GetMethod()))
	}
	if match.GetPath() != nil {
		err.Add(d.validateStringMatcher(pathBuilder.Field("path"), match.GetPath()))
	}
	if match.GetHeaders() != nil && len(match.GetHeaders()) == 0 {
		err.AddViolationAt(pathBuilder.Field("headers"), "must contain at least one element")
	}
	for key, matcher := range match.GetHeaders() {
		path := pathBuilder.Field("headers").Key(key)
		if key == "" {
			err.AddViolationAt(path, "cannot be empty")
		}
		err.Add(d.validateStringMatcher(path, matcher))
	}
	return err
}

func (d *TrafficRouteResource) validateStringMatcher(pathBuilder validators.PathBuilder, matcher *mesh_proto.TrafficRoute_Http_Match_StringMatcher) validators.ValidationError {
	var err validators.ValidationError
	switch matcher.GetMatcherType().(type) {
	case *mesh_proto.TrafficRoute_Http_Match_StringMatcher_Exact:
	case *mesh_proto.TrafficRoute_Http_Match_StringMatcher_Prefix:
		if matcher.GetPrefix() == "" {
			err.AddViolationAt(pathBuilder.Field("prefix"), `cannot be empty`)
		}
	case *mesh_proto.TrafficRoute_Http_Match_StringMatcher_Regex:
		if matcher.GetRegex() == "" {
			err.AddViolationAt(pathBuilder.


    /// <param name="visitor">The visitor walking the tree.</param>
    public void Accept(ITreeWalker visitor)
    {
        visitor.Visit(this);
    }

    /// <summary>
    /// Validates the expression with the given context.
    /// </summary>
    /// <param name="context">The validator to report errors to.</param>
    public void Validate(IValidationContext context)
    {
        if (!context.IsInLoop)
        {
            var error = new ParseError(ErrorCode.LoopMissing, this);
            context.Report(error);
        }

        if (_expression is EmptyExpression == false)
        {
            var error = new ParseError(ErrorCode.TerminatorExpected, _expression);
            context.Report(error);
        }
    }

    #endregion
}


iÈd" +
			"è SuwidiisiÈdè SwahiliÈdè TamiliÈdè TeluguÈdè TaiÈdè TigrinyaÈdè TurkmenÈdè Tọọk" +
			"isiÈdè UkaniaÈdè UduÈdè UzbekÈdè JetinamuÈdè XhosaÈdè YiddishiÈdè YorùbáÈdè Mand" +
			"ariÈdè ṢuluÈdè TagalogiÈdè KlingoniÈdè Serbo-Croatiani",
		[]uint16{ // 602 entries
			0x0, 0x0, 0x0, 0x0, 0xe, 0x19, 0x26, 0x26, 0x33, 0x3b, 0x3b, 0x3b,
			0x4c, 0x4c, 0x5a, 0x67, 0x67, 0x67, 0x74, 0x74, 0x81, 0x8d, 0x99, 0x99,
			0x99, 0x99, 0x99, 0xa4, 0xa4, 0xa4, 0xb0, 0xc5, 0xd9, 0xd9, 0xd9, 0xd9,
			0xe5, 0xf9, 0x108, 0x116, 0x123, 0x12e, 0x139, 0x139, 0x145, 0x145, 0x152, 0x160,
			0x16c, 0x179, 0x195, 0x1a2, 0x1af, 0x1bd, 0x1bd, 0x1c8, 0x1d4, 0x1df, 0x1df, 0x1ec,
			0x1ec, 0x1fa, 0x20b, 0x20b, 0x215, 0x224, 0x22d, 0x236, 0x236, 0x236, 0x236, 0x245,
			0x253, 0x253, 0x261, 0x26f, 0x27c, 0x27c, 0x27c, 0x27c, 0x27c, 0x27c, 0x288, 0x295,
			0x2a0, 0x2a0, 0x2a0, 0x2a0, 0x2a0, 0x2a0, 0x2a0, 0x2ac, 0x2ac, 0x2ac, 0x2ac, 0x2ac,
			0x2ac, 0x2bb, 0x2bb, 0x2c9, 0x2c9, 0x2c9, 0x2c9, 0x2d8, 0x2d8, 0x2d8, 0x2e5, 0x2f1,
			0x2fc, 0x309, 0x309, 0x309, 0x315, 0x315, 0x31f, 0x31f, 0x32b, 0x32b, 0x32b, 0x32b,
			0x339, 0x339, 0x339, 0x339, 0x339, 0x346, 0x346, 0x35b, 0x35b, 0x369, 0x369, 0x369,
			0x369, 0x376, 0x388, 0x395, 0x3a8, 0x3a8, 0x3b4, 0x3b4, 0x3b4, 0x3c3, 0x3d0, 0x3de,
			0x3de, 0x3de, 0x3ef, 0x3fc, 0x408, 0x408, 0x414, 0x420, 0x42f, 0x43c, 0x448, 0x454,
			0x454, 0x45d, 0x46b, 0x478, 0x478, 0x478, 0x489, 0x489, 0x489, 0x489, 0x489, 0x495,
			0x49e, 0x4a9, 0x4a9, 0x4b7, 0x4b7, 0x4b7, 0x4b7, 0x4c2, 0x4d0, 0


,  /* 4 = float     */
		VMOpcode.DRETURN,  /* 5 = double    */
		VMOpcode.IRETURN,  /* 6 = char      */
		VMOpcode.ARETURN   /* 7 = reference */
		};

	// the first dimension is the current vmTypeId
	// the second dimension is the target vmTypeId
	//
	// the cells of the entry at [current,target] are:
	// 0: operation
	// 1: result type of operation
	// if entry[1] = target, we are done. otherwise,
	// you have to continue with entry[1] as the new current
	// after generating the opcode listed (don't generate if it is NOP).
	// if entry[0] = BAD, we can

	static final short CAST_CONVERSION_INFO[][][] = {
		/* current = vm_byte */
		{
		/* target = vm_byte      */ { VMOpcode.NOP, BCExpr.vm_byte },
		/* target = vm_short     */ { VMOpcode.NOP, BCExpr.vm_short },
		/* target = vm_int       */ { VMOpcode.NOP, BCExpr.vm_int },
		/* target = vm_long      */ { VMOpcode.NOP, BCExpr.vm_int },
		/* target = vm_float     */ { VMOpcode.NOP, BCExpr.vm_int },
		/* target = vm_double    */ { VMOpcode.NOP, BCExpr.vm_int },
		/* target = vm_char      */ { VMOpcode.NOP, BCExpr.vm_char },
		/* target = vm_reference */ { VMOpcode.BAD, BCExpr.vm_reference }
		},
		/* current = vm_short */
		{
		/* target = vm_byte      */ { VMOpcode.NOP, BCExpr.vm_byte },
		/* target = vm_short     */ { VMOpcode.NOP, BCExpr.vm_short },
		/* target = vm_int       */ { VMOpcode.NOP, BCExpr.vm_int },
		/* target = vm_long      */ { VMOpcode.NOP, BCExpr.vm_int },
		/* target = vm_float     */ { VMOpcode.NOP, BCExpr.vm_int },
		/* target = vm_double    */ { VMOpcode.NOP, BCExpr.vm_int },
		/* target = vm_char      */ { VMOpcode.NOP, BCExpr.vm_char },
		/* target = vm_reference */ { VMOpcode.BAD, BCExpr.vm_reference }
		},
		/* current = vm_int */
		{
		/* target = vm_byte      */ { VMOpcode.I2B, BCExpr.vm_byte },
		/* target = vm_short     */ { VMOpcode.I2S, BCExpr.vm_short },
		/* target = vm_int       */ { VMOpcode.NOP, BCExpr.vm_int },
		/* target = vm_long      */ { VMOpcode.I2L, BCExpr.vm_long },
		/* target = vm_float     */ { VMOpcode.I2F, BCExpr.vm_float },
		/* target = vm_double    */ { VMOpcode.I2D, BCExpr.vm_double },
		/* target = vm_char      */ { VMOpcode.I2B, BCExpr.vm_char },
		/* target = vm_reference */ { VMOpcode.BAD, BCExpr.vm_reference }
		},
		/* current = vm_long */
		{
		/* target = vm_byte      */ { VMOpcode.L2I, BCExpr.vm_int },
		/* target = vm_short     */ { VMOpcode.L2I, BCExpr.vm_int },
		/* target = vm_int       */ { VMOpcode.L2I, BCExpr.vm_int },
		/* target = vm_long      */ { VMOpcode.NOP,


on-attribute-size-m: "\e925";
@vcv-ui-icon-attribute-size-s: "\e926";
@vcv-ui-icon-attribute-size-xs: "\e927";
@vcv-ui-icon-attribute-vertical-alignment-bottom: "\e928";
@vcv-ui-icon-attribute-vertical-alignment-middle: "\e929";
@vcv-ui-icon-attribute-vertical-alignment-top: "\e92a";
@vcv-ui-icon-attribute-mirror-horizontally-left-path-1: "\e905";
@vcv-ui-icon-attribute-mirror-horizontally-left-path-2: "\e906";
@vcv-ui-icon-attribute-mirror-horizontally-right-path-1: "\e907";
@vcv-ui-icon-attribute-mirror-horizontally-right-path-2: "\e913";
@vcv-ui-icon-attribute-mirror-vertically-down-path-1: "\e915";
@vcv-ui-icon-attribute-mirror-vertically-down-path-2: "\e917";
@vcv-ui-icon-attribute-mirror-vertically-up-path-1: "\e919";
@vcv-ui-icon-attribute-mirror-vertically-up-path-2: "\e91b";
@vcv-ui-icon-attribute-sandwich-bold: "\e900";
@vcv-ui-icon-attribute-sandwich-regular: "\e901";
@vcv-ui-icon-attribute-sandwich-thin: "\e902";
@vcv-ui-icon-attribute-sandwich-right: "\e903";
@vcv-ui-icon-attribute-sandwich-left: "\e904";
.@{fa-css-prefix}.@{fa-css-prefix}-glass:before { content: @fa-var-glass-martini; }

.@{fa-css-prefix}.@{fa-css-prefix}-meetup {
  font-family: 'Font Awesome 5 Brands';
  font-weight: 400;
}

.@{fa-css-prefix}.@{fa-css-prefix}-star-o {
  font-family: 'Font Awesome 5 Free';
  font-weight: 400;
}
.@{fa-css-prefix}.@{fa-css-prefix}-star-o:before { content: @fa-var-star; }

.@{fa-css-prefix}.@{fa-css-prefix}-remove:before { content: @fa-var-times; }

.@{fa-css-prefix}.@{fa-css-prefix}-close:before { content: @fa-var-times; }

.@{fa-css-prefix}.@{fa-css-prefix}-gear:before { content: @fa-var-cog; }

.@{fa-css-prefix}.@{fa-css-prefix}-trash-o {
  font-family: 'Font Awesome 5 Free';
  font-weight: 400;
}
.@{fa-css-prefix}.@{fa-css-prefix}-trash-o:before { content: @fa-var-trash-alt; }

.@{fa-css-prefix}.@{fa-css-prefix}-file-o {
  font-family: 'Font Awesome 5 Free';
  font-weight: 400;
}
.@{fa-css-prefix}.@{fa-css-prefix}-file-o:before { content: @fa-var-file; }

.@{fa-css-prefix}.@{fa-css-prefix}-clock-o {
  font-family: 'Font Awesome 5 Free';
  font-weight: 400;
}
.@{fa-css-prefix}.@{fa-css-prefix}-clock-o:before { content: @fa-var-clock; }

.@{fa-css-prefix}.@{fa-css-prefix}-arrow-circle-o-down {
  font-family: 'Font Awesome 5 Free';
  font-weight: 400;


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

import cirq
import numpy as np
import pytest

import qualtran.testing as qlt_testing
from qualtran import Bloq
from qualtran.bloqs.basic_gates import XGate, YGate, ZGate
from qualtran.bloqs.mcmt.multi_control_pauli import (
    _ccpauli,
    _ccpauli_symb,
    MultiControlPauli,
    MultiControlX,
)

def test_ccpauli(bloq_autotester):
    bloq_autotester(_ccpauli)

def test_ccpauli_symb():
    bloq = _ccpauli_symb.make()
    assert bloq.t_complexity().t == 4 * bloq.n_ctrls - 4

@pytest.mark.parametrize("num_controls", [0, 1, 2, *range(7, 17)])
@pytest.mark.parametrize("pauli", [XGate(), YGate(), ZGate()])
@pytest.mark.parametrize('cv', [0, 1])
def test_t_complexity_mcp(num_controls: int, pauli: Bloq, cv: int):
    gate = MultiControlPauli([cv] * num_controls, target_bloq=pauli)
    qlt_testing.assert_valid_bloq_decomposition(gate)
    qlt_testing.assert_equivalent_bloq_counts(gate)

@pytest.mark.parametrize("num_controls", [*range(10)])
@pytest.mark.parametrize("pauli", [cirq.X, cirq.Y, cirq.Z])
@pytest.mark.parametrize('cv', [0, 1])
def test_mcp_unitary(num_controls: int, pauli: cirq.Pauli, cv: int):
    from qualtran.cirq_interop import cirq_gate_to_bloq

    cvs = (cv,) * num_controls
    gate = MultiControlPauli(cvs, target_bloq=cirq_gate_to_bloq(pauli))
    cpauli = pauli.controlled(control_values=cvs) if num_controls else pauli
    np.testing.assert_allclose(gate.tensor_contract(), cirq.unitary(cpauli))

@pytest.mark.parametrize("cvs", [(0,), (1, 0), (1, 1, 1), (1, 0, 1, 0)])
def test_multi_control_x(cvs):
    bloq = MultiControlX(cvs=cvs)
    qlt_testing.assert_valid_bloq_decomposition(bloq=bloq)

@pytest.mark.parametrize(
    "cvs,x,ctrls,result",
    [
        ((0,), 1, (0,), 0),
        ((1, 0), 0, (1, 0), 1),
        ((1, 1, 1), 1, (1, 1, 1), 0),
        ((1, 0, 1, 0), 1, (1, 0, 1, 0), 0),
        ((1,), 0, (0,), 0),
        ((), 0, (), 1),
    ],
)
def test_classical_multi_control_X_target_x(cvs, x, ctrls, result):
    bloq = MultiControlX(cvs=cvs)
    cbloq = bloq.decompose_bloq()
    kwargs = {'target': x} | ({'controls': ctrls} if ctrls else {})
    bloq_classical = bloq.call_classically(**kwargs)
    cbloq_classical = cbloq.call_classically(**kwargs)

    assert len(bloq_classical) == len(cbloq_classical)
    for i in range(len(bloq_classical)):
        np.testing.assert_array_equal(bloq_classical[i], cbloq_classical[i])

    assert bloq_classical[-1] == result

@pytest.mark.parametrize(
    "cvs,x,ctrls,result",
    [
        ((0,), 1, (0,), 0),
        ((1, 0), 0, (1, 0), 1),
        ((1, 1, 1), 1, (1, 1, 1), 0),
        ((1, 0, 1, 0), 1, (1, 0, 1, 0), 0),
        ((1,), 0, (0,), 0),
    ],
)
def test_classical_multi_control_x(cvs, x, ctrls, result):
    bloq = MultiControlX(cvs=cvs)
    cbloq = bloq.decompose_bloq()
    bloq_classical = bloq.call_classically(target=x, controls=ctrls)
    cbloq_classical = cbloq.call_classically(target=x, controls=ctrls)

    assert len(bloq_classical) == len(cbloq_classical)
    for i in range(len(bloq_classical)):
        np.testing.assert_array_equal(bloq_classical[i], cbloq_classical[i])

    assert bloq_classical[-1] == result

@pytest.mark.notebook
def test_notebook():
    qlt_testing.execute_notebook('multi_control_multi_target_pauli')


Height + Height - FilterHeight)/StrideHeight + 1`;
- `Width` рассчитывается относительно входа по формуле
`(2 * PaddingWidth + Width - FilterWidth)/StrideWidth + 1`;
- `Depth` равен `1`;
- `Channels` равен `Channels` входа.
# Класс CSplitHeightLayer

<!-- TOC -->

- [Класс CSplitHeightLayer](#класс-csplitheightlayer)
    - [Настройки](#настройки)
        - [Размеры выходов](#размеры-выходов)
    - [Обучаемые параметры](#обучаемые-параметры)
    - [Входы](#входы)
    - [Выходы](#выходы)

<!-- /TOC -->

Класс реализует слой, разбивающий единственный входной блоб на несколько меньших блобов по размерности `Height`.

## Настройки

### Размеры выходов

```c++
void SetOutputCounts(const CArray<int>& outputCounts);
```

Установка размерности `Height` у выходов. Подробнее о количестве и размерах выходов см. [ниже](#выходы).

```c++
void SetOutputCounts2(int count0);
void SetOutputCounts3(int count0, int count1);
void SetOutputCounts4(int count0, int count1, int count2);
```

Установка размерности `Height` у выходов, без необходимости конструировать массив. Аналогично вызовам `SetOutputCounts(const CArray<int>&)` с массивом из `1`, `2` и `3` элементов соответственно. Подробнее о количестве и размерах выходов см. [ниже](#выходы).

## Обучаемые параметры

Слой не имеет обучаемых параметров.

## Входы

На единственный вход подается блоб размера:

- `BatchLength`, `BatchWidth`, `ListSize`, `Width`, `Depth`, `Channels` могут быть произвольными;
- `Height` не меньше суммы элементов `GetOutputCounts()`.

## Выходы

Слой имеет как минимум `GetOutputCounts().Size()` выходов, каждый из которых содержит блоб размера:

- `BatchLength`, `BatchWidth`, `ListSize`, `Width`, `Depth`, `Channels` равные соответствующим размерам входа;
- `Height` равен соответствующему элементу `GetOutputCount()`, например, у первого выхода `Height` равен `GetOutputCount()[0]` и т.д.

Однако, если `Channels` входа **больше** суммы элементов `GetOutputCounts()`, то у слоя будет еще один выход размера:

- `BatchLength`, `BatchWidth`, `ListSize`, `Width`, `Depth`, `Channels` равные соответствующим размерам входа;
- `Height` равен разности `Height` входа и суммы элементов `GetOutputCount()`.
# Класс CSplitBatchWidthLayer

<!-- TOC -->

- [Класс CSplitBatchWidthLayer](#класс-csplitba


namespace ModalNavigation;

public class MainPageCS : ContentPage
{
    private CollectionView collectionView;
    private List<Contact> contacts = [];

    public MainPageCS()
    {
        SetupData();

        collectionView = new CollectionView
        {
            ItemsSource = contacts
        };
        collectionView.SelectionChanged += OnSelectionChanged;

        Thickness padding;
        if (DeviceInfo.Platform.Equals(DevicePlatform.iOS))
        {
            padding = new Thickness(0, 40, 0, 0);
        }
        else
        {
            padding = new Thickness();
        }

        Padding = padding;
        Content = new StackLayout
        {
            Children = {
                    collectionView
                }
        };
    }

    async void OnSelectionChanged(object? sender, SelectionChangedEventArgs e)
    {
        if (e.CurrentSelection.FirstOrDefault() is Contact contact)
        {
            var detailPage = new DetailPageCS
            {
                BindingContext = contact
            };
            collectionView.SelectedItem = null;


-- Solve for initial phi. Temporarily re-set the calcPhi function in the advance method.
      local trueCalcPhi = self.calcPhi
      self.calcPhi = (not self.evolve) and self.calcPhiInitial or self.calcPhi

      self:advance(0.0, population, 1, 1)

      if (not self.evolve) then self.calcPhi = trueCalcPhi end
   end

   if self.isElectromagnetic then
      -- Solve for initial Apar.
      local apar = self.potentials[1].apar
      self.currentDensLocal:clear(0.0)
      for _, s in population.iterLocal() do
         self.currentDensLocal:accumulate(s:getCharge(), s:getMomDensity())
      end
      -- Reduce currents across species communicator.
      self.currentDens:clear(0.0)
      population:AllreduceByCell(self.currentDensLocal, self.currentDens, 'sum')

      self.aparSlvr:advance(0.0, {self.currentDens}, {apar})

      -- Clear dApar/dt ... will be solved for before being used.
      self.potentials[1].dApardt:clear(0.0)
   end

   -- Apply BCs and update ghosts.
   self:applyBc(0, self.potentials[1])

   if self.ndim > 1 and self.ioFrame == 0 and (not self.externalPhi) then
      self.fieldIo:write(self.modWeightPoisson,  "modifierWeightPoisson_0.bp", tm, self.ioFrame, false)
   end
end

function GkField:rkStepperFields() return self.potentials end

-- For RK timestepping for non-elliptic fields (e.g. only apar).
function GkField:copyRk(outIdx, aIdx)
   if self.isElectromagnetic and self:rkStepperFields()[aIdx] then
      self:rkStepperFields()[outIdx].apar:copy(self:rkStepperFields()[aIdx].apar)
   end
end
-- For RK timestepping for non-elliptic fields (e.g. only apar).
function GkField:combineRk(outIdx, a, aIdx, ...)
   if self.isElectromagnetic and self:rkStepperFields()[aIdx] then
      local args = {...} -- Package up rest of args as table.
      local nFlds = #args/2
      self:rkStepperFields()[outIdx].apar:combine(a, self:rkStepperFields()[aIdx].apar)
      for i = 1, nFlds do -- Accumulate rest of the fields.
         self:rkStepperFields()[outIdx].apar:accumulate(args[2*i-1], self:rkStepperFields()[args[2*i]].apar)
      end
   end
end

function GkField:createSolver(population, externalField)
   -- Need to set this flag so that field calculated self-consistently at end of full RK timestep.
   self.isElliptic = true

   if self.externalPhi then
      local evalOnNodes = Updater.EvalOnNodes {
         onGrid = self.grid,   evaluate = self.externalPhi,
         basis  = self.basis,  onGhosts = true
      }
      self.externalPhiFld = createField(self.grid,self.basis,{1,1})
      evalOnNodes:advance(0.0, {}, {self.externalPhiFld})
      for i = 1, self.nRkDup do
         self.potentials[i].phi:combine(self.externalPhiTimeDependence(0.0),self.externalPhiFld)
      end

      if self.evolve then
	 self.calcPhi = function(tCurr, populationIn, potentialsIn, potentialsOut)
            potentialsIn.phi:combine(self.externalPhiTimeDependence(tCurr), self.externalPhiFld)
	 end
      else
	 self.calcPhi = function(tCurr, populationIn, potentialsIn, potentialsOut) end
      end
   else
      local perpDim     = 2
      loca


lity? _defaultInstance;

  @$pb.TagNumber(1)
  $1.VideoQuality get quality => $_getN(0);
  @$pb.TagNumber(1)
  set quality($1.VideoQuality v) {
    setField(1, v);
  }

  @$pb.TagNumber(1)
  $core.bool hasQuality() => $_has(0);
  @$pb.TagNumber(1)
  void clearQuality() => clearField(1);

  @$pb.TagNumber(2)
  $core.bool get enabled => $_getBF(1);
  @$pb.TagNumber(2)
  set enabled($core.bool v) {
    $_setBool(1, v);
  }

  @$pb.TagNumber(2)
  $core.bool hasEnabled() => $_has(1);
  @$pb.TagNumber(2)
  void clearEnabled() => clearField(2);
}

class SubscribedCodec extends $pb.GeneratedMessage {
  factory SubscribedCodec({
    $core.String? codec,
    $core.Iterable<SubscribedQuality>? qualities,
  }) {
    final $result = create();
    if (codec != null) {
      $result.codec = codec;
    }
    if (qualities != null) {
      $result.qualities.addAll(qualities);
    }
    return $result;
  }
  SubscribedCodec._() : super();
  factory SubscribedCodec.fromBuffer($core.List<$core.int> i,
          [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) =>
      create()..mergeFromBuffer(i, r);
  factory SubscribedCodec.fromJson($core.String i,
          [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) =>
      create()..mergeFromJson(i, r);

  static final $pb.BuilderInfo _i = $pb.BuilderInfo(
      _omitMessageNames ? '' : 'SubscribedCodec',
      package: const $pb.PackageName(_omitMessageNames ? '' : 'livekit'),
      createEmptyInstance: create)
    ..aOS(1, _omitFieldNames ? '' : 'codec')
    ..pc<SubscribedQuality>(
        2, _omitFieldNames ? '' : 'qualities', $pb.PbFieldType.PM,
        subBuilder: SubscribedQuality.create)
    ..hasRequiredFields = false;

  @$core.Deprecated('Using this can add significant overhead to your binary. '
      'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '
      'Will be removed in next major version')
  SubscribedCodec clone() => SubscribedCodec()..mergeFromMessage(this);
  @$core.Deprecated('Using this can add significant overhead to your binary. '
      'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
      'Will be removed in next major version')
  SubscribedCodec copyWith(void Function(SubscribedCodec) updates) =>
      super.copyWith((message) => updates(message as SubscribedCodec))
          as SubscribedCodec;

  $pb.BuilderInfo get info_ => _i;

  @$core.pragma('dart2js:noInline')
  static SubscribedCodec create() => SubscribedCodec._();
  SubscribedCodec createEmptyInstance() => create();
  static $pb.PbList<SubscribedCodec> createRepeated() =>
      $pb.PbList<SubscribedCodec>();
  @$core.pragma('dart2js:noInline')
  static SubscribedCodec getDefault() => _defaultInstance ??=
      $pb.GeneratedMessage.$_defaultFor<SubscribedCodec>(create);
  static SubscribedCodec? _defaultInstance;

  @$pb.TagNumber(1)
  $core.String get codec => $_getSZ(0);
  @$pb.TagNumber(1)
  set codec($core.String v) {
    $_setString(0, v);
  }

  @$pb.TagNumber(1)
  $core.bool hasCodec() => $_has(0);
  @$pb.TagNumber(1)
  void clearCodec() => clearField(1);

  @$pb.TagNumber(2)
  $core.List<SubscribedQuality> get qualities => $_getList(1);
}

class SubscribedQualityUpdate extends $pb.GeneratedMessage {
  factory SubscribedQualityUpdate


				UUID = HttpService:GenerateGUID(false):gsub("-", ""),
			})
		end
	end

	local handle = Roact.mount(
		e("Frame", {
			BackgroundColor3 = Color3.new(1, 1, 1),
			Size = UDim2.fromScale(1, 1),
		}, {
			e(SelectScreen, {
				Angle = Vector3.new(-1, 0.8, -1),
				Equipped = inventory[2],
				Inventory = inventory,
				ShowGearScore = false,
				Text = "an attachment",

				GetName = Loot.GetLootName,
				GoBack = function() end,
				Equip = function() end,
			})
		}), target, "SelectScreen"
	)

	return function()
		Roact.unmount(handle)
	end
end


                          .clickable {
//////                            showToast(
//////                                appContext,
//////                                "TODO 显示 新增多少行，删除多少行", //TODO 解析hunkheader
//////                                Toast.LENGTH_SHORT
//////                            )
////                            },
//                    ) {
//                        Text(
//                            text = it.hunk.header,
//                            color = Color.Black
//                        )
////                    println("hunkheader:::::"+hal.hunk!!.header)
//                    }
//                }
                        //遍历行
                        hunkAndLines.lines.forEach printLine@{ line: PuppyLine ->
                            //若非 新增行、删除行、上下文 ，不显示
                            if (line.originType == Diff.Line.OriginType.ADDITION.toString()
                                || line.originType == Diff.Line.OriginType.DELETION.toString()
                                || line.originType == Diff.Line.OriginType.CONTEXT.toString()
                            ) {
                                DiffRow(
                                    line = line,
                                    fileFullPath=fileFullPath
                                )
                            }
                        }
                    }

                    //EOF_NL only appear at last hunk, so better check index avoid non-sense iterate
                    if(index == lastIndex) {
                        // if delete EOFNL or add EOFNL , show it
                        val indexOfEOFNL = hunkAndLines.lines.indexOfFirst { it.originType ==  Diff.Line.OriginType.ADD_EOFNL.toString() || it.originType ==  Diff.Line.OriginType.DEL_EOFNL.toString()}
                        if(indexOfEOFNL != -1) {  // found originType EOFNL
                            val eofLine = hunkAndLines.lines.get(indexOfEOFNL)
                            DiffRow(
                                line = LineNum.EOF.transLineToEofLine(eofLine, add = eofLine.originType ==  Diff.Line.OriginType.ADD_EOFNL.toString()),
                                fileFullPath=fileFullPath
                            )
                        }
                    }

                    //每个hunk之间显示个分割线
                    HorizontalDivider(
                        modifier = Modifier.padding(vertical = 30.dp),
                        thickness = 3.dp
                    )
                }
            }

            item {
                Spacer(Modifier.height(50.dp))
                NaviButton(diffableItemList = diffableItemList, curItemIndex = curItemIndex, switchItem = closeChannelThenSwitchItem)
                Spacer(Modifier.height(100.dp))
            }

        }
    }

    LaunchedEffect(needRefresh.value) {
//        if(!fileSizeOverLimit) {  //这里其实没必要，上级页面已经判断了，但我还是不放心，所以在这里再加个判断以防文件过大时误加载这个代码块导致app卡死
            if (repoId.isNotBlank() && relativePathUnderRepoDecoded.isNotBlank()) {
//                MyLog.d(TAG, "#LauncedEffect: job==null: ${job.value == null}")
//                if(job.value!=null) {
//                    MyLog.d(TAG, "#LauncedEffect: job is not null, will cancel it")
//                    try {
//                        job.value?.cancel()
//                    }catch (e:Exception) {
//                        MyLog.e(TAG, "#LauncedEffect: cancel job err: ${e.localizedMessage}")
//                    }
//                }

                //      设置页面loading为true
                //      从数据库异步查询repo数据，调用diff方法获得diff内容，然后使用diff内容更新页面state
                //      最后设置页面loading 为false
                doJobThenOffLoading launch@{
                    val channelForThisJob = loadChannel.value

                    try {
                        // init
                        submoduleIsDirty.value = false
                        errMsgState.value = ""
                        loading.value=true

                        //从数据库查询repo，记得用会自动调用close()的use代码块
                        val repoDb = dbContainer.repoRepository
                        val repoFromDb = repoDb.getById(repoId)

                        repoFromDb?:return@launch

                        curRep


()
    }
}
package io.appium.espressoserver.lib.helpers.w3c.dispatcher.constants

object NormalizedKeys {
    const val UNIDENTIFIED = "UNIDENTIFIED"
    const val CANCEL = "CANCEL"
    const val HELP = "HELP"
    const val BACKSPACE = "BACKSPACE"
    const val TAB = "TAB"
    const val CLEAR = "CLEAR"
    const val RETURN = "RETURN"
    const val ENTER = "ENTER"
    const val PAUSE = "PAUSE"
    const val ESCAPE = "ESCAPE"
    const val WHITESPACE = " "
    const val SEMICOLON = ";"
    const val EQUALS = "="
    const val ZERO = "0"
    const val ONE = "1"
    const val TWO = "2"
    const val THREE = "3"
    const val FOUR = "4"
    const val FIVE = "5"
    const val SIX = "6"
    const val SEVEN = "7"
    const val EIGHT = "8"
    const val NINE = "9"
    const val ASTERISK = "*"
    const val PLUS = "+"
    const val COMMA = ","
    const val HYPHEN = "-"
    const val PERIOD = "."
    const val FORWARD_SLASH = "/"
    const val F1 = "F1"
    const val F2 = "F2"
    const val F3 = "F3"
    const val F4 = "F4"
    const val F5 = "F5"
    const val F6 = "F6"
    const val F7 = "F7"
    const val F8 = "F8"
    const val F9 = "F9"
    const val F10 = "F10"
    const val F11 = "F11"
    const val F12 = "F12"
    const val ZENKAKU_HANKAKU = "ZENKAKUHANKAKU"
    const val SHIFT = "SHIFT"
    const val CONTROL = "CONTROL"
    const val ALT = "ALT"
    const val META = "META"
    const val PAGEUP = "PAGEUP"
    const val PAGEDOWN = "PAGEDOWN"
    const val END = "END"
    const val HOME = "HOME"
    const val ARROW_LEFT = "ARROWLEFT"
    const val ARROW_UP = "ARROWUP"
    const val ARROW_RIGHT = "ARROWRIGHT"
    const val ARROW_DOWN = "ARROWDOWN"
    const val INSERT = "INSERT"
    const val DELETE = "DELETE"
}package io.appium.espressoserver.lib.helpers.w3c.dispatcher.constants

object KeyNormalizer {
    private val normalizedKeyMap = mutableMapOf<String, String>()

    fun toNormalizedKey(key: String): String {
        return if (normalizedKeyMap.containsKey(key)) {
            normalizedKeyMap[key]!!
        } else key
    }

    init {
        normalizedKeyMap["\uE000"] = NormalizedKeys.UNIDENTIFIED
        normalizedKeyMap["\uE001"] = NormalizedKeys.CANCEL
        normalizedKeyMap["\uE002"] = NormalizedKeys.HELP
        normalizedKeyMap["\uE003"] = NormalizedKeys.BACKSPACE
        normalizedKeyMap["\uE004"] = NormalizedKeys.TAB
        normalizedKeyMap["\uE005"] = NormalizedKeys.CLEAR
        normalizedKeyMap["\uE006"] = NormalizedKeys.RETURN
        normalizedKeyMap["\uE007"] = NormalizedKeys.ENTER
        normalizedKeyMap["\uE008"] = NormalizedKeys.SHIFT
        normalizedKeyMap["\uE009"] = NormalizedKeys.CONTROL
        normalizedKeyMap["\uE00A"] = NormalizedKeys.ALT
        normalizedKeyMap["\uE00B"] = NormalizedKeys.PAUSE
        normalizedKeyMap["\uE00C"] = NormalizedKeys.ESCAPE
        normalizedKeyMap["\uE00D"] = Normalized


ingPolicy(const QString &policy_str)
	{
		auto policy = QString("PassThrough");
		if (policy_str == QLatin1String("Round")) {
			policy = "Round";
		} else if (policy_str == QLatin1String("Ceil")) {
			policy = "Ceil";
		} else if (policy_str == QLatin1String("Floor")) {
			policy = "Floor";
		} else if (policy_str == QLatin1String("RoundPreferFloor")) {
			policy = "RoundPreferFloor";
		}
		QSettings settings;
		settings.setValue("hdpi_scale_factor_rounding_policy", policy);
	}

	/**
	* @brief setHdpiScaleFactorRoundingPolicy
	* Overload function
	* @sa void setHdpiScaleFactorRoundingPolicy(const QString &policy_str)
	* @param policy
	*/
	void setHdpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy policy)
	{
		QString policy_str;
		switch (policy) {
			case Qt::HighDpiScaleFactorRoundingPolicy::Round:
				policy_str = "Round";
				break;
			case Qt::HighDpiScaleFactorRoundingPolicy::Ceil:
				policy_str = "Ceil";
				break;
			case Qt::HighDpiScaleFactorRoundingPolicy::Floor:
				policy_str = "Floor";
				break;
			case Qt::HighDpiScaleFactorRoundingPolicy::RoundPreferFloor:
				policy_str = "RoundPreferFloor";
				break;
			default:
				policy_str = "PassThrough";
				break;
		}

		QSettings settings;
		settings.setValue("hdpi_scale_factor_rounding_policy", policy_str);
	}

	/**
	* @brief hdpiScaleFactorRoundingPolicy
	* @param default_policy
	* @return the hdpiScaleFactorRoundingPolicy value stored in current settings.
	* @sa setHdpiScaleFactorRoundingPolicy
	*/
	Qt::HighDpiScaleFactorRoundingPolicy hdpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy default_policy)
	{
		QSettings settings;
		auto value_ = settings.value("hdpi_scale_factor_rounding_policy");

		if (value_ == QLatin1String("Round")) {
			return Qt::HighDpiScaleFactorRoundingPolicy::Round;
		} else if (value_ == QLatin1String("Ceil")) {
			return Qt::HighDpiScaleFactorRoundingPolicy::Ceil;
		} else if (value_ == QLatin1String("Floor")) {
			return Qt::HighDpiScaleFactorRoundingPolicy::Floor;
		} else if (value_ == QLatin1String("RoundPreferFloor")) {
			return Qt::HighDpiScaleFactorRoundingPolicy::RoundPreferFloor;
		} else if (value_ == QLatin1String("PassThrough")) {
			return Qt::HighDpiScaleFactorRoundingPolicy::PassThrough;
		} else {
			return default_policy;
		}
	}
#endif
}
/*
	Copyright 2006-2025 The QElectroTech Team
	This file is part of QElectroTech.

	QElectroTech is free software: you can redistribute it and/or modify
	it under the terms of the GNU General Public License as published by
	the Free Software Foundation, either version 2 of the License, or
	(at your option) any later version.

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

	You should have received a copy of the GNU General Public License
	along with QElectroTech.  If not, see <http://www.gnu.org/licenses/>.
*/
#include "numerotationcontext.h"

#include "../qet.h"

#include <QRegularExpression>
#include <utility>

/**
	Constructor
*/
NumerotationContext::


연합_sum: 그것의 앞 축에 걸친 어레이를 합한다.\n' +
      '\n' +
      '이를 잎으로 적용하여 연합 배열 구조로 확장한다. FAX는 이러한 구현들을 JAX 하강 로직에 등록한다. 이것은 FAX 코드가 JAX가 XLA 런타임에 로직을 디스패치하는 시간만큼 JAX 코드로 완전히 대체되는 것을 보장한다. 다른 빌딩 블록들은 유사한 방식으로 프리미티브들을 등록함으로써, 또는 위의 빌딩 블록들의 관점에서 정의함으로써 FAX에 추가될 수 있다. 예를 들어, FAX는 클라이언트들에 걸쳐 평균을 취하는 연합_mean 심볼을 제공하며, 이는 연합_sum에 대한 두 개의 호출들로 낮아진다.\n' +
      '\n' +
      'FAX 계산들을 분할한다. 위의 프리미티브들을 등록함으로써, 우리는 GSPMD(Xu et al., 2021)와 같은 컴파일러들이 디바이스들에 걸쳐 FAX 계산들을 분할할 수 있음을 보장한다. 그러나 분할 계산이 가능한 한 효율적인지 확인하고 싶습니다. 많은 연합 연산들이 사소하게 병렬화될 수 있는 반면(예를 들어, 연합_map), 컴파일러들은 이러한 사용 패턴을 검출하고 효율적인 코드를 생성할 수 없을 수 있다. 그러나 위의 빌딩 블록이 컴파일러에 의해 어떻게 섀딩되는지에만 집중하면 됩니다. 이 작업이 완료되면 다양한 JAX 라이브러리에서 제공하는 모델 및 데이터 병렬성으로 자유롭게 구성할 수 있다.\n' +
      '\n' +
      'Xu et al. (2021) 및 Lepikhin et al. (2020)에 의해 언급된 바와 같이, 내부 샤딩 주석들은 분산 실행을 목표로 하는 컴파�