Pos = cc.v2(this.maskNode.height / 2, 0);
                vec_temp = cc.v2(0, 1); //y轴上的向量
                unitV = endPos.project(vec_temp);
                _unitV = unitV.neg();   //反向移动向量

                this.cardValueNode.setPosition(cc.v2(this.cardValueNode.x + unitV.x, this.cardValueNode.y + unitV.y));
                this.maskNode.setPosition(cc.v2(this.maskNode.x + unitV.x, this.maskNode.y + unitV.y));
                this.cardBackNode.setPosition(cc.v2(this.cardBackNode.x + _unitV.x, this.cardBackNode.y + _unitV.y));

                cc.tween(this.maskNode).to(offset_time, { x: 0, y: 0 }).start();
                cc.tween(this.cardBackNode).to(offset_time, { x: 0, y: 0 }).start();
                cc.tween(this.cardValueNode).to(offset_time, { x: 0, y: 0 })
                    .call(() => {
                        self.trueCardNode.active = true;
                        // self.trueCardNode.setRotation(270);
                        self.cardBackNode.active = false;

                        let openEndFunc_mask = cc.fadeTo(fade_offset_time, 0);
                        self.maskNode.stopAllActions();
                        self.maskNode.runAction(openEndFunc_mask);
                    })
                    .start();
                break;
            case EMIDir.Left:
                cc.log('EMIDir.Left');

                endPos = cc.v2(0, this.maskNode.width / 2);
                vec_temp = cc.v2(1, 0); //x轴上的向量
                unitV = endPos.project(vec_temp);
                _unitV = unitV.neg();   //反向移动向量

                this.cardValueNode.setPosition(cc.v2(this.cardValueNode.x + unitV.x, this.cardValueNode.y + unitV.y));
                // this.cardValueNode.setRotation(180);
                this.maskNode.setPosition(cc.v2(this.maskNode.x + unitV.x, this.maskNode.y + unitV.y));
                this.cardBackNode.setPosition(cc.v2(this.cardBackNode.x + _unitV.x, this.cardBackNode.y + _unitV.y));

                cc.tween(this.maskNode).to(offset_time, { x: 0, y: 0 }).start();
                cc.tween(this.cardBackNode).to(offset_time, { x: 0, y: 0 }).start();
                cc.tween(this.cardValueNode).to(offset_time, { x: 0, y: 0 })
                    .call(() => {
                        self.trueCardNode.active = true;
                        self.trueCardNode.setRotation(180);
                        self.cardBackNode.active = false;

                        let openEndFunc_mask = cc.fadeTo(fade_offset_time, 0);
                        self.maskNode.stopAllActions();
                        self.maskNode.runAction(openEndFunc_mask);
                    })
                    .start();

                break;
            case EMIDir.Right:
                cc.log('EMIDir.Right');

                endPos = cc.v2(0, this.maskNode.width / 2);
                vec_temp = cc.v2(1, 0); //x轴上的向量
                unitV = endPos.project(vec_temp);
                _unitV = unitV.neg();   //反向移动向量

                this.cardValu


18.5", "19.0", "19.5", "20.0", "20.5", "21.0", "21.5", "22.0", "22.5", "23.0", "23.5", "24.0", "24.5", "25.0"], "y": [3.8, 3.6, 3.96, 4.34, 4.59, 4.74, 4.82, 4.87, 4.89, 4.9, 4.9, 4.9, 4.89, 4.88, 4.86, 4.84, 4.82, 4.8, 4.77, 4.74, 4.71, 4.67, 4.63, 4.59, 4.54, 4.5, 4.46, 4.42, 4.38, 4.34, 4.31, 4.27, 4.24, 4.22, 4.19, 4.17, 4.15, 4.12, 4.1, 4.08, 4.07, 4.05, 4.03, 4.01, 3.99, 3.98, 3.96, 3.94, 3.93, 3.91, 3.89], "type": "scatter", "uid": "c5a8de80-6c9d-45cd-8e1c-f048d43147ff"}, {"line": {"color": "rgba(219, 64, 82, 0.5886075949367084)", "dash": "solid", "shape": "linear", "width": 1.3}, "mode": "lines", "name": "660", "text": "", "x": ["0.08", "0.5", "1.0", "1.5", "2.0", "2.5", "3.0", "3.5", "4.0", "4.5", "5.0", "5.5", "6.0", "6.5", "7.0", "7.5", "8.0", "8.5", "9.0", "9.5", "10.0", "10.5", "11.0", "11.5", "12.0", "12.5", "13.0", "13.5", "14.0", "14.5", "15.0", "15.5", "16.0", "16.5", "17.0", "17.5", "18.0", "18.5", "19.0", "19.5", "20.0", "20.5", "21.0", "21.5", "22.0", "22.5", "23.0", "23.5", "24.0", "24.5", "25.0"], "y": [3.85, 3.59, 3.94, 4.34, 4.59, 4.73, 4.81, 4.86, 4.88, 4.88, 4.88, 4.87, 4.86, 4.85, 4.83, 4.82, 4.8, 4.78, 4.76, 4.74, 4.71, 4.68, 4.64, 4.61, 4.57, 4.53, 4.49, 4.45, 4.41, 4.38, 4.35, 4.32, 4.29, 4.26, 4.24, 4.21, 4.19, 4.17, 4.15, 4.13, 4.11, 4.09, 4.07, 4.05, 4.03, 4.01, 3.99, 3.97, 3.96, 3.94, 3.92], "type": "scatter", "uid": "043f03e5-6d8b-46ec-8fa7-d1adcffc6d99"}, {"line": {"color": "rgba(219, 64, 82, 0.5822784810126578)", "dash": "solid", "shape": "linear", "width": 1.3}, "mode": "lines", "name": "661", "text": "", "x": ["0.08", "0.5", "1.0", "1.5", "2.0", "2.5", "3.0", "3.5", "4.0", "4.5", "5.0


.39.37.37.1.m1.5.5.1.1.1">→</ci><list id="A6.T17.39.37.37.1.m1.5.5.1.1.2.1.cmml" xref="A6.T17.39.37.37.1.m1.5.5.1.1.2.2"><cn id="A6.T17.39.37.37.1.m1.1.1.cmml" type="integer" xref="A6.T17.39.37.37.1.m1.1.1">8</cn><cn id="A6.T17.39.37.37.1.m1.2.2.cmml" type="integer" xref="A6.T17.39.37.37.1.m1.2.2">4</cn><cn id="A6.T17.39.37.37.1.m1.3.3.cmml" type="integer" xref="A6.T17.39.37.37.1.m1.3.3">2</cn><cn id="A6.T17.39.37.37.1.m1.4.4.cmml" type="integer" xref="A6.T17.39.37.37.1.m1.4.4">8</cn></list><cn id="A6.T17.39.37.37.1.m1.5.5.1.1.3.cmml" type="integer" xref="A6.T17.39.37.37.1.m1.5.5.1.1.3">2</cn></apply></apply></annotation-xml><annotation encoding="application/x-tex" id="A6.T17.39.37.37.1.m1.5c">[8,4,2,8\rightarrow 2]</annotation><annotation encoding="application/x-llamapun" id="A6.T17.39.37.37.1.m1.5d">[ 8 , 4 , 2 , 8 → 2 ]</annotation></semantics></math>
<math alttext="56.91" class="ltx_Math" display="inline" id="A6.T17.40.38.38.2.m1.1"><semantics id="A6.T17.40.38.38.2.m1.1a"><mn id="A6.T17.40.38.38.2.m1.1.1" xref="A6.T17.40.38.38.2.m1.1.1.cmml">56.91</mn><annotation-xml encoding="MathML-Content" id="A6.T17.40.38.38.2.m1.1b"><cn id="A6.T17.40.38.38.2.m1.1.1.cmml" type="float" xref="A6.T17.40.38.38.2.m1.1.1">56.91</cn></annotation-xml><annotation encoding="application/x-tex" id="A6.T17.40.38.38.2.m1.1c">56.91</annotation><annotation encoding="application/x-llamapun" id="A6.T17.40.38.38.2.m1.1d">56.91</annotation></semantics></math>
<math alttext="75.8" class="ltx_Math" display="inline" id="A6.T17.41.39.39.3.m1.1"><semantics id="A6.T17.41.39.39.3.m1.1a"><mn id="A6.T17.41.39.39.3.m1.1.1" xref="A6.T17.41.39.39.3.m1.1.1.cmml">75.8</mn><annotation-xml encoding="MathML-Content" id="A6.T17.41.39.39.3.m1.1b"><cn id="A6.T1


-2.98H5V17h1.5c.28 0 .5.22.5.5v5a.5.5 0 0 1-.5.5h-5a.5.5 0 0 1-.5-.5v-5c0-.28.22-.5.5-.5H3v-2.98c0-1.1.9-2 2-2h6V10H7a1 1 0 0 1-1-1z"
            />
          </svg>

          <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24">
            <path
              d="M6 2a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v7a1 1 0 0 1-1 1h-4v2.02h6a2 2 0 0 1 2 2V17h1.5c.28 0 .5.22.5.5v5a.5.5 0 0 1-.5.5h-5a.5.5 0 0 1-.5-.5v-5c0-.28.22-.5.5-.5H19v-2.98h-6V17h1.5c.28 0 .5.22.5.5v5a.5.5 0 0 1-.5.5h-5a.5.5 0 0 1-.5-.5v-5c0-.28.22-.5.5-.5H11v-2.98H5V17h1.5c.28 0 .5.22.5.5v5a.5.5 0 0 1-.5.5h-5a.5.5 0 0 1-.5-.5v-5c0-.28.22-.5.5-.5H3v-2.98c0-1.1.9-2 2-2h6V10H7a1 1 0 0 1-1-1z"
            />
          </svg>

Orig 466

New 466

Diff 0.00%

calendar-check.svg

        <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24">
          <path
            d="M15.12 11.39 10.48 16l-1.6-1.59a1.26 1.26 0 0 0-1.76 0c-.49.48-.5 1.26 0 1.75l3.35 3.37 6.41-6.38c.5-.49.5-1.28 0-1.76a1.25 1.25 0 0 0-1.76 0M20 21.5H4a.5.5 0 0 1-.5-.5V9h17v12a.5.5 0 0 1-.5.5M20 4h-2.75V2.25a1.25 1.25 0 0 0-2.5 0V4h-5.5V2.25a1.25 1.25 0 0 0-2.5 0V4H4a3 3 0 0 0-3 3v14a3 3 0 0 0 3 3h16a3 3 0 0 0 3-3V7a3 3 0 0 0-3-3"
          />
        </svg>

        <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24">
          <path
            d="M15.12 11.39 10.48 16l-1.6-1.59a1.26 1.26 0 0 0-1.76 0c-.49.48-.5 1.26 0 1.75l3.35 3.37 6.41-6.38c.5-.49.5-1.28 0-1.76a1.25 1.25 0 0 0-1.76 0M20 21.5H4a.5.5 0 0 1-.5-.5V9h17v12a.5.5 0 0 1-.5.5M20


parsed[1]!='') // if group is present, replace the object and related objects' group names
						process_elem2=('\r\n'+process_elem2).replace(RegExp('\r\n'+parsed[1].replace('.', '\\.'), 'mg'), '\r\nitem'+(groupCounter++)+'.').substring(2);
				}
				else
				{
					process_elem2=vCalendar.tplC['VTcontentline_E_DTSTART'];
					process_elem2=process_elem2.replace('##:::##group_wd##:::##', '');
					process_elem2=process_elem2.replace('##:::##params_wsc##:::##', '');
				}
				process_elem2=process_elem2.replace('##:::##AllDay##:::##', vcalendarEscapeValue(''));
				process_elem2=process_elem2.replace('##:::##TZID##:::##',timeZoneAttr);
				process_elem2=process_elem2.replace('##:::##value##:::##', vcalendarEscapeValue(datetime_to+'T'+time_to+(isUTC ? 'Z' : '')));
				vCalendarText+=process_elem2;
			}
			vCalendarText+=process_elem;
		}
	}

	if(realTodo!='')
	{
		if(realTodo.type!='')
		{
			if(realTodo.repeatStart)
			{
				var a=$.datepicker.parseDate(globalSettings.datepickerformat.value, $('#date_fromTODO').val());
				var b=new Date(Date.parse("01/02/1990, "+$('#time_fromTODO').val() ));
			}
			else if(realTodo.repeatEnd)
			{
				var a=$.datepicker.parseDate(globalSettings.datepickerformat.value, $('#date_toTODO').val());
				var b=new Date(Date.parse("01/02/1990, "+$('#time_toTODO').val() ));
			}

			if(realTodo.repeatStart)
				var repeatStart=realTodo.repeatStart;
			else if(realTodo.repeatEnd)
				var repeatEnd=realTodo.repeatEnd;
			a.setHours(b.getHours());
			a.setMinutes(b.getMinutes());
			a.setSeconds(b.getSeconds());
			var changeDate=new Date(a.getTime());
			var offsetDate=0;

			if(realTodo.repeatStart)
				offsetDate=changeDate-repeatStart;
			else if(realTodo.repeatEnd)
				offsetDate=changeDate-repeatEnd;

			var realEventUID=realTodo.vcalendar.match(vCalendar.pre['contentline_UID']);

			if(realEventUID!=null)
				realEventUID=realEventUID[0].match(vCalendar.pre['contentline_parse'])[4];

			if(offsetDate!=0)
			{
				var vcalendarOrig=vCalendarText;
				var eventArray=new Array(),backupEventArray= new Array();
				while(vcalendarOrig.match(vCalendar.pre['vtodo'])!=null)
				{
					if(vcalendarOrig.substring(vcalendarOrig.indexOf('BEGIN:VTODO')-2, vcalendarOrig.indexOf('BEGIN:VTODO'))=='\r\n')
					{
						var partEvent=vcalendarOrig.substring(vcalendarOrig.indexOf('BEGIN:VTODO')-2,vcalendarOrig.indexOf('END:VTODO')+'END:VTODO'.length);
						vcalendarOrig=vcalendarOrig.replace(partEvent, '');
					}
					else
					{
						var partEvent=vcalendarOrig.substring(vcalendarOrig.indexOf('BEGIN:VTODO'),vcalendarOrig.indexOf('END:VTODO')+'END:VTODO'.length);
						vcalendarOrig=vcalendarOrig.replace(partEvent, '');
						partEvent+='\r\n';
					}
					eventArray[eventArray.length]=partEvent;
					backupEventArray[backupEventArray.length]=partE


);
}

template<class V>
SIRE_OUTOFLINE_TEMPLATE
void set_metadata(Atom*, MoleculeData &moldata,
                  const QList<Atom::Index> &idxs,
                  const QString &key, const QString &metakey,
                  const V &value)
{
    const MoleculeInfoData &molinfo = moldata.info();

    AtomProperty<V> atom_prop;

    if (moldata.hasMetadata(key,metakey))
        atom_prop = moldata.metadata(key,metakey);
    else
        atom_prop = AtomProperty<V>(molinfo);

    const QList<Atom::Index> idxs_copy(idxs);

    foreach (Atom::Index idx, idxs_copy)
    {
        atom_prop.set(molinfo.cgAtomIdx(idx), value);
    }

    moldata.setMetadata(key, metakey, atom_prop);
}

SIREMOL_EXPORT bool has_property(const Atom*, const MoleculeData &moldata,
                  const PropertyName &key);

SIREMOL_EXPORT bool has_metadata(const Atom*, const MoleculeData &moldata,
                  const PropertyName &metakey);

SIREMOL_EXPORT bool has_metadata(const Atom*, const MoleculeData &moldata,
                  const PropertyName &key, const PropertyName &metakey);

} // end of namespace detail

#endif //SIRE_SKIP_INLINE_FUNCTIONS

} // end of namespace SireMol

Q_DECLARE_METATYPE(SireMol::Atom);
Q_DECLARE_METATYPE(SireMol::Mover<SireMol::Atom>);
Q_DECLARE_METATYPE(SireMol::Selector<SireMol::Atom>);

//Q_DECLARE_METATYPE(SireMol::Mover< SireMol::Selector<SireMol::Atom> >);

SIRE_EXPOSE_CLASS( SireMol::Atom )
SIRE_EXPOSE_ALIAS( SireMol::Mover<SireMol::Atom>, SireMol::Mover_Atom_ )
SIRE_EXPOSE_ALIAS( SireMol::Selector<SireMol::Atom>, SireMol::Selector_Atom_ )

#ifdef SIRE_INSTANTIATE_TEMPLATES

#include "mover.hpp"

template class SireMol::Mover<SireMol::Atom>;

#endif //SIRE_INSTANTIATE_TEMPLATES

SIRE_END_HEADER

#endif


= ProtoField.uint8 ("dji_p3_flyrec.osd_general_batt_remain", "Battery Remain", base.DEC, nil, nil, "Battery Remaining Capacity")
f.osd_general_ultrasonic_height = ProtoField.uint8 ("dji_p3_flyrec.osd_general_ultrasonic_height", "Ultrasonic Height", base.DEC)
f.osd_general_motor_startup_time = ProtoField.uint16 ("dji_p3_flyrec.osd_general_motor_startup_time", "Motor Startup Time", base.DEC)
f.osd_general_motor_startup_times = ProtoField.uint8 ("dji_p3_flyrec.osd_general_motor_startup_times", "Motor Startup Times", base.DEC, nil, nil, "aka Motor Revolution")
f.osd_general_bat_alarm1 = ProtoField.uint8 ("dji_p3_flyrec.osd_general_bat_alarm1", "Bat Alarm1", base.HEX)
  f.osd_general_bat_alarm1_ve = ProtoField.uint8 ("dji_p3_flyrec.osd_general_bat_alarm1_ve", "Alarm Level 1 Voltage", base.DEC, nil, 0x7F)
  f.osd_general_bat_alarm1_fn = ProtoField.uint8 ("dji_p3_flyrec.osd_general_bat_alarm1_fn", "Alarm Level 1 Function", base.DEC, nil, 0x80)
f.osd_general_bat_alarm2 = ProtoField.uint8 ("dji_p3_flyrec.osd_general_bat_alarm2", "Bat Alarm2", base.HEX)
  f.osd_general_bat_alarm2_ve = ProtoField.uint8 ("dji_p3_flyrec.osd_general_bat_alarm2_ve", "Alarm Level 2 Voltage", base.DEC, nil, 0x7F)
  f.osd_general_bat_alarm2_fn = ProtoField.uint8 ("dji_p3_flyrec.osd_general_bat_alarm2_fn", "Alarm Level 2 Function", base.DEC, nil, 0x80)
f.osd_general_version_match = ProtoField.uint8 ("dji_p3_flyrec.osd_general_version_match", "Version Match", base.HEX, nil, nil, "Flight Controller version")
f.osd_general_product_type = ProtoField.uint8 ("dji_p3_flyrec.osd_general_product_type", "Product Type", base.HEX, REC_OSD_GENERAL_PRODUCT_TYPE_ENUM)
f.osd_general_imu_init_fail_reson = ProtoField.int8 ("dji_p3_flyrec.osd_general_imu_init_fail_reson", "IMU init Fail Reason", base.DEC, REC_OSD_GENERAL_IMU_INIT_FAIL_RESON_ENUM)

local function flightrec_osd_general_dissector(payload, pinfo, subtree)
    local offset = 0

    subtree:add_le (f.osd_general_longtitude, payload(offset, 8))
    offset = offset + 8

    subtree:add_le (f.osd_general_latitude, payload(offset, 8))
    offset = offset + 8

    subtree:add_le (f.osd_general_relative_height, payload(offset, 2))
    offset = offset + 2

    subtree:add_le (f.osd_general_vgx, payload(offset, 2))
    offset = offset + 2

    subtree:add_le (f.osd_general_vgy, payload(offset, 2)) -- offset = 20
    offset = offset + 2

    subtree:add_le (f.osd_general_vgz, payload(offset, 2))
    of


    /// </summary>
        public InputMap<string> Params
        {
            get => _params ?? (_params = new InputMap<string>());
            set => _params = value;
        }

        /// <summary>
        /// The tracing protocol type. Currently, only Jaeger is supported.
        /// </summary>
        [Input("type")]
        public Input<string>? Type { get; set; }

        public V3FunctionTracingConfigGetArgs()
        {
        }
        public static new V3FunctionTracingConfigGetArgs Empty => new V3FunctionTracingConfigGetArgs();
    }
}


#pragma once

#include <map>
#include "struct.h"
#include "module.h"
#include "NvInfer.h"
using namespace nvinfer1;

namespace fastrt {
    class backbone_sbsR18_distill : public Module {
    private:
        FastreidConfig& _modelCfg;
    public:
        backbone_sbsR18_distill(FastreidConfig& modelCfg) : _modelCfg(modelCfg){}
        ~backbone_sbsR18_distill() = default;
        ILayer* topology(INetworkDefinition *network,
            std::map<std::string, Weights>& weightMap,
            ITensor& input) override;
    };

    class backbone_sbsR34_distill : public Module {
    private:
        FastreidConfig& _modelCfg;
    public:
        backbone_sbsR34_distill(FastreidConfig& modelCfg) : _modelCfg(modelCfg) {}
        ~backbone_sbsR34_distill() = default;
        ILayer* topology(INetworkDefinition *network,
            std::map<std::string, Weights>& weightMap,
            ITensor& input) override;
    };

    class backbone_sbsR50_distill : public Module {
    private:
        FastreidConfig& _modelCfg;
    public:
        backbone_sbsR50_distill(FastreidConfig& modelCfg) : _modelCfg(modelCfg) {}
        ~backbone_sbsR50_distill() = default;
        ILayer* topology(INetworkDefinition *network,
            std::map<std::string, Weights>& weightMap,
            ITensor& input) override;
    };

    class backbone_sbsR34 : public Module {
    private:
        FastreidConfig& _modelCfg;
    public:
        backbone_sbsR34(FastreidConfig& modelCfg) : _modelCfg(modelCfg) {}
        ~backbone_sbsR34() = default;
        ILayer* topology(INetworkDefinition *network,
            std::map<std::string, Weights>& weightMap,
            ITensor& input) override;
    };

    class backbone_sbsR50 : public Module {
    private:
        FastreidConfig& _modelCfg;
    public:
        backbone_sbsR50(FastreidConfig& modelCfg) : _modelCfg(modelCfg) {}
        ~backbone_sbsR50() = default;
        ILayer* topology(INetworkDefinition *network,
            std::map<std::string, Weights>& weightMap,
            ITensor& input) override;
    };

}


et fakeAddressesRepository: FakeAddressesRepository;
let createAddress: CreateAddressService;

describe('CreateAddress', () => {
  beforeEach(() => {
    fakeAddressesRepository = new FakeAddressesRepository();
    createAddress = new CreateAddressService(fakeAddressesRepository);
  });

  it('should be able to create a new address', async () => {
    const address = await createAddress.execute({
      zipcode: '35171000',
      state: 'mg',
      city: 'Coronel Fabriciano',
      neighborhood: 'Centro',
      street: 'Avenida',
      number: '0',
    });

    expect(address).toHaveProperty('id');
  });

  it('should be able to return an existent address', async () => {
    const address = {
      zipcode: '35171000',
      state: 'mg',
      city: 'Coronel Fabriciano',
      neighborhood: 'Centro',
      street: 'Avenida',
      number: '0',
    };

    const address1 = await createAddress.execute(address);
    const address2 = await createAddress.execute(address);
    const address3 = await createAddress.execute({
      ...address,
      complementary: 'Fundos',
    });

    const address4 = await createAddress.execute({
      ...address,
      complementary: 'other-complementary',
    });

    expect(address1.id).toEqual('1');
    expect(address2.id).toEqual('1');
    expect(address3.id).toEqual('2');
    expect(address4.id).toEqual('3');
  });
});
import { CheckerInterface } from "./CheckerInterface";
import { FormatChecker } from "./FormatChecker";
import { FormulaChecker } from "./FormulaChecker";

/**
 * 身分證檢核
 */
export class IdnoChecker {

    private checkers: CheckerInterface[];

    constructor() {
        this.checkers = [FormatChecker, FormulaChecker];
    }

    check(idno: string): boolean {
        return this.checkers.every(checker => checker(idno));
    }
}import { Order } from './entities/order';
import { Persistency } from './services/persistency';
import { Product } from './entities/product';
import { ShoppingCart } from './entities/shopping-cart';
import { NoDiscount } from './entities/discount';
import { EnterpriseCustomer } from './entities/customer';
import { IMessaging } from './entities/protocols/messaging-protocol';

const noDiscount = new NoDiscount();

const shoppingCart = new ShoppingCart(noDiscount);
const persistency = new Persistency();
const enterpriseCustomer = new EnterpriseCustomer('Empresa', '1234');

export class MessagingMock implements IMessaging {
  sendMessage(): void {
    console.log('A mensagem foi enviada pelo mock');
  }
}
const messagingMock = new MessagingMock();

const order = new Order(
  shoppingCart,
  messagingMock,
  persistency,
  enterpriseCustomer,
);

shoppingCart.addItem(new Product('Camiseta', 19.9));
shoppingCart.addItem(new Product('Calça', 36.94));
shoppingCart.addItem(new Product('Bermuda', 64.98));

console.log(order.orderStatus);

console.log(shoppingCart.items);
console.log(shoppingCart.total());
console.log(shoppingCart.totalWithDiscount());
order.checkout();

console.log(order.orderStatus);
import * as fs from 'fs';
import * as path from 'path';
import { Database } from '../../database';

export interface Transaction {
  sql


>
		///           <para>   Methods must be decorated with the [Export ("selectorName")] attribute to respond to each method from the protocol.   Alternatively use the Delegate method which is strongly typed and does not require the [Export] attributes on methods.</para>
		///         </remarks>
		[Export ("delegate", ArgumentSemantic.Weak), NullAllowed]
		NSObject WeakDelegate { get; set; }

		/// An instance of the EventKitUI.IEKCalendarChooserDelegate model class which acts as the class delegate.
		///         <value>The instance of the EventKitUI.IEKCalendarChooserDelegate model class</value>
		///         <remarks>
		///           <para>The delegate instance assigned to this object will be used to handle events or provide data on demand to this class.</para>
		///           <para>When setting the Delegate or WeakDelegate values events will be delivered to the specified instance instead of being delivered to the C#-style events</para>
		///           <para>This is the strongly typed version of the object, developers should use the WeakDelegate property instead if they want to merely assign a class derived from NSObject that has been decorated with [Export] attributes.</para>
		///         </remarks>
		[Wrap ("WeakDelegate")]
		IEKCalendarChooserDelegate Delegate { get; set; }

		/// Get or sets a Boolean value that controls whether to display a "Done" button when the picker is displayed modally.
		///         <value>To be added.</value>
		///         <remarks>To be added.</remarks>
		[Export ("showsDoneButton")]
		bool ShowsDoneButton { get; set; }

		/// Get or sets a Boolean value that controls whether to display a cancellation button when the picker is displayed modally.
		///         <value>To be added.</value>
		///         <remarks>To be added.</remarks>
		[Export ("showsCancelButton")]
		bool ShowsCancelButton { get; set; }

		/// Gets or sets a set that contains the calendars that the user has currently selected.
		///         <value>
		///           <para>(More documentation for this node is coming)</para>
		///           <para tool="nullallowed">This value can be <see langword="null" />.</para>
		///         </value>
		///         <remarks>To be added.</remarks>
		[NullAllow


  obj
        , upcast<PyObject>(
            converter::registered<T>::converters.m_class_object))

        ? obj : 0;
}

// Constructs an instance of the enumeration type in the from_python
// data.
template <class T>
void enum_<T>::construct(PyObject* obj, converter::rvalue_from_python_stage1_data* data)
{
#if PY_VERSION_HEX >= 0x03000000
    T x = static_cast<T>(PyLong_AS_LONG(obj));
#else
    T x = static_cast<T>(PyInt_AS_LONG(obj));
#endif
    void* const storage = ((converter::rvalue_from_python_storage<T>*)data)->storage.bytes;
    new (storage) T(x);
    data->convertible = storage;
}

template <class T>
inline enum_<T>& enum_<T>::value(char const* name, T x)
{
    this->add_value(name, static_cast<long>(x));
    return *this;
}

template <class T>
inline enum_<T>& enum_<T>::export_values()
{
    this->base::export_values();
    return *this;
}

}} // namespace boost::python

#endif // ENUM_DWA200298_HPP
// Copyright Ralf W. Grosse-Kunstleve 2006.
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#ifndef DOCSTRING_OPTIONS_RWGK20060111_HPP
# define DOCSTRING_OPTIONS_RWGK20060111_HPP

#include <boost/python/object/function.hpp>

namespace boost { namespace python {

// Note: the static data members are defined in object/function.cpp

class BOOST_PYTHON_DECL docstring_options : boost::noncopyable
{
  public:
      docstring_options(bool show_all=true)
      {
          previous_show_user_defined_ = show_user_defined_;
          previous_show_py_signatures_ = show_py_signatures_;
          previous_show_cpp_signatures_ = show_cpp_signatures_;
          show_user_defined_ = show_all;
          show_cpp_signatures_ = show_all;
          show_py_signatures_ = show_all;
      }

      docstring_options(bool show_user_defined, bool show_signatures)
      {
          previous_show_user_defined_ = show_user_defined_;
          previous_show_cpp_signatures_ = show_cpp_signatures_;
          previous_show_py_signatures_ = show_py_signatures_;
          show_user_defined_ = show_user_defined;
          show_cpp_signatures_ = show_signatures;
          show_py_signatures_ = show_signatures;
      }

      docstring_options(bool show_user_defined, bool show_py_signatures, bool show_cpp_signatures)
      {
          previous_show_user_defined_ = show_user_defined_;
          previous_show_cpp_signatures_ = show_cpp_signatures_;
          previous_show_py_signatures_ = show_py_signatures_;
          show_user_defined_ = show_user_defined;
          show_cpp_signatures_ = show_cpp_signatures;
          show_py_signatures_ = show_py_signatures;
      }

      ~docstring_options()
      {
          show_user_defined_ = previous_show_user_defined_;
          show_cpp_signatures_ = previous_show_cpp_signatures_;
          show_py_signatures_ = previous_show_py_signatures_;
      }

      void
      disable_user_defined() { show_user_defined_ = false; }

      void
      enable_user_defined() { show_user_defined_ = true; }

      void
      disable_py_signatures()
      {
        show_py_signatures_ = false;
      }

      void
      enable_py_signatures()


minwinbase-overlapped) structure.

If *hDevice* was opened without specifying **FILE\_FLAG\_OVERLAPPED**, *lpOverlapped* is ignored.

If *hDevice* was opened with the **FILE\_FLAG\_OVERLAPPED** flag, the operation is performed as an overlapped (asynchronous) operation. In this case, *lpOverlapped* must point to a valid [**OVERLAPPED**](/windows/desktop/api/minwinbase/ns-minwinbase-overlapped) structure that contains a handle to an event object. Otherwise, the function fails in unpredictable ways.

For overlapped operations, [**DeviceIoControl**](/windows/desktop/api/ioapiset/nf-ioapiset-deviceiocontrol) returns immediately, and the event object is signaled when the operation has been completed. Otherwise, the function does not return until the operation has been completed or an error occurs.

## Return value

If the operation completes successfully, indicating that all volumes on the disk are ready for use, [**DeviceIoControl**](/windows/desktop/api/ioapiset/nf-ioapiset-deviceiocontrol) returns a nonzero value.

If the operation fails or is pending, [**DeviceIoControl**](/windows/desktop/api/ioapiset/nf-ioapiset-deviceiocontrol) returns zero. To get extended error information, call [**GetLastError**](/windows/desktop/api/errhandlingapi/nf-errhandlingapi-getlasterror).

## Requirements

| Requirement | Value |
|-------------------------------------|---------------------------------------------------------------------------------------|
| Minimum supported client
 | None supported
                                                             |
| Minimum supported server
 | Windows Server 2012 \[desktop apps only\]
                                  |
| Header
                   |

Ntdddisk.h

 |

## See also

[**DeviceIoControl**](/windows/desktop/api/ioapiset/nf-ioapiset-deviceiocontrol)

[Disk Management Control Codes](disk-management-control-codes.md)

[**DISK\_CLUSTER\_INFO**](disk-cluster-info.md)

[**IOCTL\_DISK\_GET\_CLUSTER\_INFO**](ioctl-disk-get-cluster-info.md)

---
title: Tools for Changing Boot Options for Driver Testing and Debugging
description: Tools for Changing Boot Options for Driver Testing and Debugging
keywords:
- tools WDK , boot options
- driver development tools WDK , boot options
- boot options WDK
- driver testing WDK boot options
- testing drivers WDK boot options
- debugging drivers WDK boot options
- driver debugging WDK boot options
- operating system boot options WDK
- load configurations WDK boot options
ms.date: 04/19/2019
ms.topic: concept-article
---

# Tools for Changing Boot Options for Driver Testing and Debugging

To test and debug drivers on a Microsoft Windows operating system, you must enable and configure features that are established when the operating system loads. The settings for these features are included in the *boot options*--values that determine how the boot loader loads and configures the operating system and other bootable programs and devices.

This section explains how to add, delete, and change boot options to create new load configurations for an operating system and how to use the boot entry parameters to customize a load configuration for driver testing and debugging.

By editing boot options, you can:

- Enable and configure debugging

- Load a part


), dimensions={}
  ROOT multiply.4 = f32[1,4] multiply(arg_0.4, broadcast.6)
}

_pop_op_implicit_binary_inplace.4 {
  arg_0.5 = f32[1,4] parameter(0)
  constant.90.clone.3 = f32[] constant(0.1)
  broadcast.7 = f32[1,4] broadcast(constant.90.clone.3), dimensions={}
  ROOT multiply.5 = f32[1,4] multiply(arg_0.5, broadcast.7)
}

ENTRY cluster {
  arg0.1 = f32[1,4] parameter(0), parameter_replication={false}
  reshape = f32[4] reshape(arg0.1), backend_config="{\"isInplace\":true}"
  arg5.6 = f32[4,4] parameter(5), parameter_replication={false}
  dot = f32[4] dot(reshape, arg5.6), lhs_contracting_dims={0}, rhs_contracting_dims={0}
  arg2.3 = f32[4] parameter(2), parameter_replication={false}, control-predecessors={dot}
  add = f32[4] add(dot, arg2.3), backend_config="{\"isInplace\":true}"
  reshape.31 = f32[1,4] reshape(add), backend_config="{\"isInplace\":true}"
  custom-call = f32[1,4] custom-call(reshape.31), custom_call_target="Relu", backend_config="{\"isInplace\":true}"
  reshape.3 = f32[4] reshape(custom-call), backend_config="{\"isInplace\":true}"
  dot.1 = f32[4] dot(reshape.3, arg5.6), lhs_contracting_dims={0}, rhs_contracting_dims={0}
  arg3.4 = f32[4] parameter(3), parameter_replication={false}, control-predecessors={dot.1}
  add.1 = f32[4] add(dot.1, arg3.4), backend_config="{\"isInplace\":true}"
  reshape.32 = f32[1,4] reshape(add.1), backend_config="{\"isInplace\":true}"
  custom-call.1 = f32[1,4] custom-call(reshape.32), custom_call_target="Relu", backend_config="{\"isInplace\":true}"
  reshape.6 = f32[4] reshape(custom-call.1), backend_config="{\"isInplace\":true}"
  dot.2 = f32[4] dot(reshape.6, arg5.6), lhs_contracting_dims={0}, rhs_contracting_dims={0}
  arg4.5 = f32[4] parameter(4), parameter_replication={false}, control-predecessors={dot.2}
  add.2 = f32[4] add(dot.2, arg4.5), backend_config="{\"isInplace\":true}"
  reshape.33 = f32[1,4] reshape(add.2), backend_config="{\"isInplace\":true}"
  custom-call.2 = f32[1,4] custom-call(reshape.33), custom_call_target="Relu", backend_config="{\"isInplace\":true}"
  constant.44 = f32[] constant(-inf)
  reduce.49 = f32[1] reduce(custom-call.2, constant.44), dimensions={1}, to_apply=max_float_.45
  fusion.2 = f32[1,4] fusion(custom-call.2, reduce.49), kind=kCustom, calls=_pop_op_implicit_binary_inplace.1, backend_config="{\"fusionConfig\":{\"inplaceDescriptions\":[{\"kind\":\"USE_ALIAS_READ_WRITE\"}]}}"
  exponential.52 = f32[1,4] exponential(fusion.2), backend_config="{\"isInplace\":true}"


-tap-highlight-color: rgba(0, 0, 0, 0); padding: 0px; margin: 0px; border-width: 0px;"></canvas>
<div class="" style="position: absolute; display: block; border-style: solid; white-space: nowrap; z-index: 9999999; box-shadow: rgba(0, 0, 0, 0.2) 1px 2px 10px; transition: opacity 0.2s cubic-bezier(0.23, 1, 0.32, 1), visibility 0.2s cubic-bezier(0.23, 1, 0.32, 1), transform 0.4s cubic-bezier(0.23, 1, 0.32, 1); background-color: rgb(255, 255, 255); border-width: 1px; border-radius: 4px; color: rgb(102, 102, 102); font: 14px / 21px "Microsoft YaHei"; padding: 10px; top: 0px; left: 0px; transform: translate3d(815px, 84px, 0px); border-color: rgb(255, 255, 255); pointer-events: none; visibility: hidden; opacity: 0;">

2025-04-27 07:14:55

Akasec31,041

      <template x-if="brackets.length && standings.length"></template>

            Place
            Team
            Score

            <template x-for="(standing, index) in standings.filter(i => activeBracket ? i.bracket_id==activeBracket : true)"></template>

                1

                  L.A.R.P.
                  <template x-if="standing.bracket_name"></template>

                36885

                2

                  Lil L3ak
                  <template x-if="standing.bracket_name"></template>

                35885

                3

                  <a :href="standing.account_url" x-text="standing.name" href="https


 ClassifiedPipeline {
        ClassifiedPipeline {
            commands: Commands {
                list,
                span: span.into(),
            },
            failed: None,
        }
    }
}

impl HasSpan for ClassifiedPipeline {
    fn span(&self) -> Span {
        self.commands.span
    }
}

impl PrettyDebugWithSource for ClassifiedPipeline {
    fn pretty_debug(&self, source: &str) -> DebugDocBuilder {
        b::intersperse(
            self.commands.iter().map(|c| c.pretty_debug(source)),
            b::operator(" | "),
        )
        .or(b::delimit("<", b::description("empty pipeline"), ">"))
    }
}
<reponame>xvm32/snake<filename>src/main.rs
use ncurses as nc;

mod core;
mod ui;

const KEY_P: i32 = 112;
const KEY_R: i32 = 114;

fn main() {
    nc::setlocale(nc::LcCategory::all, "");
    nc::initscr();
    nc::curs_set(nc::CURSOR_VISIBILITY::CURSOR_INVISIBLE);
    nc::keypad(nc::stdscr(), true);
    nc::timeout(100);
    ui::init_color_pairs();

    let inner_screen = ui::create_playground();
    let mut game = core::Game::new();

    loop {
        nc::erase();
        nc::werase(inner_screen);
        nc::box_(inner_screen, 0, 0);

        ui::draw_snake(inner_screen, &game.snake);
        game.handle_food();
        ui::draw_food(inner_screen, game.food);
        ui::draw_score(inner_screen, game.score);

        nc::refresh();
        nc::wrefresh(inner_screen);

        let next_step = game.get_next_step();

        if !game.snake_about_to_collide(next_step) {
            game.snake.crawl(next_step, game.paused);
        } else {
            break;
        }

        let user_input = nc::getch();

        match user_input {
            nc::KEY_UP => {
                game.snake.set_direction(core::Direction::Up);
            }
            nc::KEY_DOWN => {
                game.snake.set_direction(core::Direction::Down);
            }
            nc::KEY_LEFT => {
                game.snake.set_direction(core::Direction::Left);
            }
            nc::KEY_RIGHT => {
                game.snake.set_direction(core::Direction::Right);
            }
            KEY_P => {
                game.paused = !game.paused;
            }
            KEY_R => {
                game.restart();
            }
            _ => {}
        };
    }
    nc::endwin();
}
use byteorder::{BigEndian, WriteBytesExt};
use protobuf::Message;
use std::io::Write;

use protocol;

#[derive(Debug, PartialEq, Eq)]
pub enum MercuryMethod {
    GET,
    SUB,
    UNSUB,
    SEND,
}

#[derive(Debug)]
pub struct MercuryRequest {
    pub method: MercuryMethod,
    pub uri: String,
    pub content_type: Option<String>,
    pub payload: Vec<Vec<u8>>,
}

#[derive(Debug, Clone)]
pub struct MercuryResponse {
    pub uri: String,
    pub status_code: i32,
    pub payload: Vec<Vec<u8>>,
}

#[derive(Debug, Hash, PartialEq, Eq, Copy, Clone)]
pub struct MercuryError;

impl ToString for MercuryMethod {
    fn to_string(&self) -> String {
        match *self {
            MercuryMethod::GET => "GET",
            MercuryMethod::SUB => "SUB",
            MercuryMethod::UNSUB => "UNSUB",
            MercuryMethod::SEND => "SEND",
        }.to_owned()
    }
}


agedisabled,
  .e-pager.e-rtl .e-nextpage,
  .e-pager.e-rtl .e-lastpage,
  .e-pager.e-rtl .e-nextpagedisabled,
  .e-pager.e-rtl .e-lastpagedisabled {
    border-left-color: #ddd; }
  .e-pager.e-rtl .e-nextpage,
  .e-pager.e-rtl .e-nextpagedisabled {
    border-left-color: #ddd; }

.e-dropdownbase .e-list-item .e-list-icon {
  padding: 0 10px 0 0; }

.e-bigger .e-dropdownbase .e-list-item .e-list-icon {
  padding: 0 12px 0 0; }

.e-bigger .e-dropdownbase,
.e-dropdownbase.e-bigger {
  min-height: 45px; }
  .e-bigger .e-dropdownbase .e-list-item,
  .e-bigger .e-dropdownbase .e-list-group-item,
  .e-bigger .e-dropdownbase .e-fixed-head,
  .e-dropdownbase.e-bigger .e-list-item,
  .e-dropdownbase.e-bigger .e-list-group-item,
  .e-dropdownbase.e-bigger .e-fixed-head {
    line-height: 48px; }
  .e-bigger .e-dropdownbase .e-list-item .e-list-icon,
  .e-dropdownbase.e-bigger .e-list-item .e-list-icon {
    font-size: 20px; }

.e-dropdownbase {
  display: block;
  height: 100%;
  min-height: 36px;
  position: relative;
  width: 100%; }
  .e-dropdownbase .e-list-parent {
    margin: 0;
    padding: 0; }
  .e-dropdownbase .e-list-group-item,
  .e-dropdownbase .e-fixed-head {
    cursor: default; }
  .e-dropdownbase .e-list-item {
    cursor: pointer;
    overflow: hidden;
    position: relative;
    text-overflow: ellipsis;
    vertical-align: middle;
    white-space: nowrap;
    width: 100%; }
  .e-dropdownbase .e-list-item .e-list-icon {
    font-size: 16px;
    vertical-align: middle; }
  .e-dropdownbase .e-fixed-head {
    position: absolute;
    top: 0; }
    .e-rtl .e-dropdownbase .e-fixed-head {
      left: 33px; }

.e-dropdownbase.e-content {
  overflow: auto;
  position: relative; }

.e-popup.e-ddl .e-dropdownbase.e-nodata {
  color: #777;
  cursor: default;
  font-family: "Helvetica Neue", "Helvetica", "Arial", sans-serif, "-apple-system", "BlinkMacSystemFont";
  font-size: 14px;
  padding: 14px 16px;
  text-align: center; }

.e-rtl .e-dropdownbase.e-dd-group .e-list-item {
  padding-right: 30px; }

.e-dropdownbase.e-dd-group .e-list-item {
  padding-left: 30px;
  text-indent: 0; }

.e-dropdownbase {
  border-color: rgba(119, 119, 119, 0.25); }
  .e-dropdownbase .e-list-item {
    background-color: #fff;
    border-bottom: 1px;
    border-color: #fff;
    color: #333;
    font-family: "Helvetica Neue", "Helvetica", "Arial", sans-ser


@property
def required_observation_types(self):
    return ['box', 'frame', 'score']


secret->second == "Seed") {
                nfc_secrets[nfc_secret->first].seed = value;
            } else if (nfc_secret->second == "HmacKey") {
                nfc_secrets[nfc_secret->first].hmac_key = value;
            } else {
                LOG_ERROR(HW_AES, "Invalid NFC secret '{}'", name);
            }
            continue;
        }

        AESKey key;
        try {
            key = HexToKey(parts[1]);
        } catch (const std::logic_error& e) {
            LOG_ERROR(HW_AES, "Invalid key {}: {}", parts[1], e.what());
            continue;
        }

        const auto common_key = ParseCommonKeyName(name);
        if (common_key) {
            if (common_key >= common_key_y_slots.size()) {
                LOG_ERROR(HW_AES, "Invalid common key index {}", common_key.value());
            } else {
                common_key_y_slots[common_key.value()] = key;
            }
            continue;
        }

        if (name == "dlpKeyY") {
            dlp_nfc_key_y_slots[DlpNfcKeyY::Dlp] = key;
            continue;
        }

        if (name == "nfcKeyY") {
            dlp_nfc_key_y_slots[DlpNfcKeyY::Nfc] = key;
            continue;
        }

        if (name == "nfcIv") {
            nfc_iv = key;
            continue;
        }

        const auto key_slot = ParseKeySlotName(name);
        if (!key_slot) {
            LOG_ERROR(HW_AES, "Invalid key name '{}'", name);
            continue;
        }

        if (key_slot->first >= MaxKeySlotID) {
            LOG_ERROR(HW_AES, "Out of range key slot ID {:#X}", key_slot->first);
            continue;
        }

        switch (key_slot->second) {
        case 'X':
            key_slots.at(key_slot->first).SetKeyX(key);
            break;
        case 'Y':
            key_slots.at(key_slot->first).SetKeyY(key);
            break;
        case 'N':
            key_slots.at(key_slot->first).SetNormalKey(key);
            break;
        default:
            LOG_ERROR(HW_AES, "Invalid key type '{}'", key_slot->second);
            break;
        }
    }
}

} // namespace

void InitKeys(bool force) {
    static bool initialized = false;
    if (initialized && !force) {
        return;
    }
    initialized = true;
    HW::RSA::InitSlots();
    LoadBootromKeys();
    LoadPresetKeys();
}

void SetKeyX(std::size_t slot_id, const AESKey& key) {
    key_slots.at(slot_id).SetKeyX(key);
}

void SetKeyY(std::size_t slot_id, const AESKey& key) {
    key_slots.at(slot_id).SetKeyY(key);
}

void SetNormalKey(std::size_t slot_id, const AESKey& key) {
    key_slots.at(slot_id).SetNormalKey(key);
}

bool IsKeyXAvailable(std::size_t slot_id) {
    return key_slots.at(slot_id).x.has_value();
}

bool IsNormalKeyAvailable(std::size_t slot_id) {
    return key_slots.at(slot_id).normal.has_value();
}

AESKey GetNormalKey(std::size_t slot_id) {
    return key_slots.at(slot_id).normal.value_or(AESKey{});
}

void SelectCommonKeyIndex(u8 index) {
    key_slots[KeySlotID::TicketCommonKey].SetKeyY(common_key_y_slots.at(index));
}


using System.Collections.Generic;
using OpenBveApi.Routes;

namespace CsvRwRouteParser
{
	/// Holds the base structures for a route: These are cloned and transformed for final world placement
	internal class StructureData
	{
		/// All currently defined Structure.Rail objects
		internal ObjectDictionary RailObjects;
		/// All currently defined Structure.Pole objects
		internal PoleDictionary Poles;
		/// All currently defined Structure.Ground objects
		internal ObjectDictionary Ground;
		/// All currently defined Structure.WallL objects
		internal ObjectDictionary WallL;
		/// All currently defined Structure.WallR objects
		internal ObjectDictionary WallR;
		/// All currently defined Structure.DikeL objects
		internal ObjectDictionary DikeL;
		/// All currently defined Structure.DikeR objects
		internal ObjectDictionary DikeR;
		/// All currently defined Structure.FormL objects
		internal ObjectDictionary FormL;
		/// All currently defined Structure.FormR objects
		internal ObjectDictionary FormR;
		/// All currently defined Structure.FormCL objects
		internal ObjectDictionary FormCL;
		/// All currently defined Structure.FormCR objects
		internal ObjectDictionary FormCR;
		/// All currently defined Str


;
    private static final String P3 = "partition-3";
    private static final String P4 = "partition-4";

    @DataProvider
    public static Object[][] md5HashFunction() {
        // @Checkstyle:off
        return new Object[][] {
            { P1, ByteString.valueOfHex("94f940e6c2a31703d6be067b87d67968").toInt() },
            { P2, ByteString.valueOfHex("1038f27a22f8b574670bfdd7f918ffb4").toInt() },
            { P3, ByteString.valueOfHex("a88f746bfae24480be40df47c679228a").toInt() },
            { P4, ByteString.valueOfHex("bdb89200d2a310f5afb345621f544183").toInt() },
        };
        // @Checkstyle:on
    }

    @Test(dataProvider = "md5HashFunction")
    public void testMD5HashFunction(final String s, final int expected) {
        assertThat(ConsistentHashMap.MD5.apply(s)).isEqualTo(expected);
    }

    @Test
    public void testConsistentHashMap() {
        // Create a hash function that returns predictable values.
        @SuppressWarnings({ "rawtypes", "unchecked" })
        final Function<Object, Integer, NeverThrowsException> hashFunction = mock(Function.class);

        // Hashes for the 16 logical partitions.
        when(hashFunction.apply(any())).thenReturn(0x00000000, 0x40000000, 0x80000000, 0xC0000000,
                                                   0x10000000, 0x50000000, 0x90000000, 0xD0000000,
                                                   0x20000000, 0x60000000, 0xA0000000, 0xE0000000,
                                                   0x30000000, 0x70000000, 0xB0000000, 0xF0000000);

        final ConsistentHashMap<String> partitions = new ConsistentHashMap<>(hashFunction);
        partitions.put(P1, P1, 4);
        partitions.put(P2, P2, 4);
        partitions.put(P3, P3, 4);
        partitions.put(P4, P4, 4);

        // Check the structure of the CHM.
        assertThat(partitions.isEmpty()).isFalse();
        assertThat(partitions.size()).isEqualTo(4);
        assertThat(partitions.getAll()).containsOnly(P1, P2, P3, P4);

        final Map<String, Long> weights = partitions.getWeights();
        assertThat(weights.size()).isEqualTo(4);
        assertThat(weights).containsEntry(P1, 0x40000000L);
        assertThat(weights).containsEntry(P2, 0x40000000L);
        assertThat(weights).containsEntry(P3, 0x40000000L);
        assertThat(weights).containsEntry(P4, 0x40000000L);

        // Hashes for several key lookups.
        when(hashFunction.apply(any())).thenReturn(0x70000001, 0x7FFFFFFF, 0x80000000,          // P1
                                                   0xF0000001, 0xFFFFFFFF, 0x00000000,          // P1
                                                   0x00000001, 0x0FFFFFFF, 0x10000000,          // P2
                                                   0xE0000001, 0xEFFFFFFF, 0xF0000000);         // P4
        assertThat(partitions.get(P1)).isEqualTo(P1);
        assertThat(partitions.get(P1)).isEqualTo(P1);
        assertThat(partitions.get(P1)).isEqualTo(P1);

        assertThat(partitions.get(P1)).isEqualTo(P1);
        assertThat(partitions.get(P1)).isEqualTo(P1);
        assertThat(partitions.get(P1)).isEqualTo(P1);

        assertThat(partitions.get(P2)).isEqualTo(P2);
        assertThat(partitions.get(P2)).isEqualTo(P2);
        assertThat(partitions.get(P2)).isEqualTo(P2);

        assertThat(partitions.get(P4)).isEqualTo(P4);
        assertThat(partitions.get(P4)).isEqualTo(P4);
        assertThat(partitions.get(P4)).isEqualTo(P4);

        // Remove a partition and retry.
        when(hashFunction.apply(any())).thenReturn(0x10000000, 0x


using System;
using System.Threading.Tasks;
using Certes.Cli.Commands;
using Certes.Cli.Settings;
using Moq;
using Xunit;

namespace Certes.Cli
{
    public class CliCoreTests
    {
        [Fact]
        public async Task CanRunCommand()
        {
            var serverUri = new Uri("http://acme.com/d");
            var settingsMock = new Mock<IUserSettings>(MockBehavior.Strict);
            settingsMock.Setup(m => m.SetDefaultServer(serverUri)).Returns(Task.CompletedTask);

            var ctxMock = new Mock<IAcmeContext>();
            ctxMock.Setup(m => m.GetDirectory()).ReturnsAsync(Helper.MockDirectoryV2);

            var cli = new CliCore(new[]
            {
                new ServerSetCommand(settingsMock.Object, (u, k) => ctxMock.Object)
            });

            var succeed = await cli.Run(new[] { "server", "set", $"{serverUri}" });
            Assert.True(succeed);
        }

        [Fact]
        public async Task CanShowHelpForGroup()
        {
            var settingsMock = new Mock<IUserSettings>(MockBehavior.Strict);

            var ctxMock = new Mock<IAcmeContext>();
            ctxMock.Setup(m => m.GetDirectory()).ReturnsAsync(Helper.MockDirectoryV2);

            var cli = new CliCore(new[]
            {
                new ServerSetCommand(settingsMoc


= {"Mastigus",nil},
[6218] = {"Visgo Irradiado",nil},
[6219] = {"Tocaieiro Corrosivo",nil},
[6220] = {"Horror Irradiado",nil},
[6221] = {"Leproso Atordoado",nil},
[6222] = {"Técnico Leproso",nil},
[6223] = {"Defensor Leproso",nil},
[6224] = {"Mecanista Leproso",nil},
[6225] = {"Mecanotanque",nil},
[6226] = {"Mecano-Fogâmbulo",nil},
[6227] = {"Mecano-Gelâmbulo",nil},
[6228] = {"Embaixador Ferro Negro",nil},
[6229] = {"Espanca-gente 9-60",nil},
[6230] = {"Armadura de Segurança do Pacificador",nil},
[6231] = {"Tecnobô",nil},
[6232] = {"Nulificador Arcano X-21",nil},
[6233] = {"Sentinela Mecanoide",nil},
[6234] = {"Guardião Mecanoide",nil},
[6235] = {"Eletrocutor 6000",nil},
[6236] = {"Klannoc Macleod","O Ilhéu"},
[6237] = {"Arqueiro do Cárcere",nil},
[6238] = {"Grande Gui",nil},
[6239] = {"Ciclonium",nil},
[6240] = {"Desafiante da Contenda",nil},
[6241] = {"Bailor Manopedra",nil},
[6243] = {"Gelihast",nil},
[6244] = {"Takar, o Vidente",nil},
[6245] = {"Anathera",nil},
[6246] = {"Latherion",nil},
[6247] = {"Doan Karhan",nil},
[6248] = {"Kabe Sashata","Mestre-de-cerimônias"},
[6249] = {"Espectador da Contenda",nil},
[6250] = {"Rastejante",nil},
[6251] = {"Strahad Farsan",nil},
[6252] = {"Acólita Magaz",nil},
[6253] = {"Acólito Fenrick",nil},
[6254] = {"Acólita Wytula",nil},
[6266] = {"Menara Nihila",nil},
[6267] = {"Acólita Lorena",nil},
[6268] = {"Caçador Vil Evocado",nil},
[6271] = {"Camundongo",nil},
[6272] = {"Estalajadeira Janine","Hospedagem"},
[6286] = {"Zarrin","Cozinheiro"},
[6287] = {"Radnaal Tecegrenhas","Esfolador"},
[6288] = {"Jayla","Esfoladora"},
[6289] = {"Rand Rhobart","Esfolador"},
[6290] = {"Yonn Corte Profundo","Esfolador"},
[6291] = {"Balthus Esfolapedra","Treinamento de Esfolamento"},
[6292] = {"Eladriel","Treinamento de Esfolamento"},
[6293] = {"Jonas Anísio",nil},
[6294] = {"Krom Braçoforte",nil},
[6295] = {"Vilma Ramires","Treinamento de Esfolamento"},
[6297] = {"Kordram Rochamalho","Treinamento de Mineração"},
[6298] = {"Thelgrum Rochamalho","Suprimentos de Mineração"},
[6299] = {"Delfrum Barbagulha","Ferreiro Profissional"},
[6300] = {"Elisa Manácero","Suprimentos de Ferraria"},
[6301] = {"Gorbold


y_ >::add_tile_offset()'],['../classcutlass_1_1epilogue_1_1warp_1_1TileIteratorTensorOp_3_01WarpShape___00_01OperatorShape___003cbb32beb84b4984cb7853662096d289.html#aa54bfe6b9c53d0e79cfbae74c0e52fe4',1,'cutlass::epilogue::warp::TileIteratorTensorOp< WarpShape_, OperatorShape_, Element_, layout::RowMajor >::add_tile_offset()'],['../classcutlass_1_1epilogue_1_1warp_1_1TileIteratorVoltaTensorOp_3_01WarpShape___00_01gemm_1_1GemmSa0ceeeddc22575876eb977da7f5416a8.html#ab9627099133cc3fad152ea9984458147',1,'cutlass::epilogue::warp::TileIteratorVoltaTensorOp< WarpShape_, gemm::GemmShape< 32, 32, 4 >, half_t, layout::RowMajor >::add_tile_offset()'],['../classcutlass_1_1epilogue_1_1warp_1_1TileIteratorVoltaTensorOp_3_01WarpShape___00_01gemm_1_1GemmS2fe0c60b727c738c622c18fc3dd76644.html#a13ef705330675c5360e4430a9a002c07',1,'cutlass::epilogue::warp::TileIteratorVoltaTensorOp< WarpShape_, gemm::GemmShape< 32, 32, 4 >, float, layout::RowMajor >::add_tile_offset()'],['../classcutlass_1_1epilogue_1_1warp_1_1TileIteratorWmmaTensorOp_3_01WarpShape___00_01OperatorShape_fd6a91cd8bbd07ecd1344326b830e3a4.html#aef2b622345c91bc99f1baec9cefc8392',1,'cutlass::epilogue::warp::TileIteratorWmmaTensorOp< WarpShape_, OperatorShape_, OperatorFragment_, layout::RowMajor >::add_tile_offset()'],['../classcutlass_1_1gemm_1_1warp_1_1MmaSimtTileIterator_3_01Shape___00_01Operand_1_1kA_00_01Element_67ca7e11a38e38f2c51b84767654a90f.html#ad640be3cb5eaa3eabf94d3ad2d065e60',1,'cutlass::gemm::warp::MmaSimtTileIterator< Shape_, Operand::kA, Element_, layout::ColumnMajor, Policy_, PartitionsK, PartitionGroupSize >::add_tile_offset()'],['../classcutlass_1_1gemm_1_1warp_1_1MmaSimtTileIterator_3_01Shape___00_01Operand_1_1kB_00_01Element_ea0a4e7ce3cd5d25cabf79383efdf4d9.html#a8118c7b8864ff0d164b826952d18ebb5',1,'cutlass::gemm::warp::MmaSimtTileIterator< Shape_, Operand::kB, Element_, layout::RowMajor, Policy_, PartitionsK, PartitionGroupSize >::add_tile_offset()'],['../classcutlass_1_1gemm_1_1warp_1_1MmaSimtTileIterator_3_01Shape___00_01Operand_1_1kC_00_01Element_4ccafbc821b3a55cd532602442a74031.html#a53acfb33cbaec4476b1417247701c520',1,'cutlass::gemm::warp::MmaSimtTileIterator< Shape_, Operand::kC, Element_, layout::ColumnMajor, Policy_ >::add_tile_offset()'],['../classcutlass_1_1gemm_1_1warp_1_1MmaSimtTileIterator_3_01Shape___00_01Operand_1_1kC_00_01Element_8f92ea79e85febb67169c4b2d94b1b20.html#af9c46433b6f8797445ed


u.y, u.z
   m.e1, m.e5, m.e9  = v.x, v.y, v.z
   m.e2, m.e6, m.e10 = w.x, w.y, w.z
end

function TransformMT.dup(this)
   -- TODO(deanm): This should be better.
   local tm = Transform()
   tm.m = dupAffine(this.m)
   return tm
end

-- Transform and return a new array of points with transform matrix |t|.
local function transformPoints(t, ps)
   local il = #ps
   local out = {}
   for i=1, il do
      out[i] = transformPoint(t, ps[i])
   end
   return out
end

  -- Average a list of points, returning a new "centroid" point.
local function averagePoints(ps)
   local avg = {x= 0, y= 0, z= 0}
   for i, p in ipairs(ps) do
      avg.x = avg.x + p.x
      avg.y = avg.y + p.y
      avg.z = avg.z + p.z
   end
    -- TODO(deanm): 1 divide and 3 multiplies cheaper than 3 divides?
   local f = 1 / #ps

   avg.x = avg.x * f
   avg.y = avg.y * f
   avg.z = avg.z * f

   return avg
end

  -- Push a and b away from each other.  This means that the distance between
  -- a and be should be greater, by 2 units, 1 in each direction.
local function pushPoints2dIP(a, b)
   local vec = unitVector2d(subPoints2d(b, a))
   addPoints2dIP(b, b, vec)
   subPoints2dIP(a, a, vec)
end

-- A QuadFace represents a polygon, either a four sided quad, or sort of a
-- degenerated quad triangle.  Passing null as i3 indicates a triangle.  The
-- QuadFace stores indices, which will generally point into some vertex list
-- that the QuadFace has nothing to do with.  At the annoyance of keeping
-- the data up to date, QuadFace stores a pre-calculated centroid and two
-- normals (two triangles in a quad).  This is an optimization for rendering
-- and procedural operations, and you must set them correctly.
-- NOTE: The front of a QuadFace has vertices in counter-clockwise order.

local QuadFaceMT = {}
QuadFaceMT.__index = QuadFaceMT

local function QuadFace(i0, i1, i2, i3)
   local this = {i0= i0, i1= i1, i2= i2, i3= i3}
   this.centroid = nil
   this.normal1 = nil
   this.normal2 = nil
   setmetatable(this, QuadFaceMT)
   return this
end

function QuadFaceMT.isTriangle(this)
   return this.i3 == nil
end

function QuadFaceMT.setQuad(this, i0, i1, i2, i3)
   this.i0 = i0
   this.i1 = i1
   this.i2 = i2
   this.i3 = i3
end

function QuadFaceMT.setTriangle(i0, i1, i2)
   this.i0 = i0
   this.i1 = i1
   this.i2 = i2
   this.i3 = nil
end

-- A Shape represents a mesh, a collection of QuadFaces.  The Shape stores
-- a list of all vertices (so they can be shared across QuadFaces), and the
-- QuadFaces store indices into this list.
--
-- All properties of shapes are meant to be public, so access them directly.
local function Shape()
   return {vertices= {}, quads= {}}


me {
			email
		}
	}`

	compileGQLToPSQL(t, gql, nil, "user")
}

func queryWithVariables(t *testing.T) {
	gql := `query {
		products(id: $PRODUCT_ID, where: { price: { eq: $PRODUCT_PRICE } }) {
			id
			name
		}
	}`

	compileGQLToPSQL(t, gql, nil, "user")
}

func withWhereOnRelations(t *testing.T) {
	gql := `query {
		users(where: {
				not: {
					products: {
						price: { gt: 3 }
					}
				}
			}) {
			id
			email
		}
	}`

	compileGQLToPSQL(t, gql, nil, "user")
}

func multiRoot(t *testing.T) {
	gql := `query {
		products {
			id
			name
			customer {
				vip
			}
		}
		users {
			id
			email
		}
		customers {
			id
		}
	}`

	compileGQLToPSQL(t, gql, nil, "user")
}

func withFragment1(t *testing.T) {
	gql := `
	fragment userFields1 on user {
		id
		email
	}

	query {
		users {
			...userFields2

			avatar
			...userFields1
		}
	}

	fragment userFields2 on user {
		full_name
	}`

	compileGQLToPSQL(t, gql, nil, "user")
}

func withFragment2(t *testing.T) {
	gql := `
	query {
		users {
			...userFields2

			avatar
			...userFields1
		}
	}

	fragment userFields1 on user {
		id
		email
	}

	fragment userFields2 on user {
		full_name
	}`

	compileGQLToPSQL(t, gql, nil, "user")
}

func withFragment3(t *testing.T) {
	gql := `

	fragment userFields1 on user {
		id
		email
	}

	fragment userFields2 on user {
		full_name
		...userFields1
	}

	query {
		users {
			...userFields2

			avatar
		}
	}`

	compileGQLToPSQL(t, gql, nil, "user")
}

func withFragment4(t *testing.T) {
	gql := `

	fragment userFields1 on user {
		id
		email
	}

	fragment userFields2 on user {
		full_name
	}

	query {
		users {
			...userFields2

			avatar
			...userFields1
		}
	}`

	compileGQLToPSQL(t, gql, nil, "anon")
}

func withPolymorphicUnion(t *testing.T) {
	gql := `

	fragment userFields on user {
		id
		email
	}

	fragment productFields on product {
		id
		name
	}

	query {
		notifications {
			id
			subject {
				...on users {
					...userFields
				}
				...on products {
					...productFields
				}
			}
		}
	}`

	compileGQLToPSQL(t, gql, nil, "user")
}

func withSkipAndIncludeDirectives(t *testing.T) {
	gql := `
	query {
		products(limit: 6) @include(ifVar: $test) {
			id
			name
		}
		users(limit: 3) @skip(ifVar: $test) {
			id
		}
	}`

	compileGQLToPSQL(t, gql, nil, "user")
}

func


ao]?|dos|tres|cuatro|cinco|seis|siete|ocho|nueve)"
            .replace("{WrittenOneToNineRegex}", WrittenOneToNineRegex);

    public static final String FullTextYearRegex = "\\b(?<fullyear>((dos\\s+)?mil)(\\s+{WrittenOneHundredToNineHundredRegex})?(\\s+{WrittenOneToNinetyNineRegex})?)"
            .replace("{WrittenOneToNinetyNineRegex}", WrittenOneToNinetyNineRegex)
            .replace("{WrittenOneHundredToNineHundredRegex}", WrittenOneHundredToNineHundredRegex);

    public static final String YearRegex = "({BaseDateTime.FourDigitYearRegex}|{FullTextYearRegex})"
            .replace("{BaseDateTime.FourDigitYearRegex}", BaseDateTime.FourDigitYearRegex)
            .replace("{FullTextYearRegex}", FullTextYearRegex);

    public static final String RelativeMonthRegex = "(?<relmonth>(de\\s+)?((este|pr[oó]ximo|([uú]ltim(o|as|os)))\\s+mes)|(del\\s+)?(mes\\s+((que\\s+viene)|pasado)))\\b";

    public static final String MonthRegex = "\\b(?<month>abr(\\.|(il)?\\b)|ago(\\.|(sto)?\\b)|dic(\\.|(iembre)?\\b)|feb(\\.|(rero)?\\b)|ene(\\.|(ro)?\\b)|ju[ln](\\.|(io)?\\b)|mar(\\.|(zo)?\\b)|may(\\.|(o)?\\b)|nov(\\.|(iembre)?\\b)|oct(\\.|(ubre)?\\b)|sep?t(\\.|(iembre)?\\b)|sep(\\.|\\b))";

    public static final String MonthSuffixRegex = "(?<msuf>((del?|la|el)\\s+)?({RelativeMonthRegex}|{MonthRegex}))"
            .replace("{RelativeMonthRegex}", RelativeMonthRegex)
            .replace("{MonthRegex}", MonthRegex);

    public static final String DateUnitRegex = "(?<unit>(año|(?<uoy>semana))(?<plural>s)?|(?<uoy>mes)(?<plural>es)?|(?<uoy>d[ií]a)(?<plural>s)?(?<business>\\s+(h[aá]biles|laborales))?)\\b";

    public static final String PastRegex = "(?<past>\\b(pasad(a|o)(s)?|[uú]ltim[oa](s)?|anterior(es)?|previo(s)?)\\b)";

    public static final String FutureRegex = "\\b(siguiente(s)?|pr[oó]xim[oa](s)?)\\b";

    public static final String SimpleCasesRegex = "\\b((desde(\\s+el)?|entre|del?)\\s+)?({DayRegex})\\s*{TillRegex}\\s*({DayRegex})\\s+{MonthSuffixRegex}((\\s+|\\s*,\\s*)((en|del?)\\s+)?{YearRegex})?\\b"
            .replace("{DayRegex}", DayRegex)
            .replace("{TillRegex}", TillRegex)
            .replace("{MonthSuffixRegex}", MonthSuffixRegex)
            .replace("{YearRegex}", YearRegex);

    public static final String MonthFrontSimpleCasesRegex = "\\b{MonthSuffixRegex}\\s+((desde(\\s+el)?|entre|del)\\s+)?({DayRegex})\\s*{TillRegex}\\s*({DayRegex})((\\s+|\\s*,\\s*)((en|del?)\\s+)?{YearRegex})?\\b"
            .replace("{MonthSuffixRegex}", MonthSuffixRegex)
            .replace("{DayRegex}", DayRegex)
            .replace("{TillRegex}", TillRegex)
            .replace("{YearRegex}", YearRegex);

    public static final String MonthFrontBetweenRegex = "\\b{M


toString(),
      'stackTrace': stackTrace.toString().split('\n'),
    };
  }

  String toJson() => json.encode(toMap());

  @override
  String toString() {
    return 'AppException(type: $type, customMessage: $customMessage, error: $error, stackTrace: $stackTrace)';
  }
}
import 'package:flutter/material.dart';
import 'package:flutter_hooks/flutter_hooks.dart';
import 'package:go_router/go_router.dart';
import 'package:material_symbols_icons/symbols.dart';
import 'package:quran_app/common_widgets/custom_scaffold.dart';
import 'package:quran_app/common_widgets/scrollable_column.dart';
import 'package:quran_app/extensions/context_extensions.dart';
import 'package:quran_app/features/settings/presentation/choose_locale_dialog.dart';
import 'package:quran_app/features/settings/presentation/choose_theme_dialog.dart';
import 'package:quran_app/i18n/strings.g.dart';
import 'package:quran_app/router/routes.dart';

class SettingsScreen extends HookWidget {
  const SettingsScreen({super.key});

  @override
  Widget build(BuildContext context) {
    return CustomScaffold(
      appBar: AppBar(
        title: Text(context.t.settings),
      ),
      body: ScrollableColumn(
        children: [
          // theme selection
          ListTile(
            leading: const Icon(Symbols.dark_mode),
            onTap: () => context.customWidgetDialog(const ChooseThemeDialog()),
            title: Text(context.t.themeMode),
            trailing: Text(context.themeAsText),
          ),

          // language selection
          ListTile(
            leading: const Icon(Symbols.language),
            onTap: () => context.customWidgetDialog(const ChooseLocaleDialog()),
            title: Text(context.t.language),
            subtitle: Text(context.t.languageOtherLanguage),
            trailing: Text(context.languageAsText),
          ),

          // Manage Tafsir
          ListTile(
            leading: const Icon(Symbols.book),
            onTap: () => context.pushNamed(Routes.manageTafsir.name),
            title: Text(context.t.manageTafsir),
            trailing: const Icon(Icons.chevron_right),
          ),
        ],
      ),
    );
  }
}
import 'package:equatable/equatable.dart';
import 'package:quran_app/features/onboarding/domain/multi_language_model.dart';

class TafsirModel extends Equatable {
  final String url;
  final MultiLanguageModel name;
  final MultiLanguageModel description;
  final String fileName;
  final double size;
  final String tafsir;

  const TafsirModel({
    required this.url,
    required this.name,
    required this.description,
    required this.fileName,
    required this.size,
    this.tafsir = '',
  });

  String get fileNameZip => '$fileName.zip';

  @override
  List<Object?> get props => [fileName];

  factory TafsirModel.fromJson(Map<String, dynamic> json) {
    return TafsirModel(
      url: json['url'] as String? ?? '',
      name: MultiLanguageModel.fromJson(json['name'] ?? {}),
      description: MultiLanguageModel.fromJson(json['description'] ?? {}),
      fileName: json['file'] as String? ?? '',
      size: (json['size'] as num? ?? 0).toDouble(),
    );
  }

  Map<String, dynamic> toJson() {


");
                        $("#dg").datagrid("reload");
                        $("#dg2").datagrid("reload");
                    } else {
                        $.messager.alert("系统提示", result.errorInfo);
                    }
                }
            });
        }

        function endUseEquipmentLog() {
            var selectedRows = $("#dg2").datagrid("getSelections");
            if (selectedRows.length != 1) {
                $.messager.alert("系统提示", "请选择一个要结束使用的设备!");
                return;
            }
            var row = selectedRows[0];
            $.messager.confirm("系统提示", "你确定要结束这" + selectedRows.length + "个设备的使用吗?", function (r) {
                if (r) {
                    $.post("/admin/useEquipmentLog/endUseEquipmentLog", {equipmentTypeId: row.id}, function (result) {
                        if (result.success) {
                            $.messager.alert("系统提示", "设备已成功结束使用！");
                            $("#dg").datagrid("reload");
                            $("#dg2").datagrid("reload");
                        } else {
                            $.messager.alert("系统提示", "设备恢复失败！");
                        }
                    }, "json");
                }
            });
        }

        function closeStoreDialog() {
            $("#dlg").dialog("close");
            resetValue();
        }

        $(document).ready(function () {

            $("#dg").datagrid({
                onDblClickRow: function (index, row) {
                    $("#dlg").dialog("open").dialog("setTitle", "设备使用信息填写");
                    url = "/admin/useEquipmentLog/beginUseEquipmentLog?id=" + row.id;
                }
            });
        });

        function formatEquipment(val, row) {
            return val.name;
        }
    </script>

        编号
        设备类型
        设备名称

             设备名称： <input type="text" id="s_name" size="20" oninput="searchEquipment()"/>
            使用设备

        编号
        <th field="equipmentType" width


render_info.frame
            ));
        }
        framework::sleep(&mut run_mode);
    }
}

fn main() {
    pretty_env_logger::init().unwrap();
    framework::start("configs/sfml.toml", visualizer);
}
#![feature(test)]

extern crate test;
#[macro_use]
extern crate serde_derive;
use serde_json;

use tera::{escape_html, Context, Template, Tera, Value};

static VARIABLE_ONLY: &'static str = "{{product.name}}";

static SIMPLE_TEMPLATE: &'static str = "

    <title>{{ product.name }}</title>

{{ product.name }} - {{ product.manufacturer | upper }}

{{ product.summary }}

£{{ product.price * 1.20 }} (VAT inc.)

Look at reviews from your friends {{ username }}

    <button>Buy!</button>

";

static PARENT_TEMPLATE: &'static str = "

    <title>{% block title %}Hello{% endblock title%}</title>

    {% block body %}{% endblock body %}

";

static MACRO_TEMPLATE: &'static str = "
{% macro render_product(product) %}

{{ product.name }} - {{ product.manufacturer | upper }}

{{ product.summary }}

£{{ product.price * 1.20 }} (VAT inc.)

    <button>Buy!</button>
{% endmacro render_product %}
";

static CHILD_TEMPLATE: &'static str = r#"{% extends "parent.html" %}
{% block title %}{{ super() }} - {{ username | lower }}{% endblock title %}

{% block body %}body{% endblock body %}
"#;

static CHILD_TEMPLATE_WITH_MACRO: &'static str = r#"{% extends "parent.html" %}
{% import "macros.html" as macros %}

{% block title %}{{ super() }} - {{ username | lower }}{% endblock title %}

{% block body %}
{{ macros::render_product(product=product) }}
{% endblock body %}
"#;

static USE_MACRO_TEMPLATE: &'static str = r#"
{% import "macros.html" as macros %}
{{ macros::render_product(product=product) }}
"#;

#[derive(Debug, Serialize)]
struct Product {
    name: String,
    manufacturer: String,
    price: i32,
    summary: String,
}
impl Product {
    pub fn new() -> Product {
        Product {
            name: "Moto G".to_owned(),
            manufacturer: "Motorala".to_owned(),
            summary: "A phone".to_owned(),
            price: 100,
        }
    }
}

#[bench]
fn bench_parsing_basic_template(b: &mut test::Bencher) {
    b.iter(|| Template::new("bench", None, SIMPLE_TEMPLATE));
}

#[bench]
fn bench_parsing_with_inheritance_and_macros(b: &mut test::Bencher) {
    let mut tera = Tera::default();
    b.iter(|| {
        tera.add_raw_templates(vec![
            ("parent.html", PARENT_TEMPLATE),
            ("child.html", CHILD_TEMPLATE),
            ("macros.html", MACRO_TEMPLATE),
        ])
    });
}

#[bench]
fn bench_rendering_only_variable(b: &mut test::Bencher) {
    let mut tera = Tera::default();
    tera.add_raw_template("test.html", VARIABLE_ONLY).unwrap();
    let mut context = Context::new();
    context.insert("product", &Product::new());
    context.insert("username", &"bob");

    b.iter(|| tera.render("test.html", &context));
}

#[bench]
fn bench_rendering_basic_template(b: &mut test::Bencher) {
    let mut tera = Tera::default();
    tera.add_raw_template("bench.html", SIMPLE_TEMPLATE)
        .


using AAEmu.Commons.Utils;
using AAEmu.Game.GameData.Framework;
using AAEmu.Game.Models.Game.Skills;
using AAEmu.Game.Models.Game.Skills.Buffs;
using AAEmu.Game.Models.Game.Skills.Static;
using AAEmu.Game.Models.Game.Units;
using AAEmu.Game.Utils.DB;

using Microsoft.Data.Sqlite;

namespace AAEmu.Game.GameData;

[GameData]
public class BuffGameData : Singleton<BuffGameData>, IGameDataLoader
{
    private Dictionary<uint, List<BuffModifier>> _buffModifiers;
    private Dictionary<uint, BuffTolerance> _buffTolerances;
    private Dictionary<uint, BuffTolerance> _buffTolerancesById;

    public List<BuffModifier> GetModifiersForBuff(uint ownerId)
    {
        return _buffModifiers.TryGetValue(ownerId, out var modifier) ? modifier : [];
    }

    public BuffTolerance GetBuffToleranceForBuffTag(uint buffTag)
    {
        return _buffTolerances.TryGetValue(buffTag, out var tolerance) ? tolerance : null;
    }

    public void Load(SqliteConnection connection)
    {
        _buffModifiers = [];
        _buffTolerances = [];
        _buffTolerancesById = [];

        using (var command = connection.CreateCommand())
        {
            command.CommandText = "SELECT * FROM buff_modifiers";
            command.Prepare();
            using (var sqliteReader = command.ExecuteReader())
            using (var reader = new SQLiteWrapperReader(sqliteReader))
            {
                while (reader.Read())
                {
                    var template = new BuffModifier()
                    {
                        Id = reader.GetUInt32("id"),
                        OwnerId = reader.GetUInt32("owner_id"),
                        OwnerType = reader.GetString("owner_type"),
                        TagId = reader.GetUInt32("tag_id", 0),
                        BuffAttribute = (BuffAttribute)reader.GetUInt32("buff_attribute_id"),
                        UnitModifierType = (UnitModifierType)reader.GetUInt32("unit_modifier_type_id"),
                        Value = reader.GetInt32("value"),
                        BuffId = reader.GetUInt32("buff_id", 0),
                        Synergy = reader.GetBoolean("synergy"),
                    };

                    if (!_buffModifiers.ContainsKey(template.OwnerId))
                        _buffModifiers.Add(template.OwnerId, []);
                    _buffModifiers[template.OwnerId].Add(template);
                }
            }
        }


}.vue-image-crop-upload .vicp-wrap .vicp-step2 .vicp-crop .vicp-crop-left .vicp-range .vicp-icon6{right:0}.vue-image-crop-upload .vicp-wrap .vicp-step2 .vicp-crop .vicp-crop-left .vicp-range .vicp-icon6:before{position:absolute;content:"";display:block;left:3px;top:8px;width:12px;height:2px;background-color:#fff}.vue-image-crop-upload .vicp-wrap .vicp-step2 .vicp-crop .vicp-crop-left .vicp-range .vicp-icon6:after{position:absolute;content:"";display:block;top:3px;left:8px;width:2px;height:12px;background-color:#fff}.vue-image-crop-upload .vicp-wrap .vicp-step2 .vicp-crop .vicp-crop-left .vicp-range input[type=range]{display:block;padding-top:5px;margin:0 auto;width:180px;height:8px;vertical-align:top;background:transparent;-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer}.vue-image-crop-upload .vicp-wrap .vicp-step2 .vicp-crop .vicp-crop-left .vicp-range input[type=range]:focus{outline:none}.vue-image-crop-upload .vicp-wrap .vicp-step2 .vicp-crop .vicp-crop-left .vicp-range input[type=range]::-webkit-slider-thumb{-webkit-box-shadow:0 2px 6px 0 rgba(0,0,0,.18);box-shadow:0 2px 6px 0 rgba(0,0,0,.18);-webkit-appearance:none;appearance:none;margin-top:-3px;width:12px;height:12px;background-color:#61c091;border-radius:100%;border:none;-webkit-transition:.2s;transition:.2s}.vue-image-crop-upload .vicp-wrap .vicp-step2 .vicp-crop .vicp-crop-left .vicp-range input[type=range]::-moz-range-thumb{box-shadow:0 2px 6px 0 rgba(0,0,0,.18);-moz-appearance:none;appearance:none;width:12px;height:12px;background-color:#61c091;border-radius:100%;border:none;-webkit-transition:.2s;transition:.2s}.vue-image-crop-upload .vicp-wrap .vicp-step2 .vicp-crop .vicp-crop-left .vicp-range input[type=range]::-ms-thumb{box-shadow:0 2px 6px 0 rgba(0,0,0,.18);appearance:none;width:12px;height:12px;background-color:#61c091;border:none;border-radius:100%;-webkit-transition:.2s;transition:.2s}.vue-image-crop-upload .vicp-wrap .vicp-step2 .vicp-crop .vicp-crop-left .vicp-range input[type=range]:active::-moz-range-thumb{box-shadow:0 1px 3px 0 rgba(0,0,0,.23);width:14px;height:14px}.vue-image-crop-upload .vicp-wrap .vicp-step2 .vicp-crop .vicp-crop-left .vicp-range input[type=range]:active::-ms-thumb{box-shadow:0 1px 3px 0 rgba(0,0,0,.23);width:14px;height:14px}.vue-image-crop-upload .vicp-wrap .vicp-step2 .vicp-crop .vicp-crop-left .vicp-range input[type=range]:active::-webkit-sl


import json
import os.path as osp
import pickle

import numpy as np
from spot_rl.utils.retrieve_robot_poses_from_cg import ROOT_PATH as CG_ROOT_PATH
from spot_rl.utils.retrieve_robot_poses_from_cg import get_view_poses
from spot_rl.utils.waypoint_estimation_based_on_robot_poses_from_cg import (
    get_navigation_points,
)

# This file computes the view poses and save the cache in the disk
def main():
    cg_json_path = osp.join(CG_ROOT_PATH, "sg_cache", "cfslam_object_relations.json")
    assert osp.exists(cg_json_path), f"{cg_json_path} doesn't exists please check path"
    waypoint_compute_cache_path = osp.join(
        CG_ROOT_PATH, "sg_cache", "map", "waypoint_compute_cache.pkl"
    )

    with open(cg_json_path, "r") as infile:
        cg_relations_data = json.load(infile)
        waypoint_cache = {}
        for cg_relation_node in cg_relations_data:
            for objectkey in ["object1", "object2"]:
                object = cg_relation_node.get(objectkey, None)
                if object is None:
                    continue
                bbox_center = np.array(object.get("bbox_center"))
                bbox_extent = np.array(object.get("bbox_extent"))
                object_tag = [object.get("object_tag")]
                view_poses, category_tag = get_view_poses(
                    bbox_center, bbox_extent, object_tag, True
                )
                x, y = 1, 0
                nav_pts = get_navigation_points(
                    robot_view_pose_data=view_poses,
                    bbox_centers=bbox_center,
                    bbox_extents=bbox_extent,
                    cur_robot_xy=[x, y],
                    goal_xy_yaw_from_cache=None,
                    visualize=False,
                    savefigname="pathplanning.png",
                )
                bbox_center_str = [str(v) for v in bbox_center.tolist()]
                bbox_extent_str = [str(v) for v in bbox_extent.tolist()]
                unique_key = ",".join(bbox_center_str + bbox_extent_str)
                final_waypoint = nav_pts[-1]
                final_waypoint[-1] = np.rad2deg(final_waypoint[-1])
                waypoint_cache[unique_key] = (final_waypoint, category_tag)
                print(f"{object_tag} : final waypoint {final_waypoint}")
        with open(waypoint_compute_cache_path, "wb") as outfile:
            pickle.dump(waypoint_cache, outfile)

if __name__ == "__main__":
    main()


2}
}

func (fake *UnspentTokensIterator) NextReturnsOnCall(i int, result1 *token.UnspentToken, result2 error) {
	fake.nextMutex.Lock()
	defer fake.nextMutex.Unlock()
	fake.NextStub = nil
	if fake.nextReturnsOnCall == nil {
		fake.nextReturnsOnCall = make(map[int]struct {
			result1 *token.UnspentToken
			result2 error
		})
	}
	fake.nextReturnsOnCall[i] = struct {
		result1 *token.UnspentToken
		result2 error
	}{result1, result2}
}

func (fake *UnspentTokensIterator) Invocations() map[string][][]interface{} {
	fake.invocationsMutex.RLock()
	defer fake.invocationsMutex.RUnlock()
	fake.closeMutex.RLock()
	defer fake.closeMutex.RUnlock()
	fake.nextMutex.RLock()
	defer fake.nextMutex.RUnlock()
	copiedInvocations := map[string][][]interface{}{}
	for key, value := range fake.invocations {
		copiedInvocations[key] = value
	}
	return copiedInvocations
}

func (fake *UnspentTokensIterator) recordInvocation(key string, args []interface{}) {
	fake.invocationsMutex.Lock()
	defer fake.invocationsMutex.Unlock()
	if fake.invocations == nil {
		fake.invocations = map[string][][]interface{}{}
	}
	if fake.invocations[key] == nil {
		fake.invocations[key] = [][]interface{}{}
	}
	fake.invocations[key] = append(fake.invocations[key], args)
}

var _ driver.UnspentTokensIterator = new(UnspentTokensIterator)
// Code generated by counterfeiter. DO NOT EDIT.
package mock

import (
	"sync"

	"github.com/hyperledger-labs/fabric-token-sdk/token/driver"
	"github.com/hyperledger-labs/fabric-token-sdk/token/token"
)

type ValidatorLedger struct {
	GetStateStub        func(token.ID) ([]byte, error)
	getStateMutex       sync.RWMutex
	getStateArgsForCall []struct {
		arg1 token.ID
	}
	getStateReturns struct {
		result1 []byte
		result2 error
	}
	getStateReturnsOnCall map[int]struct {
		result1 []byte
		result2 error
	}
	invocations      map[string][][]interface{}
	invocationsMutex sync.RWMutex
}

func (fake *ValidatorLedger) GetState(arg1 token.ID) ([]byte, error) {
	fake.getStateMutex.Lock()
	ret, specificReturn := fake.getStateReturnsOnCall[len(fake.getStateArgsForCall)]
	fake.getStateArgsForCall = append(fake.getStateArgsForCall, struct {
		arg1 token.ID
	}{arg1})
	stub := fake.GetStateStub
	fakeReturns := fake.getStateReturns
	fake.recordInvocation("GetState", []interface{}{arg1})
	fake.getStateMutex.Unlock()
	if stub != nil {
		return stub(arg1)
	}
	if specificReturn {
		return ret.result1, ret.result2
	}
	return fakeReturns.result1, fakeReturns.result2
}

func (fake *ValidatorLedger) GetStateCallCount() int {
	fake.getStateMutex.RLock()
	defer fake.getStateMutex.RUnlock()
	return len(fake.getStateArgsForCall)
}

func (fake *ValidatorLedger) GetStateCalls(stub func(token.ID) ([]byte, error)) {
	fake.getStateMutex.Lock()
	defer fake.getStateMutex.Unlock()
	fake.GetStateStub = stub
}

func (fake *ValidatorLedger) GetStateArgsForCall(i int) token.ID {
	fake.getStateM


local imperial = GetConVar("arc9_imperial"):GetBool()

local hutom = function(i)
    if imperial then
        impv = 1.0936
        impn = "unit.yard"
    else
        impv = 1
        impn = "unit.meter"
    end
    return math.Round(i * ARC9.HUToM * impv) .. (ARC9:GetPhrase(impn) or "m")
end

local hutomm = function(i)
    if imperial then
        impv = 39.370
        impn = "unit.inch"
    else
        impv = 1000
        impn = "unit.millimeter"
    end
    return math.Round(i * ARC9.HUToM * impv) .. (ARC9:GetPhrase(impn) or "mm")
end

local hutoms = function(i)
    if imperial then
        impv = 3.2808399
        impn = "unit.footpersecond"
    else
        impv = 1
        impn = "unit.meterpersecond"
    end
    return math.Round(i * ARC9.HUToM * impv) .. (ARC9:GetPhrase(impn) or "m/s")
end

local hutoms_1 = function(i)
    if imperial then
        impv = 3.2808399
        impn = "unit.footpersecond"
    else
        impv = 1
        impn = "unit.meterpersecond"
    end
    return math.Round(i * ARC9.HUToM * impv, 1) .. (ARC9:GetPhrase(impn) or "m/s")
end

local degtomoa = function(i) return math.Round(i / ARC9.TrueMOAToAcc, 1) .. (ARC9:GetPhrase("unit.moa") or "MOA") end

-- [AutoStatName] = {unit, lower_is_better}
-- unit can be:
--   false - as is (e.g. 30 round capacity)
--   string - suffix (e.g. +1 chamber size)
--   true - true percentage (e.g. 80% move speed)
--   function - return a string to use as the value
ARC9.AutoStatsMains = {
    ["DamageMax"] = {false, false},
    ["DamageMin"] = {false, false},
    ["DamageRand"] = {false, true},
    ["RangeMin"] = {hutom, false},
    ["RangeMax"] = {hutom, false},
    ["Distance"] = {hutom, false},
    ["Num"] = {false, false},
    ["Penetration"] = {hutomm, false},
    ["PenetrationDelta"] = {true, false},
    ["RicochetAngleMax"] = {"°", false},
    ["RicochetChance"] = {false, false},
    ["ArmorPiercing"] = {false, false},
    ["ShootEntForce"] = {hutoms, false},
    ["PhysBulletMuzzleVelocity"] = {hutoms, false},
    ["PhysBulletDrag"] = {false, true},
    ["PhysBulletGravity"] = {false, true},
    ["ChamberSize"] = {false, false},
    ["ClipSize"] = {false, false},
    ["SupplyLimit"] = {false, false},
    ["SecondarySupplyLimit"] = {false, false},
    ["AmmoPerShot"] = {false, true},
    ["ManualActionChamber"] = {false, false},
    ["TriggerDelay"] = {false, true},
    ["TriggerDelayTime"] = {"s", true},
    ["RPM"] = {"RPM", false},
    ["PushBackForce"] = {hutoms_1, false},
    ["PostBurstDelay"] = {"s", true},
    ["Recoil"] = {false, true},
    ["RecoilPatternDrift"] = {false, true},
    ["RecoilUp"] = {false, true},
    ["RecoilSide"] = {false, true},
    ["RecoilRandomUp"] = {false, true},
    ["RecoilRandomSide"]


].pose);
  int for_num = mini_cost_col - 1;
  std::cout << "mini_cost_col: " << mini_cost_col << std::endl;
  for (int i = 0; i <= for_num; ++i) {
    mini_cost_row = cost_matrix[mini_cost_row][mini_cost_col].preRow;
    mini_cost_col = cost_matrix[mini_cost_row][mini_cost_col].preCol;
    init_path.push_back(cost_matrix[mini_cost_row][mini_cost_col].pose);
    // std::cout << "row: " << mini_cost_row << " col: " << mini_cost_col
    //           << std::endl;
    std::cout << "preRow: " << cost_matrix[mini_cost_row][mini_cost_col].preRow
              << " preCol: " << cost_matrix[mini_cost_row][mini_cost_col].preCol
              << " t: " << cost_matrix[mini_cost_row][mini_cost_col].pose.t
              << " s: "
              << cost_matrix[mini_cost_row][mini_cost_col].pose.frenet_info.s
              << " v: " << cost_matrix[mini_cost_row][mini_cost_col].pose.v
              << " a: " << cost_matrix[mini_cost_row][mini_cost_col].pose.a
              << " cost: " << cost_matrix[mini_cost_row][mini_cost_col].miniCost
              << std::endl;
  }

  init_path.push_back(start_point);
  std::reverse(init_path.begin(), init_path.end());
}

double DpSpeed::calcNeighborCost(const TrajectoryPoint &start_point,
                                 TrajectoryPoint &end_point,
                                 const DpSpeedConfig &config) {
  // use 2 points to calculate the cost
  double cost_sum = 0;
  double ref_v_cost = 0.0;
  double acc_cost = 0.0;
  double obs_cost = 0.0;
  double speed = (end_point.frenet_info.s - start_point.frenet_info.s) / 1.0;
  ref_v_cost = config.w_cost_ref_v * pow(speed - config.ref_v, 2);
  double acc = (speed - start_point.v) / 1.0;
  if (acc > 4.1 || acc < -6) {
    acc_cost = 1e6;  // 限制加速度
  } else {
    acc_cost = config.w_cost_a * pow(acc, 2);
  }
  for (auto obs : obs_st_) {
    for (int i = 1; i <= 10; i++) {
      double time = start_point.t + i * 0.1;
      double cur_s =
          start_point.frenet_info.s +
          i * 0.1 * (end_point.frenet_info.s - start_point.frenet_info.s);
      if (obs.tmin <= time && obs.tmax >= time) {
        double portition = (time - obs.tmin) / (obs.tmax - obs.tmin);
        double s_min =
            obs.sLeftMin + portition * (obs.sRightMin - obs.sLeftMin);
        double s_max =
            obs.sLeftMax + portition * (obs.sRightMax - obs.sLeftMax);
        double distance_s_min = std::pow(cur_s - s_min, 2);
        double distance_s_max = std::pow(cur_s - s_max, 2);
        double distance_min = std::min(distance_s_min, distance_s_max);


Str := fmt.Sprintf("set up rule failed, %v: %v", rule, portErr)
				if !isDelete {
					return fmt.Errorf("%s", errStr)
				}
				logrus.Infof("%s", errStr)
			}
			rollbackRule := strings.Fields(fmt.Sprintf("-t nat %s %s -p %s --dport %d -j DNAT --to-destination %s:%d", rollbackAddDelOpt,
				ingressChain, strings.ToLower(PortConfig_Protocol_name[int32(iPort.Protocol)]), iPort.PublishedPort, gwIP, iPort.PublishedPort))
			rollbackRules = append(rollbackRules, rollbackRule)
		}

		// Filter table rules to allow a published service to be accessible in the local node from..
		// 1) service tasks attached to other networks
		// 2) unmanaged containers on bridge networks
		rule := strings.Fields(fmt.Sprintf("%s %s -m state -p %s --sport %d --state ESTABLISHED,RELATED -j ACCEPT",
			addDelOpt, ingressChain, strings.ToLower(PortConfig_Protocol_name[int32(iPort.Protocol)]), iPort.PublishedPort))
		if portErr = iptable.RawCombinedOutput(rule...); portErr != nil {
			errStr := fmt.Sprintf("set up rule failed, %v: %v", rule, portErr)
			if !isDelete {
				return fmt.Errorf("%s", errStr)
			}
			logrus.Warnf("%s", errStr)
		}
		rollbackRule := strings.Fields(fmt.Sprintf("%s %s -m state -p %s --sport %d --state ESTABLISHED,RELATED -j ACCEPT", rollbackAddDelOpt,
			ingressChain, strings.ToLower(PortConfig_Protocol_name[int32(iPort.Protocol)]), iPort.PublishedPort))
		rollbackRules = append(rollbackRules, rollbackRule)

		rule = strings.Fields(fmt.Sprintf("%s %s -p %s --dport %d -j ACCEPT",
			addDelOpt, ingressChain, strings.ToLower(PortConfig_Protocol_name[int32(iPort.Protocol)]), iPort.PublishedPort))
		if portErr = iptable.RawCombinedOutput(rule...); portErr != nil {
			errStr := fmt.Sprintf("set up rule failed, %v: %v", rule, portErr)
			if !isDelete {
				return fmt.Errorf("%s", errStr)
			}
			logrus.Warnf("%s", errStr)
		}
		rollbackRule = strings.Fields(fmt.Sprintf("%s %s -p %s --dport %d -j ACCEPT", rollbackAddDelOpt,
			ingressChain, strings.ToLower(PortConfig_Protocol_name[int32(iPort.Protocol)]), iPort.PublishedPort))
		rollbackRules = append(rollbackRules, rollbackRule)

		if err := plumbProxy(iPort, isDelete); err != nil {
			logrus.Warnf("failed to create proxy for port %d: %v", iPort.PublishedPort, err)
		}
	}

	return nil
}

// In the filter table FORWARD chain the first rule should be to jump to
// DOCKER-USER so the user is able to filter packet first.
// The second rule should be jump to INGRESS-CHAIN.
// This chain has the rules to allow access to the published ports for swarm tasks
// from local bridge networks and docker_gwbridge (ie:taks on other swarm networks)
func arrangeIngressFilterRule() {
	// TODO IPv6 support
	iptable := iptables.GetIptable(iptables.IPv4)
	if iptable.ExistChain(ingressChain, iptables.Filter) {
		if iptable.Exists(iptables.Filter, "FORW


 "_") }
		.distinct()
		.sorted()
		.toList() + "en"
}

fun allowedLicenses(): List<String> {
    return listOf("MIT", "Apache-2.0", "BSD-3-Clause")
}

fun allowedLicenseUrls(): List<String> {
    return listOf("https://github.com/journeyapps/zxing-android-embedded/blob/master/COPYING",
        "https://github.com/RikkaApps/Shizuku-API/blob/master/LICENSE", "https://github.com/rafi0101/Android-Room-Database-Backup/blob/master/LICENSE",
        "https://opensource.org/license/mit")
}

fun buildLanguagesArray(languages: List<String>): String {
    return languages.joinToString(separator = ", ") { "\"$it\"" }
}

// Get the Git commit hash
fun Project.getGitCommitHash(): String {
    var grgit: Grgit? = null
    try {
        grgit = Grgit.open(mapOf("currentDir" to projectDir))
        return grgit.head().abbreviatedId
    } catch (e: Exception) {
        logger.warn("Failed to get Git commit hash: ${e.message}. Using fallback.")
        return "unknown"
    } finally {
        grgit?.close()
    }
}

// Get commit count since last commit for versionCode increment
fun Project.getCommitCountSinceLastCommit(): Int {
    var grgit: Grgit? = null
    try {
        grgit = Grgit.open(mapOf("currentDir" to projectDir))
        val headCommit = grgit.head()
        val log = grgit.log(mapOf(
            "includes" to listOf(headCommit.id)
        ))
        return log.size
    } catch (e: Exception) {
        logger.warn("Failed to get commit count: ${e.message}. Using fallback.")
        return 0
    } finally {
        grgit?.close()
    }
}

// Get versionCode increment for nightly
fun Project.getVersionCodeIncrement(): Int {
    val isNightlyBuild = gradle.startParameter.taskNames.any { it.lowercase().contains("nightly") }
    if (!isNightlyBuild) return 0

    return System.getenv("GITHUB_RUN_NUMBER")?.toIntOrNull()
        ?: System.getenv("CI_BUILD_NUMBER")?.toIntOrNull()
        ?: getCommitCountSinceLastCommit()
}

// Compute versionName dynamic bumping for nightly
fun Project.computeVersionName(): String {
    val isNightlyBuild = isNightlyBuild()

    // Static version from Constants.kt
    val baseVersion = Semver.parse(Constants.VERSION_NAME) ?: Semver.of(0, 0, 0)

    return when {
        isNightlyBuild -> {
            // Bump patch for nightly
            val nightlyVersion = Semver.of(
                baseVersion.major,
                baseVersion.minor,
                baseVersion.patch + 1
            )
            "${nightlyVersion}-nightly+git.${getGitCommitHash()}"
        }
        else -> Constants.VERSION_NAME
    }
}

fun Project.isNightlyBuild(): Boolean {
    return gradle.startParameter.taskNames.any { it.lowercase().contains(Constants.NIGHTLY) }
}

// Compute versionCode (static baseline, dynamic bumping for nightly)
fun Project.computeVersionCode(): Int {
    val isNightlyBuild = isNightlyBuild()
    var versionCode = Constants.VERSION_CODE

    if (isNightlyBuild) {
        versionCode += 1 // Patch bump
    }

    return versionCode + getVersionCodeIncremen


# -*- coding: utf-8 -*-
# TencentBlueKing is pleased to support the open source community by making
# 蓝鲸智云 - 用户管理 (bk-user) available.
# Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved.
# Licensed under the MIT License (the "License"); you may not use this file except
# in compliance with the License. You may obtain a copy of the License at
#
#     http://opensource.org/licenses/MIT
#
# 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.
#
# We undertake not to change the open source license (MIT license) applicable
# to the current version of the project delivered to anyone in the future.

from typing import Dict

from pydantic import BaseModel, Field

class AuditObject(BaseModel):
    """审计操作对象相关信息"""

    # 操作对象 ID
    id: str | int
    # 操作对象类型
    type: str
    # 操作对象名称
    name: str = ""
    # 操作行为
    operation: str
    # 操作前数据
    data_before: Dict = Field(default_factory=dict)
    # 操作后数据
    data_after: Dict = Field(default_factory=dict)
    # 操作对象额外信息
    extras: Dict = Field(default_factory=dict)


if GetLocale() ~= "koKR" then
    return
end

---@type l10n
local l10n = QuestieLoader:ImportModule("l10n")

l10n.objectLookup["koKR"] = loadstring([[return {
[31] = "오래된 사자상",
[32] = "가라앉은 상자",
[33] = "잠긴 궤짝",
[34] = "낡은 단지",
[35] = "선장의 사물함",
[36] = "부서진 통",
[41] = "대사의 상자",
[47] = "현상 수배: 부대장 붉은송곳니",
[52] = "구루바시의 몰락",
[54] = "제국의 무덤",
[55] = "반쯤 파먹힌 시체",
[56] = "롤프의 시체",
[57] = "골짜기의 달",
[58] = "방랑자 그리렉",
[59] = "대충 덮인 흙무더기",
[60] = "현상 수배: 가스일조그",
[61] = "낡은 묘비",
[68] = "현상 수배 전단",
[76] = "빈 단지",
[119] = "에이버크롬비의 상자",
[256] = "현상 수배!",
[257] = "수상한 통",
[259] = "반쯤 묻힌 통",
[261] = "부서진 상자",
[263] = "쿠르젠 보급품",
[264] = "쿠르젠 보급품",
[269] = "야벤이 지키고 있는 썬더브루 맥주통",
[270] = "아무도 지키지 않는 썬더브루 맥주통",
[271] = "광부 조합 상자",
[272] = "맥그란의 고기 상자",
[276] = "쉼머위드 바구니",
[287] = "사서 헤로드의 기록",
[288] = "사서 헤로드의 금고",
[290] = "펄브로우의 옷장",
[321] = "틸로아의 눈물",
[324] = "작은 토륨 광맥",
[331] = "대충 덮인 흙더미",
[333] = "고대 유물",
[334] = "고대 유물",
[375] = "티리스팔 호박",
[711] = "현상 수배!"


/* sp_x86_64_asm.S */
/*
 * Copyright (C) 2006-2024 wolfSSL Inc.
 *
 * This file is part of wolfSSL.
 *
 * wolfSSL 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.
 *
 * wolfSSL 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 this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
 */

#ifdef WOLFSSL_USER_SETTINGS
#ifdef WOLFSSL_USER_SETTINGS_ASM
/*
 * user_settings_asm.h is a file generated by the script user_settings_asm.sh.
 * The script takes in a user_settings.h and produces user_settings_asm.h, which
 * is a stripped down version of user_settings.h containing only preprocessor
 * directives. This makes the header safe to include in assembly (.S) files.
 */
#include "user_settings_asm.h"
#else
/*
 * Note: if user_settings.h contains any C code (e.g. a typedef or function
 * prototype), including it here in an assembly (.S) file will cause an
 * assembler failure. See user_settings_asm.h above.
 */
#include "user_settings.h"
#endif /* WOLFSSL_USER_SETTINGS_ASM */
#endif /* WOLFSSL_USER_SETTINGS */

#ifndef HAVE_INTEL_AVX1
#define HAVE_INTEL_AVX1
#endif /* HAVE_INTEL_AVX1 */
#ifndef NO_AVX2_SUPPORT
#define HAVE_INTEL_AVX2
#endif /* NO_AVX2_SUPPORT */

#ifdef WOLFSSL_SP_X86_64_ASM
#ifndef WOLFSSL_SP_NO_2048
#ifndef WOLFSSL_SP_NO_2048
/* Read big endian unsigned byte array into r.
 * Uses the bswap instruction.
 *
 * r  A single precision integer.
 * size  Maximum number of bytes to convert
 * a  Byte array.
 * n  Number of bytes in array to read.
 */
#ifndef __APPLE__
.text
.globl	sp_2048_from_bin_bswap
.type	sp_2048_from_bin_bswap,@function
.align	16
sp_2048_from_bin_bswap:
#else
.section	__TEXT,__text
.globl	_sp_2048_from_bin_bswap
.p2align	4
_sp_2048_from_bin_bswap:
#endif /* __APPLE__ */
        movq	%rdx, %r9
        movq	%rdi, %r10
        addq	%rcx, %r9
        addq	$0x100, %r10
        xorq	%r11, %r11
        jmp	L_2048_from_bin_bswap_64_end
L_2048_from_bin_bswap_64_start


面贵一点，但齐全。而且一个区域一个超市

- A27077: 不错很多超市都在宿舍楼下还有罗森

- A27355: 稍贵

## Q: 学校的收发快递政策怎么样？

- A21567: 可以的，快递站挺多，但开学季经常爆

- A22373: 有三个快递站点

- A23851: 有三个快递站，北二，理工，东区，就看你住哪里咯，都可以收发的

- A25250: 方便

- A27077: 快递分流，会分到一个特别远的快递站

- A27355: 无限制

## Q: 学校里面的共享单车数目与种类如何？

- A21567: 只有一种，一坨的微信小程序扫码用，高峰期容易没车用

- A22373: 电动小黄车

- A23851: 很多，超多，但就一种共享电动车，一般大门到宿舍最多3元一次吧，骑得快1元

- A25250: 1种，10分钟1块钱

- A27077: 多但是维修很不好容易起事故

- A27355: 只有一种，电动小黄车

## Q: 现阶段学校的门禁情况如何？

- A21567: 晚上十一点锁门（但是可以翻墙

- A22373: 刷脸，识别不精确，可以尾随

- A23851: 大一管的比较严要10点半，但也就是手机签个到，签完了没人管你去哪玩，校门可能11点半会关但可以翻墙，也可以走另一个大门，就是可能会被记

- A25250: 晚上10点半关小门。但可以刷脸走大门。（走大门有概率被抓看专业和导员）

- A27077: 刷脸进

- A27355: 刷脸，但可以翻墙

## Q: 宿舍晚上查寝吗，封寝吗，晚归能回去吗？

- A21567: 查，还算松，晚归翻墙罢

- A22373: 11点关大铁门，可以翻墙。查寝

- A23851: 查寝也就学生会查，很水的，不封，哎呀你都可以翻墙的没事的，管的不严反正

- A25250: 查寝，网络查寝。晚归有办法回

- A27077: 十一点以后不让进去很不好回去

- A27355: 平常11点，周五六11:30，关宿舍门，但可以翻墙。要查寝

## 自由补充部分

A21567: 学费贵贵贵，有这个钱可以考虑出国了

学风差

（宿舍是真不错啊

***

A22373: 海南的美


x19, #0xdf3b, lsl 32
	movk	x19, #0x29b, lsl 48
	movk	x16, #0xa000, lsl 48
	movk	x20, #0x200, lsl 48
	and	x16, x16, x25
	and	x17, x17, x25
	and	x19, x19, x25
	and	x20, x20, x25
	adds	x5, x5, x16
	adcs	x6, x6, x17
	adcs	x7, x7, x19
	adcs	x8, x8, xzr
	adc	x9, x9, x20
	#   Move bits 252-376 to own registers
	lsl	x9, x9, #4
	orr	x9, x9, x8, lsr 60
	lsl	x8, x8, #4
	mov	x25, #15
	orr	x8, x8, x7, lsr 60
	bic	x7, x7, x25, lsl 60
	# Sub product of top 2 words and order
	#   * -5812631a5cf5d3ed
	mov	x26, #0x2c13
	movk	x26, #0xa30a, lsl 16
	movk	x26, #0x9ce5, lsl 32
	movk	x26, #0xa7ed, lsl 48
	mul	x16, x8, x26
	umulh	x17, x8, x26
	mul	x19, x9, x26
	umulh	x20, x9, x26
	adds	x4, x4, x16
	adcs	x5, x5, x17
	adc	x12, xzr, xzr
	adds	x5, x5, x19
	adc	x12, x12, x20
	#   * -14def9dea2f79cd7
	mov	x26, #0x6329
	movk	x26, #0x5d08, lsl 16
	movk	x26, #0x621, lsl 32
	movk	x26, #0xeb21, lsl 48
	mul	x16, x8, x26
	umulh	x17, x8, x26
	mul	x19, x9, x26
	umulh	x20, x9, x26
	adds	x5, x5, x16
	adcs	x6, x6, x17
	adc	x13, xzr, xzr
	adds	x6, x6, x19
	adc	x13, x13, x20
	#   Add overflows at 2 * 64
	mov	x26, #15
	bic	x7, x7, x26, lsl 60
	ad


     v.add("SHOW_DOCUMENT");

    if (0 != (whatToShow & DTMFilter.SHOW_DOCUMENT_FRAGMENT))
      v.add("SHOW_DOCUMENT_FRAGMENT");

    if (0 != (whatToShow & DTMFilter.SHOW_DOCUMENT_TYPE))
      v.add("SHOW_DOCUMENT_TYPE");

    if (0 != (whatToShow & DTMFilter.SHOW_ELEMENT))
      v.add("SHOW_ELEMENT");

    if (0 != (whatToShow & DTMFilter.SHOW_ENTITY))
      v.add("SHOW_ENTITY");

    if (0 != (whatToShow & DTMFilter.SHOW_ENTITY_REFERENCE))
      v.add("SHOW_ENTITY_REFERENCE");

    if (0 != (whatToShow & DTMFilter.SHOW_NOTATION))
      v.add("SHOW_NOTATION");

    if (0 != (whatToShow & DTMFilter.SHOW_PROCESSING_INSTRUCTION))
      v.add("SHOW_PROCESSING_INSTRUCTION");

    if (0 != (whatToShow & DTMFilter.SHOW_TEXT))
      v.add("SHOW_TEXT");

    int n = v.size();

    for (int i = 0; i < n; i++)
    {
      if (i > 0)
        System.out.print(" | ");

      System.out.print(v.get(i));
    }

    if (0 == n)
      System.out.print("empty whatToShow: " + whatToShow);

    System.out.println();
  }

  /**
   * Two names are equal if they and either both are null or
   * the name t is wild and the name p is non-null, or the two
   * strings are equal.
   *
   * @param p part string from the node.
   * @param t target string, which may be {@link #WILD}.
   *
   * @return true if the strings match according to the rules of this method.
   */
  private static final boolean subPartMatch(String p, String t)
  {

    // boolean b = (p == t) || ((null != p) && ((t == WILD) || p.equals(t)));
    // System.out.println("subPartMatch - p: "+p+", t: "+t+", result: "+b);
    return (p == t) || ((null != p) && ((t == WILD) || p.equals(t)));
  }

  /**
   * This is temporary to patch over Xerces issue with representing DOM
   * namespaces as "".
   *
   * @param p part string from the node, which may represent the null namespace
   *        as null or as "".
   * @param t target string, which may be {@link #WILD}.
   *
   * @return true if the strings match according to the rules of this method.
   */
  private static final boolean subPartMatchNS(String p, String t)
  {

    return (p == t)
           || ((null != p)
               && ((p.length() > 0)
                   ? ((t == WILD) || p.equals(t)) : null == t));
  }

  /**
   * Tell what the test score is for the given node.
   *
   *
   * @param xctxt XPath runtime context.
   * @param context The node being tested.
   *
   * @return {@link com.sun.org.apache.xpath.internal.patterns.NodeTest#SCORE_NODETEST},
   *         {@link com.sun.org.apache.xpath.internal.patterns.NodeTest#SCORE_NONE},
   *         {@link com.sun.org.apache.xpath.internal.patterns.NodeTest#SCORE_NSWILD},
   *         {@link com.sun.org.apache.xpath.internal.patterns.NodeTest#SCORE_QNAME}, or
   *         {@link com.sun.org.apache.xpath.internal.patterns.NodeTest#SCORE_OTHER}.
   *