 (u64, u64), to_append_to: &mut String) {
    to_append_to.push(ENCODING_DIGITS[(value.0 >> 61) as usize]);
    to_append_to.push(ENCODING_DIGITS[((value.0 >> 56) & MASK_U64) as usize]);
    to_append_to.push(ENCODING_DIGITS[((value.0 >> 51) & MASK_U64) as usize]);
    to_append_to.push(ENCODING_DIGITS[((value.0 >> 46) & MASK_U64) as usize]);
    to_append_to.push(ENCODING_DIGITS[((value.0 >> 41) & MASK_U64) as usize]);
    to_append_to.push(ENCODING_DIGITS[((value.0 >> 36) & MASK_U64) as usize]);
    to_append_to.push(ENCODING_DIGITS[((value.0 >> 31) & MASK_U64) as usize]);
    to_append_to.push(ENCODING_DIGITS[((value.0 >> 26) & MASK_U64) as usize]);
    to_append_to.push(ENCODING_DIGITS[((value.0 >> 21) & MASK_U64) as usize]);
    to_append_to.push(ENCODING_DIGITS[((value.0 >> 16) & MASK_U64) as usize]);
    to_append_to.push(ENCODING_DIGITS[((value.0 >> 11) & MASK_U64) as usize]);
    to_append_to.push(ENCODING_DIGITS[((value.0 >> 6) & MASK_U64) as usize]);
    to_append_to.push(ENCODING_DIGITS[((value.0 >> 1) & MASK_U64) as usize]);

    let split = ((value.0 << 4) & MASK_U64) | ((value.1 >> 60) & MASK_U64);
    to_append_to.push(ENCODING_DIGITS[split as usize]);

    to_append_to.push(ENCODING_DIGITS[((value.1 >> 55) & MASK_U64) as usize]);
    to_append_to.push(ENCODING_DIGITS[((value.1 >> 50) & MASK_U64) as usize]);
    to_append_to.push(ENCODING_DIGITS[((value.1 >> 45) & MASK_U64) as usize]);
    to_append_to.push(ENCODING_DIGITS[((value.1 >> 40) & MASK_U64) as usize]);
    to_append_to.push(ENCODING_DIGITS[((value.1 >> 35) & MASK_U64) as usize]);
    to_append_to.push(ENCODING_DIGITS[((value.1 >> 30) & MASK_U64) as usize]);
    to_append_to.push(ENCODING_DIGITS[((value.1 >> 25) & MASK_U64) as usize]);
    to_append_to.push(ENCODING_DIGITS[((value.1 >> 20) & MASK_U64) as usize]);
    to_append_to.push(ENCODING_DIGITS[((value.1 >> 15) & MASK_U64) as usize]);
    to_append_to.push(ENCODING_DIGITS[((value.1 >> 10) & MASK_U64) as usize]);
    to_append_to.push(ENCODING_DIGITS[((value.1 >> 5) & MASK_U64) as usize]);
    to_append_to.push(ENCODING_DIGITS[(value.1 & MASK_U64) as usize]);
}

/// Parses the given [crockford Base32][crockford] string into a `(u64, u64)`.
///
/// [crockford]: https://crockford.com/wrmg/base32.html
///
/// # Examples
/// ```
/// use rusty_ulid::crockford::*;
///
/// let parsed = parse_crockford_u64_tuple("0000000000000000000000007Z");
///
/// assert_eq!(Ok((0, 0xFF)), parsed);
/// ```
///
/// When decoding, upper and lower case letters are accepted,
/// `i` and `l` will be treated as `1` and `o` will be treated as `0`.
///
/// ```
/// use


  const val WEBSITE_NAME = "Coding Meet"

    const val BIO =
        "Hello! I’m Meet, an Android developer passionate about building apps with Kotlin, Java, KMP, and Jetpack Compose. Through my YouTube channel, GitHub projects, and this website, I share tutorials, source code, and practical guides to help developers improve their skills. I also offer custom Android development services, including app creation, bug fixing, and SDK updates. Let’s simplify Android development together! \uD83D\uDE80"

    const val NAMASTE_TEXT = "Namaste 🙏"

    const val WELCOME_TEXT = "Welcome to my portfolio website"

    const val EMAIL_ID = "meetb2602@gmail.com"

    private const val GITHUB_USER_NAME = "Coding-Meet"

    private const val TOTAL_PUBLIC_REPOS = 104

    const val TOTAL_PAGE = TOTAL_PUBLIC_REPOS / 100 + 1

    const val GITHUB_BASE_URL = "https://api.github.com/users/$GITHUB_USER_NAME/repos"

    private const val MEDIUM_USER_NAME = "@meet26"

    const val MEDIUM_BASE_URL =
        "https://api.rss2json.com/v1/api.json?rss_url=https://medium.com/feed/$MEDIUM_USER_NAME"

    val projects = mutableListOf(
        Project(
            title = "News Kotlin Multiplatform App",
            shortDescription = "A Kotlin Compose Multiplatform news app for Android, iOS, Windows, macOS, and Linux.",
            longDescription = "The News KMP App is a Kotlin Compose Multiplatform (KMP) project designed to deliver a consistent news reading experience across multiple platforms, including Android, iOS, Windows, macOS, and Linux. This project leverages Kotlin's multiplatform capabilities to share code and logic while using Compose for UI, ensuring a seamless and native experience on each platform.",
            features = listOf(
                "Stay updated with the day's top headlines.",
                "Get in-depth insights into your favorite news articles.",
                "Find news articles tailored to your interests.",
                "Bookmark articles for offline reading.",
                "Seamless operation on Android, iOS, Windows, macOS, and Linux.",
                "Declarative UI with Jetpack Compose for shared components.",
                "Material Design and Material Design 3 support.",
                "Type-safe navigation using Jetpack Compose Navigation.",
                "MVVM Architecture with ViewModel for UI-related data.",
                "Robust networking with Ktor for HTTP client-server communication.",
                "Efficient image loading using Coil.",
                "Local data storage with Room for all platforms.",
                "Key-value pair storage using DataStore.",
                "Build configuration management with BuildKonfig."
            ),
            technologies = listOf(
                "Kotlin",
                "Jetpack Compose",
                "Kotlin Multiplatform",
                "MVVM Architecture",
                "Room Database",
                "DataStore",
                "Ktor"
            ),
            libraries = listOf(
                "BuildKonfig",
                "Ktor",
                "Kermit",
                "Room",
                "DataStore",
                "Navigation",
                "kotlinx.coroutines",
                "Common ViewModel",
                "kotlinx.serialization"
            ),
            githubUrl = "https://github.com/Coding-Meet/News-KMP-App",
            imageUrls = listOf(
                "project/news_kmp_app/news_app_banner.png",
                "project/news_kmp_app/news_app_img_1.png",
                "project/news_kmp_app/news_app_img_2.png",
                "project/news_kmp_app


, 6}:    "vrml-multi-use",       // VRML Multi User Systems
	Port{4230, 17}:   "vrml-multi-use",       // VRML Multi User Systems
	Port{4231, 6}:    "vrml-multi-use",       // VRML Multi User Systems
	Port{4231, 17}:   "vrml-multi-use",       // VRML Multi User Systems
	Port{4232, 6}:    "vrml-multi-use",       // VRML Multi User Systems
	Port{4232, 17}:   "vrml-multi-use",       // VRML Multi User Systems
	Port{4233, 6}:    "vrml-multi-use",       // VRML Multi User Systems
	Port{4233, 17}:   "vrml-multi-use",       // VRML Multi User Systems
	Port{4234, 6}:    "vrml-multi-use",       // VRML Multi User Systems
	Port{4234, 17}:   "vrml-multi-use",       // VRML Multi User Systems
	Port{4235, 6}:    "vrml-multi-use",       // VRML Multi User Systems
	Port{4235, 17}:   "vrml-multi-use",       // VRML Multi User Systems
	Port{4236, 6}:    "vrml-multi-use",       // VRML Multi User Systems
	Port{4236, 17}:   "vrml-multi-use",       // VRML Multi User Systems
	Port{4237, 6}:    "vrml-multi-use",       // VRML Multi User Systems
	Port{4237, 17}:   "vrml-multi-use",       // VRML Multi User Systems
	Port{4238, 6}:    "vrml-multi-use",       // VRML Multi User Systems
	Port{4238, 17}:   "vrml-multi-use",       // VRML Multi User Systems
	Port{4239, 6}:    "vrml-multi-use",       // VRML Multi User Systems
	Port{4239, 17}:   "vrml-multi-use",       // VRML Multi User Systems
	Port{4240, 6}:    "vrml-multi-use",       // VRML Multi User Systems
	Port{4240, 17}:   "vrml-multi-use",       // VRML Multi User Systems
	Port{4241, 6}:    "vrml-multi-use",       // VRML Multi User Systems
	Port{4241, 17}:   "vrml-multi-use",       // VRML Multi User Systems
	Port{4242, 6}:    "vrml-multi-use",       // VRML Multi User Systems or CrashPlan http:  support.code42.com CrashPlan Latest Configuring Network#Networking_FAQs
	Port{4242, 17}:   "vrml-multi-use",       // VRML Multi User Systems
	Port{4243, 6}:    "vrml-multi-use",       // VRML Multi User Systems or CrashPlan http:  support.code42.com CrashPlan Latest Configuring Network#Networking_FAQs
	Port{4243, 17}:   "vrml-multi-use",       // VRML Multi User Systems
	Port{4244, 6}:    "vrml-multi-use",       // VRML Multi User Systems
	Port{4244, 17}:   "vrml-multi-use",       // VRML Multi User Systems
	Port{4245, 6}:    "vrml-multi-use",       // VRML Multi User Systems
	Port{4245, 17}:   "vrml-multi-use",       // VRML Multi User Systems
	Port{4246, 6}:    "vrml-multi-use",       // VRML Multi User Systems
	Port{4246, 17}:   "vrml-multi-use",       // VRML Multi User Systems
	Port{4247, 6}:    "vrml-multi-use",       // VRML Multi User Systems
	Port{4247, 17}:   "vrml-multi-use",       // VRML Multi User Systems
	Port{4248, 6}:    "vrm


push   %ebp
 8049501:	89 e5                	mov    %esp,%ebp
 8049503:	83 ec 18             	sub    $0x18,%esp
 8049506:	c7 44 24 08 02 00 00 	movl   $0x2,0x8(%esp)
 804950d:	00
 804950e:	c7 44 24 04 04 a8 04 	movl   $0x804a804,0x4(%esp)
 8049515:	08
 8049516:	c7 04 24 01 00 00 00 	movl   $0x1,(%esp)
 804951d:	e8 9e f4 ff ff       	call   80489c0 <__printf_chk@plt>
 8049522:	c7 04 24 01 00 00 00 	movl   $0x1,(%esp)
 8049529:	e8 d2 f3 ff ff       	call   8048900 <exit@plt>

0804952e <rio_readlineb>:
 804952e:	55                   	push   %ebp
 804952f:	89 e5                	mov    %esp,%ebp
 8049531:	57                   	push   %edi
 8049532:	56                   	push   %esi
 8049533:	53                   	push   %ebx
 8049534:	83 ec 4c             	sub    $0x4c,%esp
 8049537:	89 55 d0             	mov    %edx,-0x30(%ebp)
 804953a:	83 f9 01             	cmp    $0x1,%ecx
 804953d:	0f 86 c8 00 00 00    	jbe    804960b <rio_readlineb+0xdd>
 8049543:	89 c3                	mov    %eax,%ebx
 8049545:	89 4d c4             	mov    %ecx,-0x3c(%ebp)
 8049548:	c7 45 d4 01 00 00 00 	movl   $0x1,-0x2c(%ebp)
 804954f:	8d 78 0c             	lea    0xc(%eax),%edi
 8049552:	eb 38                	jmp    804958c <rio_readlineb+0x5e>
 8049554:	c7 44 24 08 00 20 00 	movl   $0x2000,0x8(%esp)
 804955b:	00
 804955c:	89 7c 24 04          	mov    %edi,0x4(%esp)
 8049560:	8b 03                	mov    (%ebx),%eax
 8049562:	89 04 24             	mov    %eax,(%esp)
 8049565:	e8 b6 f2 ff ff       	call   8048820 <read@plt>
 804956a:	89 43 04             	mov    %eax,0x4(%ebx)
 804956d:	85 c0                	test   %eax,%eax
 804956f:	79 14                	jns    8049585 <rio_readlineb+0x57>
 8049571:	e8 2a f4 ff ff       	call   80489a0 <__errno_location@plt>
 8049576:	83 38 04             	cmpl   $0x4,(%eax)
 8049579:	74 11                	je     804958c <rio_readlineb+0x5e>
 804957b:	90                   	nop
 804957c:	8d 74 26 00          	lea    0x0(%esi,%eiz,1),%esi
 8049580:	e9 98 00 00 00       	jmp    804961d <rio_readlineb+0xef>
 8049585:	85 c0                	test   %eax,%eax
 8049587:	74 6a                	je     80495f3 <rio_readlineb+0xc5>
 8049589:	89 7b 08


）
下面，介绍俺初步设想的新算法。拿旧算法作对比。

[b]用户类型权重[/b]
维持原有的设定

[b]用户的星级[/b]
维持原有的设定
以 S 表示星级，N 表示在【整个】评论区的发帖【总数】
S = log(N+1)

[b]每条评论的热度[/b]
维持原有的设定
以 H 表示热度，以 S 表示星级，以 U 表示用户权重
H = S * U

[b]计算每个楼层的热度【旧算法】[/b]
对每个单元的热度进行简单累加
以 H1 到 Hn 表示1到n个用户的“每贴热度”
以 C1 到 Cn 表示1到n个用户在【本楼层】的评论数
则本楼层的热度为
H1*C1 + H2*C2 + H3*C3 ......+ Hn*Cn

[b]计算每个楼层的热度【新算法】[/b]
不再进行【简单累加】，而是对【用户在本楼层的评论数】进行对数处理。
以 H1 到 Hn 表示1到n个用户的“每贴热度”
以 C1 到 Cn 表示1到n个用户在【本楼层】的评论数
则本楼层的热度为
H1*log(C1+1) + H2*log(C2+1) + H3*log(C3+1) ......+ Hn*log(Cn+1)

[b]新算法的好处[/b]
1、兼容性（延续性）
新旧算法对于大部分概念（用户权重、星级），都是相同的。

2、简单性
新算法与旧算法相比，复杂度基本一样——仅仅多了一次对数处理

3、效果
可以满足你提到的两个预设。
举例：
假设有10个活跃用户，每人的【总】发帖量都一样（比如都是 64）。
另假设有两个楼层（A & B），各自具有256个单元
楼层A 的所有单元有上述活跃用户的其中【2人】构成，每人发了 128 贴。
楼层B 的所有单元有上述活跃用户的其中【8人】构成，每人发了 32 贴。
则 楼层B 的热度会远远高于 楼层A"},"link":[{"rel":"edit","type":"application/atom+xml","href":"https://www.blogger.com/feeds/5235590154125226279/3118706532265573900/comments/default/732898279271472731?v=2"},{"rel":"self","type":"application/atom+xml","href":"https://www.blogger.com/feeds/5235590154125226279/3118706532265573900/comments/default/732898279271472731?v=2"},{"rel":"alternate","type":"text/html","href":"https://program-think.blogspot.com/2017/11/The-Story-of-Ordinary-People.html?showComment=1510047052957#c732898279271472731","title":"处在历史转折点的小人物们——回首80年代的几则往事"},{"rel":"related","type":"application/atom+xml","href":"https:


  useVirtualList,
  useWakeLock,
  useWebNotification,
  useWebSocket,
  useWebWorker,
  useWebWorkerFn,
  useWindowFocus,
  useWindowScroll,
  useWindowSize,
  watchArray,
  watchAtMost,
  watchDebounced,
  watchDeep,
  watchIgnorable,
  watchImmediate,
  watchOnce,
  watchPausable,
  watchThrottled,
  watchTriggerable,
  watchWithFilter,
  whenever
} from "./chunk-3AKN4UHO.js";
import "./chunk-XYSSNQS4.js";
export {
  DefaultMagicKeysAliasMap,
  StorageSerializers,
  TransitionPresets,
  assert,
  computedAsync as asyncComputed,
  refAutoReset as autoResetRef,
  breakpointsAntDesign,
  breakpointsBootstrapV5,
  breakpointsElement,
  breakpointsMasterCss,
  breakpointsPrimeFlex,
  breakpointsQuasar,
  breakpointsSematic,
  breakpointsTailwind,
  breakpointsVuetify,
  breakpointsVuetifyV2,
  breakpointsVuetifyV3,
  bypassFilter,
  camelize,
  clamp,
  cloneFnJSON,
  computedAsync,
  computedEager,
  computedInject,
  computedWithControl,
  containsProp,
  computedWithControl as controlledComputed,
  controlledRef,
  createEventHook,
  createFetch,
  createFilterWrapper,
  createGlobalState,
  createInjectionState,
  reactify as createReactiveFn,
  createReusableTemplate,
  createSharedComposable,
  createSingletonPromise,
  createTemplatePromise,
  createUnrefFn,
  customStorageEventName,
  debounceFilter,
  refDebounced as debouncedRef,
  watchDebounced as debouncedWatch,
  defaultDocument,
  defaultLocation,
  defaultNavigator,
  defaultWindow,
  directiveHooks,
  computedEager as eagerComputed,
  executeTransition,
  extendRef,
  formatDate,
  formatTimeAgo,
  get,
  getLifeCycleTarget,
  getSSRHandler,
  hasOwn,
  hyphenate,
  identity,
  watchIgnorable as ignorableWatch,
  increaseWithUnit,
  injectLocal,
  invoke,
  isClient,
  isDef,
  isDefined,
  isIOS,
  isObject,
  isWorker,
  makeDestructurable,
  mapGamepadToXbox360Controller,
  noop,
  normalizeDate,
  notNullish,
  now,
  objectEntries,
  objectOmit,
  objectPick,
  onClickOutside,
  onKeyDown,
  onKeyPressed,
  onKeyStroke,
  onKeyUp,
  onLongPress,
  onStartTyping,
  pausableFilter,
  watchPausable as pausableWatch,
  promiseTimeout,
  provideLocal,
  rand,
  reactify,
  reactifyObject,
  reactiveComputed,
  reactiveOmit,
  reactivePick,
  refAutoReset,
  refDebounced,
  refDefault,
  refThrottled,
  refWithControl,
  resolveRef,
  resolveUnref,
  set,
  setSSRHandler,
  syncRef,
  syncRefs,
  templateRef,
  throttleFilter,
  refThrottled as throttledRef,
  watchThrottled as throttledWatch,
  timestamp,
  toReactive,
  toRef,
  toRefs,
  toValue,
  tryOnBeforeMount,
  tryOnBeforeUnmount,
  tryOnMounted,
  tryOnScopeDispose,
  tryOnUnmounted,
  unrefElement,
  until,
  useActiveElement,
  useAnimate,
  useArrayDifference,
  useArrayEvery,
  useArrayFilter,
  useArrayFind,
  useArrayFindI


__seen_enemy_grenadier_10",
		},
		sound_events_duration = {
			0.682208,
			1.359604,
			1.154667,
			3.4225,
			1.192604,
			3.018417,
			1.656958,
			1.413333,
			1.366271,
			1.576417,
		},
		sound_event_weights = {
			0.1,
			0.1,
			0.1,
			0.1,
			0.1,
			0.1,
			0.1,
			0.1,
			0.1,
			0.1,
		},
		randomize_indexes = {},
	},
	seen_enemy_cultist_heavy_gunner = {
		randomize_indexes_n = 0,
		sound_events_n = 5,
		sound_events = {
			"loc_veteran_male_b__seen_enemy_heavy_gunner_01",
			"loc_veteran_male_b__seen_enemy_heavy_gunner_02",
			"loc_veteran_male_b__seen_enemy_heavy_gunner_03",
			"loc_veteran_male_b__seen_enemy_heavy_gunner_04",
			"loc_veteran_male_b__seen_enemy_heavy_gunner_05",
		},
		sound_events_duration = {
			0.590583,
			1.288979,
			1.184813,
			0.741583,
			3.805396,
		},
		sound_event_weights = {
			0.2,
			0.2,
			0.2,
			0.2,
			0.2,
		},
		randomize_indexes = {},
	},
	seen_enemy_cultist_shocktrooper = {
		randomize_indexes_n = 0,
		sound_events_n = 9,
		sound_events = {
			"loc_veteran_male_b__seen_enemy_shocktrooper_01",
			"loc_veteran_male_b__seen_enemy_shocktrooper_02",
			"loc_veteran_male_b__seen_enemy_shocktrooper_03",
			"loc_veteran_male_b__seen_enemy_shocktrooper_04",
			"loc_veteran_male_b__seen_enemy_shocktrooper_05",
			"loc_veteran_male_b__smart_tag_vo_enemy_cultist_shocktrooper_01",
			"loc_veteran_male_b__smart_tag_vo_enemy_cultist_shocktrooper_02",
			"loc_veteran_male_b__smart_tag_vo_enemy_cultist_shocktrooper_03",
			"loc_veteran_male_b__smart_tag_vo_enemy_cultist_shocktrooper_04",
		},
		sound_events_duration = {
			0.934688,
			1.050125,
			0.981146,
			1.212583,
			3.876208,
			1.252104,
			1.966688,
			1.381271,
			1.056708,
		},
		sound_event_weights = {
			0.1111111,
			0.1111111,
			0.1111111,
			0.1111111,
			0.1111111,
			0.1111111,
			0.1111111,
			0.1111111,
			0.1111111,
		},
		randomize_indexes = {},
	},
	seen_enemy_daemonhost = {
		randomize_indexes_n = 0,
		sound_events_n = 10,
		sound_events = {
			"loc_veteran_male_b__seen_enemy_daemonhost_01",
			"loc_veteran_male_b__seen


om.fasterxml.jackson.core.JsonGenerationException
import com.fasterxml.jackson.core.JsonGenerator
import org.springframework.boot.jackson.JsonComponent
import java.time.Instant
import com.fasterxml.jackson.databind.ser.std.StdSerializer
import kotlin.Throws
import java.io.IOException
import com.fasterxml.jackson.databind.SerializerProvider
import org.springframework.core.convert.converter.Converter
import java.lang.Exception

/**
 * A serializer used to serialize [Instant] instances using a compact format: `yyyyMMddHHmmssSSS`, always expressed in UTC.
 *
 * @see InstantToStringConverter
 */
@JsonComponent
class InstantSerializer(private val converter: Converter<Instant, String>) : StdSerializer<Instant>(
    Instant::class.java
) {
    @Throws(IOException::class)
    override fun serialize(instant: Instant?, gen: JsonGenerator, serializerProvider: SerializerProvider) {
        try {
            if (instant == null) {
                gen.writeNull()
            } else {
                gen.writeString(converter.convert(instant))
            }
        } catch (e: Exception) {
            throw JsonGenerationException("Could not serialize instant: $instant", e, gen)
        }
    }
}plugins {
    id(libs.plugins.android.library.get().pluginId)
    id(libs.plugins.kotlin.android.get().pluginId)
    alias(libs.plugins.android.junit5)
    alias(libs.plugins.detekt)
    id(libs.plugins.dokka.get().pluginId)
    `maven-publish`
    signing
}

android {

    compileSdk = 34

    namespace = "it.czerwinski.android.hilt"

    defaultConfig {
        minSdk = 16
    }

    buildTypes {
        getByName("release") {
            isMinifyEnabled = false
        }
    }

    compileOptions {
        sourceCompatibility = JavaVersion.VERSION_11
        targetCompatibility = JavaVersion.VERSION_11
    }

    kotlinOptions {
        jvmTarget = "11"
    }
}

kotlin.jvmToolchain {
    languageVersion.set(JavaLanguageVersion.of(11))
}

java.toolchain {
    languageVersion.set(JavaLanguageVersion.of(11))
}

dependencies {
    api(project(":hilt:annotations"))

    implementation(libs.hilt.android)

    testImplementation(libs.junit.jupiter.api)
    testRuntimeOnly(libs.junit.jupiter.engine)
    testImplementation(libs.mockk)
    testImplementation(libs.logback.classic)
}

detekt {
    config.from(file("../../config/detekt/detekt.yml"))
    buildUponDefaultConfig  = true
}

tasks {
    dokkaJavadoc { setUpJavadocTask(project) }
    dokkaJekyll { setUpJekyllTask(project) }

    artifacts {
        archives(createJavadocJar(dokkaJavadoc))
        archives(createSourcesJar(android.sourceSets.named("main").get().java.srcDirs))
    }
}

afterEvaluate {
    publishing {
        publications { registerAarPublication(project) }
        repositories { sonatype(project) }
    }
    signing { signAllMavenPublications(project, publishing) }
    tasks {
        getByName("generateMetadataFileForLibAarPublication")
            .dependsOn(getByName("sourcesJar"))
    }
}
/*
 * Copyright 2020 Slawomir Czerwinski
 *
 * 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.
 *


/*
 * Copyright (c) @CompanyNameMagicTag 2020-2023. All rights reserved.
 * Description: SYSTEM CLOCKS SWITCH DRIVER
 * Author: @CompanyNameTag
 * Create: 2020-7-28
 */

#ifndef CLOCKS_SWITCH_H
#define CLOCKS_SWITCH_H

#include <stdint.h>
#include "clocks_types.h"

/** @addtogroup connectivity_drivers_non_os_clocks_core
 * @{
 */

#define SYSTICK_CLK     32768ULL            // System 32k clock.
#define TCXO_1X_CLK     32000000ULL         // System TCXO 1X 32M clock.
#define TCXO_2X_CLK     64000000ULL         // System TCXO 2X 64M clock.
#define RC_CLK          27120000ULL         // System RC 27.12M clock.

/**
 * @brief  Modules in the common crg.
 */
typedef enum {
    CLOCKS_CCRG_MODULE_MCU_CORE,
    CLOCKS_CCRG_MODULE_MCU_PERP_LS,
    CLOCKS_CCRG_MODULE_MCU_PERP_UART,
    CLOCKS_CCRG_MODULE_MCU_PERP_SPI,
    CLOCKS_CCRG_MODULE_NFC_SUB,
    CLOCKS_CCRG_MODULE_I2S,
    CLOCKS_CCRG_MODULE_XIP_QSPI,
    CLOCKS_CCRG_MODULE_MAX,
} clocks_ccrg_module_t;

/**
 * @brief  The clock source of the system.
 */
typedef enum {
    CLOCKS_CLK_SRC_RC,
    CLOCKS_CLK_SRC_TCXO,
    CLOCKS_CLK_SRC_TCXO_2X,
    CLOCKS_CLK_SRC_32K,
    CLOCKS_CLK_SRC_NONE,
    CLOCKS_CLK_SRC_MAX = CLOCKS_CLK_SRC_NONE,
} clocks_clk_src_t;

/**
 * @brief clock config struct type.
 */
typedef struct {
    clocks_clk_src_t clk_src;
    uint8_t clk_div;
} clocks_clk_cfg_t;

typedef void (* clock_switch_proc_func)(void);

/**
 * @brief config common crg module clock.
 * @param module  The clock module to config clock.
 * @param clk_src The clock source selected.
 * @param clk_div The clock frenquency div number.
 */
void system_ccrg_clock_config(clocks_ccrg_module_t module, clocks_clk_src_t clk_src, uint8_t clk_div);

/**
 * @brief Get clock module frequency.
 * @param module The clock module selected.
 * @return Return the clock frequency of clock module selected.
 */
uint32_t clocks_get_module_frequency(clocks_ccrg_module_t module);

/**
  * @}
  */
#endif


rk)
		m_teamwork = parent->m_teamwork;

	if (parent->m_weaponPreferenceCount != baseline->m_weaponPreferenceCount)
	{
		m_weaponPreferenceCount = parent->m_weaponPreferenceCount;
		for( int i=0; i<parent->m_weaponPreferenceCount; ++i )
			m_weaponPreference[i] = parent->m_weaponPreference[i];
	}

	if (parent->m_cost != baseline->m_cost)
		m_cost = parent->m_cost;

	if (parent->m_skin != baseline->m_skin)
		m_skin = parent->m_skin;

	if (parent->m_difficultyFlags != baseline->m_difficultyFlags)
		m_difficultyFlags = parent->m_difficultyFlags;

	if (parent->m_voicePitch != baseline->m_voicePitch)
		m_voicePitch = parent->m_voicePitch;

	if (parent->m_reactionTime != baseline->m_reactionTime)
		m_reactionTime = parent->m_reactionTime;

	if (parent->m_attackDelay != baseline->m_attackDelay)
		m_attackDelay = parent->m_attackDelay;

	if (parent->m_teams != baseline->m_teams)
		m_teams = parent->m_teams;

	if (parent->m_voiceBank != baseline->m_voiceBank)
		m_voiceBank = parent->m_voiceBank;
}

//--------------------------------------------------------------------------------------------------------------
/**
 * The BotProfileManager defines the interface to accessing BotProfiles
 */
class BotProfileManager
{
public:
	BotProfileManager( void );
	~BotProfileManager( void );

	void Init( const char *filename, unsigned int *checksum = NULL );
	void Reset( void );

	/// given a name, return a profile
	const BotProfile *GetProfile( const char *name, BotProfileTeamType team ) const
	{
		for( BotProfileList::const_iterator iter = m_profileList.begin(); iter != m_profileList.end(); ++iter )
			if ( !stricmp( name, (*iter)->GetName() ) && (*iter)->IsValidForTeam( team ) )
				return *iter;

		return NULL;
	}

	const BotProfileList *GetProfileList( void ) const		{ return &m_profileList; }		///< return list of all profiles

	const BotProfile *GetRandomProfile( BotDifficultyType difficulty, BotProfileTeamType team ) const;			///< return random unused profile that matches the given difficulty level

	const char * GetCustomSkin( int index );				///< Returns custom skin name at a particular index
	const char * GetCustomSkinModelname( int index );		///< Returns custom skin modelname at a particular index
	const char * GetCustomSkinFname( int index );			///< Returns custom skin filename at a particular index
	int GetCustomSkinIndex( const char *name, const char *filename = NULL );	///< Looks up a custom skin index by name

	typedef std::vector<char *> VoiceBankList;
	const VoiceBankList* GetVoiceBanks() const { return &m_voiceBanks; }
	int FindVoiceBankIndex( const char *filename );		///< return index of the (custom) bot phrase db, inserting it if needed

protected:
	BotProfileList m_profileList;							///< the list of all bot profiles

	VoiceBankList m_voiceBanks;

	char *m_skins[ NumCustomSkins ];						///< Custom skin names
	char *m_skinModelnames[ NumCustomSkins ];				///< Custom skin modelnames
	char *m_skinFilenames[ NumCustomSkins ];				///< Custom skin filenames
	int m_nextSkin;											///< Next custom skin to allocate
};

/// the global singleton for accessing BotProfiles
extern BotProfileManager *TheBotProfiles;

#endif // _BOT_PROFILE_H_


p.AppendBytes(o, oTemp)
	}
	return
}

// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (z *FindNodeReq) Msgsize() (s int) {
	s = 1 + 9 + z.Envelope.Msgsize() + 3 + z.ID.Msgsize()
	return
}

// MarshalHash marshals for hash
func (z *FindNodeResp) MarshalHash() (o []byte, err error) {
	var b []byte
	o = hsp.Require(b, z.Msgsize())
	// map header, size 3
	o = append(o, 0x83)
	if oTemp, err := z.Envelope.MarshalHash(); err != nil {
		return nil, err
	} else {
		o = hsp.AppendBytes(o, oTemp)
	}
	o = hsp.AppendString(o, z.Msg)
	if z.Node == nil {
		o = hsp.AppendNil(o)
	} else {
		if oTemp, err := z.Node.MarshalHash(); err != nil {
			return nil, err
		} else {
			o = hsp.AppendBytes(o, oTemp)
		}
	}
	return
}

// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (z *FindNodeResp) Msgsize() (s int) {
	s = 1 + 9 + z.Envelope.Msgsize() + 4 + hsp.StringPrefixSize + len(z.Msg) + 5
	if z.Node == nil {
		s += hsp.NilSize
	} else {
		s += z.Node.Msgsize()
	}
	return
}

// MarshalHash marshals for hash
func (z *PingReq) MarshalHash() (o []byte, err error) {
	var b []byte
	o = hsp.Require(b, z.Msgsize())
	// map header, size 2
	o = append(o, 0x82)
	if oTemp, err := z.Envelope.MarshalHash(); err != nil {
		return nil, err
	} else {
		o = hsp.AppendBytes(o, oTemp)
	}
	if oTemp, err := z.Node.MarshalHash(); err != nil {
		return nil, err
	} else {
		o = hsp.AppendBytes(o, oTemp)
	}
	return
}

// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (z *PingReq) Msgsize() (s int) {
	s = 1 + 9 + z.Envelope.Msgsize() + 5 + z.Node.Msgsize()
	return
}

// MarshalHash marshals for hash
func (z *PingResp) MarshalHash() (o []byte, err error) {
	var b []byte
	o = hsp.Require(b, z.Msgsize())
	// map header, size 2
	o = append(o, 0x82)
	if oTemp, err := z.Envelope.MarshalHash(); err != nil {
		return nil, err
	} else {
		o = hsp.AppendBytes(o, oTemp)
	}
	o = hsp.AppendString(o, z.Msg)
	return
}

// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (z *PingResp) Msgsize() (s int) {
	s = 1 + 9 + z.Envelope.Msgsize() + 4 + hsp.StringPrefixSize + len(z.Msg)
	return
}

// MarshalHash marshals for hash
func (z *UploadMetricsReq) MarshalHash() (o []byte, err error) {
	var b []byte
	o = hsp.Require(b, z.Msgsize())
	// map header, size 2
	o = append(o, 0x82)
	if oTemp, err := z.Envelope.MarshalHash(); err != nil {
		return nil, err
	} else {
		o


.invoke(webView!!)
            }
        },
        update = {
            if (!viewModel.bundle.isEmpty) {
                webView?.restoreState(viewModel.bundle)
                viewModel.bundle.clear()
            }
        })
}
package com.flexa.spend.main.main_screen

import android.content.Context
import android.util.Log
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateListOf
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.setValue
import androidx.lifecycle.ViewModel
import androidx.lifecycle.ViewModelStore
import androidx.lifecycle.viewModelScope
import com.flexa.core.Flexa
import com.flexa.core.entity.Account
import com.flexa.core.entity.AppAccount
import com.flexa.core.entity.CommerceSession
import com.flexa.core.entity.ExchangeRate
import com.flexa.core.entity.Notification
import com.flexa.core.entity.OneTimeKey
import com.flexa.core.entity.SseEvent
import com.flexa.core.entity.error.ApiException
import com.flexa.core.shared.ApiErrorHandler
import com.flexa.core.shared.Brand
import com.flexa.core.shared.ConnectionState
import com.flexa.core.shared.FlexaConstants
import com.flexa.core.shared.SelectedAsset
import com.flexa.spend.R
import com.flexa.spend.Spend
import com.flexa.spend.containsAuthorization
import com.flexa.spend.coveredByFlexaAccount
import com.flexa.spend.domain.CommerceSessionWorker
import com.flexa.spend.domain.ISpendInteractor
import com.flexa.spend.hasAnotherAsset
import com.flexa.spend.isClosed
import com.flexa.spend.isCompleted
import com.flexa.spend.isCurrent
import com.flexa.spend.isValid
import com.flexa.spend.requiresApproval
import com.flexa.spend.toBrandSession
import com.flexa.spend.toTransaction
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.Job
import kotlinx.coroutines.delay
import kotlinx.coroutines.flow.MutableSharedFlow
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.SharingStarted
import kotlinx.coroutines.flow.StateFlow
import kotlinx.coroutines.flow.asStateFlow
import kotlinx.coroutines.flow.catch
import kotlinx.coroutines.flow.distinctUntilChanged
import kotlinx.coroutines.flow.filter
import kotlinx.coroutines.flow.flow
import kotlinx.coroutines.flow.flowOn
import kotlinx.coroutines.flow.map
import kotlinx.coroutines.flow.onEach
import kotlinx.coroutines.flow.onStart
import kotlinx.coroutines.flow.retryWhen
import kotlinx.coroutines.flow.stateIn
import kotlinx.coroutines.isActive
import kotlinx.coroutines.launch
import kotlinx.coroutines.sync.Mutex
import kotlinx.coroutines.sync.withLock

internal const val ZERO = "0"
private const val RETRY_COUNT = 5
private const val RETRY_DELAY = 1000L
private const val COMPLETE_SESSION_TIMEOUT = 60_000L

class SpendViewModel(
    private val interactor: ISpendInteractor = Spend.interactor,
    private val selectedAsset: StateFlow<SelectedAsset?> = MutableStateFlow(null),
) : ViewModel() {

    companion object {
        val eventFlow = MutableSharedFlow<Event>()
    }

    val confirmViewModelStore = ViewModelStore()
    private val _selectedBrand = MutableStateFlow<Brand?>(null)
    val selectedBrand = _selectedBrand
    private val _progressState = MutableStateFlow<String?>(null)
    val progressState = _progressState.asStateFlow()
    private val _progress = MutableStateFlow(false)
    val progress: StateFlow<Boolean> = _progress
    private val _timeout = MutableStateFlow(false)
    val timeout: StateFlow<Boolean> = _timeout
    private val _unitOfAccount = MutableStateFlow("iso4217/USD")
    val unitOfAccount = _unitOfAccount.asStateFlow()
    private


type is MFMediaType_Video, you can query the media type object for the IMFVideoMediaType interface.

Applications should avoid using this interface except when a method or function requires an IMFVideoMediaType pointer as a parameter. You can get all of the format information from a video media type through the IMFAttributes interface, which IMFMediaType inherits.

## -see-also

IMFMediaType

Media Foundation Interfaces

Media Type Attributes

Media Types
---
UID: NF:mfobjects.IMF2DBuffer2.Copy2DTo
title: IMF2DBuffer2::Copy2DTo (mfobjects.h)
description: Copies the buffer to another 2D buffer object.
helpviewer_keywords: ["Copy2DTo","Copy2DTo method [Media Foundation]","Copy2DTo method [Media Foundation]","IMF2DBuffer2 interface","IMF2DBuffer2 interface [Media Foundation]","Copy2DTo method","IMF2DBuffer2.Copy2DTo","IMF2DBuffer2::Copy2DTo","mf.imf2dbuffer2_copy2dto","mfobjects/IMF2DBuffer2::Copy2DTo"]
old-location: mf\imf2dbuffer2_copy2dto.htm
tech.root: mf
ms.assetid: 90B0CBA2-2474-4B34-8BB4-6C59C05CDD7E
ms.date: 12/05/2018
ms.keywords: Copy2DTo, Copy2DTo method [Media Foundation], Copy2DTo method [Media Foundation],IMF2DBuffer2 interface, IMF2DBuffer2 interface [Media Foundation],Copy2DTo method, IMF2DBuffer2.Copy2DTo, IMF2DBuffer2::Copy2DTo, mf.imf2dbuffer2_copy2dto, mfobjects/IMF2DBuffer2::Copy2DTo
req.header: mfobjects.h
req.include-header: Mfidl.h
req.target-type: Windows
req.target-min-winverclnt: Windows 8 [desktop apps \| UWP apps]
req.target-min-winversvr: Windows Server 2012 [desktop apps \| UWP apps]
req.kmdf-ver:
req.umdf-ver:
req.ddi-compliance:
req.unicode-ansi:
req.idl:
req.max-support:
req.namespace:
req.assembly:
req.type-library:
req.lib:
req.dll:
req.irql:
targetos: Windows
req.typenames:
req.redist:
ms.custom: 19H1
f1_keywords:
 - IMF2DBuffer2::Copy2DTo
 - mfobjects/IMF2DBuffer2::Copy2DTo
dev_langs:
 - c++
topic_type:
 - APIRef
 - kbSyntax
api_type:
 - COM
api_location:
 - mfobjects.h
api_name:
 - IMF2DBuffer2.Copy2DTo
---

# IMF2DBuffer2::Copy2DTo

## -description

Copies the buffer to another 2D buffer object.

## -parameters

### -param pDestBuffer [in]

A pointer to the IMF2DBuffer2 interface of the destination buffer.

## -returns

If this method succee


times[warm_up:],
                "server_type": benchmark.server_type.value,
                "deception_state": benchmark.deception_state.value,
                "sut_setup": benchmark.sut_setup.value,
                "filename": os.path.basename(file_name),
            }
        )

        benchmark.data_file_path

        benchmark_df.reset_index(inplace=True)
        benchmark_df.rename(columns={"index": "iteration"}, inplace=True)

        all_df.append(benchmark_df)
        if benchmark.sut_setup == SutSetup.WORST_PYTHON:
            python_df.append(benchmark_df)
        if benchmark.sut_setup == SutSetup.WORST_JAVA:
            java_df.append(benchmark_df)
        if (
            benchmark.sut_setup == SutSetup.AVG_ADMIN
            or benchmark.sut_setup == SutSetup.AVG_HOME
        ):
            teastore_df.append(benchmark_df)

    benchmark_suite.panda_warm_up_df = pd.concat(all_df, ignore_index=True)
    benchmark_suite.teastore_warm_up_df = pd.concat(teastore_df, ignore_index=True)
    benchmark_suite.python_warm_up_df = pd.concat(python_df, ignore_index=True)
    benchmark_suite.java_warm_up_df = pd.concat(java_df, ignore_index=True)
    # for TeaStore boxplot
    benchmark_suite.testore_warm_hue = benchmark_suite.teastore_warm_up_df[
        ["deception_state", "sut_setup"]
    ].apply(tuple, axis=1)

def csv_to_df(filepath: str, warm_up: int = 0) -> pd.DataFrame:
    assert filepath.endswith(".csv")

    file_path = pathlib.Path(filepath)
    response_times = pd.read_csv(file_path, header=1)["response_time"]

    assert len(response_times) == 50_000 or len(response_times) == 200_000
    assert response_times.mean() > 0 or response_times.mean() > 100

    df = pd.DataFrame.from_dict(
        {"time": response_times[warm_up:], "file_name": os.path.basename(file_path)}
    )
    df.reset_index(inplace=True)
    df.rename(columns={"index": "iteration"}, inplace=True)
    return df


imestamp: i32,
        header: AudioDataHeader,
        data: &[u8],
    ) -> Result<u64> {
        self.write_tag(timestamp, TagType::Audio, &[u8::from(header)], data)
    }
}

pub struct FlvReader<R> {
    reader: R,
}

impl<R: Read + Seek> FlvReader<R> {
    pub fn new(reader: R) -> Self {
        Self { reader }
    }

    pub fn read_header(&mut self) -> Result<Header> {
        self.reader.seek(SeekFrom::Start(0))?;

        let mut buffer = [0u8; Header::SIZE];
        self.reader.read_exact(&mut buffer)?;

        Ok(Header::try_from(buffer)?)
    }

    pub fn read_metadata(&mut self) -> Result<MetaData> {
        unimplemented!()
    }

    pub fn read_tag_header(&mut self) -> Result<TagHeader> {
        let mut buffer = [0u8; TagHeader::SIZE];
        self.reader.read_exact(&mut buffer)?;

        Ok(buffer.into())
    }

    pub fn read_video_data_header(&mut self) -> Result<VideoDataHeader> {
        let mut buffer = [0u8; 1];
        self.reader.read_exact(&mut buffer)?;

        Ok(VideoDataHeader::try_from(buffer[0])?)
    }

    pub fn read_audio_data_header(&mut self) -> Result<AudioDataHeader> {
        let mut buffer = [0u8; 1];
        self.reader.read_exact(&mut buffer)?;

        Ok(AudioDataHeader::try_from(buffer[0])?)
    }
}
<reponame>ari23/capsule
/*
* Copyright 2019 Comcast Cable Communications Management, LLC
*
* 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.
*
* SPDX-License-Identifier: Apache-2.0
*/

use super::{Batch, Disposition};
use crate::packets::Packet;

/// A batch that filters the packets of the underlying batch.
///
/// If the predicate evaluates to `false`, the packet is marked as dropped
/// and will short-circuit the remainder of the pipeline.
#[allow(missing_debug_implementations)]
pub struct Filter<B: Batch, P>
where
    P: FnMut(&B::Item) -> bool,
{
    batch: B,
    predicate: P,
}

impl<B: Batch, P> Filter<B, P>
where
    P: FnMut(&B::Item) -> bool,
{
    /// Creates a new `Filter` batch.
    #[inline]
    pub fn new(batch: B, predicate: P) -> Self {
        Filter { batch, predicate }
    }
}

impl<B: Batch, P> Batch for Filter<B, P>
where
    P: FnMut(&B::Item) -> bool,
{
    type Item = B::Item;

    #[inline]
    fn replenish(&mut self) {
        self.batch.replenish();
    }

    #[inline]
    fn next(&mut self) -> Option<Disposition<Self::Item>> {
        self.batch.next().map(|disp| {
            disp.map(|pkt| {
                if (self.pred


:url(./images/nav-min.png)}.king-layout-main .king-flexible-content{-webkit-box-flex:1;-webkit-flex:auto;-ms-flex:auto;flex:auto;height:100%}.king-layout-main .king-flexible-content .right-layout-main{height:100%;display:flex;flex-direction:column;-webkit-box-flex:1;flex:auto}.king-layout-main .king-flexible-content .right-layout-main .king-breadcrumb{margin:0 16px;margin:0 16px;-webkit-box-flex:0;flex:0 0 40px}.king-layout-main .king-flexible-content .right-layout-main .king-layout-footer{padding:8px 50px 24px;-webkit-box-flex:1;flex:0 0 50px}.king-layout-main .king-flexible-content .right-layout-content{-webkit-box-flex:1;flex:auto;overflow:auto;margin-bottom:16px;display:flex;flex-direction:column}.king-layout-main .king-flexible-content .right-layout-content .right-content-main{flex:auto;margin:0 16px;background:#FFF;padding:24px}.king-layout-main .king-flexible-content .right-layout-content .right-content-scroll{flex:auto;margin:0 16px;background:#FFF;padding:24px}.king-layout-main .king-flexible-content .right-layout-header{background:#fff;padding:0px;height:64px;line-height:64px;-webkit-box-flex:1;flex:0 0 64px}.king-layout-main .king-flexible-content .right-layout-header .king-layout-sider-trigger{display:inline-block;padding:0 16px}.king-layout-main .king-flexible-content .right-layout-header .king-layout-sider-trigger span{cursor:pointer}.king-layout-main .king-flexible-content .right-layout-header .king-layout-sider-trigger .open-icon{display:inline-block;width:22px;height:14px;background:url(../images/nav-min.png)}.king-layout-main .king-flexible-content .right-layout-header .king-layout-sider-trigger .close-icon{display:inline-block;width:22px;height:14px;background:url(../images/nav-min.png);-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.king-layout-footer{text-align:center;padding:24px 50px;color:rgba(0,0,0,0.65);font-size:12px;-webkit-box-flex:0;-webkit-flex:0 0 auto;-ms-flex:0 0 auto;flex:0 0 auto}@media (min-width: 768px){.layout-container{width:100%;padding:0}}.king-panel1{border:1px solid #ddd;border-top:none !important}.king-panel-head1{border-bottom:1px solid #e5e5e5;content:'';display:block}.king-panel-control{float:right;height:100%;position:relative}.king-panel-top1{border-top:3px solid #999999}.king-panel-top2{border-top:3px solid #4A9BFF}.king-panel-top3{border-top:3px solid #5C90D2}.king-panel-top4{border-top:3px solid #46C37B}.king-panel-top5{border-top:3px solid #F3B760}.king-panel-top6{border-top:3px solid #D26A5C}.king-no-margin{margin:0 !important}.panel-dark{border-color:#242633}.panel-dark>.panel-heading{color:#fff;background-color:#242633;border-color:#242633}.panel-dark>.panel-heading+.panel-collapse


from __future__ import print_function

from keras.models import Model
from keras.layers import Input, LSTM, Dense,TimeDistributed
import numpy as np
import keras.backend as K
def get_dataset(data_path, num_samples):
    input_texts = []
    target_texts = []

    input_characters = set()
    target_characters = set()
    with open(data_path, 'r', encoding='utf-8') as f:
        lines = f.read().split('\n')
    for line in lines[: min(num_samples, len(lines) - 1)]:
        input_text, target_text, _ = line.split('\t')
        # 用tab作用序列的开始，用\n作为序列的结束
        target_text = '\t' + target_text + '\n'

        input_texts.append(input_text)
        target_texts.append(target_text)

        for char in input_text:
            if char not in input_characters:
                input_characters.add(char)
        for char in target_text:
            if char not in target_characters:
                target_characters.add(char)
    return input_texts,target_texts,input_characters,target_characters

#------------------------------------------#
#   init初始化部分
#------------------------------------------#
# 每一次输入64个batch
batch_size = 64
# 训练一百个世代
epochs = 100
# 256维神经元
latent_dim = 256
# 一共10000个样本
num_samples = 10000

# 读取数据集
data_path = 'fra.txt'

# 获取数据集
# 其中input_texts为输入的英文字符串
# target_texts为对应的法文字符串

# input_characters用到的所有输入字符,如a,b,c,d,e,……,.,!等
# target_characters用到的所有输出字符
input_texts,target_texts,input_characters,target_characters = get_dataset(data_path, num_samples)

# 对字符进行排序
input_characters = sorted(list(input_characters))
target_characters = sorted(list(target_characters))
# 计算共用到了什么字符
num_encoder_tokens = len(input_characters)
num_decoder_tokens = len(target_characters)
# 计算出最长的序列是多长
max_encoder_seq_length = max([len(txt) for txt in input_texts])
max_decoder_seq_length = max([len(txt) for txt in target_texts])

print('一共有多少训练样本：', len(input_texts))
print('多少个英文字母：', num_encoder_tokens)
print('多少个法文字母：', num_decoder_tokens)
print('最大英文序列:', max_encoder_seq_length)
print('最大法文序列:', max_decoder_seq_length)

# 建立字母到数字的映射
input_token_index = dict(
    [(char, i) for i, char in enumerate(input_characters)])
target_token_index = dict(
    [(char, i) for i, char in enumerate(target_characters)])

#---------------------------------------------------------------------------#

#--------------------------------------#
#   改变数据集的格式
#--------------------------------------#
encoder_input_data = np.zeros(
    (len(input_texts), max_encoder_seq_length, num_encoder_tokens),
    dtype='float32')
decoder_input_data = np.zeros(
    (len(input_texts), max_decoder_seq_length, num_decoder_tokens),
    dtype='float32')
decoder_target_data = np.zeros(
    (len(input_texts), max_decoder_seq_length, num_decoder_tokens),
    dtype='float32')

for i, (input_text, target_text) in enumerate(zip(input_texts, target_texts)):
    # 为末尾加上" "空格
    for t, char in enumerate(input_text):
        encoder_input_data[i, t, input_token_index[char]] = 1.
    encoder_input_data[i, t + 1:, input_token_index[' ']] = 1.
    # 相当于前一个内容的识别结果，作为输入，传入到解码网络中
    for t, char in enumerate(target_text):
        decoder_input_data[i, t, target_token_index[char]] = 1.
        if t > 0:
            # decoder_target_data不包括第一个tab
            decoder_target_data[i, t - 1, target_token_index[char]] = 1.
    decoder_input_data[i, t + 1:, target_token_index[' ']] = 1.
    decoder_target_data[i, t:, target_token_index[' ']] = 1.
#---------------------------------------------------------------------------#

encoder_inputs = Input(shape=(None, num_encoder_tokens))

encoder_outputs, state_h, state_c = LSTM(latent_dim, return_state=True)(encoder_inputs)

encoder_states = [state_h, state_c]

decoder_inputs = Input(shape=(None, num_decoder_tokens))

decoder_outputs, _, _ = LSTM(latent_dim, return_sequences=True, return_state=True)(decoder_inputs,initial_state=encoder_states)

decoder_outputs = TimeDistributed(Dense(num_decoder_tokens, activation='softmax'))(decoder_outputs)

model = Model([encoder_inputs, decoder_inputs], decoder_outputs)

# 开始训练
model.compile(optimizer='rmsprop', loss='categorical_crossentropy',
              metrics=['accuracy'])
model.fit([encoder_input_data, decoder_input_data], decoder_target_data,
          batch_size=batch_size,
          epochs=5,
          validation_split=0.2)
# 保存模型
model.save('out.h5')
K.clear_session()

encoder_inputs = Input(shape=(None, num_encoder_tokens))

encoder_outputs, state_h, state_c = LSTM(latent_dim, return_state=T


ream())
            {
                DataContractJsonSerializer ser = new DataContractJsonSerializer(typeof (T));
                ser.WriteObject(stream, toEncode);
                return Encoding.UTF8.GetString(stream.ToArray(), 0, (int) stream.Position);
            }
        }

        internal static T DeserializeFromJson<T>(string json)
        {
            if (string.IsNullOrEmpty(json))
            {
                return default(T);
            }

            return DeserializeFromJson<T>(json.ToByteArray());
        }

        internal static T TryToDeserializeFromJson<T>(string json, RequestContext requestContext)
        {
            if (string.IsNullOrEmpty(json))
            {
                return default(T);
            }

            T result = default(T);
            try
            {
                result = DeserializeFromJson<T>(json.ToByteArray());
            }
            catch (System.Runtime.Serialization.SerializationException ex)
            {
                requestContext.Logger.WarningPii(ex);
            }

            return result;
        }

        internal static T DeserializeFromJson<T>(byte[] jsonByteArray)
        {
            if (jsonByteArray == null || jsonByteArray.Length == 0)
            {
                return default(T);
            }

            T response;
            DataContractJsonSerializer serializer = new DataContractJsonSerializer(typeof (T));
            using (MemoryStream stream = new MemoryStream(jsonByteArray))
            {
                response = ((T) serializer.ReadObject(stream));
            }

            return response;
        }
    }
}


*  FUNCTION VALUE:     void
**
**  SIDE EFFECTS:       none
**
**--
**/

void rpc__ncadg_fork_handler
(
    rpc_fork_stage_id_t stage
)
{
    /*
     * Pre-fork handlers are called in reverse order of rpc__ncadg_init().
     * Post-fork handlers are called in same order, except pkt_pool.
     *
     * First, call any module specific fork handlers.
     * Next, handle any stage-specific operations for this
     * module.
     */
    switch ((int)stage)
    {
    case RPC_C_PREFORK:
        rpc__dg_conv_fork_handler(stage);
        rpc__dg_cct_fork_handler(stage);
        rpc__dg_sct_fork_handler(stage);
        rpc__dg_ccallt_fork_handler(stage);
        rpc__dg_monitor_fork_handler(stage);
        rpc__dg_maintain_fork_handler(stage);
        rpc__dg_network_fork_handler(stage);
        rpc__dg_pkt_pool_fork_handler(stage);
        break;
    case RPC_C_POSTFORK_CHILD:
        /*
         * Clear out statistics gathering structure
         */
        /* b_z_e_r_o_((char *) &rpc_g_dg_stats, sizeof(rpc_dg_stats_t)); */

        memset( &rpc_g_dg_stats, 0, sizeof(rpc_dg_stats_t));
        /*
         * Reset Server Boot Time.
         */
        rpc_g_dg_server_boot_time = 0;
        /* fall through */
    case RPC_C_POSTFORK_PARENT:
        /* pkt_pool */
        rpc__dg_network_fork_handler(stage);
        rpc__dg_maintain_fork_handler(stage);
        rpc__dg_monitor_fork_handler(stage);
        rpc__dg_ccallt_fork_handler(stage);
        rpc__dg_sct_fork_handler(stage);
        rpc__dg_cct_fork_handler(stage);
        rpc__dg_conv_fork_handler(stage);
        /*
         * conv_fork_handler() must be called before
         * pkt_pool_fork_handler().
         */
        rpc__dg_pkt_pool_fork_handler(stage);
        break;
    }
}
#endif /* ATFORK_SUPPORTED */


to_str) {
			Some("avi") => crate::Type::Video,
			Some("jpeg") => crate::Type::Image,
			Some("jpg") => crate::Type::Image,
			Some("m4v") => crate::Type::Video,
			Some("mkv") => crate::Type::Video,
			Some("mp4") => crate::Type::Video,
			Some("png") => crate::Type::Image,
			Some("srt") => crate::Type::Subtitles,
			_ => crate::Type::Other,
		}
	}

	fn title(&self) -> String {
		self.path.file_name()
			.map(|t| t.to_string_lossy().to_string())
			.unwrap_or_else(|| "<No Title>".to_string())
	}

	fn is_dir(&self) -> bool { self.path.is_dir() }

	fn lookup(&self, id: &str) -> crate::Result<Box<crate::Object>> {
		debug_assert_eq!(self.path, self.root.path);

		let mut base = self.path.clone();
		let safepath = std::path::Path::new(id)
			.iter()
			.filter(|c| c != &"..")
			.map(|osstr| std::path::Path::new(osstr));
		base.extend(safepath);

		eprintln!("Lookup: {:?}", base);

		Self::new_boxed(self.root.clone(), base)
	}

	fn children(&self) -> crate::error::Result<Vec<Box<crate::Object>>> {
		self.path.read_dir()
			.chain_err(|| "Getting children of local directory.")?
			.map(|result| result
				.chain_err(|| "Reading next direntry")
				.and_then(|entry| {
					Self::new_boxed(self.root.clone(), entry.path())
				}))
			.collect()
	}

	fn ffmpeg_input(&self, _exec: &crate::Executors) -> crate::Result<crate::ffmpeg::Input> {
		Ok(crate::ffmpeg::Input::Uri(&self.path))
	}

	fn body(&self, _exec: &crate::Executors) -> crate::Result<std::sync::Arc<crate::Media>> {
		Ok(std::sync::Arc::new(Media{path: self.path.clone()}))
	}
}

#[derive(Debug)]
struct Media {
	path: std::path::PathBuf,
}

impl crate::Media for Media {
	fn size(&self) -> crate::MediaSize {
		let s = self.path.metadata().map(|m| m.len()).unwrap_or(0);
		crate::MediaSize {
			available: s,
			total: Some(s),
		}
	}

	fn read_range(&self, start: u64, end: u64) -> crate::ByteStream {
		let mut file = match std::fs::File::open(&self.path) {
			Ok(f) => f,
			Err(e) => {
				let e = crate::Error::with_chain(e, format!("Error opening {:?}", self.path));
				return Box::new(futures::future::err(e).into_stream())
			}
		};
		if let Err(e) = file.seek(std::io::SeekFrom::Start(start)) {
			let e = crate::Error::with_chain(e, format!("Error seeking {:?}", self.path));
			return Box::new(futures::future::err(e).into_stream())
		}
		Box::new(crate::ReadStream(file.take(end)))
	}
}

fn path_remove_prefix(full: &std::path::Path, prefix: &std::path::Path) -> std::path::PathBuf {
	osstr_remove_prefix(full.as_os_str(), prefix.as_os_str()).into()
}

fn osstr_remove_prefix(full: &std::ffi::OsStr, prefix: &std::ffi::OsStr) -> std::ffi::OsString {
	std::ffi::OsString::from_vec(full.as_bytes()[prefix.as_bytes().len()..].to_vec())
}
<reponame>make-software/dao-contracts
use casper_dao_utils::{casper_dao_macro


endif
   }

   HypreLOBPCG * lobpcg = new HypreLOBPCG(MPI_COMM_WORLD);
   lobpcg->SetNumModes(nev);
   lobpcg->SetRandomSeed(seed);
   lobpcg->SetPreconditioner(*precond);
   lobpcg->SetMaxIter(200);
   lobpcg->SetTol(1e-8);
   lobpcg->SetPrecondUsageMode(1);
   lobpcg->SetPrintLevel(1);
   lobpcg->SetMassMatrix(*M);
   lobpcg->SetOperator(*A);

   // 9. Compute the eigenmodes and extract the array of eigenvalues. Define a
   //    parallel grid function to represent each of the eigenmodes returned by
   //    the solver.
   Array<double> eigenvalues;
   lobpcg->Solve();
   lobpcg->GetEigenvalues(eigenvalues);
   ParGridFunction x(fespace);

   // 10. Save the refined mesh and the modes in parallel. This output can be
   //     viewed later using GLVis: "glvis -np <np> -m mesh -g mode".
   {
      ostringstream mesh_name, mode_name;
      mesh_name << "mesh." << setfill('0') << setw(6) << myid;

      ofstream mesh_ofs(mesh_name.str().c_str());
      mesh_ofs.precision(8);
      pmesh->Print(mesh_ofs);

      for (int i=0; i<nev; i++)
      {
         // convert eigenvector from HypreParVector to ParGridFunction
         x = lobpcg->GetEigenvector(i);

         mode_name << "mode_" << setfill('0') << setw(2) << i << "."
                   << setfill('0') << setw(6) << myid;

         ofstream mode_ofs(mode_name.str().c_str());
         mode_ofs.precision(8);
         x.Save(mode_ofs);
         mode_name.str("");
      }
   }

   // send x to the coupler
   // send data using the coupler
   CouplerClient cpl("thermalClient", MPI_COMM_WORLD);
   cpl.AddField("temp", MFEMFieldAdapter(std::string("th2flux"), *pmesh, *fespace, x));
   cpl.BeginSendPhase();
   cpl.SendField("temp");
   cpl.EndSendPhase();

   // 11. Send the solution by socket to a GLVis server.
   if (visualization)
   {
      char vishost[] = "localhost";
      int  visport   = 19916;
      socketstream mode_sock(vishost, visport);
      mode_sock.precision(8);

      for (int i=0; i<nev; i++)
      {
         if ( myid == 0 )
         {
            cout << "Eigenmode " << i+1 << '/' << nev
                 << ", Lambda = " << eigenvalues[i] << endl;
         }

         // convert eigenvector from HypreParVector to ParGridFunction
         x = lobpcg->GetEigenvector(i);

         mode_sock << "parallel " << num_procs << " " << myid << "\n"
                   << "solution\n" << *pmesh << x << flush
                   << "window_title 'Eigenmode " << i+1 << '/' << nev
                   << ", Lambda = " << eigenvalues[i] << "'" << endl;

         char c;
         if (myid == 0)
         {
            cout << "press (q)uit or (c)ontinue --> " << flush;
            cin >> c;
         }
         MPI_Bcast(&c, 1, MPI_CHAR, 0, MPI_COMM_WORLD);

         if (c != 'c')
         {
            break;
         }
      }
      mode_sock.close();
   }

   // 12. Save data in the ParaView format.
   i


limit`; hash‑chained records (`prev_hash`/`hash`) |
| Paper §4.6 Box‑1a | Smell‑tests / invalidations (CI inflation, partition flaps, Δt jitter, export breach) | `guardrails/smelltests.py` (`invalid_by_ci`, `invalid_by_ci_history`, `invalid_by_partition_flips`, `audit_chain_broken`, `audit_contains_raw_lreg_values`) | Example controls: `ldtc run --config configs/profile_negative_controller_disabled.yml` or `ldtc omega-ingress-flood --config configs/profile_negative_permanent_ex_flood.yml --mult 5 --duration 6` | `audit.jsonl` `run_invalidated` with reason (e.g., `ci_inflation`, `partition_flapping`, `dt_jitter_excess`, `raw_lreg_breach`); indicators carry `invalidated: true` |
| Paper §6.2.1 | Refusal semantics (T1–T3): survival‑bit/NMI analogue with reason codes | `arbiter/refusal.py::RefusalArbiter.decide`; `cli/main.py::omega_command_conflict` | `ldtc omega-command-conflict --config configs/profile_negative_command_conflict.yml --observe 2` | `audit.jsonl` `refusal_event` with `reason`∈{`soc_floor`,`overheat`,`M_margin`} and `trefuse_ms` (target ≤5 ms); CLI prints summary |
| App. A | Derived device‑signed indicators only (CBOR + Ed25519; Mq quantization) | `attest/indicators.py::quantize_M, build_and_sign`; `attest/exporter.py::IndicatorExporter` | Produced automatically during runs; verify with: `python scripts/verify_indicators.py` | Console: `CERT OK` line; JSONL has payload+sig; CBOR sidecar present; `audit_prev_hash` matches audit chain |
| Paper §4.1 (C/Ex); §4.6 | Deterministic C/Ex partition with hysteresis and Ω freeze | `lmeas/partition.py::PartitionManager` (growth, freeze); `cli/main.py` growth cadence + freeze during Ω | `ldtc run --config configs/profile_r0.yml` (watch flips), `ldtc omega-power-sag ...` | `audit.jsonl` `partition_flip` records (details), `omega_*_window_start/stop`; during Ω, flips prohibited (`partition_flip_during_omega` invalidation) |
| Paper §6.5 | Ω battery primitives (power‑sag; ingress flood) | `omega/power_sag.py`; `omega/ingress_flood.py`; `cli/main.py` Ω flows | `ldtc omega-power-sag --config ...`; `ldtc omega-ingress-flood --config ... --mult 3 --duration 5` | `audit.jsonl` `omega_*` events; SC1 table for sag; timeline PNG/SVG via reporter bundle |
| Methods §8.6 | Calibration to R* thresholds (Mmin, ε, τmax, σ) | `scripts/calibrate_rstar.py`; docs `METHODS.md` | `python scripts/calibrate_rstar.py --dt 0.01 --window-sec 0.25 --baseline-sec 15 --omega-trials 6 --out configs/profile_rstar.yml --summary artifacts/calibration/rstar_summary.json` | `configs/profile_rstar.yml`; `artifacts/calibration/rstar_summary.json`; indicators include `profile_id` (0=R0, 1=R*) |
| Paper Fig‑style outputs | Verification figure bundle (timeline + SC1 table) | `reporting/artifacts.py::bundle`; `reporting/timeline.py`; `reporting/tables.py` | Built automatically at end of


Elveția",
  "AE": "Emiratele Arabe Unite",
  "ER": "Eritreea",
  "EE": "Estonia",
  "ET": "Etiopia",
  "EZ": "Eurozone",
  "FJ": "Fiji",
  "PH": "Filipine",
  "FI": "Finlanda",
  "FR": "Franța",
  "GA": "Gabon",
  "GM": "Gambia",
  "GE": "Georgia",
  "GS": "Georgia de Sud și Insulele Sandwich de Sud",
  "DE": "Germania",
  "GH": "Ghana",
  "GI": "Gibraltar",
  "GR": "Grecia",
  "GD": "Grenada",
  "GL": "Groenlanda",
  "GP": "Guadelupa",
  "GU": "Guam",
  "GT": "Guatemala",
  "GG": "Guernsey",
  "GN": "Guineea",
  "GQ": "Guineea Ecuatorială",
  "GW": "Guineea-Bissau",
  "GY": "Guyana",
  "GF": "Guyana Franceză",
  "HT": "Haiti",
  "HN": "Honduras",
  "IN": "India",
  "ID": "Indonezia",
  "AC": "Insula Ascension",
  "CX": "Insula Christmas",
  "IM": "Insula Man",
  "NF": "Insula Norfolk",
  "AX": "Insulele Åland",
  "IC": "Insulele Canare",
  "BQ": "Insulele Caraibe Olandeze",
  "KY": "Insulele Cayman",
  "CC": "Insulele Cocos (Keeling)",
  "CK": "Insulele Cook",
  "FK": "Insulele Falkland",
  "FO": "Insulele Feroe",
  "UM": "Insulele Îndepărtate ale S.U.A.",
  "MP": "Insulele Mariane de Nord",
  "MH": "Insulele Marshall",
  "PN": "Insulele Pitcairn",
  "SB": "Insulele Solomon",
  "TC": "Insulele Turks și Caicos",
  "VI": "Insulele Virgine Americane",
  "VG": "Insulele Virgine Britanice",
  "JO": "Iordania",
  "IQ": "Irak",
  "IR": "Iran",
  "IE": "Irlanda",
  "IS": "Islanda",
  "IL": "Israel",
  "IT": "Italia",
  "JM": "Jamaica",
  "JP": "Japonia",
  "JE": "Jersey",
  "KZ": "Kazahstan",
  "KG": "Kârgâzstan",
  "KE": "Kenya",
  "KI": "Kiribati",
  "XK": "Kosovo",
  "KW": "Kuweit",
  "LA": "Laos",
  "LS": "Lesotho",
  "LV": "Letonia",
  "LB": "Liban",
  "LR": "Liberia",
  "LY": "Libia",
  "LI": "Liechtenstein",
  "LT": "Lituania",
  "LU": "Luxemburg",
  "MG": "Madagascar",
  "MW": "Malawi",
  "MY": "Malaysia",
  "MV": "Maldive",
  "ML": "Mali",
  "MT": "Malta",
  "MA": "Maroc",
  "MQ": "Martinica",
  "MR": "Mauritania",
  "MU": "Mauritius",
  "YT": "Mayotte",
  "MX": "Mexic",
  "FM": "Micronezia",
  "MC": "Monaco",
  "MN": "Mongolia",
  "MS": "Montse


) {
        "use strict";
        e.exports = {
            activeTransferGuildCardBorder: "activeTransferGuildCardBorder_c101c5",
            content: "content_c3731e",
            error: "error__59c81",
            guildCard: "guildCard__0f077",
            image: "image__13761",
            pendingCancellation: "pendingCancellation__94d02",
            pendingCancellationIcon: "pendingCancellationIcon__56dce",
            pendingCancellationMessage: "pendingCancellationMessage_c17fde",
            transferFromGuildCard: "transferFromGuildCard__65828",
            transferGuildCardHeader: "transferGuildCardHeader__2e143",
            transferToGuildCard: "transferToGuildCard__094cf"
        }
    },
    637217: function(e) {
        "use strict";
        e.exports = {
            confirmImage: "confirmImage_dc066d",
            modal: "modal_ff9ffb",
            modalCloseButton: "modalCloseButton__690b8",
            quantitySelectorBody: "quantitySelectorBody__88648",
            quantitySelectorDescription: "quantitySelectorDescription_b92251",
            quantitySelectorHeader: "quantitySelectorHeader_ff7ef5",
            quantitySelectorLabel: "quantitySelectorLabel__2e137",
            quantitySelectorWrapper: "quantitySelectorWrapper__3072e",
            selectContent: "selectContent__851fd",
            successAnimation: "successAnimation_c75027",
            successBody: "successBody_ca953d",
            tierPill: "tierPill_df8be7",
            transferConfirmImage: "transferConfirmImage__409e4"
        }
    },
    426305: function(e) {
        "use strict";
        e.exports = {
            animated: "animated__426b2",
            audio: "audio__9b4ef",
            customRoleIcon: "customRoleIcon_ec5f3c",
            customization: "customization_f24132",
            emoji: "emoji__68973",
            icon: "icon_e38167",
            privateThread: "privateThread_fe06ba",
            soundboard: "soundboard__1cd1c",
            stage: "stage__2d19a",
            sticker: "sticker_c587ff",
            stream: "stream_cfeace",
            unlocked: "unlocked_d6f5f7",
            upload: "upload__5192e",
            vanity: "vanity__41c2c"
        }
    },
    656682: function(e) {
        "use strict";
        e.exports = {
            boostedGuildIconGem: "boostedGuildIconGem_fdf316",
            iconBackgroundTierNone: "iconBackgroundTierNone__38426",
            iconBackgroundTierOne: "iconBackgroundTierOne__019cb",
            iconBackgroundTierThree: "iconBackgroundTierThree__6ad51",
            iconBackgroundTierTwo: "iconBackgroundTierTwo__4f3b5",
            iconTierNone: "iconTierNone__2faa9",
            iconTierOne: "iconTierOne__30c58",
            iconTierThree: "iconTierThree_c2300b",
            iconTierTwo: "iconTierTwo__624e0"
        }
    },
    683932: function(e) {
        "use strict";
        e.exports = {
            body: "body_e195f3",
            cancelImage: "cancelImage_e8de43",
            invoiceCancelRow: "invoiceCancelRow__6ff3e",
            invoiceTable: "invoiceTable_b792cd"
        }
    },
    584545: function(e) {
        "use strict";
        e.exports = {
            container: "container_ef12c9",
            manageSubscription: "manageSubscription__97


  if (response.AccessToken != null)
        {
            _logger.LogTrace("Access token issued for {clientId} / {subjectId}: {token}", clientId, subjectId, response.AccessToken);
        }
    }
}


.8465458 9,16.184533 9,16.5832262 L9,19.8838284 C9,21.0588151 9.94362076,22.0000003 11.1368421,22 Z M15.4360359,18.0415188 C15.6058921,18.207555 15.7713785,18.2856362 16.0559686,18.2856858 C16.3276207,18.285733 16.4789523,18.2266414 16.6333557,18.0825466 C16.6563414,18.0610955 16.7369872,17.98107 16.7334109,17.9845609 L19.2071937,15.6657377 C19.584617,15.2973741 19.7215097,14.7966164 19.3735993,14.402234 C19.0157057,13.996535 18.4815807,14.0506368 18.129876,14.3939455 L16.9544902,15.5287719 C16.9544903,13.3894058 16.9544903,9.73898596 16.9544903,9.73898596 C16.9544903,9.33961654 16.4942283,9 16.0559962,9 C15.6254906,9 15.2024435,9.33734101 15.2024435,9.73898596 L15.2107657,15.5798937 C14.7462322,15.1823106 13.8171652,14.3871437 13.8171652,14.3871437 C13.4662227,14.0441179 12.8996867,13.9822679 12.5672952,14.4094769 C12.2509307,14.816087 12.4424738,15.2106594 12.9064851,15.6635866 L15.3807419,17.9866292 C15.4094478,18.0152081 15.4248639,18.0305981 15.4360359,18.0415188 Z",id:"Save2"})))))])}var a=n(0);r.displayName="arrowDown",r.defaultProps={width:"14px",height:"13px",viewBox:"0 0 14 13",version:"1.1"},e.exports=r,r.default=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(6),o=r(a),i=n(1),l=r(i),s=n(7),d=r(s),c=n(2),u=r(c),p=n(3),f=r(p),h=n(22),m=r(h),b=n(2124),g=r(b),v=n(2125),y=r(v),k=n(2126),x=r(k),_=n(2127),w=r(_),M=n(2128),E=r(M),C=n(2129),S=r(C),T=n(2130),O=r(T),D=n(2131),L=r(D),P=n(2132),A=r(P),N=n(2133),z=r(N),R=n(2134),I=r(R),j=n(2135),F=r(j),Y=n(2136),B=r(Y),H=n(2137),W=r(H),U=n(2138),V=r(U),G=n(2139),K=r(G),$=n(2140),q=r($),X=n(2141),Z=r(X),J=n(2142),Q=r(J),ee=n(2143),te=r(ee),ne=n(2144),re=r(ne),ae=n(2145),oe=r(ae),ie=n(2146),le=r(ie),se=n(2147),de=r(se),ce=n(2148),ue=r(ce),pe=n(2149),fe=r(pe),he=n(2150),me=r(he),be=n(2151),ge=r(be),ve=n(2152),ye=r(ve),ke=n(2153),xe=r(ke),_e=n(2154),we=r(_e),Me=n(2155),Ee=r(Me),Ce=n(2156),Se=r(Ce),Te=n(2157),


Options {
  target?: Target,
  mode?: Mode,
}

export default class Env {
  target: Target;
  mode: Mode;

  constructor({target = 'client', mode = 'production'}: Options) {
    this.target = target;
    this.mode = mode;
  }

  get isClient() { return this.target === 'client'; }
  get isServer() { return this.target === 'server'; }
  get isProduction() { return this.mode === 'production'; }
  get isDevelopment() { return this.mode === 'development'; }
  get isTest() { return this.mode === 'test'; }
  get isCI() { return process.env.CI === 'true'; }
  get isDevelopmentClient() { return this.isDevelopment && this.isClient; }
  get isProductionClient() { return this.isProduction && this.isClient; }
  get isTestClient() { return this.isTest && this.isClient; }
  get isDevelopmentServer() { return this.isDevelopment && this.isServer; }
  get isProductionServer() { return this.isProduction && this.isServer; }
  get isTestServer() { return this.isTest && this.isServer; }
}
import {statSync, writeFileSync, mkdirSync, appendFileSync} from "fs";
import {resolve} from "path";
import {dateFormat} from "./";
import {EOL} from "os";

class Log {
    private static instance: Log;
    private readonly logFile: string = resolve("./logs");

    static getInstance() {
        if (!Log.instance) Log.instance = new Log();
        return Log.instance;
    }

    constructor() {
        try {
            statSync(this.logFile);
        } catch (e) {
            mkdirSync(this.logFile, {recursive: true});
        }
    }

    info(...val: any): void {
        let data = "", date = dateFormat();
        val.forEach((e: any) => {
            try {
                if (typeof e === "object") data += JSON.stringify(e);
                else data += e.toString();
            } catch (e) {
                data += e;
            }
        });
        try {
            statSync(this.logFile + `/info-${date}.log`);
        } catch (e) {
            writeFileSync(this.logFile + `/info-${date}.log`, "");
        }
        appendFileSync(this.logFile + `/info-${date}.log`, `[${dateFormat('yy-MM-dd hh:mm:ss')}] [info] ${data}${EOL}`);
    }

    error(...val: any): void {
        let data = "", date = dateFormat();
        val.forEach((e: any) => {
            try {
                if (typeof e === "object") data += JSON.stringify(e);
                else data += e.toString();
            } catch (e) {
                data += e;
            }
        });
        try {
            statSync(this.logFile + `/error-${date}.log`);
        } catch (e) {
            writeFileSync(this.logFile + `/error-${date}.log`, "");
        }
        appendFileSync(this.logFile + `/error-${date}.log`, `[${dateFormat('yy-MM-dd hh:mm:ss')}] [error] ${data}${EOL}`);
    }
}

export default Log.getInstance();type BaseValue = object | string | number | boolean | ((...args: Value[]) => Value);
interface ValueObject {
  [prop: string]: BaseValue | ValueObject | Array<BaseValue | ValueObject>;
}
export type Value = BaseValue | ValueObject | Array<BaseValue | ValueObject>;
import {Node, TextHandler} from "../../../../src";

const handler = new TextHandler;

const fixedProvider: Array<[number, number, boolean, string]> = [
  [3.7979, 2, false, "3.79"],
  [4000.424242, 4, true,


width: 100rem;
}
html {
    --pst-font-size-base: 16px;
}
/* Override some aspects of the pydata-sphinx-theme */

:root {
  /* Use softer blue from bootstrap's default info color */
  --pst-color-info: 23, 162, 184;
}

table {
  width: auto; /* Override fit-content which breaks Styler user guide ipynb */
}

/* Main index page overview cards */

.intro-card {
  padding: 30px 10px 20px 10px;
}

.intro-card .sd-card-img-top {
  margin: 10px;
  height: 52px;
  background: none !important;
}

.intro-card .sd-card-title {
  color: var(--pst-color-warning);
  font-size: var(--pst-font-size-h5);
  padding: 1rem 0rem 0.5rem 0rem;
}

.intro-card .sd-card-footer {
  border: none !important;
}

.intro-card .sd-card-footer p.sd-card-text {
  max-width: 220px;
  margin-left: auto;
  margin-right: auto;
}

.intro-card .sd-btn-secondary {
  background-color: #6c757d !important;
  border-color: #6c757d !important;
}

.intro-card .sd-btn-secondary:hover {
  background-color: #5a6268 !important;
  border-color: #545b62 !important;
}

.card, .card img {
  background-color: var(--pst-color-background);
}
/* Thumbs */

.fancybox-thumbs {
    background: #ddd;
    bottom: 0;
    display: none;
    margin: 0;
    -webkit-overflow-scrolling: touch;
    -ms-overflow-style: -ms-autohiding-scrollbar;
    padding: 2px 2px 4px 2px;
    position: absolute;
    right: 0;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    top: 0;
    width: 212px;
    z-index: 99995;
}

.fancybox-thumbs-x {
    overflow-x: auto;
    overflow-y: hidden;
}

.fancybox-show-thumbs .fancybox-thumbs {
    display: block;
}

.fancybox-show-thumbs .fancybox-inner {
    right: 212px;
}

.fancybox-thumbs__list {
    font-size: 0;
    height: 100%;
    list-style: none;
    margin: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 0;
    position: absolute;
    position: relative;
    white-space: nowrap;
    width: 100%;
}

.fancybox-thumbs-x .fancybox-thumbs__list {
    overflow: hidden;
}

.fancybox-thumbs-y .fancybox-thumbs__list::-webkit-scrollbar {
    width: 7px;
}

.fancybox-thumbs-y .fancybox-thumbs__list::-webkit-scrollbar-track {
    background: #fff;
    border-radius: 10px;
    box-shadow: inset 0 0 6px rgba(0, 0, 0, .3);
}

.fancybox-thumbs-y .fancybox-thumbs__list::-webkit-scrollbar-thumb {
    background: #2a2a2a;
    border-radi


a()
		slot0.viewComponent:updateSkillListPanel()
		slot0.viewComponent:updateMain()

		if slot0.viewComponent:isAllSkillLock() then
			slot0.viewComponent:tryLearnSkillAfterFirstUnlock()
		end

		slot0.viewComponent:closeUnlockSkillPanel()
	elseif slot2 == GAME.TACTICS_META_SWITCH_SKILL_DONE then
		slot4 = slot3.skillID

		slot0.viewComponent:switchTacticsSkillData(slot4, slot3.leftSwitchCount)
		slot0.viewComponent:updateExpPanel()
		slot0.viewComponent:updateTaskPanel(slot4)
		slot0.viewComponent:updateSkillTFLearning()
	elseif slot2 == GAME.TACTICS_META_LEVELUP_SKILL_DONE then
		slot4 = slot3.skillID

		slot0.viewComponent:updateData()
		slot0.viewComponent:levelupTacticsSkillData(slot4, slot3.leftSwitchCount)
		slot0.viewComponent:updateTacticsRedTag()
		slot0.viewComponent:updateSkillListPanel()
		slot0.viewComponent:updateTaskPanel(slot4)
	end
end

function slot0.requestTacticsData(slot0)
	slot0:sendNotification(GAME.TACTICS_META_INFO_REQUEST, {
		id = slot0.contextData.shipID
	})
end

return slot0


       int tEval = transposition.eval;
            if (transposition.flag == 1) return tEval;
            else if (transposition.flag == 2 && tEval >= beta) return tEval;
            else if (transposition.flag == 3 && tEval <= alpha) return tEval;
        }

        if (lboard.IsDraw()) return 0;
        if (lboard.IsInCheckmate()) return lboard.PlyCount - 99999;

        int eval = Evaluate(color);

        if (!lboard.IsInCheck() && !qsearch && depth <= 3 && eval >= beta + 200 * depth) return eval;

        Move[] moves = lboard.GetLegalMoves(qsearch && !lboard.IsInCheck());
        if (moves.Length == 0) return eval;
        if (qsearch)
        {
            if (eval >= beta) return beta;
            alpha = eval > alpha ? eval : alpha;
        }

        int[] movesScores = new int[moves.Length];

        for (int i = 0; i < moves.Length; i++)
        {
            Move move = moves[i];
            int score = 0;
            int movePieceType = (int)move.MovePieceType;
            int capturePieceType = (int)move.CapturePieceType;
            int promotionType = (int)move.PromotionPieceType;

            Transposition tt = TTable[lboard.ZobristKey & entries];
            if (tt.move == move && tt.hash == lboard.ZobristKey)
                score += 100000;

            if (move == killerMoves[lboard.ZobristKey & 1023]) score += 10000;

            if (capturePieceType != 0) score = 100 * pieceValues[capturePieceType] - pieceValues[movePieceType];

            if (move.IsPromotion) score += pieceValues[promotionType] - 100;
            else if (movePieceType == 6) score -= 10;
            else
            {
                if (lboard.SquareIsAttackedByOpponent(move.TargetSquare))
                {
                    score -= pieceValues[movePieceType];
                }
            }

            movesScores[i] = score;
        }

        Array.Sort(movesScores, moves);
        Array.Reverse(moves);

        Move bestMove = moves[0];

        for (int i = 0; i < moves.Length; i++)
        {
            Move move = moves[i];
            lboard.MakeMove(move);
            int val = -Search(depth - 1, -beta, -alpha, -color);
            lboard.UndoMove(move);
            if (val > bestEval)
            {
                bestEval = val;
                bestMove = move;
            }

            alpha = Math.Max(alpha, bestEval);
            if (alpha >= beta) break;
        }

        if (!qsearch)
        {
            transposition.eval = bestEval;
            transposition.hash = lboard.ZobristKey;
            transposition.move = bestMove;
            if (bestEval < sAlpha)
                transposition.flag = 3;
            else if (bestEval >= beta)
            {
                transposition.flag = 2;
                if (!bestMove.IsCapture)
                    killerMoves[depth] = bestMove;
            }
            else transposition.flag = 1;
            transposition.depth = depth;
        }

        return bestEval;
    }

    int GetPstVal(int psq)
    {
        return (int)(((psts[psq / 10]


t8_t raw[10];
    size_t len;

    len = hex_string_to_octet_string(raw, hex1, strlen(hex1));
    printf("computed length: %zu\tstring: %s\n", len,
           octet_string_hex_string(raw, len / 2));
    printf("expected length: %zu\tstring: %s\n", strlen(hex1), hex1);

    len = hex_string_to_octet_string(raw, hex2, strlen(hex2));
    printf("computed length: %zu\tstring: %s\n", len,
           octet_string_hex_string(raw, len / 2));
    printf("expected length: %d\tstring: %s\n", 16, "0123456789abcdef");
}

void print_string(char *s)
{
    size_t i;
    printf("%s\n", s);
    printf("strlen(s) = %zu\n", strlen(s));
    printf("{ ");
    for (i = 0; i < strlen(s); i++) {
        printf("0x%x, ", s[i]);
        if (((i + 1) % 8) == 0) {
            printf("\n   ");
        }
    }
    printf("}\n");
}

void test_bswap(void)
{
    uint32_t x = 0x11223344;
    uint64_t y = 0x1122334455667788LL;

    printf("before: %0x\nafter:  %0x\n", x, (unsigned int)be32_to_cpu(x));
    printf("before: %0llx\nafter:  %0llx\n", (unsigned long long)y,
           (unsigned long long)be64_to_cpu(y));

    y = 1234;

    printf("1234: %0llx\n", (unsigned long long)y);
    printf("as octet string: %s\n", octet_string_hex_string((uint8_t *)&y, 8));
    y = be64_to_cpu(y);
    printf("bswapped octet string: %s\n",
           octet_string_hex_string((uint8_t *)&y, 8));
}

void test_set_to_zero(void)
{
#define BUFFER_SIZE (16)
    uint8_t buffer[BUFFER_SIZE];
    size_t i;

    for (i = 0; i < BUFFER_SIZE; i++) {
        buffer[i] = i & 0xff;
    }
    printf("Buffer before: %s\n", octet_string_hex_string(buffer, BUFFER_SIZE));
    octet_string_set_to_zero(buffer, BUFFER_SIZE);
    printf("Buffer after: %s\n", octet_string_hex_string(buffer, BUFFER_SIZE));
    for (i = 0; i < BUFFER_SIZE; i++) {
        if (buffer[i]) {
            fprintf(stderr,
                    "Buffer contents not zero at position %zu (is %d)\n", i,
                    buffer[i]);
            abort();
        }
    }
#undef BUFFER_SIZE
}


"a"};
    EXPECT_TRUE(IsInWhitelist("a", whitelist));

    END_TEST;
}

bool JoinPathNoTrailingSlash() {
    BEGIN_TEST;

    EXPECT_STR_EQ("a/b/c/d", JoinPath("a/b", "c/d").c_str());

    END_TEST;
}

bool JoinPathTrailingSlash() {
    BEGIN_TEST;

    EXPECT_STR_EQ("a/b/c/d", JoinPath("a/b/", "c/d").c_str());

    END_TEST;
}

bool JoinPathAbsoluteChild() {
    BEGIN_TEST;

    EXPECT_STR_EQ("a/b/c/d", JoinPath("a/b/", "/c/d").c_str());

    END_TEST;
}

bool MkDirAllTooLong() {
    BEGIN_TEST;

    char too_long[PATH_MAX + 2];
    memset(too_long, 'a', PATH_MAX + 1);
    too_long[PATH_MAX + 1] = '\0';
    EXPECT_EQ(ENAMETOOLONG, MkDirAll(too_long));

    END_TEST;
}
bool MkDirAllAlreadyExists() {
    BEGIN_TEST;

    ScopedTestDir test_dir;
    const fbl::String already = JoinPath(test_dir.path(), "already");
    const fbl::String exists = JoinPath(already, "exists");
    ASSERT_EQ(0, mkdir(already.c_str(), 0755));
    ASSERT_EQ(0, mkdir(exists.c_str(), 0755));
    EXPECT_EQ(0, MkDirAll(exists));

    END_TEST;
}
bool MkDirAllParentAlreadyExists() {
    BEGIN_TEST;

    ScopedTestDir test_dir;
    const fbl::String parent = JoinPath(test_dir.path(), "existing-parent");
    const fbl::String child = JoinPath(parent, "child");
    ASSERT_EQ(0, mkdir(parent.c_str(), 0755));
    EXPECT_EQ(0, MkDirAll(child));
    struct stat s;
    EXPECT_EQ(0, stat(child.c_str(), &s));

    END_TEST;
}
bool MkDirAllParentDoesNotExist() {
    BEGIN_TEST;

    ScopedTestDir test_dir;
    const fbl::String parent = JoinPath(test_dir.path(), "not-existing-parent");
    const fbl::String child = JoinPath(parent, "child");
    struct stat s;
    ASSERT_NE(0, stat(parent.c_str(), &s));
    EXPECT_EQ(0, MkDirAll(child));
    EXPECT_EQ(0, stat(child.c_str(), &s));

    END_TEST;
}

bool WriteSummaryJSONSucceeds() {
    BEGIN_TEST;

    // A reasonable guess that the function won't output more than this.
    std::unique_ptr<char[]> buf(new char[kOneMegabyte]);
    FILE* buf_file = fmemopen(buf.get(), kOneMegabyte, "w");
    fbl::Vector<std::unique_ptr<Result>> results;
    results.push_back(std::make_unique<Result>("/a", SUCCESS, 0, 10));
    results.push_back(std::make_unique<Result>("b", FAILED_TO_LAUNCH, 0, 0));
    ASSERT_EQ(0, WriteSummaryJSON(results, "output.txt", "/tmp/file_path",
                                  buf_file));
    fclose(buf_file);
    // We don't have a JSON parser in zircon right now, so just hard-code the
    // expected output.
    const char kExpectedJSONOutput[] = R"({
  "tests": [
    {
      "name": "/a",
      "output_file": "a/output.txt",
      "result": "PASS",
      "duration_milliseconds": 10
    },
    {
      "name": "b",


vec1_to_vec1`](fn.vec1_to_vec1.html)
/// * [`vec2_to_vec1`](fn.vec2_to_vec1.html)
/// * [`vec3_to_vec1`](fn.vec3_to_vec1.html)
/// * [`vec1_to_vec2`](fn.vec1_to_vec2.html)
/// * [`vec1_to_vec3`](fn.vec1_to_vec3.html)
/// * [`vec1_to_vec4`](fn.vec1_to_vec4.html)
pub fn vec4_to_vec1<N: Scalar + Copy>(v: &TVec4<N>) -> TVec1<N> {
    TVec1::new(v.x)
}

/// Creates a 2D vector from another vector.
///
/// Missing components, if any, are set to 0.
///
/// # See also:
///
/// * [`vec3_to_vec2`](fn.vec3_to_vec2.html)
/// * [`vec4_to_vec2`](fn.vec4_to_vec2.html)
/// * [`vec2_to_vec1`](fn.vec2_to_vec1.html)
/// * [`vec2_to_vec2`](fn.vec2_to_vec2.html)
/// * [`vec2_to_vec3`](fn.vec2_to_vec3.html)
/// * [`vec2_to_vec4`](fn.vec2_to_vec4.html)
pub fn vec1_to_vec2<N: Number>(v: &TVec1<N>) -> TVec2<N> {
    TVec2::new(v.x, N::zero())
}

/// Creates a 2D vector from another vector.
///
/// # See also:
///
/// * [`vec1_to_vec2`](fn.vec1_to_vec2.html)
/// * [`vec3_to_vec2`](fn.vec3_to_vec2.html)
/// * [`vec4_to_vec2`](fn.vec4_to_vec2.html)
/// * [`vec2_to_vec1`](fn.vec2_to_vec1.html)
/// * [`vec2_to_vec2`](fn.vec2_to_vec2.html)
/// * [`vec2_to_vec3`](fn.vec2_to_vec3.html)
/// * [`vec2_to_vec4`](fn.vec2_to_vec4.html)
pub fn vec2_to_vec2<N: Scalar + Copy>(v: &TVec2<N>) -> TVec2<N> {
    *v
}

/// Creates a 2D vector from another vector.
///
/// # See also:
///
/// * [`vec1_to_vec2`](fn.vec1_to_vec2.html)
/// * [`vec4_to_vec2`](fn.vec4_to_vec2.html)
/// * [`vec2_to_vec1`](fn.vec2_to_vec1.html)
/// * [`vec2_to_vec2`](fn.vec2_to_vec2.html)
/// * [`vec2_to_vec3`](fn.vec2_to_vec3.html)
/// * [`vec2_to_vec4`](fn.vec2_to_vec4.html)
pub fn vec3_to_vec2<N: Scalar + Copy>(v: &TVec3<N>) -> TVec2<N> {
    TVec2::new(v.x, v.y)
}

/// Creates a 2D vector from another vector.
///
/// # See also:
///
/// * [`vec1_to_vec2`](fn.vec1_to_vec2.html)
/// * [`vec3_to_vec2`](fn.vec4_to_vec2.html)
/// * [`vec2_to_vec1`](fn.vec2_to_vec1.html)
/// * [`vec2_to_vec2`](fn.vec2_to_vec2.html)
/// * [`v


            MineralCostFormula.Clear();
            foreach (var item in designSD.MineralCostFormula)
            {
                MineralCostFormula.Add(new MineralFormulaVM(ParentVM, _staticData, item));
            }
            MineralCostFormula.Add(new MineralFormulaVM(ParentVM, _staticData));

            ResearchCostFormula = designSD.ResearchCostFormula;
            CreditCostFormula = designSD.CreditCostFormula;
            BuildPointCostFormula = designSD.BuildPointCostFormula;

            foreach (object value in Enum.GetValues(typeof(ComponentMountType)))
            {
                var currentValue = (ComponentMountType)value;
                if ((currentValue & designSD.MountType) != 0)
                {
                    MountType[currentValue] = true;
                }
            }
        }

    }
}


       }
        goto DefaultWndProc;
    }

    return CallWindowProc(oldWndProc, WindowHandle, uMsg, wParam, lParam);

DefaultWndProc:
    return DefWindowProc(WindowHandle, uMsg, wParam, lParam);
}

LRESULT CALLBACK PhpThemeWindowACLUISubclassProc(
    _In_ HWND WindowHandle,
    _In_ UINT uMsg,
    _In_ WPARAM wParam,
    _In_ LPARAM lParam
)
{
    WNDPROC oldWndProc;

    if (!(oldWndProc = PhGetWindowContext(WindowHandle, LONG_MAX)))
        return FALSE;

    switch (uMsg)
    {
    case WM_VSCROLL:
    case WM_MOUSEWHEEL:
        InvalidateRect(WindowHandle, NULL, FALSE);
        break;
    case WM_NOTIFY:
        {
            LPNMHDR data = (LPNMHDR)lParam;

            if (data->code == NM_CUSTOMDRAW)
            {
                LPNMCUSTOMDRAW customDraw = (LPNMCUSTOMDRAW)lParam;
                WCHAR className[MAX_PATH];

                if (customDraw->dwDrawStage == CDDS_PREPAINT && !(customDraw->uItemState & CDIS_FOCUS))
                {
                    if (!GetClassName(customDraw->hdr.hwndFrom, className, RTL_NUMBER_OF(className)))
                        className[0] = UNICODE_NULL;
                    if (PhEqualStringZ(className, WC_BUTTON, FALSE))
                    {
                        HDC hdc = GetDC(WindowHandle);
                        RECT rectControl = customDraw->rc;
                        PhInflateRect(&rectControl, 2, 2);
                        MapWindowRect(customDraw->hdr.hwndFrom, WindowHandle, &rectControl);
                        FillRect(hdc, &rectControl, PhThemeWindowBackgroundBrush);   // fix the annoying white border left by the previous active control
                        ReleaseDC(WindowHandle, hdc);
                    }
                }
            }
        }
        break;
    case WM_NCDESTROY:
        {
            PhRemoveWindowContext(WindowHandle, LONG_MAX);
            SetWindowLongPtr(WindowHandle, GWLP_WNDPROC, (LONG_PTR)oldWndProc);
        }
        break;
    case WM_ERASEBKGND:
        {
            HDC hdc = (HDC)wParam;
            RECT clientRect;

            GetClipBox(hdc, &clientRect);
            FillRect(hdc, &clientRect, PhThemeWindowBackgroundBrush);
        }
        return TRUE;
    case WM_CTLCOLORSTATIC:
        {
            HDC hdc = (HDC)wParam;

            SetBkMode(hdc, TRANSPARENT);
            SetTextColor(hdc, PhThemeWindowTextColor);
            return (INT_PTR)PhThemeWindowBackgroundBrush;
        }
    }
    return CallWindowProc(oldWndProc, WindowHandle, uMsg, wParam, lParam);
}


01D1390  48 00 12 55 */	bl SetTRKConnected
/* 801D5734 001D1394  38 61 00 08 */	addi r3, r1, 8
/* 801D5738 001D1398  4B E3 23 8D */	bl OSReport
/* 801D573C 001D139C  7F C3 F3 78 */	mr r3, r30
/* 801D5740 001D13A0  48 00 12 45 */	bl SetTRKConnected
/* 801D5744 001D13A4  38 60 00 00 */	li r3, 0
lbl_801D5748:
/* 801D5748 001D13A8  2C 03 00 00 */	cmpwi r3, 0
/* 801D574C 001D13AC  40 82 00 14 */	bne lbl_801D5760
/* 801D5750 001D13B0  88 1D 00 00 */	lbz r0, 0(r29)
/* 801D5754 001D13B4  3B BD 00 01 */	addi r29, r29, 1
/* 801D5758 001D13B8  7C 1E 07 75 */	extsb. r30, r0
/* 801D575C 001D13BC  40 82 FF C0 */	bne lbl_801D571C
lbl_801D5760:
/* 801D5760 001D13C0  80 01 00 24 */	lwz r0, 0x24(r1)
/* 801D5764 001D13C4  83 E1 00 1C */	lwz r31, 0x1c(r1)
/* 801D5768 001D13C8  83 C1 00 18 */	lwz r30, 0x18(r1)
/* 801D576C 001D13CC  83 A1 00 14 */	lwz r29, 0x14(r1)
/* 801D5770 001D13D0  7C 08 03 A6 */	mtlr r0
/* 801D5774 001D13D4  38 21 00 20 */	addi r1, r1, 0x20
/* 801D5778 001D13D8  4E 80 00 20 */	blr


e static final String RECENT_TO_TIME = "time";
        //**********************              最近消息表的各项列名//

        /**
         * 创建最近会话消息的消息表的SQL语句
         */
        private static final String SQL_CREATE_RECENT_MESSAGE_TABLE = "CREATE TABLE IF NOT EXISTS " + RECENT_TABLE_NAME + " ("
                + RECENT_ID + " INTEGER PRIMARY KEY AUTOINCREMENT, "//
                + RECENT_TO_ID + " TEXT, "// 对方id
                + RECENT_TO_NAME + " TEXT, "// 对方的用户名
                + RECENT_TO_NICK + " TEXT, "// 对方的昵称
                + RECENT_TO_AVATAR + " TEXT, "// 对方的头像
                + RECENT_TO_CONTENT + " TEXT NOT NULL, "// 消息体
                + RECENT_TO_TYPE + " INTEGER, "// 类型--目前只有文本类型
                + RECENT_TO_TIME + " TEXT); ";

        //        ****************************  好友表的各项列名//
        private static final String CONTACTS_TABLE_NAME = "contacts";
        private static final String CONTACTS_NAME = "name";
        private static final String CONTACTS_NICK = "nick";
        private static final String CONTACTS_AVATAR = "avatar";
        private static final String CONTACTS_IS_BLACK = "isBlack";
        private static final String CONTACTS_UID = "uid";
        private static final String CONTACTS_SEX = "sex";
        private static final String CONTACTS_SORT_KEY = "sort_key";
        private static final String CONTACTS_INSTALLATION_ID = "installationId";
        private static final String CONTACTS_SIGNATURE = "signature";
        private static final String CONTACTS_PHONE = "phone";
        private static final String CONTACTS_EMAIL = "email";
        private static final String CONTACTS_BIRTHDAY = "birthday";
        private static final String CONTACTS_ADDRESS = "address";
        //        ****************************  好友表的各项列名//

        private static final String CONTACTS_LOCATION = "location";
        /**
         * 创建好友表的SQL语句
         */
        private static final String SQL_CREATE_CONTACTS_TABLE = "CREATE TABLE "
                + CONTACTS_TABLE_NAME + " ("
                + CONTACTS_NAME + " TEXT, "
                + CONTACTS_SIGNATURE + " TEXT, "
                + CONTACTS_NICK + " TEXT, "
                + CONTACTS_AVATAR + " TEXT, "
                + CONTACTS_IS_BLACK + " TEXT, "
                + CONTACTS_SEX + " TEXT, "
                + CONTACTS_INSTALLATION_ID + " TEXT, "
                + CONTACTS_SORT_KEY + " TEXT, "
                + CONTACTS_PHONE + " TEXT, "
                + CONTACTS_EMAIL + " TEXT, "
                + CONTACTS_ADDRESS + " TEXT, "
                + CONTACTS_BIRTHDAY + " TEXT, "
                + CONTACTS_LOCATION + " TEXT, "
                + CONTACTS_UID + " TEXT);";

        //        ************************好友请求表的各项列名//
        private static final String INVITATION_TABLE_NAME = "invitation";
        private static final String INVITATION_UID = "uid";
        private static final String INVITATION_NAME = "name";
        private static final String INVITATION_NICK = "nick";
        private static final String INVITATION_AVATAR = "avatar";
        private static final String INVITATION_TIME = "time";
        private static final String INVITATION_STATUS =


lestBoundsWidth = _smallestBoundsWidth * (1.0f - SkinWidth);
			_squaredBoundsWidth = _smallestBoundsWidth * _smallestBoundsWidth;
		}

		/// <summary>
		/// On Enable, we initialize our last frame position
		/// </summary>
		protected virtual void OnEnable()
		{
			_positionLastFrame = this.transform.position;
		}

		/// <summary>
		/// On fixedUpdate, checks the last movement and if needed casts a ray to detect obstacles
		/// </summary>
		protected virtual void FixedUpdate()
		{
			_lastMovement = this.transform.position - _positionLastFrame;
			_lastMovementSquared = _lastMovement.sqrMagnitude;

			// if we've moved further than our bounds, we may have missed something
			if (_lastMovementSquared > _squaredBoundsWidth)
			{
				float movementMagnitude = Mathf.Sqrt(_lastMovementSquared);

				// we cast a ray backwards to see if we should have hit something
				RaycastHit hitInfo;
				if (Physics.Raycast(_positionLastFrame, _lastMovement, out hitInfo, movementMagnitude, ObstaclesLayerMask.value))
				{
					if (!hitInfo.collider)
					{
						return;
					}

					if (hitInfo.collider.isTrigger)
					{
						hitInfo.collider.SendMessage("OnTriggerEnter", _collider);
					}

					if (!hitInfo.collider.isTrigger)
					{
						this.gameObject.SendMessage("PreventedCollision3D", hitInfo, SendMessageOptions.DontRequireReceiver);
						if (RepositionRigidbody)
						{
							var hitLayer = hitInfo.collider.gameObject.layer;
							if (0 != (1 << hitLayer & RepositionRigidbodyLayerMask))
							{
								this.transform.position = hitInfo.point - (_lastMovement / movementMagnitude) * _adjustedSmallestBoundsWidth;
								_rigidbody.position = hitInfo.point - (_lastMovement / movementMagnitude) * _adjustedSmallestBoundsWidth;
							}
						}
					}
				}
			}
			_positionLastFrame = this.transform.position;
		}
	}
}


BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

using System;
using System.Threading;
using System.Threading.Tasks;

namespace EventFlow.Commands
{
    public interface ICommandScheduler
    {
        Task ScheduleAsync(
            ICommand command,
            DateTimeOffset runAt,
            CancellationToken cancellationToken);

        Task ScheduleAsync(
            ICommand command,
            TimeSpan delay,
            CancellationToken cancellationToken);
    }
}


	this._emitter.setPosition(this.destX, this.destY);
			this._emitter.setSpeed(200);
			this._emitter.setLifespan(200);
			this._emitter.setBlendMode(Phaser.BlendModes.ADD);
		}
	}

  changedPhaserScene(scene: Phaser.Scene, oldScene?: Phaser.Scene): void {
    console.log('Changed phaser scene: adding');
		this._scene = scene;
		this.changeSprite();
		this.changeParticleEffect();
  }

  addedToNode(node: DataNode): void {
    // TODO set data of node (initx, inity, image);
    this.syncWithNode(node);
    if (this._sprite) {
      this._sprite.x = this.node.data('x');
      this._sprite.y = this.node.data('y');
    }
  }

  removedFromNode(node: DataNode): void {
  }

  private interpolating: boolean = false;
  // for how many ms interpolation is already running
  private updateTime: number = 0;
  // number of ms the interpolation needs (set to server default)
  private interpolationDelta: number = 50;
  private destPos: Phaser.Math.Vector2 = new Phaser.Math.Vector2();
  private srcPos: Phaser.Math.Vector2 = new Phaser.Math.Vector2();

  // store positions before interpolation to detect position changes
  private destX: number;
  private destY: number;

  private startPos: Phaser.Math.Vector2 = new Phaser.Math.Vector2();

  doInterpolation(delta: number) {
    // move entity to node position
    let interpolationProgress: number;
    //console.log('this update time before %s', this.updateTime);
    //console.log('interpolation time: %s, delta: %s', this.updateTime, delta);
    if (this.updateTime > this.interpolationDelta) {
      this.updateTime = this.interpolationDelta;
      interpolationProgress = 1;
      this.interpolating = false;
    } else {
      interpolationProgress = this.updateTime / this.interpolationDelta;
      //console.log('interpolation progress: %s', interpolationProgress);
    }
    this.srcPos.copy(this.startPos);
    //this.destPos.set(this.destX, this.destY);
    //console.log('from (%s,%s) to (%s,%s)', this.srcPos.x, this.srcPos.y, this.destPos.x, this.destPos.y);
    //this.destPos.subtract(this.srcPos).scale(interpolationProgress).add(this.srcPos);
    this.srcPos.lerp(this.destPos, interpolationProgress);
    //console.log('after(%s,%s)', this.destPos.x, this.destPos.y);

    //console.log('diff: %s', (this.destPos.x - this.srcPos.x));
    //console.log('inte: %s', ((this.destPos.x - this.srcPos.x) * interpolationProgress));
    //this.srcPos.x = (this.destPos.x - this.srcPos.x) * interpolationProgress + this.srcPos.x;
    //this.srcPos.x = this.srcPos.x * interpolationProgress + this.destPos.x * (1 - interpolationProgress);
    //console.log('x interpol: %s, %s', this.srcPos.x, 1 - interpolationProgress);

    // move sprite to calculated position
    this._sprite.x = this.srcPos.x;
    this._sprite.y = this.srcPos.y;
    this.updateTime += delta;
  }

  updateRole(delta: number, node: DataNode): void {
		if (this._emitter) {
			this._emitter.setPosition(this.node.data('x'), this.node.data('y'));
		}
    if (this._sprite) {
      // test if node position has changed


2 -125 73 -19 10 -71 41 -115 67 -44 27 -145 85 -225 131 -80 45 -163 94 -185 109 -22 14 -89 55 -150 89 -60 34 -117 66 -125 71 -460 275 -561 328 -685 364 -124 36 -308 36 -439 0z"/> </g> </svg>');
  mask: url('data:image/svg+xml;utf8,<svg version="1.0" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 789.000000 900.000000"><g transform="translate(0.000000,900.000000) scale(0.100000,-0.100000)" stroke="none"> <path d="M3716 8924 c-126 -35 -103 -23 -529 -273 -76 -44 -140 -81 -143 -81 -3 0 -17 -8 -32 -19 -28 -19 -312 -185 -490 -287 -57 -33 -114 -66 -127 -74 -12 -8 -54 -32 -92 -54 -37 -21 -88 -51 -113 -66 -25 -15 -99 -59 -165 -97 -196 -115 -688 -405 -720 -424 -16 -10 -39 -23 -50 -28 -11 -5 -72 -40 -135 -78 -63 -38 -137 -82 -165 -97 -27 -16 -90 -52 -140 -81 -49 -29 -160 -94 -245 -143 -189 -111 -217 -130 -303 -212 -142 -135 -226 -298 -250 -486 -17 -137 -15 -3796 2 -3897 25 -145 104 -304 210 -419 106 -114 110 -117 578 -387 70 -41 198 -115 283 -166 85 -50 186 -109 223 -131 76 -43 71 -40 275 -160 78 -46 208 -123 290 -170 81 -48 163 -97 182 -109 48 -31 242 -142 280 -161 8 -4 38 -22 65 -39 58 -37 142 -86 229 -133 34 -18 78 -45 99 -58 22 -14 130 -78 240 -141 111 -64 219 -127 241 -140 88 -56 306 -179 371 -209 112 -53 211 -74 344 -74 187 0 312 37 498 148 54 32 186 110 293 172 107 63 269 157 360 211 91 53 211 123 268 155 57 32 113 66 126 74 13 8 50 30 82 49 414 241 611 357 724 424 74 44 164 96 200 117 36 20 153 89 260 152 107 63 245 143 305 178 61 35 128 74 150 88 22 13 92 54 155 90 147 85 170 102 253 181 100 96 174 211 219 341 48 138 48 136 48 2062 0 1874 -2 1950 -41 2073 -39 119 -105 236 -180 318 -86 94 -151 145 -289 224 -193 111 -424 245 -580 338 -85 51 -184 108 -220 129 -36 20 -72 41 -80 46 -22 14 -317 188 -365 215 -22 12 -67 39 -100 58 -33 20 -82 49 -110 65 -27 16 -90 53 -140 82 -49 29 -106 62 -125 73 -19 10 -71 41 -115 67 -44 27 -145 85 -225 131 -80 45 -163 94 -185 109 -22 14 -89 55 -150 89 -60 34 -117 66 -125 71 -460 275 -561 328 -685 364 -124 36 -308 36 -439 0z"/> </g> </svg>');
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center center;
  mask-position: center center;
  -webkit-mask-size: auto;
  mask-size: auto;
  transition: all 500ms ease;
}
.instructor-card-three__image__inner {
  position: relative;
  overflow: hidden;
  z-index: 2;
  -webkit-mask: url('data:image/svg+xml;utf8,<svg version="1.0" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 720.000000 819.000000"><g transform="translate(0.000000,819.000000) scale(0.100000,-0.100000)" stroke="none"> <path d="M3395 8135 c-22 -8 -50 -15 -62 -15 -12 0 -34 -6 -50 -14 -15 -8 -55