code field but not including the size field.|
| 0x02   | 2 / Little        | uint16 | opcode | Opcode that determines which fields the message contains.|

### Body

| Offset | Size / Endianness | Type | Name | Comment |
| ------ | ----------------- | ---- | ---- | ------- |
| 0x04 | 2 / Little | u16 | new_spell_id |  |
| 0x06 | 2 / Little | u16 | old_spell_id |  |

## Client Version 3.3.5

### Wowm Representation

Autogenerated from `wowm` file at [`wow_message_parser/wowm/world/spell/smsg_superceded_spell.wowm:8`](https://github.com/gtker/wow_messages/tree/main/wow_message_parser/wowm/world/spell/smsg_superceded_spell.wowm#L8).
```rust,ignore
smsg SMSG_SUPERCEDED_SPELL = 0x012C {
    Spell new;
    Spell old;
}
```
### Header

SMSG have a header of 4 bytes.

#### SMSG Header

| Offset | Size / Endianness | Type   | Name   | Description |
| ------ | ----------------- | ------ | ------ | ----------- |
| 0x00   | 2 / Big           | uint16 | size   | Size of the rest of the message including the opcode field but not including the size field.|
| 0x02   | 2 / Little        | uint16 | opcode | Opcode that determines which fields the message contains.|

### Body

| Offset | Size / Endianness | Type | Name | Comment |
| ------ | ----------------- | ---- | ---- | ------- |
| 0x04 | 4 / Little | Spell | new |  |
| 0x08 | 4 / Little | Spell | old |  |

# SMSG_GUILD_DECLINE

## Client Version 2.4.3, Client Version 3

### Wowm Representation

Autogenerated from `wowm` file at [`wow_message_parser/wowm/world/guild/smsg_guild_decline.wowm:1`](https://github.com/gtker/wow_messages/tree/main/wow_message_parser/wowm/world/guild/smsg_guild_decline.wowm#L1).
```rust,ignore
smsg SMSG_GUILD_DECLINE = 0x0086 {
    CString player;
}
```
### Header

SMSG have a header of 4 bytes.

#### SMSG Header

| Offset | Size / Endianness | Type   | Name   | Description |
| ------ | ----------------- | ------ | ------ | ----------- |
| 0x00   | 2 **OR** 3 / Big           | uint16 **OR** uint16+uint8 | size | Size of the rest of the message including the opcode field but not including the size field. Wrath server messages **can** be 3 bytes. If the first (most significant) size byte has `0x80` set, the header will be 3 bytes, otherwise it is 2.|
| -      | 2 / Little| uint16 | opcode | Opcode that determines which fields the message contains. |

### Body

| Offset | Size / Endianness | Type | Name | Comment |
| ------ | ----------------- | ---- | ---- | ------- |
| - | - / - | CString | player |  |

# TransferAbortReason

## Client Versi


.
 * @param {number} syncEveryFrames The frequency at which the weights are copied
 *   from the online DQN of the agent to the target DQN, in number of frames.
 * @param {string} savePath Path to which the online DQN of the agent will be
 *   saved upon the completion of the training.
 * @param {string} logDir Directory to which TensorBoard logs will be written
 *   during the training. Optional.
 */
export async function train(
    agent:SnakeGameAgent, batchSize:number, gamma:number, learningRate:number, cumulativeRewardThreshold:number,
    maxNumFrames:number, syncEveryFrames:number, savePath:string, logDir:string) {
  let summaryWriter;
  if (logDir != null) {
    summaryWriter = tf.node.summaryFileWriter(logDir);
  }

  for (let i = 0; i < agent.replayBufferSize; ++i) {
    agent.playStep();
  }

  // Moving averager: cumulative reward across 100 most recent 100 episodes.
  const rewardAverager100 = new MovingAverager(100);
  // Moving averager: fruits eaten across 100 most recent 100 episodes.
  const eatenAverager100 = new MovingAverager(100);

  const optimizer = tf.train.adam(learningRate);
  let tPrev = new Date().getTime();
  let frameCountPrev = agent.frameCount;
  let averageReward100Best = -Infinity;
  while (true) {
    agent.trainOnReplayBatch(batchSize, gamma, optimizer);
    const {cumulativeReward, done, fruitsEaten} = agent.playStep();
    if (done) {
      const t = new Date().getTime();
      const framesPerSecond =
          (agent.frameCount - frameCountPrev) / (t - tPrev) * 1e3;
      tPrev = t;
      frameCountPrev = agent.frameCount;

      rewardAverager100.append(cumulativeReward);
      eatenAverager100.append(fruitsEaten);
      const averageReward100 = rewardAverager100.average();
      const averageEaten100 = eatenAverager100.average();

      console.log(
          `Frame #${agent.frameCount}: ` +
          `cumulativeReward100=${averageReward100.toFixed(1)}; ` +
          `eaten100=${averageEaten100.toFixed(2)} ` +
          `(epsilon=${agent.epsilon.toFixed(3)}) ` +
          `(${framesPerSecond.toFixed(1)} frames/s)`);
      if (summaryWriter != null) {
        summaryWriter.scalar(
            'cumulativeReward100', averageReward100, agent.frameCount);
        summaryWriter.scalar('eaten100', averageEaten100, agent.frameCount);
        summaryWriter.scalar('epsilon', agent.epsilon, agent.frameCount);
        summaryWriter.scalar(
            'framesPerSecond', framesPerSecond, agent.frameCount);
      }
      if (averageReward100 >= cumulativeRewardThreshold ||
          agent.frameCount >= maxNumFrames) {
        // TODO(cais): Save online network.
        break;
      }
      if (averageReward100 > averageReward100Best) {
        averageReward100Best = averageReward100;
        if (savePath != null) {
          if (!fs.existsSync(savePath)) {
            mkdir('-p', savePath);
          }
          await agent.onlineNetwork.save(`file://${savePath}`);
          console.log(`Saved DQN to ${savePath}`);
        }
      }
    }
    if (agent.frameCount % syncEveryFrames === 0) {
      copyWeights(agent.targetNetwork, agent.onlineNetwork);
      console.log('Sync\'ed weights from online network to target network');
    }
  }
}

export function parseArguments() {
  const parser = new argparse.ArgumentParser({
    d


viron.get(
            "wsgi.file_wrapper"
        ):
            # If `wsgi.file_wrapper` is used the WSGI server does not call
            # .close on the response, but on the file wrapper. Patch it to use
            # response.close instead which takes care of closing all files.
            response.file_to_stream.close = response.close
            response = environ["wsgi.file_wrapper"](
                response.file_to_stream, response.block_size
            )
        return response

def get_path_info(environ):
    """Return the HTTP request's PATH_INFO as a string."""
    path_info = get_bytes_from_wsgi(environ, "PATH_INFO", "/")

    return repercent_broken_unicode(path_info).decode()

def get_script_name(environ):
    """
    Return the equivalent of the HTTP request's SCRIPT_NAME environment
    variable. If Apache mod_rewrite is used, return what would have been
    the script name prior to any rewriting (so it's the script name as seen
    from the client's perspective), unless the FORCE_SCRIPT_NAME setting is
    set (to anything).
    """
    if settings.FORCE_SCRIPT_NAME is not None:
        return settings.FORCE_SCRIPT_NAME

    # If Apache's mod_rewrite had a whack at the URL, Apache set either
    # SCRIPT_URL or REDIRECT_URL to the full resource URL before applying any
    # rewrites. Unfortunately not every web server (lighttpd!) passes this
    # information through all the time, so FORCE_SCRIPT_NAME, above, is still
    # needed.
    script_url = get_bytes_from_wsgi(environ, "SCRIPT_URL", "") or get_bytes_from_wsgi(
        environ, "REDIRECT_URL", ""
    )

    if script_url:
        if b"//" in script_url:
            # mod_wsgi squashes multiple successive slashes in PATH_INFO,
            # do the same with script_url before manipulating paths (#17133).
            script_url = _slashes_re.sub(b"/", script_url)
        path_info = get_bytes_from_wsgi(environ, "PATH_INFO", "")
        script_name = script_url[: -len(path_info)] if path_info else script_url
    else:
        script_name = get_bytes_from_wsgi(environ, "SCRIPT_NAME", "")

    return script_name.decode()

def get_bytes_from_wsgi(environ, key, default):
    """
    Get a value from the WSGI environ dictionary as bytes.

    key and default should be strings.
    """
    value = environ.get(key, default)
    # Non-ASCII values in the WSGI environ are arbitrarily decoded with
    # ISO-8859-1. This is wrong for Django websites where UTF-8 is the default.
    # Re-encode to recover the original bytestring.
    return value.encode("iso-8859-1")

def get_str_from_wsgi(environ, key, default):
    """
    Get a value from the WSGI environ dictionary as str.

    key and default should be str objects.
    """
    value = get_bytes_from_wsgi(environ, key, default)
    return value.decode(errors="replace")


ld	[%g4+14*8+0],%l1
	ld	[%g4+14*8+4],%l0
	sllx	%l0,32,%l0
	or	%l1,%l0,%l0
	ld	[%g4+15*8+0],%l2
	ld	[%g4+15*8+4],%l1
	sllx	%l1,32,%l1
	or	%l2,%l1,%l1
	save	%sp,-128,%sp;		or	%g5,%fp,%fp
	cmp	%g2,%g3
	be	SIZE_T_CC,.Lmsquare_16
	nop
	save	%sp,-128,%sp;		or	%g5,%fp,%fp
	ld	[%g3+0*8+0],%i1
	ld	[%g3+0*8+4],%i0
	sllx	%i0,32,%i0
	or	%i1,%i0,%i0
	ld	[%g3+1*8+0],%i2
	ld	[%g3+1*8+4],%i1
	sllx	%i1,32,%i1
	or	%i2,%i1,%i1
	ld	[%g3+2*8+0],%i3
	ld	[%g3+2*8+4],%i2
	sllx	%i2,32,%i2
	or	%i3,%i2,%i2
	ld	[%g3+3*8+0],%i4
	ld	[%g3+3*8+4],%i3
	sllx	%i3,32,%i3
	or	%i4,%i3,%i3
	ld	[%g3+4*8+0],%i5
	ld	[%g3+4*8+4],%i4
	sllx	%i4,32,%i4
	or	%i5,%i4,%i4
	ld	[%g3+5*8+0],%l0
	ld	[%g3+5*8+4],%i5
	sllx	%i5,32,%i5
	or	%l0,%i5,%i5
	ld	[%g3+6*8+0],%l1
	ld	[%g3+6*8+4],%l0
	sllx	%l0,32,%l0
	or	%l1,%l0,%l0
	ld	[%g3+7*8+0],%l2
	ld	[%g3+7*8+4],%l1
	sllx	%l1,32,%l1
	or	%l2,%l1,%l1
	ld	[%g3+8*8+0],%l3
	ld	[%g3+8*8+4],%l2
	sllx	%l2,32,%l2
	or	%l3,%l2,%l2
	ld	[%g3+9*8+0],%l4
	ld	[%g3+9*8+4],%l3
	sllx	%l3,32,%l3
	or	%l4,%l3,%l3
	ld	[%g3+10*8+0],%l5
	ld	[%g3+10*8+4],%l4
	sllx	%l4,32,%l4
	or	%l5,%l4,%l4
	ld	[%g3+11*8+0],%l6
	ld	[%g3+11*8+4],%l5
	sllx	%l5,32,%l5
	or	%l6,%l5,%l5
	ld	[%g3+12*8+0],%l7
	ld	[%g3+12*8+4],%l6
	sllx	%l6,32,%l6
	or	%l7,%l6,%l6
	ld	[%g3+13*8+0],%o7
	ld	[%g3+13*8+4],%l7
	sllx	%l7,32,%l7
	or	%o7,%l7,%l7
	save	%sp,-128,%sp;		or	%g5,%fp,%fp
	ld	[%g3+14*8+0],%i1
	ld


 a bounds check
				if t.indirectkey {
					*(*unsafe.Pointer)(dst.k) = k2 // copy pointer
				} else {
					typedmemmove(t.key, dst.k, k) // copy value
				}
				if t.indirectvalue {
					*(*unsafe.Pointer)(dst.v) = *(*unsafe.Pointer)(v)
				} else {
					typedmemmove(t.elem, dst.v, v)
				}
				dst.i++
				// These updates might push these pointers past the end of the
				// key or value arrays.  That's ok, as we have the overflow pointer
				// at the end of the bucket to protect against pointing past the
				// end of the bucket.
				dst.k = add(dst.k, uintptr(t.keysize))
				dst.v = add(dst.v, uintptr(t.valuesize))
			}
		}
		// Unlink the overflow buckets & clear key/value to help GC.
		if h.flags&oldIterator == 0 && t.bucket.kind&kindNoPointers == 0 {
			b := add(h.oldbuckets, oldbucket*uintptr(t.bucketsize))
			// Preserve b.tophash because the evacuation
			// state is maintained there.
			ptr := add(b, dataOffset)
			n := uintptr(t.bucketsize) - dataOffset
			memclrHasPointers(ptr, n)
		}
	}

	if oldbucket == h.nevacuate {
		advanceEvacuationMark(h, t, newbit)
	}
}

func advanceEvacuationMark(h *hmap, t *maptype, newbit uintptr) {
	h.nevacuate++
	// Experiments suggest that 1024 is overkill by at least an order of magnitude.
	// Put it in there as a safeguard anyway, to ensure O(1) behavior.
	stop := h.nevacuate + 1024
	if stop > newbit {
		stop = newbit
	}
	for h.nevacuate != stop && bucketEvacuated(t, h, h.nevacuate) {
		h.nevacuate++
	}
	if h.nevacuate == newbit { // newbit == # of oldbuckets
		// Growing is all done. Free old main bucket array.
		h.oldbuckets = nil
		// Can discard old overflow buckets as well.
		// If they are still referenced by an iterator,
		// then the iterator holds a pointers to the slice.
		if h.extra != nil {
			h.extra.oldoverflow = nil
		}
		h.flags &^= sameSizeGrow
	}
}

func ismapkey(t *_type) bool {
	return t.alg.hash != nil
}

// Reflect stubs. Called from ../reflect/asm_*.s

//go:linkname reflect_makemap reflect.makemap
func reflect_makemap(t *maptype, cap int) *hmap {
	// Check invariants and reflects math.
	if sz := unsafe.Sizeof(hmap{}); sz != t.hmap.size {
		println("runtime: sizeof(hmap) =", sz, ", t.hmap.size =", t.hmap.size)
		throw("bad hmap size")
	}
	if !ismapkey(t.key) {
		throw("runtime.reflect_makemap: unsupported map key type")
	}
	if t.key.size > maxKeySize && (!t.indirectkey || t.keysize != uint8(sys.PtrSize)) ||
		t.key.size <= maxKeySize && (t.indirectkey || t.keysize != uint8(t.key.size)) {
		throw("key size wrong")
	}
	if t.elem.size > maxValueSize && (!t.indirectvalue || t.valuesize != uint8(sys.PtrSize)) ||
		t.elem.size <= maxValueSize && (t.indirectvalue || t.valuesize != uint8(t.elem.size)) {
		throw("value size wrong")
	}
	if t.key.align > bucketCnt {
		throw("key align too big")
	}
	if t.elem.align > bucketCnt {


>

See:

https://developer.apple.com/documentation/foundation/nskeyedarchiver/1417696-encodebytes

    public

    encodeConditionalObjectForKey(objv: Object, key: string): void

      source

Encodes a reference to a given object and associates it with a given key only if it has been unconditionally encoded elsewhere in the archive with encode(_:forKey:).

Override:
NSCoder#encodeConditionalObjectForKey

Params:

Name	Type	Attribute	Description

      objv
      Object

nullable: true

The object to encode.

      key
      string

The key with which to associate the encoded value. This value must not be nil.

Return:

          void


sNullable ?? false,
    _ => false,
  };

  /// Constructs a `built_value` FullType reference for this.
  Expression fullType([Iterable<Reference>? parameters]) {
    final typeRef = toTypeReference;
    final ctor =
        typeRef.isNullable ?? false
            ? (Iterable<Expression> args) => DartTypes.builtValue.fullType
                .constInstanceNamed('nullable', args)
            : DartTypes.builtValue.fullType.constInstance;
    if (typeRef.types.isEmpty && (parameters == null || parameters.isEmpty)) {
      return ctor([typeRef.nonNullable]);
    }
    return ctor([
      typeRef.rebuild((t) => t.types.clear()).nonNullable,
      literalList(
        parameters?.map((param) => param.fullType()) ??
            typeRef.types.map((t) => t.fullType()),
      ),
    ]);
  }

  /// A unique, readable name for this type which can be used in generated code
  /// and over the wire.
  ///
  /// We try to follow protobuf versioning guidelines and use the package name,
  /// organization name, and the version to give types unique names which are
  /// easy to interpret and do not expose implementation details.
  String? externalUri(String projectName) {
    assert(symbol != null, 'Symbol is null for $this');
    if (url == null) {
      // Would only be an anonymous record type.
      return null;
    }
    final sourceUri = Uri.parse(url!);
    final externalPackageId = switch (sourceUri) {
      Uri(scheme: 'dart') => 'dart.${sourceUri.pathSegments.single}',
      // TODO(dnys1): Include organization name
      // TODO(dnys1): Include version tag
      Uri(scheme: 'package', pathSegments: ['celest_backend', ...]) ||
      Uri(pathSegments: []) => '$projectName.v1',
      Uri(scheme: 'package', pathSegments: [final package, ...])
          when isPackageCelest =>
        '${package.split('_').join('.')}.v1',
      // TODO(dnys1): Should this include the package's major version?
      Uri(scheme: 'package', :final pathSegments) => pathSegments.first,
      _ => unreachable('Unexpected source URI: $sourceUri'),
    };
    return '$externalPackageId.$symbol';
  }
}

Expression mapIf(Expression condition, Expression key) =>
    _MapIfExpression(condition: condition, key: key);

final class _MapIfExpression extends Expression {
  _MapIfExpression({required this.condition, required this.key});

  final Expression condition;
  final Expression key;

  @override
  R accept<R>(covariant ExpressionVisitor<R> visitor, [R? context]) {
    return visitor.visitCodeExpression(
      CodeExpression(
        Block.of([
          const Code('if ('),
          condition.code,
          const Code(') '),
          key.code,
        ]),
      ),
      context,
    );
  }
}

Expression collectionIf(Expression condition, Expression ifTrue) =>
    _ListIfExpression(condition: condition, ifTrue: ifTrue);

final class _ListIfExpression extends Expression {
  _ListIfExpression({required this.condition, required this.ifTrue});

  final Expression condition;
  final Expression ifTrue;

  @override
  R accept<R>(covariant ExpressionVisitor<R> visitor, [R? context]) {
    return visitor.visitCodeExpression(
      CodeExpression(
        Block.of([
          const Code('if ('),
          condition.code,
          const Code(') '),
          ifTrue.code,
        ]),
      ),
      context,
    );
  }
}

Expression nullCheckBind(
  String variableName,
  Expression expression, {
  bool isNullable = true,
}) => NullCheckCaseExpression(
  variableName:


px){
	.contact-info p, .contact-info p a {
		font-size: 15px;
	}
}
@media(max-width:1080px){
	.cd-radial-slider-content .wrapper > div {
		padding: 14em 8em 0;
	}
	.cd-radial-slider-content h2, .cd-radial-slider-content h3 {
		letter-spacing: 13px;
		font-size: 3em;
	}
	.cd-radial-slider-navigation i {
		margin-top: 1.4em;
		margin-left: 1.6em;
		font-size: 1.5em;
	}
	.why-grid1 h4 {
		font-size: 25px;
	}
	.why-grid1 p {
		font-size: 14px;
	}
	.service-grid1 h3 {
		font-size: 20px;
		letter-spacing: 2px;
	}
	.content_left h2:after {
		left: 7.4%;
	}
	.contact-info p, .contact-info p a {
		font-size: 14px;
	}
	iframe {
		height: 458px;
	}
}
@media(max-width:1024px){
	.cd-radial-slider-content h2, .cd-radial-slider-content h3 {
		letter-spacing: 10px;
		font-size: 2.8em;
	}
	a.read, a.read2 {
		font-size: 16px;
		padding: .7em 1.2em;
	}
}
@media(max-width: 991px){
	.navbar-nav > li {
		margin-right: 0;
		text-align: center;
	}
	.navbar-light .navbar-toggler {
		border-color: #fff;
		background: #fff;
	}
	.navbar-toggler {
		border-radius: 0;
	}
	.dropdown-menu {
		color: #fff;
		text-align: center;
		border: 1px solid transparent;
		border-radius: 0.25rem;
		background-color: transparent;
	}
	.dropdown-menu a {
		color: #fff;
	}
	.why-grid1 h4 {
		font-size: 23px;
		margin-bottom: 1rem;
	}
	.w3_agileits-team1 {
		padding: 0 5px;
	}
	.w3_agileits-team1 h5 {
		font-size: 18px;
	}
	.cli-ent {
		width: 80%;
		margin: 0 auto;
	}
	.newsgrid1 {
		padding: 0 5px;
	}
	.news-grids h4 {
		font-size: 20px;
		letter-spacing: 2px;
	}
	.footer-logo a.navbar-brand {
		font-size: 2.5em;
	}
	.why-grid1 i.icon {
		font-size: 40px;
		margin-bottom: .5em;
	}
	h3.heading, h2.heading {
		font-size: 45px;
		letter-spacing: 2px;
	}
	.w3_agile_stats_grid-top {
		padding: 0 5px;
	}
	.w3_agile_stats_grid h4 {
		font-size: 16px;
		letter-spacing: 1px;
	}
	.bottom-grid2 h4 {
		margin: initial;
	}
	.banner_bottom_agile_grids {
		width: 80%;
		margin: 0 auto;
	}
	.content_left h2:after {
		left: 10%;
	}
	.b-search {
		width: 60%;
	}
	.baner-top {
		margin: 5px 0;
	}
	iframe {
		height: 398px;
	}
}
@media(max-width:900px){
	.c


条 国际局公布外观设计国际申请后，国务院专利行政部门对外观设计国际申请进行审查，并将审查结果通知国际局。

第一百三十九条 国际局公布的外观设计国际申请中包括一项或者多项优先权的，视为已经依照专利法第三十条的规定提出了书面声明。

外观设计国际申请的申请人要求优先权的，应当自外观设计国际申请公布之日起3个月内提交在先申请文件副本。

第一百四十条 外观设计国际申请涉及的外观设计有专利法第二十四条第（二）项或者第（三）项所列情形的，应当在提出外观设计国际申请时声明，并自外观设计国际申请公布之日起2个月内提交本细则第三十三条第三款规定的有关证明文件。

第一百四十一条 一件外观设计国际申请包括两项以上外观设计的，申请人可以自外观设计国际申请公布之日起2个月内，向国务院专利行政部门提出分案申请，并缴纳费用。

第一百四十二条 国际局公布的外观设计国际申请中包括含设计要点的说明书的，视为已经依照本细则第三十一条的规定提交了简要说明。

第一百四十三条 外观设计国际申请经国务院专利行政部门审查后没有发现驳回理由的，由国务院专利行政部门作出给予保护的决定，通知国际局。

国务院专利行政部门作出给予保护的决定后，予以公告，该外观设计专利权自公告之日起生效。

第一百四十四条 已在国际局办理权利变更手续的，申请人应当向国务院专利行政部门提供有关证明材料。

## 第十三章 附 则

第一百四十五条 经国务院专利行政部门同意，任何人均可以查阅或者复制已经公布或者公告的专利申请的案卷和专利登记簿，并可以请求国务院专利行政部门出具专利登记簿副本。

已视为撤回、驳回和主动撤回的专利申请的案卷，自该专利申请失效之日起满2年后不予保存。

已放弃、宣告全部无效和终止的专利权的案卷，自该专利权失效之日起满3年后不予保存。

第一百四十六条 向


,
            point_lights,
        )?;

        effect.use_texture_array(self.geometry_pass_texture(), "gbuffer")?;
        effect.use_texture_array(self.geometry_pass_depth_texture_array(), "depthMap")?;
        if !directional_lights.is_empty() || !spot_lights.is_empty() || !point_lights.is_empty() {
            effect.use_uniform_vec3("eyePosition", &camera.position())?;
            effect.use_uniform_mat4(
                "viewProjectionInverse",
                &(camera.projection() * camera.view()).invert().unwrap(),
            )?;
        }
        effect.apply(render_states, viewport)?;
        Ok(())
    }

    pub fn geometry_pass_texture(&self) -> &ColorTargetTexture2DArray<u8> {
        self.geometry_pass_texture.as_ref().unwrap()
    }
    pub fn geometry_pass_depth_texture_array(&self) -> &DepthTargetTexture2DArray {
        self.geometry_pass_depth_texture.as_ref().unwrap()
    }

    pub fn geometry_pass_depth_texture(&self) -> DepthTargetTexture2D {
        let depth_array = self.geometry_pass_depth_texture.as_ref().unwrap();
        let depth_texture = DepthTargetTexture2D::new(
            &self.context,
            depth_array.width(),
            depth_array.height(),
            Wrapping::ClampToEdge,
            Wrapping::ClampToEdge,
            DepthFormat::Depth32F,
        )
        .unwrap();

        depth_array
            .copy_to(
                0,
                CopyDestination::<u8>::DepthTexture(&depth_texture),
                Viewport::new_at_origo(depth_array.width(), depth_array.height()),
            )
            .unwrap();
        depth_texture
    }
}
use rand::Rng;

use crate::edit::piece::{Piece, Transform};
use crate::exec::{BlipSpawnMode, BlipStatus, Exec};
use crate::machine::grid::{Dir3, Point3};
use crate::machine::string_util::blocks_from_string;
use crate::machine::{grid, Block, Machine, PlacedBlock};

/// Test that wind flows one grid block per tick.
#[test]
fn test_straight_wind_propagation() {
    // A wind source, followed by 10 straight pipes to the right.
    let m = "
◉----------
-----------
";

    test_transform_invariant(&blocks_from_string(m), |t, exec| {
        for i in 0..=20 {
            exec.update();

            // Wind source has outgoing wind everywhere.
            for &d in &Dir3::ALL {
                assert!(next_wind_out(exec, t * (0, 0, 0), d));
            }

            // Pipe has outgoing wind to the right.
            for x in 1..=i.min(10) {
                assert!(next_wind_out(exec, t * (x, 0, 0), t * Dir3::X_POS));
            }

            // To the right, there is no wind yet.
            for x in i + 1..=10 {
                for &d in &Dir3::ALL {
                    assert!(!next_wind_out(exec, t * (x, 0, 0), d));
                }
            }

            // And to the bottom, there never is any wind.
            for x in 0..=10 {
                for &d in &Dir3::ALL {
                    assert!(!next_wind_out(exec, t * (x, 1, 0), d));
                }
            }
        }
    });
}

/// Test that funnel propagates wind in only one direction.
#[test]
fn test_funnel_wind_pr


 respectively, in the referenced object's coordinate system, to
	/// create an instance of the object in the current constellation.
	aiVector3D Delta;

	/// \var Rotation - The rotation, in degrees, to rotate the referenced object about its x, y, and z axes, respectively, to create an
	/// instance of the object in the current constellation. Rotations shall be executed in order of x first, then y, then z.
	aiVector3D Rotation;

	/// Constructor.
	/// \param [in] pParent - pointer to parent node.
	AMFInstance(AMFNodeElementBase *pParent) :
			AMFNodeElementBase(ENET_Instance, pParent) {}
};

/// \struct CAMFImporter_NodeElement_Metadata
/// Structure that define metadata node.
struct AMFMetadata : public AMFNodeElementBase {

	eastl::string Type; ///< Type of "Value".
	eastl::string Value; ///< Value.

	/// Constructor.
	/// \param [in] pParent - pointer to parent node.
	AMFMetadata(AMFNodeElementBase *pParent) :
			AMFNodeElementBase(ENET_Metadata, pParent) {}
};

/// \struct CAMFImporter_NodeElement_Root
/// Structure that define root node.
struct AMFRoot : public AMFNodeElementBase {

	eastl::string Unit; ///< The units to be used. May be "inch", "millimeter", "meter", "feet", or "micron".
	eastl::string Version; ///< Version of format.

	/// Constructor.
	/// \param [in] pParent - pointer to parent node.
	AMFRoot(AMFNodeElementBase *pParent) :
			AMFNodeElementBase(ENET_Root, pParent) {}
};

/// \struct CAMFImporter_NodeElement_Color
/// Structure that define object node.
struct AMFColor : public AMFNodeElementBase {
	bool Composed; ///< Type of color stored: if true then look for formula in \ref Color_Composed[4], else - in \ref Color.
	eastl::string Color_Composed[4]; ///< By components formulas of composed color. [0..3] - RGBA.
	aiColor4D Color; ///< Constant color.
	eastl::string Profile; ///< The ICC color space used to interpret the three color channels r, g and b..

	/// @brief  Constructor.
	/// @param [in] pParent - pointer to parent node.
	AMFColor(AMFNodeElementBase *pParent) :
			AMFNodeElementBase(ENET_Color, pParent), Composed(false), Color(), Profile() {
		// empty
	}
};

/// \struct CAMFImporter_NodeElement_Material
/// Structure that define material node.
struct AMFMaterial : public AMFNodeElementBase {

	/// Constructor.
	/// \param [in] pParent - pointer to parent node.
	AMFMaterial(AMFNodeElementBase *pParent) :
			AMFNodeElementBase(ENET_Material, pParent) {}
};

/// \struct CAMFImporter_NodeElement_Object
/// Structure that define object node.
struct AMFObject : public AMFNodeElementBase {

	/// Constructor.
	/// \param [in] pParent - pointer to parent node.
	AMFObject(AMFNodeElementBase *pParent) :
			AMFNodeElementBase(ENET_Object, pParent) {}
};

/// \struct CAMFImporter_NodeElement_Mesh
/// Structure that define mesh node.
struct AMFMesh : public AMFNodeElementBase {
	/// Constructor.
	/// \param [in] pParent - pointer to parent node.
	AMFMesh(AMFNodeElementBase *pParent) :
			AMFNodeElementBase(ENET_Mesh, pParent) {}
};

/// \struct CAMFImporter_NodeElement_Vertex
/// Structure that define vertex node.
struct AMFVertex : public AMFNodeElementBase {
	/// Constructor.
	/// \param [in] pParent - pointer to parent node.
	AMFVertex(AMFNodeElementBase *pParent) :
			AMFNodeElementBase(EN


en - s_locale_monthname_len[iMonth]);
            s.Printf(L" %2u", systime.wDay);
            if (fShowYear)
                s.Printf(L"  %04u", systime.wYear);
            else
                s.Printf(L" %02u:%02u", systime.wHour, systime.wMinute);
        }
        break;

    case 'i':
        // iso format, 11 characters.
        s.Printf(L"%02u-%02u %2u:%02u",
                 systime.wMonth,
                 systime.wDay,
                 systime.wHour,
                 systime.wMinute);
        break;

    case 'o':
        // long-iso format, 16 characters.
        s.Printf(L"%04u-%02u-%02u %2u:%02u",
                 systime.wYear,
                 systime.wMonth,
                 systime.wDay,
                 systime.wHour,
                 systime.wMinute);
        break;

#if 0
    case 'u':
        // full-iso format, 29 characters.
        s.Printf(L"%04u-%02u-%02u %2u:%02u:%02u.%03u %c%02u%02u",
                 systime.wYear,
                 systime.wMonth,
                 systime.wDay,
                 systime.wHour,
                 systime.wMinute,
                 systime.wSecond,
                 systime.wMilliseconds,
                 '?',                   // TODO: - or + of time zone bias
                 0,                     // TODO: hours of time zone bias
                 0);                    // TODO: minutes of time zone bias
        break;
#endif

    case 'r':
        // Variable width.
        {
            const unsigned len = s.Length();
            FormatRelativeTime(s, pfi->GetFileTime(which));
            if (CanAppendSpaces(flags, color))
                s.AppendSpaces(field.m_cchWidth - (s.Length() - len));
        }
        break;

    case 'x':
        // 24 characters.
        s.Printf(L"%04u/%02u/%02u  %2u:%02u:%02u%s%03u",
                 systime.wYear,
                 systime.wMonth,
                 systime.wDay,
                 systime.wHour,
                 systime.wMinute,
                 systime.wSecond,
                 s_decimal,
                 systime.wMilliseconds);
        break;

    case 's':
        // 15 characters.
        s.Printf(L"%2u/%02u/%02u  %2u:%02u",
                 systime.wMonth,
                 systime.wDay,
                 systime.wYear % 100,
                 systime.wHour,
                 systime.wMinute);
        break;

    case 'm':
        // 11 characters.
        {
            const SYSTEMTIME& systimeNow = NowAsLocalSystemTime();
            const unsigned iMonthFile = unsigned(systime.wYear) * 12 + systime.wMonth - 1;
            const unsigned iMonthNow = unsigned(systimeNow.wYear) * 12 + systimeNow.wMonth - 1;
            const bool fShowYear = (iMonthFile > iMonthNow || iMonthFile + 6 < iMonthNow);
            if (fShowYear)
            {
                //s.Printf(L"%2u/%02u/%04u ",
                s.Printf(L"%2u/%02u  %04u",
                //s.Printf(L"%2u/%02u--%04u",
                //s.Printf(L"%2u/%02u %04u*",
                         systime.wMonth,
                         systime.wDay,
                         systime


#
# Copyright (C) 2023, Inria
# GRAPHDECO research group, https://team.inria.fr/graphdeco
# All rights reserved.
#
# This software is free for non-commercial, research and evaluation use
# under the terms of the LICENSE.md file.
#
# For inquiries contact  george.drettakis@inria.fr
#

import os
import random
import json
from utils.system_utils import searchForMaxIteration
from scene.dataset_readers import sceneLoadTypeCallbacks, GenSpiralCameras
from scene.gaussian_model import GaussianModel
from arguments import ModelParams
from utils.camera_utils import cameraList_from_camInfos, camera_to_JSON
from pdb import set_trace as stx
import numpy as np
import math

class Scene:

    gaussians : GaussianModel #类型注解

    def __init__(self, args : ModelParams, gaussians : GaussianModel, exp_logger, load_path="", shuffle=True, resolution_scales=[1.0]):
        """
        :param path: Path to colmap scene main folder.
        """
        self.model_path = args.model_path
        self.loaded_iter = None
        self.gaussians = gaussians
        self.train_cameras = {}
        self.test_cameras = {}

        # 在此处通过 sceneLoadTypeCallbacks 函数来读取数据，sparse，blender 两个类
        '''
            此处是读数据的源头了,三种数据集类型:
            (1) Colmap 类
            (2) Blender 类
            (3) hdr_real 类
        '''
        print(args.source_path)
        # stx()
        if os.path.exists(os.path.join(args.source_path, "sparse")):
            # stx()
            scene_info = sceneLoadTypeCallbacks["Colmap"](args.source_path, args.images, args.eval, synthetic=args.syn)
        elif os.path.exists(os.path.join(args.source_path, "transforms_train.json")):
            print("Found transforms_train.json file, assuming Blender data set!")
            scene_info = sceneLoadTypeCallbacks["Blender"](args.source_path, args.white_background, args.eval)
        elif os.path.exists(os.path.join(args.source_path, "poses_bounds_exps.npy")):
            print("Found poses_bounds_exps.npy file, assuming HDR real data set!")
            scene_info = sceneLoadTypeCallbacks["hdr_real"](args.source_path, args.eval, exp_logger, args.llffhold, args.factor, args.recenter, args.bd_factor, args.spherify, args.path_zflat, args.max_exp, args.min_exp)
            # llffhold = 0, factor=8, recenter=True, bd_factor=.75, spherify=False, path_zflat=False, max_exp=1, min_exp=1
        else:
            assert False, "Could not recognize scene type!"
        # stx()

        if not self.loaded_iter:
            # scene_info 是上边这一部分 load 出来的这些数据
            # 使用, 分隔开, 将 src_file 读取出来并写入到 dest_file
            with open(scene_info.ply_path, 'rb') as src_file, open(os.path.join(self.model_path, "input.ply") , 'wb') as dest_file:
                dest_file.write(src_file.read())
            json_cams = []
            camlist = []
            if scene_info.test_cameras:
                # .extend() 函数将一个 list 的所有元素都添加到另一个 list 的末尾
                camlist.extend(scene_info.test_cameras)
            if scene_info.train_cameras:
                camlist.extend(scene_info.train_cameras)
            # 将 camera_list 转成 json 文件
            for id, cam in enumerate(camlist):
                # stx()
                json_cams.append(camera_to_JSON(id, cam))
            with open(os.path.join(self.model_path, "cameras.json"), 'w') as file:
                json.dump(json_cams, file)

        if shuffle:
            random.shuffle(scene_info.train_cameras)  # Multi-res consistent random shuffling
            random.shuffle(scene_info.test_cameras)  # Multi-res consistent random shuffling

        self.cameras_extent = scene_info.nerf_normalization["radius"]

        for resolution_scale in resolution_scales:
            print("Loading Training Cameras")
            '''
                把 scene_info 中的 train_cameras 给加载出来
                返回的就是一个 scene_info 类
            '''
            self.train_cameras[resolution_scale] = cameraList_from_camInfos(scene_info.train_cameras, resolution_scale, args)
            print("Loading Test Cameras")
            self.test_cameras[resolution_scale] = cameraList_from_camInfos(scene_info.test_cameras, resolution_scale, args)

        #set render video camera trajectory
        if args.render_video:
            self.render_sp_cameras = {}
            render_camera_infos = GenSpiralCameras(scene_info.train_cameras, args=args)
            self.render_sp_cameras[resolution_scale] = cameraList_from_camInfos(render_camera_infos, resolution_scale, args)
        # 加载模型


mber): boolean {
    if (clickingSpreeCount == 0) return false;
    let n = now();
    if (n < clickingSpreeStart + 1000 && clickCount >= clickingSpreeCount) {
        clickingSpreeStart = n;
        clickingSpreeCount = clickCount;
        return true;
    }
    clickingSpreeCount = 0;
    return false;
}

export function preventClickingSpree() {
    clickingSpreeCount = 2;
    clickingSpreeStart = now();
}

function bustingPointerUp(
    ev: IBobrilPointerEvent,
    target: Node | undefined,
    node: IBobrilCacheNode | undefined
): boolean {
    delete pointersDown[ev.id];
    if (firstPointerDown == ev.id) {
        mouseEnterAndLeave(ev);
        firstPointerDown = -1;
        if (ev.type == BobrilPointerType.Touch && !tapCanceled) {
            if (now() - firstPointerDownTime < TapShouldBeShorterThanMs) {
                emitEvent("!PointerCancel", ev, target, node);
                shouldPreventClickingSpree(1);
                var handled = invokeMouseOwner(onClickText, ev) || bubble(node, onClickText, ev) != null;
                var delay = ieVersion() ? MaxBustDelayForIE : MaxBustDelay;
                toBust.push([ev.x, ev.y, now() + delay, handled ? 1 : 0]);
                return handled;
            }
        } else if (tapCanceled) {
            ignoreClick(ev.x, ev.y);
        }
    }
    return false;
}

function bustingPointerCancel(
    ev: IBobrilPointerEvent,
    _target: Node | undefined,
    _node: IBobrilCacheNode | undefined
): boolean {
    delete pointersDown[ev.id];
    if (firstPointerDown == ev.id) {
        firstPointerDown = -1;
    }
    return false;
}

function bustingClick(ev: MouseEvent, _target: Node | undefined, _node: IBobrilCacheNode | undefined): boolean {
    var n = now();
    for (var i = 0; i < toBust.length; i++) {
        var j = toBust[i];
        if (j[2] < n) {
            toBust.splice(i, 1);
            i--;
            continue;
        }
        if (diffLess(j[0], ev.clientX, BustDistance) && diffLess(j[1], ev.clientY, BustDistance)) {
            toBust.splice(i, 1);
            if (j[3]) preventDefault(ev);
            return true;
        }
    }
    return false;
}

var bustingEventNames = ["!PointerDown", "!PointerMove", "!PointerUp", "!PointerCancel", "^click"];
var bustingEventHandlers = [
    bustingPointerDown,
    bustingPointerMove,
    bustingPointerUp,
    bustingPointerCancel,
    bustingClick,
];
for (var i = 0; i < 5 /*bustingEventNames.length*/; i++) {
    addEvent(bustingEventNames[i], 3, bustingEventHandlers[i]);
}

function createHandlerMouse(handlerName: string) {
    return (ev: IBobrilPointerEvent, _target: Node | undefined, node: IBobrilCacheNode | undefined) => {
        if (firstPointerDown != ev.id && !noPointersDown()) return false;
        if (invokeMouseOwner(handlerName, ev) || bubble(node, handlerName as EventNames, ev)) {
            return true;
        }
        return false;
    };
}

var mouseHandlerNames = ["Down", "Move", "Up", "Up"];
for (var i = 0; i < 4; i++) {
    addEvent(bustingEventNames[i], 80, createHandlerMouse("onMouse" + mouseHandlerNames


| ✅         | ✅       | ❌     |
| YOLOv8m-worldv2 | [yolov8m-worldv2.pt](https://github.com/ultralytics/assets/releases/download/v8.2.0/yolov8m-worldv2.pt) | [Object Detection](../tasks/detect.md) | ✅        | ✅         | ✅       | ✅     |
| YOLOv8l-world   | [yolov8l-world.pt](https://github.com/ultralytics/assets/releases/download/v8.2.0/yolov8l-world.pt)     | [Object Detection](../tasks/detect.md) | ✅        | ✅         | ✅       | ❌     |
| YOLOv8l-worldv2 | [yolov8l-worldv2.pt](https://github.com/ultralytics/assets/releases/download/v8.2.0/yolov8l-worldv2.pt) | [Object Detection](../tasks/detect.md) | ✅        | ✅         | ✅       | ✅     |
| YOLOv8x-world   | [yolov8x-world.pt](https://github.com/ultralytics/assets/releases/download/v8.2.0/yolov8x-world.pt)     | [Object Detection](../tasks/detect.md) | ✅        | ✅         | ✅       | ❌     |
| YOLOv8x-worldv2 | [yolov8x-worldv2.pt](https://github.com/ultralytics/assets/releases/download/v8.2.0/yolov8x-worldv2.pt) | [Object Detection](../tasks/detect.md) | ✅        | ✅         | ✅       | ✅     |

### How do I reproduce the official results of YOLO-World from scratch?

To reproduce the official results from scratch, you need to prepare the datasets and launch the training using the provided code. The training procedure involves creating a data dictionary and running the `train` method with a custom trainer:

```python
from ultralytics import YOLOWorld
from ultralytics.models.yolo.world.train_world import WorldTrainerFromScratch

data = {
    "train": {
        "yolo_data": ["Objects365.yaml"],
        "grounding_data": [
            {
                "img_path": "../datasets/flickr30k/images",
                "json_file": "../datasets/flickr30k/final_flickr_separateGT_train.json",
            },
            {
                "img_path": "../datasets/GQA/images",
                "json_file": "../datasets/GQA/final_mixed_train_no_coco.json",
            },
        ],
    },
    "val": {"yolo_data": ["lvis.yaml"]},
}

model = YOLOWorld("yolov8s-worldv2.yaml")
model.train(data=data, batch=128, epochs=100, trainer=WorldTrainerFromScratch)
```
---
comments: true
description: Explore Meituan YOLOv6, a top-tier object detector balancing speed and accuracy. Learn about its unique features and performance metrics on Ultralytics Docs.
keywords: Meituan YOLOv6, object detection, real-time applications, BiC module, Anchor-Aided Training, COCO dataset, high-performance models, Ultralytics Docs
---

# Meituan YOLOv6

## Overview

[Meituan](https://about.meituan.com/) YOLOv6 is a cutting-edge object detector that offers remarkable balance between speed and accuracy, making it a popular choice for real-time applications. This model introduces several notable enhancements on its architecture and training scheme, including the implementation of a Bi-directional Concatenation (BiC) module, an anchor-aided training (AAT) strategy, and an improved backbone and neck design for state-of-the-art accuracy on the COCO dataset.

![Meituan YOLOv6](https://github.com/ultralytics/docs/releases/download/0/meituan-yolov6.avif)
![Model example image](https://github.com/ultralytics/docs/releases/d


	// new token filter
	tokenFilter := &TokenFilter{}

	// new sign filter
	signFilter := &SignFilter{}

	// new cutoff filter
	cutoffFilter := &CutoffFilter{om: om}

	gateway.filters = append(gateway.filters, powFilter)
	gateway.filters = append(gateway.filters, baseFilter)
	gateway.filters = append(gateway.filters, signFilter)
	gateway.filters = append(gateway.filters, tokenFilter)
	gateway.filters = append(gateway.filters, cutoffFilter)
}

func HandleInputOrder(input eventemitter.EventData) (orderHash string, err error) {
	var (
		state *types.OrderState
	)

	order := input.(*types.Order)
	order.Hash = order.GenerateHash()
	orderHash = order.Hash.Hex()

	//var broadcastTime int

	//TODO(xiaolu) 这里需要测试一下，超时error和查询数据为空的error，处理方式不应该一样
	if state, err = gateway.om.GetOrderByHash(order.Hash); err != nil && err.Error() == "record not found" {
		if err = generatePrice(order); err != nil {
			return orderHash, err
		}

		for _, v := range gateway.filters {
			valid, err := v.filter(order)
			if !valid {
				log.Errorf(err.Error())
				return orderHash, err
			}
		}
		state = &types.OrderState{}
		state.RawOrder = *order
		//broadcastTime = 0
		eventemitter.Emit(eventemitter.NewOrder, state)
	} else {
		//broadcastTime = state.BroadcastTime
		log.Infof("gateway,order %s exist,will not insert again", order.Hash.Hex())
		return orderHash, errors.New("order existed, please not submit again")
	}

	//if gateway.isBroadcast && broadcastTime < gateway.maxBroadcastTime {
	//	//broadcast
	//	log.Infof(">>>>>>> broad to ipfs order : " + state.RawOrder.Hash.Hex())
	//	pubErr := gateway.ipfsPubService.PublishOrder(state.RawOrder)
	//	if pubErr != nil {
	//		log.Errorf("gateway,publish order %s failed", state.RawOrder.Hash.String())
	//	} else {
	//		if err = gateway.om.UpdateBroadcastTimeByHash(state.RawOrder.Hash, state.BroadcastTime+1); nil != err {
	//			return err
	//		}
	//	}
	//}
	return orderHash, err
}

func HandleOrder(input eventemitter.EventData) error {
	_, err := HandleInputOrder(input)
	return err
}

func generatePrice(order *types.Order) error {
	tokenS, err := util.AddressToToken(order.TokenS)
	if err != nil {
		return err
	}
	if tokenS.Decimals == nil || tokenS.Decimals.Cmp(big.NewInt(0)) < 1 {
		return fmt.Errorf("order's tokenS decimals invalid")
	}

	tokenB, err := util.AddressToToken(order.TokenB)
	if err != nil {
		return err
	}
	if tokenB.Decimals == nil || tokenB.Decimals.Cmp(big.NewInt(0)) < 1 {
		return fmt.Errorf("order's tokenS decimals invalid")
	}

	if order.AmountS == nil || order.AmountS.Cmp(big.NewInt(0)) < 1 {
		return fmt.Errorf("order's amountS invalid")
	}

	if order.AmountB == nil || order.AmountB.Cmp(big.NewInt(0)) < 1 {
		return fmt.Errorf("order's amountB invalid")
	}

	order.Price = new(big.Rat).Mul(
		new(big.Rat).SetFrac(order.AmountS, order.AmountB),
		new(big.Rat).SetFrac(tokenB.Decimals, tokenS.Decimals),
	)

	return nil
}

type BaseFilter struct {
	MinLrcFee             *big.Int
	MinLrcHold            int64
	Min


Rv;var LB=(((LC)+1)&4294967295);Rv=LB;var LA=Rp;var Lz=Rv;var Ly=((LA+Lz)&4294967295);var Lx=Tk;var Lw=(Ly)<(Lx);if(Lw){F3=54;continue}else{F3=55;break $bb25_i$$bb27_i$79}}}}while(0);var Lv=Fi;var Lu=(((Lv)*2)&4294967295);var Lt=(((Lu)+-2)&4294967295);uA[((k3)>>2)]=Lt}var Ls=Fi;MV=Ls;var Lr=MV;UK=Lr;var B6=UK;var Lq=(((B6))|0)!=0;var Lp=oD((Lq),1,0);Rt=Lp;var NQ=iB((Lp),8,0)!=0;if(!(NQ)){F3=59;break $bb36$$bb40$48}var Lo=((SV)&4294967295);uA[((Lo)>>2)]=0;var Ln=((SV+4)&4294967295);uA[((Ln)>>2)]=0;NT=1;var Lm=uA[((k3)>>2)];var Ll=(((Lm))|0)!=0;if(!(Ll)){F3=59;break $bb36$$bb40$48}var Lk=((SV)&4294967295);uA[((Lk)>>2)]=128}}while(0);var Lj=((KD)&4294967295);var Li=la[((Lj)>>0)];var Lh=iB((Li),8,0)==21;if(Lh){F3=60}else{F3=61}if(F3==60){var Lg=((KD)&4294967295);var Lf=oJ(((eh)&4294967295),Lg);Fj=0;F3=278;break $bb2$$bb3$5}else{if(F3==61){var Le=SC;var Ld=(((Le))|0)>0;var Lc=SC;var Lb=(((Lc))|0)<=7;var Kt=(Ld)&(Lb);if(Kt){F3=62}else{F3=63}if(F3==62){var La=((SV)&4294967295);var K8=uA[((La)>>2)];var K7=(K8)&-16;var K5=SC;var K4=(K7)|(K5);var K3=((SV)&4294967295);uA[((K3)>>2)]=K4}var K2=LE;var K1=(((K2))|0)==0;if(K1){F3=64}else{F3=73}$bb46$$bb53$93:do{if(F3==64){var K0=((SV)&4294967295);var KZ=uA[((K0)>>2)];var KY=(KZ)&131072;var KW=(((KY))|0)!=0;if(KW){F3=65}else{F3=66}if(F3==65){NT=1}var R9=LE;var KV=(((R9))|0)==0;if(!(KV)){F3=73;break $bb46$$bb53$93}var KU=uA[((JZ)>>2)];Dt=KU;var KT=Dt;var KS=(((KT))>>>0)<=255;if(KS){F3=69}else{F3=68}if(F3==69){var KR=Dt;var KQ=(((KR)-48)&4294967295);var KP=(((KQ))>>>0)<=9;var KO=oD((KP),1,0);MX=KO;Uo=KO;var KN=(((KO))|0)!=0;if(!(KN)){F3=73;break $bb46$$bb53$93}var Hx=Ro;Q9=Hx;Gf=((oE)&4294967295);QC=((eh)&


constraints are not met:")
                .And.HaveStdErrContaining($"Project capabilities: The project {Path.Combine(projectPath, "ConsoleFullFramework.csproj")} is not an SDK style project, and is not supported for evaluation.");
        }
    }
}


ss) _symbol_t.value;
					 return t;
			}
			case 24: // class_type = class_or_interface_type.n
			{
					final Symbol _symbol_n = _symbols[offset + 1];
					final Access n = (Access) _symbol_n.value;
					 return n;
			}
			case 25: // interface_type = class_or_interface_type.n
			{
					final Symbol _symbol_n = _symbols[offset + 1];
					final Access n = (Access) _symbol_n.value;
					 return n;
			}
			case 26: // array_type = primitive_type.t dims.d
			{
					final Symbol _symbol_t = _symbols[offset + 1];
					final Access t = (Access) _symbol_t.value;
					final Symbol _symbol_d = _symbols[offset + 2];
					final List d = (List) _symbol_d.value;
					 return t.addArrayDims(d);
			}
			case 27: // array_type = name.n dims.d
			{
					final Symbol _symbol_n = _symbols[offset + 1];
					final Access n = (Access) _symbol_n.value;
					final Symbol _symbol_d = _symbols[offset + 2];
					final List d = (List) _symbol_d.value;
					 return n.addArrayDims(d);
			}
			case 28: // name = simple_name.s
			{
					final Symbol _symbol_s = _symbols[offset + 1];
					final Access s = (Access) _symbol_s.value;
					 return s;
			}
			case 29: // name = qualified_name.q
			{
					final Symbol _symbol_q = _symbols[offset + 1];
					final Access q = (Access) _symbol_q.value;
					 return q;
			}
			case 30: // simple_name = IDENTIFIER.IDENTIFIER
			{
					final Symbol IDENTIFIER = _symbols[offset + 1];
					 return new ParseName(IDENTIFIER);
			}
			case 31: // qualified_name = name.n DOT.DOT simple_name.i
			{
					final Symbol _symbol_n = _symbols[offset + 1];
					final Access n = (Access) _symbol_n.value;
					final Symbol DOT = _symbols[offset + 2];
					final Symbol _symbol_i = _symbols[offset + 3];
					final Access i = (Access) _symbol_i.value;
					 return n.qualifiesAccess(i);
			}
			case 32: // compilation_unit = package_declaration.p
			{
					final Symbol _symbol_p = _symbols[offset + 1];
					final IdUse p = (IdUse) _symbol_p.value;
					 return new CompilationUnit(p.getID(), new List(), new List());
			}
			case 33: // compilation_unit = package_declaration.p import_declarations.i
			{
					final Symbol _symbol_p = _symbols[offset + 1];
					final IdUse p = (IdUse) _symbol_p.value;
					final Symbol _symbol_i = _symbols[offset + 2];
					final List i = (List) _symbol_i.value;
					 return new CompilationUnit(p.getID(), i, new List());
			}
			case 34: // compilation_unit = package_declaration.p type_declarations.t
			{
					final Symbol _symbol_p = _symbols[offset + 1];
					final IdUse p = (IdUse) _symbol_p.value;
					final Symbol _symbol_t = _symbols[offset + 2];
					final List t = (List) _symbol_t.value;
					 return new CompilationUnit(p.getID(), new List(), t);
			}
			case 35: // compilation_unit = package_declaration.p import_declarations.i type_declarations.t
			{
					final Symbol _symbol_p = _symbols[offset + 1];
					final IdUse p = (IdUse) _symbol_p.value;
					final Symbol _symbol_i = _symbols[offset + 2];
					final List i = (List) _symbol_i.


he range 0..255,
	 * the quasi-deadline is System.currentTimeMillis() plus a time delta.  The
	 * delta is 1000ms * (1 - (priority / 256)).  That places it one second in
	 * the future for priority = 0, and places it essentially at the current
	 * moment for priority = 255.
	 */
	private val quasiDeadline: Long

	override fun compareTo(other: AvailTask): Int =
		quasiDeadline.compareTo(other.quasiDeadline)

	override fun run()
	{
		try
		{
			body()
		}
		catch (e: Throwable)
		{
			// Report the exception immediately, then suppress the error.  If we
			// allowed the error to propagate, it would cause an Interpreter to
			// be silently lost, and the next creation could overflow the
			// maximum number of Interpreters.
			System.err.println("Unexpected internal failure in AvailTask:\n")
			e.printStackTrace()
		}
	}

	companion object
	{
		/**
		 * Answer an `AvailTask` suitable for resuming the specified
		 * [fiber][FiberDescriptor] using the specified action. If the
		 * continuation fails for any reason, then it
		 * [aborts][Interpreter.abortFiber] the fiber and invokes the [failure
		 * continuation][A_Fiber.failureContinuation] with the terminal
		 * [throwable][Throwable].
		 *
		 * @param fiber
		 *   A fiber.
		 * @param body
		 *   What to do to resume execution of the fiber.
		 * @return
		 *   An action that sets the execution state of the fiber to
		 *   [running][ExecutionState.RUNNING], binds it to the running
		 *   [thread][AvailThread]'s [interpreter][Interpreter], and then runs
		 *   the specified continuation.
		 */
		fun forFiberResumption(
			fiber: A_Fiber,
			body: Interpreter.() -> Unit): () -> Unit
		{
			assert(fiber.executionState.indicatesSuspension)
			val scheduled = fiber.getAndSetSynchronizationFlag(
				SynchronizationFlag.SCHEDULED, true)
			assert(!scheduled)
			return {
				val interpreter = current()
				assert(interpreter.fiberOrNull() === null)
				fiber.lock {
					assert(fiber.executionState.indicatesSuspension)
					val bound = fiber.getAndSetSynchronizationFlag(
						SynchronizationFlag.BOUND, true)
					fiber.fiberHelper.startCountingCPU()
					assert(!bound)
					val wasScheduled = fiber.getAndSetSynchronizationFlag(
						SynchronizationFlag.SCHEDULED, false)
					assert(wasScheduled)
					fiber.executionState = RUNNING
					interpreter.fiber(fiber, "forFiberResumption")
				}
				try
				{
					interpreter.body()
				}
				catch (e: PrimitiveThrownException)
				{
					// If execution failed, terminate the fiber and invoke its
					// failure continuation with the throwable.
					interpreter.adjustUnreifiedCallDepthBy(
						-interpreter.unreifiedCallDepth())
					if (!fiber.executionState.indicatesTermination)
					{
						assert(interpreter.fiberOrNull() === fiber)
						interpreter.abortFiber()
					}
					else
					{
						fiber.executionState = ABORTED
					}
					(fiber.failureContinuation)(e)
					fiber.executionState = ExecutionState.RETIRED
					interpreter.runtime.unregisterFiber(fiber)
				}
				catch (e: Throwable)
				{
					System.err.println(
						"An unrecoverable VM error has occurred.")
					throw e
				}
				finally
				{
					// This is the first point at which *some other* Thread may
					// have had a chance to resume the fiber and update its
					// state.
					val postExit = interpreter.postExitContinuation
					if (postExit !== null)
					{
						interpreter.postExitContinuation(null)
						postExit()
					}
				}
				// If the fiber has terminated, then report its result via its
				// result continuation.
				fiber.


] ; movq	24(%rsp), %r9
	movsd	XMM3, qword ptr [RSP + 24] ;movsd	24(%rsp), %xmm3

	CALL qword ptr [RBP + 16] ; call	*16(%rbp)

	mov	 ECX, [RBP + 24] ; movl	24(%rbp), %ecx
	mov	R8, [RBP + 32] ; movq	32(%rbp), %r8
	LEA	R10, ffi_call_win64_tab ; leaq	0f(%rip), %r10
	CMP	ECX, FFI_TYPE_SMALL_STRUCT_4B ; cmpl	$FFI_TYPE_SMALL_STRUCT_4B, %ecx
	LEA	R10, [R10 + RCX*8] ; leaq	(%r10, %rcx, 8), %r10
	JA	L99 ; ja	99f
	JMP	R10 ; jmp	*%r10

/* Below, we're space constrained most of the time.  Thus we eschew the
   modern "mov, pop, ret" sequence (5 bytes) for "leave, ret" (2 bytes).  */
epilogue macro
	LEAVE
	cfi_remember_state
	cfi_def_cfa(rsp, 8)
	cfi_restore(rbp)
	RET
	cfi_restore_state
endm

	ALIGN 8
ffi_call_win64_tab LABEL NEAR
E(0b, FFI_TYPE_VOID)
	epilogue
E(0b, FFI_TYPE_INT)
	movsxd rax, eax ; movslq	%eax, %rax
	mov qword ptr [r8], rax; movq	%rax, (%r8)
	epilogue
E(0b, FFI_TYPE_FLOAT)
	movss dword ptr [r8], xmm0 ; movss	%xmm0, (%r8)
	epilogue
E(0b, FFI_TYPE_DOUBLE)
	movsd qword ptr[r8], xmm0; movsd	%xmm0, (%r8)
	epilogue
E(0b, FFI_TYPE_LONGDOUBLE)
	call	PLT(C(abort))
E(0b, FFI_TYPE_UINT8)
	movzx eax, al ;movzbl	%al, %eax
	mov qword ptr[r8], rax; movq	%rax, (%r8)
	epilogue
E(0b, FFI_TYPE_SINT8)
	movsx rax, al ; movsbq	%al, %rax
	jmp	L98
E(0b, FFI_TYPE_UINT16)
	movzx eax, ax ; movzwl	%ax, %eax
	mov qword ptr[r8], rax; movq	%rax, (%r8)
	epilogue
E(0b, FFI_TYPE_SINT16)
	movsx rax, ax; movswq	%ax, %rax
	jmp	L98
E(0b, FFI_TYPE_UINT32)
	mov eax, eax; movl	%eax, %eax
	mov qword ptr[r8], rax ; movq	%rax, (%r8)
	epilogue
E(0b, FFI_TYPE_SINT32)
	movsxd rax, eax; movslq	%eax, %rax
	mov qword ptr [r8], rax; movq	%rax, (%r8)
	epilogue
E(0b, FFI_TYPE_UINT64)
L98 LABEL near
	mov qword ptr [r8], rax ; movq	%rax, (%r8)
	epilogue
E(0b, FFI_TYPE_SINT64)
	mov qword ptr [r8], rax;movq	%rax, (%r8)
	epilogue
E(0b, FFI_TYPE_STRUCT)
	epilogue
E(0b, FFI_TYPE_POINTER)
	mov qword ptr [r8], rax ;movq	%rax, (%r8)
	epilogue
E(0b, FFI_TYPE_COMPLEX)
	call	PLT(C(abort))
E(0b, FFI_TYPE_SMALL_STRUCT_1B)
	mov byte ptr [r8], al ; movb	%al, (%r8)
	epilogue
E(0b, FFI


*int64(time.Second))
	s := epochTime.Format("3pm")
	s = s[:len(s)-1]
	if len(s) == 2 {
		s += " "
	}
	return s
}

func getIcon(iconStr string) (icon string, err error) {
	color := "blue"
	// steralize the icon string name
	iconStr = strings.Replace(strings.Replace(iconStr, "-", "", -1), "_", "", -1)

	switch iconStr {
	case "clear":
		icon = icons.Clear
	case "clearday":
		color = "yellow"
		icon = icons.Clearday
	case "clearnight":
		color = "light_yellow"
		icon = icons.Clearnight
	case "clouds":
		icon = icons.Clouds
	case "cloudy":
		icon = icons.Cloudy
	case "cloudsnight":
		color = "light_yellow"
		icon = icons.Cloudsnight
	case "fog":
		icon = icons.Fog
	case "haze":
		icon = icons.Haze
	case "hazenight":
		color = "light_yellow"
		icon = icons.Hazenight
	case "partlycloudyday":
		color = "yellow"
		icon = icons.Partlycloudyday
	case "partlycloudynight":
		color = "light_yellow"
		icon = icons.Partlycloudynight
	case "rain":
		icon = icons.Rain
	case "sleet":
		icon = icons.Sleet
	case "snow":
		color = "white"
		icon = icons.Snow
	case "thunderstorm":
		color = "black"
		icon = icons.Thunderstorm
	case "tornado":
		color = "black"
		icon = icons.Tornado
	case "wind":
		color = "black"
		icon = icons.Wind
	}

	return colorstring.Color("[" + color + "]" + icon), nil
}

func getBearingDetails(degrees float64) string {
	index := int(math.Mod((degrees+11.25)/22.5, 16))
	return Directions[index]
}

func printCommon(weather Weather, unitsFormat UnitMeasures) error {
	if weather.DewPoint > 0 {
		dewPoint := colorstring.Color(fmt.Sprintf("[bold]%.2f%s", weather.DewPoint, unitsFormat.Degrees))

		if weather.DewPoint > 60 {
			fmt.Printf("  Ugh! The dew point is %s\n", dewPoint)
		} else {
			fmt.Printf("  The dew point is %s\n", dewPoint)
		}
	}

	if weather.Humidity > 0 {
		humidity := colorstring.Color(fmt.Sprintf("[bold]%.2f%s", weather.Humidity*100, "%"))

		if weather.Humidity > 0.20 {
			fmt.Printf("  Ick! The humidity is %s\n", humidity)
		} else {
			fmt.Printf("  The humidity is %s\n", humidity)
		}
	}

	if weather.PrecipIntensity > 0 {
		precInt := colorstring.Color(fmt.Sprintf("[bold]%.1f %s", weather.PrecipIntensity, unitsFormat.Precipitation))
		fmt.Printf("  The precipitation intensity of %s is %s\n", colorstring.Color("[bold]"+weather.PrecipType), precInt)
	}

	if weather.PrecipProbability > 0 {
		prec := colorstring.Color(fmt.Sprintf("[bold]%.0f%s", weather.PrecipProbability*100, "%"))
		fmt.Printf("  The precipitation probability is %s\n", prec)
	}

	if weather.NearestStormDistance > 0 {
		dist := colorstring.Color(fmt.Sprintf("[bold]%.1f %s %v", weather.NearestStormDistance, unitsFormat.Length, getBearingDetails(weather.NearestStormBearing)))
		fmt.Printf("  The nearest storm is %s aw


 t.add_get_event_id(EventType::TimerStarted, None);
    t.add_timer_fired(timer_started_event_id, timer_id.to_string());
    t.add_workflow_task_scheduled_and_started();
    t
}

pub fn single_timer_wf_completes(timer_id: &str) -> TestHistoryBuilder {
    let mut t = single_timer(timer_id);
    t.add_workflow_task_completed();
    t.add_workflow_execution_completed();
    t
}

///  1: EVENT_TYPE_WORKFLOW_EXECUTION_STARTED
///  2: EVENT_TYPE_WORKFLOW_TASK_SCHEDULED
///  3: EVENT_TYPE_WORKFLOW_TASK_STARTED
///  4: EVENT_TYPE_WORKFLOW_TASK_COMPLETED
///  5: EVENT_TYPE_TIMER_STARTED (cancel)
///  6: EVENT_TYPE_TIMER_STARTED (wait)
///  7: EVENT_TYPE_TIMER_FIRED (wait)
///  8: EVENT_TYPE_WORKFLOW_TASK_SCHEDULED
///  9: EVENT_TYPE_WORKFLOW_TASK_STARTED
/// 10: EVENT_TYPE_WORKFLOW_TASK_COMPLETED
/// 11: EVENT_TYPE_TIMER_CANCELED (cancel)
/// 12: EVENT_TYPE_WORKFLOW_EXECUTION_COMPLETED
pub fn cancel_timer(wait_timer_id: &str, cancel_timer_id: &str) -> TestHistoryBuilder {
    let mut t = TestHistoryBuilder::default();
    t.add_by_type(EventType::WorkflowExecutionStarted);
    t.add_full_wf_task();
    let cancel_timer_started_id = t.add_get_event_id(EventType::TimerStarted, None);
    let wait_timer_started_id = t.add_get_event_id(EventType::TimerStarted, None);
    t.add_timer_fired(wait_timer_started_id, wait_timer_id.to_string());
    // 8
    t.add_full_wf_task();
    // 11
    t.add(
        EventType::TimerCanceled,
        history_event::Attributes::TimerCanceledEventAttributes(TimerCanceledEventAttributes {
            started_event_id: cancel_timer_started_id,
            timer_id: cancel_timer_id.to_string(),
            ..Default::default()
        }),
    );
    // 12
    t.add_workflow_execution_completed();
    t
}

/// 1: EVENT_TYPE_WORKFLOW_EXECUTION_STARTED
/// 2: EVENT_TYPE_WORKFLOW_TASK_SCHEDULED
/// 3: EVENT_TYPE_WORKFLOW_TASK_STARTED
/// 4: EVENT_TYPE_WORKFLOW_TASK_COMPLETED
/// 5: EVENT_TYPE_TIMER_STARTED
/// 6: EVENT_TYPE_TIMER_STARTED
/// 7: EVENT_TYPE_TIMER_FIRED
/// 8: EVENT_TYPE_TIMER_FIRED
/// 9: EVENT_TYPE_WORKFLOW_TASK_SCHEDULED
/// 10: EVENT_TYPE_WORKFLOW_TASK_STARTED
pub fn parallel_timer(timer1: &str, timer2: &str) -> TestHistoryBuilder {
    let mut t = TestHistoryBuilder::default();
    t.add_by_type(EventType::WorkflowExecutionStarted);
    t.add_full_wf_task();
    let timer_started_event_id = t.add_get_event_id(EventType::TimerStarted, None);
    let timer_2_started_event_id = t.add_get_event_id(EventType::TimerStarted, None);
    t.add_timer_fired(timer_started_event_id, timer1.to_string());
    t.add_timer_fired(timer_2_started_event_id, timer2.to_string());
    t.add


io você escolhe uma forma de pagamento, define seu preço, seus limites e escreve seus termos de negociação em uma mensagem de formato livre. ';
  }

  @override
  String guide250Sbtrade250Sbblock8722Sb18722Sbtext8722Sb08722Sba8722Sbsell8722Sbmonero8722Sbad(Object assetName) {
    return 'um anúncio de venda online de $assetName';
  }

  @override
  String get guide250Sbtrade250Sbblock8722Sb18722Sbtext8722Sb08722Sbcreate => 'criar';

  @override
  String get guide250Sbtrade250Sbblock8722Sb18722Sbtext8722Sb08722Sbfund => 'depositar';

  @override
  String guide250Sbtrade250Sbblock8722Sb18722Sbtext8722Sb08722Sblocalmonero8722Sbwallet(Object appName) {
    return 'carteira $appName';
  }

  @override
  String guide250Sbtrade250Sbblock8722Sb18722Sbtext8722Sb1(Object assetName, Object appName) {
    return 'Você precisa ter $assetName em sua carteira de títulos de arbitragem $appName para que os clientes possam abrir solicitações de negociação a partir de seus anúncios.

Quando um comprador abre uma negociação com você, $assetName pelo valor total da negociação é automaticamente reservado em sua carteira. Forneça instruções de pagamento ao comprador e oriente-o no pagamento da negociação. Você receberá notificações por e-mail quando alguém responder ao seu anúncio.

 Assim que o comprador tiver pago e pressionado o botão Eu paguei você receberá uma notificação por e-mail e no site de que uma negociação foi paga.

 Quando você confirmar que recebeu o pagamento, é hora de finalizar a negociação. Após a negociação ser finalizada e liquidada, o comprador terá o $assetName em sua carteira de liquidação.

 A etapa final é deixar comentários para o comprador e incentivá-lo a fazer o mesmo por você. O feedback é importante para ganhar reputação e fazer mais negociações.';
  }

  @override
  String get guide250Sbtrade250Sbblock8722Sb18722Sbtitle => 'Visão geral do processo de negociação';

  @override
  String guide250Sbtrade250Sbblock8722Sb28722Sbtext(Object assetName) {
    return 'Antes de começar a negociar é preciso considerar quais formas de pagamento você deseja oferecer, e pesquisar profundamente como elas funcionam. Se você está começando, recomendamos não escolher uma forma de pagamento de alto risco. Transferências bancárias é sempre uma boa opção para começar, especialmente se não há muita gente operando na sua região.

 Antes de negociar

 Antes de negociar recomendamos que você se familiarize com a legislação do seu país para confirmar que você pode tranquilamente fazer este tipo de transação.

 A legislação varia muito de país para país e depende se você está negociando como indivíduo ou como empresa.

 Pesquise a forma de pagamento que você vai oferecer. Leia os anúncios de outros comerciantes que usam a mesma forma de pagamento e faça alguns negócios com eles. Tente identificar possíveis cenários antes de começar a negociar.

 Se possível, <strong


   return -1;
    }

    // Stop the timer
    gettimeofday(&tv_end, NULL);

    // Calculate the throughput
    double total_s = (tv_end.tv_sec - tv_start.tv_sec)
                     + (double)(tv_end.tv_usec - tv_start.tv_usec) / 1000000;
    if (total_s < 1.0) {
        printf("WARNING: run long enough to get meaningful results\n");
        if (total_s == 0) { return 0; }
    }
    double total_mb = (double)total_bytes / MB;
    double throughput = total_mb / total_s;
    printf("Throughput of unix socket is %.2f MB/s\n", throughput);
    return 0;
}


b.createQuery();
        Root<Employee> e = q.from(Employee.class);
        Root<Dependent> d = q.from(Dependent.class);
        q.multiselect(e, d);
        ParameterExpression<Integer> empid = cb.parameter(Integer.class, "empid");
        ParameterExpression<Date> minDate = cb.parameter(Date.class, "minDate");
        ParameterExpression<Date> maxDate = cb.parameter(Date.class, "maxDate");

        Subquery<Integer> sq = q.subquery(Integer.class);
        Root<Employee> e2 = sq.from(Employee.class);
        sq.select(cb.max(e2.get(Employee_.empId)));
        Predicate p1 = cb.equal(e.get(Employee_.empId), empid);
        Predicate p2 = cb.equal(d.get(Dependent_.id).get(DependentId_.empid), sq);
        Predicate p3 = cb.greaterThan(d.get(Dependent_.id).get(DependentId_.effDate), minDate);
        Predicate p4 = cb.lessThan(d.get(Dependent_.id).get(DependentId_.effDate), maxDate);

        q.where(cb.and(cb.and(cb.and(p1, p2), p3), p4));
        assertEquivalence(new QueryDecorator() {
            @Override
            public void decorate(Query q) {
                q.setParameter("empid",   101L);
                q.setParameter("minDate", new Date(100));
                q.setParameter("maxDate", new Date(100000));
            }
        }, q, jpql);
    }

    public void testCorrelatedNestedSubquery1() {
        String jpql = "Select Object (c) From Customer c Where Not Exists ("
                + "   Select a.id From Account As a Where "
                + "        a.customer = c  And "
                + "        exists (select o.id from Order o where o.customer = c and o.count = 1))";

        String expectedSQL = "SELECT t1.id, t1.accountNum, t3.id, t3.city, t3.country, t3.county, t3.state, "
            + "t3.street, t4.userid, t4.DTYPE, t4.age, t4.compName, t4.creditRating, t4.name, t3.zipCode, "
            + "t1.balanceOwed, t1.creditRating, t1.filledOrderCount, t1.firstName, t1.lastName, t1.name, "
            + "t1.status "
            + "FROM CR_CUST t1 LEFT OUTER JOIN CR_ADDR t3 ON t1.ADDRESS_ID = t3.id "
            + "LEFT OUTER JOIN CompUser t4 ON t3.id = t4.ADD_ID WHERE (NOT (EXISTS ("
            + "SELECT t0.id FROM CR_ACCT t0 WHERE (t0.CUSTOMER_ID = t1.id AND EXISTS ("
            + "SELECT t2.id FROM CR_ODR t2 WHERE (t2.CUSTOMER_ID = t1.id AND t2.cnt = ?))))))";

        executeAndCompareSQL(jpql, expectedSQL);

        CriteriaQuery<Customer> q = cb.createQuery(Customer.class);
        Root<Customer> c = q.from(Customer.class);
        q.select(c);

        Subquery<Long> sq = q.subquery(Long.class);
        Root<Account> a = sq.from(Account.class);
        sq.select(a.get(Account_.id));

        Subquery<Integer> sq1 = sq.subquery(Integer.class);
        Root<Order> o = sq1.from(Order.class);
        sq1.select(o.get(Order


ness.TreeBorderWest, presetB),
		g.loadPreset(d2wilderness.TreeBorderWest, presetC),
	}

	// Draw the north and south fences
	for i := 0; i < 9; i++ {
		if i > 0 && i < 8 {
			g.engine.PlaceStamp(fenceNorthStamp[rand.Intn(3)], startX+(i*9)-1, startY-15)
		}

		g.engine.PlaceStamp(fenceSouthStamp[rand.Intn(3)], startX+(i*9)-1, startY+levelDetails.SizeYNormal-12)
	}

	// Draw the east fence
	for i := 0; i < 6; i++ {
		g.engine.PlaceStamp(fenceEastStamp[rand.Intn(3)], startX+levelDetails.SizeXNormal-9, startY+(i*9)-6)
	}

	// Draw the west fence
	for i := 0; i < 9; i++ {
		g.engine.PlaceStamp(fenceWestStamp[rand.Intn(3)], startX, startY+(i*9)-6)
	}

	// Draw the west fence
	g.engine.PlaceStamp(fenceEastEdge, startX+levelDetails.SizeXNormal-9, startY+39)
	g.engine.PlaceStamp(fenceNorthWestStamp, startX, startY-15)
	g.engine.PlaceStamp(fenceSouthWestStamp, startX, startY+levelDetails.SizeYNormal-12)
	g.engine.PlaceStamp(fenceNorthEastStamp, startX+levelDetails.SizeXNormal-9, startY-15)

	areaRect := d2geom.Rectangle{
		Left:   startX + 9,
		Top:    startY - 10,
		Width:  levelDetails.SizeXNormal - 9,
		Height: levelDetails.SizeYNormal - 2,
	}
	g.generateWilderness1Contents(areaRect)
}

// nolint:gosec,gomnd // we dont need crypto-strong randomness, mapgen will get a refactor soon
func (g *MapGenerator) generateWilderness1Contents(rect d2geom.Rectangle) {
	levelDetails := g.asset.Records.GetLevelDetails(wildernessDetailsRecordID)

	denOfEvil := g.loadPreset(d2wilderness.DenOfEvilEntrance, 0)
	denOfEvilLoc := d2geom.Point{
		X: rect.Left + (rect.Width / 2) + rand.Intn(10),
		Y: rect.Top + (rect.Height / 2) + rand.Intn(10),
	}

	// Fill in the grass
	for y := 0; y < rect.Height; y++ {
		for x := 0; x < rect.Width; x++ {
			tile := g.engine.Tile(rect.Left+x, rect.Top+y)
			tile.RegionType = d2enum.RegionIdType(levelDetails.LevelType)
			floorTile := d2ds1.Tile{}
			floorTile.Prop1 = 1
			tile.Components.Floors = []d2ds1.Tile{floorTile} // wildernessGrass
			tile.PrepareTile(x, y, g.engine)
		}
	}

	stuff := []*d2mapstamp.Stamp{
		g.loadPreset(d2wilderness.StoneFill1, presetA),
		g.loadPreset(d2wilderness.StoneFill1, presetB),
		g.loadPreset(d2wilderness.StoneFill1, presetC),
		g.loadPreset(d2wilderness.StoneFill2, presetA),
		g.loadPreset(d2wilderness.StoneFill2, presetB),
		g.loadPreset(d2wilderness.StoneFill2, presetC),
		g.loadPreset(d2wilderness.Cottages1, presetA),
		g.load


animation: backSlideIn 1s both ease;
}
/* goDown */
.owl-goDown-out {
  -webkit-animation: scaleToFade .7s ease both;
  -moz-animation: scaleToFade .7s ease both;
  animation: scaleToFade .7s ease both;
}
.owl-goDown-in {
  -webkit-animation: goDown .6s ease both;
  -moz-animation: goDown .6s ease both;
  animation: goDown .6s ease both;
}
/* scaleUp */
.owl-fadeUp-in {
  -webkit-animation: scaleUpFrom .5s ease both;
  -moz-animation: scaleUpFrom .5s ease both;
  animation: scaleUpFrom .5s ease both;
}

.owl-fadeUp-out {
  -webkit-animation: scaleUpTo .5s ease both;
  -moz-animation: scaleUpTo .5s ease both;
  animation: scaleUpTo .5s ease both;
}
/* Keyframes */
/*empty*/
@-webkit-keyframes empty {
  0% {opacity: 1}
}
@-moz-keyframes empty {
  0% {opacity: 1}
}
@keyframes empty {
  0% {opacity: 1}
}
@-webkit-keyframes fadeIn {
  0% { opacity:0; }
  100% { opacity:1; }
}
@-moz-keyframes fadeIn {
  0% { opacity:0; }
  100% { opacity:1; }
}
@keyframes fadeIn {
  0% { opacity:0; }
  100% { opacity:1; }
}
@-webkit-keyframes fadeOut {
  0% { opacity:1; }
  100% { opacity:0; }
}
@-moz-keyframes fadeOut {
  0% { opacity:1; }
  100% { opacity:0; }
}
@keyframes fadeOut {
  0% { opacity:1; }
  100% { opacity:0; }
}
@-webkit-keyframes backSlideOut {
  25% { opacity: .5; -webkit-transform: translateZ(-500px); }
  75% { opacity: .5; -webkit-transform: translateZ(-500px) translateX(-200%); }
  100% { opacity: .5; -webkit-transform: translateZ(-500px) translateX(-200%); }
}
@-moz-keyframes backSlideOut {
  25% { opacity: .5; -moz-transform: translateZ(-500px); }
  75% { opacity: .5; -moz-transform: translateZ(-500px) translateX(-200%); }
  100% { opacity: .5; -moz-transform: translateZ(-500px) translateX(-200%); }
}
@keyframes backSlideOut {
  25% { opacity: .5; transform: translateZ(-500px); }
  75% { opacity: .5; transform: translateZ(-500px) translateX(-200%); }
  100% { opacity: .5; transform: translateZ(-500px) translateX(-200%); }
}
@-webkit-keyframes backSlideIn {
  0%, 25% { opacity: .5; -webkit-transform: translateZ(-500px) translateX(200%); }
  75% { opacity: .5; -webkit-transform: translateZ(-500px); }
  100% { opacity: 1; -webkit-transform: translateZ(0) translateX(0); }
}
@-moz-keyframes backSlideIn {
  0%, 25% { opacity: .5; -moz-transform: translateZ(-500px) translateX(200%); }
  75% { opacity: .5; -moz-transform: translateZ(-500px); }
  100% { opacity: 1; -moz-transform: translateZ(0) translateX(0); }
}
@keyframes backSlideIn {
  0%, 25% { opacity: .5; transform: translateZ(-500px) translateX(200%); }
  75% { opacity: .5; transform: transla


eme(QChart.ChartThemeDark)

        self.chart_view = QChartView(self.chart)
        self.chart_view.setRenderHint(QPainter.Antialiasing)

        layout.addWidget(self.chart_view)

    def update_chart(self, data):
        QMetaObject.invokeMethod(self, "update_chart_internal", Qt.QueuedConnection, Q_ARG(dict, data))

    @pyqtSlot(dict)
    def update_chart_internal(self, data):
        self.chart.removeAllSeries()
        for axis in self.chart.axes():
            self.chart.removeAxis(axis)

        bar_series = QBarSeries()
        line_series = {}

        for model, times in data.items():
            bar_set = QBarSet(model)
            bar_set.append(sum(times))
            bar_series.append(bar_set)

            line = QLineSeries()
            line.setName(f"{model} (per round)")
            for i, time in enumerate(times):
                line.append(i, time)
            line_series[model] = line

        self.chart.addSeries(bar_series)
        for line in line_series.values():
            self.chart.addSeries(line)

        axis_x = QBarCategoryAxis()
        axis_x.append(list(data.keys()))
        self.chart.addAxis(axis_x, Qt.AlignBottom)
        bar_series.attachAxis(axis_x)

        axis_y = QValueAxis()
        axis_y.setTitleText("Response Time (s)")
        self.chart.addAxis(axis_y, Qt.AlignLeft)
        bar_series.attachAxis(axis_y)

        for line in line_series.values():
            line.attachAxis(axis_x)
            line.attachAxis(axis_y)

        self.chart.setTitle("Model Response Times")
        self.chart_view.setChart(self.chart)


     *         ready.
     * @throws IOException
     *             if an I/O error occurrs.
     * @throws ClosedSelectorException
     *             if the selector is closed.
     */
    @DSComment("Abstract Method")
    @DSSafe(DSCat.SAFE_LIST)
    @DSGenerator(tool_name = "Doppelganger", tool_version = "2.0", generated_on = "2013-12-30 12:56:58.551 -0500", hash_original_method = "F933A052DB439CAF9A71EC65B043D50B", hash_generated_method = "6B0F786ECDCF31AA21DDEF960F56D712")

public abstract int selectNow() throws IOException;

    /**
     * Forces blocked {@code select} operations to return immediately.
     * <p>
     * If no {@code select} operation is blocked when {@code wakeup()} is called
     * then the next {@code select} operation will return immediately. This can
     * be undone by a call to {@code selectNow()}; after calling
     * {@code selectNow()}, a subsequent call of {@code select} can block
     * again.
     *
     * @return this selector.
     * @throws ClosedSelectorException
     *             if the selector is closed.
     */
    @DSComment("Abstract Method")
    @DSSpec(DSCat.ABSTRACT_METHOD)
    @DSGenerator(tool_name = "Doppelganger", tool_version = "2.0", generated_on = "2013-12-30 12:56:58.554 -0500", hash_original_method = "8C31B4EE7A3DB9AE0B77B5A6C5713FF8", hash_generated_method = "F9518A2DA2076A59BF0D3FBE2971D639")

public abstract Selector wakeup();

}

/* Licensed to the Apache Software Foundation (ASF) under one or more
 * Copyright (C) 2015,  Massachusetts Institute of Technology
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation; either version 2 of the License, or (at your
 * option) any later version.
 *
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
 * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 * for more details.
 *
 * You should have received a copy of the GNU General Public License along
 * with this program; if not, write to the Free Software Foundation, Inc.,
 * 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 *
 * Please email droidsafe@lists.csail.mit.edu if you need additional
 * information or have any questions.
 *
 *
 * This file incorporates work covered by the following copyright and
 * permission notice:
 *
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

/***** THIS FILE HAS BEEN MODIFIED FROM THE ORIGINAL BY THE DROIDSAFE PROJECT. *****/

package java.nio.channels;

// Droidsafe Imports
import droidsafe.runtime.*;
import droidsafe.helpers.*;
import droidsafe.annotations.*;

public class Can


E="p_trail">

void p_trail(Trail t);

This routine prints (to stdout) a Trail.  The whole list is printed.

void p_unify_mem();

This routine prints (to stdout) memory usage statistics for data types
associated with the unify package.

BOOL subst_changes_term(Term t, Context c);

This routine checks if a subsitution would change a term, if applied.

void undo_subst(Trail tr);

This routine clears substitution entries recoded in Trail tr,
and frees the corresponding Trail nodes.

void undo_subst_2(Trail tr, Trail sub_tr);

It is assumed that Trail sub_tr is a subtrail of Trail tr.
This routine clears part (maybe all) of a substitution, by
clearing the entries from tr up to, but not including sub_tr.
The corresponding Trail nodes are deallocated, so the
caller should no longer refer to tr.  (This is useful for
inference rules like hyperresolution, which backtrack,
undoing parts of substitutions.)

BOOL unify(Term t1, Context c1,
	   Term t2, Context c2, Trail *trp);

This routine tries to unify two terms in their respective
contexts.  Trail * trp is the address of a Trail.
If successful, the trail is extended (at its front) with
substitutions that were made, and trp is updated to point to
the new beginning of the trail.  If unify fails, the Contexts and
the Trail * are not changed.

You must make sure, before calling unify(), that no variable v in
t1 or t2 has VARNUM(v) >= MAXVARS.  This is usually accomplished by
calling a routine that renames variables.

Here is an example how to use unify(),
apply(), and undo_subst().  Assume we have terms t1 and t2.
(Terms t1 and t2 may share variables, but we "separate" the
variables by using different contexts.  That is, variable v1 in
context c1 is different from variable v1 in context c2.)

    {
        Context c1 = get_context();
        Context c2 = get_context();


2Freact-oidc-context-fetch) **Deprecated in v4**
  - [`@axa-fr/react-oidc-redux`](./packages/redux#readme.md) [![npm version](https://badge.fury.io/js/%40axa-fr%2Freact-oidc-redux.svg)](https://badge.fury.io/js/%40axa-fr%2Freact-oidc-redux) **Deprecated in v4 : use react-oidc-context which works with redux and in fact does not use any react context**
  - [`@axa-fr/react-oidc-redux-fetch`](./packages/redux-fetch#readme.md) [![npm version](https://badge.fury.io/js/%40axa-fr%2Freact-oidc-redux-fetch.svg)](https://badge.fury.io/js/%40axa-fr%2Freact-oidc-redux-fetch) **Deprecated in v4**
  - [`@axa-fr/react-oidc-fetch-observable`](./packages/fetch-observable#readme.md) [![NPM version](https://badge.fury.io/js/%40axa-fr%2Freact-oidc-fetch-observable.svg)](https://badge.fury.io/js/%40axa-fr%2Freact-oidc-fetch-observable) **Deprecated in v4**

Migration PullRequest [sample](https://github.com/samuel-gomez/react-starter-toolkit/pull/36)

Main provider component have been renamed

```javascript
import { AuthenticationProvider } from '@axa-fr/react-oidc-context';

// old v3

<AuthenticationProvider
  configuration={oidcConfiguration}
  loggerLevel={oidcLog.DEBUG}
></AuthenticationProvider>;

// in v5 becomes

import { OidcProvider } from '@axa-fr/react-oidc-context';

// loggerLevel : Logger property has been removed in v4
<OidcProvider configuration={oidcConfiguration}></OidcProvider>;
```

Provider properties have changed, you need to keep only required properties for v4 else it won't work.

```javascript
// old v3
const propTypes = {
  notAuthenticated: PropTypes.elementType, // react component displayed during authentication
  notAuthorized: PropTypes.elementType, // react component displayed in case user is not Authorised
  authenticatingComponent: PropTypes.elementType, // react component displayed when about to redirect user to be authenticated
  callbackComponentOverride: PropTypes.elementType, // react component displayed when user is connected
  sessionLostComponent: PropTypes.elementType, // react component displayed when user loose authentication session
  configuration: PropTypes.shape({
    client_id: PropTypes.string.isRequired, // oidc client configuration, the same as oidc client library used internally https://github.com/IdentityModel/oidc-client-js
    redirect_uri: PropTypes.string.isRequired,
    response_type: PropTypes.string.isRequired,
    scope: PropTypes.string.isRequired,
    authority: PropTypes.string.isRequired,
    silent_redirect_uri: PropTypes.string.isRequired,
    automaticSilentRenew: PropTypes.bool, //optional, by default to true
    loadUserInfo: PropTypes.bool, //optional, by default to true
    post_logout_redirect_uri: PropTypes.string, // optional
    metadata: PropTypes.shape({
      issuer: PropTypes.string,
      jwks_uri: PropTypes.string,
      authorization_endpoint: PropTypes.string,
      token_endpoint: PropTypes.string,
      userinfo_endpoint: PropTypes.string,
      end_session_endpoint: PropTypes.string,
      revocation_endpoint: PropTypes.string,
      introspection_endpoint: PropTypes.string,
    }),
  }).isRequired,
  customEvents={{...}}, //event hooks for onUserLoaded, onUserUnloaded, onSilentRenewError, onUserSessionChanged.  DEPRECATED in v4+
  acr_values: PropTypes.string, //custom acr_values. See 'extras' now.
  isEnabled: PropTypes


//
//  _ASPendingState.h
//  AsyncDisplayKit
//
//  Copyright (c) 2014-present, Facebook, Inc.  All rights reserved.
//  This source code is licensed under the BSD-style license found in the
//  LICENSE file in the root directory of this source tree. An additional grant
//  of patent rights can be found in the PATENTS file in the same directory.
//

#import <UIKit/UIKit.h>

#import "UIView+ASConvenience.h"

/**

 Private header for ASDisplayNode.mm

 _ASPendingState is a proxy for a UIView that has yet to be created.
 In response to its setters, it sets an internal property and a flag that indicates that that property has been set.

 When you want to configure a view from this pending state information, just call -applyToView:
 */

@interface _ASPendingState : NSObject <ASDisplayNodeViewProperties, ASDisplayProperties>

// Supports all of the properties included in the ASDisplayNodeViewProperties protocol

- (void)applyToView:(UIView *)view withSpecialPropertiesHandling:(BOOL)setFrameDirectly;
- (void)applyToLayer:(CALayer *)layer;

+ (_ASPendingState *)pendingViewStateFromLayer:(CALayer *)layer;
+ (_ASPendingState *)pendingViewStateFromView:(UIView *)view;

@property (nonatomic, readonly) BOOL hasSetNeedsLayout;
@property (nonatomic, readonly) BOOL hasSetNeedsDisplay;

@property (nonatomic, readonly) BOOL hasChanges;

- (void)clearChanges;

@end


 心 on 2016/01/26.
//  Copyright (c) 2016年 渡部 心. All rights reserved.
//

#include "Quaternion.h"

namespace SLR {
    template struct SLR_API QuaternionTemplate<float>;
    template struct SLR_API QuaternionTemplate<double>;

    template <typename RealType>
    void decompose(const Matrix4x4Template<RealType> &mat, Vector3DTemplate<RealType>* T, QuaternionTemplate<RealType>* R, Matrix4x4Template<RealType>* S) {
        T->x = mat[3][0];
        T->y = mat[3][1];
        T->z = mat[3][2];

        Matrix4x4Template<RealType> matRS = mat;
        for (int i = 0; i < 3; ++i)
            matRS[3][i] = matRS[i][3] = 0.0f;
        matRS[3][3] = 1.0f;

        RealType norm;
        int count = 0;
        Matrix4x4Template<RealType> curR = matRS;
        do {
            Matrix4x4Template<RealType> itR = invert(transpose(curR));
            Matrix4x4Template<RealType> nextR = 0.5f * (curR + itR);

            norm = 0;
            for (int i = 0; i < 3; ++i) {
                using std::abs;
                RealType n = abs(curR[0][i] - nextR[0][i]) + abs(curR[1][i] - nextR[1][i]) + abs(curR[2][i] - nextR[2][i]);
                norm = std::max(norm, n);
            }
            curR = nextR;
        } while (++count < 100 && norm > 0.0001);
        *R = QuaternionTemplate<RealType>(curR);

        *S = invert(curR) * matRS;
    }
    template SLR_API void decompose(const Matrix4x4Template<float> &mat, Vector3DTemplate<float>* T, QuaternionTemplate<float>* R, Matrix4x4Template<float>* S);
    template SLR_API void decompose(const Matrix4x4Template<double> &mat, Vector3DTemplate<double>* T, QuaternionTemplate<double>* R, Matrix4x4Template<double>* S);
}
//
//  rgb_types.cpp
//
//  Created by 渡部 心 on 2016/01/26.
//  Copyright (c) 2016年 渡部 心. All rights reserved.
//

#include "rgb_types.h"

namespace SLR {
    template struct SLR_API RGBSamplesTemplate<float>;
//    template SLR_API const uint32_t RGBSamplesTemplate<float>::NumComponents;

    template struct SLR_API RGBSamplesTemplate<double>;
//    template SLR_API const uint32_t RGBSamplesTemplate<double>::NumComponents;

    template struct SLR_API RGBTemplate<float>;
//    template SLR_API const uint32_t RGBTemplate<float>::NumComponents;
//    template SLR_API const RGBTemplate<float> RGBTemplate<float>::Zero;
//    template SLR_API const RGBTemplate<float> RGBTemplate<float>::One;
//    template SLR_API const RGBTemplate<float> RGBTemplate<float>::Inf;
//    template SLR_API const RGBTemplate<float> RGBTemplate<float>::NaN;

    template struct SLR_API RGBTemplate<double>;
//    template SLR_API const uint32_t RGBTemplate<double>::NumComponents;
//    template SLR_API const RGBTemplate<double> RGBTemplate<double>::Zero;
//    template SLR_API const RGBTemplate<double> RGBTemplate<double>::One;
//    template SLR_API const RGBTemplate<double> RGBTemplate<double>::Inf;
//    template SLR_API const RGBTemplate<double> RGBTemplate<double>::NaN;

    template <typename RealType>
    RGBTemplate<RealType> min(const RGBTempl


(child3Attr2.getValue()).isEqualTo("wrap_content")
    val child3Attr3 = child3Attributes[2]
    Truth.assertThat(child3Attr3.getName()).isEqualTo("layout_height")
    Truth.assertThat(child3Attr3.getNamespaceUri())
      .isEqualTo("http://schemas.android.com/apk/res/android")
    Truth.assertThat(child3Attr3.getValue()).isEqualTo("wrap_content")
    val child3Attr4 = child3Attributes[3]
    Truth.assertThat(child3Attr4.getName()).isEqualTo("text")
    Truth.assertThat(child3Attr4.getNamespaceUri())
      .isEqualTo("http://schemas.android.com/apk/res/android")
    Truth.assertThat(child3Attr4.getValue()).isEqualTo("@string/cancel_button")
  }

  @Test
  fun testText() {
    /*
     * <test>text</test>
     */
    var proto = XmlResourceBuilder(fakeFile)
      .startElement("test", "")
      .addText("text")
      .endElement()
      .build()
      .xmlProto

    Truth.assertThat(proto.hasElement()).isTrue()
    var root = proto.getElement()
    Truth.assertThat(root.getNamespaceUri()).isEmpty()
    Truth.assertThat(root.getName()).isEqualTo("test")
    Truth.assertThat(root.getNamespaceDeclarationList()).hasSize(0)
    Truth.assertThat(root.getAttributeList()).hasSize(0)
    Truth.assertThat(root.getChildList()).hasSize(1)

    Truth.assertThat(root.getChildList()[0].hasElement()).isFalse()
    Truth.assertThat(root.getChildList()[0].getText()).isEqualTo("text")

    // Consecutive text elements should be treated as a single element. XMLEventReader parses those
    // as one event, even though they're divided by new lines.
    /*
     * <test>
     *   Text that is
     *   continued here.
     * </test>
     */
    proto = XmlResourceBuilder(fakeFile)
      .startElement("test", "")
      .addText("\nText that is\n continued here.")
      .endElement()
      .build()
      .xmlProto

    Truth.assertThat(proto.hasElement()).isTrue()
    root = proto.getElement()
    Truth.assertThat(root.getNamespaceUri()).isEmpty()
    Truth.assertThat(root.getName()).isEqualTo("test")
    Truth.assertThat(root.getNamespaceDeclarationList()).hasSize(0)
    Truth.assertThat(root.getAttributeList()).hasSize(0)
    Truth.assertThat(root.getChildList()).hasSize(1)

    Truth.assertThat(root.getChildList()[0].hasElement()).isFalse()
    Truth.assertThat(root.getChildList()[0].getText()).isEqualTo("\nText that is\n continued here.")

    // Text elements should be considered separate if they have anything inbetween them.
    /*
     * <test>
     *   Text that is
     *   <!-- comment -->
     *   broken by comment.
     * </test>
     */
    proto = XmlResourceBuilder(fakeFile)
      .startElement("test", "")
      .addText("Text that is")
      .addComment()
      .addText("broken by comment.")
      .endElement()
      .build()
      .xmlProto

    Truth.assertThat(proto.hasElement()).isTrue()
    root = proto.getElement()
    Truth.assertThat(root.getNamespaceUri()).isEmpty()
    Truth.assertThat(root.getName()).isEqualTo("test")
    Truth.assertThat(root.getNamespaceDeclarationList()).hasSize(0)
    Truth.assertThat(root.getAttributeList()).hasSize(0)
    Truth.assertThat(root.getChildList()).hasSize(2)

    Truth.assertThat(root.getChildList()[0].hasElement()).isFalse()
    Truth.assertThat(root.getChildList()[0].getText()).isEqualTo("Text that is")
    Truth.assertThat


 useMultiInstance,
      classifierOptions: classifierOptions,
    );
  }

  Future<void> dispose() async {
    await _modelManager.dispose();
    YOLOInstanceManager.unregisterInstance(_instanceId);
    _isInitialized = false;
  }
}
// Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license

import 'package:flutter/services.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:ultralytics_yolo/core/yolo_inference.dart';
import 'package:ultralytics_yolo/models/yolo_task.dart';
import 'package:ultralytics_yolo/models/yolo_exceptions.dart';
import 'utils/test_helpers.dart';

void main() {
  TestWidgetsFlutterBinding.ensureInitialized();

  group('YOLOInference', () {
    late MethodChannel mockChannel;
    late List<MethodCall> log;

    setUp(() {
      final setup = YOLOTestHelpers.createYOLOTestSetup();
      mockChannel = setup.$1;
      log = setup.$2;
    });

    tearDown(() {
      TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger
          .setMockMethodCallHandler(mockChannel, null);
      log.clear();
    });

    test('constructor initializes correctly', () {
      final inference = YOLOInference(
        channel: mockChannel,
        instanceId: 'test_instance',
        task: YOLOTask.detect,
      );

      expect(inference, isNotNull);
    });

    test('predict with valid image data', () async {
      final inference = YOLOInference(
        channel: mockChannel,
        instanceId: 'test_instance',
        task: YOLOTask.detect,
      );

      final imageBytes = Uint8List.fromList([1, 2, 3, 4, 5]);
      final result = await inference.predict(imageBytes);

      expect(result, isA<Map<String, dynamic>>());
      YOLOTestHelpers.assertMethodCalled(
        log,
        'predictSingleImage',
        arguments: {'image': imageBytes, 'instanceId': 'test_instance'},
      );
    });

    test('predict with confidence and IoU thresholds', () async {
      final inference = YOLOInference(
        channel: mockChannel,
        instanceId: 'test_instance',
        task: YOLOTask.detect,
      );

      final imageBytes = Uint8List.fromList([1, 2, 3, 4, 5]);
      await inference.predict(
        imageBytes,
        confidenceThreshold: 0.7,
        iouThreshold: 0.5,
      );

      YOLOTestHelpers.assertMethodCalled(
        log,
        'predictSingleImage',
        arguments: {
          'image': imageBytes,
          'confidenceThreshold': 0.7,
          'iouThreshold': 0.5,
          'instanceId': 'test_instance',
        },
      );
    });

    test('predict throws InvalidInputException for empty image', () async {
      final inference = YOLOInference(
        channel: mockChannel,
        instanceId: 'test_instance',
        task: YOLOTask.detect,
      );

      expect(
        () => inference.predict(Uint8List(0)),
        throwsA(isA<InvalidInputException>()),
      );
    });

    test(
      'predict throws InvalidInputException for invalid confidence threshold',
      () async {
        final inference = YOLOInference(
          channel: mockChannel,
          instanceId: 'test_instance',
          task: YOLOTask.detect,
        );

        final imageBytes = Uint8List.fromList([1, 2, 3, 4, 5]);

        expect(
          () => inference.predict(imageBytes, confidenceThreshold: 1.5),
          throwsA(isA<InvalidInputException>()),
        );

        expect(
          () => inference.predict(imageBytes, confidenceThreshold: -0.1),
          throwsA(


 --text-highlight-bg: hsla(212, 34%, 54%, 1);
  --text-linenumber: hsla(216, 3%, 32%, 0.85);
  --text-linenumber-active: hsla(0, 0%, 61%, 0.85);

  --text-strong: var(--discord-yellow-alt);
  --text-em: hsla(62, 31%, 61%, 1);
  --text-tag: hsla(27, 100%, 63%, 0.73);
  --text-mark: hsla(37, 82%, 74%, 1);

  --markup-code: hsla(34, 89%, 61%, 1);

  --text-header: hsla(233, 45%, 69%, 1);

  --text-title-h1: hsla(243, 35%, 65%, 1);
  --text-title-h2: var(--text-header);
  --text-title-h3: var(--text-header);
  --text-title-h4: var(--text-header);
  --text-title-h5: var(--text-header);
  --text-title-h6: hsla(192, 13%, 53%, 1);

  --text-a: hsla(322, 65%, 70%, 1);
  --text-a-hover: hsla(327, 100%, 77%, 1);

  --interactive-accent: var(--discord-green);
  --interactive-accent-hover: hsla(152, 60%, 43%, 1);
  --interactive-accent-light: var(--discord-yellow-light);

  --interactive-accent-alt: hsla(220, 7%, 17%, 1);
  --interactive-hover: hsla(210, 3%, 87%, 1);
  --interactive-muted: hsla(217, 8%, 34%, 1);
  --interactive-normal: hsla(216, 4%, 74%, 1);
  --interactive-active: hsla(0, 100%, 100%, 1);

  --blockquote-border: hsla(286, 22%, 66%, 1);
  --blockquote-bg: hsla(240, 11%, 2%, 0.07);

  --scrollbar-bg: transparent;
  --scrollbar-thin-thumb: hsla(216, 7%, 14%, 1);
  --scrollbar-thin-track: transparent;
  --scrollbar-auto-thumb: hsla(216, 7%, 14%, 1);
  --scrollbar-auto-track: hsla(210, 10%, 20%, 1);
  --scrollbar-auto-scrollbar-color-thumb: hsla(216, 7%, 14%, 1);
  --scrollbar-auto-scrollbar-color-track: hsla(223, 7%, 20%, 1);

  --cursor: default;
  --opacity-translucency: 1;

  --graph-line: hsla(191, 57%, 35%, 1);
  --graph-line-highlight: hsla(191, 57%, 59%, 1);
  --graph-circle-outline: transparent;
  --graph-circle-fill: hsla(59, 99%, 50%, 1);
  --graph-circle-fill-highlight: hsla(59, 99%, 50%, 1);
  --graph-circle-fill-unresolved: hsla(206, 89%, 71%, 1);
  --graph-fill-tag: hsla(250, 100%, 77%, 1);
  --graph-fill-attachment: hsla(314, 57%, 63%, 1);
  --graph-arrow: hsla(314, 57%, 63%, 1);
}

/* HACK for settings panel if title bar is brought back by user */
body.theme-dark:not(.hider-frameless):not(.discordian-writer):not(.discordian-theme) .modal-container {
  top: -22px !important;
  height: 100vh !important;
}

/*----------------------------------------------------------------


("Z180SetIRQLine called when no CPU open\n"));
	if (irqline != 0 && irqline != Z180_INPUT_LINE_NMI) bprintf(PRINT_ERROR, _T("Z180SetIRQLine called with invalid line %d\n"), irqline);
	if (state != CPU_IRQSTATUS_NONE && state != CPU_IRQSTATUS_ACK && state != CPU_IRQSTATUS_AUTO)
		bprintf(PRINT_ERROR, _T("Z180SetIRQLine called with invalid state %d\n"), state);
#endif

	z180_set_irq_line(irqline, state);
}

void Z180Scan(INT32 nAction)
{
#if defined FBA_DEBUG
	if (!DebugCPU_Z180Initted) bprintf(PRINT_ERROR, _T("Z180Scan called without init\n"));
#endif
	z180_scan(nAction);
}

void __fastcall z180_cpu_write_handler(UINT32 address, UINT8 data)
{
	address &= PROG_MASK;

	if (Mem[nActiveCPU][WRITE][(address >> PROG_PAGE_BITS)]) {
		Mem[nActiveCPU][WRITE][(address >> PROG_PAGE_BITS)][address & PROG_PAGE_MASK] = data;
		return;
	}

	if (prog_write[nActiveCPU]) {
		prog_write[nActiveCPU](address, data);
		return;
	}
}

UINT8 __fastcall z180_cpu_fetchop_handler(UINT32 address)
{
	address &= PROG_MASK;

	if (Mem[nActiveCPU][FETCHOP][(address >> PROG_PAGE_BITS)]) {
		return Mem[nActiveCPU][FETCHOP][(address >> PROG_PAGE_BITS)][address & PROG_PAGE_MASK];
	}

	if (prog_fetchop[nActiveCPU]) {
		return prog_fetchop[nActiveCPU](address);
	}

	// fall back to arg
	if (Mem[nActiveCPU][FETCHARG][(address >> PROG_PAGE_BITS)]) {
		return Mem[nActiveCPU][FETCHARG][(address >> PROG_PAGE_BITS)][address & PROG_PAGE_MASK];
	}

	if (prog_fetcharg[nActiveCPU]) {
		return prog_fetcharg[nActiveCPU](address);
	}

	// fall back to read
	if (Mem[nActiveCPU][READ ][(address >> PROG_PAGE_BITS)]) {
		return Mem[nActiveCPU][READ ][(address >> PROG_PAGE_BITS)][address & PROG_PAGE_MASK];
	}

	if (prog_read[nActiveCPU]) {
		return prog_read[nActiveCPU](address);
	}

	return 0;
}

UINT8 __fastcall z180_cpu_fetcharg_handler(UINT32 address)
{
	address &= PROG_MASK;

	if (Mem[nActiveCPU][FETCHARG][(address >> PROG_PAGE_BITS)]) {
		return Mem[nActiveCPU][FETCHARG][(address >> PROG_PAGE_BITS)][address & PROG_PAGE_MASK];
	}

	if (prog_fetcharg[nActiveCPU]) {
		return prog_fetcharg[nActiveCPU](address);
	}

	// fall back to op
	if (Mem[nActiveCPU][FETCHOP][(address >> PROG_PAGE_BITS)]) {
		return Mem[nActiveCPU][FETCHOP][(address >> PROG_PAGE_BITS)][address & PROG_PAGE_MASK];
	}

	if (prog_fetchop[nActiveCPU]) {
		return prog_fetchop[nActiveCPU](address);
	}

	// fall back to read
	if (Mem[nActiveCPU][READ ][(address >> PROG_PAGE_BITS)]) {
		return Mem[nActiveCPU][READ ][(address >> PROG_PAGE_BITS)][address & PROG_PAGE_MASK];
	}

	if (pro