li>Renamed 'Sony Playstation 1' to 'Sony PlayStation 1'

Renamed 'Sony Playstation 2' to 'Sony PlayStation 2'

Renamed 'Sony Playstation Portable' to 'Sony PlayStation Portable'

Renamed 'Sony Pocketstation' to 'Sony PocketStation'

SNK NeoGeo CD is now in arcade section

Small updates

Updated the ECC banner to look much more professional

Fixes the horizontal rating images, now going from left ro right!

Also added transparency to the images!

ECC Startup
v2.1.0.0:

ECC Startup will generate 'media' images when necessary!

This saves some MB's on installation, and also 80 KB for each platform update!

The images look much nicer to!

Included: thirparty tool 'convert' from imagemagick!
v2.0.2.0:

ECC Startup can now be translated, files can be found in 'ecc-system\translations'
v2.0.1.3:

Fixed 'already started' bug for Windows Vista

Now gives the user a one-time message when this happens

Removing unused files and folders

Folder "ecc-core\share\icons\default\16x16"

Folder "ecc-core\share\icons\default"

Folder "ecc-core\share\icons"

This fixes the temporally icon for GTK and uses the default again!

Folder "ecc-system\item"

Folder "ecc-system\items"

File "ecc-system\gui2\eccmediaplaceholdercamya.png

File "ecc-system\images\eccphmediacamya.png

File "ecc-system\images\eccsys\internal\eccheader.png

File "ecc-system\images\eccsys\rating\eccrating6v.png

File "ecc-system\manager_OLD_cGui.php"
v2.0.1.2:

Added a 'LOADING ECC...' label on startup

Added a loadingbar in upper-right corner, sweet!
v2.0.1.1:

Fixed the splashscreen unload before mainwindow pop-up!

Added a splashscreen when ECC is restarting!
v2.0.1.0:

Added a language selector on first startup!

Added command '/sndprev' to preview the selected startup sound

eventually there will be a 'sound preview' button in ECC config!
v2.0.0.9:

Has a 'smart splashscreen timeout calculator' built in ;)

On some systems ECC could not load within 20 seconds!

Now validates the system and sets a timeout value!

Added BIN extension to Sega Megadrive 32X
v2.0.0.8:

Increase


": "https://aktion-hummelschutz.de/kontakt-impressum/datenschutz/"
  },

  onInitialise: function (status) {
  var type = this.options.type;
  var didConsent = this.hasConsented();
  if (type == 'opt-in' && didConsent) {
    // enable cookies
  }
  if (type == 'opt-out' && !didConsent) {
    // disable cookies
  }
},

onStatusChange: function(status, chosenBefore) {
  var type = this.options.type;
  var didConsent = this.hasConsented();
  if (type == 'opt-in' && didConsent) {
    // enable cookies
  }
  if (type == 'opt-out' && !didConsent) {
    // disable cookies
  }
},

onRevokeChoice: function() {
  var type = this.options.type;
  if (type == 'opt-in') {
    // disable cookies
  }
  if (type == 'opt-out') {
    // enable cookies
  }
},
})});
</script>

Holen Sie sich meinen kostenlosen Newsletter

 Neues aus Hummel-Forschung & -Alltag.

 Ergebnisse wissenschaftlicher Studien.

 Neuigkeiten vor allen anderen erfahren.

 Kostenlos. Werbefrei. Jederzeit kündbar,
ohne eine Frist einzuhalten.

<form method="post" action="https://aktion-hummelschutz.de/?na=s" onsubmit="return newsletter_check(this)">

Geben Sie hier Ihre Email-Adresse an:<input class="tnp-email" type="email" name="ne" required style="border:2px solid #000;font-size:1.6em;color:#000;">

<input type="checkbox" name="ny" required class="tnp-privacy"> Ich willige der Speicherung von Daten zum Erhalt des Newsletters bis auf Widerruf ein.

<input class="tnp-submit" type="submit" value="Jetzt eintragen » »" style="background-color: blue;">

</form>

Zur Startseite | </s


  }

  // maps a json object with a list of AssetBulkUpdateDto-objects as value to a dart map
  static Map<String, List<AssetBulkUpdateDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
    final map = <String, List<AssetBulkUpdateDto>>{};
    if (json is Map && json.isNotEmpty) {
      // ignore: parameter_assignments
      json = json.cast<String, dynamic>();
      for (final entry in json.entries) {
        map[entry.key] = AssetBulkUpdateDto.listFromJson(entry.value, growable: growable,);
      }
    }
    return map;
  }

  /// The list of required keys that must be present in a JSON.
  static const requiredKeys = <String>{
    'ids',
  };
}

//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.12

// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars

part of openapi.api;

class TimeBucketSize {
  /// Instantiate a new enum with the provided [value].
  const TimeBucketSize._(this.value);

  /// The underlying value of this enum member.
  final String value;

  @override
  String toString() => value;

  String toJson() => value;

  static const DAY = TimeBucketSize._(r'DAY');
  static const MONTH = TimeBucketSize._(r'MONTH');

  /// List of all possible values in this [enum][TimeBucketSize].
  static const values = <TimeBucketSize>[
    DAY,
    MONTH,
  ];

  static TimeBucketSize? fromJson(dynamic value) => TimeBucketSizeTypeTransformer().decode(value);

  static List<TimeBucketSize>? listFromJson(dynamic json, {bool growable = false,}) {
    final result = <TimeBucketSize>[];
    if (json is List && json.isNotEmpty) {
      for (final row in json) {
        final value = TimeBucketSize.fromJson(row);
        if (value != null) {
          result.add(value);
        }
      }
    }
    return result.toList(growable: growable);
  }
}

/// Transformation class that can [encode] an instance of [TimeBucketSize] to String,
/// and [decode] dynamic data back to [TimeBucketSize].
class TimeBucketSizeTypeTransformer {
  factory TimeBucketSizeTypeTransformer() => _instance ??= const TimeBucketSizeTypeTransformer._();

  const TimeBucketSizeTypeTransformer._();

  String encode(TimeBucketSize data) => data.value;

  /// Decodes a [dynamic value][data] to a TimeBucketSize.
  ///
  /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully,
  /// then null is returned. However, if [allowNull] is false and the [dynamic value][data]
  /// cannot be decoded successfully, then an [UnimplementedError] is thrown.
  ///
  /// The [allowNull] is very handy when an API changes and a new enum value is added or removed,
  /// and users are still using an old app with the old code.
  TimeBucketSize? decode(dynamic data, {bool allowNull = true}) {
    if (data != null) {
      switch (data) {
        case r'DAY': return TimeBucketSize.DAY;
        case r'MONTH': return TimeBucketSize.MONTH;
        default:
          if (!allowNull) {
            throw ArgumentError('Unknown enum value to decode: $data');
          }
      }
    }
    return null;
  }

  /// Singleton [TimeBucketSizeTypeTransformer] instance.
  static TimeBucketSizeTypeTransformer? _instance;
}

//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.12

// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars

part of openapi.api;

class SharedLinkEditDto {
  /// Retur


x5
    RTN_BLACKHOLE       = 0x6
    RTN_UNREACHABLE     = 0x7
    RTN_PROHIBIT        = 0x8
    RTN_THROW           = 0x9
    RTN_NAT             = 0xa
    RTN_XRESOLVE        = 0xb
    RTNLGRP_NONE        = 0x0
    RTNLGRP_LINK        = 0x1
    RTNLGRP_NOTIFY      = 0x2
    RTNLGRP_NEIGH       = 0x3
    RTNLGRP_TC          = 0x4
    RTNLGRP_IPV4_IFADDR = 0x5
    RTNLGRP_IPV4_MROUTE = 0x6
    RTNLGRP_IPV4_ROUTE  = 0x7
    RTNLGRP_IPV4_RULE   = 0x8
    RTNLGRP_IPV6_IFADDR = 0x9
    RTNLGRP_IPV6_MROUTE = 0xa
    RTNLGRP_IPV6_ROUTE  = 0xb
    RTNLGRP_IPV6_IFINFO = 0xc
    RTNLGRP_IPV6_PREFIX = 0x12
    RTNLGRP_IPV6_RULE   = 0x13
    RTNLGRP_ND_USEROPT  = 0x14
    SizeofNlMsghdr      = 0x10
    SizeofNlMsgerr      = 0x14
    SizeofRtGenmsg      = 0x1
    SizeofNlAttr        = 0x4
    SizeofRtAttr        = 0x4
    SizeofIfInfomsg     = 0x10
    SizeofIfAddrmsg     = 0x8
    SizeofRtMsg         = 0xc
    SizeofRtNexthop     = 0x8
)

❖
const (
    SizeofSockFilter = 0x8
    Siz


rseAcceleration = (rawData: Buffer, dataOffset: DataFormatV3Offset): number => {
    const acceleration = rawData.readInt16BE(dataOffset);
    return acceleration / 1000;
};

/**
 * Parses the temperature from the advertisement.
 * Temperature is divided in base temperature which is a signed byte and fractions.
 *
 * @return Returns the value in Celsius (C).
 */
const parseTemperature = (rawData: Buffer): number => {
    const temperatureByte = rawData.readUInt8(DataFormatV3Offset.TemperatureBase);

    // First bit is the sign bit, which tells if the temperature is negative.
    const temperatureBase = temperatureByte & 0x7F;
    const isTemperatureNegative = ((temperatureByte >> 7) & 1) === 1;
    const temperatureFraction = rawData.readUInt8(DataFormatV3Offset.TemperatureFraction) / 100;

    const temperature = temperatureBase + temperatureFraction;

    return isTemperatureNegative ? temperature * -1 : temperature;
};

/**
 * Parses the humidity from the advertisement.
 * One lsb is 0.5%, e.g. 128 is 64%. Values above 200 (100%) indicate a fault in sensor.
 *
 * @return Returns the value in percents (%)
 */
const parseRelativeHumidity = (rawData: Buffer): number => {
    return rawData.readUInt8(DataFormatV3Offset.Humidity) * 0.5;
};

/**
 * Parses the battery voltage from the advertisement.
 *
 * @return Returns the value in Volts (V).
 */
const parseBatteryVoltage = (rawData: Buffer): number => {
    return rawData.readUInt16BE(DataFormatV3Offset.BatteryVoltage) / 1000;
};

/**
 * Parses the Atmospheric pressure from the advertisement.
 * Values supported by the RuuviTag are 50000 Pa to 115536 Pa in 1 Pa increments.
 *
 * Example:
 * Value	Measurement
 * 00000	50000 Pa
 * 51325	101325 Pa (average sea-level pressure)
 * 65536	115536 Pa
 *
 * @return Returns the pressure in Pascals (Pa).
 */
const parsePressure = (rawData: Buffer): number => {
    const minimumSupportedPascalMeasurement = 50000;
    return rawData.readUInt16BE(DataFormatV3Offset.Pressure) + minimumSupportedPascalMeasurement;
};

/**
 * Parses the raw manufacturer specific data field according to the Data Format 3 Specification (RAWv1)
 * @see https://github.com/ruuvi/ruuvi-sensor-protocols/blob/master/dataformat_03.md
 */
const DataFormat3ParsingStrategy: RuuviTagParsingStrategy = {
    parse(rawRuuviTagData) {
        return {
            accelerationX: parseAcceleration(rawRuuviTagData, DataFormatV3Offset.AccelerationX),
            accelerationY: parseAcceleration(rawRuuviTagData, DataFormatV3Offset.AccelerationY),
            accelerationZ: parseAcceleration(rawRuuviTagData, DataFormatV3Offset.AccelerationZ),
            batteryVoltage: parseBatteryVoltage(rawRuuviTagData),
            relativeHumidityPercentage: parseRelativeHumidity(rawRuuviTagData),
            pressure: parsePressure(rawRuuviTagData),
            temperature: parseTemperature(rawRuuviTagData),
            measurementSequence: null,
            movementCounter: null,
            txPower: null,
            macAddress: null,
        };
    },
};

export default DataFormat3ParsingStrategy;
import { Request } from 'express';

/**
 * Gets browser info from user
 * @param {*} req - request object
 */
const getCountry = (req: Request): string | undefined => {
  const res = req.headers['cf-ipcountry'] || 'XX';
  if (Array.isArray(res)) {
    return


ring filePath) {
      return <String, String>{
        'directory': '/unused',
        'command': '../../buildtools/mac-x64/clang/bin/clang $filePath',
        'file': filePath,
      };
    }

    final List<String> filePaths = <String>[
      for (int i = 0; i < 10; ++i) '/path/to/a/source_file_$i.cc'
    ];
    final List<Map<String, String>> buildCommandsData =
        filePaths.map((String e) => makeBuildCommandEntry(e)).toList();
    final List<Map<String, String>> shardBuildCommandsData =
      filePaths.sublist(6).map((String e) => makeBuildCommandEntry(e)).toList();

    {
      final List<Command> commands = await fixture.tool.getLintCommandsForFiles(
        buildCommandsData,
        filePaths.map((String e) => io.File(e)).toList(),
        <List<dynamic>>[shardBuildCommandsData],
        0,
      );
      final Iterable<String> commandFilePaths = commands.map((Command e) => e.filePath);
      expect(commands.length, equals(8));
      expect(commandFilePaths.contains('/path/to/a/source_file_0.cc'), true);
      expect(commandFilePaths.contains('/path/to/a/source_file_1.cc'), true);
      expect(commandFilePaths.contains('/path/to/a/source_file_2.cc'), true);
      expect(commandFilePaths.contains('/path/to/a/source_file_3.cc'), true);
      expect(commandFilePaths.contains('/path/to/a/source_file_4.cc'), true);
      expect(commandFilePaths.contains('/path/to/a/source_file_5.cc'), true);
      expect(commandFilePaths.contains('/path/to/a/source_file_6.cc'), true);
      expect(commandFilePaths.contains('/path/to/a/source_file_7.cc'), false);
      expect(commandFilePaths.contains('/path/to/a/source_file_8.cc'), true);
      expect(commandFilePaths.contains('/path/to/a/source_file_9.cc'), false);
    }
    {
      final List<Command> commands = await fixture.tool.getLintCommandsForFiles(
        buildCommandsData,
        filePaths.map((String e) => io.File(e)).toList(),
        <List<Map<String, String>>>[shardBuildCommandsData],
        1,
      );

      final Iterable<String> commandFilePaths = commands.map((Command e) => e.filePath);
      expect(commands.length, equals(8));
      expect(commandFilePaths.contains('/path/to/a/source_file_0.cc'), true);
      expect(commandFilePaths.contains('/path/to/a/source_file_1.cc'), true);
      expect(commandFilePaths.contains('/path/to/a/source_file_2.cc'), true);
      expect(commandFilePaths.contains('/path/to/a/source_file_3.cc'), true);
      expect(commandFilePaths.contains('/path/to/a/source_file_4.cc'), true);
      expect(commandFilePaths.contains('/path/to/a/source_file_5.cc'), true);
      expect(commandFilePaths.contains('/path/to/a/source_file_6.cc'), false);
      expect(commandFilePaths.contains('/path/to/a/source_file_7.cc'), true);
      expect(commandFilePaths.contains('/path/to/a/source_file_8.cc'), false);
      expect(commandFilePaths.contains('/path/to/a/source_file_9.cc'), true);
    }
  });

  test('No Commands are produced when no files changed', () async {
    final Fixture fixture = Fixture.fromOptions(
      Options(
        buildCommandsPath: io.File(buildCommands),
        lintTarget: const LintAll(),
      ),
    );

    const String filePath = '/path/to/a/source_file.cc';
    final List<dynamic> buildCommandsData = <Map<String, dynamic>>[
      <String, dynamic>{
        'd


import pof
import pofpackage.foo
import pofcpp
import pofpackage.bar

def test_do_nothing():
    assert pof.do_nothing() is None

def test_double():
    assert pof.double(21) == 42

def test_add_ints():
    assert pof.add_ints(30, 12) == 42

def test_add_ints_kw():
    assert pof.add_ints_kw(b=30, a=12) == 42

def test_point():
    p = pof.Point(1, 2)
    assert repr(p) == 'Point(1, 2)' # fixme when we have HPyFloat_FromDouble

def test_pofpackage():
    assert pofpackage.foo.__name__ == "pofpackage.foo"
    assert pofpackage.foo.hello() == 'hello from pofpackage.foo'

def test_cpp_do_nothing():
    assert pofcpp.do_nothing() is None

def test_cpp_double():
    assert pofcpp.double(21) == 42

def test_cpp_add_ints():
    assert pofcpp.add_ints(30, 12) == 42

def test_cpp_add_ints_kw():
    assert pofcpp.add_ints_kw(b=30, a=12) == 42

def test_cpp_point():
    p = pofcpp.Point(1, 2)
    assert repr(p) == 'Point(1, 2)' # fixme when we have HPyFloat_FromDouble

def test_cpp_pofpackage():
    assert pofpackage.bar.__name__ == "pofpackage.bar"
    assert pofpackage.bar.hello(21) == 42


ror {
	return r.stopper.RunTask(context.Background(), r.eventLoop)
}

func (r *defaultRouter) Stop() {
	r.stopper.Stop()
}

func (r *defaultRouter) SelectShardIDByKey(group uint64, key []byte) uint64 {
	return r.SelectShardByKey(group, key).ID
}

func (r *defaultRouter) SelectShardByKey(group uint64, key []byte) Shard {
	r.mu.RLock()
	defer r.mu.RUnlock()

	return r.searchShardLocked(group, key)
}

func (r *defaultRouter) SelectShard(group uint64, key []byte) (Shard, string) {
	shard, store, _ := r.SelectShardWithPolicy(group, key, rpcpb.SelectLeader)
	return shard, store.ClientAddress
}

func (r *defaultRouter) AscendRange(group uint64, start, end []byte,
	policy rpcpb.ReplicaSelectPolicy,
	fn func(shard Shard, replciaStore metapb.Store, lease *metapb.EpochLease) bool) {
	r.mu.RLock()
	defer r.mu.RUnlock()

	if tree, ok := r.mu.keyRanges[group]; ok {
		tree.AscendRange(start, end, func(shard *metapb.Shard) bool {
			s := *shard
			store, lease := r.selectReplicaStoreByPolicyLocked(s, policy)
			return fn(s, store, lease)
		})
	}
}

func (r *defaultRouter) AscendRangeWithoutSelectReplica(group uint64,
	start, end []byte,
	fn func(shard Shard) bool) {
	r.mu.RLock()
	defer r.mu.RUnlock()

	if tree, ok := r.mu.keyRanges[group]; ok {
		tree.AscendRange(start, end, func(shard *metapb.Shard) bool {
			s := *shard
			return fn(s)
		})
	}
}

func (r *defaultRouter) SelectShardWithPolicy(group uint64, key []byte, policy rpcpb.ReplicaSelectPolicy) (Shard, metapb.Store, *metapb.EpochLease) {
	r.mu.RLock()
	defer r.mu.RUnlock()
	shard := r.searchShardLocked(group, key)
	store, lease := r.selectReplicaStoreByPolicyLocked(shard, policy)
	return shard, store, lease
}

func (r *defaultRouter) SelectReplicaStoreWithPolicy(shardID uint64, policy rpcpb.ReplicaSelectPolicy) (metapb.Store, *metapb.EpochLease) {
	r.mu.RLock()
	defer r.mu.RUnlock()

	shard, ok := r.mu.shards[shardID]
	if !ok {
		return metapb.Store{}, nil
	}

	return r.selectReplicaStoreByPolicyLocked(shard, policy)
}

func (r *defaultRouter) selectReplicaStoreByPolicyLocked(shard Shard, policy rpcpb.ReplicaSelectPolicy) (metapb.Store, *metapb.EpochLease) {
	switch policy {
	case rpcpb.SelectLeader:
		return r.getLeaderReplicaStoreLocked(shard.ID), nil
	case rpcpb.SelectRandom:
		return r.mustGetStoreLocked(r.selectStoreLocked(shard)), nil
	case rpcpb.SelectLeaseHolder:
		info := r.getLeaseReplicaStoreLocked(shard.ID)
		return info.store, info.lease
	default:
		panic("not yet implemented")
	}
}

func (r *defaultRouter) GetShard(id uint64) Shard {
	r.mu.RLock()
	defer r.mu.RUnlock()

	return r.mu.shards[id]
}

func (r *defaultRouter) Every(group uint64, mustLeader bool, doFunc func(Shard, metapb.Store) bool) {
	r.mu.RLock()
	defer r.mu.


TypeParameter> toParameters = rhsType.classNode.typeParameters;
  List<DartType> typeArguments = rhsType.typeArguments;
  if (fromParameters.length != typeArguments.length) {
    return false;
  }
  for (int i = 0; i < fromParameters.length; ++i) {
    if (typeArguments[i] !=
        new TypeParameterType.withDefaultNullabilityForLibrary(
            fromParameters[i], typedefLibrary)) {
      return false;
    }
  }

  Map<TypeParameter, DartType> substitutionMap = {};
  for (int i = 0; i < fromParameters.length; ++i) {
    substitutionMap[fromParameters[i]] = new TypeParameterType.forAlphaRenaming(
        fromParameters[i], toParameters[i]);
  }
  Substitution substitution = Substitution.fromMap(substitutionMap);
  for (int i = 0; i < fromParameters.length; ++i) {
    if (!typeEnvironment.areMutualSubtypes(
        toParameters[i].bound,
        substitution.substituteType(fromParameters[i].bound),
        SubtypeCheckMode.withNullabilities)) {
      return false;
    }
  }

  return true;
}

enum UnresolvedKind {
  Unknown,
  Member,
  Method,
  Getter,
  Setter,
  Constructor,
}
// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

import 'dart:io' show File, IOSink;

import 'dart:typed_data' show BytesBuilder, Uint8List;

import 'package:_fe_analyzer_shared/src/parser/formal_parameter_kind.dart';
import 'package:_fe_analyzer_shared/src/scanner/scanner.dart' show Token;
import 'package:_fe_analyzer_shared/src/scanner/token.dart'
    show SyntheticToken, TokenType;

import 'package:kernel/ast.dart';
import 'package:kernel/clone.dart';
import 'package:kernel/binary/ast_to_binary.dart';
import 'package:kernel/text/ast_to_text.dart';

import '../builder/fixed_type_builder.dart';
import '../builder/formal_parameter_builder.dart';
import '../builder/metadata_builder.dart';
import '../builder/omitted_type_builder.dart';
import '../builder/record_type_builder.dart';
import '../builder/type_builder.dart';
import '../builder/type_variable_builder.dart';
import '../combinator.dart';
import '../configuration.dart';
import '../identifiers.dart';
import '../source/source_library_builder.dart';
import 'body_builder.dart';

/// The name for the synthesized field used to store information of
/// unserializable exports in a [Library].
///
/// For instance, if a [Library] tries to export two declarations with the same
/// name, the unserializable exports will map this name to the corresponding
/// error message.
const String unserializableExportName = '_exports#';

/// Sentinel value used in unserializable exports to signal an export of
/// 'dynamic' from 'dart:core'.
const String exportDynamicSentinel = '<dynamic>';

/// Sentinel value used in unserializable exports to signal an export of
/// 'Never' from 'dart:core'.
const String exportNeverSentinel = '<Never>';

void printNodeOn(Node? node, StringSink sink, {NameSystem? syntheticNames}) {
  if (node == null) {
    sink.write("null");
  } else {
    syntheticNames ??= new NameSystem();
    new Printer(sink, syntheticNames: syntheticNames).writeNode(node);
  }
}

void printQualifiedNameOn(Member? member, StringSink sink) {
  if (member == null) {
    sink.write("null");
  } else {
    sink.write(member.enclosingLibrary.importUri);
    sink.write("::");
    Class? cls = member.enclosingClass;
    if (cls != null) {
      sink.write(cls.name);
      sink.write("::");
    }
    sink.write(member.name.text);
  }
}

/// Print the given [component].  Do nothing if it is `null`.  If the
/// [libraryFilter] is provided


namespace winPEAS._3rdParty.SQLite.src
{
    public partial class CSSQLite
  {
    /*
    ** 2007 May 1
    **
    ** The author disclaims copyright to this source code.  In place of
    ** a legal notice, here is a blessing:
    **
    **    May you do good and not evil.
    **    May you find forgiveness for yourself and forgive others.
    **    May you share freely, never taking more than you give.
    **
    *************************************************************************
    **
    ** This file contains code used to implement incremental BLOB I/O.
    **
    ** $Id: vdbeblob.c,v 1.35 2009/07/02 07:47:33 danielk1977 Exp $
    **
    *************************************************************************
    **  Included in SQLite3 port to C#-SQLite;  2008 Noah B Hart
    **  C#-SQLite is an independent reimplementation of the SQLite software library
    **
    **  $Header$
    *************************************************************************
    */

    //#include "sqliteInt.h"
    //#include "vdbeInt.h"

#if !SQLITE_OMIT_INCRBLOB

/*
** Valid sqlite3_blob* handles point to Incrblob structures.
*/
//typedef struct Incrblob Incrblob;
public struct Incrblob
{
int flags;              /* Copy of "flags" passed to sqlite3_blob_open() */
int nByte;              /* Size of open blob, in bytes */
int iOffset;            /* Byte offset of blob in cursor data */
BtCursor pCsr;         /* Cursor pointing at blob row */
sqlite3_stmt pStmt;    /* Statement holding cursor open */
sqlite3 db;            /* The associated database */
};

/*
** Open a blob handle.
*/
//int sqlite3_blob_open(
//  sqlite3* db,            /* The database connection */
//  const char *zDb,        /* The attached database containing the blob */
//  const char *zTable,     /* The table containing the blob */
//  const char *zColumn,    /* The column containing the blob */
//  sqlite_int64 iRow,      /* The row containing the glob */
//  int flags,              /* True . read/write access, false . read-only */
//  sqlite3_blob **ppBlob   /* Handle for accessing the blob returned here */
//){
//  int nAttempt = 0;
//  int iCol;               /* Index of zColumn in row-record */

//  /* This VDBE program seeks a btree cursor to the identified
//  ** db/table/row entry. The reason for using a vdbe program instead
//  ** of writing code to use the b-tree layer directly is that the
//  ** vdbe program will take advantage of the various transaction,
//  ** locking and error handling infrastructure built into the vdbe.
//  **
//  ** After seeking the cursor, the vdbe executes an OP_ResultRow.
//  ** Code external to the Vdbe then "borrows" the b-tree cursor and
//  ** uses it to implement the blob_read(), blob_write() and
//  ** blob_bytes() functions.
//  **
//  ** The sqlite3_blob_close() function finalizes the vdbe program,
//  ** which closes the b-tree cursor and (possibly) commits the
//  ** transaction.
//  */
//  static const VdbeOpList openBlob[] = {
//    {OP_Transaction, 0, 0, 0}


teString
      getNameBytes() {
    java.lang.Object ref = name_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      name_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int REFERENCEDENTITYTYPE_FIELD_NUMBER = 2;
  @SuppressWarnings("serial")
  private volatile java.lang.Object referencedEntityType_ = "";
  /**
   *

   * Reference to `EntitySchema.name` of the referenced entity. Might be also any `String`
   * that identifies type some external resource not maintained by Evita.
   *

   *
   * string referencedEntityType = 2;
   * @return The referencedEntityType.
   */
  @java.lang.Override
  public java.lang.String getReferencedEntityType() {
    java.lang.Object ref = referencedEntityType_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs =
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      referencedEntityType_ = s;
      return s;
    }
  }
  /**
   *

   * Reference to `EntitySchema.name` of the referenced entity. Might be also any `String`
   * that identifies type some external resource not maintained by Evita.
   *

   *
   * string referencedEntityType = 2;
   * @return The bytes for referencedEntityType.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString
      getReferencedEntityTypeBytes() {
    java.lang.Object ref = referencedEntityType_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      referencedEntityType_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int REFERENCEDENTITYTYPEMANAGED_FIELD_NUMBER = 3;
  private boolean referencedEntityTypeManaged_ = false;
  /**
   *

   * Whether `referencedEntityType` refers to any existing `EntitySchema.name` that is maintained by Evita.
   *

   *
   * bool referencedEntityTypeManaged = 3;
   * @return The referencedEntityTypeManaged.
   */
  @java.lang.Override
  public boolean getReferencedEntityTypeManaged() {
    return referencedEntityTypeManaged_;
  }

  private byte memoizedIsInitialized = -1;
  @java.lang.Override
  public final boolean isInitialized() {
    byte isInitialized = memoizedIsInitialized;
    if (isInitialized == 1) return true;
    if (isInitialized == 0) return false;

    memoizedIsInitialized = 1;
    return true;
  }

  @java.lang.Override
  public void writeTo(com.google.protobuf.CodedOutputStream output)
                      throws java.io.IOException {
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(referencedEntityType_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 2, referencedEntityType_);
    }
    if (referencedEntityTypeManaged_ != false) {
      output.writeBool(3, referencedEntityTypeManaged_);
    }
    getUnknownFields().writeTo(output);
  }

  @java.lang.Override


>= len(positions):
            continue
        v2 = (
            positions[i + j + 1][joint_idx] - positions[i + j][joint_idx]
        ) / frame_time
        v1 = (
            positions[i + j][joint_idx]
            - positions[i + j - 1][joint_idx] / frame_time
        )
        average_acceleration += (v2 - v1) / frame_time
        current_window += 1
    return np.linalg.norm(average_acceleration / current_window)

def calc_average_velocity_horizontal(
    positions, i, joint_idx, sliding_window, frame_time, up_vec="z"
):
    current_window = 0
    average_velocity = np.zeros(len(positions[0][joint_idx]))
    for j in range(-sliding_window, sliding_window + 1):
        if i + j - 1 < 0 or i + j >= len(positions):
            continue
        average_velocity += (
            positions[i + j][joint_idx] - positions[i + j - 1][joint_idx]
        )
        current_window += 1
    if up_vec == "y":
        average_velocity = np.array(
            [average_velocity[0], average_velocity[2]]
        ) / (current_window * frame_time)
    elif up_vec == "z":
        average_velocity = np.array(
            [average_velocity[0], average_velocity[1]]
        ) / (current_window * frame_time)
    else:
        raise NotImplementedError
    return np.linalg.norm(average_velocity)

def calc_average_velocity_vertical(
    positions, i, joint_idx, sliding_window, frame_time, up_vec
):
    current_window = 0
    average_velocity = np.zeros(len(positions[0][joint_idx]))
    for j in range(-sliding_window, sliding_window + 1):
        if i + j - 1 < 0 or i + j >= len(positions):
            continue
        average_velocity += (
            positions[i + j][joint_idx] - positions[i + j - 1][joint_idx]
        )
        current_window += 1
    if up_vec == "y":
        average_velocity = np.array([average_velocity[1]]) / (
            current_window * frame_time
        )
    elif up_vec == "z":
        average_velocity = np.array([average_velocity[2]]) / (
            current_window * frame_time
        )
    else:
        raise NotImplementedError
    return np.linalg.norm(average_velocity)


}
      return this.success(user, info);
    };
    try {
      return this.passReqToCallback
        ? this.verify(authorization, req, verifiedCallback)
        : this.verify(authorization, verifiedCallback);
    } catch (e) {
      return this.error(e);
    }
  }
}
import {Pipe, PipeTransform} from '@angular/core';
import {UserModel} from "@models/user.model";
import {FilterModel} from "@models/filter.model";

@Pipe({
    name: 'filtersPipe'
})
export class FiltersPipe implements PipeTransform {

    transform(userList: UserModel[], filters: FilterModel): UserModel[] {

        if (filters.alphabet) {

            if (filters.alphabet.value === 0) {
                return userList.sort((a, b) => {
                    if (a.name > b.name) {
                        return 1;
                    } else if (a.name < b.name) {
                        return -1;
                    } else {
                        return 0;
                    }
                })
            } else {
                return userList.sort((a, b) => {
                    if (a.name < b.name) {
                        return 1;
                    } else if (a.name > b.name) {
                        return -1;
                    } else {
                        return 0;
                    }
                })
            }

        }

        if (filters.type) {
            return userList;
        }
        if (filters.query) {
            return userList.filter(user => user.name.toLocaleLowerCase().includes(filters.query.toLocaleLowerCase())
                || user.email.toLocaleLowerCase().includes(filters.query.toLocaleLowerCase()));
        }

        if (filters.page) {
            if (filters.page.value > userList.length) {
                return userList;
            }

            if (filters.page.actualPage) {
                return userList.slice(filters.page.value * (filters.page.actualPage -1), (filters.page.value * filters.page.actualPage))
            } else {
                return userList.slice(0, filters.page.value)
            }

        }
        return userList;
    }

}
import { number } from "prop-types"

const cycleNext = (array: number[], add: number, max: number) =>
  array.map(number => ((number + (add - 1)) % max) + 1)

export enum TimeSlots {
  "0000_0230",
  "0200_0430",
  "0400_0630",
  "0600_0830",
  "0800_1030",
  "1000_1230",
  "1200_1430",
  "1400_1630",
  "1600_1830",
  "1800_2030",
  "2000_2230",
  "2200_0030",
}

type TimeSlotDetails = {
  [key: number]: { start: string; end: string }
}

export const timeSlotDetails: TimeSlotDetails = {
  [TimeSlots["0000_0230"]]: {
    start: "00:00",
    end: "02:30",
  },
  [TimeSlots["0200_0430"]]: {
    start: "02:00",
    end: "04:30",
  },
  [TimeSlots["


0f );
	mColorCur	= mColorStart;

	float hue = Rand::randFloat( 0.55f, 0.6f );
	float sat = Rand::randFloat( 0.5f, 1.0f );
	mColorDest	= ColorAf( CM_HSV, hue, sat, 1.0f, 1.0f );
	mMatrix = mDestMatrix = matrix;

	mKernBounds = Rectf( 0.0f, 0.0f, mTextureFont->measureString( mChar ).x, mTextureFont->getAscent() );

	mIsDead = false;
}

void Character::animIn( Timeline &timeline, mat4 matrix )
{
	mDestMatrix = matrix;
	timeline.apply( &mColorCur, mColorDest, 1.0f, EaseOutAtan( 20 ) );
	timeline.apply( &mMatrix, matrix, 0.5f, EaseOutAtan( 10 ) );
}

void Character::animOut( Timeline &timeline, mat4 matrix )
{
	mDestMatrix = matrix;
	timeline.apply( &mColorCur, mColorStart, 1.0f, EaseOutQuad() ).finishFn( bind( &Character::onAnimOut, this ) );
	timeline.apply( &mMatrix, matrix, 1.0f, EaseOutQuad() );
}

void Character::onAnimOut()
{
	mIsDead = true;
}

Rectf Character::getKernBounds() const
{
	return mKernBounds;
}

bool Character::isDead() const
{
	return mIsDead;
}

mat4 Character::getDestMatrix() const
{
	return mDestMatrix;
}

void Character::draw() const
{
	gl::color( mColorCur );

	gl::ScopedModelMatrix matScope;

	mat4 m = mMatrix() * scale( vec3( 1, -1, 1 ) );
	gl::multModelMatrix( m );

	mTextureFont->drawString( mChar, mKernBounds.getCenter() - vec2( mKernBounds.getWidth(), 0.0f ) );
}
#include "cinder/app/App.h"
#include "cinder/app/RendererGl.h"
#include "cinder/gl/gl.h"
#include "cinder/Easing.h"
#include "cinder/Timeline.h"
#include <list>

using namespace ci;
using namespace ci::app;
using namespace std;

class Circle {
  public:
	Circle( Color color, float radius, vec2 initialPos, vec2 homePos )
		: mColor( color ), mRadius( radius ), mPos( initialPos ), mHomePos( homePos )
	{}

	void draw() const {
		gl::color( ColorA( mColor, 0.75f ) );
		gl::drawSolidCircle( mPos, mRadius );
	}

	void startDrag() {
		mPos.stop();
	}

	void dragRelease() {
		// return to our home position in 1sec, easing using EaseOutBack
		app::timeline().apply( &mPos, mHomePos, 1.0f, EaseOutBack( 3 ) );
	}

	Color				mColor;
	vec2				mHomePos;
	Anim<vec2>			mPos;
	Anim<float>			mRadius;
};

class DragTweenApp : public App {
  public:
    static void prepareSettings( Settings *settings ) { settings->setMultiTouchEnabled( false ); }
	void setup();
	void mouseDown( MouseEvent event );
	void mouseDrag( MouseEvent event );
	void mouseUp( MouseEvent event );
	void draw();

	vector<Circle>			mCircles;
	Circle					*mCurrentDragCircle;
};

void DragTweenApp::setup()
{
	// setup the initial animation
	const size_t numCircles = 35;
	for( size_t c = 0; c < numCircles; ++c ) {
		float angle = c / (float)numCircles * 4 * M_PI;
		vec2 pos = getWindowCenter() + ( 50 + c / (float)numCircles * 200 ) * vec2( cos( angle ), sin( angle ) )


;
        public const int TAG_OLYMPUS_VALID_BITS = 0x102C;
        public const int TAG_OLYMPUS_CORING_FILTER = 0x102D;
        public const int TAG_OLYMPUS_FINAL_WIDTH = 0x102E;
        public const int TAG_OLYMPUS_FINAL_HEIGHT = 0x102F;
        public const int TAG_OLYMPUS_COMPRESSION_RATIO = 0x1034;

		/// <summary>
		/// Constructor of the object.
		/// </summary>
        public OlympusDirectory()
            : base("OlympusMarkernote")
		{
			this.SetDescriptor(new OlympusDescriptor(this));
		}
	}
}


 0, 198}:     "EON SYSTEMS",
	[3]byte{0, 0, 199}:     "ARIX CORPORATION",
	[3]byte{0, 0, 200}:     "ALTOS COMPUTER SYSTEMS",
	[3]byte{0, 0, 201}:     "Emulex Corporation",
	[3]byte{0, 0, 202}:     "ARRIS Group, Inc.",
	[3]byte{0, 0, 203}:     "COMPU-SHACK ELECTRONIC GMBH",
	[3]byte{0, 0, 204}:     "DENSAN CO., LTD.",
	[3]byte{0, 0, 205}:     "Allied Telesis Labs Ltd",
	[3]byte{0, 0, 206}:     "MEGADATA CORP.",
	[3]byte{0, 0, 207}:     "HAYES MICROCOMPUTER PRODUCTS",
	[3]byte{0, 0, 208}:     "DEVELCON ELECTRONICS LTD.",
	[3]byte{0, 0, 209}:     "ADAPTEC INCORPORATED",
	[3]byte{0, 0, 210}:     "SBE, INC.",
	[3]byte{0, 0, 211}:     "WANG LABORATORIES INC.",
	[3]byte{0, 0, 212}:     "PURE DATA LTD.",
	[3]byte{0, 0, 213}:     "MICROGNOSIS INTERNATIONAL",
	[3]byte{0, 0, 214}:     "PUNCH LINE HOLDING",
	[3]byte{0, 0, 215}:     "DARTMOUTH COLLEGE",
	[3]byte{0, 0, 216}:     "Novell, Inc.",
	[3]byte{0, 0, 217}:     "NIPPON TELEGRAPH & TELEPHONE",
	[3]byte{0, 0, 218}:     "ATEX",
	[3]byte{0, 0, 219}:     "British Telecommunications plc",
	[3]byte{0, 0, 220}:     "HAYES MICROCOMPUTER PRODUCTS",
	[3]byte{0, 0, 221}:     "TCL INCORPORATED",
	[3]byte{0, 0, 222}:     "CETIA",
	[3]byte{0, 0, 223}:     "BELL & HOWELL PUB SYS DIV",
	[3]byte{0, 0, 224}:     "QUADRAM CORP.",
	[3]byte{0, 0, 225}:     "GRID SYSTEMS",
	[3]byte{0, 0, 226}:     "ACER TECHNOLOGIES CORP.",
	[3]byte{0, 0, 227}:     "INTEGRATED MICRO PRODUCTS LTD",
	[3]byte{0, 0, 228}:     "IN2 GROUPE INTERTECHNIQUE",
	[3]byte{0, 0, 229}:     "SIGMEX LTD.",
	[3]byte{0, 0, 230}:     "APTOR PRODUITS DE COMM INDUST",
	[3]byte{0, 0, 231}:     "Star Gate Technologies",
	[3]byte{0, 0, 232}:     "ACCTON TECHNOLOGY CORP.",
	[3]byte{0, 0, 233}:     "ISICAD, INC.",
	[3]byte{0, 0, 234}:     "UPNOD AB",
	[3]byte{0, 0, 235}:     "MATSUSHITA COMM. IND. CO. LTD.",
	[3]byte{0, 0, 236}:     "MICROPROCESS",
	[3]byte{0, 0, 237}:     "APRIL",
	[3]byte{0, 0, 238}:     "NETWORK DESIGNERS, LTD.",
	[3]byte{0, 0, 239}:     "KTI",
	[3]byte{0, 0, 240}:     "Samsung Electronics Co.,Ltd",
	[3]byte{0, 0, 241}:     "MAGNA COMPUTER CORPORATION",
	[3]byte{0, 0, 242}:     "SPIDER COMMUNICATIONS",
	[3]byte{0, 0


onUnit = ParserUtils.ParseCobolFile("FileControl2", folder);
            var fileConnectors = compilationUnit.TemporaryProgramClassDocumentSnapshot.Root.MainProgram.FileConnectors;

            Assert.IsNotNull(fileConnectors);
            Assert.AreEqual(expectedResults.Count, fileConnectors.Count);
            foreach (var fileConnectorPair in fileConnectors)
            {
                var symbolDefinition = fileConnectorPair.Key;
                var fileControlEntry = fileConnectorPair.Value;
                Assert.IsNotNull(symbolDefinition);
                var isExpectedFileName = expectedResults.TryGetValue(symbolDefinition.Name, out var expectedDataSetName);
                Assert.IsTrue(isExpectedFileName);
                Assert.IsNotNull(fileControlEntry);
                Assert.AreEqual(symbolDefinition.Name, fileControlEntry.FileName?.Name);
                Assert.AreEqual(expectedDataSetName, fileControlEntry.ExternalDataSet?.Name);
            }
        }
    }
}


PYLEFT,
    ),
    ("Parity-7.0.0", r#"The Parity Public License 7.0.0"#, 0x0),
    ("Plexus", r#"Plexus Classworlds License"#, 0x0),
    (
        "PolyForm-Noncommercial-1.0.0",
        r#"PolyForm Noncommercial License 1.0.0"#,
        0x0,
    ),
    (
        "PolyForm-Small-Business-1.0.0",
        r#"PolyForm Small Business License 1.0.0"#,
        0x0,
    ),
    ("PostgreSQL", r#"PostgreSQL License"#, IS_OSI_APPROVED),
    (
        "Python-2.0",
        r#"Python License 2.0"#,
        IS_OSI_APPROVED | IS_FSF_LIBRE,
    ),
    (
        "QPL-1.0",
        r#"Q Public License 1.0"#,
        IS_OSI_APPROVED | IS_FSF_LIBRE,
    ),
    ("Qhull", r#"Qhull License"#, 0x0),
    ("RHeCos-1.1", r#"Red Hat eCos Public License v1.1"#, 0x0),
    (
        "RPL-1.1",
        r#"Reciprocal Public License 1.1"#,
        IS_OSI_APPROVED,
    ),
    (
        "RPL-1.5",
        r#"Reciprocal Public License 1.5"#,
        IS_OSI_APPROVED,
    ),
    (
        "RPSL-1.0",
        r#"RealNetworks Public Source License v1.0"#,
        IS_OSI_APPROVED | IS_FSF_LIBRE,
    ),
    ("RSA-MD", r#"RSA Message-Digest License"#, 0x0),
    (
        "RSCPL",
        r#"Ricoh Source Code Public License"#,
        IS_OSI_APPROVED,
    ),
    ("Rdisc", r#"Rdisc License"#, 0x0),
    ("Ruby", r#"Ruby License"#, IS_FSF_LIBRE),
    ("SAX-PD", r#"Sax Public Domain Notice"#, 0x0),
    ("SCEA", r#"SCEA Shared Source License"#, 0x0),
    ("SGI-B-1.0", r#"SGI Free Software License B v1.0"#, 0x0),
    ("SGI-B-1.1", r#"SGI Free Software License B v1.1"#, 0x0),
    (
        "SGI-B-2.0",
        r#"SGI Free Software License B v2.0"#,
        IS_FSF_LIBRE,
    ),
    ("SHL-0.5", r#"Solderpad Hardware License v0.5"#, 0x0),
    (
        "SHL-0.51",
        r#"Solderpad Hardware License, Version 0.51"#,
        0x0,
    ),
    (
        "SISSL",
        r#"Sun Industry Standards Source License v1.1"#,
        IS_OSI_APPROVED | IS_FSF_LIBRE | IS_COPYLEFT,
    ),
    (
        "SISSL-1.2",
        r#"Sun Industry Standards Source License v1.2"#,
        0x0,
    ),
    (
        "SMLNJ",
        r#"Standard ML of New Jersey License"#,
        IS_FSF_LIBRE,
    ),
    ("SMPPL", r#"Secure Messaging Protocol Public License"#, 0x0),
    ("SNIA", r#"SNIA Public License 1.1"#, 0x0),
    (
        "SPL-1.0",
        r#"Sun Public License v1


，次要是隐含多次循环
//        return fields.map { it.value.text }.foldIndexed("") { index, acc, s ->
//            if (index == 0) acc + s else acc + lb + s
//        }
    }

    fun dumpLinesAndGetRet(output: OutputStream, lineBreak:String=lb): Ret<Unit?> {
        try {
            dumpLines(output, lineBreak)
            return Ret.createSuccess(null)
        }catch (e:Exception) {
            return Ret.createError(null, e.localizedMessage ?: "dump lines err", exception = e)
        }
    }

    fun dumpLines(output: OutputStream, lineBreak:String = lb) {
        val fieldsSize = fields.size
        var count = 0

        val charsetName = codeEditor?.editorCharset?.value

        // add bom if need
        EncodingUtil.addBomIfNeed(output, charsetName)

        output.bufferedWriter(EncodingUtil.resolveCharset(charsetName)).use { bw ->
            for(f in fields) {
                if(++count != fieldsSize) {
                    bw.write("${f.value.text}$lineBreak")
                }else {
                    bw.write(f.value.text)
                }
            }
        }
    }

    fun getSelectedText(indices: List<Int>? = null, keepEndLineBreak: Boolean = false): String {
        // 把索引排序，然后取出文本，拼接，返回
        val sb = StringBuilder()
        (indices ?: selectedIndices).toSortedSet().forEach { selectedLineIndex->
            doActIfIndexGood(selectedLineIndex, fields) { field ->
                sb.append(field.value.text).append(lb)
            }
        }

        return if(keepEndLineBreak) sb.toString() else sb.removeSuffix(lb).toString()
    }

    //获取选择行记数（获取选择了多少行）
    fun getSelectedCount():Int{
//        return selectedIndices.toSet().filter{ it>=0 }.size  //toSet()是为了去重，我不确定是否一定没重复，去下保险；filter {it>=0} 是为了避免里面有-1，我记得初始值好像是往selectedIndices里塞个-1。
        return selectedIndices.size  //toSet()是为了去重，我不确定是否一定没重复，去下保险；filter {it>=0} 是为了避免里面有-1，我记得初始值好像是往selectedIndices里塞个-1。
    }

    fun contentIsEmpty(): Boolean {
        return fields.isEmpty() || (fields.size == 1 && fields[0].value.text.isEmpty())
    }

    /**
     * 此函数不比较fields数组，缺点是返回结果并不准确(真或假都不靠谱)，优点是快
     * 用来粗略判断当前状态是否需要入撤销栈（undoStack）
     */
    fun maybeNotEquals(other: TextEditorState):Boolean {
//      don't use `this.fields !== other.fields` instead of `fieldsId` compare,
        //      because maybe fields value no change, but the selection range changed,
        //      so the fields will have a new copy, but the text still are the same
//        return this.fieldsId != other.fieldsId || this.isMultipleSelectionMode != other.isMultipleSelectionMode || this.selectedIndices != other.selectedIndices
        return this.fieldsId != other.fieldsId
    }

    private fun internalCreate(
        fields: List<MyTextFieldState>,
        fieldsId: String,
        selectedIndices: List<Int>,
        isMultipleSelectionMode: Boolean,
        focusingLineIdx: Int?,
    ): TextEditorState {
//        if(temporaryStyles != null) {
//            MyLog.d(TAG, "temporaryStyles is not null")
//        }

        return TextEditorState(
            fieldsId= fieldsId,
            fields = fields,
            selectedIndices = selectedIndices,
            isMultipleSelectionMode = isMultipleSelectionMode,
            focusingLineIdx = focusingLineIdx,

            //这几个变量是共享的，一般不用改
            codeEditor = codeEditor,
            isContentEdited = isContentEdited,
            editorPageIsContentSnapshoted = editorPageIsContentSnapshoted,
            onChanged = onCha


ends: web`,
			inlayHints: []protocol.InlayHint{},
		},
		{
			name: "circular dependency",
			content: `
services:
  test:
    extends: test2
  test2:
    extends: test`,
			inlayHints: []protocol.InlayHint{},
		},
	}

	for _, tc := range testCases {
		u := uri.URI(composeFileURI)
		t.Run(tc.name, func(t *testing.T) {
			doc := document.NewComposeDocument(document.NewDocumentManager(), u, 1, []byte(tc.content))
			inlayHints, err := InlayHint(doc, protocol.Range{})
			slices.SortFunc(inlayHints, func(a protocol.InlayHint, b protocol.InlayHint) int {
				return int(a.Position.Line) - int(b.Position.Line)
			})
			require.NoError(t, err)
			require.Equal(t, tc.inlayHints, inlayHints)
		})
	}
}
package compose

import (
	"context"
	"fmt"
	"os"
	"path/filepath"
	"strings"
	"testing"

	"github.com/docker/docker-language-server/internal/pkg/document"
	"github.com/docker/docker-language-server/internal/tliron/glsp/protocol"
	"github.com/stretchr/testify/require"
	"go.lsp.dev/uri"
)

func TestDefinition_Services(t *testing.T) {
	composeFileURI := fmt.Sprintf("file:///%v", strings.TrimPrefix(filepath.ToSlash(filepath.Join(os.TempDir(), "compose.yaml")), "/"))
	u := uri.URI(composeFileURI)
	for _, tc := range serviceReferenceTestCases {
		doc := document.NewComposeDocument(document.NewDocumentManager(), u, 1, []byte(tc.content))
		params := protocol.DefinitionParams{
			TextDocumentPositionParams: protocol.TextDocumentPositionParams{
				TextDocument: protocol.TextDocumentIdentifier{URI: composeFileURI},
				Position:     protocol.Position{Line: tc.line, Character: tc.character},
			},
		}

		t.Run(fmt.Sprintf("%v (Location)", tc.name), func(t *testing.T) {
			locations, err := Definition(context.Background(), false, doc, &params)
			require.NoError(t, err)
			require.Equal(t, tc.locations(composeFileURI), locations)
		})

		t.Run(fmt.Sprintf("%v (LocationLink)", tc.name), func(t *testing.T) {
			links, err := Definition(context.Background(), true, doc, &params)
			require.NoError(t, err)
			require.Equal(t, tc.links(composeFileURI), links)
		})
	}
}

func TestDefinition_Networks(t *testing.T) {
	composeFileURI := fmt.Sprintf("file:///%v", strings.TrimPrefix(filepath.ToSlash(filepath.Join(os.TempDir(), "compose.yaml")), "/"))
	u := uri.URI(composeFileURI)
	for _, tc := range networkReferenceTestCases {
		doc := document.NewComposeDocument(document.NewDocumentManager(), u, 1, []byte(tc.content))
		params := protocol.DefinitionParams{
			TextDocumentPositionParams: protocol.TextDocumentPositionParams{
				TextDocument: protocol.TextDocumentIdentifier{URI: composeFileURI},
				Position:     protocol.Position{Line: tc.line, Character: tc.character},
			},
		}

		t.Run(fmt.Sprintf("%v (Location)", tc.name), func(t *testing.T) {
			locations, err := Definition(context.Background(), false, doc, &params)
			require.NoError(t, err)
			require.Equal(t, tc.locations(composeFileURI), locations)
		})

		t.Run(fmt.Sprintf("%v (LocationLink)", tc.name


 widget attribute if you want the window to be deleted when closed in the MDI area. If not, the window will be hidden and the MDI area will not activate the next subwindow.

Returns the QMdiSubWindow that is added to the MDI area.

See also removeSubWindow().
*/
func (this *QMdiArea) AddSubWindow(widget QWidget_ITF /*777 QWidget **/, flags int) *QMdiSubWindow /*777 QMdiSubWindow **/ {
	var convArg0 unsafe.Pointer
	if widget != nil && widget.QWidget_PTR() != nil {
		convArg0 = widget.QWidget_PTR().GetCthis()
	}
	rv, err := qtrt.InvokeQtFunc6("_ZN8QMdiArea12addSubWindowEP7QWidget6QFlagsIN2Qt10WindowTypeEE", qtrt.FFI_TYPE_POINTER, this.GetCthis(), convArg0, flags)
	qtrt.ErrPrint(err, rv)
	return /*==*/ NewQMdiSubWindowFromPointer(unsafe.Pointer(uintptr(rv))) // 444
}

// /usr/include/qt/QtWidgets/qmdiarea.h:100
// index:0
// Public Visibility=Default Availability=Available
// [8] QMdiSubWindow * addSubWindow(QWidget *, Qt::WindowFlags)

/*
Adds widget as a new subwindow to the MDI area. If windowFlags are non-zero, they will override the flags set on the widget.

The widget can be either a QMdiSubWindow or another QWidget (in which case the MDI area will create a subwindow and set the widget as the internal widget).

Note: Once the subwindow has been added, its parent will be the viewport widget of the QMdiArea.

      QMdiArea mdiArea;
      QMdiSubWindow *subWindow1 = new QMdiSubWindow;
      subWindow1->setWidget(internalWidget1);
      subWindow1->setAttribute(Qt::WA_DeleteOnClose);
      mdiArea.addSubWindow(subWindow1);

      QMdiSubWindow *subWindow2 =
          mdiArea.addSubWindow(internalWidget2);

When you create your own subwindow, you must set the Qt::WA_DeleteOnClose widget attribute if you want the window to be deleted when closed in the MDI area. If not, the window will be hidden and the MDI area will not activate the next subwindow.

Returns the QMdiSubWindow that is added to the MDI area.

See also removeSubWindow().
*/
func (this *QMdiArea) AddSubWindowp(widget QWidget_ITF /*777 QWidget **/) *QMdiSubWindow /*777 QMdiSubWindow **/ {
	var convArg0 unsafe.Pointer
	if widget != nil && widget.QWidget_PTR() != nil {
		convArg0 = widget.QWidget_PTR().GetCthis()
	}
	// arg: 1, Qt::WindowFlags=Elaborated, Qt::WindowFlags=Typedef, QFlags<Qt::WindowType>, Unexposed
	flags := 0
	rv, err := qtrt.InvokeQtFunc6("_ZN8QMdiArea12addSubWindowEP7QWidget6QFlagsIN2Qt10WindowTypeEE", qtrt.FFI_TYPE_POINTER, this.GetCthis(), convArg0, flags)
	qtrt.ErrPrint(err, rv)
	return /*==*/ NewQMdiSubWindowFromPointer(unsafe.Pointer(uintptr(rv))) // 444
}

// /usr/include/qt/QtWidgets/qmdiarea.h:101
// index:0
// Public Visibility=Default Availability=Available
// [-2] void removeSubWindow(QWidget *)

/*
Removes widget from the MDI area. The widget must be either a QMdiSubWindow or a widget that is the internal widget


sauce_1_1internal_1_1_apply_method_3_01_parameters_00_01_return___07_receiver___1_1_5_08_07_a0_00_01_a1_08_4.html">sauce::internal::ApplyMethod< Parameters, Return_(Receiver_::*)(A0, A1)>)	sauce::internal::ApplyMethod< Parameters, Return_(Receiver_::*)(A0, A1)>

Signature typedef (defined in sauce::internal::ApplyMethod< Parameters, Return_(Receiver_::*)(A0, A1)>)	sauce::internal::ApplyMethod< Parameters, Return_(Receiver_::*)(A0, A1)>

<address class="footer">
Generated by

 1.7.6.1
</address>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Sauce-0.11.0: sauce/internal/self_injector.h Source File</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />

Sauce-0.11.0

A C++ Dependency Injection Framework

Main Page

Classes

Files

File List


#!/usr/bin/env python3

# Copyright 2018 Kubos Corporation
# Licensed under the Apache License, Version 2.0
# See LICENSE file for details.

"""
Wrapper for creating a HTTP based Kubos service
"""

from flask import Flask
from graphql_server.flask import GraphQLView

def start(config, schema, context={}):
    """
    Creates flask based graphql and graphiql endpoints
    """

    app = Flask(__name__)
    app.debug = True

    app.add_url_rule(
        '/',
        view_func=GraphQLView.as_view(
            'graphql',
            schema=schema,
            context=context,
            graphiql=False
        )
    )

    app.add_url_rule(
        '/graphiql',
        view_func=GraphQLView.as_view(
            'graphiql',
            schema=schema,
            context=context,
            graphiql=True
        )
    )

    app.run(config.ip, config.port)


'Libre Franklin', sans-serif;--primary-color: 	#4fb783;--secondary-color: 	#446e5c;--primary-gradient: linear-gradient(45deg, #4fb783, #446e5c)}[class="theme-blush"]{--font-family: 		'Roboto', sans-serif;--primary-color: 	#ea2e69;--secondary-color: 	#7b58bd;--primary-gradient: linear-gradient(45deg, #ea2e69, #7b58bd)}[class="theme-dark"]{--font-family: 		'Roboto', sans-serif;--font-555: 		#000000;--primary-color: 	#000000;--secondary-color: 	#5d5d5d;--primary-gradient: linear-gradient(45deg, #000000, #5d5d5d)}[class="theme-dark"] a{color:var(--primary-color)}[class="theme-dark"] img,[class="theme-dark"] .avatar{filter:grayscale(100%)}[class="theme-dark"] img:hover,[class="theme-dark"] .avatar:hover{filter:none}[class="theme-dark"] .badge-info,[class="theme-dark"] .badge-danger,[class="theme-dark"] .badge-secondary,[class="theme-dark"] .badge-primary,[class="theme-dark"] .badge-success,[class="theme-dark"] .badge-warning,[class="theme-dark"] .progress-bar,[class="theme-dark"] .bg-success,[class="theme-dark"] .bg-warning{background-color:var(--primary-color) !important;color:#fff}[class="theme-dark"] .text-info,[class="theme-dark"] .text-success,[class="theme-dark"] .text-primary,[class="theme-dark"] .text-warning,[class="theme-dark"] .text-muted{color:var(--primary-color) !important}[class="theme-dark"] .btn-success,[class="theme-dark"] .btn-info,[class="theme-dark"] .btn-primary{background-color:var(--primary-color) !important;border-color:var(--primary-color) !important;color:#fff}body{-webkit-transition:all 0.3s ease-in-out;-moz-transition:all 0.3s ease-in-out;-ms-transition:all 0.3s ease-in-out;-o-transition:all 0.3s ease-in-out;transition:all 0.3s ease-in-out;background-color:var(--body-color);color:var(--font-color);font-family:var(--font-family);font-size:14px}body.admin .sidebar{width:320px}body.admin .main-body{-webkit-transition:all 0.2s ease-in-out;-moz-transition:all 0.2s ease-in-out;-ms-transition:all 0.2s ease-in-out;-o-transition:all 0.2s ease-in-out;transition:all 0.2s ease-in-out;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-flow:column;flex-flow:column;min-width:0;width:100%;height:100vh}body.admin .main-body .body-page{overflow-y:auto;overflow-y:scroll;scrollbar-width:none;-ms-overflow-style:none;overflow-y:auto;overflow-x:hidden;-webkit-box-flex:2;-ms-flex:2;flex:2}body.admin .main-body .body-page::-webkit-scrollbar{width:0;background-color:var(--sidebar-bg)}body.admin .main-body .body-page::-webkit-scrollbar-thumb{background:var(--font-eee);border-radius:5px}.theme-indigo{font-family:var(--font-family)}.theme-indigo .brand svg path{fill:var(--prima


t = 45, .range_length = 82, .glyph_id_start = 12,
        .unicode_list = NULL, .glyph_id_ofs_list = NULL, .list_length = 0, .type = LV_FONT_FMT_TXT_CMAP_FORMAT0_TINY
    },
    {
        .range_start = 61441, .range_length = 2210, .glyph_id_start = 94,
        .unicode_list = unicode_list_2, .glyph_id_ofs_list = NULL, .list_length = 57, .type = LV_FONT_FMT_TXT_CMAP_SPARSE_TINY
    }
};

/*--------------------
 *  ALL CUSTOM DATA
 *--------------------*/

/*Store all the custom data of the font*/
static lv_font_fmt_txt_dsc_t font_dsc = {
    .glyph_bitmap = gylph_bitmap,
    .glyph_dsc = glyph_dsc,
    .cmaps = cmaps,
    .kern_dsc = NULL,
    .kern_scale = 0,
    .cmap_num = 3,
    .bpp = 4,
    .kern_classes = 0,
    .bitmap_format = 0
};

/*-----------------
 *  PUBLIC FONT
 *----------------*/

/*Initialize a public general font descriptor*/
lv_font_t lv_font_simsun_12 = {
    .get_glyph_dsc = lv_font_get_glyph_dsc_fmt_txt,    /*Function pointer to get glyph's data*/
    .get_glyph_bitmap = lv_font_get_bitmap_fmt_txt,    /*Function pointer to get glyph's bitmap*/
    .line_height = 13,          /*The maximum line height required by the font*/
    .base_line = 2,             /*Baseline measured from the bottom of the line*/
#if !(LVGL_VERSION_MAJOR == 6 && LVGL_VERSION_MINOR == 0)
    .subpx = LV_FONT_SUBPX_NONE,
#endif
#if LV_VERSION_CHECK(7, 4, 0)
    .underline_position = -2,
    .underline_thickness = 1,
#endif
    .dsc = &font_dsc           /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */
};

#endif /*#if LV_FONT_SIMSUN_12*/


] = b.returnStates[p]
          k++
        }
      }

      // Trim merged if we combined a few that had same stack tops
      // Write index < last position; trim
      if (k < mergedParents.size) {
        // For just one merged element, return singleton top
        if (k == 1) {
          @Suppress("LocalVariableName")
          val a_ = SingletonPredictionContext.create(mergedParents[0], mergedReturnStates[0])
          mergeCache?.put(a, b, a_)
          return a_
        }

        mergedParents = mergedParents.copyOf(k)
        mergedReturnStates = mergedReturnStates.copyOf(k)
      }

      @Suppress("LocalVariableName")
      val M = ArrayPredictionContext(mergedParents, mergedReturnStates)

      // If we created same array as a or b, return that instead
      // TODO: track whether this is possible above during merge sort for speed
      if (M == a) {
        mergeCache?.put(a, b, a)

        if (ParserATNSimulator.trace_atn_sim) {
          System.out.println("mergeArrays a=$a,b=$b -> a")
        }

        return a
      }

      if (M == b) {
        mergeCache?.put(a, b, b)

        if (ParserATNSimulator.trace_atn_sim) {
          System.out.println("mergeArrays a=$a,b=$b -> b")
        }

        return b
      }

      combineCommonParents(mergedParents)
      mergeCache?.put(a, b, M)

      if (ParserATNSimulator.trace_atn_sim) {
        System.out.println("mergeArrays a=$a,b=$b -> $M")
      }

      return M
    }

    /**
     * Make pass over all *M* [parents].
     *
     * Merge any `equals()` ones.
     */
    protected fun combineCommonParents(parents: Array<PredictionContext?>) {
      val uniqueParents = HashMap<PredictionContext?, PredictionContext?>()

      for (p in parents.indices) {
        val parent = parents[p]

        // Don't replace
        if (!uniqueParents.containsKey(parent)) {
          uniqueParents[parent] = parent
        }
      }

      for (p in parents.indices) {
        parents[p] = uniqueParents[parents[p]]
      }
    }

    public fun toDOTString(context: PredictionContext?): String {
      if (context == null) {
        return ""
      }

      val buf = StringBuilder(1024)
      buf.append("digraph G {\n")
      buf.append("rankdir=LR;\n")

      val nodes = getAllContextNodes(context).sortedBy(PredictionContext::id)

      for (current in nodes) {
        if (current is SingletonPredictionContext) {
          buf.append("  s")
          buf.append(current.id)

          val returnState = if (current is EmptyPredictionContext) {
            "$"
          } else {
            current.getReturnState(0).toString()
          }

          buf.append(" [label=\"")
          buf.append(returnState)
          buf.append("\"];\n")
          continue
        }

        val arr = current as ArrayPredictionContext
        buf.append("  s")
        buf.append(arr.id)
        buf.append(" [shape=box, label=\"")
        buf.append("[")

        var first = true

        for (inv in arr.returnStates) {
          if (!first) {
            buf.append(", ")
          }

          if (inv == EMPTY_RETURN_STATE) {
            buf.append("$")
          } else {
            buf.append(inv)
          }

          first = false
        }

        buf.append("]")
        buf.append("\"];\n")
      }

      for (current in nodes) {
        if (current === EmptyPredictionContext) {
          continue
        }

        val size = current.size()

        for (i in 0..<size) {
          val parent = current.getParent(i) ?: continue
          buf.append(


-59.4zm78.1 0h-66.1v59.4h66.1v-59.4zm78.1 0h-66.1v59.4h66.1v-59.4zm-78.1-72.1h-66.1v60.1h66.1v-60.1z"],
    "draft2digital": [480, 512, [], "f396", "M480 398.1l-144-82.2v64.7h-91.3c30.8-35 81.8-95.9 111.8-149.3 35.2-62.6 16.1-123.4-12.8-153.3-4.4-4.6-62.2-62.9-166-41.2-59.1 12.4-89.4 43.4-104.3 67.3-13.1 20.9-17 39.8-18.2 47.7-5.5 33 19.4 67.1 56.7 67.1 31.7 0 57.3-25.7 57.3-57.4 0-27.1-19.7-52.1-48-56.8 1.8-7.3 17.7-21.1 26.3-24.7 41.1-17.3 78 5.2 83.3 33.5 8.3 44.3-37.1 90.4-69.7 127.6C84.5 328.1 18.3 396.8 0 415.9l336-.1V480zM369.9 371l47.1 27.2-47.1 27.2zM134.2 161.4c0 12.4-10 22.4-22.4 22.4s-22.4-10-22.4-22.4 10-22.4 22.4-22.4 22.4 10.1 22.4 22.4zM82.5 380.5c25.6-27.4 97.7-104.7 150.8-169.9 35.1-43.1 40.3-82.4 28.4-112.7-7.4-18.8-17.5-30.2-24.3-35.7 45.3 2.1 68 23.4 82.2 38.3 0 0 42.4 48.2 5.8 113.3-37 65.9-110.9 147.5-128.5 166.7z"],
    "dribbble": [512, 512, [], "f17d", "M256 8C119.3 8 8 119.3 8 256s111.3 248 248 248 248-111.3 248-248S392.7 8 256 8zm163.1 114.4c29.5 36.05 47.37 81.96 47.83 131.1-6.984-1.477-77.02-15.68-147.5-6.818-5.752-14.04-11.18-26.39-18.62-41.61 78.32-31.98 113.8-77.48 118.3-83.52zM396.4 97.87c-3.81 5.427-35.7 48.29-111 76.52-34.71-63.78-73.18-116.2-79.04-124 67.18-16.19 137.1 1.27 190.1 47.49zm-230.5-33.25c5.585 7.659 43.44 60.12 78.54 122.5-99.09 26.31-186.4 25.93-195.8 25.81C62.38 147.2 106.7 92.57 165.9 64.62zM44.17 256.3c0-2.166 .043-4.322 .108-6.473 9.268 .19 111.9 1.513 217.7-30.15 6.064 11.87 11.86 23.92 17.17 35.95-76.6 21.58-146.2 83.53-180.5 142.3C64.79 360.4 44.17 310.7 44.17 256.3zm81.81 167.1c22.13-45.23 82.18-103.6 167.6-132.8 29.74 77.28 42.04 142.1 45.19 160.6-


/*
 * Huawei HiNIC PCI Express Linux driver
 * Copyright(c) 2017 Huawei Technologies Co., Ltd
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms and conditions of the GNU General Public License,
 * version 2, as published by the Free Software Foundation.
 *
 * This program is distributed in the hope 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.
 *
 */

#ifndef HINIC_COMMON_H
#define HINIC_COMMON_H

#include <linux/types.h>

#define UPPER_8_BITS(data)      (((data) >> 8) & 0xFF)
#define LOWER_8_BITS(data)      ((data) & 0xFF)

struct hinic_sge {
	u32             hi_addr;
	u32             lo_addr;
	u32             len;
};

void hinic_cpu_to_be32(void *data, int len);

void hinic_be32_to_cpu(void *data, int len);

void hinic_set_sge(struct hinic_sge *sge, dma_addr_t addr, int len);

dma_addr_t hinic_sge_to_dma(struct hinic_sge *sge);

#endif


                   val b = line[i + 1]
                    yield(a)
                    yield(b)
                    repeat(5) {
                        val t = kotlin.random.Random.nextDouble()
                        yield(
                            doubleArrayOf(
                                a.longitude + t * (b.longitude - a.longitude),
                                a.latitude + t * (b.latitude - a.latitude)
                            )
                        )
                    }
                }
            }
        }

        is Geometry.MultiPolygon -> {
            val polygons = geo.coordinates ?: return@sequence
            for (poly in polygons) {
                for (p in Geometry.Polygon(poly).randomPoints()) yield(p)
            }
        }

        is Geometry.GeometryCollection -> {
            for (g in geo.geometries) {
                for (p in g.randomPoints()) yield(p)
            }
        }

        is Polygon -> {
            val rings = geo.coordinates ?: return@sequence

            val outer = rings.firstOrNull() ?: return@sequence
            val holes = rings.drop(1)

            // Yield outer ring points in random order
            yieldAll(outer.toList().shuffled())

            // Interpolated points on edges in random order
            val edgeIndices = (0 until outer.size - 1).shuffled()
            for (i in edgeIndices) {
                val a = outer[i]
                val b = outer[i + 1]
                repeat(3) {
                    val t = kotlin.random.Random.nextDouble()
                    yield(
                        doubleArrayOf(
                            a.longitude + t * (b.longitude - a.longitude),
                            a.latitude + t * (b.latitude - a.latitude)
                        )
                    )
                }
            }

            // Sample random points in bounding box, excluding holes
            val bbox = geo.boundingBox()
            while (true) {
                val p = doubleArrayOf(
                    randomBetween(bbox.westLongitude, bbox.eastLongitude),
                    randomBetween(bbox.southLatitude, bbox.northLatitude)
                )
                if (geo.contains(p) && holes.none { h -> GeoGeometry.polygonContains(p[1], p[0], arrayOf(h)) }) {
                    yield(p)
                }
            }
        }
    }
}

/**
 * Enum with all the types of geometries in https://tools.ietf.org/html/rfc7946#section-3.1.1
 *
 * Note, the names are camel case in the spec and the enum name matches that.
 */
enum class GeometryType {
    Point,
    MultiPoint,
    LineString,
    MultiLineString,
    Polygon,
    MultiPolygon,
    GeometryCollection;
}

package com.jillesvangurp.searchdsls.querydsl

import com.jillesvangurp.jsondsl.withJsonDsl
import kotlin.reflect.KProperty

class DistanceFeature() : ESQuery("distance_feature") {
    var field by property<String>()
    var pivot by property<String>()
    var origin by property<Any>()
    var boost by property<Double>()
}

fun QueryClauses.distanceFeature(
    field: KProperty<*>,
    pivot: String,
    origin: String,
    block: (DistanceFeature.() -> Unit)? = null
) = DistanceFeature().let {
    it.field = field.name
    it.pivot = pivot
    it.origin = origin
    block?.invoke(it)
    it
}

fun QueryClauses.distanceFeature(
    field: String,
    pivot: String,
    origin: String,
    block: (DistanceFeature.() -> Unit)? = null
) = DistanceFeature().let {
    it.field = field
    it.pivot = pivot
    it.origin = origin
    block?.invoke(it)
    it
}

fun QueryClauses.distanceFeature(
    field: KProperty<*>,
    pivot: String,
    origin: List<Double>,
    block: (DistanceFeature.() -> Unit)?


	MOVE	SY,(a2)+

	MOVE	CY,D0
	MULS	SZ,D0
	ADD.L	D0,D0
	SWAP	D0
	NEG	D0
	MOVE	D0,(a2)+

	MOVE	SX,D1
	MULS	SZ,D1
	MOVE	CX,D0
	MULS	SY,D0
	ADD.L	D0,D0
	SWAP	D0
	MULS	CZ,D0
	SUB.L	D0,D1
	ADD.L	D1,D1
	SWAP	D1
	MOVE	D1,(a2)+

	MOVE	CX,D0
	MULS	CY,D0
	ADD.L	D0,D0
	SWAP	D0
	MOVE	D0,(a2)+	;$10

	MOVE	SX,D1
	MULS	CZ,D1
	MOVE	CX,D0
	MULS	SY,D0
	ADD.L	D0,D0
	SWAP	D0
	MULS	SZ,D0
	ADD.L	D1,D0
	ADD.L	D0,D0
	SWAP	D0
	MOVE	D0,(a2)+	;$14

	MOVE	CX,D1
	MULS	SZ,D1
	MOVE	SX,D0
	MULS	SY,D0
	ADD.L	D0,D0
	SWAP	D0
	MULS	CZ,D0
	ADD.L	D1,D0
	ADD.L	D0,D0
	SWAP	D0
	MOVE	D0,(a2)+	;$18

	MOVE	SX,D0
	MULS	CY,D0
	ADD.L	D0,D0
	SWAP	D0
	NEG	D0
	MOVE	D0,(a2)+	;$1C

	MOVE	CX,D1
	MULS	CZ,D1
	MOVE	SX,D0
	MULS	SY,D0
	ADD.L	D0,D0
	SWAP	D0
	MULS	SZ,D0
	SUB.L	D0,D1
	ADD.L	D1,D1
	SWAP	D1
	MOVE	D1,(a2)+	;$20

;
	move	#320,A3		;xmin
	SUB	A4,A4		;xmax
	move	#nblig-1,A5	;ymin
	SUB	A6,A6		;ymax

	MOVE	DIST\W,D4
modif1	JSR	FASTCALC

	MOVE	A3,D0
	ASR	#2,D0
	ADD	#XMILIEU,D0
	BPL.S	.1
	CLR	D0
.1	MOVE	D0,A3

	MOVE	A4,D0
	ASR	#2,D0
	ADD	#XMILIEU,D0
	CMP	#320,D0
	BLO.S	.2
	MOVE	#320-1,D0
.2	MOVE	D0,A4

	MOVE	A5,D0
	BPL.S	.3
	SUB	A5,A5
.3
	CMP	#nblig,A6
	BLO.S	.4
	MOVE	#nblig-1,A6
.4
	move.l	ptwr\w,a0
	MOVEM	A3/A4/A5/A6,rsxmin(a0)
	rts

INITCALC
	LEA	FASTCALC,A6
	MOVEQ	#nbpts-1,D7
.LOOP
	LEA	CALCUL(PC),A0
	MOVE	#(FINCALCUL-CALCUL)/2-1,D0
.FILL	MOVE	(A0)+,(A6)+
	DBRA	D0,.FILL
	DBRA	D7,.LOOP
	MOVE	#$4E75,(A6)+
	CMP.L	#FINFASTCALC,A6
	BEQ.S	.OK
	ILLEGAL
.OK
	RTS
;
; a0=


kIronDwarfRune_B.mdx",
  [2002608] = "World GENERIC DARKIRONDWARF Active Doodads Runes DarkIronDwarfRune_C.mdx",
  [2002609] = "World GENERIC DARKIRONDWARF Active Doodads Runes DarkIronDwarfRune_E.mdx",
  [2002610] = "World GENERIC DARKIRONDWARF Active Doodads Runes DarkIronDwarfRune_F.mdx",
  [2002611] = "World GENERIC DARKIRONDWARF Active Doodads Runes DarkIronDwarfRune_G.mdx",
  [2002612] = "World GENERIC DARKIRONDWARF PASSIVE DOODADS Beds DarkIronDwarfBed01.mdx",
  [2002613] = "World GENERIC DARKIRONDWARF PASSIVE DOODADS Beds DarkIronDwarfBed02.mdx",
  [2002614] = "World GENERIC DARKIRONDWARF PASSIVE DOODADS Beds DarkIronDwarfBed03.mdx",
  [2002615] = "World GENERIC DARKIRONDWARF PASSIVE DOODADS CORPSES DarkIronDwarfCorpse01.mdx",
  [2002616] = "World GENERIC DARKIRONDWARF PASSIVE DOODADS CORPSES DarkIronDwarfCorpse02.mdx",
  [2002617] = "World GENERIC DARKIRONDWARF PASSIVE DOODADS CORPSES DarkIronDwarfCorpse03.mdx",
  [2002618] = "World GENERIC DARKIRONDWARF PASSIVE DOODADS CORPSES DarkIronDwarfCorpse04.mdx",
  [2002619] = "World GENERIC DARKIRONDWARF PASSIVE DOODADS Chairs DarkIronChair01.mdx",
  [2002620] = "World GENERIC DARKIRONDWARF PASSIVE DOODADS Chairs DarkIronChair02.mdx",
  [2002621] = "World GENERIC DARKIRONDWARF PASSIVE DOODADS Chairs DarkIronChair03.mdx",
  [2002622] = "World GENERIC DARKIRONDWARF PASSIVE DOODADS Chairs DarkIronChairBroken01.mdx",
  [2002623] = "World GENERIC DARKIRONDWARF PASSIVE DOODADS Chairs DarkIronChairBroken02.mdx",
  [2002624] = "World GENERIC DARKIRONDWARF PASSIVE DOODADS Chairs DarkIronChairBroken03.mdx",
  [2002625] = "World GENERIC DARKIRONDWARF PASSIVE DOODADS Crates DarkIronCrate01.mdx",
  [2002626] = "World GENERIC DARKIRONDWARF PASSIVE DOODADS Crates DarkIronCrate02.mdx",
  [2002627] = "World GENERIC DARKIRONDWARF PASSIVE DOODADS Crates DarkIronCrateBroken01.mdx",
  [2002628] = "World GENERIC DARKIRONDWARF PASSIVE DOODADS Crates DarkIronCrateBroken02.mdx",
  [2002629] = "World GENERIC DARKIRONDWARF PASSIVE DOODADS GrindingWheels DarkIronGrindingWheel.mdx",
  [2002630] = "World GENERIC DARKIRONDWARF PASSIVE DOODADS GrindingWheels DarkIronGrindingWheelBroken.mdx",
  [2002631] = "World GENERIC DARKIRONDWARF PASSIVE DOODADS HayPiles DarkHayPileLarge01.mdx",
  [2002632] = "World GENERIC DARKIRONDWARF PASSIVE DOODADS KEGS DarkIronKeg01.mdx",
  [2002633] = "World GENERIC DARKIRONDWARF PASSIVE DOODADS KEGS DarkIronKegBroken01.mdx",
  [2002634] = "World GENERIC DARKIRONDWARF PASSIVE DOODADS KEGS DarkIronKegBroken02.mdx",


cloudflare-ipfs.com/ipfs/QmaznB5PRhMC696u8yZuzN6Uwrnp7Zmfa5CydVUMvLJc9i/aDAI.svg",
          "tags": [
            "wrapped",
            "wormhole"
          ],
          "extensions": {
            "address": "0x028171bCA77440897B824Ca71D1c56caC55b68A3",
            "bridgeContract": "https://etherscan.io/address/0xf92cD566Ea4864356C5491c177A430C222d7e678",
            "assetContract": "https://etherscan.io/address/0x028171bCA77440897B824Ca71D1c56caC55b68A3"
          }
        },
        {
          "chainId": 101,
          "address": "3LmfKjsSU9hdxfZfcr873DMNR5nnrk8EvdueXg1dTSin",
          "symbol": "waENJ",
          "name": "Aave interest bearing ENJ (Wormhole)",
          "decimals": 9,
          "logoURI": "https://cloudflare-ipfs.com/ipfs/QmaznB5PRhMC696u8yZuzN6Uwrnp7Zmfa5CydVUMvLJc9i/aENJ.svg",
          "tags": [
            "wrapped",
            "wormhole"
          ],
          "extensions": {
            "address": "0xaC6Df26a590F08dcC95D5a4705ae8abbc88509Ef",
            "bridgeContract": "https://etherscan.io/address/0xf92cD566Ea4864356C5491c177A430C222d7e678",
            "assetContract": "https://etherscan.io/address/0xaC6Df26a590F08dcC95D5a4705ae8abbc88509Ef"
          }
        },
        {
          "chainId": 101,
          "address": "7VD2Gosm34hB7kughTqu1N3sW92hq3XwKLTi1N1tdKrj",
          "symbol": "waKNC",
          "name": "Aave interest bearing KNC (Wormhole)",
          "decimals": 9,
          "logoURI": "https://cloudflare-ipfs.com/ipfs/QmaznB5PRhMC696u8yZuzN6Uwrnp7Zmfa5CydVUMvLJc9i/aKNC.svg",
          "tags": [
            "wrapped",
            "wormhole"
          ],
          "extensions": {
            "address": "0x39C6b3e42d6A679d7D776778Fe880BC9487C2EDA",
            "bridgeContract": "https://etherscan.io/address/0xf92cD566Ea4864356C5491c177A430C222d7e678",
            "assetContract": "https://etherscan.io/address/0x39C6b3e42d6A679d7D776778Fe880BC9487C2EDA"
          }
        },
        {
          "chainId": 101,
          "address": "4erbVWFvdvS5P8ews7kUjqfpCQbA8vurnWyvRLsnZJgv",
          "symbol": "waLINK",
          "name": "Aave interest bearing LINK (Wormhole)",
          "decimals": 9,
          "logoURI": "https://cloudflare-ipfs.com/ipfs/QmaznB5PRhMC696u8yZuzN6Uwrnp7Zmfa5CydVUMvLJc9i/aLINK.svg",
          "tags": [
            "wrapped",
            "wormhole"
          ],
          "extensions": {
            "address": "0xa06bC25B5805d5F8d82


static string lastResponse = "";
        private static characterType lastResponseFrom = characterType.None;
        private static DateTime lastResponseTime = DateTime.MinValue;
        private static TimeSpan responseTimeout = TimeSpan.FromSeconds(30); // Увеличиваем тайм-аут до 30 секунд

        public static void nextAnswer(string response, characterType from, bool fromPlayer = false)
        {
            MelonLogger.Msg($"nextAnswer: generated to {from} before, limit now {limit} from player {fromPlayer}");

            // Проверка на дублирование сообщений
            if (response == lastResponse && from == lastResponseFrom &&
                (DateTime.Now - lastResponseTime) < responseTimeout)
            {
                MelonLogger.Warning($"Обнаружено дублирование ответа от {from}, пропускаю");
                return;
            }

            // Специальная логика для режима hunt - оставляю на будующее если проблемы с охотой случатся
            if (MitaState.GetCurrentState(MitaCore.Instance.currentCharacter) == MitaStateType.hunt && from == characterType.Crazy)
            {
                //можно будет например спам убрать, слишком много во время охоты говорит
            }

            // Запоминаем текущий ответ
            lastResponse = response;
            lastResponseFrom = from;
            lastResponseTime = DateTime.Now;

            if (GameMasterCase(fromPlayer)) return;

            //if (fromPlayer) return;

            // Получаем список персонажей
            List<characterType> characters = GetCharactersToAnswer();
            if (characters == null) return;

            // Добавляем отправителя в список говорящих
            int CharCount = characters.Count;
            int TotalLimit = (int)Math.Ceiling(CharCount * limitMod / 100f);

            if (from == characterType.GameMaster) TotalLimit += 5;

            UpdateOrderTest(characters, false);

            characters.Remove(from);

            // Если больше некому отвечать+
            if (characters.Count <= 0)
            {
                MelonLogger.Msg("No characters left to answer.");
                return;
            }

            MelonLogger.Msg($"Before check lim {limit} /{TotalLimit}");

            // Логика для сообщений от ИИ
            if ( limit < TotalLimit)
            {
                characterType character = characters.First();

                MelonLogger.Msg($"nextAnswer to {character}");
                // Если отправитель и получатель совпадают, выходим
                if (from == character)
                {
                    MelonLogger.Msg("Sender and receiver are the same. Skipping.");
                    return;
                }
                limit += 1;
                // Отправляем сообщение и добавляем получателя в список говорящих

                string message = getSpeakersInfo(character);

                string nextSpeaker = "";
                string objectNameNext = "";
                if (limit + 1 >= CharCount)
                {
                    nextSpeaker = "Player";
                }
                else
                {
                    if (CharCount >= 2) {
                        nextSpeaker = CharacterControl.extendCharsString(characters[1]);
                        objectNameNext = getObjectName(characters[1]);
                    }

                    else nextSpeaker = "Player";
                }

                string objectName = getObjectName(from);
                MelonLogger.Msg($"send to {character}");
                needIgnoreTimeout = true;
                message += $"[SPEAKER] {CharacterControl.extendCharsString(from)}{objectName} said: <{response}>. Next speaker is {objectNameNext} Respond to him or name somebody you want to speak with.";

                CharacterMessages.sendSystemMessage(message, character);

            }
            else
            {
                MelonLogger.Msg($"nextA


you would in a C program). This does not apply so strictly to classes and structs (see below).

octave:1> swigexample;
octave:2> f=swigexample.fopen("not there","r");
error: value on right hand side of assignment is undefined
error: evaluating assignment expression near line 2, column 2

32.3.6 Structures and C++ classes

     SWIG wraps C structures and C++ classes by using a special Octave type called a <tt>swig_ref</tt>. A <tt>swig_ref</tt> contains a reference to one or more instances of C/C++ objects, or just the type information for an object.
For each wrapped structure and class, a <tt>swig_ref</tt> will be exposed that has the name of the type. When invoked as a function, it creates a new object of its type and returns a <tt>swig_ref</tt> that points to that instance. This provides a very natural interface. For example,

struct Point{
  int x,y;
};

    is used as follows:

octave:1> swigexample;
octave:2> p=swigexample.Point();
octave:3> p.x=3;
octave:4> p.y=5;
octave:5> p.x, p.y
ans =  3
ans =  5

In C++, invoking the type object in this way calls the object's constructor.
<tt>swig_ref</tt> objects can also be acquired by having a wrapped function return a pointer, reference, or value of a non-primitive type.

The swig_ref type handles indexing operations such that usage maps closely to what you would have in C/C++.
Structure members are accessed as in the above example, by calling set and get methods for C++ variables.

Methods also work as expected. For example, code wrapped in the following way

class Point{
public:
  int x,y;
  Point(int _x,int _y) : x(_x),y(_y) {}
  double distance(const Point& rhs) {
    return sqrt(pow(x-rhs.x,2)+pow(y-rhs.y,2));
  }
  void set(int _x,int _y) {
    x=_x; y=_y;
  }
};

can be used from Octave like this

octave:1> swigexample;
octave:2> p1=swigexample.Point(3,5);
octave:3> p2=swigexample.Point(1,2);
octave:4> p1.distance(p2)
ans =  3.6056

By using the <tt>swig_this()</tt> and <tt>swig_type()</tt> functions, one can discover the pointers to and types of the underlying C/C++ object.

octave:5> swig_this(p1)
ans = 162504808
octave:6> swig_type(p1)
ans = Point

Note that <tt>swig_ref</tt> is a reference-counted pointer to a C/C++ object/type, and as such has pass-by-reference semantics. For example if one has a allocated a single object but has two <tt>swig_ref</tt>'s pointing to it, modifying the object through either of them will change the single allocated object.
This differs from the usual pass-by-value (copy-on-write) semantics t


、使いものにはなりませんでした。納得いくパフォーマンスで、暗号を使用したプライベートDNSサービスを提供することは可能か？これは、未解決の問題として残りました。

この難問解決の糸口は、複数の情報源を通じて明らかになりました。私たちは、Oblivious DNSと呼ばれる新しいプロキシ技術について記述された学術機関の新しい成果を知りました。また、AppleとFastlyから、同じ問題の解決に取り組む他の業界関係者を見つけました。その結果から生まれた提案をもとに、Oblivious DNSとDoHを組み合わせ、Oblivious DoH（またはODoH）という素晴らしいプロトコルが誕生しました。ODoHが公開され、IETFで大規模に討論されました。DNSは特に標準に依存したプロトコルで、その原因は、システムに含まれる非常に多数のコンポーネントが、別々の組織により運営されていたことにありました。ODoHでは、この複雑な問題に別の当事者も加えることとなり、慎重な相互運用性の基準がより一層重大なものになりました。

研究チームはインターンの助けを借りてODoHの初期の草稿を入手し（チームにおけるこの人物の体験については、明日ご紹介します）、Cloudflare Workersのプロトタイプを構築しました。それにより、パフォーマンスを測定し、大規模なODoH展開の実行可能性を確認しました。そして、のちに、この記事につながります。この記事はPoPETS 2021で公開されています。

これらの実験で得られた結果から、自信をもって本番環境レベルの実装を構築できました。リサーチエンジニアたちは、リゾルバーチームのエンジニアたちと連携し、1.1.1.1のODoHの実装と利用開始にこぎつけました。また、Go、Rust、Cloudflare Workers互換の実装と、ODoH関連のコ


 s.unitUUID}, expState)
	})
	c.Assert(err, tc.ErrorIsNil)

	var gotState string
	err = s.TxnRunner().StdTxn(ctx, func(ctx context.Context, tx *sql.Tx) error {
		q := "SELECT uniter_state FROM unit_state where unit_uuid = ?"
		return tx.QueryRowContext(ctx, q, s.unitUUID).Scan(&gotState)
	})
	c.Assert(err, tc.ErrorIsNil)
	c.Assert(gotState, tc.Equals, expState)
}

func (s *stateSuite) TestUpdateUnitStateStorage(c *tc.C) {
	st := NewState(s.TxnRunnerFactory())
	ctx := c.Context()
	expState := "some storage state YAML"

	err := s.TxnRunner().Txn(ctx, func(ctx context.Context, tx *sqlair.TX) error {
		if err := st.ensureUnitStateRecord(ctx, tx, unitUUID{UUID: s.unitUUID}); err != nil {
			return err
		}
		return st.updateUnitStateStorage(ctx, tx, unitUUID{UUID: s.unitUUID}, expState)
	})
	c.Assert(err, tc.ErrorIsNil)

	var gotState string
	err = s.TxnRunner().StdTxn(ctx, func(ctx context.Context, tx *sql.Tx) error {
		q := "SELECT storage_state FROM unit_state where unit_uuid = ?"
		return tx.QueryRowContext(ctx, q, s.unitUUID).Scan(&gotState)
	})
	c.Assert(err, tc.ErrorIsNil)
	c.Assert(gotState, tc.Equals, expState)
}

func (s *stateSuite) TestUpdateUnitStateSecret(c *tc.C) {
	st := NewState(s.TxnRunnerFactory())
	ctx := c.Context()
	expState := "some secret state YAML"

	err := s.TxnRunner().Txn(ctx, func(ctx context.Context, tx *sqlair.TX) error {
		if err := st.ensureUnitStateRecord(ctx, tx, unitUUID{UUID: s.unitUUID}); err != nil {
			return err
		}
		return st.updateUnitStateSecret(ctx, tx, unitUUID{UUID: s.unitUUID}, expState)
	})
	c.Assert(err, tc.ErrorIsNil)

	var gotState string
	err = s.TxnRunner().StdTxn(ctx, func(ctx context.Context, tx *sql.Tx) error {
		q := "SELECT secret_state FROM unit_state where unit_uuid = ?"
		return tx.QueryRowContext(ctx, q, s.unitUUID).Scan(&gotState)
	})
	c.Assert(err, tc.ErrorIsNil)
	c.Assert(gotState, tc.Equals, expState)
}

func (s *stateSuite) TestUpdateUnitStateCharm(c *tc.C) {
	st := NewState(s.TxnRunnerFactory())
	ctx := c.Context()

	// Set some initial state. This should be overwritten.
	err := s.TxnRunner().StdTxn(ctx, func(ctx context.Context, tx *sql.Tx) error {
		q := "INSERT INTO unit_state_charm VALUES (?, 'one-key', 'one-val')"
		_, err := tx.ExecContext(ctx, q, s.unitUUID)
		return err
	})
	c.Assert(err, tc.ErrorIsNil)

	expState := map[string]string{
		"two-key":   "two-val",
		"three-key": "three-val",
	}

	err = s.TxnRunner().Txn(ctx, func(ctx context.Context, tx *sqlair.TX) error {
		return st.setUnitStateCharm(ctx, tx, unitUUID{UUID: s.unitUUID}, expState)
	})
	c.Assert(err, tc.ErrorIsNil)

	gotState


_WEIGHT_BANK)
      ld64putcs (7 * 4 + SECOND_WEIGHT_BANK)
      ld64putcs (4 * 4)
      ld64putcs (5 * 4)
      ld64putcs (4 * 4 + SECOND_WEIGHT_BANK)
      ld64putcs (5 * 4 + SECOND_WEIGHT_BANK)
      ld64putcs (2 * 4)
      ld64putcs (3 * 4)
      sub       $s_swap_out_ptrs_on_load, 4, $s_swap_out_ptrs_on_load
      ld64putcs (2 * 4 + SECOND_WEIGHT_BANK)
      ld64putcs (3 * 4 + SECOND_WEIGHT_BANK)
      ld64putcs (0 * 4)
      ld64putcs (1 * 4)
      ld64putcs (0 * 4 + SECOND_WEIGHT_BANK)
      ld64putcs (1 * 4 + SECOND_WEIGHT_BANK)

      st32 $s_worklists_deltan_ptr, $sp, $mzero, (PROCESS_GROUP_WORKER_STATE_OFFSET_worklist + 4)/4
      add $s_worklists_deltan_ptr, $s_worklists_deltan_ptr, BYTES_PER_DELTAN * CTXT_WORKERS

      or $s_implicit_zero_or_strides, $mzero, OUTPUT_STRIDE
      runall $s_worker_function2, $sp, 0
      sync TEXCH_SYNCZONE_LOCAL
      st32 $s_implicit_zero_or_strides, $sp, $mzero, PROCESS_GROUP_WORKER_STATE_OFFSET_implicit_zero_and_strides/4
      st32 $s_swap_out_ptrs_on_load, $sp, $mzero, PROCESS_GROUP_WORKER_STATE_OFFSET_swap_out_ptrs_on_load/4
//=============
#undef s_implicit_zero_or_strides
//=============
#define s_weights_ptr m8
//=============
      ld32step $s_weights_ptr, $mzero, $s_weights_ptr_iterator+=, 1
      brnzdec $s_num_sub_kernels_m1, .LSubKernelLoop\@
    // We over-incremented the pointer above because we're going to
    // increment it in the warmup for the next loop over sub-kernels
    // as well.
    add $s_weights_ptr_iterator, $s_weights_ptr_iterator, -4
//=============
#undef s_weights_ptr
//=============
  brnzdec $s_num_conv_group_groups_m1, .LConvGroupGroupsLoop\@

.ifc \DISABLE_SR, true
  RESTORE_FPICTL SUPERVISOR_STACK_OFFSET_fpictl/4 s_fpictl
.endif

  ld32 $m9, $sp, $mzero, SUPERVISOR_STACK_OFFSET_m9/4
  ld32 $m10, $sp, $mzero, SUPERVISOR_STACK_OFFSET_m10/4
  add $sp, $sp, MAX_STACK_SIZE
  br $lr

// Note this define must match that of where we branched from...
//=============
#define s_weights_ptr m8
//=============
.LSetupDirectWeightLoad\@:
  put $CCCSLOAD, $s_weights_ptr
  bri .LSubKernelLoopLoadWeightsToCWEI\@
//=============
#undef s_weights_ptr
//=============
.endm
////////////////////////////////////////////////////////////////////////////////
// Instantiate supervisor entry
  supervisor_fn float 2 4 true
  supervisor_fn float 2 4 false

#if (__IPU_ARCH_VERSION__ == 2) || (__IPU_ARCH_VERSION__ == 21)
  supervisor_fn half 4 4 true
  supervisor_fn half 4 4 false
#endif

////////////////////////////////////////////////////////////////////////////////
//=============
#define w_in_base_ptr m2
#define w_curr_out_base_ptr m3
#define w_last_out_base_ptr m4
// Registers above must be preserve


 (e, s) {
      showError('获取帖子失败：$e ---$s');
    } finally {
      isLoading.value = false;
    }
  }

  // 加载更多帖子
  Future<void> loadMorePosts() async {
    if (hasMorePosts.value && !isLoading.value) {
      await getUserPosts(loadMore: true);
    }
  }

  // 刷新用户帖子
  Future<void> refreshPosts() async {
    lastPostTimestamp = null;
    await getUserPosts();
  }

  // 获取关注者列表
  Future<void> getFollowers({bool loadMore = false}) async {
    try {
      if (!loadMore) {
        followersLoading.value = true;
      }

      // 计算分页偏移量
      final offset = loadMore ? followersOffset.value : 0;

      final response = await _apiService.getFollowers(userName);

      if (loadMore) {
        followers.addAll(response);
      } else {
        followers.value = response;
      }

      // 假设如果返回的数据少于20条，说明没有更多数据了
      // 改接口好像没有分页 但保留分页逻辑
      hasMoreFollowers.value = response.length >= 20;

      if (response.isNotEmpty) {
        followersOffset.value = offset + response.length;
      }

      followersLoaded.value = true;
    } catch (e, s) {
      l.e('获取关注者失败 $e --- $s');
      showError('获取关注者失败：$e');
    } finally {
      followersLoading.value = false;
    }
  }

  // 加载更多关注者
  Future<void> loadMoreFollowers() async {
    if (hasMoreFollowers.value && !followersLoading.value) {
      followersLoading.value = true;
      await getFollowers(loadMore: true);
      followersLoading.value = false;
    }
  }

  // 刷新关注者列表
  Future<void> refreshFollowers() async {
    followersOffset.value = 0;
    await getFollowers();
  }

  // 获取关注列表
  Future<void> getFollowing({bool loadMore = false}) async {
    try {
      if (!loadMore) {
        followingLoading.value = true;
      }

      // 计算分页偏移量
      final offset = loadMore ? followingOffset.value : 0;

      final response = await _apiService.getFollowing(userName);
      l.i('获取关注 ${jsonEncode(response)}');

      if (loadMore) {
        following.addAll(response);
      } else {
        following.value = response;
      }

      // 判断是否还有更多数据
      hasMoreFollowing.value = response.length >= 20;

      if (response.isNotEmpty) {
        followingOffset.value = offset + response.length;
      }

      followingLoaded.value = true;
    } catch (e, s) {
      l.e('获取关注列表失败 $e --- $s');
      showError('获取关注列表失败：$e');
    } finally {
      followingLoading.value = false;
    }
  }

  // 加载更多关注
  Future<void> loadMoreFollowing() async {
    if (hasMoreFollowing.value && !followingLoading.value) {
      followingLoading.value = true;
      await getFollowing(loadMore: true);
      followingLoading.value = false;
    }
  }

  // 刷新关注列表
  Future<void> refreshFollowing() async {
    followingOffset.value = 0;
    await getFollowing();
  }

  @override
  void onClose() {
    pageController.dispose();
    super.onClose();
  }

  void unfollowUser(String username) async {
    // 取消关注
    try {
      await _apiService.unfollowUser(username);
      following.removeWhere((element) => element.username == username);
    } catch (e, s) {
      l.e('取消关注失败 $e --- $s');
    }
  }

  void followUser(String username) async {
    // 关注
    try {
      await _apiService.followUser(username);
      if (!fo


Class>());
				Assert.That(bcsList.All(f => f.StringMap != null), Is.True);
				Assert.That(bcsList.All(f => f.StringMap.Count == 3), Is.True);
				Assert.That(bcsList.All(f => ((f.StringMap.ContainsKey("keyZero")) && ((string)f.StringMap["keyZero"] == "string zero"))), Is.True);

				// IDictionary<,>[]
				bcs = session.Query<BasicClass>()
					.Where(bc => bc.StringMapGeneric["keyOne"] == "string one");

				Assert.That(await (bcs.CountAsync()), Is.EqualTo(1));
				bcsList = await (bcs.ToListAsync<BasicClass>());
				Assert.That(bcsList.All(f => f.StringMapGeneric != null), Is.True);
				Assert.That(bcsList.All(f => f.StringMapGeneric.Count == 3), Is.True);
				Assert.That(bcsList.All(f => ((f.StringMapGeneric.ContainsKey("keyOne")) && (f.StringMapGeneric["keyOne"] == "string one"))), Is.True);

				// IDictionary.Contains
				bcs = session.Query<BasicClass>()
					.Where(bc => bc.StringMap.ContainsKey("keyZero"));

				Assert.That(await (bcs.CountAsync()), Is.EqualTo(1));
				bcsList = await (bcs.ToListAsync<BasicClass>());
				Assert.That(bcsList.All(f => f.StringMap != null), Is.True);
				Assert.That(bcsList.All(f => f.StringMap.Count == 3), Is.True);
				Assert.That(bcsList.All(f => ((f.StringMap.ContainsKey("keyZero")) && ((string)f.StringMap["keyZero"] == "string zero"))), Is.True);

				// IDictionary<,>.ContainsKey
				bcs = session.Query<BasicClass>()
					.Where(bc => bc.StringMapGeneric.ContainsKey("keyZero"));

				Assert.That(await (bcs.CountAsync()), Is.EqualTo(1));
				bcsList = await (bcs.ToListAsync<BasicClass>());
				Assert.That(bcsList.All(f => f.StringMapGeneric != null), Is.True);
				Assert.That(bcsList.All(f => f.StringMapGeneric.Count == 3), Is.True);
				Assert.That(bcsList.All(f => ((f.StringMapGeneric.ContainsKey("keyOne")) && (f.StringMapGeneric["keyOne"] == "string one"))), Is.True);

				await (session.DeleteAsync("from BasicClass"));
				await (trans.CommitAsync());
			}
		}

		/// <summary>
		/// Test for NH-2415
		/// </summary>
		[Test]
		public async Task TestHqlParameterizedDictionaryLookupProducesCorrectSqlParameterOrderAsync()
		{
			var bc = await (InsertBasicClassAsync(1));

			using (var session = OpenSession())
			using (var trans = session.BeginTransaction())
			{
				var hql = "from BasicClass bc where (bc.StringProperty = :prop) and (bc.StringMap[:key] = :value)";
				bc = await (session.CreateQuery(hql)
					.SetParameter("prop", "string property")
					.SetParameter("key", "keyZero")
					.SetParameter("value", "string zero")
					.UniqueResultAsync<BasicClass>());
				Assert.NotNull(bc);
				await (session.DeleteAsync(bc));
				await (trans.CommitAsync());
			}
		}

		internal async Task AssertDeleteAsync(int id, CancellationToken cancellationToken = default(CancellationToken))
		{
			ISession s = OpenSession();

			try
			{
				await (s.LoadAsync(typeof(BasicClass), id, cancellationToken));
			}
			catch (ObjectNotFoundException onfe)
			{
				// I expect this to be thrown because the object no longer exists...
				Assert.IsNotNull(onfe); //getting ride of 'onfe' is never used compile warning
			}

			IList results = await (s.CreateCriteria(typeof(BasicClass))
				.Add(Expression.Eq("Id", id))
				.ListAsync(cancellationToken));

			Assert.AreEqual(0, results.


?? string.Empty;
    }

    /// <summary>
    /// 指定された画像URL先のファイルのバイト配列を取得します。
    /// </summary>
    /// <param name="url"></param>
    /// <returns></returns>
    internal async static Task<byte[]> GetImageBytes(string url)
        => await _httpClient.GetByteArrayAsync(url);

    private static string GetAuthorId(string url)
    {
        var match = BoothAuthorURLRegex().Match(url);
        return match.Success ? match.Groups[1].Value : string.Empty;
    }

    /// <summary>
    /// アイテムのデフォルトタイプを推測、取得します。
    /// </summary>
    /// <param name="title"></param>
    /// <param name="type"></param>
    /// <returns></returns>
    private static ItemType GetItemType(string title, string type)
    {
        var suggestType = type switch
        {
            "3Dキャラクター" => ItemType.Avatar,
            "3Dモデル（その他）" => ItemType.Avatar,
            "3Dモーション・アニメーション" => ItemType.Animation,
            "3D衣装" => ItemType.Clothing,
            "3D小道具" => ItemType.Gimmick,
            "3D装飾品" => ItemType.Accessory,
            "3Dテクスチャ" => ItemType.Texture,
            "3Dツール・システム" => ItemType.Tool,
            _ => ItemType.Unknown
        };

        var matchedType = TITLE_MAPPINGS
            .Where(mapping => mapping.Key.Any(title.Contains))
            .Select(mapping => mapping.Value)
            .FirstOrDefault();

        return matchedType != ItemType.Unknown && matchedType != default ? matchedType : suggestType;
    }

    /// <summary>
    /// アイテムのBOOTHリンクを開きます。
    /// </summary>
    /// <param name="item"></param>
    /// <param name="CurrentLanguage"></param>
    internal static void OpenItenBoothLink(Item item, string CurrentLanguage)
    {
        try
        {
            Process.Start(new ProcessStartInfo
            {
                FileName = $"https://booth.pm/{LanguageUtils.GetCurrentLanguageCode(CurrentLanguage)}/items/" + item.BoothId,
                UseShellExecute = true
            });
        }
        catch
        {
            FormUtils.ShowMessageBox(
                LanguageUtils.Translate("リンクを開けませんでした。", CurrentLanguage),
                LanguageUtils.Translate("エラー", CurrentLanguage),
                true
            );
        }
    }

    /// <summary>
    /// アイテムのBOOTHリンクをクリップボードにコピーします。
    /// </summary>
    /// <param name="item"></param>
    /// <param name="CurrentLanguage"></param>
    internal static void CopyItemBoothLink(Item item, string CurrentLanguage)
    {
        try
        {
            Clipboard.SetText($"https://booth.pm/{LanguageUtils.GetCurrentLanguageCode(CurrentLanguage)}/items/" + item.BoothId);
        }
        catch (Exception ex)
        {
            if (ex is ExternalException) return;
            FormUtils.ShowMessageBox(
                LanguageUtils.Translate("クリップボードにコピーできませんでした", CurrentLanguage),
                LanguageUtils.Translate("エラー", CurrentLanguage),
                true
            );
        }
    }
}


st dt {
	color: #3939C4;
}

dl.bug dt a {
	color: #5b2bdd !important;
}

dl.bug {
	background: #e4dafd;
	border-left: 8px solid #5b2bdd;
	color: #2a0d72;
}

dl.bug dt a {
	color: #5b2bdd !important;
}

dl.deprecated {
	background: #ecf0f3;
	border-left: 8px solid #5b6269;
	color: #43454a;
}

dl.deprecated dt a {
	color: #5b6269 !important;
}

dl.note dd, dl.warning dd, dl.pre dd, dl.post dd,
dl.remark dd, dl.attention dd, dl.important dd, dl.invariant dd,
dl.bug dd, dl.deprecated dd, dl.todo dd, dl.test dd {
	margin-inline-start: 0px;
}

dl.invariant, dl.pre, dl.post {
	background: #d8f1e3;
	border-left: 8px solid #44b86f;
	color: #265532;
}

dl.invariant dt, dl.pre dt, dl.post dt {
	color: #44b86f;
}

#projectrow
{
	height: 56px;
}

#projectlogo
{
	text-align: center;
	vertical-align: bottom;
	border-collapse: separate;
}

#projectlogo img
{
	border: 0px none;
}

#projectalign
{
	vertical-align: middle;
	padding-left: 0.5em;
}

#projectname
{
	font-size: 200%;
	font-family: system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";
	margin: 0;
	padding: 0;
}

#side-nav #projectname
{
	font-size: 130%;
}

#projectbrief
{
	font-size: 90%;
	font-family: system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";
	margin: 0px;
	padding: 0px;
}

#projectnumber
{
	font-size: 50%;
	font-family: system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";
	margin: 0px;
	padding: 0px;
}

#titlearea
{
	padding: 0 0 0 5px;
	margin: 0px;
	border-bottom: 1px solid #C4CFE5;
	background-color: white;
}

.image
{
	text-align: center;
}

.dotgraph
{
	text-align: center;
}

.mscgraph
{
	text-align: center;
}

.plantumlgraph
{
	text-align: center;
}

.diagraph
{
	text-align: center;
}

.caption
{
	font-weight: bold;
}

dl.citelist {
	margin-bottom:50px;
}

dl.citelist dt {
	color:#334975;
	float:left;
	font-weight:bold;
	margin-