JVBiasg()*dBgi + M.getJVBiasa()*dBai);   //this line includes correction term of bias change
    // residual error of Delta Rotation measurement
    Sophus::SO3 dR_dbg = Sophus::SO3::exp(M.getJRBiasg()*dBgi);
    Sophus::SO3 rRij = (dRij * dR_dbg).inverse() * RiT * Rj;
    Vector3d rPhiij = rRij.log();

    Vector9d err;  // typedef Matrix<double, D, 1> ErrorVector; ErrorVector _error; D=9
    err.setZero();

    // 9-Dim error vector order:
    // position-velocity-rotation
    // rPij - rVij - rPhiij
    err.segment<3>(0) = rPij;       // position error
    err.segment<3>(3) = rVij;       // velocity error
    err.segment<3>(6) = rPhiij;     // rotation phi error

    _error = err;

    //Test log
    if( (NSPVRi.Get_BiasGyr()-NSBiasi.Get_BiasGyr()).norm()>1e-6 || (NSPVRi.Get_BiasAcc()-NSBiasi.Get_BiasAcc()).norm()>1e-6 )
    {
        std::cerr<<"id pvri/pvrj/biasi: "<<vPVRi->id()<<"/"<<vPVRj->id()<<"/"<<vBiasi->id()<<std::endl;
        std::cerr<<"bias gyr not equal for PVR/Bias vertex"<<std::endl<<NSPVRi.Get_BiasGyr().transpose()<<" / "<<NSBiasi.Get_BiasGyr().transpose()<<std::endl;
        std::cerr<<"bias acc not equal for PVR/Bias vertex"<<std::endl<<NSPVRi.Get_BiasAcc().transpose()<<" / "<<NSBiasi.Get_BiasAcc().transpose()<<std::endl;
    }

}

void EdgeNavStatePVR::linearizeOplus()
{
    //
    const VertexNavStatePVR* vPVRi = static_cast<const VertexNavStatePVR*>(_vertices[0]);
    const VertexNavStatePVR* vPVRj = static_cast<const VertexNavStatePVR*>(_vertices[1]);
    const VertexNavStateBias* vBiasi = static_cast<const VertexNavStateBias*>(_vertices[2]);

    // terms need to computer error in vertex i, except for bias error
    const NavState& NSPVRi = vPVRi->estimate();
    Vector3d Pi = NSPVRi.Get_P();
    Vector3d Vi = NSPVRi.Get_V();
    Matrix3d Ri = NSPVRi.Get_RotMatrix();
    // bias
    const NavState& NSBiasi = vBiasi->estimate();
    Vector3d dBgi = NSBiasi.Get_dBias_Gyr();
    //    Vector3d dBai = NSBiasi.Get_dBias_Acc();

    // terms need to computer error in vertex j, except for bias error
    const NavState& NSPVRj = vPVRj->estimate();
    Vector3d Pj = NSPVRj.Get_P();
    Vector3d Vj = NSPVRj.Get_V();
    Matrix3d Rj = NSPVRj.Get_RotMatrix();

    // IMU Preintegration measurement
    const IMUPreintegrator& M = _measurement;
    double dTij = M.getDeltaTime


C 00016D6C  40 80 03 B4 */	bge lbl_8001A320
/* 80019F70 00016D70  38 05 00 01 */	addi r0, r5, 1
/* 80019F74 00016D74  7C BE 2B 78 */	mr r30, r5
/* 80019F78 00016D78  50 06 2E B4 */	rlwimi r6, r0, 5, 0x1a, 0x1a
/* 80019F7C 00016D7C  38 80 00 01 */	li r4, 1
/* 80019F80 00016D80  98 DF 00 0C */	stb r6, 0xc(r31)
/* 80019F84 00016D84  88 1F 00 0C */	lbz r0, 0xc(r31)
/* 80019F88 00016D88  54 19 DF FE */	rlwinm r25, r0, 0x1b, 0x1f, 0x1f
/* 80019F8C 00016D8C  48 00 03 94 */	b lbl_8001A320
/* 80019F90 00016D90  3C A0 00 04 */	lis r5, 0x00040001@ha
/* 80019F94 00016D94  39 00 00 00 */	li r8, 0
/* 80019F98 00016D98  38 A5 00 01 */	addi r5, r5, 0x00040001@l
/* 80019F9C 00016D9C  7F 45 28 38 */	and r5, r26, r5
/* 80019FA0 00016DA0  7F 67 40 38 */	and r7, r27, r8
/* 80019FA4 00016DA4  7C A6 42 78 */	xor r6, r5, r8
/* 80019FA8 00016DA8  7C E5 42 78 */	xor r5, r7, r8
/* 80019FAC 00016DAC  7C C5 2B 79 */	or. r5, r6, r5
/* 80019FB0 00016DB0  41 82 00 30 */	beq lbl_80019FE0
/* 80019FB4 00016DB4  88 7F 00 0C */	lbz r3, 0xc(r31)
/* 80019FB8 00016DB8  54 65 D7 BF */	rlwinm. r5, r3, 0x1a, 0x1e, 0x1f
/* 80019FBC 00016DBC  41 82 03 64 */	beq lbl_8001A320
/* 80019FC0 00016DC0  38 05 FF FF */	addi r0, r5, -1
/* 80019FC4 00016DC4  7C BE 2B 78 */	mr r30, r5
/* 80019FC8 00016DC8  50 03 36 32 */	rlwimi r3, r0, 6, 0x18, 0x19
/* 80019FCC 00016DCC  38 80 00 01 */	li r4, 1
/* 80019FD0 00016DD0  98 7F 00 0C */	stb r3, 0xc(r31)
/* 80019FD4 00016DD4  88 1F 00 0C */	lbz r0, 0xc(r31)
/* 80019FD8 00016DD8  54 19 D7 BE */	rlwinm r25, r0, 0x1a, 0x1e, 0x1f
/* 80019FDC 00016DDC  48 00 03 44 */	b lbl_8001A320
lbl_80019FE0:
/* 80019FE0 00016DE0  3C C0 00 08 */	lis r6, 0x00080002@ha
/* 80019FE4 00016DE4  7C E5 42 78 */	xor r5, r7, r8
/* 80019FE8 00016DE8  38 C6 00 02 */	addi r6, r6, 0x00080002@l
/* 80019FEC 00016DEC  7


			future: false,
			isFirstStep: true
		})).to.equal(INFINITY)
	})

	it('should support date argument', () => {
		expect(getTimeToNextUpdate(new Date(4 * 60 * 1000), {
			minTime: 60
		}, {
			now: 0,
			future: true,
			isFirstStep: true,
			nextStep: {}
		})).to.equal(3 * 60 * 1000 + 1)
	})

	it('should return this step\'s "minTime" timestamp (future)', () => {
		expect(getTimeToNextUpdate(4 * 60 * 1000, {
			minTime: 60,
			format: () => ''
		}, {
			now: 0,
			future: true,
			isFirstStep: true,
			nextStep: {
				format: () => ''
			}
		})).to.equal(3 * 60 * 1000 + 1)
	})

	it('should return undefined when there is a next step and time to next update can not be reliably determined (formatAs) (past)', () => {
		expect(getTimeToNextUpdate(-4 * 60 * 1000, {
			minTime: 60,
			formatAs: 'minute'
		}, {
			now: 0,
			future: false,
			isFirstStep: true,
			nextStep: {
				formatAs: 'unknown-time-unit'
			}
		})).to.be.undefined
	})

	it('should get time to next update (no next step) (past)', () => {
		getTimeToNextUpdate(-4 * 60 * 1000, {
			formatAs: 'minute',
			minTime: 59.5
		}, {
			now: 0,
			future: false,
			isFirstStep: true
		}).should.equal(0.5 * 60 * 1000)
	})

	it('should get time to next update (no next step) (future)', () => {
		getTimeToNextUpdate(4 * 60 * 1000, {
			formatAs: 'minute',
			minTime: 59.5
		}, {
			now: 0,
			future: true,
			isFirstStep: true
		}).should.equal(0.5 * 60 * 1000 + 1)
	})

	it('should get time to next update (has prev/next step without `minTime`) (future)', () => {
		getTimeToNextUpdate(4 * 60 * 1000, {
			formatAs: 'minute',
			minTime: 59.5
		}, {
			now: 0,
			future: true,
			isFirstStep: true,
			nextStep: {
				formatAs: 'hour',
				test: () => false
			}
		}).should.equal(0.5 * 60 * 1000 + 1)
	})

	it('should get time to next update (has `getTimeToNextUpdate`) (past)', () => {
		getTimeToNextUpdate(-4 * 60 * 1000, {
			formatAs: 'minute',
			minTime: 59.5,
			getTimeToNextUpdate: () => 0.25 * 60 * 1000
		}, {
			now: 0,
			future: false,
			isFirstStep: true
		}).should.equal(0.25 * 60 * 1000)
	})

	it('should get time to next update (has `getTimeToNextUpdate`) (future)', () => {
		getTimeToNextUpdate(4 * 60 * 1000, {
			formatAs: 'minute',
			minTime: 59.5,
			getTimeToNextUpdate: () => 0.25 * 60 * 1000
		}, {
			now: 0,
			future: true,
			isFirstStep: true
		}).should.equal(0.25 * 60 * 1000)
	})

	it('should get time to next update (has both unit and prev/next steps with `minTime`) (returns time to "minTime" of next step) (past)', () => {
		getTimeToNextUpdate(-59 * 60 * 1000, {
			formatAs: 'minute',
			minTime: 59.5
		}, {
			now: 0,
			future: false,
			isFirstStep: true,
			nextStep: {
				formatAs: 'hour',
				minTime: 59.5 * 60
			}
		}).should.equal(0.5 * 60 * 1000)
	})

	it('should


 = g_status.line_buff_len;
   c0 = c1 = c2 = 0;
   if (rcol < len)
      c1 = get_g_flag( b[rcol], gc );
   if (rcol > 0 && rcol-1 < len)
      c0 = get_g_flag( b[rcol-1], gc );
   if (rcol+1 < len)
      c2 = get_g_flag( b[rcol+1], gc );

   if (d == G_UP || d == G_DN) {
      c1 |= d;
      if (c0 & G_RT) c1 |= G_LF;
      if (c2 & G_LF) c1 |= G_RT;
      if (c1 == d)   c1  = G_V;

   } else {
      if (c1 & G_H) {
         c1 |= ~d;
         if (!(c0 & G_RT)) c1 &= ~G_LF;
         if (!(c2 & G_LF)) c1 &= ~G_RT;
      }
   }

   if (c1 != 0) {
      if (rcol >= len) {
         memset( b + len, ' ', rcol - len );
         g_status.line_buff_len = rcol + 1;
      }
      b[rcol] = get_g_char( (char)c1, gc );
      win->ll->type |= DIRTY;
      win->file_info->dirty = GLOBAL;
      show_changed_line( win );
   }
}

/*
 * Name:    set_horz_g_char
 * Purpose: draw a horizontal line
 * Author:  Jason Hood
 * Date:    October 21, 1999
 * Passed:  win:  pointer to current window
 *          d:    direction to draw
 * Notes:   call before the movement. Have to treat block graphics separately.
 */
static void set_horz_g_char( TDE_WIN *win, char d )
{
int  rcol = win->rcol;
const char *gc = graphic_char[abs( mode.graphics ) - 1];
text_ptr b = g_status.line_buff;
char f0, f1, f2, t0, t1, t2;
text_ptr s;
int len;
int o;

   copy_line( win->ll, win, TRUE );
   len = g_status.line_buff_len;
   f0 = f1 = f2 = 0;
   t0 = t1 = t2 = 0;

   o = (d == G_LF) ? -1 : 1;

   if (rcol < len)
      f1 = get_g_flag( b[rcol], gc );
   if (rcol+o < len)
      t1 = get_g_flag( b[rcol+o], gc );
   if (win->rline > 1) {
      len = win->ll->prev->len;
      s = detab_a_line( win->ll->prev->line, &len,
                        win->file_info->inflate_tabs,
                        win->file_info->ptab_size );
      if (rcol < len)
         f0 = get_g_flag( s[rcol], gc );
      if (rcol+o < len)
         t0 = get_g_flag( s[rcol+o], gc );
   }
   len = win->ll->next->len;
   if (len != EOF) {
      s = detab_a_line( win->ll->next->line, &len,
                        win->file_info->inflate_tabs,
                        win->file_info->ptab_size );
      if (rcol < len)
         f2 = get_g_flag( s[rcol], gc );
      if (rcol+o < len) {
         t2 = get_g_flag( s[rcol+o], gc );
         if (gc == graphic_char[5] && t2 == G_H)
            t2 |= G_UP;
      }
   }

   f1 |= d;
   if (f0 & G_DN) f1 |= G_UP;
   if (f2 & G_UP) f1 |= G_DN;
   if (f1 == d)   f1  = G_H;

   if (rcol >= g_status.line_buff_len) {
      memset( b + g_status.line_buff_len, ' ',
              rcol - g_status.line_buff_len );
      g_status.line_buff_len = rcol + 1;
   }
   b[rcol] = get_g_char( f1, gc );

   if (t1 & G_V) {
      t1 |= (d == G_LF) ? G_RT : G_LF;
      if (!(t0 & G_DN)) t1 &= ~G_UP;
      if (!(t2 & G_UP)) t1 &= ~G_DN;
      b[rcol+o] = get_g_char( t1, gc );
   }
   win->ll->type |= DIRTY;
   win->file_info->modified = TRUE;
   win->file_info->dirty = GLOBAL;
   show_changed_line( win );
}


# It will keep only those left side entities which will be matched with the right side
import pandas as pd

League01 = {
    "Name": ["Babar Azam", "Saim Ayub", "Sahibzada Farhan", "Salman Agha", None, "Irfan Khan Niazi",
             "Shadab Khan", "Shaheen Afridi", "Haris Rauf", "Muhammad Hussnain", "Sufyan Muqeem"],
    "Age": [30, 21, 19, 30, 32, 44, 30, 24, 30, 21, 24],
    "Score": [56, 17, 45, 67, 12, 45, 12, 3, 4, 0, 0],
    "Wickets": [0, 3, 0, 5, 78, 12, 56, 78, 89, 12, 89]
}

League02 = {
    "Name": ["Babar Azam", "Saim Ayub", "Muhammaad Haris", "Salman Agha", None, "Irfan Khan Niazi",
             "Shadab Khan", "Shaheen Afridi", "Haris Rauf", "Naseem Shah", "Sufyan Muqeem"],
    "Age": [30, 21, 19, 30, 32, 44, 30, 24, 30, 21, 24],
    "Score": [56, 34, 34, 57, 24, 67, 34, 57, 34, 23, 56],
    "Wickets": [12, 34, 56, 67, 79, 45, 78, 55, 34, 68, 78]
}

df1 = pd.DataFrame(League01)
df2 = pd.DataFrame(League02)

# Merge on 'Name'
df_merged = pd.merge(df1, df2, on="Name", how="left")

print(df_merged)


        try!(writeln!(dest, "/* automatically generated by rust-bindgen */"));
        try!(writeln!(dest, ""));
        try!(writeln!(dest, "#include \"{}\"", input_header));
        try!(writeln!(dest, ""));

        let type_items = ctx.whitelisted_items()
            .map(|id| ctx.resolve_item(id))
            .filter(|item| {
                // We only want type items.
                if let Some(ty) = item.kind().as_type() {
                    // However, we don't want anonymous types, as we can't
                    // generate dummy uses for them.
                    ty.name().is_some() &&
                        // Nor do we want builtin types or named template type
                        // arguments. Again, we can't generate dummy uses for
                        // these.
                        !ty.is_builtin_or_named() &&
                        // And finally, we won't be creating any dummy
                        // instantiations, so ignore template declarations and
                        // instantiations.
                        item.all_template_params(ctx).is_none()
                } else {
                    false
                }
            })
            .map(|item| namespaced_name(ctx, item))
            .enumerate();

        for (idx, name) in type_items {
            try!(writeln!(dest, "void dummy{}({}*) {{ }}", idx, name));
        }

        Ok(())
    })
}
use std::io;
use thiserror::Error;
use zexe_algebra::SerializationError;

use crate::ElementType;
use zexe_r1cs_core::SynthesisError;

/// Errors that might occur during deserialization.
#[derive(Debug, Error)]
pub enum Error {
    #[error("Disk IO error: {0}")]
    IoError(#[from] io::Error),
    #[error("Serialization error in Zexe: {0}")]
    ZexeSerializationError(#[from] SerializationError),
    #[error("Got point at infinity")]
    PointAtInfinity,
    #[error("Index of {0} must not exceed {1} (got {2}.")]
    PositionError(ElementType, usize, usize),
    #[error("Error during verification: {0}")]
    VerificationError(#[from] VerificationError),
    #[error("Invalid variable length: expected {expected}, got {got}")]
    InvalidLength { expected: usize, got: usize },
    #[error("Chunk does not have a min and max")]
    InvalidChunk,
    #[error("R1CS Error: {0}")]
    SynthesisError(#[from] SynthesisError),
    #[error("Phase 2 Error: {0}")]
    Phase2Error(#[from] Phase2Error),
    #[error("Crossbeam error during while joining the thread")]
    CrossBeamError,
}

impl From<Box<dyn std::any::Any + Send>> for Error {
    fn from(_: Box<dyn std::any::Any + Send>) -> Error {
        Error::CrossBeamError
    }
}

#[derive(Debug, Error, PartialEq)]
pub enum Phase2Error {
    #[error("Parameter should not change: {0}")]
    BrokenInvariant(InvariantKind),
    #[error("Length should not change")]
    InvalidLength,
    #[error("There were no contributions found")]
    NoContributions,
    #[error("The Transcript was not consistent")]
    InvalidTranscript,
}

#[derive(PartialEq, Debug, Clone)]
pub enum InvariantKind {
    Contributions,
    CsHash,
    AlphaG1,
    BetaG1,
    BetaG2,
    GammaAbcG1,
    GammaG2,
    DeltaG1,
    Transcript,
    AlphaG1Query,
    BetaG1Query,
    BetaG2Query,
}

use std::fmt;
impl fmt:


966184235653CB9B4D33B149CDA831DF_SByte_t9070AEA2966184235653CB9B4D33B149CDA831DF (Il2CppMethodPointer methodPointer, const RuntimeMethod* methodMetadata, void* obj, void** args)
{
	typedef void (*Func)(void* obj, int8_t p1, int8_t p2, int8_t p3, int8_t p4, int8_t p5, int8_t p6, int8_t p7, int8_t p8, const RuntimeMethod* method);
	((Func)methodPointer)(obj, *((int8_t*)args[0]), *((int8_t*)args[1]), *((int8_t*)args[2]), *((int8_t*)args[3]), *((int8_t*)args[4]), *((int8_t*)args[5]), *((int8_t*)args[6]), *((int8_t*)args[7]), methodMetadata);
	return NULL;
}

void* RuntimeInvoker_TrueVoid_t22962CB4C05B1D89B55A6E1139F0E87A90987017_SByte_t9070AEA2966184235653CB9B4D33B149CDA831DF_SByte_t9070AEA2966184235653CB9B4D33B149CDA831DF_SByte_t9070AEA2966184235653CB9B4D33B149CDA831DF_SByte_t9070AEA2966184235653CB9B4D33B149CDA831DF (Il2CppMethodPointer methodPointer, const RuntimeMethod* methodMetadata, void* obj, void** args)
{
	typedef void (*Func)(void* obj, int8_t p1, int8_t p2, int8_t p3, int8_t p4, const RuntimeMethod* method);
	((Func)methodPointer)(obj, *((int8_t*)args[0]), *((int8_t*)args[1]), *((int8_t*)args[2]), *((int8_t*)args[3]), methodMetadata);
	return NULL;
}

void* RuntimeInvoker_TrueVoid_t22962CB4C05B1D89B55A6E1139F0E87A90987017_SByte_t9070AEA2966184235653CB9B4D33B149CDA831DF_VoidU2A_t3A9D5EB5A83DC9C93DF2C4D6EA67B0F5E885889A_VoidU2A_t3A9D5EB5A83DC9C93DF2C4D6EA67B0F5E885889A (Il2CppMethodPointer methodPointer, const RuntimeMethod* methodMetadata, void* obj, void** args)
{
	typedef void (*Func)(void* obj, int8_t p1, void* p2, void* p3, const RuntimeMethod* method);
	((Func)methodPointer)(obj, *((int8_t*)args[0]), (void*)args[1], (void*)args[2], methodMetadata);
	return NULL;
}

void* RuntimeInvoker_TrueInt32_t585191389E07734F19F3156FF88FB3EF4800D102_RuntimeObject_Int32_t585191389E07734F19F3156FF88FB3EF4800D102_SByte_t9070AEA2966184235653CB9B4D33B149CDA831DF (Il2CppMethodPointer methodPointer, const RuntimeMethod* methodMetadata, void* obj, void** args)
{
	typedef int32_t (*Func)(void* obj, RuntimeObject * p1, int32_t p2, int8_t p3, const RuntimeMethod* method);
	int32_t ret = ((Func)methodPointer)(obj, (RuntimeObject *)args[0], *((int32_t


1] = specifiedDomain[1](dataDomain[1]);\n    } else {\n        domain[1] = dataDomain[1];\n    }\n    /* eslint-enable prefer-destructuring */ return domain;\n};\n/**\n * Calculate the size between two category\n * @param  {Object} axis  The options of axis\n * @param  {Array}  ticks The ticks of axis\n * @param  {Boolean} isBar if items in axis are bars\n * @return {Number} Size\n */ var getBandSizeOfAxis = function getBandSizeOfAxis(axis, ticks, isBar) {\n    // @ts-expect-error we need to rethink scale type\n    if (axis && axis.scale && axis.scale.bandwidth) {\n        // @ts-expect-error we need to rethink scale type\n        var bandWidth = axis.scale.bandwidth();\n        if (!isBar || bandWidth > 0) {\n            return bandWidth;\n        }\n    }\n    if (axis && ticks && ticks.length >= 2) {\n        var orderedTicks = lodash_sortBy__WEBPACK_IMPORTED_MODULE_12___default()(ticks, function(o) {\n            return o.coordinate;\n        });\n        var bandSize = Infinity;\n        for(var i = 1, len = orderedTicks.length; i < len; i++){\n            var cur = orderedTicks[i];\n            var prev = orderedTicks[i - 1];\n            bandSize = Math.min((cur.coordinate || 0) - (prev.coordinate || 0), bandSize);\n        }\n        return bandSize === Infinity ? 0 : bandSize;\n    }\n    return isBar ? undefined : 0;\n};\n/**\n * parse the domain of a category axis when a domain is specified\n * @param   {Array}        specifiedDomain  The domain specified by users\n * @param   {Array}        calculatedDomain The domain calculated by dateKey\n * @param   {ReactElement} axisChild        The axis ReactElement\n * @returns {Array}        domains\n */ var parseDomainOfCategoryAxis = function parseDomainOfCategoryAxis(specifiedDomain, calculatedDomain, axisChild) {\n    if (!specifiedDomain || !specifiedDomain.length) {\n        return calculatedDomain;\n    }\n    if (lodash_isEqual__WEBPACK_IMPORTED_MODULE_11___default()(specifiedDomain, lodash_get__WEBPACK_IMPORTED_MODULE_7___default()(axisChild, \"type.defaultProps.domain\"))) {\n        return calculatedDomain;\n    }\n    return specifiedDomain;\n};\nvar getTooltipItem = function getTooltipItem(graphicalItem, payload) {\n    var defaultedProps = graphicalItem.type.defaultProps ? _objectSpread(_objectSpread({}, graphicalItem.type.defaultProps), graphicalItem.props) : graphicalItem.pr


er Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License".
  </p>
 </body>
</html>
<html>
 <head>
  <title>
   中央首长接见宁夏军区及“总指挥部”等组织代表时的讲话 - 周恩来, 康生 - 1967-12-29 - CCRD 中国当代政治运动史数据库
  </title>
  <link href="../../../../Emblem_of_the_PCP-Shining_Path.svg.ico" rel="icon" type="image/x-icon"/>
 </head>
 <body>
  <meta content="中央首长接见宁夏军区及“总指挥部”等组织代表时的讲话" property="title"/>
  <meta content="1967-12-29" property="date"/>
  <meta content="周恩来, 康生" property="authors"/>
  <script type="application/ld+json">
   {"title": "\u4e2d\u592e\u9996\u957f\u63a5\u89c1\u5b81\u590f\u519b\u533a\u53ca\u201c\u603b\u6307\u6325\u90e8\u201d\u7b49\u7ec4\u7ec7\u4ee3\u8868\u65f6\u7684\u8bb2\u8bdd", "date": "1967-12-29", "authors": ["\u5468\u6069\u6765", "\u5eb7\u751f"], "contents": [{"text": "\u4e2d\u592e\u9996\u957f\u63a5\u89c1\u5b81\u590f\u519b\u533a\u53ca\u201c\u603b\u6307\u6325\u90e8\u201d\u7b49\u7ec4\u7ec7\u4ee3\u8868\u65f6\u7684\u8bb2\u8bdd", "type": "title"}, {"text": ["\u5468\u6069\u6765", "\u5eb7\u751f"], "type": "authors"}, {"text": "\u3016\u65f6\u95f4\uff1a\u4e00\u4e5d\u516d\u4e03\u5e74\u5341\u4e8c\u6708\u4e8c\u5341\u4e5d\u65e5\u665a\u516b\u65f6\u5341\u4e94\u5206\u81f3\u4e5d\u65f6\u56db\u5341\u4e94\u5206\uff0c\u5730\u70b9\uff1a\u4eba\u6c11\u5927\u4f1a\u5802\u5b89\u5fbd\u5385\u3002\u4e2d\u592e\u9996\u957f\u63a5\u89c1\u4e86\u5b81\u590f\u519b\u533a\u603b\u6307\u6325\u90e8\u3001\u4e09\u53f8\u3001\u603b\u53f8\u3001\u7b79\u9769\u9020\u4ee3\u8868\u3002\u53c2\u52a0\


* 80322530 0031F330  81 9F 00 00 */	lwz r12, 0(r31)
/* 80322534 0031F334  81 8C 00 74 */	lwz r12, 0x74(r12)
/* 80322538 0031F338  7D 89 03 A6 */	mtctr r12
/* 8032253C 0031F33C  4E 80 04 21 */	bctrl
/* 80322540 0031F340  80 C3 00 00 */	lwz r6, 0(r3)
/* 80322544 0031F344  38 9D 00 2C */	addi r4, r29, 0x2c
/* 80322548 0031F348  80 03 00 04 */	lwz r0, 4(r3)
/* 8032254C 0031F34C  38 A1 00 F8 */	addi r5, r1, 0xf8
/* 80322550 0031F350  90 C1 01 10 */	stw r6, 0x110(r1)
/* 80322554 0031F354  90 01 01 14 */	stw r0, 0x114(r1)
/* 80322558 0031F358  80 03 00 08 */	lwz r0, 8(r3)
/* 8032255C 0031F35C  38 61 01 10 */	addi r3, r1, 0x110
/* 80322560 0031F360  90 01 01 18 */	stw r0, 0x118(r1)
/* 80322564 0031F364  48 0A FB 59 */	bl PSVECSubtract
/* 80322568 0031F368  38 61 00 F8 */	addi r3, r1, 0xf8
/* 8032256C 0031F36C  48 0A FB ED */	bl PSVECMag
/* 80322570 0031F370  C0 1D 00 10 */	lfs f0, 0x10(r29)
/* 80322574 0031F374  C0 5D 00 48 */	lfs f2, 0x48(r29)
/* 80322578 0031F378  EF 40 08 2A */	fadds f26, f0, f1
/* 8032257C 0031F37C  C0 02 D9 14 */	lfs f0, lbl_805E4014@sda21(r2)
/* 80322580 0031F380  EF 5A 10 24 */	fdivs f26, f26, f2
/* 80322584 0031F384  FC 1A 00 40 */	fcmpo cr0, f26, f0
/* 80322588 0031F388  40 81 00 0C */	ble lbl_80322594
/* 8032258C 0031F38C  FF 60 00 90 */	fmr f27, f0
/* 80322590 0031F390  48 00 00 08 */	b lbl_80322598
lbl_80322594:
/* 80322594 0031F394  FF 60 D0 90 */	fmr f27, f26
lbl_80322598:
/* 80322598 0031F398  38 61 01 28 */	addi r3, r1, 0x128
/* 8032259C 0031F39C  38 9D 00 2C */	addi r4, r29, 0x2c
/* 803225A0 0031F3A0  38 A1 00 EC */	addi r5, r1, 0xec
/* 803225A4 0031F3A4  48 0A FB 19 */	bl PSVECSubtract
/* 803225A8 0031F3A8  FC 20 D8 90 */	fmr f1, f27
/* 803225AC 0031F3AC  38 61 00 EC */	addi r3, r1, 0xec
/* 803225B0 0031F3B0  7C 64 1B 78 */	mr r4, r3
/* 803225B4 0031


Context.current
            if (darkTheme) dynamicDarkColorScheme(context) else dynamicLightColorScheme(context)
        }

        darkTheme -> DarkColorScheme
        else -> LightColorScheme
    }

    MaterialTheme(
        colorScheme = colorScheme,
        typography = Typography,
        content = content
    )
}/*
 * Copyright 2024, Serhii Yaremych
 * SPDX-License-Identifier: MIT
 */

@file:Suppress("unused")

package dev.serhiiyaremych.imla.renderer

import androidx.compose.ui.unit.IntSize
import dev.serhiiyaremych.imla.renderer.opengl.OpenGLTexture2D
import java.nio.Buffer

internal interface Texture {
    enum class Target {
        TEXTURE_2D,
        TEXTURE_EXTERNAL_OES,
        //TEXTURE_2D_ARRAY // do I need it?
    }

    enum class ImageFormat {
        None,
        A8,
        R8,
        R16F,
        RGB8,
        RGBA8,
        RGB10_A2,
        DEPTH24STENCIL8
    }

    data class Specification(
        val size: IntSize = IntSize(1, 1),
        val format: ImageFormat = ImageFormat.RGBA8,
        val generateMips: Boolean = false,
        var flipTexture: Boolean = false,
        val mipmapFiltering: Boolean = false
    )

    val id: Int
    val target: Target
    val width: Int
    val height: Int
    val flipTexture: Boolean
    val specification: Specification

    fun bind(slot: Int = 0)
    fun setData(data: Buffer)
    fun isLoaded(): Boolean
    fun destroy()
}

internal abstract class Texture2D : Texture {

    companion object {
        fun create(target: Texture.Target, specification: Texture.Specification): Texture2D {
            return OpenGLTexture2D(target, specification)
        }

        fun create(
            target: Texture.Target,
            textureId: Int,
            specification: Texture.Specification
        ): Texture2D {
            return OpenGLTexture2D(textureId, target, specification)
        }
    }

    abstract fun generateMipMaps()

    override fun equals(other: Any?): Boolean {
        if (this === other) return true
        if (javaClass != other?.javaClass) return false
        other as Texture2D
        return id == other.id
    }

    override fun hashCode(): Int {
        return id.hashCode()
    }
}/*
 * Copyright 2024, Serhii Yaremych
 * SPDX-License-Identifier: MIT
 */

@file:Suppress("unused")

package dev.serhiiyaremych.imla.renderer

import androidx.compose.ui.graphics.Color
import dev.serhiiyaremych.imla.renderer.framebuffer.Bind

internal interface RendererApi {
    val colorBufferBit: Int
    val linearTextureFilter: Int

    enum class Api { None, OpenGL }

    fun init()
    fun setClearColor(color: Color)
    fun clear()
    fun drawIndexed(vertexArray: VertexArray, indexCount: Int = 0)
    fun setViewPort(x: Int, y: Int, width: Int, height: Int)
    fun disableDepthTest()
    fun colorMask(red: Boolean, green: Boolean, blue: Boolean, alpha: Boolean)
    fun enableBlending()
    fun disableBlending()
    fun bindDefaultFramebuffer(bind: Bind)
    fun bindDefaultProgram()
    fun blitFramebuffer(
        srcX0: Int,
        srcY0: Int,


{
  ASSERT_FALSE(test_device()->le_scan_state().enabled);

  // Session will be destroyed in callback, stopping scan.
  discovery_manager()->StartDiscovery(
      /*active=*/false, {}, [&](auto cb_session) { PW_CHECK(cb_session); });
  RunUntilIdle();

  EXPECT_FALSE(test_device()->le_scan_state().enabled);
  EXPECT_EQ(2u, scan_states().size());

  // This should not result in a request to stop scan because both pending
  // requests will be processed at the same time, and second call to
  // StartDiscovery() retains its session.
  discovery_manager()->StartDiscovery(
      /*active=*/false, {}, [&](auto cb_session) { PW_CHECK(cb_session); });
  std::unique_ptr<LowEnergyDiscoverySession> session;
  discovery_manager()->StartDiscovery(
      /*active=*/false, {}, [&](auto cb_session) {
        PW_CHECK(cb_session);
        session = std::move(cb_session);
      });
  RunUntilIdle();
  EXPECT_EQ(3u, scan_states().size());

  EXPECT_TRUE(test_device()->le_scan_state().enabled);
}

TEST_F(LowEnergyDiscoveryManagerTest,
       EnablePassiveScanDuringActiveScanAndDisableActiveScanCausesDowngrade) {
  auto active_session = StartDiscoverySession();
  ASSERT_TRUE(active_session);
  ASSERT_TRUE(test_device()->le_scan_state().enabled);
  ASSERT_EQ(pw::bluetooth::emboss::LEScanType::ACTIVE,
            test_device()->le_scan_state().scan_type);

  // The scan state should transition to enabled.
  ASSERT_EQ(1u, scan_states().size());
  EXPECT_TRUE(scan_states()[0]);

  // Enabling passive scans should not disable the active scan.
  auto passive_session = StartDiscoverySession(false);
  RunUntilIdle();
  ASSERT_EQ(pw::bluetooth::emboss::LEScanType::ACTIVE,
            test_device()->le_scan_state().scan_type);
  EXPECT_TRUE(test_device()->le_scan_state().enabled);
  EXPECT_EQ(1u, scan_states().size());

  // Stopping the active session should fall back to passive scan.
  active_session = nullptr;
  RunUntilIdle();
  EXPECT_TRUE(test_device()->le_scan_state().enabled);
  EXPECT_EQ(pw::bluetooth::emboss::LEScanType::PASSIVE,
            test_device()->le_scan_state().scan_type);
  EXPECT_THAT(scan_states(), ::testing::ElementsAre(true, false, true));
}

TEST_F(LowEnergyDiscoveryManagerTest, DisablePassiveScanDuringActiveScan) {
  auto active_session = StartDiscoverySession();
  ASSERT_TRUE(active_session);
  ASSERT_TRUE(test_device()->le_scan_state().enabled);
  ASSERT_EQ(pw::bluetooth::emboss::LEScanType::ACTIVE,
            test_device()->le_scan_state().scan_type);

  // The scan state should transition to enabled.
  ASSERT_EQ(1u, scan_states().size());
  EXPECT_TRUE(scan_states()[0]);

  // Enabling passive scans should not disable the active scan.
  auto passive_session = StartDiscoverySession(false);
  RunUntilIdle();
  ASSERT_EQ(pw::bluetooth::emboss::LEScanType::ACTIVE,
            test_device()->le_scan_state().scan_type);
  EXPECT_TRUE(test_device()->le_scan_state().enabled);
  EXPECT_EQ(1u, scan_states().size());

  // Disabling the passive scan should not disable the active scan.
  passive_session.reset();
  RunUntilIdle();
  ASSERT_EQ(pw::bluetooth::emboss::LEScanType::ACTIVE,
            test_device()->le_scan_state().scan_type);
  EXPECT_TRUE(test_device()->le_scan_state


if not errors.transformations.input then
                errors.transformations.input = {}
              end

              if not errors.transformations.input[i] then
                errors.transformations.input[i] = {}
              end

              errors.transformations.input[i][j] = fmt("invalid field name: %s", input)
            end
          end
        end

        local needs = transformations[i].needs
        if needs then
          for j = 1, #needs do
            if not has_schema_field(schema, needs[j]) then
              if not errors.transformations then
                errors.transformations = {}
              end

              if not errors.transformations.needs then
                errors.transformations.needs = {}
              end

              if not errors.transformations.needs[i] then
                errors.transformations.needs[i] = {}
              end

              errors.transformations.needs[i][j] = fmt("invalid field name: %s", needs[j])
            end
          end
        end
      end
    end

    return check_fields(schema, errors)
  end,
})

MetaSchema.valid_types = setmetatable({
  ["function"] = true


.my-xl-auto {
    margin-bottom: auto !important;
  }
  .ml-xl-auto,
  .mx-xl-auto {
    margin-left: auto !important;
  }
}
/*# sourceMappingURL=bootstrap-grid.css.map */body.hotwire-dev-tools-highlight-turbo-frames {
  & turbo-frame {
    display: block;
    border-radius: 5px;
  }
}

.hotwire-dev-tools-highlight-overlay-turbo-frame {
  position: absolute;
  pointer-events: none;
  border-radius: 5px;
}

.hotwire-dev-tools-turbo-frame-info-badge-container {
  position: relative;
  pointer-events: all;
}

.hotwire-dev-tools-turbo-frame-info-badge {
  position: absolute;
  z-index: 1000;
  top: -20px;
  height: 20px;
  color: #fff;
  padding: 0 5px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  width: 18px;
  opacity: 0.1;
  transition:
    opacity 0.3s,
    width 0.3s;
}

.hotwire-dev-tools-turbo-frame-info-badge:hover {
  opacity: 1;
  width: fit-content;
}

.hotwire-dev-tools-turbo-frame-info-badge.copied {
  animation: turboFrameScaleEffect 0.3s ease-in-out;
}

@keyframes turboFrameScaleEffect {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}
@tailwind base;
@tailwind components;
@tailwind utilities;

@layer base {
  :root {
    --background: linear-gradient(to bottom right, #ffffff, #e0e0e0, #f0f0f0);
    --foreground: 224 71.4% 4.1%;

    --card: 0 0% 100%;
    --card-foreground: 224 71.4% 4.1%;

    --popover: 0 0% 100%;
    --popover-foreground: 224 71.4% 4.1%;

    --primary: 220.9 39.3% 11%;
    --primary-foreground: 210 20% 98%;

    --secondary: 220 14.3% 95.9%;
    --secondary-foreground: 220.9 39.3% 11%;

    --muted: 220 14.3% 95.9%;
    --muted-foreground: 220 8.9% 46.1%;

    --accent: 220 14.3% 95.9%;
    --accent-foreground: 220.9 39.3% 11%;

    --destructive: 0 84.2% 60.2%;
    --destructive-foreground: 210 20% 98%;

    --border: 220 13% 91%;
    --input: 220 13% 91%;
    --ring: 224 71.4% 4.1%;

    --radius: 0.5rem;

    --in: 72.06% 0.191 231.6;
    --fallback-in: #00b3f0;
  }

  .dark {
    --background: linear-gradient(
      to right top,
      hsl(225.9 70.7% 40.2%),
      hsl(226.2, 57%, 25%),
      hsl(200.4 98% 39.4%)
    );
    --foreground: 210 20% 98%;

    --card: 224 71.4% 4.1%;
    --card-foreground: 210 20% 98%;

    --popover: 224 71.4% 4.1%;
    --popover-foreground: 210 20% 98%;

    --primary: 210 20% 98%;
    --primary-foreground: 220.9 39.3% 11%;

    --s


ages: MessageIterator[Double]) {

        var minDistance = Double.MaxValue

        while (messages.hasNext) {
          val msg = inMessages.next
          if (msg < minDistance) {
            minDistance = msg
          }
        }
        sendCombinedMessage(minMessage)
    }
}
```

## 配置以顶点为中心的迭代

可以使用`VertexCentricConfiguration`对象配置以顶点为中心的迭代。目前，可以指定以下参数：

*   **名称**：以顶点为中心的迭代的名称。名称显示在日志和消息中，可以使用该`setName()`方法指定。

*   **并行性**：迭代的并行性。可以使用该`setParallelism()`方法进行设置。

*   **在非托管内存**中设置的解决方案：定义解决方案集是保存在托管内存中（Flink的内部方式是以序列化形式保存对象）还是作为简单的对象映射。默认情况下，解决方案集在托管内存中运行。可以使用该`setSolutionSetUnmanagedMemory()`方法设置此属性。

*   **聚合器**：可以使用该`registerAggregator()`方法注册迭代聚合器。迭代聚合器按超级步骤全局组合所有聚合，并使它们在下一个超级步骤中可用。可以在用户定义的内部访问已注册的聚合器`ComputeFunction`。

*   **广播变量**：数据集可以作为[广播变量](https://flink.sojb.cn/dev/batch/index.html#broadcast-variables)的`ComputeFunction`使用，`addBroadcastSet()`方法。

*   [**Java**](#tab_java_1)
*   [**Scala**](#tab_scala_1)

```
Graph<Long, Double, Double> graph = ...

// configure the iteration
VertexCentricConfiguration parameters = new VertexCentricConfiguration();

// set the iteration name
parameters.setName("Gelly Iteration");

// set the parallelism
parameters.setParallelism(16);

// register an aggregator
parameters.registerAggregator("sumAggregator", new LongSumAggregator());

// run the vertex-centric iteration, also passing the configuration parameters
Graph<Long, Long, Double> result =
            graph.runVertexCentricIteration(
            new Compute(), null, maxIterations, parameters);

// user-defined function
public static final class Compute extends ComputeFunction {

    LongSumAggregator aggregator = new LongSumAggregator();

    public void preSuperstep() {

        // retrieve the Aggregator
        aggregator = getIterationAggregator("sumAggregator");
    }

    public void compute(Vertex<Long, Long> vertex, MessageIterator inMessages) {

        //do some computation
        Long partialValue = ...

        // aggregate the partial value
        aggregator.aggregate(partialValue);

        // update the vertex value
        setNewVertexValue(...);
    }
}
```

```
val graph: Graph[Long, Long, Double] = ...

val parameters = new VertexCentricConfiguration

// set the iteration name parameters.setName("Gelly Iteration")

// set the parallelism parameters.setParallelism(16)

// register an aggregator parameters.registerAggregator("sumAggregator", new LongSumAggregator)

// run the vertex-centric iteration, also passing the configuration parameters val result = graph.runVertexCentricIteration(new Compute, new Combiner, maxIterations, parameters)

// user-defined function final class Compute extends ComputeFunction {

    var aggregator = new LongSumAggregator

    override def preSuperstep {

        // retrieve the Aggregator
        aggregator = getIteration


place */\n  z-index: 1; /* Sit on top */\n  left: 0;\n  top: 0;\n  display: flex;\n  justify-content: center;\n  width: 100%; /* Full width */\n  height: 100%; /* Full height */\n  overflow: auto; /* Enable scroll if needed */\n  background-color: rgb(0, 0, 0); /* Fallback color */\n  background-color: rgba(0, 0, 0, 0.6); /* Black w/ opacity */\n"]))),ge=(0,b.Ay)(le)(oe||(oe=(0,f.A)(["\n  animation-name: ",";\n  position: absolute;\n"])),e=>e.animation),fe=(0,b.Ay)(le)(ce||(ce=(0,f.A)(["\n  animation-name: ",";\n  z-index: 999999;\n  position: relative;\n"])),e=>e.bgAnimation),be=null;(0,g.PQ)()||(be=r.lazy(()=>Promise.all([a.e(869),a.e(359)]).then(a.bind(a,56359))));const he=e=>{var t=e.children,a=e.animation,n=e.bgAnimation,l=e.setRunning,s=e.shouldClose,o=(0,A.A)(e,me),c=o.complete?" migration-complete":"",d=(0,i.wA)();return re.createPortal(r.createElement(fe,{bgAnimation:n,className:"modal-bg"},r.createElement(_e,{onClick:o.onClick},r.createElement(ge,{className:"modal-container",duration:"0.8s",delay:"0.2s",animation:a,onAnimationEnd:()=>{d(s?l(!1):async e=>{try{await e((0,de.GD)("INITIATE_MIGRATION"))}catch(t){console.error(t),e((0,pe.z)({error_type:ue.mN,error_message:t}))}})}},r.createElement(k(),{active:!s},r.createElement("div",{className:"migration-progress".concat(c)},t)),be&&r.createElement(r.Suspense,{fallback:r.createElement("div",null,(0,v.__)("Loading...","wp-migrate-db"))},r.createElement(be,o))))),document.getElementById("wpmdb-main"))};var ve,Ee,we,ye,Ae,xe=(0,b.i7)(ve||(ve=(0,f.A)(["\n  from {\n    opacity: 0;\n    padding-top: 0;\n  }\n  to {\n    opacity: 1;\n    padding-top: 64px;\n  }\n"]))),ke=(0,b.i7)(Ee||(Ee=(0,f.A)(["\n  from {\n    opacity: 1;\n    padding-top: 64px;\n  }\n  to {\n    opacity: 0;\n    padding-top: 40px;\n  }\n"]))),Se=(0,b.i7)(we||(we=(0,f.A)(["\n  from {\n    opacity: 0;\n  }\n  to {\n    opacity: 1;\n  }\n"]))),Te=(0,b.i7)(ye||(ye=(0,f.A)(["\n  from {\n    opacity: 1;\n  }\n  to {\n    opacity: 0;\n  }\n"]))),Ne=a(97734);function Oe(){return Oe=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)({}).hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e},Oe.apply(null,arguments)}const Pe=e=>r.createElement("svg",Oe({xmlns:"http://www.w3.org/2000/svg",width:52,height:52,viewBox:"0 0 52 52"},e),Ae||(Ae=r.createElement("g",{fill:"none",fillRule:"evenodd"},r.createElement("circle",{cx:26,cy:26,r:26,fill:"#EA4C49",opacity:.202}),r.createElement("circle",{cx:26,


.UpdateApnsVoipChannelInput{
		ApplicationId:          aws.String(applicationId),
		APNSVoipChannelRequest: params,
	}

	_, err := conn.UpdateApnsVoipChannel(ctx, &req)
	if err != nil {
		return sdkdiag.AppendErrorf(diags, "updating Pinpoint APNs VoIP Channel for Application %s: %s", applicationId, err)
	}

	d.SetId(applicationId)

	return append(diags, resourceAPNSVoIPChannelRead(ctx, d, meta)...)
}

func resourceAPNSVoIPChannelRead(ctx context.Context, d *schema.ResourceData, meta any) diag.Diagnostics {
	var diags diag.Diagnostics
	conn := meta.(*conns.AWSClient).PinpointClient(ctx)

	log.Printf("[INFO] Reading Pinpoint APNs VoIP Channel for Application %s", d.Id())

	output, err := findAPNSVoIPChannelByApplicationId(ctx, conn, d.Id())

	if !d.IsNewResource() && tfresource.NotFound(err) {
		log.Printf("[WARN] Pinpoint APNS VoIP Channel (%s) not found, removing from state", d.Id())
		d.SetId("")
		return diags
	}

	if err != nil {
		return sdkdiag.AppendErrorf(diags, "reading Pinpoint APNS VoIP Channel (%s): %s", d.Id(), err)
	}

	d.Set(names.AttrApplicationID, output.ApplicationId)
	d.Set("default_authentication_method", output.DefaultAuthenticationMethod)
	d.Set(names.AttrEnabled, output.Enabled)
	// Sensitive params are not returned

	return diags
}

func resourceAPNSVoIPChannelDelete(ctx context.Context, d *schema.ResourceData, meta any) diag.Diagnostics {
	var diags diag.Diagnostics
	conn := meta.(*conns.AWSClient).PinpointClient(ctx)

	log.Printf("[DEBUG] Deleting Pinpoint APNs VoIP Channel: %s", d.Id())
	_, err := conn.DeleteApnsVoipChannel(ctx, &pinpoint.DeleteApnsVoipChannelInput{
		ApplicationId: aws.String(d.Id()),
	})

	if errs.IsA[*awstypes.NotFoundException](err) {
		return diags
	}

	if err != nil {
		return sdkdiag.AppendErrorf(diags, "deleting Pinpoint APNs VoIP Channel for Application %s: %s", d.Id(), err)
	}
	return diags
}

func findAPNSVoIPChannelByApplicationId(ctx context.Context, conn *pinpoint.Client, applicationId string) (*awstypes.APNSVoipChannelResponse, error) {
	input := &pinpoint.GetApnsVoipChannelInput{
		ApplicationId: aws.String(applicationId),
	}

	output, err := conn.GetApnsVoipChannel(ctx, input)
	if errs.IsA[*awstypes.NotFoundException](err) {
		return nil, &retry.NotFoundError{
			LastError:   err,
			LastRequest: input,
		}
	}
	if err != nil {
		return nil, err
	}

	if output == nil || output.APNSVoipChannelResponse == nil {
		return nil, tfresource.NewEmptyResultError(input)
	}

	return output.APNSVoipChannelResponse, nil
}
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

package iothub

//go:generate go run ../../tools/generator-resource-id/main.go -path=./ -name=Enrichment -id=/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Devices/iotHubs/hub1/enrichments/enrichment1 -rewrite=true
//go:generate go run ../../tools/generator-resource-id/main.go -path=./ -name=IotHub -id=/subscriptions/12345678


d-ArrayInput-addBtn:not(:disabled):not(.is-disabled).active,.amis-scope .cxd-ArrayInput-addBtn:not(:disabled):not(.is-disabled).is-active{color:#144bcc;background:#ffffff;border-color:#144bcc #144bcc #144bcc #144bcc;border-width:1px 1px 1px 1px;border-style:solid solid solid solid;box-shadow:0px 0px 0px 0px transparent;}.amis-scope .cxd-ArrayInput-addBtn:disabled,.amis-scope .cxd-ArrayInput-addBtn.is-disabled{color:#b8babf;background:#f7f8fa;border-color:#f7f8fa #f7f8fa #f7f8fa #f7f8fa;border-width:1px 1px 1px 1px;border-style:solid solid solid solid;box-shadow:0px 0px 0px 0px transparent;}.amis-scope .cxd-ArrayInput-addBtn.is-disabled{pointer-events:none;opacity:var(--Button-onDisabled-opacity);}.amis-scope .cxd-ArrayInput-toolbar{margin-top:0.5rem;display:flex;flex-direction:row;justify-content:space-between;}.amis-scope .cxd-ArrayInput-toolbar--dnd{padding-left:29px;}.amis-scope .cxd-ArrayInput-sortTip{color:#b8babf;}.amis-scope .cxd-ArrayInput-item{display:flex;flex-direction:row;align-items:flex-start;margin-bottom:0.25rem;}.amis-scope .cxd-ArrayInput-item > div{flex-grow:1;width:0;min-width:120px;margin-right:0.25rem;}.amis-scope .cxd-ArrayInput-item > div:not(:first-child){margin-left:0.25rem;}.amis-scope .cxd-ArrayInput-item--dragging{position:relative;opacity:0.4;}.amis-scope .cxd-ArrayInput-itemRemove,.amis-scope .cxd-ArrayInput-itemDrager{margin:0;flex-grow:unset;display:inline-block;padding:calc(
    (
        2rem - 1.5 *
          14px
      ) / 2
  ) 0.25rem;cursor:pointer;}.amis-scope .cxd-ArrayInput-itemRemove > svg,.amis-scope .cxd-ArrayInput-itemDrager > svg{color:#84878c;}.amis-scope .cxd-ArrayInput-itemRemove:hover > svg,.amis-scope .cxd-ArrayInput-itemDrager:hover > svg{color:#2468f2;}.amis-scope .cxd-ArrayInput-itemDrager{cursor:move;}.amis-scope .cxd-Tabs-drag-tip{display:none;}.amis-scope .cxd-Tabs-linksWrapper{display:flex;align-items:center;justify-content:flex-start;border-bottom:0.0625rem solid #e8e9eb;}.amis-scope .cxd-Tabs-linksContainer-wrapper{position:relative;display:flex;align-items:center;justify-content:flex-start;}.amis-scope .cxd-Tabs-linksContainer-wrapper .cxd-Tabs-addable{display:flex;align-items:center;margin-left:1.25rem;margin-bottom:0.1875rem;padding-bottom:0.5rem;white-space:nowrap;cursor:pointer;}.amis-scope .cxd-Tabs-linksContainer-wrapper .cxd-Tabs-addable-icon{width:0.9375rem;height:0.9375rem;padding:0.0625rem;margin-right:0.25rem;}.amis-scope .cxd-Tabs-linksContainer-wrapper .cxd-Tabs-addable span{margin-left:4px;line-height:1;}.amis-scope .cxd-Tabs-linksContainer-wrapper .cxd-Tabs-addable:hover{color:#2468f


.include "macro.inc"

 # assembler directives
 .set noat      # allow manual use of $at
 .set noreorder # don't insert nops after branches
 .set gp=64     # allow use of 64-bit general purposee registers

.section .rodata

glabel D_8089EBC0
    .asciz "../z_bg_mizu_movebg.c"
    .balign 4

glabel D_8089EBD8
    .asciz "../z_bg_mizu_movebg.c"
    .balign 4

glabel D_8089EBF0
    .asciz "../z_bg_mizu_movebg.c"
    .balign 4

glabel jtbl_8089EC08
.word L8089DD64
.word L8089DDC8
.word L8089DE2C
.word L8089DE90
.word L8089DED0
.word L8089DED0
.word L8089DED0
.word L8089DF24
glabel D_8089EC28
 .word 0x44318000, 0x00000


(me.Command2 == Effect.PortamentoToNote) || (me.Command2 == Effect.PortamentoToNoteVolumeSlide);
		}

		/********************************************************************/
		/// <summary>
		///
		/// </summary>
		/********************************************************************/
		private uint8_t Bcd2Bin(uint8_t x)
		{
			uint8_t r;

			if ((x >> 4) < 10)
				r = (uint8_t)((x >> 4) * 10);
			else
				return 0;

			if ((x & 0x0f) < 10)
				r += (uint8_t)(x & 0x0f);
			else
				return 0;

			return r;
		}

		/********************************************************************/
		/// <summary>
		///
		/// </summary>
		/********************************************************************/
		private void MSynth_Trigger(DB3Module m, ModuleTrack mt, int channel)
		{
			mt.VolumeEnvelopeCurrent = 16384;
			mt.PanningEnvelopeCurrent = 0;

			// Reset envelopes interpolators
			mt.VolumeEnvelope.Section = 0;
			mt.VolumeEnvelope.TickCounter = 0;

			if (mt.VolumeEnvelope.Index != 0xffff)
			{
				mt.VolumeEnvelope.SustainA = m.VolumeEnvelopes[mt.VolumeEnvelope.Index].SustainA;
				mt.VolumeEnvelope.SustainB = m.VolumeEnvelopes[mt.VolumeEnvelope.Index].SustainB;
				mt.VolumeEnvelope.LoopEnd = m.VolumeEnvelopes[mt.VolumeEnvelope.Index].LoopLast;
			}

			mt.PanningEnvelope.Section = 0;
			mt.PanningEnvelope.TickCounter = 0;

			if (mt.PanningEnvelope.Index != 0xffff)
			{
				mt.PanningEnvelope.SustainA = m.PanningEnvelopes[mt.PanningEnvelope.Index].SustainA;
				mt.PanningEnvelope.SustainB = m.PanningEnvelopes[mt.PanningEnvelope.Index].SustainB;
				mt.PanningEnvelope.LoopEnd = m.PanningEnvelopes[mt.PanningEnvelope.Index].LoopLast;
			}

			// Set sample offset and loop direction
			if (mt.TriggerOffset > mt.SampleLength)
				mt.TriggerOffset = (int)mt.SampleLength;
			else if (mt.TriggerOffset < 0)
				mt.TriggerOffset = 0;

			PlaySampleFlag playFlag = PlaySampleFlag.None;

			if (mt.SampleBitSize == 16)
				playFlag |= PlaySampleFlag._16Bit;

			if (mt.PlayBackwards)
				playFlag |= PlaySampleFlag.Backwards;

			uint length = (uint)(mt.SampleLength - mt.TriggerOffset);
			if (length > 0)
			{
				worker.VirtualChannels[channel].PlaySample((short)(mt.Instrument - 1), mt.SampleData, (uint)mt.TriggerOffset, length, playFlag);

				if (mt.SampleLoopLength > 0)
					worker.VirtualChannels[channel].SetLoop(mt.SampleLoopStartOffset, mt.SampleLoopLength, mt.SampleLoopType);
			}
			else
				worker.VirtualChannels[channel].Mute();

			mt.VibratoCounter = 0;
			mt.IsOn = true;
		}

		/********************************************************************/
		/// <summary>
		///
		/// </summary>
		/********************************************************************/
		private void MSynth_Instrument(ModuleSynth mSyn, ModuleTrack mt, int instr)
		{
			mt.Instrument = 0;
			mt.IsOn = false;

			// Some modules contain triggers of non-existing
			// instruments. Such instruments should be silently ignored
			if (instr > mSyn.Module.NumberOfInstruments)
				return;

			DB3ModuleInstrument mi = mSyn.Module.Instruments[instr - 1];

			// Enable envelope interpolators
			mt.VolumeEnvelope.Index = mi.VolumeEnvelope;
			mt.Panni


[21184] = "Глубокоскальные наручи",
[21185] = "Сфера Спокойствия земли",
[21186] = "Наручи Скальной Ярости",
[21187] = "Землетканый плащ",
[21188] = "Боевая перчатка Кенария",
[21189] = "Мощь Кенария",
[21190] = "Гнев Кенария",
[21191] = "Тщательно упакованный подарок",
[21196] = "Перстень-печатка Бронзовых драконов",
[21197] = "Перстень-печатка Бронзовых драконов",
[21198] = "Перстень-печатка Бронзовых драконов",
[21199] = "Перстень-печатка Бронзовых драконов",
[21200] = "Перстень-печатка Бронзовых драконов",
[21201] = "Перстень-печатка Бронзовых драконов",
[21202] = "Перстень-печатка Бронзовых драконов",
[21203] = "Перстень-печатка Бронзовых драконов",
[21204] = "Перстень-печатка Бронзовых драконов",
[21205] = "Перстень-печатка Бронзовых драконов",
[21206] = "Перстень-печатка Бронзовых драконов",
[21207] = "Перстень-печатка Бронзовых драконов",
[21208] = "Перстень-печатка Бронзовых драконов",
[21209] = "Перстень-печатка Бронзовых драконов",
[21210] = "Перстень-печатка Бронзовых драконов",
[21211] = "Прах с копыт северного оленя",
[21212] = "Свежий остролист",
[21213] = "Сушеный остролист",
[21214] = "Фолиант ледяной стрелы XI",
[21215] = "Кекс Гракку с мясом и фруктами",
[21216] = "Эксклюзивный дар Пастбищ Дымного Леса",
[21217] = "Деликатес из шалфокуня",
[21218] = "Синий киражский резонирующий кристалл",
[21219] = "Рецепт: деликатес из шалфокуня",
[21220] = "Голова Оссириана Неуязвимого",
[21221] = "Око К'Туна",
[21222] = "Бронированный хитин",
[21223] = "Черный камень",
[21224] = "Фрагмент древней брони",
[21225] = "Тяжелая чешуя силитида",
[21226] = "Рунический камень",
[21227] = "Череп древнего героя",
[21228] = "Сундучок, окованный мифрилом",
[21229] = "Знаки различия киражского владыки",
[21230] = "Древний киражский артефакт",
[21232] = "Ки


"""
Constants for PostgreSQL
"""
from sqllex.constants.sql import *
from sqllex.types.types import *

# Options of column datatype of value
INT8: str = "INT8"
BIGINT = INT8
SERIAL8: str = "SERIAL8"
BIGSERIAL = SERIAL8
# BIT: str =
# VARBIT: str =
BOOL: str = "BOOL"
BOOLEAN = BOOL
BOX: str = "BOX"
BYTEA: str = "BYTEA"
CIDR: str = "CIDR"
CIRCLE: str = "CIRCLE"
DATE: str = "DATE"
FLOAT8: str = "FLOAT8"
INET: str = "INET"
INT: str = "INT"
INT4: str = "INT4"
# INTEGER: ColumnDataType = INTEGER
# INTERVAL: str =
JSON: str = "JSON"
JSONB: str = "JSONB"
LINE: str = "LINE"
LSEG: str = "LSEG"
MACADDR: str = "MACADDR"
MACADDR8: str = "MACADDR8"
MONEY: str = "MONEY"
# NUMERIC: str =
PATH: str = "PATH"
PG_LSN: str = "PG_LSN"
POINT: str = "POINT"
POLYGON: str = "POLYGON"
FLOAT4: str = "FLOAT4"
# REAL: ColumnDataType = REAL
INT2: str = "INT2"
SMALLINT = INT2
SERIAL2: str = "SERIAL2"
SMALLSERIAL = SERIAL2
SERIAL4: str = "SERIAL4"
SERIAL = SERIAL4
# TEXT: ColumnDataType = TEXT
# TIME: str =
# TIME: str =
# TIMESTAMP: str =
# TIMESTAMP: str =
TSQUERY: str = "TSQUERY"
TSVECTOR: str = "TSVECTOR"
TXID_SNAPSHOT: str = "TXID_SNAPSHOT"
UUID: str = "UUID"
XML: str = "XML"

__all__ = [
    # Options of column datatype of value
    'INTEGER',  # lgtm [py/undefined-export]
    'REAL',  # lgtm [py/undefined-export]
    'TEXT',  # lgtm [py/undefined-export]
    'INT8',
    'SERIAL8',
    'BIGSERIAL',
    'BOOL',
    'BOOLEAN',
    'BOX',
    'BYTEA',
    'CIDR',
    'CIRCLE',
    'DATE',
    'FLOAT8',
    'INET',
    'INT',
    'INT4',
    'JSON',
    'JSONB',
    'LINE',
    'LSEG',
    'MACADDR',
    'MACADDR8',
    'MONEY',
    'PATH',
    'PG_LSN',
    'POINT',
    'POLYGON',
    'FLOAT4',
    'INT2',
    'SMALLINT',
    'SERIAL2',
    'SMALLSERIAL',
    'SERIAL4',
    'SERIAL',
    'TSQUERY',
    'TSVECTOR',
    'TXID_SNAPSHOT',
    'UUID',
    'XML',

    # Options for JOIN-ing
    'INNER_JOIN',  # lgtm [py/undefined-export]
    'LEFT_JOIN',  # lgtm [py/undefined-export]

    # Options of column value
    'ALL',  # lgtm [py/undefined-export]
    'FOREIGN_KEY',  # lgtm [py/undefined-export]
    'NULL',  # lgtm [py/undefined-export]
    'PRIMARY_KEY',  # lgtm [py/undefined-export]
    'REFERENCES',  # lgtm [py/undefined-export]
    'AS',  # lgtm [py/undefined-export]
    'ON',  # lgtm [py/undefined-export]
    'LIKE',  # lgtm [py/undefined-export]

    # Options for "OR" argument
    'ABORT',  # lgtm [py/undefined-export]
    'FAIL',  # lgtm [py/undefined-export]
    'IGNORE',  # lgtm [py/undefined-export]
    'REPLACE',  # lgtm [py/undefined-export]
    'ROLLBACK',  # lgtm [py/undefined-export]
]


db.internalFindSingleAgreementByAgreementId(tx, agreementid, protocol, []persistence.AFilter{}); err != nil {
		return err
	} else if mod == nil {
		return errors.New(fmt.Sprintf("No agreement with given id available to update: %v", agreementid))
	} else {
		// This code is running in a database transaction. Within the tx, the current record (mod) is
		// read and then updated according to the updates within the input update record. It is critical
		// to check for correct data transitions within the tx.
		persistence.ValidateStateTransition(mod, update)
		return db.updateAgreement(tx, mod, protocol, partition)
	}
}

func (db *AgbotPostgresqlDB) insertAgreement(ag *persistence.Agreement, protocol string) error {

	sql := strings.Replace(AGREEMENT_INSERT, AGREEMENT_TABLE_NAME_ROOT, db.GetAgreementPartitionTableName(db.PrimaryPartition()), 1)

	if agm, err := json.Marshal(ag); err != nil {
		return err
	} else if _, err = db.db.Exec(sql, ag.CurrentAgreementId, protocol, db.PrimaryPartition(), agm); err != nil {
		return err
	} else {
		glog.V(2).Infof("Succeeded creating agreement record %v", *ag)
	}

	return nil
}

func (db *AgbotPostgresqlDB) updateAgreement(tx *sql.Tx, ag *persistence.Agreement, protocol string, partition string) error {

	sql := strings.Replace(AGREEMENT_UPDATE, AGREEMENT_TABLE_NAME_ROOT, db.GetAgreementPartitionTableName(partition), 1)

	if agm, err := json.Marshal(ag); err != nil {
		return err
	} else if _, err = tx.Exec(sql, ag.CurrentAgreementId, protocol, agm); err != nil {
		return err
	} else {
		glog.V(2).Infof("Succeeded writing agreement record %v", *ag)
	}

	return nil
}

func (db *AgbotPostgresqlDB) deleteAgreement(tx *sql.Tx, agreementId string, protocol string) error {

	// Query the agreement id to retrieve the partition for this agreement. We dont need the agreement object in this case.
	// Compare the agreement's partition with the DB's primary and if they are different, delete this agreement and then
	// check to see if the partition specific table is now empty.

	checkTableDeletion := false
	_, partition, err := db.internalFindSingleAgreementByAgreementId(tx, agreementId, protocol, []persistence.AFilter{})
	if err != nil {
		return err
	} else if partition != db.PrimaryPartition() {
		checkTableDeletion = true
	}

	// Delete the agreement.
	sql := strings.Replace(AGREEMENT_DELETE, AGREEMENT_TABLE_NAME_ROOT, db.GetAgreementPartitionTableName(partition), 1)
	if _, err := tx.Exec(sql, agreementId); err != nil {
		return err
	}

	if glog.V(5) {
		glog.Infof("Agreement %v deleted from database.", agreementId)
	}

	// Remove the secondary partition table if necessary.
	if checkTableDeletion {
		sql := strings.Replace(AGREEMENT_PARTITION_EMPTY, AGREEMENT_TABLE_NAME_ROOT, db.GetAgreementPartitionTableName(partition), 1)
		rows, err := tx.Query(sql)
		if err != nil {
			return errors.New(fmt.Sprintf("error querying for empty agreement partition %v error: %v", partition, err))
		}

		// If the rows object doesnt get closed, memory and connections will grow and/or leak.
		defer rows.Close()

		// If there are no rows then this table is empty and should be deleted.
		if !rows.Next() {
			glog.V(5).Infof("Deleting secondary agreement partition %v from database.", partition)
			if _, err := tx.Exec(db.GetAgreementPartitionTableDrop(partition)); err != nil {
				return err
			}
			glog.V(5).Infof("Deleted secondary agreement partition %v from database.", partition)


tle, Some(6), 2.into(), vec![0b00_011010, 0b00_011110], bits![Msb0, u8; 1, 0, 0, 1]),
        #[should_panic(expected = "Parse(\"too much data: container of 8 bits cannot hold 9 bits\")")]
        case::not_enough_data([].as_ref(), Endian::Little, Some(9), 1.into(), vec![], bits![Msb0, u8;]),
        #[should_panic(expected = "Parse(\"too much data: container of 8 bits cannot hold 9 bits\")")]
        case::not_enough_data([0xAA].as_ref(), Endian::Little, Some(9), 1.into(), vec![], bits![Msb0, u8;]),
        #[should_panic(expected = "Parse(\"not enough data: expected 8 bits got 0 bits\")")]
        case::not_enough_data([0xAA].as_ref(), Endian::Little, Some(8), 2.into(), vec![], bits![Msb0, u8;]),
        #[should_panic(expected = "Parse(\"not enough data: expected 8 bits got 0 bits\")")]
        case::not_enough_data_until([0xAA].as_ref(), Endian::Little, Some(8), (|_: &u8| false).into(), vec![], bits![Msb0, u8;]),
        #[should_panic(expected = "Parse(\"not enough data: expected 8 bits got 0 bits\")")]
        case::not_enough_data_bits([0xAA].as_ref(), Endian::Little, Some(8), (Size::Bits(16)).into(), vec![], bits![Msb0, u8;]),
        #[should_panic(expected = "Parse(\"too much data: container of 8 bits cannot hold 9 bits\")")]
        case::too_much_data([0xAA, 0xBB].as_ref(), Endian::Little, Some(9), 1.into(), vec![], bits![Msb0, u8;]),
    )]
    fn test_vec_read<Predicate: FnMut(&u8) -> bool>(
        input: &[u8],
        endian: Endian,
        bit_size: Option<usize>,
        limit: Limit<u8, Predicate>,
        expected: Vec<u8>,
        expected_rest: &BitSlice<Msb0, u8>,
    ) {
        let bit_slice = input.view_bits::<Msb0>();

        let (rest, res_read) = match bit_size {
            Some(bit_size) => {
                Vec::<u8>::read(bit_slice, (limit, (endian, Size::Bits(bit_size)))).unwrap()
            }
            None => Vec::<u8>::read(bit_slice, (limit, (endian))).unwrap(),
        };

        assert_eq!(expected, res_read);
        assert_eq!(expected_rest, rest);
    }

    #[rstest(input, endian, expected,
        case::normal(vec![0xAABB, 0xCCDD], Endian::Little, vec![0xBB, 0xAA, 0xDD, 0xCC]),
    )]
    fn test_vec_write(input: Vec<u16>, endian: Endian, expected: Vec<u8>) {
        let mut res_write = bitvec![Msb0, u8;];
        input.write(&mut res_write, endian).unwrap();
        assert_eq!(expected, res_write.into_vec());
    }

    // Note: These tests also exist in boxed.rs
    #[rstest(input, endian, bit_size, limit, expected, expected_rest, expected_write,
        case::normal_le([0xAA, 0xBB, 0xCC, 0xDD].as_ref(), Endian::Little, Some(16), 2.into(), vec![0xBBAA, 0xDDCC], bits![Msb0, u8;], vec![0xAA


 - 10;
			int y = random.nextInt(100) + 10;
			GlyphVector gv = g.getFont()
					.createGlyphVector(g.getFontRenderContext(), str);
			g.drawGlyphVector(gv, x, y);
		}

		testSoftClip(img, false, "glyphVector");
	}

	@Test
	public void testAttributedCharacterIterator() throws IOException {
		VectorImage img = new VectorImage();
		Graphics2D g = img.createGraphics();
		g.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
				RenderingHints.VALUE_ANTIALIAS_ON);

		g.setFont(new Font("Arial", Font.BOLD, 48));
		Random random = new Random(0);
		for (int a = 0; a < 200; a++) {
			String str = Character.toString('A' + random.nextInt(26));
			str += Character.toString('a' + random.nextInt(26));
			str += Character.toString('0' + random.nextInt(10));
			int x = random.nextInt(100) - 10;
			int y = random.nextInt(100) + 10;
			AttributedString as = new AttributedString(str);
			as.addAttribute(TextAttribute.FOREGROUND,
					COLORS[random.nextInt(COLORS.length)], 0, 1);
			as.addAttribute(TextAttribute.FOREGROUND,
					COLORS[random.nextInt(COLORS.length)], 1, 2);
			as.addAttribute(TextAttribute.FOREGROUND,
					COLORS[random.nextInt(COLORS.length)], 2, 3);
			as.addAttribute(TextAttribute.FONT, g.getFont(), 0, 3);
			g.drawString(as.getIterator(), x, y);
		}

		testSoftClip(img, false, "attributedCharacterIterator");
	}

	@Test
	public void testCopyArea() throws IOException {
		VectorImage img = new VectorImage();
		Graphics2D g = img.createGraphics();
		g.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
				RenderingHints.VALUE_ANTIALIAS_ON);
		g.drawImage(createOpaqueRandomShapes(), 0, 0, null);
		g.copyArea(0, 0, SIZE.width / 2, SIZE.height / 2, 0, SIZE.height / 2);
		g.copyArea(0, 0, SIZE.width / 2, SIZE.height / 2, SIZE.width / 2, 0);
		g.copyArea(0, 0, SIZE.width / 2, SIZE.height / 2, SIZE.width / 2,
				SIZE.height / 2);

		testSoftClip(img, false, "copyArea");
	}

	private void testSoftClip(VectorImage img,
			boolean requireOpaquePixelsAreSame, String name)
			throws IOException {
		BufferedImage bi1 = render(img, CIRCLE);
		BufferedImage bi2 = renderSoftClip(img, CIRCLE);

		// ImageIO.write(bi1, "png", new File(name + "-clip.png"));
		// ImageIO.write(bi2, "png", new File(name + "-softclip.png"));

		int[] row1 = new int[bi1.getWidth()];
		int[] row2 = new int[bi2.getWidth()];

		int antialiasedPixels = 0;
		int identicalPixels = 0;
		int totalPixels = bi1.getWidth() * bi2.getHeight();
		for (int y = 0; y < bi2.getHeight(); y++) {
			bi1.getRaster().getDataElements(0, y, bi1.getWidth(), 1, row1);
			bi2.getRaster().getDataElements(0, y, bi1.getWidth(), 1, row2);
			for (int x = 0; x < bi2.getWidth(); x++) {
				int argb1 = row1[x];
				int argb2 = row2[x];

				int alpha2 = (argb2 >> 24) & 0xff;


ser that matches the id.
   *
   * @param id - User id
   * @returns User found, undefined otherwise
   */
  public readOneById(id: string): Promise<User | undefined> {
    return this.manager.findOne(User, id);
  }

  /**
   * Read a user by username.
   * This method is used only for sign in procedure since it forces the selection of
   * required data.
   *
   * @param username - User username
   * @returns User found, undefined otherwise
   */
  public readOneForSignIn(username: string): Promise<User | undefined> {
    return this.manager.findOne(
      User,
      { username },
      { select: ['id', 'password', 'roles', 'verified'] },
    );
  }

  /**
   * Read a user that matches the id.
   * This method is used only for resend procedure since it forces the selection of
   * required data.
   *
   * @param id - User id
   * @returns User found, undefined otherwise
   */
  public readOneForResend(id: string): Promise<User | undefined> {
    return this.manager.findOne(User, id, {
      select: ['verified', 'phone', 'email', 'username'],
    });
  }

  /**
   * Update the user verified status.
   *
   * @param id - User id
   *
   * @returns Updated user
   * @see TokenService
   */

  /**
   * Update the user verified status.
   *
   * @param id - User id
   * @param verified - Verified status
   * @returns Updated user
   */
  public async updateVerifiedStatus(id: string, verified: boolean): Promise<User> {
    // Check if user exists
    await this.manager.findOneOrFail(User, id);

    // Update
    await this.manager.update(User, id, { verified });

    // Return updated user
    return this.manager.findOneOrFail(User, id);
  }
}
import { expectImageToMatchFile, fixturePath } from '../../test/helpers'
import { Comic } from '../protocols'

const EXAMPLES = [
  {
    name: 'cbz - example 1',
    comicFileName: 'wytches-sample.cbz',
    imageFilePaths: [
      'wytches-sample/0001.jpeg',
      'wytches-sample/0002.jpeg',
      'wytches-sample/0003.jpeg',
      'wytches-sample/0004.jpeg',
    ]
  },
  {
    name: 'cbz - example 2',
    comicFileName: 'phonogram-sample.cbz',
    imageFilePaths: [
      'phonogram-sample/0001.jpeg',
      'phonogram-sample/0002.jpeg',
      'phonogram-sample/0003.jpeg',
      'phonogram-sample/0004.jpeg',
      'phonogram-sample/0005.jpeg',
    ]
  },
  {
    name: 'cbz - with nested images',
    comicFileName: 'nested-images.cbz',
    imageFilePaths: [
      'nested-images/Images/0001.jpg',
      'nested-images/Images/0002.jpg',
      'nested-images/Images/0003.jpg',
      'nested-images/Images/0004.jpg',
      'nested-images/Images/0005.jpg',
      'nested-images/Images/Deeper/0006.jpg',
      'nested-images/Images/Deeper/0007.jpg',
    ]
  },
  {
    name: 'cbr - example 1',
    comicFileName: 'wytches-sample.cbr',
    imageFilePaths: [
      'wytches-sample/0001.jpeg',
      'wytches-sample/0002.jpeg',
      'wytches-sample/0003.jpeg',
      'wytches-sample/0004.jpeg',
    ]
  },
  {
    name: 'cbr - example 2',
    comicFileName: 'phonogram-sample.cbr',
    imageFilePaths: [
      'phonogram-sample/0001.jpeg',
      'phonogram-sample/0002.jpeg',
      'phonogram-sample/0003.jpeg',
      'phonogram-sample/0004.jpeg',
      'phonogram-sample/0005.jpeg',
    ]
  },
  {
    name: 'cbr - with nested images',
    comicFileName: 'nested-images.cbr',
    imageFilePaths: [
      'nested-images/Images/0001


on NIX Rx links.
	 *
	 * With HW reset minlen value of 60byte, HW will treat ARP pkts
	 * as undersize and report them to SW as error pkts, hence
	 * setting it to 40 bytes.
	 */
	for (link = 0; link < hw->cgx_links; link++) {
		rvu_write64(rvu, blkaddr, NIX_AF_RX_LINKX_CFG(link),
				((u64)lmac_max_frs << 16) | NIC_HW_MIN_FRS);
	}

	for (link = hw->cgx_links; link < hw->lbk_links; link++) {
		rvu_write64(rvu, blkaddr, NIX_AF_RX_LINKX_CFG(link),
			    ((u64)lbk_max_frs << 16) | NIC_HW_MIN_FRS);
	}
	if (hw->sdp_links) {
		link = hw->cgx_links + hw->lbk_links;
		rvu_write64(rvu, blkaddr, NIX_AF_RX_LINKX_CFG(link),
			    SDP_HW_MAX_FRS << 16 | NIC_HW_MIN_FRS);
	}

	/* Get MCS external bypass status for CN10K-B */
	if (mcs_get_blkcnt() == 1) {
		/* Adjust for 2 credits when external bypass is disabled */
		nix_hw->cc_mcs_cnt = is_mcs_bypass(0) ? 0 : 2;
	}

	/* Set credits for Tx links assuming max packet length allowed.
	 * This will be reconfigured based on MTU set for PF/VF.
	 */
	for (cgx = 0; cgx < hw->cgx; cgx++) {
		lmac_cnt = cgx_get_lmac_cnt(rvu_cgx_pdata(cgx, rvu));
		/* Skip when cgx is not available or lmac cnt is zero */
		if (lmac_cnt <= 0)
			continue;
		slink = cgx * hw->lmac_per_cgx;

		/* Get LMAC id's from bitmap */
		lmac_bmap = cgx_get_lmac_bmap(rvu_cgx_pdata(cgx, rvu));
		for_each_set_bit(iter, &lmac_bmap, rvu->hw->lmac_per_cgx) {
			lmac_fifo_len = rvu_cgx_get_lmac_fifolen(rvu, cgx, iter);
			if (!lmac_fifo_len) {
				dev_err(rvu->dev,
					"%s: Failed to get CGX/RPM%d:LMAC%d FIFO size\n",
					__func__, cgx, iter);
				continue;
			}
			tx_credits = (lmac_fifo_len - lmac_max_frs) / 16;
			/* Enable credits and set credit pkt count to max allowed */
			cfg =  (tx_credits << 12) | (0x1FF << 2) | BIT_ULL(1);
			cfg |= FIELD_PREP(NIX_AF_LINKX_MCS_CNT_MASK, nix_hw->cc_mcs_cnt);

			link = iter + slink;
			nix_hw->tx_credits[link] = tx_credits;
			rvu_write64(rvu, blkaddr,
				    NIX_AF_TX_LINKX_NORM_CREDIT(link), cfg);
		}
	}

	/* Set Tx credits for LBK link */
	slink = hw->cgx_links;
	for (link = slink; link < (slink + hw->lbk_links); link++) {
		tx_credits = rvu_get_lbk_link_credits(rvu, lbk_max_frs);
		nix_hw->tx_credits[link] = tx_credits;
		/* Enable credits and set credit pkt count to max allowed */
		tx_credits =  (tx_credits << 12) | (0x1FF << 2) | BIT_ULL(1);
		rvu_write64(rvu, blkaddr,
			    NIX_AF_TX_LINKX_NORM_CREDIT(link), tx_credits);
	}
}

static int nix_calibrate_x2p(struct rvu *rvu, int blkaddr)
{
	int idx, err;
	u64 status;

	/* Start X2P bus calibration */
	rvu_write64(rvu, blkaddr, NIX_AF_CFG,
		    rvu_read64(rvu, blkaddr, NIX_AF_CFG) | BIT_ULL(9));
	/* Wait for calibration to complete */
	err = rvu_poll_reg(rvu, blkaddr,
			   NIX_AF_STATUS, BIT_ULL(10), false);
	if (err) {
		dev_err(rvu->dev, "NIX X2P bus calibration failed\n");
		return err;
	}

	status = rvu_read64(rvu, blkaddr, NIX_AF_STATUS);
	/* Check if CGX devices are ready */
	for (idx = 0; idx < rvu->cgx_cnt_max; idx++) {
		/* Skip when cgx port is not available */
		if (!rvu_cgx_pdata(idx, rvu) ||
		    (status & (BIT_ULL(16 + idx))))
			continue;
		dev_err(rvu->dev,
			"CGX%d didn't respond to NIX X2P calibration\n", idx);
		err = -EBUSY;
	}

	/* Check if LBK is ready */
	if (!(status & BIT_ULL(19))) {
		dev_err(rvu->dev,
			"LBK didn't respond to NIX X2P calibration\n");
		err = -EBUSY;
	}

	/* Clear 'calibrate_x2p' bit */
	rvu_write64(rvu, blkaddr, NIX_AF_CFG,
		    rvu_read64(rvu, blkaddr, NIX_AF_CFG) & ~BIT_ULL(9));
	if (err || (status & 0x3FFULL))
		dev_err(rvu->dev,
			"NIX X2P calibration failed, status 0x%llx\n", status);
	if (err)
		return err;
	return 0;
}

static int nix_aq_init(struct rvu *rvu, struct rvu_block *block)
{
	u64 cfg;
	int err;

	/* Set admin queue endianness */
	cfg = rvu_read64(rvu, block->addr, NIX_AF_CFG);
#ifdef __BIG_ENDIAN
	cfg |= BIT_ULL(8);
	rvu_write64(rvu, block->addr, NIX_AF_CFG, cfg);
#else
	cfg &= ~BIT_ULL(8);
	rvu_write64(rvu, block->addr, NIX_AF_CFG, cfg);
#endif

	/* Do not bypass NDC cache */
	cfg = rvu_read64(rvu, block->addr, NIX_AF_NDC_CFG);
	cfg &= ~0x3FFEULL;
#ifdef CONFIG_NDC_DIS_DYNAMIC_CACHING
	/* Disable caching of SQB aka SQEs */
	cfg |= 0x04ULL;
#endif
	rvu_write64(rvu, block->addr, NIX_AF_NDC_CFG, cfg);

	/* Result structure can be followed by RQ/SQ/CQ context at
	 * RES + 128bytes and a write mask at RES + 256 bytes, depending on
	 * operation type. Alloc sufficient result memory for all operations.
	 */
	err = rvu_aq_alloc(rvu, &block->aq,
			   Q_COUNT(AQ_SIZ


import numpy as np

def entanglement_score(r: np.ndarray, f: np.ndarray) -> float:
    """
    Compute the "entanglement score" between a retain set and a forget set, both
    being collections of d-dimensional embeddings.

    The score compares the average intra-group variance within each set (retain and forget)
    to the variance between their means and the combined mean, providing a measure
    of how distinct or separable these two groups are.

    Reference
    ---------
    Zhao, Kairan, et al. "What makes unlearning hard and what to do about it."
    arXiv preprint arXiv:2406.01257 (2024).

    Parameters
    ----------
    r : np.ndarray
        A numpy array of shape (n, d), representing the retain set with n embeddings
        each of dimension d.
    f : np.ndarray
        A numpy array of shape (m, d), representing the forget set with m embeddings
        each of dimension d.

    Returns
    -------
    float
        The entanglement score, a non-negative number that reflects the relationship
        between intra-group variance and inter-group variance.

    Raises
    ------
    ValueError
        If the denominator is zero, which means the means of r and f coincide with
        the combined mean, making the score undefined.
    """
    mu_r = r.mean(axis=0)  # shape (d,)
    mu_f = f.mean(axis=0)  # shape (d,)

    combined = np.vstack((r, f))
    mu_combined = combined.mean(axis=0)  # shape (d,)

    # Compute numerator (sum of intra-group variances)
    diff_r = r - mu_r  # shape (n, d)
    diff_f = f - mu_f  # shape (m, d)

    numerator_part_r = np.sum(diff_r**2) / r.shape[0]
    numerator_part_f = np.sum(diff_f**2) / f.shape[0]
    numerator = numerator_part_r + numerator_part_f

    # Compute denominator (variance of the group means around the combined mean)
    diff_mu_r = mu_r - mu_combined
    diff_mu_f = mu_f - mu_combined
    denominator = 0.5 * (np.sum(diff_mu_r**2) + np.sum(diff_mu_f**2))

    if denominator == 0:
        raise ValueError("Denominator is zero, cannot compute entanglement score.")

    es_value = numerator / denominator
    return float(es_value)


card_short_description}}

  `
})

export class SwingContainer {
    @ViewChild('myswing1') swingStack: SwingStackComponent;
    @ViewChildren('mycards1') swingCards: QueryList<SwingCardComponent>;

    cards: Array<any>;

    constructor() {

        console.log('in the ctor');

        this.cards = [
        // { name: 'joyful', symbol: '♣', svg:'img/ACTIVE/ACTIVE-joyful.svg' },
        // { name: 'generous', symbol: '♦', svg:'img/ACTIVE/ACTIVE-generous.svg' },
        // { name: 'optimistic', symbol: '♠', svg:'img/ACTIVE/ACTIVE-optimistic.svg' },
        // { name: 'persistent', symbol: '♥', svg:'img/ACTIVE/ACTIVE-persistent.svg' },
        // { name: 'positive', symbol: '☼', svg:'img/ACTIVE/ACTIVE-positive.svg' },
        // { name: 'principled', symbol: '♂', svg:'img/ACTIVE/ACTIVE-principled.svg' },
        // { name: 'reliable', symbol: '♀', svg:'img/ACTIVE/ACTIVE-reliable.svg' },
        // { name: 'appreciative', symbol: '☆', svg:'img/CONNECTED/CONNECTED-appreciative.svg' },
        // { name: 'caring', symbol: '✿', svg:'img/CONNECTED/CONNECTED-caring.svg' },
        // { name: 'committed', symbol: '➷', svg:'img/CONNECTED/CONNECTED-committed.svg' },
        // { name: 'empathique', symbol: '☆', svg:'img/CONNECTED/CONNECTED-empathique.svg' },
        // { name: 'loyal', symbol: '✿', svg:'img/CONNECTED/CONNECTED-loyal.svg' },
        // { name: 'responsible', symbol: '➷', svg:'img/CONNECTED/CONNECTED-responsible.svg' },
        // { name: 'trustworthy', symbol: '➷', svg:'img/CONNECTED/CONNECTED-trustworthy.svg' },
        { name: 'ambitious', symbol: '☆', svg:'img/FLOURISHING/FLOURISHING-ambitious.svg', card_short_description: "I formulate important goals for the future",
				card_long_description : "An ambitious person wants to achieve. An ambitious person has a strong desire for success and will use exceptional effort to achieve their goals." },
        { name: 'creative', symbol: '✿', svg:'img/FLOURISHING/FLOURISHING-creative.svg', card_short_description: "I have lots of new ideas",
				card_long_description : "If you are creative you use your imagination and are good at thinking of new ideas, or creating an inspired piece of work."},
        { name: 'curious', symbol: '➷', svg:'img/FLOURISHING/FLOURISHING-curious.svg', card_short_description: "I like to find out about new things",
				card_long_description : "A curious person has a desire to know more about things, and is eager to learn and explore." },
        { name: 'hard-working', symbol: '☆', svg:'img/FLOURISHING/FLOURISHING-hard-working.svg', card_short_description: "I always try my best",
				card_long_description : "Hardworking people are conscientious, productive and will persevere when carrying out tasks. They will invest time and energy and will always use their best efforts." },
        { name: 'open-minded', symbol: '✿', svg:'img/FLOURISHING/FLOURISHING-open-minded.svg', card_short_description: "I listen to new ideas even if I disagree with them",


);
	meshBuilder.Position3f(End[0] + ViewUp[0] * GIZMO_HANDLE_WIDTH, End[1] + ViewUp[1] * GIZMO_HANDLE_WIDTH, End[2] + ViewUp[2] * GIZMO_HANDLE_WIDTH);
	meshBuilder.Color3ub(red, green, blue);
	meshBuilder.AdvanceVertex();

	meshBuilder.TexCoord2f( 0, 0, 1);
	meshBuilder.Position3f(Start[0] + ViewUp[0] * GIZMO_HANDLE_WIDTH, Start[1] + ViewUp[1] * GIZMO_HANDLE_WIDTH, Start[2] + ViewUp[2] * GIZMO_HANDLE_WIDTH);
	meshBuilder.AdvanceVertex();

	meshBuilder.End();
	pMesh->Draw();

	pRender->EndRenderHitTarget();

	//
	// Draw the second segment of the gizmo axis.
	//
	Start = End;
	VectorMA(Origin, 0.5, Axis, End);

	pRender->BindTexture( g_pAxisTexture );

	pMesh = pRenderContext->GetDynamicMesh( );
	meshBuilder.Begin( pMesh, MATERIAL_POLYGON, 4 );

	meshBuilder.TexCoord2f( 0, 0, 0);
	meshBuilder.Position3f(Start[0] - ViewUp[0] * GIZMO_AXIS_WIDTH, Start[1] - ViewUp[1] * GIZMO_AXIS_WIDTH, Start[2] - ViewUp[2] * GIZMO_AXIS_WIDTH);
	meshBuilder.Color3ub(red, green, blue);
	meshBuilder.AdvanceVertex();

	meshBuilder.TexCoord2f( 0, 2, 0);
	meshBuilder.Position3f(End[0] - ViewUp[0] * GIZMO_AXIS_WIDTH, End[1] - ViewUp[1] * GIZMO_AXIS_WIDTH, End[2] - ViewUp[2] * GIZMO_AXIS_WIDTH);
	meshBuilder.AdvanceVertex();
	meshBuilder.Color3ub(red, green, blue);

	meshBuilder.TexCoord2f( 0, 2, 1);
	meshBuilder.Position3f(End[0] + ViewUp[0] * GIZMO_AXIS_WIDTH, End[1] + ViewUp[1] * GIZMO_AXIS_WIDTH, End[2] + ViewUp[2] * GIZMO_AXIS_WIDTH);
	meshBuilder.Color3ub(red, green, blue);
	meshBuilder.AdvanceVertex();

	meshBuilder.TexCoord2f( 0, 0, 1);
	meshBuilder.Position3f(Start[0] + ViewUp[0] * GIZMO_AXIS_WIDTH, Start[1] + ViewUp[1] * GIZMO_AXIS_WIDTH, Start[2] + ViewUp[2] * GIZMO_AXIS_WIDTH);
	meshBuilder.Color3ub(red, green, blue);
	meshBuilder.AdvanceVertex();

	meshBuilder.End();
	pMesh->Draw();

	//
	// Draw the rotate handle.
	//
	Start = End;
	VectorMA(Origin, 0.6, Axis, End);

	pRender->BeginRenderHitTarget(this, uAxisHandle + GIZMO_HANDLE_ROTATE);

	pRender->BindTexture( g_pRotateHandleTexture );
	pMesh = pRenderContext->GetDynamicMesh( );
	meshBuilder.Begin( pMesh, MATERIAL_POLYGON, 4 );

	meshBuilder.TexCoord2f( 0, 0, 0);
	meshBuilder.Position3f(Start[0] - ViewUp[0] * GIZMO_HANDLE_WIDTH, Start[1] - ViewUp[1] * GIZMO_HANDLE_WIDTH, Start[2] - ViewUp[2] * GIZMO_HANDLE_WIDTH);
	meshBuilder.Color3ub(red, green, blue);
	meshBuilder.AdvanceVertex();

	meshBuilder.TexCoord2f( 0, 1, 0);
	meshBuilder.Position3f(End[0] - ViewUp[0] * GIZMO_HAN


type': type.name, 'cell': cell.toBase64()};
  }
}

/// Represents a tuple item containing a slice.
class TupleItemSlice extends TupleItemCell {
  const TupleItemSlice(super.cell);
  factory TupleItemSlice.fromJson(Map<String, dynamic> json) {
    TupleItemTypes.fromName(json['type'], expected: TupleItemTypes.sliceItem);
    final cell = TonHelper.tryToCell(json['cell']);
    if (cell == null) {
      throw TupleException('Invalid Slice string hex or base64');
    }
    return TupleItemSlice(cell);
  }
  factory TupleItemSlice.fromTvm(Map<String, dynamic> json) {
    TupleItemTypes.fromName(json['@type'], expected: TupleItemTypes.sliceItem);
    final cell = TonHelper.tryToCell(json['bytes']);
    if (cell == null) {
      throw TupleException('Invalid Slice string hex or base64');
    }
    return TupleItemSlice(cell);
  }
  @override
  TupleItemTypes get type => TupleItemTypes.sliceItem;
  @override
  bool operator ==(other) {
    if (super == other) {
      other as TupleItemSlice;
      return other.cell == cell;
    }
    return false;
  }

  @override
  int get hashCode => super.hashCode ^ cell.hashCode;
}

///  Represents a tuple item containing a builder.
class TupleItemBuilder extends TupleItemCell {
  const TupleItemBuilder(super.cell);
  factory TupleItemBuilder.fromJson(Map<String, dynamic> json) {
    TupleItemTypes.fromName(json['type'], expected: TupleItemTypes.builderItem);
    final cell = TonHelper.tryToCell(json['cell']);
    if (cell == null) {
      throw TupleException('Invalid builder string hex or base64');
    }
    return TupleItemBuilder(cell);
  }
  factory TupleItemBuilder.fromTvm(Map<String, dynamic> json) {
    TupleItemTypes.fromName(json['@type'],
        expected: TupleItemTypes.builderItem);
    final cell = TonHelper.tryToCell(json['bytes']);
    if (cell == null) {
      throw TupleException('Invalid builder string hex or base64');
    }
    return TupleItemBuilder(cell);
  }
  @override
  TupleItemTypes get type => TupleItemTypes.builderItem;
  @override
  bool operator ==(other) {
    if (super == other) {
      other as TupleItemBuilder;
      return other.cell == cell;
    }
    return false;
  }

  @override
  int get hashCode => super.hashCode ^ cell.hashCode;
}
import 'package:ton_dart/src/boc/bit/builder.dart';
import 'package:ton_dart/src/boc/cell/cell.dart';
import 'package:ton_dart/src/boc/cell/slice.dart';
import 'package:ton_dart/src/models/models/common_message_info_relaxed.dart';
import 'package:ton_dart/src/models/models/state_init.dart';
import 'package:ton_dart/src/serialization/serialization.dart';
import 'package:ton_dart/src/utils/utils/extensions.dart';

/// Source: https://github.com/ton-blockchain/ton/blob/24dc184a2ea67f9c47042b4104bbb4d82289fac1/crypto/block/block.tlb#L151
/// message$_ {X:Type} info:CommonMsgInfoRelaxed
///  init:(Maybe (Either StateInit ^StateInit))
///  body:(Either X ^X) = MessageRelaxed X;
class MessageRelaxed extends TonSerialization {
  /// The information related to the message, including type (internal or external).
  final CommonMessageInfoRelaxed info;

  /// Optional state initialization data, if present.
  final StateInit? init;

  /// The body of the mess


21 = 2,097,152개
- 호스트 수: 각 네트워크당 `2^8 - 2` = 254개

![](/assets/images/2024/2024-10-06-23-12-53.png)

> C클래스로 나타낼 수 있는 IP 주소 범위

`192.0.0.0` - `223.255.255.255`

따라서, 가장 처음 옥텟의 주소가 `192-223`일 경우 C클래스 주소임을 짐작할 수 있다.

![](/assets/images/2024/2024-10-06-23-13-32.png)

## 3.5 주소 체계의 예외

> 호스트의 주소 공간을 모두 사용할 수 있는 것은 아니다.

- 호스트 주소가 전부 0인 IP 주소
  - 해당 네트워크 자체를 의미하는 **네트워크 주소**로 사용된다.
  - e.g.,`223.1.1.0`
- 호스트 주소가 전부 1인 IP 주소
  - **브로드캐스트 주소**로 사용된다.
  - e.g., `223.1.1.255`

    ![](/assets/images/2024/2024-10-06-23-15-17.png)

이것이 바로 호스트 IP 주소에 `-2`를 하는 이유이다.

## 3.6 클래스별 할당 가능한 주소의 개수 정리

> 클래스별 할당 가능한 주소의 개수는 `-2`를 뺀 수와 같다.

호스트 주소의 개수를 계산할 때 네트워크 주소와 브로드캐스트 주소를 제외해야 한다는 의미이다.

![](/assets/images/2024/2024-10-06-23-16-48.png)

## 3.7 클래스풀 주소 체계의 한계

> 클래스별 네트워크 크기가 고정되어 있어 여전히 낭비되는 IP 주소가 많을 수 있다.

- A클래스 네트워크 하나 당 할당 가능한 호스트: 1600만개 이상
- B클래스 네트워크 하나 �


ão removidos, causando a necessidade de um novo parse no DOM, ou quando uma tab do navegador com a árvore DOM usada é fechada. Após o refresh da árvore DOM, todo o processo acima é refeito, com attach chamando o RenderStyle, que montado chama o método style() do RenderObject que acessa o CSS BOX model.

          Como os navegadores interpretam todos estes elementos criados por DOM e Render Tree antes de aplicar o estilo?

          Todo navegador tem uma lista de elementos HTML suportados. Quando o seu markup possui tags presentes na lista, a árvore DOM é montada e o processo de attachment começa logo na sequência e os estilos são aplicados, dando continuidade a criação da Render tree.

            O grande problema é que cada navegador tem a sua própria lista, que trata situações similares de maneiras diferentes. Obviamente já sabemos que o navegador que mais apresenta problemas para as situações acima é o Internet Explorer, mas acredite, todos os navegadores apresentam problemas quando um elemento não está em sua lista de elementos permitidos, e precisa de um trabalho para fazer tudo acontecer na Render Tree como deve ser feito.

              Elementos fora desta lista são tratados como Elementos desconhecidos. E eles são uma grande fonte de problemas:

                Como estilizar este elemento?Por exemplo, a tag
 tem por padrão espacamento no topo e bottom,
 possui uma indentação automática adicionando uma margem à esquerda ou
 tem uma fonte maior que o
 por ser um cabeçalho. Tudo isso esta padronizado, mas como cuidar de algo que não existe?

                Como este elemento deve aparecer na árvore DOM?Os navegadores também possuem uma lista que mostra quais elementos podem ser filhos de outros elementos. Por exemplo, se você adiciona por engano no seu markup

 o segundo paragrafo implicitamente fechará o primeiro
, fazendo que os dois elementos sejam irmãos (no mesmo nível na árvore DOM) e nao como nós filhos como de maneira linear pode parecer. Porém se vc adiciona um
, este paragrafo inicial não será fechado, porque o navegador permite que  seja filho de elementos de paragrafo, fazendo assim o  ser nó filho de

              Para elementos desconhecidos, a ideia é não estilizar. Caso queira algum estilo em elementos desconhecidos, você deve colocá-lo no nó acima (se necessário um wrapper), para fazer com que ele herde o estilo.

              Perceba a sutileza de como isso funciona. Os dois diagramas mostram uma árvore DOM, montada por um navegador suporte HTML5 nativo e o Internet Explorer 8 (navegadores que não suportam HTML5 tem funcionamento semelhante):

            <div id="attachment_3988" style="width: 570px" class


  /* background-image: url(../assets/ship/power-management.svg); */
  background-size: contain;
  /* background-repeat: no-repeat; */
  padding-top: 1px;
  overflow: hidden;
}

.ship-power-management-image {
  height: 100%;
  width: 98%;
}

.ship-power-subgrid {
  display: grid;
  /* grid-area: ship-requirements; */
  position: relative;
  top: -97%;
  grid-template-columns: 20% 12% 12% 12% 12% 12%;
  left: 6%;
  gap: 0 1.8%;
  grid-template-rows: 33% 47% 48%;
  height: 63%;
  grid-template-areas:
    "pow title title title title title"
    "used . . . . ."
    "avail col1 col2 col3 col4 col5";
  text-align: center;
}

.ship-stat {
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  margin-top: -23%;
  overflow: hidden;
}

.systems-power, .systems-weight {
  grid-area: col1;
}

.cargo-load-weight, .m-drive-power {
  grid-area: col2;
}

.fuel-weight, .j-drive-power {
  grid-area: col3;
}

.vehicle-weight, .sensors-power {
  grid-area: col4;
}

.available-weight, .weapons-power {
  grid-area: col5
}

.power-title {
  color: black;
  font-weight: bold;
  /* position: relative; */
  /* width: 289px; */
  left: 11%;
  border-bottom: none;
  font-size: 2.5ch;
  /* padding: 4px; */
  /* top: -95%; */
  grid-area: title;
  align-self: center;
}

.ship-power-used, .ship-power-avail {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.ship-power-used {
  justify-content: flex-start;
  grid-area: used;
}

.ship-power-avail {
  justify-content: center;
  grid-area: avail;
}

.ship-stat input[type="number"],  .ship-stat-finance input[type="number"] {
  text-align: center;
  /* width: 53px; */
  background-color: transparent;
  border: none;
  height: auto;
  /* margin-top: 5px; */
}

.ship-stat-finance input[type="number"] {
  width: 10ch;
}

.small-font {
  font-size: 10px;
  /* margin-top: -2em; */
}

.red {
  color: var(--s2d6-damage-red);
}

.orange, .orange input, input.item-value-edit.orange {
  color: var(--s2d6-damage-orange);
}

.ship-stat .red input[type="number"]{
  color: var(--s2d6-damage-red);
}

input.power-current.red, input.available-weight.red {
  color: var(--s2d6-damage-red);
}

/*--- Labels ---*/

span.ship-power-label {
  /* display: block; */
  /* width: 75px; */
  font-size: 2ch;
  /* text-align: center; */
  /* position: relative; */
  /* top: -23%; */
  grid-area: pow;
  align-self: center;
}

span.power-now, span.power-max {
  font-size: 1ch;
}

/*--- Input Fields ---*/

input.power-current, input.power-total  {
  font-size


 3.457l1.414-1.414c-.566-.566-.879-1.292-.879-2.043s.313-1.477.879-2.043L7.293 7.293zM14 10.5a2 2 0 0 0-4 0a1.993 1.993 0 0 0 .895 1.666L10.002 22h3.996l-.893-9.835c.54-.358.895-.97.895-1.665z"/>',
    },
    brush: {
      body: '<path fill="currentColor" d="M13.707 2.293a.999.999 0 0 0-1.414 0l-5.84 5.84c-.015-.001-.029-.009-.044-.009a.997.997 0 0 0-.707.293L4.288 9.831a2.985 2.985 0 0 0-.878 2.122c0 .802.313 1.556.879 2.121l.707.707l-2.122 2.122A2.92 2.92 0 0 0 2 19.012a2.968 2.968 0 0 0 1.063 2.308c.519.439 1.188.68 1.885.68c.834 0 1.654-.341 2.25-.937l2.04-2.039l.707.706c1.134 1.133 3.109 1.134 4.242.001l1.415-1.414a.997.997 0 0 0 .293-.707c0-.026-.013-.05-.015-.076l5.827-5.827a.999.999 0 0 0 0-1.414l-8-8zm-.935 16.024a1.023 1.023 0 0 1-1.414-.001l-1.414-1.413a.999.999 0 0 0-1.414 0l-2.746 2.745a1.19 1.19 0 0 1-.836.352a.91.91 0 0 1-.594-.208A.978.978 0 0 1 4 19.01a.959.959 0 0 1 .287-.692l2.829-2.829a.999.999 0 0 0 0-1.414L5.701 12.66a.99.99 0 0 1-.292-.706c0-.268.104-.519.293-.708l.707-.707l7.071 7.072l-.708.706zm1.889-2.392L8.075 9.339L13 4.414L19.586 11l-4.925 4.925z"/>',
    },
    'brush-alt': {
      body: '<path fill="currentColor" d="M19 8.001h-4V4.999a2.92 2.92 0 0 0-.874-2.108a2.943 2.943 0 0 0-2.39-.879C10.202 2.144 9 3.508 9 5.117V8H5c-1.103 0-2 .897-2 2v10c0 1.103.897 2 2 2h14c1.103 0 2-.897 2-2v-9.999c0-1.103-.897-2-2-2zM5 10h6V5.117c0-.57.407-1.07 1.002-1.117c.266 0 .512.103.712.307a.956.956 0 0 1 .286.692V10h.995l.005.001h5V12H5v-2zm0 10v-6h14l.002 6H5z"/>',
    },
    bug: {
      body: '<path fill="currentColor" d="m16.895 6.519l2.813-2.812l-1.414-1.414l-2.846 2.846a6.575 6.575 0 0 0-.723-.454a5.778 5.778 0 0 0-5.45 0c-.25.132-.488.287-.722.453L5.707 2.293L4.293 3.707l2.813 2.812A8.473 8.473 0 0 0 5


 {
      const el = instance.msg('foobar');
      assert.equal(el.tagName, 'GR-LABEL');
      assert.equal(el.textContent, 'foobar');
    });

    test('div', () => {
      const el1 = document.createElement('span');
      el1.textContent = 'foo';
      const el2 = document.createElement('div');
      el2.textContent = 'bar';
      const div = instance.div(el1, el2);
      assert.equal(div.tagName, 'DIV');
      assert.equal(div.textContent, 'foobar');
    });

    test('button', () => {
      const clickStub = sandbox.stub();
      const button = instance.button('foo', {onclick: clickStub});
      MockInteractions.tap(button);
      flush(() => {
        assert.isTrue(clickStub.called);
        assert.equal(button.textContent, 'foo');
      });
    });

    test('checkbox', () => {
      const el = instance.checkbox();
      assert.equal(el.tagName, 'INPUT');
      assert.equal(el.type, 'checkbox');
    });

    test('label', () => {
      const fakeMsg = {};
      const fakeCheckbox = {};
      sandbox.stub(instance, 'div');
      sandbox.stub(instance, 'msg').returns(fakeMsg);
      instance.label(fakeCheckbox, 'foo');
      assert.isTrue(instance.div.calledWithExactly(fakeCheckbox, fakeMsg));
    });

    test('call', () => {
      instance.action = {
        method: 'METHOD',
        __key: 'key',
        __url: '/changes/1/revisions/2/foo~bar',
      };
      const sendStub = sandbox.stub().returns(Promise.resolve());
      sandbox.stub(plugin, 'restApi').returns({
        send: sendStub,
      });
      const payload = {foo: 'foo'};
      const successStub = sandbox.stub();
      instance.call(payload, successStub);
      assert.isTrue(sendStub.calledWith(
          'METHOD', '/changes/1/revisions/2/foo~bar', payload));
    });
  });
</script>
<!DOCTYPE html>
<!--
Copyright (C) 2017 The Android Open Source Project

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->

<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
<title>gr-plugin-endpoints</title>

<script src="../../../bower_components/webcomponentsjs/webcomponents-lite.min.js"></script>
<script src="../../../bower_components/web-component-tester/browser.js"></script>
<link rel="import" href="../../../test/common-test-setup.html"/>
<link rel="import" href="gr-js-api-interface.html"/>

<script>
  suite('gr-plugin-endpoints tests', () => {
    let sandbox;
    let instance;
    let pluginFoo;
    let pluginBar;
    let domHook;

    setup(() => {
      sandbox = sinon.sandbox.create();
      domHook = {};
      instance = new GrPluginEndpoints();
      Gerrit.install(p => { pluginFoo = p; }, '0.1',
          'http://test.com/plugins/testplugin/static/foo.html');
      instance.regi


 create a virtual environment at this point

The development dependencies are stored in `requirements.txt`

`pip install -r requirements.txt`

### Adding a new dependency

1. Add the dependency to `pyproject.toml` in the `dependencies` field or `project.optional-dependencies.st` if it is streamlit-only
2. Run `pip-compile --extra=dev --extra=st pyproject.toml` to regenerate `requirements.txt`
3. Re-run `pip install -r requirements.txt` to download and install the new dependency

### Hot realoading of the streamlit app

If you are developing using the streamlit interface, you might want to enable streamlit hot realoading whever you modify a file anywhere in the `monjour` package. This can be achieved by adding the repo root directory to the PYTHONPATH environment variable before running monjour

On posix systems run this from the root directory after you entered the virtual environment:
```sh
PYTHONPATH="$PYTHONPATH;$(pwd)"
```

On windows (powershell)
```poweshell
$env:PYTHONPATH="$env:PYTHONPATH;$(pwd).Path"
```

On windows (cmd)
```batch
set PYTHONPATH=%PYTHONPATH%;%~dp0
```
# Ade-elementary-circuits

Johnson's algorithm for finding all elementary circuits in a directed graph
SIAM J. Comput., Vol. 4, No. 1, March 1975
https://www.cs.tufts.edu/comp/150GA/homeworks/hw1/Johnson%2075.PDF

## Installation

Add this to your `Cargo.toml`:

```toml
[dependencies]
ade-elementary-circuits = "0.1.0"
```

## Usage Example

This example demonstrates how to use the `elementary_circuits` function to find all elementary circuits in a directed graph.

```rust
use ade_elementary_circuits::elementary_circuits;
use ade_graph::utils::build::build_graph;

fn main() {
    // Define a graph with nodes 0, 1, 2 and edges (0, 1), (1, 2), (2, 1).
    // This graph has one elementary circuit: 1 -> 2 -> 1.
    let graph = build_graph(vec![0, 1, 2], vec![(0, 1), (1, 2), (2, 1)]);

    // Find all elementary circuits in the graph.
    let circuits = elementary_circuits(&graph);

    // The expected result is a vector containing one circuit: [1, 2, 1].
    let expected = vec![vec![1, 2, 1]];

    // Print the found circuits.
    println!("Found circuits: {:?}", circuits);
    assert_eq!(circuits, expected);
}
```

## Documentation

The complete documentation is available on [docs.rs](https://docs.rs/ade-elementary-circuits).

## License

Licensed under either of

* Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)
* MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)

at your option.

## Benchmark

```
# Run benchmarks within a crate
cargo bench --bench elementary_circuits_bench --features="test-utils"

# Save baseline
cargo bench --bench elementary_circuits_bench --features="test-utils" -- --save-baseline before_optimization

# Compare with baseline
cargo bench --bench elementary_circuits_bench --features="test-utils" -- --baseline before_optimization
```
# Ade-multi-sort

`ade-multi-sort` is a utility crate designed for sorting data based on multiple criteria. It provides a flexible way to apply a series of sorting rules to a collection.

## Installation

Add this to your `Cargo.toml`:

```toml
[dependencies]
ade-multi-sort = "0.1.0"
```

## Usa


 in the exhibition":"展品",
"an equal failing":"同样的缺点",
"an eruption of the body":"出疹子",
"an essential prerequisite":"必要条件",
"an eternity box":"棺材",
"an even bet":"输赢机会参半的打赌,成败机会相等,一对一的赌注",
"an evening of bridge":"桥牌晚会",
"an evil eye":"狠毒的目光",
"an excess of":"过多的…",
"an export list":"出口商品目录",
"an external angle":"n. 外角",
"an eye for an eye":"以眼还眼, 报复",
"an heir at law":"法定继承人,合法继承人",
"an hero":"",
"An hour in the morning is worth two in the evenin":"st. 一日之计在于晨.",
"an idle phrase":"空话",
"an imitation diamond":"人造钻石",
"an increasing number of":"越来越多的…",
"an index of the mind":"思想的反映",
"an inking pad":"印台,印泥",
"an inside address":"n. 信址上的名址",
"an internal angle":"n. 内角",
"an inveterate disease":"n. 宿疾",
"an iron fist in a velvet glove":"外柔内刚",
"an iron hand in a velvet glove":"外柔中刚,笑面虎,笑里藏刀,口蜜腹剑",
"an iron ration":"浓缩食物",
"an item of news":"一条消息,一则新闻",
"An Nafud":"= Nafud Desert",
"An Nefud":"[网络] 一个Nefud",
"an obscure retreat":"隐居处,香格里拉",
"an obscure village":"穷乡僻壤",
"an observation balloon":"气象观测气球",
"an obstacle to progress":"前进的障碍",
"an obtuse angle":"n. 钝角",
"an odd lot":"不成整数的一批货",
"an odd man out":"不合群者,难以与人相处者;单下来的一个人",
"an off chance":"极微的希望",
"an official residence":"官邸",
"an old bird":"怪人",
"an old campaigner":"老练的人",
"an old head on young shoulders":"n. 少年老成",
"an old hen":"讨厌的人, 泼妇",
"an old maid":"老处女",
"an old shell":"水手",
"an old sweat":"老兵,老手",
"an open account":"未结算的帐目",
"an open book":"尽人皆知的事",
"an open mind":"虚心",
"an open question":"未解决的问题",
"a


14 */	add r0, r0, r3
/* 8014CBEC 00149B2C  1C 00 00 1E */	mulli r0, r0, 0x1e
/* 8014CBF0 00149B30  1C 65 00 1E */	mulli r3, r5, 0x1e
/* 8014CBF4 00149B34  7C 00 20 50 */	subf r0, r0, r4
/* 8014CBF8 00149B38  7C 00 D8 00 */	cmpw r0, r27
/* 8014CBFC 00149B3C  7C 03 38 50 */	subf r0, r3, r7
/* 8014CC00 00149B40  41 81 01 34 */	bgt .L_8014CD34
/* 8014CC04 00149B44  7C 1B 00 00 */	cmpw r27, r0
/* 8014CC08 00149B48  41 81 01 2C */	bgt .L_8014CD34
/* 8014CC0C 00149B4C  80 6D 94 90 */	lwz r3, playData__4Game@sda21(r13)
/* 8014CC10 00149B50  56 84 04 3E */	clrlwi r4, r20, 0x10
/* 8014CC14 00149B54  80 1C 00 48 */	lwz r0, 0x48(r28)
/* 8014CC18 00149B58  80 A3 00 E4 */	lwz r5, 0xe4(r3)
/* 8014CC1C 00149B5C  54 03 20 36 */	slwi r3, r0, 4
/* 8014CC20 00149B60  38 63 00 08 */	addi r3, r3, 8
/* 8014CC24 00149B64  7C 65 1A 14 */	add r3, r5, r3
/* 8014CC28 00149B68  48 2C F7 D5 */	bl isFlag__8BitFlagsFUs
/* 8014CC2C 00149B6C  54 60 06 3F */	clrlwi. r0, r3, 0x18
/* 8014CC30 00149B70  40 82 01 04 */	bne .L_8014CD34
/* 8014CC34 00149B74  80 BC 00 1C */	lwz r5, 0x1c(r28)
/* 8014CC38 00149B78  38 61 02 98 */	addi r3, r1, 0x298
/* 8014CC3C 00149B7C  80 DA 00 14 */	lwz r6, 0x14(r26)
/* 8014CC40 00149B80  38 9F 02 2C */	addi r4, r31, 0x22c
/* 8014CC44 00149B84  4C C6 31 82 */	crclr 6
/* 8014CC48 00149B88  4B F7 A7 F1 */	bl sprintf
/* 8014CC4C 00149B8C  38 00 00 00 */	li r0, 0
/* 8014CC50 00149B90  38 61 02 98 */	addi r3, r1, 0x298
/* 8014CC54 00149B94  90 01 00 08 */	stw r0, 8(r1)
/* 8014CC58 00149B98  38 80 00 00 */	li r4, 0
/* 8014CC5C 00149B9C  38 A0 00 00 */	li r5, 0
/* 8014CC60 00149BA0  38 C0 00 00 */	li r6, 0
/* 8014CC64 00149BA4  38 E0 00 00 */	li r7, 0
/* 8014CC68 00149BA8  39 00 00 02 */	li r8, 2
/* 8014CC6C 00149BAC  39 20 00 00 */	li r9, 0
/* 8014CC70 00149BB0  39 40 00 00 */	li r10, 0
/* 8014CC74 00149BB4  4B ED 25 15 */	bl loadToMainRAM__12JKRDvdRipperFPCcPUc15JKRExpandSwitchUlP7JKRHeapQ212JKRDvdRipper15EAllocDi


 of the room to be joined.
    pub async fn join_room_by_id(&self, room_id: &RoomId) -> HttpResult<join_room_by_id::Response> {
        let request = join_room_by_id::Request::new(room_id);
        self.send(request, None).await
    }

    /// Join a room by `RoomId`.
    ///
    /// Returns a `join_room_by_id_or_alias::Response` consisting of the
    /// joined rooms `RoomId`.
    ///
    /// # Arguments
    ///
    /// * `alias` - The `RoomId` or `RoomAliasId` of the room to be joined.
    /// An alias looks like `#name:example.com`.
    pub async fn join_room_by_id_or_alias(
        &self,
        alias: &RoomOrAliasId,
        server_names: &[Box<ServerName>],
    ) -> HttpResult<join_room_by_id_or_alias::Response> {
        let request = assign!(join_room_by_id_or_alias::Request::new(alias), {
            server_name: server_names,
        });
        self.send(request, None).await
    }

    /// Search the homeserver's directory of public rooms.
    ///
    /// Sends a request to "_matrix/client/r0/publicRooms", returns
    /// a `get_public_rooms::Response`.
    ///
    /// # Arguments
    ///
    /// * `limit` - The number of `PublicRoomsChunk`s in each response.
    ///
    /// * `since` - Pagination token from a previous request.
    ///
    /// * `server` - The name of the server, if `None` the requested server is
    ///   used.
    ///
    /// # Examples
    /// ```no_run
    /// use matrix_sdk::Client;
    /// # use std::convert::TryInto;
    /// # use url::Url;
    /// # let homeserver = Url::parse("http://example.com").unwrap();
    /// # let limit = Some(10);
    /// # let since = Some("since token");
    /// # let server = Some("servername.com".try_into().unwrap());
    /// # use futures::executor::block_on;
    /// # block_on(async {
    ///
    /// let mut client = Client::new(homeserver).await.unwrap();
    ///
    /// client.public_rooms(limit, since, server).await;
    /// # });
    /// ```
    pub async fn public_rooms(
        &self,
        limit: Option<u32>,
        since: Option<&str>,
        server: Option<&ServerName>,
    ) -> HttpResult<get_public_rooms::Response> {
        let limit = limit.map(UInt::from);

        let request = assign!(get_public_rooms::Request::new(), {
            limit,
            since,
            server,
        });
        self.send(request, None).await
    }

    /// Create a room using the `RoomBuilder` and send the request.
    ///
    /// Sends a request to `/_matrix/client/r0/createRoom`, returns a
    /// `create_room::Response`, this is an empty response.
    ///
    /// # Arguments
    ///
    /// * `room` - The easiest way to create this request is using the
    /// `create_room::Request` itself.
    ///
    /// # Examples
    /// ```no_run
    /// use matrix_sdk::Client;
    /// # use matrix_sdk::ruma::api::client::r0::room::{
    /// #     create_room::Request as CreateRoomRequest,
    /// #     Visibility,
    /// # };
    /// # use url::Url;
    ///
    /// # use futures::executor::block_on;
    /// # block_on(async {
    /// # let homeserver = Url::parse("http://example.com").unwrap();
    /// let request = CreateRoomRequest::new();
    /// let c