}

fun loadWorld(gameInstance: GameInstance, folder: File): WorldMasterImplementation {
    if (!folder.exists() || !folder.isDirectory)
        throw WorldLoadingException("The folder $folder doesn't exist !")

    val contentTranslatorFile = File(folder.path + "/content_mappings.dat")
    val contentTranslator: AbstractContentTranslator
    if (contentTranslatorFile.exists()) {
        contentTranslator = LoadedContentTranslator.loadFromFile(gameInstance.content as GameContentStore, contentTranslatorFile)
    } else {
        contentTranslator = InitialContentTranslator(gameInstance.content as GameContentStore)
        contentTranslator.save(File(folder.path + "/content_mappings.dat"))
    }

    val worldInfoFile = File(folder.path + "/" + WorldImplementation.worldPropertiesFilename)
    if (!worldInfoFile.exists())
        throw WorldLoadingException("The folder $folder doesn't contain a ${WorldImplementation.worldPropertiesFilename} file !")

    val properties = deserializeWorldInfo(worldInfoFile)
    val internalData = tryLoadWorldInternalData(folder)

    val world = WorldMasterImplementation(gameInstance, properties, internalData, contentTranslator, folder)
    world.ioThread.start()
    return world
}

fun initializeWorld(folder: File, properties: World.Properties) {
    folder.mkdirs()
    val worldInfoFile = File(folder.path + "/" + WorldImplementation.worldPropertiesFilename)
    worldInfoFile.writeText(serializeWorldInfo(properties, true))

    val internalData = WorldInternalData()
    val seedAsByteArray = (properties.seed + "_spawn").toByteArray()
    var i = 0
    var processedSeed: Long = 0
    while (i < 512) {
        for (j in 0..7)
            processedSeed = processedSeed xor ((seedAsByteArray[(i * 3 + j) % seedAsByteArray.size].toLong().shl(j * 8)))
        i += 8
    }

    val random = Random(processedSeed)
    val randomWeather = random.nextFloat()
    internalData.sky = internalData.sky.copy(overcast = randomWeather * randomWeather) // bias towards sunny

    /*val spawnCoordinateX = random.nextInt(properties.size.sizeInChunks * 32)
    val spawnCoordinateZ = random.nextInt(properties.size.sizeInChunks * 32)
    properties.spawn.set(spawnCoordinateX + 0.5, 0.0, spawnCoordinateZ + 0.5)*/

    val internalDataFile = File(folder.path + "/" + worldInternalDataFilename)
    val gson = Gson()
    val contents = gson.toJson(internalData)
    internalDataFile.writeText(contents)
}

class WorldSubImplementation constructor(gameInstance: GameInstance, properties: World.Properties, internalData: WorldInternalData, contentTranslator: AbstractContentTranslator)
    : WorldImplementation(gameInstance, properties, internalData, contentTranslator), WorldSub {
    override val remoteServer: Subscriber
        get() = TODO("Not yet implemented")

    override fun pushPacket(packet: Packet) {
        TODO("Not yet implemented")
    }

    val connection: Connection = TODO()

    fun queueDatagram(d: LogicalPacketDatagram) {
        TODO()
    }
}

//TODO move to worldsize
internal inline fun World.sanitizeHorizontalCoordinate(coordinate: Int): Int {
    var coordinate = coordinate
    coordinate %= (properties.size.squareSizeInBlocks)
    if (coordinate < 0)
        coordinate += properties.size.squareSizeInBlocks
    return coordinate
}

internal inline fun World.sanitizeVerticalCoordinate(coordinate: Int): Int {
    var coordinate = coordinate
    if (coordinate < 0)
        coordinate = 0
    if (coordinate >= properties.size.squareSizeInBlocks)
        coordinate = properties.size.squareSizeInB


"value": "1234, 5678",
        "type": "mutex",
        "keys": undefined
      }]
    }])).toEqual({ error: false, queryString: 'Not(Union(Row(fieldName=1234), Row(fieldName=5678)))' })
  });
});

describe('mutex (keys) types', () => {
  it('stringifies is operator', () => {
    expect(stringifyRowData([{
      row: [{
        "field": "fieldName",
        "rowOperator": "=",
        "value": "value",
        "type": "mutex",
        "keys": true
      }]
    }])).toEqual({ error: false, queryString: 'Row(fieldName="value")' })
  });

  it('stringifies is operator for multiple values', () => {
    expect(stringifyRowData([{
      row: [{
        "field": "fieldName",
        "rowOperator": "=",
        "value": "one, two",
        "type": "mutex",
        "keys": true
      }]
    }])).toEqual({ error: false, queryString: 'Union(Row(fieldName="one"), Row(fieldName="two"))' })
  });

  it('stringifies is not operator', () => {
    expect(stringifyRowData([{
      row: [{
        "field": "fieldName",
        "rowOperator": "!=",
        "value": "value",
        "type": "mutex",
        "keys": true
      }]
    }])).toEqual({ error: false, queryString: 'Not(Row(fieldName="value"))' })
  });

  it('stringifies is not operator for multiple values', () => {
    expect(stringifyRowData([{
      row: [{
        "field": "fieldName",
        "rowOperator": "!=",
        "value": "one, two",
        "type": "mutex",
        "keys": true
      }]
    }])).toEqual({ error: false, queryString: 'Not(Union(Row(fieldName="one"), Row(fieldName="two")))' })
  });

  it('stringifies like operator with a single-codepoint key', () => {
    expect(stringifyRowData([{
      row: [{
        "field": "fieldName",
        "rowOperator": "like",
        "value": "_alue",
        "type": "mutex",
        "keys": true
      }]
    }])).toEqual({ error: false, queryString: 'UnionRows(Rows(field=fieldName, like="_alue"))' })
  });

  it('stringifies like operator with a wildcard', () => {
    expect(stringifyRowData([{
      row: [{
        "field": "fieldName",
        "rowOperator": "like",
        "value": "value%",
        "type": "mutex",
        "keys": true
      }]
    }])).toEqual({ error: false, queryString: 'UnionRows(Rows(field=fieldName, like="value%"))' })
  });

  it('stringifies like operator without a single-codepoint key or wildcard', () => {
    expect(stringifyRowData([{
      row: [{
        "field": "fieldName",
        "rowOperator": "like",
        "value": "value",
        "type": "mutex",
        "keys": true
      }]
    }])).toEqual({ error: false, queryString: 'UnionRows(Rows(field=fieldName, like="%value%"))' })
  });

  it('stringifies CIDR operator', () => {
    expect(stringifyRowData([{
      row: [{
        "field": "fieldName",
        "rowOperator": "cidr",
        "value": "10.164.124.33/30",
        "type": "mutex",
        "keys": true
      }]
    }])).toEqual({ error: false, queryString: 'Union(Row(fieldName="10.164.124.32"), Row(fieldName="10.164.124.33"), Row(fieldName="10.164.124.34"), Row(fieldName="10.164.124.35"))' })
  });

  it('s


2=-1)
      drawLineGraph($Data,$DataDescription,$SerieName="")
      drawXYGraph($Data,$DataDescription,$YSerieName,$XSerieName,$PaletteID=0)
      drawFilledLineGraph($Data,$DataDescription,$Alpha=100,$AroundZero=FALSE)
      drawCubicCurve($Data,$DataDescription,$Accuracy=.1,$SerieName="")
      drawFilledCubicCurve($Data,$DataDescription,$Accuracy=.1,$Alpha=100,$AroundZero=FALSE)
      drawOverlayBarGraph($Data,$DataDescription,$Alpha=50)
      drawBarGraph($Data,$DataDescription,$Shadow=FALSE)
      drawStackedBarGraph($Data,$DataDescription,$Alpha=50,$Contiguous=FALSE)
      drawLimitsGraph($Data,$DataDescription,$R=0,$G=0,$B=0)
      drawRadar($Data,$DataDescription,$BorderOffset=10,$MaxValue=-1)
      drawFilledRadar($Data,$DataDescription,$Alpha=50,$BorderOffset=10,$MaxValue=-1)
      drawBasicPieGraph($Data,$DataDescription,$XPos,$YPos,$Radius=100,$DrawLabels=PIE_NOLABEL,$R=255,$G=255,$B=255,$Decimals=0)
      drawFlatPieGraph($Data,$DataDescription,$XPos,$YPos,$Radius=100,$DrawLabels=PIE_NOLABEL,$SpliceDistance=0,$Decimals = 0)
      drawFlatPieGraphWithShadow($Data,$DataDescription,$XPos,$YPos,$Radius=100,$DrawLabels=PIE_NOLABEL,$SpliceDistance=0,$Decimals = 0)
      drawPieGraph($Data,$DataDescription,$XPos,$YPos,$Radius=100,$DrawLabels=PIE_NOLABEL,$EnhanceColors=TRUE,$Skew=60,$SpliceHeight=20,$SpliceDistance=0,$Decimals=0)
     Other methods :
      setImageMap($Mode=TRUE,$GraphID="MyGraph")
      getImageMap($MapName,$Flush=TRUE)
      Render($FileName)
      Stroke()
 */

 /* Declare some script wide constants */
 define("SCALE_NORMAL",1);
 define("SCALE_ADDALL",2);
 define("SCALE_START0",3);
 define("SCALE_ADDALLSTART0",4);
 define("PIE_PERCENTAGE", 1);
 define("PIE_LABELS",2);
 define("PIE_NOLABEL",3);
 define("PIE_PERCENTAGE_LABEL", 4);
 define("TARGET_GRAPHAREA",1);
 define("TARGET_BACKGROUND",2);
 define("ALIGN_TOP_LEFT",1);
 define("ALIGN_TOP_CENTER",2);
 define("ALIGN_TOP_RIGHT",3);
 define("ALIGN_LEFT",4);
 define("ALIGN_CENTER",5);
 define("ALIGN_RIGHT",6);
 define("ALIGN_BOTTOM_LEFT",7);
 define("ALIGN_BOTTOM_CENTER",8);
 define("ALIGN_BOTTOM_RIGHT",9);

 /* pChart class definition */
 class pChart
  {
   /* Palettes definition */
   var $Palette = array("0"=>array("R"=>188,"G"=>224,"B"=>46),
                        "1"=>array("R"=>224,"G"=>100,"B"=>46),
                        "2"=>array("R"=>224,"G"=>214,"B"=>46),
                        "3"=>array("R"=>46,"G"=>151,"B"=>224),
                        "4"=>array("R"=>176,"G"=>46,"B"=>224),
                        "5"=>array("R"=>224,"G"=>46,"B"=>117),
                        "6"=>array("R"=>92,"G"=>224,"B"=>46),
                        "7"=>array("R"=>224,"G"=>176,"B"=>46));

   /* Some static vars used in the class */
   var $XSize          = NULL;
   var $YSize          = NULL;
   var $Picture        = NULL;
   var $ImageMap       = NULL;

   /* Error management */
   var $ErrorReporting = FALSE;


=prefix1)
        stat1 = ub.Path(fpath).stat()
>       assert stat0 == stat1, 'the file should not be modified'
E       AssertionError: the file should not be modified
E       assert os.stat_resul...me=1659755459) == os.stat_resul...me=1659755459)
E         At index 7 diff: 1659755459 != 1659755460
E         Full diff:
E         - os.stat_result(st_mode=33152, st_ino=62343, st_dev=2049, st_nlink=1, st_uid=1001, st_gid=121, st_size=1408, st_atime=1659755460, st_mtime=1659755459, st_ctime=1659755459)
E         ?                                                                                ^^
E         + os.stat_result(st_mode=33152, st_ino=62343, st_dev=2049, st_nlink=1, st_uid=1001, st_gid=121, st_size=1408, st_atime=1659755459, st_mtime=1659755459, st_ctime=1659755459)
E         ?                                                                                ^^

../tests/test_download.py:573: AssertionError
----------------------------- Captured stdout call -----------------------------
1. Download the file once
[cacher] ... foo2.bar.stamp cache miss
[cacher] stamp expired no_cert
Downloading url='http://localhost:43031/file_1408_0.txt' to fpath='/home/runner/.cache/ubelt/foo2.bar'

    0/1408... rate=0 Hz, eta=?, total=0:00:00
 1408/1408... rate=16487312.50 Hz, eta=0:00:00, total=0:00:00
[cacher] ... foo2.bar.stamp cache save
2. Rerun and check that the download doesn't happen again
=============================== warnings summary ===============================
tests/test_color.py::test_global_color_disable
tests/test_links.py::test_rel_dir_link
tests/test_links.py::test_rel_file_link
tests/test_links.py::test_delete_symlinks
tests/test_links.py::test_broken_link
tests/test_links.py::test_cant_overwrite_file_with_symlink
tests/test_links.py::test_overwrite_symlink
  /home/runner/work/ubelt/ubelt/ubelt/util_colors.py:171: UserWarning: pygments is not installed, text will not be colored
    warnings.warn('pygments is not installed, text will not be colored')

tests/test_color.py::test_global_color_disable
  /home/runner/work/ubelt/ubelt/ubelt/util_colors.py:98: UserWarning: pygments is not installed, code will not be highlighted
    warnings.warn('pygments is not installed, code will not be highlighted')

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html

---------- coverage: platform linux, python 3.10.5-final-0 -----------
Name                                                           Stmts   Miss Branch BrPart  Cover
-----------------------------------------------------------------


      points.push({x: sx, y: sy});
            points.push({x: ex, y: ey});
            break;
        case ShapeToolType.RECT:
            points.push({x: sx, y: sy});
            points.push({x: ex, y: sy});
            points.push({x: ex, y: ey});
            points.push({x: sx, y: ey});
            break;
        case ShapeToolType.CIRCLE:
            points.push({x: 0.5 * (sx + ex), y: 0.5 * (sy + ey)});
            break;
        case ShapeToolType.RHOMBUS:
            points.push({x: mx, y: sy});
            points.push({x: ex, y: my});
            points.push({x: mx, y: ey});
            points.push({x: sx, y: my});
            break;
        case ShapeToolType.TRIANGLE:
            points.push({x: mx, y: sy});
            points.push({x: sx, y: ey});
            points.push({x: ex, y: ey});
            break;
        case ShapeToolType.PENTAGON:
            points.push({x: mx, y: sy});
            points.push({x: ex, y: my});
            points.push({x: 0.5 * (mx + ex), y: ey});
            points.push({x: 0.5 * (mx + sx), y: ey});
            points.push({x: sx, y: my});
            break;
        case ShapeToolType.SEXANGLE:
            points.push({x: mx, y: sy});
            points.push({x: ex, y: 0.5 * (sy + my)});
            points.push({x: ex, y: 0.5 * (ey + my)});
            points.push({x: mx, y: ey});
            points.push({x: sx, y: 0.5 * (ey + my)});
            points.push({x: sx, y: 0.5 * (sy + my)});
            break;
        case ShapeToolType.ARROW_TOP:
            points.push({x: mx, y: sy});
            points.push({x: ex, y: my});
            points.push({x: ex - 1 / 3 * (ex - sx), y: my});
            points.push({x: ex - 1 / 3 * (ex - sx), y: ey});
            points.push({x: sx + 1 / 3 * (ex - sx), y: ey});
            points.push({x: sx + 1 / 3 * (ex - sx), y: my});
            points.push({x: sx, y: my});
            break;
        case ShapeToolType.ARROW_RIGHT:
            points.push({x: ex, y: my});
            points.push({x: mx, y: ey});
            points.push({x: mx, y: ey - 1 / 3 * (ey - sy)});
            points.push({x: sx, y: ey - 1 / 3 * (ey - sy)});
            points.push({x: sx, y: sy + 1 / 3 * (ey - sy)});
            points.push({x: mx, y: sy + 1 / 3 * (ey - sy)});
            points.push({x: mx, y: sy});
            break;
        case ShapeToolType.ARROW_DOWN:
            points.push({x: mx, y: ey});
            points.push({x: sx, y: my});
            points.push({x: sx + 1 / 3 * (ex - sx), y: my});
            points.push({x: sx + 1 / 3 * (ex - sx), y: sy});
            points.push({x: ex - 1 / 3 * (ex - sx), y: sy});
            points.push({x: ex - 1 / 3 * (ex - sx), y: my});
            points.push({x: ex, y: my});
            break;
        case ShapeToolType.ARROW_LEFT:
            points.push({x: sx, y: my});


 p, U );
	const Nv = calcBasisFunctions( vspan, v, q, V );
	const temp = [];

	for ( let l = 0; l <= q; ++ l ) {

		temp[ l ] = new three__WEBPACK_IMPORTED_MODULE_0__.Vector4( 0, 0, 0, 0 );
		for ( let k = 0; k <= p; ++ k ) {

			const point = P[ uspan - p + k ][ vspan - q + l ].clone();
			const w = point.w;
			point.x *= w;
			point.y *= w;
			point.z *= w;
			temp[ l ].add( point.multiplyScalar( Nu[ k ] ) );

		}

	}

	const Sw = new three__WEBPACK_IMPORTED_MODULE_0__.Vector4( 0, 0, 0, 0 );
	for ( let l = 0; l <= q; ++ l ) {

		Sw.add( temp[ l ].multiplyScalar( Nv[ l ] ) );

	}

	Sw.divideScalar( Sw.w );
	target.set( Sw.x, Sw.y, Sw.z );

}

/***/ }),

/***/ "./node_modules/three/examples/jsm/libs/fflate.module.js":
/*!***************************************************************!*\
  !*** ./node_modules/three/examples/jsm/libs/fflate.module.js ***!
  \***************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   AsyncCompress: () => (/* binding */ AsyncGzip),
/* harmony export */   AsyncDecompress: () => (/* binding */ AsyncDecompress),
/* harmony export */   AsyncDeflate: () => (/* binding */ AsyncDeflate),
/* harmony export */   AsyncGunzip: () => (/* binding */ AsyncGunzip),
/* harmony export */   AsyncGzip: () => (/* binding */ AsyncGzip),
/* harmony export */   AsyncInflate: () => (/* binding */ AsyncInflate),
/* harmony export */   AsyncUnzipInflate: () => (/* binding */ AsyncUnzipInflate),
/* harmony export */   AsyncUnzlib: () => (/* binding */ AsyncUnzlib),
/* harmony export */   AsyncZipDeflate: () => (/* binding */ AsyncZipDeflate),
/* harmony export */   AsyncZlib: () => (/* binding */ AsyncZlib),
/* harmony export */   Compress: () => (/* binding */ Gzip),
/* harmony export */   DecodeUTF8: () => (/* binding */ DecodeUTF8),
/* harmony export */   Decompress: () => (/* binding */ Decompress),
/* harmony export */   Deflate: () => (/* binding */ Deflate),
/* harmony export */   EncodeUTF8: () => (/* binding */ EncodeUTF8),
/* harmony export */   Gunzip: () => (/* binding */ Gunzip),
/* harmony export */   Gzip: () => (/* binding */ Gzip),
/* harmony export */   Inflate: () => (/* binding */ Inflate),
/* harmony export */   Unzip: () => (/* binding */ Unzip),
/* harmony export */   UnzipInflate: () => (/* binding */ UnzipInflate),
/* harmony export */   UnzipPassThrough: () => (/* binding */ UnzipPassThrough),
/* harmony export */   Unzlib: () => (/* binding */ Unzlib),
/* harmony export */   Zip: () => (/* binding */ Zip),
/* harmony export */   ZipDeflate: () => (/* binding */ ZipDeflate),
/* harmony export */   ZipPassThrough: () => (/* binding */ ZipPassThrough),
/* harmony export */   Zlib: () => (/* binding */ Zlib),
/* harmony export */   compress: () => (/* binding */ gzip),
/* harmony export */   compressSync: () => (/* binding */ gzipSync),
/* harmony export */   decompress: () => (/* bi


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

#ifndef CORE_COMMON_BIT_H_
#define CORE_COMMON_BIT_H_

#include <type_traits>

#define GENMASK_UL(h, l) (((~0ULL) << (l)) & (~0ULL >> (64 - 1 - (h))))

template<typename T>
constexpr T RoundDown(T x, std::remove_reference_t<T> n) {
  return (x & -n);
}

template<typename T>
constexpr T RoundUp(T x, std::remove_reference_t<T> n) {
  return RoundDown(x + n - 1, n);
}

#endif // CORE_COMMON_BIT_H_


zen = 6, -- 冻结
	Wind = 7, -- 风
	Rock = 8, -- 岩
}

--打击类型
StrikeType =
{
	Default = 0, -- 默认
	Slash = 1, -- 挥砍
	Blunt = 2, -- 钝击
	Pierce = 3, -- 穿刺
	None = 4, -- 无
}

--攻击类型，区分攻击来源，用于匹配受击相关技能的表现和逻辑
AttackType =
{
	Melee = 0, -- 近身挥砍、钝击、戳刺、横扫、撞击等，可被格挡、闪避
	Range = 1, -- 中远距离喷射、炸弹、龙卷风等范围伤害
	None = 2, -- 默认，无法归类的情况
}

--受击等级
HitLevel =
{
	Mute = 0, -- 0无效果
	Shake = 1, -- 1轻颤
	Light = 2, -- 2(打断)轻受击
	Heavy = 3, -- 3(打断)击退受击
	Air = 4, -- 4(打断)挑飞
}


maybe || y);
  BOOST_CHECK(y || maybe);
  BOOST_CHECK(maybe(x || maybe));
  BOOST_CHECK(maybe(maybe || x));

  // Test the if (z) ... else (!z) ... else ... idiom
  if (z) {
    BOOST_CHECK(false);
  }
  else if (!z) {
    BOOST_CHECK(false);
  }
  else {
    BOOST_CHECK(true);
  }

  z = true;
  if (z) {
    BOOST_CHECK(true);
  }
  else if (!z) {
    BOOST_CHECK(false);
  }
  else {
    BOOST_CHECK(false);
  }

  z = false;
  if (z) {
    BOOST_CHECK(false);
  }
  else if (!z) {
    BOOST_CHECK(true);
  }
  else {
    BOOST_CHECK(false);
  }

  std::cout << "no errors detected\n";
  return 0;
}
// Copyright (C) 2007-2008 The Trustees of Indiana University.

// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)

#include <boost/graph/use_mpi.hpp>
#include <boost/config.hpp>
#include <boost/throw_exception.hpp>
#include <boost/test/minimal.hpp>
#include <boost/graph/adjacency_list.hpp>
#include <boost/graph/iteration_macros.hpp>
#include <string>
#include <iostream>

#ifdef BOOST_NO_EXCEPTIONS
void
boost::throw_exception(std::exception const& ex)
{
    std::cout << ex.what() << std::endl;
    abort();
}
#endif

using namespace boost;

/// City structure to be attached to each vertex
struct City {
  City() {}

  City(const std::string& name, int population = -1)
    : name(name), population(population) { }

  std::string name;
  int population;
};

namespace boost { namespace graph {

/// Use the City name as a key for indexing cities in a graph
template<>
struct internal_vertex_name<City>
{
  typedef multi_index::member<City, std::string, &City::name> type;
};

/// Allow the graph to build cities given only their names (filling in
/// the defaults for fields).
template<>
struct internal_vertex_constructor<City>
{
  typedef vertex_from_name<City> type;
};

} } // end namespace boost::graph

/// Our road map, where each of the vertices are cities
typedef adjacency_list<vecS, vecS, directedS, City> RoadMap;
typedef graph_traits<RoadMap>::vertex_descriptor Vertex;

int test_main(int argc, char* argv[])
{
  RoadMap map;

  /// Create vertices for Bloomington, Indianapolis, Chicago
  Vertex bloomington = add_vertex(City("Bloomington", 69291), map);
  Vertex indianapolis = add_vertex(City("Indianapolis", 791926), map);
  Vertex chicago = add_vertex(City("Chicago", 9500000), map);

  BOOST_CHECK(add_vertex(City("Bloomington", 69291), map) == bloomington);

  BGL_FORALL_VERTICES(city, map, RoadMap)
    std::cout << map[city].name << ", population " << map[city].population
              << std::endl;

  BOOST_CHECK(*find_vertex("Bloomington", map) == bloomington);
  BOOST_CHECK(*find_vertex("Indianapolis", map) == indianapolis);
  BOOST_CHECK(*find_vertex("Chicago", map) == chicago);

  add_edge(bloomington, "Indianapolis", map);
  add_edge("Indianapolis", chicago, map);
  add


}

		//! Get the value of 'connection' header field.
		http_connection_header_t
		connection() const
		{
			return m_http_connection_header_field_value;
		}

		//! Set the value of 'connection' header field.
		void
		connection( http_connection_header_t ch ) noexcept
		{
			m_http_connection_header_field_value = ch;
		}

	private:
		//! Http version.
		//! \{
		std::uint16_t m_http_major{1};
		std::uint16_t m_http_minor{1};
		//! \}

		//! Length of body of an http-message.
		std::uint64_t m_content_length{ 0 };

		http_connection_header_t m_http_connection_header_field_value{ http_connection_header_t::close };
};

//! HTTP methods mapping with nodejs http methods
#define RESTINIO_HTTP_METHOD_MAP(RESTINIO_GEN)         \
	RESTINIO_GEN( http_method_delete,       HTTP_DELETE,       DELETE )       \
	RESTINIO_GEN( http_method_get,          HTTP_GET,          GET )          \
	RESTINIO_GEN( http_method_head,         HTTP_HEAD,         HEAD )         \
	RESTINIO_GEN( http_method_post,         HTTP_POST,         POST )         \
	RESTINIO_GEN( http_method_put,          HTTP_PUT,          PUT )          \
  /* pathological */                \
	RESTINIO_GEN( http_method_connect,      HTTP_CONNECT,      CONNECT )      \
	RESTINIO_GEN( http_method_options,      HTTP_OPTIONS,      OPTIONS )      \
	RESTINIO_GEN( http_method_trace,        HTTP_TRACE,        TRACE )        \
  /* WebDAV */                      \
	RESTINIO_GEN( http_method_copy,         HTTP_COPY,         COPY )         \
	RESTINIO_GEN( http_method_lock,         HTTP_LOCK,         LOCK )         \
	RESTINIO_GEN( http_method_mkcol,        HTTP_MKCOL,        MKCOL )        \
	RESTINIO_GEN( http_method_move,         HTTP_MOVE,         MOVE )         \
	RESTINIO_GEN( http_method_propfind,     HTTP_PROPFIND,     PROPFIND )     \
	RESTINIO_GEN( http_method_proppatch,    HTTP_PROPPATCH,    PROPPATCH )    \
	RESTINIO_GEN( http_method_search,       HTTP_SEARCH,       SEARCH )       \
	RESTINIO_GEN( http_method_unlock,       HTTP_UNLOCK,       UNLOCK )       \
	RESTINIO_GEN( http_method_bind,         HTTP_BIND,         BIND )         \
	RESTINIO_GEN( http_method_rebind,       HTTP_REBIND,       REBIND )       \
	RESTINIO_GEN( http_method_unbind,       HTTP_UNBIND,       UNBIND )       \
	RESTINIO_GEN( http_method_acl,          HTTP_ACL,          ACL )          \
  /* subversion */                  \
	RESTINIO_GEN( http_method_report,       HTTP_REPORT,       REPORT )       \
	RESTINIO_GEN( http_method_mkactivity,   HTTP_MKACTIVITY,   MKACTIVITY )   \
	RESTINIO_GEN( http_method_checkout,     HTTP_CHECKOUT,     CHECKOUT )     \
	RESTINIO_GEN( http_method_merge,        HTTP_MERGE,        MERGE )        \
  /* upnp */                        \
	RESTINIO_GEN( http_method_msearch,      HTTP_MSEARCH,      M-SEARCH)      \
	RESTINIO_GEN( http_method_notify,       HTTP_NOTIFY,       NOTIFY )       \
	RESTINIO_GEN( http_method_subscribe,    HTTP_SU


)  -- gsensor 开关
    --关闭i2c
    i2c.close(i2cId)
    --重新打开i2c,i2c速度设置为低速
    i2c.setup(i2cId, i2c.SLOW)

    sys.wait(50)
    i2c.send(i2cId, da221Addr, soft_reset, 1)   --复位da221
    sys.wait(50)
    i2c.send(i2cId, da221Addr, chipid_addr, 1)  --读取芯片id
    local chipid = i2c.recv(i2cId, da221Addr, 1)    --接收返回的芯片id
    log.info("i2c", "chipid",chipid:toHex())
    if string.byte(chipid) == 0x13 then
        log.info("exvib init success")
    else
        log.info("exvib init fail")
    end
    -- 设置寄存器
    i2c.send(i2cId, da221Addr, rangeaddr, 1)    --设置加速度量程，默认2g
    sys.wait(5)
    i2c.send(i2cId, da221Addr, int_set1_reg, 1) --设置x,y,z发生变化时，产生中断
    sys.wait(5)
    i2c.send(i2cId, da221Addr, int_map1_reg, 1)--运动的时候，产生中断
    sys.wait(5)
    i2c.send(i2cId, da221Addr, active_dur_addr, 1)-- 设置激活时间，默认0x00
    sys.wait(5)
    i2c.send(i2cId, da221Addr, active_ths_addr, 1)-- 设置激活阈值
    sys.wait(5)
    i2c.send(i2cId, da221Addr, mode_addr, 1)-- 设置模式
    sys.wait(5)
    i2c.send(i2cId, da221Addr, odr_addr, 1)-- 设置采样率
    sys.wait(5)
    i2c.send(i2cId, da221Addr, int_latch_addr, 1)-- 设置中断锁存 中断一旦触发将保持，直到手动清除
    sys.wait(5)
end

--[[
    打开da221
@api exvib.open(mode)
@number da221模式设置，1，微小震动检测，用于检测轻微震动的场景，例如用手敲击桌面；加速度量程2g；
                        2，运动检测，用于电动车或汽车行驶时的检测和人行走和跑步时的检


   if batch_size is None:
        batch_size = 10

    if len(x) % batch_size != 0:
        x = x[: -(len(x) % batch_size)]

    return Model(layer_in, layer_out).predict(x, batch_size)

def get_activations_batch(ann, x_batch):
    """Compute layer activations of an ANN.

    Parameters
    ----------

    ann: keras.models.Model
        Needed to compute activations.

    x_batch: np.array
        The input samples to use for determining the layer activations. With
        data of the form (channels, num_rows, num_cols), X has dimension
        (batch_size, channels*num_rows*num_cols) for a multi-layer perceptron,
        and (batch_size, channels, num_rows, num_cols) for a convolutional net.

    Returns
    -------

    activations_batch: list[tuple[np.array, str]]
        Each tuple ``(activations, label)`` represents a layer in the ANN for
        which an activation can be calculated (e.g. ``Dense``,
        ``Conv2D``).
        ``activations`` containing the activations of a layer. It has the same
        shape as the original layer, e.g.
        (batch_size, n_features, n_rows, n_cols) for a convolution layer.
        ``label`` is a string specifying the layer type, e.g. ``'Dense'``.
    """

    activations_batch = []
    for layer in ann.layers:
        # Todo: This list should be replaced by
        #       ``not in eval(config.get('restrictions', 'spiking_layers')``
        if layer.__class__.__name__ in ['Input', 'InputLayer', 'Flatten',
                                        'Concatenate', 'ZeroPadding2D',
                                        'Reshape']:
            continue
        activations = Model(ann.input, layer.output).predict_on_batch(x_batch)
        activations_batch.append((activations, layer.name))
    return activations_batch

def try_reload_activations(layer, model, x_norm, batch_size, activ_dir):
    try:
        activations = np.load(os.path.join(activ_dir,
                                           layer.name + '.npz'))['arr_0']
    except IOError:
        if x_norm is None:
            return

        print("Calculating activations of layer {} ...".format(layer.name))
        activations = get_activations_layer(model.input, layer.output, x_norm,
                                            batch_size)
        print("Writing activations to disk...")
        np.savez_compressed(os.path.join(activ_dir, layer.name), activations)
    else:
        print("Loading activations stored during a previous run.")
    return np.array(activations)


    PointerDeviceKind.invertedStylus,
    PointerDeviceKind.unknown,
  };

  static const Set<PointerDeviceKind> _desktopDragDevices = {
    PointerDeviceKind.mouse,
    PointerDeviceKind.trackpad,
    PointerDeviceKind.unknown,
  };

  @override
  Widget buildScrollbar(
    BuildContext context,
    Widget child,
    ScrollableDetails details,
  ) {
    return child;
  }
}

/// A class for changing the value of a nullable property in a method such as [copyWith].
class PlutoOptional<T> {
  const PlutoOptional(this.value);

  final T? value;
}

abstract class PlutoGridSettings {
  /// If there is a frozen column, the minimum width of the body
  /// (if it is less than the value, the frozen column is released)
  static const double bodyMinWidth = 200.0;

  /// Default column width
  static const double columnWidth = 200.0;

  /// Column width
  static const double minColumnWidth = 80.0;

  /// Frozen column division line (ShadowLine) size
  static const double shadowLineSize = 3.0;

  /// Sum of frozen column division line width
  static const double totalShadowLineWidth =
      PlutoGridSettings.shadowLineSize * 2;

  /// Grid - padding
  static const double gridPadding = 2.0;

  /// Grid - border width
  static const double gridBorderWidth = 1.0;

  static const double gridInnerSpacing =
      (gridPadding * 2) + (gridBorderWidth * 2);

  /// Row - Default row height
  static const double rowHeight = 45.0;

  /// Row - border width
  static const double rowBorderWidth = 1.0;

  /// Row - total height
  static const double rowTotalHeight = rowHeight + rowBorderWidth;

  /// Cell - padding
  static const EdgeInsets cellPadding = EdgeInsets.symmetric(horizontal: 10);

  /// Column title - padding
  static const EdgeInsets columnTitlePadding =
      EdgeInsets.symmetric(horizontal: 10);

  static const EdgeInsets columnFilterPadding = EdgeInsets.all(5);

  /// Cell - fontSize
  static const double cellFontSize = 14;

  /// Scroll when multi-selection is as close as that value from the edge
  static const double offsetScrollingFromEdge = 10.0;

  /// Size that scrolls from the edge at once when selecting multiple
  static const double offsetScrollingFromEdgeAtOnce = 200.0;

  static const int debounceMillisecondsForColumnFilter = 300;
}

enum PlutoGridMode {
  /// {@template pluto_grid_mode_normal}
  /// Basic mode with most functions not limited, such as editing and selection.
  /// {@endtemplate}
  normal,

  /// {@template pluto_grid_mode_readOnly}
  /// Cell cannot be edited.
  /// To try to edit by force, it is possible as follows.
  ///
  /// ```dart
  /// stateManager.changeCellValue(
  ///   stateManager.currentCell!,
  ///   'test',
  ///   force: true,
  /// );
  /// ```
  /// {@endtemplate}
  readOnly,

  /// {@template pluto_grid_mode_select}
  /// Mode for selecting one list from a specific list.
  /// Tap a row or press Enter to select the current row.
  ///
  /// [select]
  /// Call the [PlutoGrid.onSelected] callback when the selected row is tapped.
  /// To select an unselected row, select the row and then tap once more.
  /// [selectWithOneTap]
  /// Same as [select], but calls [PlutoGrid.onSelected] with one tap.
  ///
  /// This mode is non-editable, but programmatically possible.
  /// ```dart
  /// stateManager.changeCellValue(
  ///   stateManager.currentRow!.cells['column_1']!,
  ///   value,
  ///   force: true,
  /// );
  /// ```
  /// {@endt


st slave market.|U|158896|NC|
A Tattered Note|QID|49437|M|54.35,34.27|Z|0864;Vol'dun|N|From a tattered note.|RANK|2|
T Light Up the Gulch|QID|49668|M|55.43,35.02|Z|0864;Vol'dun|N|To Kiro.|
A Unleash the Beasts|QID|49669|PRE|49668|M|55.43,35.02|Z|0864;Vol'dun|N|From Kiro.|RANK|2|
A Untame Slaughter|QID|50757|PRE|49668|M|55.43,35.02|Z|0864;Vol'dun|N|From Kiro.|RANK|2|
C Untame Slaughter|QID|50757|M|56.58,30.62|Z|0864;Vol'dun|N|Kill yet more Faithless.|S|
K Shath'kar|ACTIVE|49437|QO|1|M|54.55,33.25|Z|0864;Vol'dun|N|Kill Shath'kar.|T|Shath'kar|RANK|2|
K Crawg Tamer Traskniss|ACTIVE|49669|QO|1|M|55.94,32.26;55.36,31.04|CS|Z|0864;Vol'dun|N|Kill Crawg Tamer Traskniss.|T|Crawg Tamer Traskniss|
C Untame Slaughter|QID|50757|M|56.58,30.62|Z|0864;Vol'dun|N|Finish off this set of Faithless.|US|
T Untame Slaughter|QID|50757|M|55.43,35.01|Z|0864;Vol'dun|N|To Kiro.|
T Unleash the Beasts|QID|49669|M|55.45,35.03|Z|0864;Vol'dun|N|To Kiro.|
A Free Ride|QID|50749|PRE|50757&49669|M|55.45,35.03|Z|0864;Vol'dun|N|From Kiro.|RANK|2|
C Free Ride|QID|50749|QO|1|M|55.24,35.22|Z|0864;Vol'dun|N|Hop on the Battle Krolusk and guide him back to Vorrik's Sanctum.|V|
R Vorrik's Sanctum|ACTIVE|50749|M|47.98,36.51|FLY|OLD|;adding a Path would probably be useful here
T Tattered Note|QID|49437|M|47.98,36.51|Z|0864;Vol'dun|N|To Meerah.|
T Free Ride|QID|50749|M|48.02,36.44|Z|0864;Vol'dun|N|To Kiro.|
; R1 resumes here - Hendo72
;Atul'Aman
F Sanctuary of the Devoted|ACTIVE|50751|M|47.30,35.24|Z|0864;Vol'dun|N|at Lugo the Windrider.|TZ|Terrace of the Devoted|FLY|OLD|
t WANTED: Sandscout Vesarik|QID|51165|M|26.87,52.87|Z|0864;Vol'dun|N|To Zareen.|
T Sanctuary Under Siege|QID|50751|M|26.98,53.11;26.53,52.57;27.09,52.56|CS|Z|0864;Vol'dun|N|Vorrik is on the upper level.|
A Atul'Aman|QID|50617|PRE|50751|M|27.09,52.56|Z|0864;Vol'dun|N|From Vorrik.|
F Goldtusk Inn|ACTIVE|50617|M|27.65,50.33|TZ|Whistlebloom Oasis|Z|0864;Vol'dun|N|Take a flight to Goldtusk Inn from Flightmaster Vethiss.|RANK|2|
R Abandoned Passage|ACTIVE|50617|M|31.70,56.52;36.67,60.22;36.81,68.97;42.48,68.63|CS|Z|0864;Vol'dun|N|Exit Terrace of the Devoted via the southern bridge


****************************************************************************
*       Petit Exemple de Communication 68030-DSP
*       Programme 68030     (Utilisez, de prfrence, DEVPAC)
*       Par Axel F. (MCS)
*       Pour ST Magazine
*
*       Greets to SIMPLET (ABSTRACT)
*          and to NULLOS  (DNT-CREW)
*
****************************************************************************

	MOVE.W	#$20,-(A7)
	TRAP #1
	MOVE.L	D0,PILE
****************************************************************************
* Envoie du programme DSP
****************************************************************************
	MOVE.W	#113,-(A7)	* DSP_RequestUniqueAbility
	TRAP	#14
	ADDQ.W	#2,A7           * en retour D0 contient le numero d'ability

	MOVE.W	D0,-(A7)
	MOVE.L	#(DSP_Code_Fin-DSP_Code_Debut)/3,-(A7)
	PEA	DSP_Code_Debut
	MOVE.W	#109,-(A7)	* Dsp_ExecProg
	TRAP	#14
	ADD.W	#12,A7

****************************************************************************
* Attend que le DSP soit pret  recevoir
****************************************************************************
Envoi_Au_DSP
	BTST.B	#1,$FFFFA202.W
	BEQ.S	Envoi_Au_DSP

*******************************************


to
 * get(x, y) using pixels[] with pixel density d is
 * [pixels[(y*width*d+x)*d],
 * pixels[(y*width*d+x)*d+1],
 * pixels[(y*width*d+x)*d+2],
 * pixels[(y*width*d+x)*d+3] ].
 * See the reference for pixels[] for more information.
 *
 * @method get
 * @param  {Number}         [x] x-coordinate of the pixel
 * @param  {Number}         [y] y-coordinate of the pixel
 * @param  {Number}         [w] width
 * @param  {Number}         [h] height
 * @return {Array|p5.Image}     values of pixel at x,y in array format
 *                              [R, G, B, A] or p5.Image
 * @example
 *

 *
 * var img;
 * function preload() {
 *   img = loadImage("assets/rockies.jpg");
 * }
 * function setup() {
 *   image(img, 0, 0);
 *   var c = get();
 *   image(c, width/2, 0);
 * }
 *
 *

 *
 *

 *
 * var img;
 * function preload() {
 *   img = loadImage("assets/rockies.jpg");
 * }
 * function setup() {
 *   image(img, 0, 0);
 *   var c = get(50, 90);
 *   fill(c);
 *   noStroke();
 *   rect(25, 25, 50, 50);
 * }
 *
 *

 */
p5.prototype.get = function(x, y, w, h){
  return this._renderer.get(x, y, w, h);
};

/**
 * Loads the pixel data for the display window into the pixels[] array. This
 * function must always be called before reading from or writing to pixels[].
 *
 * @method loadPixels
 * @example
 *

 *
 * var img;
 * function preload() {
 *   img = loadImage("assets/rockies.jpg");
 * }
 *
 * function setup() {
 *   image(img, 0, 0);
 *   var d = pixelDensity;
 *   var halfImage = 4 * (img.width * d) *
       (img.height/2 * d);
 *   loadPixels();
 *   for (var i = 0; i < halfImage; i++) {
 *     pixels[i+halfImage] = pixels[i];
 *   }
 *   updatePixels();
 * }
 *
 *

 */
p5.prototype.loadPixels = function() {
  this._renderer.loadPixels();
};

/**
 *
Changes the color of any pixel, or writes an image directly to the
 * display window.

 *
The x and y parameters specify the pixel to change and the c parameter
 * specifies the color value. This can be a p5.COlor object, or [R, G, B, A]
 * pixel array. It can also be a single grayscale value.
 * When setting an image, the x and y parameters define the coordinates for
 * the upper-left corner of the image, regardless of the current imageMode().
 *

 *

 * After using set(), you must call updatePixels() for your changes to
 * appear.  This should be called once all pixels have been set.
 *

 *
Setting the color of a single pixel with set(x, y) is easy, but not as
 * fast as putting the data directly into pixels[]. Setting the pixels[]
 * values directly may be complicated when working with a retina display,
 * but will perform better when lots of pixels need to be set directly on
 * every loop.

 *
See the reference for pixels[] for more information.

 *
 * @method set
 * @param {Number}              x x-coordinate of the pixel
 *


{
      name = "魔術士ギルド"
   },
   robbers_hideout = {
      name = "盗賊の隠れ家"
   },
   test_site = {
      name = "生体兵器実験場"
   },
   the_mine = {
      name = "スライムの坑道"
   },
   the_sewer = {


-- local fn = require("fn")
-- local hyper = require("hyper")

-- local windowModal = hs.hotkey.modal.new({}, nil)

-- local old_hyper = { "cmd", "shift", "ctrl" }

-- hyper.bindAll({
--   ["\\"] = fn.openRaycastExtension("raycast/clipboard-history/clipboard-history"),
--   ["]"] = fn.openRaycastExtension("raycast/snippets/search-snippets"),
--   ["0"] = function() windowModal:enter() end,
--   ["1"] = {
--     fn.openApp("1Password"),
--     { ["shift"] = fn.sendKeys(old_hyper, "1") },
--   },
--   ["."] = {
--     fn.runShortcut("Start Session"),
--     { ["shift"] = fn.openRaycastExtension("jameslyons/session/session-finish") },
--   },
--   ["space"] = fn.openApp("Finder"),
--   a = fn.openRaycastExtension("raycast/floating-notes/toggle-floating-notes-window"),
--   b = fn.sendKeys(old_hyper, "y"), -- Bartender quick search
--   c = {
--     fn.openTab("calendar.google.com/calendar/u/0/r"),
--     { ["shift"] = fn.openTab("calendar.google.com/calendar/u/1/r") },
--   },
--   e = {
--     fn.sendKeys(old_hyper, "e"), -- Expose
--     { ["shift"] = fn.sendKeys(old_hyper, "d") }, -- Desktop
--   },
--   f = fn.openApp("Slack"),
--   g = {
--     fn.openTab("github.com"),
--     { ["shift"] = fn.openRaycastExtension("raycast/github/search-repositories") },
--   },
--   h = {
--     fn.openApp("Hammerspoon"),
--     { ["shift"] = fn.reloadHammerspoonConfig },
--   },
--   i = {
--     fn.openApp("Google Chrome"),
--     { ["shift"] = fn.openRaycastExtension("Codely/google-chrome/search-bookmarks") },
--   },
--   j = fn.openApp("IntelliJ IDEA"),
--   k = fn.openApp("Slack"),
--   l = {
--     fn.openApp("Linear"),
--     { ["shift"] = fn.openRaycastExtension("thomaslombart/linear/assigned-issues") },
--   },
--   m = {
--     fn.openTab("mail.google.com/mail/u/0"),
--     { ["shift"] = fn.openTab("mail.google.com/mail/u/1") },
--   },
--   n = {
--     fn.openApp("Notes"),
--     { ["shift"] = fn.openRaycastExtension("tumtum/apple-notes/index") },
--   },
--   o = {
--     fn.openApp("Obsidian"),
--     { ["shift"] = fn.openRaycastExtension("KevinBatdorf/obsidian/searchNoteCommand") },
--   },
--   p = fn.openRaycastExtension("raycast/raycast-ai/ai-chat"),
--   s = fn.openApp("iTerm


.pki.unwrap_or_default())
}

/// Returns a tuple with two lists, for trusted and distrusted certificates
fn split_bundles(
    certificates_bundle: HashMap<Identifier, model::PemCertificate>,
) -> Result<CertBundle> {
    let mut trusted_certs: Vec<x509_parser::pem::Pem> = Vec::new();
    let mut distrusted_certs: Vec<x509_parser::pem::Pem> = Vec::new();

    for (name, bundle) in certificates_bundle.iter() {
        let data = bundle.data.clone().unwrap_or_default();

        // Empty data means the certificate bundle was disabled in the API
        if data.trim() == "" {
            debug!("Found empty bundle: {}", name);
            continue;
        }

        let name = name.as_ref();
        let decoded = base64::decode(data.as_bytes()).context(error::Base64Decode { name })?;
        // Each record in the API could include one or more certificates
        let mut pems = pems_from_iter(x509_parser::pem::Pem::iter_from_buffer(&decoded))?;

        // `trusted` defaults to false if not set in the API record
        if bundle.trusted.unwrap_or(false) {
            trusted_certs.append(&mut pems);
        } else {
            distrusted_certs.append(&mut pems);
        }
    }

    Ok(CertBundle {
        trusted_certs,
        distrusted_certs,
    })
}

/// Updates the trusted certificates store, removing the distrusted certificates
/// from the final bundle
fn update_trusted_store<P>(
    mut cert_bundle: CertBundle,
    trusted_store: P,
    source_bundle: P,
) -> Result<()>
where
    P: AsRef<Path>,
{
    let source_bundle = source_bundle.as_ref();
    let trusted_store = trusted_store.as_ref();

    // The default bundle includes the certificates shipped with the OS
    let default_bundle = fs::File::open(source_bundle).context(error::ReadSourceBundle {
        path: source_bundle,
    })?;
    let reader = BufReader::new(default_bundle);
    // Initialize trusted bundle with the certificates shipped with the OS
    let mut trusted_bundle = pems_from_iter(x509_parser::pem::Pem::iter_from_reader(reader))?;

    // Add additional trusted certificates
    trusted_bundle.append(&mut cert_bundle.trusted_certs);
    // Remove any distrusted certificate
    trusted_bundle.retain(|pem| !cert_bundle.distrusted_certs.contains(pem));

    // Write a PEM formatted bundle from trusted certificates
    fs::write(&trusted_store, pems_to_string(&trusted_bundle)?)
        .context(error::UpdateTrustedStore)?;

    Ok(())
}

/// Returns a list with Pem objects from a PemIterator
fn pems_from_iter<R>(iter: x509_parser::pem::PemIterator<R>) -> Result<Vec<x509_parser::pem::Pem>>
where
    R: BufRead + Seek,
{
    let mut vec: Vec<x509_parser::pem::Pem> = Vec::new();
    for pem in iter {
        let pem = pem.context(error::ParsePEM)?;
        vec.push(pem);
    }
    Ok(vec)
}

/// Concatenates all the PEM objects as a single PEM bundle
fn pems_to_string(pems: &Vec<x509_parser::pem::Pem>) -> Result<String> {
    let mut out = String::new();

    for pem in pems {
        writeln!(out, "{}", pem_to_string(pem)?).context(error::WritePemString)?


.attr("size") + "p"
                val url = source.attr("src")
                listOf(Video(url, "$playerName - $quality", url, headers))
            }
            else -> {
                val iframeUrl = iframe.attr("src")
                when {
                    iframeUrl.contains("nativov2.php") || iframeUrl.contains("/embed2/") -> {
                        val url = iframeUrl.toHttpUrl().run {
                            queryParameter("id") ?: queryParameter("v")
                        } ?: return emptyList()

                        val quality = url.substringAfter("_").substringBefore("_")
                        listOf(Video(url, "$playerName - $quality", url, headers))
                    }
                    else -> getVideosFromIframeUrl(iframeUrl, playerName)
                }
            }
        }
    }

    private fun getVideosFromIframeUrl(iframeUrl: String, playerName: String): List<Video> {
        return when {
            iframeUrl.contains("playerB.php") -> {
                client.newCall(GET(iframeUrl, headers)).execute().body.string()
                    .substringAfter("sources:")
                    .substringBefore("]")
                    .split("{")
                    .drop(1)
                    .map { line ->
                        val url = line.substringAfter("file: \"").substringBefore('"')
                        val quality = line.substringAfter("label: \"")
                            .substringBefore('"')
                            .run {
                                when (this) {
                                    "SD" -> "480p"
                                    "HD" -> "720p"
                                    "FHD", "FULLHD" -> "1080p"
                                    else -> this
                                }
                            }
                        Video(url, "$playerName - $quality", url, headers)
                    }
            }
            else -> emptyList()
        }
    }
}
package eu.kanade.tachiyomi.animeextension.pt.doramogo.extractors

import dev.datlag.jsunpacker.JsUnpacker
import eu.kanade.tachiyomi.animesource.model.Video
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.util.asJsoup
import okhttp3.Headers
import okhttp3.OkHttpClient

class DoramogoExtractor(private val client: OkHttpClient, private val headers: Headers) {
    fun videosFromUrl(url: String): List<Video> {
        val document = client.newCall(GET(url, headers)).execute().asJsoup()

        val script = document.selectFirst("script:containsData(eval):containsData(p,a,c,k,e,d)")
            ?.data()
            ?.replace(Regex("[\\u00E0-\\u00FC]"), "-") // Fix a bug in JsUnpacker with accents
            ?.let(JsUnpacker::unpackAndCombine)
            ?: return emptyList()

        return script.substringAfter("sources:")
            .substringBefore("]")
            .split("{")
            .drop(1)
            .map { line ->
                val url = line.substringAfter("file:\\'").substringBefore("\\'")
                val quality = line.substringAfter("label:\\'").substringBefore("\\'")

                Video(url, "Doramogo - $quality", url, headers)
            }
    }
}
package eu.kanade.tachiyomi.animeextension.pt.animescx

import android.app.Activity
import android.content.ActivityNotFoundException
import android.content.Intent
import android.os.Bundle
import android.util.Log
import kotlin.system.exitProcess

/**
 * Springboard that accepts https://animescx.com.br/<type>/<item> intents
 * and redirects them t


formHelper_setNativeVideoWindowId(
    BCTBX_UNUSED(JNIEnv *env), BCTBX_UNUSED(jobject thiz), BCTBX_UNUSED(jlong ptr), BCTBX_UNUSED(jobject id)) {
	// TODO
}

extern "C" JNIEXPORT void JNICALL
Java_org_linphone_core_tools_JavaPlatformHelper_setParticipantDeviceNativeVideoWindowId(
    BCTBX_UNUSED(JNIEnv *env),
    BCTBX_UNUSED(jobject thiz),
    BCTBX_UNUSED(jlong ptr),
    BCTBX_UNUSED(jlong participantDevicePtr),
    BCTBX_UNUSED(jobject id)) {
	// TODO
}

LINPHONE_END_NAMESPACE
/*
 * Copyright (c) 2010-2022 Belledonne Communications SARL.
 *
 * This file is part of Liblinphone
 * (see https://gitlab.linphone.org/BC/public/liblinphone).
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as
 * published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 */

#include "conference-event-p.h"

// =============================================================================

using namespace std;

LINPHONE_BEGIN_NAMESPACE

// -----------------------------------------------------------------------------

ConferenceEvent::ConferenceEvent(Type type, time_t creationTime, const ConferenceId &conferenceId)
    : EventLog(*new ConferenceEventPrivate, type, creationTime) {
	L_D();
	L_ASSERT(type == Type::ConferenceCreated || type == Type::ConferenceTerminated);
	d->conferenceId = conferenceId;
}

ConferenceEvent::ConferenceEvent(ConferenceEventPrivate &p,
                                 Type type,
                                 time_t creationTime,
                                 const ConferenceId &conferenceId)
    : EventLog(p, type, creationTime) {
	L_D();
	d->conferenceId = conferenceId;
}

const ConferenceId &ConferenceEvent::getConferenceId() const {
	L_D();
	return d->conferenceId;
}

LINPHONE_END_NAMESPACE
/*
 * Copyright (c) 2010-2022 Belledonne Communications SARL.
 *
 * This file is part of Liblinphone
 * (see https://gitlab.linphone.org/BC/public/liblinphone).
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as
 * published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 */

#include "conference-security-event.h"
#include "conference-event-p.h"

// =============================================================================

using namespace std;

LINPHONE_BEGIN_NAMESP


13

**14**  Then went he down, and dipped himself seven times in Jordan, [[#^note-14a|according]] to the saying of the man of God: and his [[#^note-14b|flesh]] came again like unto the [[#^note-14c|flesh]] of a little child, and he was [[#^note-14d|clean]]. ^verse-14

**15**  ¶ And he returned to the man of God, he and all his company, and came, and stood before him: and he said, Behold, now I [[#^note-15a|know]] that there is no [[#^note-15b|God]] in all the earth, but in Israel: now therefore, I pray thee, take a [[#^note-15c|blessing]] of thy servant. ^verse-15

**16**  But he said, As the Lord liveth, before whom I stand, I will [[#^note-16a|receive]] [[#^note-16b|none]]. And he urged him to take it; but he refused. ^verse-16

**17**  And Naaman said, Shall there not then, I pray thee, be given to thy servant two mules' burden of earth? for thy servant will henceforth offer neither burnt offering nor sacrifice unto other gods, but unto the Lord. ^verse-17

**18**  In this thing the Lord pardon thy servant, that when my master goeth into the house of [[#^note-18a|Rimmon]] to worship there, and he leaneth on my hand, and I bow myself in the house of Rimmon: when I bow down myself in the house of Rimmon, the Lord pardon thy servant in this thing. ^verse-18

**19**  And he said unto him, Go in peace. So he departed from him a little way. ^verse-19

**20**  ¶ But Gehazi, the servant of Elisha the man of God, said, Behold, my master hath spared Naaman this Syrian, in not receiving at his hands that which he brought: but, as the Lord liveth, I will run after him, and take somewhat of him. ^verse-20

**21**  So Gehazi followed after Naaman. And when Naaman saw him running after him, he lighted down from the chariot to meet him, and said, Is all well? ^verse-21

**22**  And he said, All is well. My master hath sent me, saying, Behold, even now there be come to me from mount Ephraim two young men of the sons of the prophets: give them, I pray thee, a talent of silver, and two changes of garments. ^verse-22

**23**  And Naaman said, Be content, take two talents. And he urged him, and bound two talents of silver in two bags, with two changes of garments, and laid them upon two of his servants; and they bare them before him. ^verse-23

**24**  And when he came to the tower, he took them from their hand, and bestowed them in the house: and he let the men go, and they departed. ^verse-24

**25**  But he went in, and stood before his master. And Elisha said unto him, Whence comest thou, Gehazi? And he said, Thy servant went no whither. ^verse-25

**26**  And he said unto him, Went not mine heart with thee, when the man turned again from his chariot to meet thee? Is it a time to receive money, and to receive garments, and oliveyards, and vineyards, and sheep, and oxen, and menservants, and maidservants? ^verse-26

**27**  The [[#^note-27a|leprosy]] therefore of Naaman shall cleave unto thee, and unto thy seed for ever. And he went out from his presence a leper as white as snow. ^verse-27

---
[[Old Testament/2 Kings/2 Kings 4|Previous Entry]]  ||  [[Old Testament/2 Kings/2 Kings 6|Next Entry]]

**Footnotes**

1a. [[Study Helps/Topical Guide/Leprosy, Leper, Leprous|TG Leprosy]] ^note-1a

5a. [[Old Testament/1 Samuel/1 Samuel 9#^verse-7|1 Sam. 9:7]] ^note-5a


OrcBuildingsAO_BridgeWalkwayShort01.wmo",
  [3000676] = "worldwmoOutlandAncOrcBuildingsAO_Footbridge01.wmo",
  [3000677] = "worldwmoOutlandBrokenBuildingsBroken_bdelftower.wmo",
  [3000678] = "WorldwmoDungeonMonestaryScarlet_Munistary_Interior.wmo",
  [3000679] = "WorldwmoDungeonOL_OgreHutsOgre_GuardTower.wmo",
  [3000680] = "WorldwmoDungeonOL_OgreHutsOgre_Hut.wmo",
  [3000681] = "WorldwmoDungeonOL_OgreHutsOgre_Hut_Huge.wmo",
  [3000682] = "WorldwmoDungeonOL_OgreHutsOgre_Hut2Story.wmo",
  [3000683] = "WorldwmoDungeonOL_OgreHutsOgre_HutBig.wmo",
  [3000684] = "炽焰锻造套件：锻造",
  [3000685] = "炽焰锻造套件：铁砧",
  [3000687] = "月亮井圣杯",
  [3000688] = "月亮井",
  [3000690] = "中秋拼盘",
  [3000691] = "中秋灯笼",


pty) {
      _selectStatus = List.filled(widget.options.length, false);
    }

    for (int index = 0; index < _selectStatus.length; ++index) {
      _selectStatus[index] = false;
    }

    if (widget.value.isEmpty) {
      return;
    }

    for (int index = 0; index < widget.value.length; ++index) {
      int pos = widget.options.indexOf(widget.value[index]);

      if (pos < 0) {
        return;
      }
      _selectStatus[pos] = true;
    }
  }
}
import 'package:bruno/src/components/form/utils/brn_form_util.dart';
import 'package:bruno/src/components/line/brn_line.dart';
import 'package:bruno/src/constants/brn_fonts_constants.dart';
import 'package:bruno/src/theme/brn_theme_configurator.dart';
import 'package:bruno/src/theme/configs/brn_form_config.dart';
import 'package:flutter/material.dart';

///
/// 可展开收起组类型录入项
/// 内部可包含其他类型Widget
///
/// 包括"标题"、"副标题"、"错误信息提示"、"必填项提示"、"添加/删除按钮"、"消息提示"
///
// ignore: must_be_immutable
class BrnNormalFormGroup extends StatefulWidget {
  /// 录入项的唯一标识，主要用于录入类型页面框架中
  final String? label;

  /// 录入项标题
  final String title;

  /// 录入项子标题
  final String? subTitle;

  /// 录入项错误提示
  final String error;

  /// 录入项是否为必填项（展示*图标） 默认为 false 不必填
  final bool isRequire;

  /// 录入项 是否可编辑
  final bool isEdit;

  /// 点击"-"图标回调
  final VoidCallback? onRemoveTap;

  /// 点击"？"图标回调
  final VoidCallback? onTip;

  /// 右侧文案
  final String? deleteLabel;

  /// 内部子项
  final List<Widget> children;

  /// form配置
  BrnFormItemConfig? themeData;

  BrnNormalFormGroup({
    Key? key,
    this.label,
    this.title = "",
    this.subTitle,
    this.error = "",
    this.isEdit = true,
    this.isRequire = false,
    this.onRemoveTap,
    this.onTip,
    this.deleteLabel,
    this.themeData,
    required this.children,
  }) : super(key: key) {
    this.themeData ??= BrnFormItemConfig();
    this.themeData = BrnThemeConfigurator.instance
        .getConfig(configId: this.themeData!.configId)
        .formItemConfig
        .merge(this.themeData);
  }

  @override
  BrnNormalFormGroupState createState() {
    return BrnNormalFormGroupState();
  }
}

class BrnNormalFormGroupState extends State<BrnNormalFormGroup> {
  @override
  void initState() {
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return Container(
      padding: EdgeInsets.only(top: 14),
      color: widget.themeData!.backgroundColor,
      child: Column(
        mainAxisSize: MainAxisSize.min,
        children: <Widget>[
          Container(
            child: Row(
              mainAxisAlignment: MainAxisAlignment.spaceBetween,
              children: <Widget>[
                Offstage(
                  offstage: (widget.title.isEmpty),
                  child: Container(
                    child: Row(
                      children: <Widget>[
                        Container(
                            padding: EdgeInsets.only(left: 20, right: 6),
                            child: Text(
                              widget.title,
                              style: BrnFormUtil.getHeadTitleTextStyle(
                                  widget.theme


import numpy as np
import pandas as pd
import time
from sklearn.datasets import make_blobs
from kmeans_sequential import KMeansSequential
from kmeans_parallel import KMeansParallel
import matplotlib.pyplot as plt
import os
from multiprocessing import cpu_count

def run_benchmark(X, n_clusters, max_iter=300):
    # Sequential
    start = time.time()
    kmeans_seq = KMeansSequential(n_clusters=n_clusters, max_iter=max_iter)
    kmeans_seq.fit(X)
    seq_time = time.time() - start
    # Parallel version with different number of processes
    times_parallel = []
    max_cores = min(cpu_count(), 16)
    n_jobs_range = [2**i for i in range(1, int(np.log2(max_cores)) + 1)]
    for n_jobs in n_jobs_range:
        start = time.time()
        kmeans_par = KMeansParallel(n_clusters=n_clusters, max_iter=max_iter)
        kmeans_par.fit(X)
        times_parallel.append(time.time() - start)
    return seq_time, times_parallel, n_jobs_range

if __name__ == "__main__":
    n_samples = 70000
    n_features = 10
    n_clusters = 8
    X, _ = make_blobs(n_samples=n_samples, n_features=n_features, centers=n_clusters, random_state=42)
    os.makedirs('benchmarks', exist_ok=True)
    seq_time, parallel_times, n_jobs_range = run_benchmark(X, n_clusters)
    speedups = [seq_time / p_time for p_time in parallel_times]

    # Visualization
    plt.figure(figsize=(10, 6))
    plt.plot(n_jobs_range, speedups, marker='o')
    plt.title('K-means Clustering Speedup')
    plt.xlabel('Number of Processes')
    plt.ylabel('Speedup')
    plt.grid(True)
    plt.savefig("speedup_graph.png")

    # Speedup
    print(f"Sequential time: {seq_time:.2f} seconds")
    for jobs, time in zip(n_jobs_range, parallel_times):
        print(f"Parallel time ({jobs} processes): {time:.2f} seconds")
    print(f"Speedups: {speedups}")


Automatic, gtk::PolicyType::Automatic);
    scrolled_text_view.add(&text_view);

    // Configure the text view to accept URI lists from other applications. This allows
    // dragging files & folders from a file browser program onto the textview.
    let targets = vec![gtk::TargetEntry::new(
        "text/uri-list",
        TargetFlags::OTHER_APP,
        0,
    )];
    text_view.drag_dest_set(DestDefaults::HIGHLIGHT, &targets, DragAction::COPY);

    // Process any `drag-data-received` events received by the textview. These events include
    // the URL list we're looking for.
    text_view.connect_drag_data_received(|w, _, _, _, d, _, _| {
        // Get the text buffer for the TextView and clear it to make it ready to accept new text.
        let buffer = w.get_buffer().unwrap();
        buffer.set_text("");

        // Since we only accept `text/uri-list`s here, we don't need to check first, we can simply
        // iterate through all of the accepted URIs.
        for file in d.get_uris() {
            let file = gio::File::new_for_uri(&file);
            let display_name = if file.is_native() {
                file.get_path().unwrap().display().to_string()
            } else {
                file.get_uri().into()
            };
            let bulleted_file_path = format!(" • {}\n", &display_name);
            // We make sure to always insert this at the end of the text buffer so they're in
            // order.
            buffer.insert_at_cursor(&bulleted_file_path);
        }
    });

    // Pack widgets vertically.
    let vbox = gtk::Box::new(gtk::Orientation::Vertical, 0);
    vbox.pack_start(&label, false, false, 0);
    vbox.pack_start(&scrolled_text_view, true, true, 0);

    // Create a new window
    window.add(&vbox);
    window.show_all();
}

fn main() {
    let application = gtk::Application::new(
        Some("com.github.gtk-rs.examples.drag_and_drop_textview"),
        Default::default(),
    )
    .expect("Initialization failed...");

    application.connect_activate(|app| {
        build_ui(app);
    });

    application.run(&args().collect::<Vec<_>>());
}
#![no_main]
#![no_std]

use panic_halt as _;

use cortex_m;
use cortex_m::interrupt::{free, Mutex};
use cortex_m_rt::entry;

use crate::hal::{
    gpio::*,
    prelude::*,
    serial::config::Config,
    serial::Serial,
    stm32,
    stm32::interrupt,
    timer::{Event, Timer},
};
use stm32f4xx_hal as hal;

use core::f32::consts::PI;
use core::fmt::Write; // for pretty formatting of the serial output
use micromath::F32Ext;

use core::cell::RefCell;
use core::ops::DerefMut;
use core::sync::atomic::{AtomicUsize, Ordering};

static TIMER_TIM2: Mutex<RefCell<Option<Timer<stm32::TIM2>>>> = Mutex::new(RefCell::new(None));
static COUNTER: AtomicUsize = AtomicUsize::new(0);

#[interrupt]
fn TIM2() {
    free(|cs| {
        if let Some(ref mut tim2) = TIMER_TIM2.borrow(cs).borrow_mut().deref_mut() {
            // Clears interrupt associated with event.
            tim2.clear_interrupt(Event::TimeOut);


local M = {}

---@class Palette
---@field background string?
---@field black string?
---@field red string?
---@field white string?
---@field blue string?
---@field lightPurple string?
---@field darkPurple string?
---@field cyan string?
---@field lightYellow string?
---@field darkYellow string?
---@field green string?
---@field lightRed string?
---@field muted string?
---@field comment string?
---@field color12 string?
---@field color14 string?
---@field color15 string?
---@field color16 string?
---@field color17 string?
---@field color18 string?
---@field color19 string?

---@type Palette
M.black_colors = {
  background = '#000000',
  black = '#000000',
  red = '#f05050',
  white = '#ffffff',
  blue = '#00b1ff',
  lightPurple = '#dc8cff',
  darkPurple = '#9696ff',
  cyan = '#00dcdc',
  lightYellow = '#ffdc96',
  darkYellow = '#ffb482',
  green = '#aae682',
  lightRed = '#ff7878',
  muted = '#c8c8c8',
  comment = '#647882',
  color12 = '#969696',
  color14 = '#141414',
  color15 = '#161b10',
  color16 = '#230c0b',
  color17 = '#343434',
  color18 = '#3c3c3c',
  color19 = '#787878',
}

---@type Palette
M.dark_blue_colors = {
  background = '#101e2c',
  black = '#101e2c',
  red = '#f05050',
  white = '#ffffff',
  blue = '#00b1ff',
  lightPurple = '#dc8cff',
  darkPurple = '#9696ff',
  cyan = '#00dcdc',
  lightYellow = '#ffdc96',
  darkYellow = '#ffb482',
  green = '#aae682',
  lightRed = '#ff7878',
  muted = '#bdd2e7',
  comment = '#647882',
  color12 = '#7ba5cf',
  color14 = '#14283c',
  color15 = '#243435',
  color16 = '#312531',
  color17 = '#18364f',
  color18 = '#1e4667',
  color19 = '#5f82a5',
}

---@type Palette
M.gray_colors = {
  background =


dWithDefault(this, 3, false));
};

/** @param {boolean} value */
proto.xudrpc.CreateNodeResponse.prototype.setInitializedConnext = function(value) {
  jspb.Message.setProto3BooleanField(this, 3, value);
};

/**
 * Generated by JsPbCodeGenerator.
 * @param {Array=} opt_data Optional initial data array, typically from a
 * server response, or constructed directly in Javascript. The array is used
 * in place and becomes part of the constructed object. It is not cloned.
 * If no data is provided, the constructed object will be empty, but still
 * valid.
 * @extends {jspb.Message}
 * @constructor
 */
proto.xudrpc.Currency = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.xudrpc.Currency, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  proto.xudrpc.Currency.displayName = 'proto.xudrpc.Currency';
}

if (jspb.Message.GENERATE_TO_OBJECT) {
/**
 * Creates an object representation of this proto suitable for use in Soy templates.
 * Field names that are reserved in JavaScript and will be renamed to pb_name.
 * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
 * For the list of reserved names please see:
 *     com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
 * @param {boolean=} opt_includeInstance Whether to include the JSPB instance
 *     for transitional soy proto support: http://goto/soy-param-migration
 * @return {!Object}
 */
proto.xudrpc.Currency.prototype.toObject = function(opt_includeInstance) {
  return proto.xudrpc.Currency.toObject(opt_includeInstance, this);
};

/**
 * Static version of the {@see toObject} method.
 * @param {boolean|undefined} includeInstance Whether to include the JSPB
 *     instance for transitional soy proto support:
 *     http://goto/soy-param-migration
 * @param {!proto.xudrpc.Currency} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.xudrpc.Currency.toObject = function(includeInstance, msg) {
  var f, obj = {
    currency: jspb.Message.getFieldWithDefault(msg, 1, ""),
    swapClient: jspb.Message.getFieldWithDefault(msg, 2, 0),
    tokenAddress: jspb.Message.getFieldWithDefault(msg, 3, ""),
    decimalPlaces: jspb.Message.getFieldWithDefault(msg, 4, 0)
  };

  if (includeInstance) {
    obj.$jspbMessageInstance = msg;
  }
  return obj;
};
}

/**
 * Deserializes binary data (in protobuf wire format).
 * @param {jspb.ByteSource} bytes The bytes to deserialize.
 * @return {!proto.xudrpc.Currency}
 */
proto.xudrpc.Currency.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.xudrpc.Currency;
  return proto.xudrpc.Currency.deserializeBinaryFromReader(msg, reader);
};

/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.xudrpc.Currency} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.xudrpc.Currency}
 */
proto.xudrpc.Currency.deserializeBinaryFromReader = function(msg,


27f),   // 洋红色
            Color(0.16f, 0.12f, 0.45f)    // 靛蓝色
        )
    } else {
        // 浅色主题颜色
        listOf(
            Color(0.57f, 0.76f, 0.98f), // 亮蓝色
            Color(0.98f, 0.85f, 0.68f), // 亮橙色/黄色
            Color(0.98f, 0.75f, 0.93f), // 亮粉色
            Color(0.73f, 0.7f, 0.98f)  // 亮紫色
        )
    }
    // 第五个光源使用 App 主题色，以突出品牌
    val color5 = MaterialTheme.colorScheme.primary

    // 在深色模式下，极光绘制在黑色画布上以获得更好的鲜艳度
    // 在浅色模式下，直接在背景上绘制
    val topColor = if (isDarkTheme) Color.Black else backgroundColor

    FullScreenBox(
        modifier = Modifier
            .background(topColor)
    ) {
        Box(
            modifier = Modifier
                .fillMaxSize()
                .blur(150.dp)
                .drawBehind {
                    val width = size.width
                    val height = size.height

                    // 光源 1
                    val radius1 = width * 0.7f
                    val center1 = Offset(
                        x = width * (0.3f + 0.2f * cos(time)),
                        y = height * (0.4f + 0.2f * sin(time))
                    )
                    drawCircle(
                        brush = Brush.radialGradient(
                            listOf(color1.copy(alpha = 0.9f), Color.Transparent),
                            center = center1,
                            radius = radius1
                        ),
                        radius = radius1,
                        center = center1
                    )

                    // 光源 2
                    val radius2 = width * 0.6f
                    val center2 = Offset(
                        x = width * (0.7f + 0.2f * cos(time * 1.5f + PI.toFloat())),
                        y = height * (0.6f + 0.15f * sin(time * 1.5f + PI.toFloat()))
                    )
                    drawCircle(
                        brush = Brush.radialGradient(
                            listOf(color2.copy(alpha = 0.9f), Color.Transparent),
                            center = center2,
                            radius = radius2
                        ),
                        radius = radius2,
                        center = center2
                    )

                    // 光源 3
                    val radius3 = width * 0.8f
                    val center3 = Offset(
                        x = width * (0.6f + 0.2f * cos(time * 0.8f + PI.toFloat() / 2)),
                        y = height * (0.3f + 0.2f * sin(time * 0.8f + PI.toFloat() / 2))
                    )
                    drawCircle(
                        brush = Brush.radialGradient(
                            listOf(color3.copy(alpha = 0.85f), Color.Transparent),
                            center = center3,
                            radius = radius3
                        ),
                        radius = radius3,
                        center = center3
                    )

                    // 光源 4
                    val radius4 = width * 0.5f
                    val center4 = Offset(
                        x = width * (0.2f + 0.1f * cos(time * 1.2f + PI.toFloat() / 4)),
                        y = height * (0.7f + 0.1f * sin(time * 1.2f + PI.toFloat() / 4))
                    )


(TRUE);
}
}
int ffs (uint32 mask)
{
    int m = 0;
    if (mask)
    {
        while (!(mask & (1 << m)))
            m++;

        return (m);
    }

    return (0);
}

void S9xSetWinPixelFormat ()
{
    extern int Init_2xSaI (uint32 BitFormat);

    S9xSetRenderPixelFormat (RGB565);
    Init_2xSaI (565);
    GUI.NeedDepthConvert = FALSE;

    if (VOODOO_MODE)
    {
        GUI.ScreenDepth = 16;
        GUI.RedShift = 11;
        GUI.GreenShift = 5;
        GUI.BlueShift = 0;
        Settings.SixteenBit = TRUE;
    }
    else
    if (OPENGL_MODE)
    {
        GUI.ScreenDepth = 16;
        GUI.RedShift = 11;
        GUI.GreenShift = 6;
        GUI.BlueShift = 1;
        Settings.SixteenBit = TRUE;
	S9xSetRenderPixelFormat (RGB5551);
	Init_2xSaI (555);
    }
    else
    {
        GUI.ScreenDepth = DirectX.DDPixelFormat.dwRGBBitCount;
        if (GUI.ScreenDepth == 15)
            GUI.ScreenDepth = 16;

        GUI.RedShift = ffs (DirectX.DDPixelFormat.dwRBitMask);
        GUI.GreenShift = ffs (DirectX.DDPixelFormat.dwGBitMask);
        GUI.BlueShift = ffs (DirectX.DDPixelFormat.dwBBitMask);

        if((DirectX.DDPixelFormat.dwFlags&DDPF_RGB) != 0 &&
           GUI.ScreenDepth == 16 &&
           DirectX.DDPixelFormat.dwRBitMask == 0xF800 &&
           DirectX.DDPixelFormat.dwGBitMask == 0x07E0 &&
           DirectX.DDPixelFormat.dwBBitMask == 0x001F)
        {
            S9xSetRenderPixelFormat (RGB565);
            Init_2xSaI (565);
        }
        else
            if( (DirectX.DDPixelFormat.dwFlags&DDPF_RGB) != 0 &&
                GUI.ScreenDepth == 16 &&
                DirectX.DDPixelFormat.dwRBitMask == 0x7C00 &&
                DirectX.DDPixelFormat.dwGBitMask == 0x03E0 &&
                DirectX.DDPixelFormat.dwBBitMask == 0x001F)
            {
                S9xSetRenderPixelFormat (RGB555);
                Init_2xSaI (555);
            }
            else
                if((DirectX.DDPixelFormat.dwFlags&DDPF_RGB) != 0 &&
                   GUI.ScreenDepth == 16 &&
                   DirectX.DDPixelFormat.dwRBitMask == 0x001F &&
                   DirectX.DDPixelFormat.dwGBitMask == 0x07E0 &&
                   DirectX.DDPixelFormat.dwBBitMask == 0xF800)
                {
                    S9xSetRenderPixelFormat (BGR565);
                    Init_2xSaI (565);
                }
                else
                    if( (DirectX.DDPixelFormat.dwFlags&DDPF_RGB) != 0 &&
                        GUI.ScreenDepth == 16 &&
                        DirectX.DDPixelFormat.dwRBitMask == 0x001F &&
                        DirectX.DDPixelFormat.dwGBitMask == 0x03E0 &&
                        DirectX.DDPixelFormat.dwBBitMask == 0x7C00)
                    {
                        S9xSetRenderPixelFormat (BGR555);
                        Init_2xSaI (555);
                    }
                    else


tPerSlot: 0.64,
		landBaseOtherSortieAmmoCostPerSlot: 0.6,
		landBaseReconnMaxSlot: 4,
		landBaseOtherMaxSlot: 18,
		landBaseReconnType2Ids: [9,10,41,49,59,94],
		// Newly implemented heavy bomber different max slot
		landBaseHeavyBomberMaxSlot: 9,
		landBaseHeavyBomberType2Ids: [53],
		landBaseHeavyBomberSortieFuelCostPerSlot: 2,
		landBaseHeavyBomberSortieAmmoCostPerSlot: 2,
		// Jet aircraft mechanism still in progress
		jetAircraftType2Ids: [56,57,58,59,91],
		jetBomberSteelCostRatioPerSlot: 0.2,
		// steel_consumption = round(api_cost * current_slot * 0.2)
		// ho229 not 0.2, actual 60 =round(14*18*x), x=0.237~0.24?

		getLandBaseSlotSize :function(type2Id) {
			if(KC3GearManager.landBaseReconnType2Ids.includes(type2Id))
				return KC3GearManager.landBaseReconnMaxSlot;
			else if(KC3GearManager.landBaseHeavyBomberType2Ids.includes(type2Id))
				return KC3GearManager.landBaseHeavyBomberMaxSlot;
			else return KC3GearManager.landBaseOtherMaxSlot;
		},

		// Daihatsu landing craft anti-installation power modifiers per types
		// Array format is [t2Bonus/t4Kai*2, t89Bonus/tokuHoni1Bonus/panzer3Bonus, normalBonus, shikonBonus, tokuBonus/panzer3Bonus, m4a1ddBonus/chihaBonus/ausfJBonus, abBonus/armedBonus/t4Tanks*2, panzer2Bonus]
		// see also: https://wikiwiki.jp/kancolle/%E5%AF%BE%E5%9C%B0%E6%94%BB%E6%92%83#AllBonusTable
		// All base modifiers for T2 Tank are fixed to 1.0 (out of date). T4 Tank variants not simply belonged to T2 Tank
		landingCraftModifiers: {
			// Soft-skinned (including Supply Depot Princess pre-cap bonus)
			0: {
				base:   [1.0, 1.4, 1.4, 1.4, 1.4,  1.4, 1.4, 1.4],
				count1: [1.5, 1.5, 1.0, 1.0, 1.15, 1.1, 1.1, 1.5],
				count2: [1.2, 1.3, 1.0, 1.0, 1.0,  1.0, 1.1, 1.0],
			},
			// Artillery Imp
			1: {
				base:   [1.0,  1.8, 1.8, 1.8, 1.8,  1.8, 1.8, 1.8],
				count1: [2.4,  1.5, 1.0, 1.0, 1.15, 2.0, 1.3, 1.5],
				count2: [1.35, 1.4, 1.0, 1.0, 1.0,  1.0, 1.2, 1.0],
			},
			// Isolated Island Princess
			2: {
				base:   [1.0,  1.8, 1.8, 1.8, 1.8,  1.8, 1.8, 1.8],
				count1: [2.4,  1.2, 1.0, 1.0, 1.15, 1.8, 1.3, 1.2],
				count2: [1.35, 1.4, 1.0, 1.0, 1.0,  1.0, 1.1, 1.0],
			},
			// Supply Depot Princess for post-cap bonus only
			3: {
				base:   [1.0, 1.7, 1.7, 1.7, 1.7, 1


 양갱",
[20498] = "실리시드 껍질",
[20499] = "깨진 실리시드 껍질",
[20500] = "가벼운 실리시드 등껍질",
[20501] = "무거운 실리시드 등껍질",
[20503] = "사로잡힌 물의 정령",
[20504] = "빛의 검",
[20505] = "기사단 인장",
[20506] = "도안: 독송곳니 팔보호구",
[20507] = "도안: 독송곳니 건틀릿",
[20508] = "도안: 독송곳니 흉갑",
[20509] = "도안: 모래추적자 팔보호구",
[20510] = "도안: 모래추적자 건틀릿",
[20511] = "도안: 모래추적자 흉갑",
[20512] = "축성의 보주",
[20513] = "심연의 문장",
[20514] = "심연의 인장",
[20515] = "심연의 홀",
[20516] = "할로윈 축제 사과",
[20517] = "서슬강철 어깨보호구",
[20518] = "두루마리: 부름의 문장 창조",
[20519] = "남쪽바다 해적 모자",
[20520] = "암흑의 룬",
[20521] = "맹위의 면갑",
[20522] = "야성의 지팡이",
[20525] = "대지의 인장",
[20526] = "두루마리: 부름의 문장 창조",
[20527] = "두루마리: 부름의 문장 창조",
[20528] = "두루마리: 부름의 문장 창조",
[20530] = "예속의 로브",
[20531] = "두루마리: 부름의 인장 창조",
[20532] = "두루마리: 부름의 인장 창조",
[20533] = "두루마리: 부름의 인장 창조",
[20534] = "나락의 조각",
[20535] = "두루마리: 부름의 인장 창조",
[20536] = "영혼 수확기",
[20537] = "저승의 룬매듭 장화",
[20538] = "저승의 룬매듭 다리보호구",
[20539] = "저승의 룬매듭 �


using System;
using System.IO;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;

namespace Quasar.Controls
{
    /// <summary>
    /// Interaction logic for FileView.xaml
    /// </summary>
    public partial class FileView : Window
    {
        public FileView()
        {

            InitializeComponent();

        }

        public FileView(String path, String ModName)
        {
            if (Directory.Exists(path))
            {
                InitializeComponent();

                Trees.Items.Clear();

                foreach (string s in Directory.GetDirectories(path))
                {
                    var rootDirectory = new DirectoryInfo(s);
                    Trees.Items.Add(CreateDirectoryNode(rootDirectory));
                }

                ModNameLabel.Content = ModName;

                ExpandTree(Trees);
            }
        }

        private static TreeViewItem CreateDirectoryNode(DirectoryInfo directoryInfo)
        {
            var directoryNode = new TreeViewItem
            {


)
	mov %es,2(%rsp)
	mov %fs,4(%rsp)
	mov %gs,6(%rsp)
	mov %ds,(%rsp)
	mov %es,2(%rsp)
	mov %fs,4(%rsp)
	mov %gs,6(%rsp)
	mov %ds,(%rsp)
	mov %es,2(%rsp)
	mov %fs,4(%rsp)
	mov %gs,6(%rsp)
	mov %ds,(%rsp)
	mov %es,2(%rsp)
	mov %fs,4(%rsp)
	mov %gs,6(%rsp)
	mov %ds,(%rsp)
	mov %es,2(%rsp)
	mov %fs,4(%rsp)
	mov %gs,6(%rsp)
	dec %ecx
	jnz 0b
	pop %rax
	ret

.macro between
	xor %rdi,%rbx
	xor %rdi,%rbx
	xor %rdi,%rbx
	xor %rdi,%rbx
	xor %rdi,%rbx
	xor %rdi,%rbx
	xor %rdi,%rbx
	xor %rdi,%rbx
	xor %rdi,%rbx
	xor %rdi,%rbx
	xor %rdi,%rbx
	xor %rdi,%rbx
	xor %rdi,%rbx
	xor %rdi,%rbx
	xor %rdi,%rbx
	xor %rdi,%rbx
.endm

.macro iter
	mov (%rsp),%rax
	mov $ CPU_MSR_FSBASE,%ecx
	mov %rax,%rdx
	shr $ 32,%rdx
	wrmsr

	between
	between
	between
	between
.endm

.macro iter_block
	iter
	iter
	iter
	iter
	iter
	iter
	iter
	iter
.endm

.global rdfsbase_perf
rdfsbase_perf:
	movabs $ 0xFFFF800042424242,%rax
	mov %rax,%rdi
	xor %ebx,%ebx
	push %rax
	mov $ 60000000,%esi

.balign 16
0:	iter_block
	iter_block
	iter_block
	iter_block
	iter_block
	iter_block
	iter_block
	iter_block

	dec %esi
	jnz 0b
	pop %rax
	ret


/******************************************************
Writer:Du YanMing
Mail:dym880@163.com
Create Date:2020/10/30 13:16:23
Functional description： AnnoSoEasyModule
******************************************************/
using Anno.EngineData;
using System;
using System.Collections.Generic;
using System.Text;

namespace Anno.Plugs.SoEasyService
{
    using Anno.Const.Attribute;
    using Anno.EngineData;
    using HelloWorldDto;

    public class AnnoSoEasyModule : BaseModule
    {
        [AnnoInfo(Desc = "AnnoSoEasy你好啊SayHi")]
        public dynamic SayHi([AnnoInfo(Desc = "称呼")] string vname, [AnnoInfo(Desc = "年龄")] int vage)
        {
            var msg = string.Empty;
            if (vage < 12)
            {
                msg = "小朋友年纪轻轻就就开始玩编程了啊！加油Baby！";
            }else if (vage < 23)
            {
                msg = "小兄弟，找女朋友了吗？没有的话赶紧找一个吧。别把心思都放在写代码上！";
            }
            else if (vage < 30)


it gets the outline like that_dd__lt_/p_gt__lt_pre class_eq__qt_ipsCode prettyprint_qt__gt_asteroid.customOutline _eq_ asteroid.clone(_t_customAsteroidOutline_t_)_sm_asteroid.customOutline.isVisible _eq_ false_sm_asteroid.customOutline.isOutline _eq_ true_sm_asteroid.customOutline.scaling _eq_ new BABYLON.Vector3(1.1_co_ 1.1_co_ 1.1)_sm_asteroid.customOutline.material _eq_ new BABYLON.StandardMaterial(_t_outlineMaterial_t__co_ scene)_sm_asteroid.customOutline.material.diffuseColor _eq_ new BABYLON.Color3(1_co_ 0_co_ 0)_sm_asteroid.customOutline.material.emissiveColor _eq_ new BABYLON.Color3(1_co_ 0_co_ 0)_sm_asteroid.customOutline.material.specularColor _eq_ new BABYLON.Color3(0_co_0_co_0)_sm_asteroid.customOutline.material.alpha _eq_ 0.7_sm__lt_/pre_gt__lt_p_gt_Any idea why that doesn_t_t seem to work anymore? I jsut tried with the old version that I used back then_co_ but somehow I still can_t_t get it to work in my new project. Not sure what I am doing wrong. I am so confused  _lt_img src_eq__qt_http_dd_//www.html5gamedevs.com/uploads/emoticons/default_unsure.png_qt_ alt_eq__qt__dd_unsure_dd__qt__gt__lt_/p_gt_\n\n\n\t\t\t\n\t\t_lt_/div_gt_\n\n\t\t_lt_div class_eq__qt_ipsI_qt__gt__lt_/div_gt__lt_/div_gt_"},{"Owner":"Deltakosh","Date":"2015-11-28T16:56:32Z","Content":"_lt_div class_eq__qt_mages_qt__gt_\n\t\t\t\n_lt_p_gt_Hello IIceman_co__lt_/p_gt__lt_p_gt_ _lt_/p_gt__lt_p_gt_the clone shares the same geometry as its source. So updating geometry on one will impact the other_lt_/p_gt_\n\n\n\t\t\t\n\t\t_lt_/div_gt_\n\n\t\t_lt_div class_eq__qt_ipsI_qt__gt__lt_/div_gt__lt_/div_gt_"},{"Owner":"iiceman","Date":"2015-11-28T17:08:12Z","Content":"_lt_div class_eq__qt_mages_qt__gt_\n\t\t\t\n_lt_p_gt_Hi DK_co__lt_/p_gt__lt_p_gt_ _lt_/p_gt__lt_p_gt_I just edited my post after figuring that out so far. But I still don_t_t understand how I made it work back then. Is there a way to really copy a mesh? Can I somehow avoid that they share the same geometry?_lt_/p_gt_\n\n\n\t\t\t\n\t\t_lt_/div_gt_\n\n\t\t_lt_div class_eq__qt_ipsI_qt__gt__lt_/div_gt__lt_/div_gt_"},{"Owner":"Deltakosh","Date":"2015-11-28T19:44:14Z","Content":"_lt_div class_eq__qt_mages_qt__gt_\n\t\t\t\n_lt_p_gt_You can use something like mesh.getVerticesData and then create a new mesh using t


 }
  }

  // this should never happen, unless creep is spawned into a corner
  // or structure is built next to it and seals the only path out
  return getRandomDir();
}

/*
 * a nudge
 */
function excuseMe(pos: RoomPosition, direction: DirectionConstant) {
  const nextX = pos.x + offsetX[direction];
  const nextY = pos.y + offsetY[direction];
  if (nextX > 49 || nextX < 0 || nextY > 49 || nextY < 0)
    return;

  const room = Game.rooms[pos.roomName];
  const creeps = room.lookForAt(LOOK_CREEPS, nextX, nextY);
  if (creeps.length > 0 && creeps[0].my)
    creeps[0].memory.excuseMe = getOppositeDir(direction);
  const powerCreeps = room.lookForAt(LOOK_POWER_CREEPS, nextX, nextY);
  if (powerCreeps.length > 0 && powerCreeps[0].my)
    powerCreeps[0].memory.excuseMe = getOppositeDir(direction);
}

/*
 *
 */
let creepsThatTriedToMove: { [key: string]: RoomPosition; } = {};
const move = Creep.prototype.move;
Creep.prototype.move = function (direction: DirectionConstant | Creep, nudge?: boolean) {
  if ((alwaysNudge || nudge) && _.isNumber(direction))
    excuseMe(this.pos, direction);
  creepsThatTriedToMove[this.name] = this.pos;
  return move.call(this, direction);
};

/*
 * call this on creeps that should react to being nudged
 */
function giveWay(creep: AnyCreep, arg?: boolean | { pos: RoomPosition; range: number; }) {
  if (creep.memory.excuseMe) {
    if (!arg)
      creep.move(creep.memory.excuseMe, true);
    else if (typeof arg === 'object')
      creep.move(getNudgeDirection_KeepRange(creep.pos, arg), true);
    else
      creep.move(getNudgeDirection_Random(creep.pos), true);
  }
}
Creep.prototype.giveWay = function (arg?: boolean | { pos: RoomPosition; range: number; }) {
  giveWay(this, arg);
};
PowerCreep.prototype.giveWay = function (arg?: boolean | { pos: RoomPosition; range: number; }) {
  giveWay(this, arg);
};

/*
 * clears nudges from memory of creeps that moved
 * call on tick start
 */
function clearNudges() {
  for (let creepName in creepsThatTriedToMove) {
    const creep = Game.creeps[creepName];
    const powerCreep = Game.powerCreeps[creepName];
    const prevPos = creepsThatTriedToMove[creepName];
    if ((!creep || !creep.pos.isEqualTo(prevPos)) && (!powerCreep || !powerCreep.pos.isEqualTo(prevPos))) {
      const creepMemory = Memory.creeps[creepName];
      if (creepMemory)
        creepMemory.excuseMe = undefined;
      const powerCreepMemory = Memory.powerCreeps[creepName];
      if (powerCreepMemory)
        powerCreepMemory.excuseMe = undefined;
      delete creepsThatTriedToMove[creepName];
    }
  }
}import 'reflect-metadata';
import { Container, interfaces } from 'inversify';
import { ServiceToInject } from './interfaces/ServiceToInject.interface';

/**
 * @description this class will later be modulized to be able to use it in
 * all our microservices
 */
class DIContainerManager {
    private container: Container;

    constructor() {
        this.container = new Container();
    }

    getContainer() {
        return this.container;
    }


(doc.first, from), Math.min(doc.first + doc.size, to), line => {
    if (line.markedSpans)
      (existing || (existing = change["spans_" + doc.id] = {}))[n] = line.markedSpans
    ++n
  })
}

// When un/re-doing restores text containing marked spans, those
// that have been explicitly cleared should not be restored.
function removeClearedSpans(spans) {
  if (!spans) return null
  let out
  for (let i = 0; i < spans.length; ++i) {
    if (spans[i].marker.explicitlyCleared) { if (!out) out = spans.slice(0, i) }
    else if (out) out.push(spans[i])
  }
  return !out ? spans : out.length ? out : null
}

// Retrieve and filter the old marked spans stored in a change event.
function getOldSpans(doc, change) {
  let found = change["spans_" + doc.id]
  if (!found) return null
  let nw = []
  for (let i = 0; i < change.text.length; ++i)
    nw.push(removeClearedSpans(found[i]))
  return nw
}

// Used for un/re-doing changes from the history. Combines the
// result of computing the existing spans with the set of spans that
// existed in the history (so that deleting around a span and then
// undoing brings back the span).
export function mergeOldSpans(doc, change) {
  let old = getOldSpans(doc, change)
  let stretched = stretchSpansOverChange(doc, change)
  if (!old) return stretched
  if (!stretched) return old

  for (let i = 0; i < old.length; ++i) {
    let oldCur = old[i], stretchCur = stretched[i]
    if (oldCur && stretchCur) {
      spans: for (let j = 0; j < stretchCur.length; ++j) {
        let span = stretchCur[j]
        for (let k = 0; k < oldCur.length; ++k)
          if (oldCur[k].marker == span.marker) continue spans
        oldCur.push(span)
      }
    } else if (stretchCur) {
      old[i] = stretchCur
    }
  }
  return old
}

// Used both to provide a JSON-safe object in .getHistory, and, when
// detaching a document, to split the history in two
export function copyHistoryArray(events, newGroup, instantiateSel) {
  let copy = []
  for (let i = 0; i < events.length; ++i) {
    let event = events[i]
    if (event.ranges) {
      copy.push(instantiateSel ? Selection.prototype.deepCopy.call(event) : event)
      continue
    }
    let changes = event.changes, newChanges = []
    copy.push({changes: newChanges})
    for (let j = 0; j < changes.length; ++j) {
      let change = changes[j], m
      newChanges.push({from: change.from, to: change.to, text: change.text})
      if (newGroup) for (var prop in change) if (m = prop.match(/^spans_(\d+)$/)) {
        if (indexOf(newGroup, Number(m[1])) > -1) {
          lst(newChanges)[prop] = change[prop]
          delete change[prop]
        }
      }
    }
  }
  return copy
}
import { loadMode } from "../display/mode_state.js"
import { runInOp } from "../display/operations.js"
import { regChange } from "../display/view_tracking.js"
import { Line, updateLine } from "../line/line_data.js"
import { findMaxLine } from "../line/spans.js"
import { getLine } from "../line/utils_line.js"
import { estimateLineHeights } from "../measure


→",
            layout="Ubah Blok-blok",

            ctrl="Ubah Kontrol",
            key="Ubah Tindakan Tombol",
            touch="Pengaturan Sentuhan",
            showVK="Tunjuk Tombol Sentuh",
            reTime="Tunda Mulai",
            RS="Sistem Putar",
            menuPos="Pos. Tombol Menu",
            sysCursor="Guna Mouse Bawaan",
            autoPause="Jeda Jika Tidak Difokus",
            autoSave="Simpan Rekor Otomatis",
            simpMode="Mode Sederhana",
        },
        setting_video={
            title="Pengaturan Video",
            sound="←Audio",
            game="Permainan→",

            block="Gambarkan Blok",
            smooth="Jatuh Halus",
            upEdge="Blok 3D",
            bagLine="Pemisah Kantong",

            ghostType="Tipe Hantu",
            ghost="Kegelapan Hantu",
            center="Kegelapan Tengah Pemutaran",
            grid="Kegelapan Kisi",
            lineNum="Kegelapan Nomor Baris",

            lockFX="Efek Kunci",
            dropFX="Efek Jatuh",
            moveFX="Efek Pindah",
            clearFX="Efek Baris",
            splashFX="Efek Guyuran Baris",
            shakeFX="Goyang Tempat Main",
            atkFX="Efek Serang",

            frame="Kecepatan Bingkai (%)",

            text="Teks Baris",
            score="Teks Nilai",
            bufferWarn="Peringatan Serangan",
            showSpike="Teks Serang",
            nextPos="Pratinjau Muncul Blok",
            highCam="Scroll Tempat Main",
            warn="Peringatan Bahaya",

            clickFX="Efek Klik",
            power="Info Baterai",
            clean="Gambar Cepat",
            fullscreen="Layar Penuh",
            -- portrait="Portrait",
            -- msaa="MSAA level",

            bg_on="B.G. Normal",
            bg_off="Tidak Ada B.G.",
            bg_custom="Ubah B.G.",
            -- bg_custom_base64="Paste image as BG\n(PNG/JPG in Base64)",
            -- defaultBG="Default B.G.",
            -- resetDbg="Reset to default",
            -- lockBG="Lock B.G.",
            -- noTheme="Disable theme",

            blockSatur="Kejenuhan Blok Aktif",
            fieldSatur="Kejenuhan Blok Terkunci",
        },
        setting_sound={
            title="Pengaturan Audio",

            game="←Permainan",
            graphic="Video→",

            mainVol="Volume Utama",
            bgm="Musik",
            sfx="Efek Suara",
            stereo="Stereo",
            spawn="Efek Muncul Blok",
            warn="Efek Bahaya",
            vib="Getaran",
            voc="Suara",

            autoMute="Bisukan Bila Tidak Fokus",
            fine="Efek Efisiensi Tombol Tidak Maksimum",
            sfxPack="Kumpulan Efek Suara",
            vocPack="Kumpulan Suara",
            apply="Terapkan",
        },
        setting_control={
            title="Pengaturan Kontrol",
            preview="Pratinjau",

            das="DAS",arr="ARR",
            dascut="Gangguan DAS",
            irscut="Gangguan IRS",
            dropcut="Gangguan Auto-kunci",
            sddas="DAS Jatuh",sdarr="ARR Jatuh",
            ihs="Simpan Saat Tunda",
            irs="Putar Saat Tunda",
            ims="Pi


}, 0, 0},
		{&UpdateStmt{TableRefs: tableRefsClause}, 1, 1},
		{&SelectStmt{}, 0, 0},
		{&FieldList{}, 0, 0},
		{&SetOprSelectList{}, 0, 0},
		{&WindowSpec{}, 0, 0},
		{&PartitionByClause{}, 0, 0},
		{&FrameClause{}, 0, 0},
		{&FrameBound{}, 0, 0},
	}

	for _, v := range stmts {
		ce.reset()
		v.node.Accept(checkVisitor{})
		require.Equal(t, v.expectedEnterCnt, ce.enterCnt)
		require.Equal(t, v.expectedLeaveCnt, ce.leaveCnt)
		v.node.Accept(visitor1{})
	}
}

func TestTableNameRestore(t *testing.T) {
	testCases := []NodeRestoreTestCase{
		{"dbb.`tbb1`", "`dbb`.`tbb1`"},
		{"`tbb2`", "`tbb2`"},
		{"tbb3", "`tbb3`"},
		{"dbb.`hello-world`", "`dbb`.`hello-world`"},
		{"`dbb`.`hello-world`", "`dbb`.`hello-world`"},
		{"`dbb.HelloWorld`", "`dbb.HelloWorld`"},
	}
	extractNodeFunc := func(node Node) Node {
		return node.(*CreateTableStmt).Table
	}
	runNodeRestoreTest(t, testCases, "CREATE TABLE %s (id VARCHAR(128) NOT NULL);", extractNodeFunc)
}

func TestTableNameIndexHintsRestore(t *testing.T) {
	testCases := []NodeRestoreTestCase{
		{"t use index (hello)", "`t` USE INDEX (`hello`)"},
		{"t use index (hello, world)", "`t` USE INDEX (`hello`, `world`)"},
		{"t use index ()", "`t` USE INDEX ()"},
		{"t use key ()", "`t` USE INDEX ()"},
		{"t ignore key ()", "`t` IGNORE INDEX ()"},
		{"t force key ()", "`t` FORCE INDEX ()"},
		{"t use index for order by (idx1)", "`t` USE INDEX FOR ORDER BY (`idx1`)"},

		{"t use index (hello, world, yes) force key (good)", "`t` USE INDEX (`hello`, `world`, `yes`) FORCE INDEX (`good`)"},
		{"t use index (hello, world, yes) use index for order by (good)", "`t` USE INDEX (`hello`, `world`, `yes`) USE INDEX FOR ORDER BY (`good`)"},
		{"t ignore key (hello, world, yes) force key (good)", "`t` IGNORE INDEX (`hello`, `world`, `yes`) FORCE INDEX (`good`)"},

		{"t use index for group by (idx1) use index for order by (idx2)", "`t` USE INDEX FOR GROUP BY (`idx1`) USE INDEX FOR ORDER BY (`idx2`)"},
		{"t use index for group by (idx1) ignore key for order by (idx2)", "`t` USE INDEX FOR GROUP BY (`idx1`) IGNORE INDEX FOR ORDER BY (`idx2`)"},
		{"t use index for group by (idx1) ignore key for group by (idx2)", "`t` USE INDEX FOR GROUP BY (`idx1`) IGNORE INDEX FOR GROUP BY (`idx2`)"},
		{"t use index for order by (idx1) ignore key for group by (idx2)", "`t` USE INDEX FOR ORDER BY (`idx1`) IGNORE INDEX FOR GROUP BY (`idx2`)"},

		{"t use index for order by (idx1) ignore key for group by (idx2) use index (idx3)", "`t` USE INDEX FOR ORDER BY (`idx1`) IGNORE INDEX FOR GROUP BY (`idx2`) USE INDEX (`idx3`)"},
		{"t use index for order by (idx1) ignore key for group by (idx2) use index (idx3)", "`t` USE INDEX FOR ORDER BY (`idx1`) IGNORE INDEX FOR GROUP BY (`idx2`) USE INDEX (`idx3`)"},

		{"t use


: -0.5, y: 0.5 };
                let world_coords = world_rectangle.world_coords(local_coords);

                assert_eq!(world_coords, WorldCoords { x: x - 50.0, y: y - 100.0 });
            }

            //bottom right corner
            {
                let local_coords = LocalCoords { x: 0.5, y: -0.5 };
                let world_coords = world_rectangle.world_coords(local_coords);

                assert_eq!(world_coords, WorldCoords { x: x + 50.0, y: y + 100.0 });
            }
        }

        Ok(())
    }
}#![feature(generic_associated_types)]
  //~^ the feature `generic_associated_types` is incomplete

trait X {
    type Y<'a>;
      //~^ ERROR this associated type
      //~| ERROR this associated type
}

const _: () = {
  fn f2<'a>(arg : Box<dyn X<Y<1> = &'a ()>>) {}
};

fn main() {}
use std::convert::{TryFrom, TryInto};

use thiserror::Error;

use super::{StorageKey, StorageNode, StoragePlan};

#[derive(Error, Debug)]
pub enum StorageKeyConversionError {
  #[error("cannot decode base64-encoded storage key")]
  Base64Decode,
}

impl From<&StoragePlan<StorageKey>> for StoragePlan<String> {
  fn from(that: &StoragePlan<StorageKey>) -> Self {
    Self {
      nodes: that
        .nodes
        .iter()
        .map(|(k, v)| (k.clone(), StorageNode::<String>::from(v)))
        .collect(),
    }
  }
}

impl From<&StorageNode<StorageKey>> for StorageNode<String> {
  fn from(that: &StorageNode<StorageKey>) -> Self {
    Self {
      key: base64::encode(&that.key),
      flattened: that.flattened,
      subspace_reference: that.subspace_reference.map(|x| base64::encode(&x)),
      set: that.set.as_ref().map(|x| Box::new(Self::from(&**x))),
      children: that
        .children
        .iter()
        .map(|(k, v)| (k.clone(), Self::from(v)))
        .collect(),
    }
  }
}

impl TryFrom<&StoragePlan<String>> for StoragePlan<StorageKey> {
  type Error = StorageKeyConversionError;

  fn try_from(that: &StoragePlan<String>) -> Result<Self, Self::Error> {
    Ok(Self {
      nodes: that
        .nodes
        .iter()
        .map(|(k, v)| StorageNode::<StorageKey>::try_from(v).map(|v| (k.clone(), v)))
        .collect::<Result<_, StorageKeyConversionError>>()?,
    })
  }
}

impl TryFrom<&StorageNode<String>> for StorageNode<StorageKey> {
  type Error = StorageKeyConversionError;

  fn try_from(that: &StorageNode<String>) -> Result<Self, Self::Error> {
    Ok(Self {
      key: base64::decode(&that.key)
        .map_err(|_| StorageKeyConversionError::Base64Decode)
        .and_then(|x| {
          x.try_into()
            .map_err(|_| StorageKeyConversionError::Base64Decode)
        })?,
      flattened: that.flattened,
      subspace_reference: that
        .subspace_reference
        .as_ref()
        .map(|x| base64::decode(&x))
        .transpose()
        .map_err(|_| StorageKeyConversionError::Base64Decode)?
        .map(|x| {
          x.try_into()
            .map_err(|_| StorageKeyConversionError::Base64Decode)
        })
        .transpose()?,
      set: that