y/layer-4-load-balancing/)
* [Балансировка нагрузки уровня 7](https://www.nginx.com/resources/glossary/layer-7-load-balancing/)
* [Конфигурация ELB listener](http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-listener-config.html)

## Реверс-прокси (веб-сервер)

  Источник: Википедия

Реверсивный прокси — это веб-сервер, который централизует внутренние сервисы и предоставляет унифицированные интерфейсы для внешних пользователей. Запросы от клиентов перенаправляются на сервер, который может их обработать, после чего реверсивный прокси возвращает ответ сервера клиенту.

Дополнительные преимущества включают:

* **Повышенная безопасность** — скрытие информации о сервере бэкенда, черные списки IP, ограничение количества соединений на клиента
* **Повышенная масштабируемость и гибкость** — клиенты видят только IP-адрес реверсивного прокси, что позволяет масштабировать серверы или менять их конфигурацию
* **SSL-терминация** — дешифрование входящих запросов и шифрование ответов сервера, чтобы серверы бэкенда не выполняли эти ресурсоемкие операции
    * Устраняет необходимость установки [X.509 сертификатов](https://en.wikipedia.org/wiki/X.509) на каждом сервере
* **Сжатие** — сжатие ответов сервера
* **Кэширование** — возврат ответа для кэшированных запросов
* **Статический контент** — обслуживание статического контента напрямую
    * HTML/CSS/JS
    * Фотографии
    * Видео
    * и др.

### Балансировщик нагрузки vs реверсивный прокси

* Использование балансировщика нагрузки полезно, когда у вас несколько серверов. Часто балансировщики маршрутизируют трафик на набор серверов, выполняющих одну функцию.
* Реверсивные прокси могут быть полезны даже при наличии только одного веб-сервера или сервере приложений, открывая преимущества, описанные в предыдущем разделе.
* Решения такие, как NGINX и HAProxy, поддерживают как прокс


           continue
        name = canonicalize_name(name)
        other.discard(name)
        target.add(name)

def fmt_ctl_formats(fmt_ctl, canonical_name):
    result = set(["binary", "source"])
    if canonical_name in fmt_ctl.only_binary:
        result.discard('source')
    elif canonical_name in fmt_ctl.no_binary:
        result.discard('binary')
    elif ':all:' in fmt_ctl.only_binary:
        result.discard('source')
    elif ':all:' in fmt_ctl.no_binary:
        result.discard('binary')
    return frozenset(result)

def fmt_ctl_no_binary(fmt_ctl):
    fmt_ctl_handle_mutual_exclude(
        ':all:', fmt_ctl.no_binary, fmt_ctl.only_binary)

def fmt_ctl_no_use_wheel(fmt_ctl):
    fmt_ctl_no_binary(fmt_ctl)
    warnings.warn(
        '--no-use-wheel is deprecated and will be removed in the future. '
        ' Please use --no-binary :all: instead.', RemovedInPip10Warning,
        stacklevel=2)

Search = namedtuple('Search', 'supplied canonical formats')
"""Capture key aspects of a search.

:attribute supplied: The user supplied package.
:attribute canonical: The canonical package name.
:attribute formats: The formats allowed for this package. Should be a set
    with 'binary' or 'source' or both in it.
"""


 22852
c3RyZQ== 22853
ZW5zb3I= 22854
IDE4NQ== 22855
QWR2 22856
IT8= 22857
IFJldmVs 22858
ZW1pYQ== 22859
IEh1bGs= 22860
IGNlbGVicmF0aW9ucw== 22861
IFNvdQ== 22862
cmF1ZA== 22863
IEtsZWlu 22864
IHVucmVhbA== 22865
Y29udGV4dA== 22866
IHBhcnRuZXJzaGlwcw== 22867
IGFkb3B0aW5n 22868
dGljYWw= 22869
IHNwbGFzaA== 22870
IEhlemJvbGxhaA== 22871
Y2F0ZWdvcnk= 22872
Y3ljbG9w 22873
eHRvbg== 22874
IERvdA== 22875
dXJkeQ== 22876
dHo= 22877
IGVudmVsb3Bl 22878
IE5M 22879
4pU= 22880
IHdoZXJlaW4= 22881
U3BlYw== 22882
MTg0 22883
IHRlbGV2 22884
YWxpYXRpb24= 22885
IG15dGhz 22886
5bA= 22887
IHJpZ29yb3Vz 22888
IGNvbW11bmljYXRpbmc= 22889
IG9ic2VydmVy 22890
IHJlaGU= 22891
IFdhc2g= 22892
IGFwb2xvZ2l6ZWQ= 22893
IFRpbg== 22894
IGV4cGVuZGl0dXJlcw== 22895
d29ya2Vycw== 22896
ZG9jdW1lbnQ= 22897
IGhlc2l0YXRl 22898
IExlbmlu 22899
IHVucHJlZGljdGFibGU= 22900
IHJlbmV3YWw= 22901
Y2xlcg== 22902
b2tpYQ== 22903
IENPTlQ= 22904
IHBvc3RzZWFzb24= 22905
VG9rZW5z 22906
IGV4YWNlcmI= 22907
IGJldHRpbmc= 22908
IDE0Nw== 22909
IGVsZXZhdGlvbg== 22910
V29vZA== 22911
IFNvbG9tb24= 22912
MTk0 22913
MDA0 22914
b3V0cHV0 22915
IHJlZHVuZA== 22916
IE11bWJhaQ== 22917
IHBI 22918
IHJlcHJvZHVjZQ== 22919
IER1cmF0aW9u 22920
TUFY 22921
IGJvZw== 22922
Q0JT 22923
IEJhbGFuY2U= 22924
IFNndA== 22925
IFJlY2VudA== 22926
IGNk 22927
IHBvcHBlZA== 22928
IGluY29tcGV0 22929
cHJvcA== 22930
YXlhbg== 22931
Z3V5 22932
UGFjaWZpYw== 22933
IHR5cg== 22934
IHt7 22935
IE15c3RpYw== 22936
IERhbmE= 22937
IG1hc3R1cmI= 22938
IGdlb21ldHJ5 22939
w6I= 22940
IENvcnJlY3Q= 22941
IHRyYWplY3Rvcnk= 22942
IGRpc3RyYWN0ZWQ= 22943
IGZvbw== 22944
IFdlbHNo 22945
THVj 22946
bWl0aA== 22947
IHJ1Z2J5 22948
IHJlc3BpcmF0b3J5 22949
IHRyaWFuZ2xl 22950
IDIxNQ== 22951
IHVuZGVyZ3JhZHV


updates"))

        // Device2's upload may have processed conflicts - upload resolved results
        assert(device2.uploadWithLogging("conflict resolution results"))

        // Download all changes
        device1.downloadWithLogging("get all peer updates")
        device2.downloadWithLogging("get all peer updates")

        // Detailed field-level validation
        println("\n🔍 DETAILED FIELD-LEVEL VALIDATION")

        var allFieldsConsistent = true
        testRecords.forEach { recordId ->
            val user1 = device1.getUser(recordId)
            val user2 = device2.getUser(recordId)

            if (user1 != user2) {
                println("❌ FIELD MISMATCH for record $recordId:")
                println("  Device1: $user1")
                println("  Device2: $user2")

                if (user1?.second != user2?.second) {
                    println("  NAME FIELD MISMATCH: '${user1?.second}' vs '${user2?.second}'")
                }
                if (user1?.third != user2?.third) {
                    println("  EMAIL FIELD MISMATCH: '${user1?.third}' vs '${user2?.third}'")
                }
                allFieldsConsistent = false
            } else {
                println("✅ Record $recordId: fields consistent")
            }
        }

        // Overall validation
        val overallConsistent = device1.validateDataConsistency(device2, "comprehensive field validation")

        if (!allFieldsConsistent || !overallConsistent) {
            println("❌ COMPREHENSIVE VALIDATION FAILED - Data inconsistencies detected!")

            // Print detailed sync state for debugging
            device1.printSyncTablesState("DEVICE1 FINAL STATE")
            device2.printSyncTablesState("DEVICE2 FINAL STATE")

            throw AssertionError("Field-level data inconsistencies detected - this reproduces the HeavyConcurrentSyncTest issue!")
        }

        println("✅ STEP 13 PASSED: All field-level validations consistent")
    }

    @Test
    fun step14_mixed_operations_race_conditions() = runBlockingTest {
        println("\n🧪 STEP 14: Mixed operations with controlled race conditions")
        println("Testing INSERT/UPDATE/DELETE combinations with overlapping timeframes")

        val userId = "user-mixed-" + UUID.randomUUID().toString().substring(0, 8)
        val device1 = createTestClient(userId, "device1")
        val device2 = createTestClient(userId, "device2")

        device1.bootstrap()
        device2.bootstrap()

        // === SCENARIO 1: INSERT vs UPDATE race condition ===
            println("\n📋 SCENARIO 1: Device A inserts while Device B tries to update")

            val recordId1 = UUID.randomUUID().toString()

            // Device1: Insert new record
            device1.insertUser(recordId1, "New User", "new@device1.com")
            println("Device1: Inserted record $recordId1")

            // Device2: Try to update the same record (should fail initially)
            device2.updateUser(recordId1, "Updated by Device2", "updated@device2.com")
            println("Device2: Attempted to update record $recordId1")

            // Sync and validate
            assert(device1.uploadWithLogging("INSERT operation"))
            assert(device2.uploadWithLogging("UPDATE on non-existent record"))

            // Device2's upload may have processed conflicts - upload resolved results
            assert(device2.uploadWithLogging("conflict resolution results"))

            device1.downloadWithLogging("get peer updates")
            device2.downloadWithLogging("get peer updates")

            assert(device1.validateDataConsistency(device2, "INSERT vs UPDATE race"))

            // === SCENARIO 2: DELETE vs UPDATE race condition ===
            println("\n📋 SCENARIO 2: Device A deletes while Device B tries to update")

            val recordId2 = UUID.randomUUID().toString()

            // Setup: Both devices have the record


otstrap Reference
          Icon Reference

JavaScript

          JavaScript Reference
          HTML DOM Reference
          jQuery Reference
          jQuery Mobile Reference
          AngularJS Reference

XML

          XML Reference
          XML Http Reference
          XSLT Reference
          XML Schema Reference

Charsets

          HTML Character Sets
          HTML ASCII
          HTML ANSI
          HTML Windows-1252
          HTML ISO-8859-1
          HTML Symbols
          HTML UTF-8

Server Side

          PHP Reference
          SQL Reference
          ASP Reference

      ×

HTML/CSS

          HTML Examples
          CSS Examples
          W3.CSS Examples
          Bootstrap Examples

JavaScript

          JavaScript Examples
          HTML DOM Examples
          jQuery Examples
          jQuery Mobile Examples
          AngularJS Examples
          AJAX Examples

XML

          XML Examples
          <a href="/xml/xsl_examples.asp"


--light-hl-5);
    --hl-6: var(--light-hl-6);
    --code-background: var(--light-code-background);
}

body.dark {
    --hl-0: var(--dark-hl-0);
    --hl-1: var(--dark-hl-1);
    --hl-2: var(--dark-hl-2);
    --hl-3: var(--dark-hl-3);
    --hl-4: var(--dark-hl-4);
    --hl-5: var(--dark-hl-5);
    --hl-6: var(--dark-hl-6);
    --code-background: var(--dark-code-background);
}

.hl-0 { color: var(--hl-0); }
.hl-1 { color: var(--hl-1); }
.hl-2 { color: var(--hl-2); }
.hl-3 { color: var(--hl-3); }
.hl-4 { color: var(--hl-4); }
.hl-5 { color: var(--hl-5); }
.hl-6 { color: var(--hl-6); }
pre, code { background: var(--code-background); }
/* Layout */
.codecolorer { padding: 5px; text-align: left; }
code.codecolorer { padding: 2px; }
.codecolorer-container { margin-bottom: 10px; text-align: left; }
.codecolorer, .codecolorer *, .codecolorer-container, .codecolorer-container * { font: 0.9rem/1.3rem Monaco, Lucida Console, monospace; -webkit-text-size-adjust: 100% }

.codecolorer-container table { border: 0px; margin: 0px; width: 100%; direction: ltr; }
.codecolorer-container table td { margin: 0px; padding: 0px; border: 0px; width: auto; }
.codecolorer-container table td.line-numbers { padding: 5px; text-align: right; width: 1%; direction: ltr; }
.codecolorer-container table td.line-numbers div { min-width: 23px; }

/* Layout styles */
.codecolorer-container { border: 1px solid #9F9F9F; }
.codecolorer-container table td.line-numbers { color: #888888; background-color: #EEEEEE; border-right: 1px solid #9F9F9F; }
.codecolorer-noborder, .codecolorer-noborder table td.line-numbers { border: 0px; }

/* "Slush & Poppies" color scheme (default) */
.codecolorer-container, .codecolorer { color: #000000; background-color: #F1F1F1; }
/* Comment */
.codecolorer .co0, .codecolorer .co1, .codecolorer .co2, .codecolorer .co3, .codecolorer .co4, .codecolorer .coMULTI { color: #406040; font-style: italic; }
/* Constant */
.codecolorer .nu0, .codecolorer .re3 { color: #0080A0; }
/* String */
.codecolorer .st0, .codecolorer .st_h, .codecolorer .es0, .codecolorer .es1 { color: #C03030; }
/* Entity */
.codecolorer .me1, .codecolorer .me2 { color: #0080FF; }
/* Keyword */
.codecolorer .kw1, .codecolorer .kw2, .codecolorer .sy1 { color: #2060A0; }
/* Storage */
.codecolorer .kw3, .codecolorer .kw4, .codecolorer .kw5, .codecolorer .re2 { color: #008080; }
/* Variable */
.codecolorer .re0, .codecolorer .re1 {


{
		this.regex = reg;
	}

	validate(matches: RegExpExecArray) : boolean {
		return true;
	}

	apply(source: ISource, matches: RegExpExecArray) : Array<IToken> {
		source.source = source.source.substring(matches[0].length);
		return [{openTag: '
\n'}];
	}
}

class HeadingBlock implements ITokenRegex {
	regex: RegExp;
	parseType = TokenParseType.Block;
	priority = 3;

	constructor(reg: RegExp) {
		this.regex = reg;
	}

	validate(matches: RegExpExecArray) : boolean {
		return true;
	}

	apply(source: ISource, matches: RegExpExecArray) : Array<IToken> {
		source.source = source.source.substring(matches[0].length);
		return [{openTag: '<h' + matches[1].length + '>',
			    closeTag: '</h' + matches[1].length + '>\n',
			    text: {source: matches[2]}}];
	}
}

class LHeading implements ITokenRegex {
	regex: RegExp;
	parseType = TokenParseType.Block;
	priority = 4;

	constructor(reg: RegExp) {
		this.regex = reg;
	}

	validate(matches: RegExpExecArray) : boolean {
		return true;
	}

	apply(source: ISource, matches: RegExpExecArray) : Array<IToken> {
		source.source = source.source.substring(matches[0].length);
		return [{openTag: '<h' + (matches[2] === '=' ? 1 : 2) + '>',
			closeTag: '</h' + (matches[2] === '=' ?  1 : 2) + '>\n',
			text: {source: matches[1]}}]
	}
}

class Paragraph implements ITokenRegex {
	regex: RegExp;
	parseType = TokenParseType.Block;
	priority = 5;

	constructor(reg: RegExp) {
		this.regex = reg;
	}

	validate(matches: RegExpExecArray) : boolean {
		return true;
	}

	apply(source: ISource, matches: RegExpExecArray) : Array<IToken> {
		source.source = source.source.substring(matches[0].length);
		return [{openTag: '
',
			closeTag: '
\n',
			text: {source: matches[1].charAt(matches[1].length - 1) === '\n'
				? matches[1].slice(0, -1)
				: matches[1]}}]
	}
}

class Text implements ITokenRegex {
	regex: RegExp;
	parseType = TokenParseType.Block;
	priority = 6;

	constructor(reg: RegExp) {
		this.regex = reg;
	}

	validate(matches: RegExpExecArray) : boolean {
		return true;
	}

	apply(source: ISource, matches: RegExpExecArray) : Array<IToken> {
		source.source = source.source.substring(matches[0].length);
		return [{text: {source: matches[0]}}]
	}
}

class BlockQuote implements ITokenRegex {
	regex: RegExp;
	parseType = TokenParseType.Block;
	priority = 7;

	constructor(reg: RegExp) {
		this.regex = reg;
	}

	validate(matches: RegExpExecArray) : boolean {
		return true;
	}

	apply(source: ISource, matches: RegExpExecArray) : Array<IToken> {
		source.source = source.source.substring(matches[0].length);
		return [{
					openTag: '
\n',
					text: {source: matches[0].replace(/^ *> ?/gm, '')},
					processBlock: true
				},
				{
					closeTag: '
\n'
				}]
	}
}

class InlineText implements ITokenRegex {
	regex: RegExp;
	parseType = TokenParseType.Inline;
	priority = 10;

	constructor(reg: RegExp) {
		this.regex = reg;
	}

	validate(matches: RegExpExecArray) : boolean {
		return true;
	}

	apply(source: ISource, matches: Reg


collapse.collapse{height:auto!important;overflow:visible!important}}
// Mixins
// --------------------------

@mixin fa-icon {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: inline-block;
  font-style: normal;
  font-variant: normal;
  font-weight: normal;
  line-height: 1;
}

@mixin fa-icon-rotate($degrees, $rotation) {
  -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=#{$rotation})";
  transform: rotate($degrees);
}

@mixin fa-icon-flip($horiz, $vert, $rotation) {
  -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=#{$rotation}, mirror=1)";
  transform: scale($horiz, $vert);
}

// Only display content to screen readers. A la Bootstrap 4.
//
// See: http://a11yproject.com/posts/how-to-hide-content/

@mixin sr-only {
  border: 0;
  clip: rect(0, 0, 0, 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
}

// Use in conjunction with .sr-only to only display content when it's focused.
//
// Useful for "Skip to main content" links; see http://www.w3.org/TR/2013/NOTE-WCAG20-TECHS-20130905/G1
//
// Credit: HTML5 Boilerplate

@mixin sr-only-focusable {
  &:active,
  &:focus {
    clip: auto;
    height: auto;
    margin: 0;
    overflow: visible;
    position: static;
    width: auto;
  }
}
/* Font Awesome uses the Unicode Private Use Area (PUA) to ensure screen
readers do not read off random characters that represent icons */

.#{$fa-css-prefix}-500px:before { content: fa-content($fa-var-500px); }
.#{$fa-css-prefix}-accessible-icon:before { content: fa-content($fa-var-accessible-icon); }
.#{$fa-css-prefix}-accusoft:before { content: fa-content($fa-var-accusoft); }
.#{$fa-css-prefix}-acquisitions-incorporated:before { content: fa-content($fa-var-acquisitions-incorporated); }
.#{$fa-css-prefix}-ad:before { content: fa-content($fa-var-ad); }
.#{$fa-css-prefix}-address-book:before { content: fa-content($fa-var-address-book); }
.#{$fa-css-prefix}-address-card:before { content: fa-content($fa-var-address-card); }
.#{$fa-css-prefix}-adjust:before { content: fa-content($fa-var-adjust); }
.#{$fa-css-prefix}-adn:before { content: fa-content($fa-var-adn); }
.#{$fa-css-prefix}-adversal:before { content: fa-content($fa-var-adversal); }
.#{$fa-css-prefix}-affiliatetheme:before { content: fa-content($fa-var-affiliatetheme); }
.#{$fa-css-prefix}-air-freshener:before { content: fa-content($fa-var-air-freshener); }
.#{$fa-css-prefix}-airbnb:before { content: fa-content($fa-var-airbnb); }
.#{$fa-css-prefix}-algolia:before { content: fa-content($fa-var-algolia); }
.#{$fa-css-prefix}-align-center:before { content: fa-content($fa-var-align-center); }
.#{$fa-css-prefix}-align-justify:before { content: fa-content($fa-var-align-ju


n isSelf(key: String, readOnlyArgs: List<Var<*>>, normalArgs: List<Var<*>>): Boolean {
        if (this.identifier == key && this.normalParams.size == normalArgs.size && this.readOnlyParams.size == readOnlyArgs.size) {
            if (this.normalParams.size == 0 && this.readOnlyParams.size == 0) {
                return true
            }
            var hasFoundFunc = true
            //参数比对
            for (i in normalArgs.indices) {
                if (!field.getVar(normalParams[i].identifier)!!.canAssignedBy(normalArgs[i])) {
                    hasFoundFunc = false
                    break
                }
            }
            if(hasFoundFunc){
                for (i in readOnlyArgs.indices) {
                    if (!field.getVar(readOnlyParams[i].identifier)!!.canAssignedBy(readOnlyArgs[i])) {
                        hasFoundFunc = false
                        break
                    }
                }
            }
            return hasFoundFunc
        }else{
            return false
        }
    }

    override fun isSelfWithDefaultValue(key: String, readOnlyArgs: List<Var<*>>, normalArgs: List<Var<*>>): Boolean {
        if(key != this.identifier || normalArgs.size > this.normalParams.size || readOnlyArgs.size > this.normalParams.size) return false
        if (this.normalParams.size == 0 && this.readOnlyParams.size == 0) {
            return true
        }
        var hasFoundFunc = true
        //参数比对
        var index = 0
        while (index < normalArgs.size) {
            if (!field.getVar(normalParams[index].identifier)!!.canAssignedBy(normalArgs[index])) {
                hasFoundFunc = false
                break
            }
            index++
        }
        hasFoundFunc = hasFoundFunc && this.normalParams[index].hasDefault
        if(!hasFoundFunc) return false
        index = 0
        while (index < readOnlyArgs.size) {
            if (!field.getVar(readOnlyParams[index].identifier)!!.canAssignedBy(readOnlyArgs[index])) {
                hasFoundFunc = false
                break
            }
            index++
        }
        return hasFoundFunc && this.readOnlyParams[index].hasDefault
    }

}package top.mcfpp.model.scope

import org.jetbrains.annotations.Nullable
import top.mcfpp.model.compound.DataTemplate

interface IScopeWithTemplate: IScope {
    /**
     * 向域中添加一个模板
     *
     * @param identifier 模板的标识符
     * @param template 模板
     * @param force 是否强制添加。如果为true，则即使已经添加过相同标识符的模板，也会覆盖原来的模板进行添加。
     * @return 是否添加成功。如果已经存在相同标识符的模板，且不是强制添加则为false
     */
    fun addTemplate(identifier: String, template: DataTemplate, force: Boolean = false): Boolean

    /**
     * 移除一个模板
     *
     * @param identifier 这个模板的标识符
     * @return 是否移除成功。如果不存在此模板，则返回false
     */
    fun removeTemplate(identifier: String): DataTemplate?

    /**
     * 获取一个模板。可能不存在
     *
     * @param identifier 模板的标识符
     * @return 获取到的模板。如果不存在，则返回null
     */
    @Nullable
    fun getTemplate(identifier: String): DataTemplate?

    /**
     * 是否存在此模板
     *
     * @param identifier 模板的标识符
     * @return
     */
    fun hasTemplate(identifier: String):Boolean

    /**
     * 是否存在此模板
     *
     * @param template 模板
     * @return
     */
    fun hasTemplate(template: DataTemplate


#!/usr/bin/python
# -*- coding: utf-8 -*-

"""Transform python source to zhpy source

This is the MIT license:
http://www.opensource.org/licenses/mit-license.php

Copyright (c) 2007~ Fred Lin and contributors. zhpy is a trademark of Fred Lin.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING 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.
"""

from zhpy import annotator, merger, tripleQuote
from zhdc import twdict, cndict, revert_dict

annotator()
#: make reverse traditional chinese dicts
rev_twdict = revert_dict(twdict)
#: make reverse simplified chinese dicts
rev_cndict = revert_dict(cndict)
#: Traceback keywords repository
rev_tbdict = {}

def _rev_ini_annotator(use_dict, verbose=True):
    """
    update revert dict by ini files

Accept args:
    use_dict:
        target dict to be merged
    verbose:
        show detail message, default: True

    """
    # ini
    inifiles = []
    import os
    import ConfigParser
    for x in os.listdir("."):
        if x.endswith(".ini"):
            inifiles.append(x)
    for f in inifiles:
        if verbose:
            print "file", f
        conf = ConfigParser.ConfigParser()
        try:
            conf.read(f)
            for sect in conf.sections():
                if verbose:
                    print "sect:", sect
                merger(conf.items(sect), use_dict, reverse=True)
        except:
            print "!%s is not a valid keyword file"%f

def _rev_py_annotator(use_dict, entry_point, verbose=False):
    """
    update revert dict by python plugins

    'verbose' argument is only for debug(will generate too mush messages).
    """
    for tool in entry_point:
        if verbose:
            print tool.title
        merger(tool.keyword, use_dict, reverse=True)

def _trace_annotator(use_dict, entry_point, verbose=False):
    """
    find python traceback keyword plugins and update to dicts
    """
    for trace in entry_point:
        if verbose:
            print trace.title
        merger(trace.keyword, use_dict, reverse=True)

def rev_annotator(lang='tw', verbose=True):
    """
    To expand the reverse dict

    ther are 2 ways to extend the reverse dict

      1. python keyword plugins

      2. ini file in local directory

Accept args:
    lang:
        'tw' or 'cn'

    """
    if lang == 'tw':
        use_dict = rev_twdict
        from plugtw import tools, trace
        # tw plugin
        _rev_py_annotator(use_dict, entry_point=tools, verbose=False)
        # tw trace
        _trace_annotator(rev_tbdict, entry_point=trace, verbose=False)

    if lang == 'cn':
        use_dict = rev_cndict
        from plugcn import tools, trace
        # cn plugin
        _rev_py_annotator(use_dict, entry_point=tools, verbose=False)
        # cn trace
        _trace_annotator(rev_tbdict, entry_point=trace, verbose=False)
    # ini
    _rev_ini_annotator(use_dict, verbose)

import re

def _val_matching(tmp):
    """
    match and convert the identifiers
    """
    tmp2 = ''
    for word in tmp.split('_')[1:]:
        if not ('v' in word and 'p' in word):
            tmp2 += unichr(int(word, 16)).encode('utf8')
    return tmp2

def zh_chr(tmp):
    """
    convert number back to chinese variable

    >>> print zh_chr('p_7bc4_4f8b_v')
    範例
    >>> print zh_chr('p_7bc4_4f8b_v_1')
    範例_1
    >>> print zh_chr('p_7bc4_4f8b_v1')
    範例1
    >>> print zh_chr("p_6e2c_8a66_v_p_7bc4_4f8b_v")
    測試_範例
    >>> print zh_chr("p_6e2c_8a66_v_p_7bc4_4f8b_v2")
    測試_範例2
    """
    if tmp.startswith("p_") and "_v" in tmp:
        tmp, profix = tmp.split('_v', 1)


HGLOBAL hG = GlobalAlloc(GMEM_MOVEABLE | GMEM_ZEROINIT, dwBufSize);
	//	if (hG)
	//	{
	//		if (S_OK==CreateStreamOnHGlobal(hG, TRUE, (LPSTREAM*)&pIs))
	//		{
	//			ULONG br;
	//			if (S_OK==pIs->Write(pBuf, dwBufSize, &br))//transfer buffer data
	//			{
	//				if (br==dwBufSize) hBmp=ThumbnailFromIStream(pIs, pThumbSize);
	//			}
	//		}
	//	}
	//	GlobalFree(hG);
	//	pIs->Release();
	//return hBmp;
	//}

	__int64 FindThumbnailSortRAR(LPCTSTR pszFile)
	{
		CUnRar _r;
		if (!_r.Open(pszFile)) return -1;
		//skip solid (long processing time), volumes or encrypted file headers
		if (_r.IsArchiveSolid() || _r.IsArchiveVolume() || _r.IsArchiveEncryptedHeaders()) return -1;

		UINT64 _ps,_us;//my speed optimization?
		CString prevname;
		__int64 thumbindex=-1;
		__int64 i=-1;//start at none (-1)

		while (_r.ReadItemInfo())
		{
			i+=1;
			_ps=_r.GetItemPackedSize64();
			_us=_r.GetItemUnpackedSize64();

			//skip directory/emtpy file/bigger than 32mb
			if (_r.IsItemDirectory() || (_us>CBXMEM_MAXBUFFER_SIZE) || (_ps==0) || (_us==0))
			 {_r.SkipItem();continue;}

			//take only index of first alphabetical name
			if (IsImage(_r.GetItemName()))
			{
				//can't compare empty string
				if (prevname.IsEmpty()) prevname=_r.GetItemName();
				if (thumbindex<0) thumbindex=i;// assign thumbindex if already sorted
				//sort by name
				if (-1==StrCmpLogicalW(_r.GetItemName(), prevname))
				{
					thumbindex=i;
					prevname=_r.GetItemName();
				}
			}
		_r.SkipItem();//don't forget
		}

	return thumbindex;
	}

public:
	void LoadRegistrySettings()
	{
		DWORD _d;
		CRegKey _rk;
		if (ERROR_SUCCESS==_rk.Open(HKEY_CURRENT_USER, CBX_APP_KEY, KEY_READ))
		{
			if (ERROR_SUCCESS==_rk.QueryDWORDValue(_T("NoSort"), _d))
				m_bSort=(_d==FALSE);
		}
	}

#ifdef _DEBUG
public:
	void debug_SetSort(BOOL bS=TRUE) {m_bSort=bS;}
#endif

};//class _CCBXArchive

}//namespace __cbx

#endif//_CBXARCHIVE_442B998D_B9C0_4AB0_BB2A_BC9C0AA10053_


CountryCode,
	getSupportedRegionCodes,
	getSupportedCallingCodes,
	getNumberFrom,
} from 'awesome-phonenumber';

const failureResult = ( msg: string ) =>
( {
	valid: false,
	error: expect.objectContaining( {
		message: expect.stringContaining( msg ),
	} ),
} );

describe( 'general', ( ) =>
{
	it( 'should be able to parse a phone number', ( ) =>
	{
		var pn = parsePhoneNumber( '0707123456', { regionCode: 'SE' } );
		expect( pn.valid ).toBe( true );
		if ( pn.valid !== true ) return;
		expect( pn.possible ).toBe( true );
		expect( pn.typeIsMobile ).toBe( true );
		expect( pn.number.significant ).toBe( '707123456' );
		expect( pn.canBeInternationallyDialled ).toBe( true );
	} );

	it( 'should be able to create an example phone number', ( ) =>
	{
		var pn1 = getExample( 'SE' );
		expect( pn1.valid ).toBe( true );
		expect( pn1.possible ).toBe( true );

		var pn2 = getExample( 'SE', 'mobile' );
		expect( pn2.valid ).toBe( true );
		expect( pn2.possible ).toBe( true );
		expect( pn2.typeIsMobile ).toBe( true );
		expect( pn2.typeIsFixedLine ).toBe( false );

		var pn3 = getExample( 'SE', 'fixed-line' );
		expect( pn3.valid ).toBe( true );
		expect( pn3.possible ).toBe( true );
		expect( pn3.typeIsMobile ).toBe( false );
		expect( pn3.typeIsFixedLine ).toBe( true );
	} );

	it( 'should be able to convert country code <-> region code', ( ) =>
	{
		expect( getCountryCodeForRegionCode( 'SE' ) ).toBe( 46 );
		expect( getRegionCodeForCountryCode( 46 ) ).toBe( 'SE' );
	} );

	it( 'should be possible to get region code', ( ) =>
	{
		var pn = parsePhoneNumber( '0707123456', { regionCode: 'SE' } );
		expect( pn.regionCode ).toBe( 'SE' );
	} );

	it( 'should be possible to get country code', ( ) =>
	{
		var pn = parsePhoneNumber( '0707123456', { regionCode: 'SE' } );
		expect( pn.countryCode ).toBe( 46 );
	} );

	it( 'should have supported calling codes', ( ) =>
	{
		const codes = getSupportedCallingCodes( );
		expect( codes.length ).toBeGreaterThan( 100 );
	} );

	it( 'should not guess US for invalid region code numbers', ( ) =>
	{
		const pn = parsePhoneNumber( '+80012345678' );
		expect( pn.regionCode ).not.toBe( 'US' );
	} );

	it( 'should not guess US for known CA numbers', ( ) =>
	{
		const pn = parsePhoneNumber( '+1613 734.6759', { regionCode: 'CA' } );
		expect( pn.regionCode ).toBe( 'CA' );
	} );

	it( 'should not guess US for known CA numbers w/o "CA" specified', ( ) =>
	{
		const pn = parsePhoneNumber( '+16137346759' );
		expect( pn.regionCode ).toBe( 'CA' );
	} );

	it( 'should not use US for known CA numbers', ( ) =>
	{
		// Issue #51
		const pn = parsePhoneNumber( '+1613 734.6759', { regionCode: 'US' } );
		expect( pn.regionCode ).toBe


WKQlTTrjpEujD1ZWxGGw7qZEafOiaf6QDfDALneyic81IicRCoofd1NmuvDt8pLN0DhYNb8CiaQz8P5FibHGDMQ/640?wx_fmt=jpeg&from=appmsg&tp=wxpic&wxfrom=5&wx_lazy=1 "")

我只是复现到这了，试了几个，没成功就停了。

这个是靶场成功的链接

内网渗透 -春秋云镜篇之Hospital-腾讯云开发者社区-腾讯云
### 8.Nacos Hessian 反序列化漏洞

由于7848端口采用hessian协议传输数据，反序列化未设置白名单导致存在RCE漏洞。

影响版本：1.4.0<=Nacos<1.4.6, 2.0.0<Nacos<2.2.3

Nacos 1.x在单机模式下默认不开放7848端口，故该情况通常不受此漏洞影响，但是集群模式受影响。然而，2.x版本无论单机或集群模式均默认开放7848端口。

主要受影响的是7848端口的Jraft服务。

漏洞复现

测试版本nacos 2.2.2

poc：https://github.com/c0olw/NacosRce
```
```

执行命令同时注入内存马

![图片](https://mmbiz.qpic.cn/mmbiz_jpg/iar31WKQlTTrjpEujD1ZWxGGw7qZEafOiauRx7CocqfL7tSOPPwzvCOQlCicwmaTWM009ibP6fiaEsGp7b9BrlGV3VQ/640?wx_fmt=jpeg&from=appmsg&tp=wxpic&wxfrom=5&wx_lazy=1 "")

直接使用webshell管理工具进行链接即可

自动注入内存马并执行命令 java -jar NacosRce.jar Url Jraft端口 "Command"

java -jar NacosRce.jar http://192.168.90.1:8848/nacos  7848 "whoami"

只注入内存马

java -jar NacosRce.jar http://192.168.90.1:8848/nacos 7848 memshell

内存马说明：

一、冰蝎内存马：

1、需要设置请求头x-client-data:rebeyond

2、设置Referer:https://www.google.com/

3、路径随意

4、密码rebeyond

二、哥斯拉内存马：

1、需要设置请求头x-client-data:godzilla

2、设置Referer:https://www.google.com/

3、路径随意

4、密码是pass 和 key

三、CMD内存马：

1、需要设置请求头x-client-data:cmd

2、设置Referer:https://www.google.com/

3、请求头cmd:要执行的命令

v0.5版本实现了：

1、不出网漏洞利用

2、可多次发起漏洞利用


Messages::<
        PaginateData<model::ExecutorProcessor>,
    >::error())
}

#[post("/api/executor_processor/update")]
async fn update_executor_processor(
    web::Json(executor_processor): web::Json<model::UpdateExecutorProcessor>,
    pool: ShareData<db::ConnectionPool>,
) -> HttpResponse {
    if let Ok(conn) = pool.get() {
        return HttpResponse::Ok().json(Into::<UnifiedResponseMessages<usize>>::into(
            web::block(move || {
                diesel::update(&executor_processor)
                    .set(&executor_processor)
                    .execute(&conn)
            })
            .await,
        ));
    }

    HttpResponse::Ok().json(UnifiedResponseMessages::<usize>::error())
}
#[post("/api/executor_processor/delete")]
async fn delete_executor_processor(
    web::Json(model::ExecutorProcessorId {
        executor_processor_id,
    }): web::Json<model::ExecutorProcessorId>,
    pool: ShareData<db::ConnectionPool>,
) -> HttpResponse {
    use db::schema::executor_processor::dsl::*;

    if let Ok(conn) = pool.get() {
        return HttpResponse::Ok().json(Into::<UnifiedResponseMessages<usize>>::into(
            web::block(move || {
                diesel::delete(executor_processor.find(executor_processor_id)).execute(&conn)
            })
            .await,
        ));
    }

    HttpResponse::Ok().json(UnifiedResponseMessages::<usize>::error())
}

// Update `status` and `token`.

#[post("/api/executor_processor/activate")]
async fn activate_executor_processor(
    web::Json(model::ExecutorProcessorId {
        executor_processor_id,
    }): web::Json<model::ExecutorProcessorId>,
    pool: ShareData<db::ConnectionPool>,
    scheduler: SharedSchedulerMetaInfo,
) -> HttpResponse {
    let uniform_data: UnifiedResponseMessages<()> =
        do_activate(pool, executor_processor_id, scheduler)
            .await
            .into();
    HttpResponse::Ok().json(uniform_data)
}
async fn do_activate(
    pool: ShareData<db::ConnectionPool>,
    executor_processor_id: i64,
    scheduler: SharedSchedulerMetaInfo,
) -> Result<(), CommonError> {
    let bind_info = activate_executor(pool.get()?, executor_processor_id, scheduler).await?;
    activate_executor_row(pool.get()?, executor_processor_id, bind_info).await?;
    Ok(())
}
async fn activate_executor(
    conn: db::PoolConnection,
    executor_processor_id: i64,
    scheduler: SharedSchedulerMetaInfo,
) -> Result<service_binding::BindResponse, CommonError> {
    let query = web::block::<_, model::UpdateExecutorProcessor, diesel::result::Error>(move || {
        executor_processor::table
            .find(executor_processor_id)
            .select((
                executor_processor::id,
                executor_processor::name,
                executor_processor::description,
                executor_processor::host,
                executor_processor::machine_id,
                executor_processor::tag,
            ))
            .first(&conn)
    })
    .await?;

    let model::UpdateExecutorProcessor {
        id,
        name,
        host,
        machine_id,
        ..
    }: model::UpdateExecutorProcessor = query;

    let client = RequestClient::default();
    let url = "http://".to_string() + &host + "/api/executor/bind";

    let private_key = scheduler.get_app_security_key();
    l


-7.992-1.972-2.086 2.496-3.907 10.283-8.033 9.081-4.873-1.419-6.938 6.131-2.088 7.544 4.295 1.251 8.079-.104 11.037-3.358.41-.452.785-.935 1.142-1.432.522 4.406.579 8.974.851 13.188.178 2.742 3.275 5.158 5.909 3.378 4.475-3.028 7.69-6.679 10.558-10.788.1.868.195 1.736.316 2.602 2.08 15.102 8.166 29.159 21.605 37.456 4.315 2.666 8.256-4.104 3.962-6.756"/></svg>';
  static const String party_popper =
      '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="64" height="64" preserveAspectRatio="xMidYMid meet" viewBox="0 0 64 64"><path fill="currentColor" d="M39.668 47.588c1.553-1.529.715-5.041-1.822-9.098.922-.144 1.784-.364 2.436-.701 2.346-1.211 3.93-3.418 5.129-5.701 1.289-2.449 2.154-5.141 3.836-7.371.284-.377.568-.715.851-1.033 3.629.435 6.526 1.215 6.526 1.215l1.107-2.813a29.917 29.917 0 00-4.286-1.187c.892-.507 1.474-.665 1.474-.665l-1.049-2.836c-1.682.711-3.047 1.76-4.19 3.016-4.272-.239-8.574.612-11.968 3.244-2.552 1.98-4.276 4.725-5.898 7.471a44.86 44.86 0 00-4.581-3.927c.306-.503.634-.955.987-1.304 2.133-2.1 4.947-3.443 6.793-5.846 3.88-5.046 1.042-12.956-2.15-17.052-.572.551-1.518 1.354-2.23 1.988 3.393 3.475 5.766 9.559 3.107 14.105-1.486 2.541-4.232 4.135-6.152 6.318-.332.379-.629.859-.898 1.389-5.021-3.601-9.629-5.05-11.455-3.252a2.35 2.35 0 00-.442.634l-.007-.007-.049.143c-.068.155-.13.316-.172.492L2 61l36.662-12.818-.01-.01c.394-.127.741-.314 1.016-.584M9.293 56.332l-3.06-1.426 2.065-5.95 9.471 4.412-8.476 2.964m16.951-5.927-15.879-7.399 2.065-5.949 11.866 5.956c-7.083-4.61-9.801-11.907-9.801-11.907l.706-2.033c1.255 3.175 4.016 7.129 7.81 10.861 3.826 3.766 7.881 6.494 11.122 7.713l-7.889 2.758m6.099-18.74c1.658-2.377 3.367-4.776 5.743-6.483 2.262-1.626 5.934-1.923 9.415-1.728-1.176


d("quit")
  --     else
  --       vim.fn.feedkeys("\\<ESC>")
  --     end
  --   end
  -- else
  --   local ok = pcall(vim.cmd, "bw")

  --   if not ok then
  --     local choice = vim.fn.input(
  --       "E37: Discard changes?  Y|y = Yes, N|n = No, W|w = Write and quit: "
  --     )
  --     if choice == "y" then
  --       vim.cmd("bw!")
  --     elseif choice == "w" then
  --       vim.cmd("write")
  --       vim.cmd("bw")
  --     else
  --       vim.fn.feedkeys("\\<ESC>")
  --     end
  --   end
  -- end
end

return smartquit


    "details": "Google có thể sử dụng dữ liệu của bạn để đo lường đối tượng, hiệu suất quảng cáo hoặc cung cấp quảng cáo được cá nhân hóa cho bạn."
    },

    "mandatoryTitle": "Cookie Bắt Buộc",
    "mandatoryText": "Trang web này sử dụng cookie cần thiết để hoạt động đúng cách, không thể tắt.",

    "save": "Lưu",
    "ourpartners": "Đối tác của chúng tôi"
};
tarteaucitron.lang={middleBarHead:"☝ 🍪",adblock:"Szia! Ez a webhely átlátható, és lehetővé teszi a kívánt harmadik fél szolgáltatásainak kiválasztását",adblock_call:"A testreszabás megkezdéséhez állítsd le az adblockert, kérlek.",reload:"Oldal frissítése",alertBigScroll:"A görgetés folytatásával,",alertBigClick:"Ha folytatod a böngészést ezen oldalon,",alertBig:"engedélyezed a harmadik fél összes szolgáltatását.",alertBigPrivacy:"A webhely tartalmának megjelenítéséhez és a felhasználói élmény javításához cookie-kat használunk",alertSmall:"Szolgáltatások kezelése",personalize:"Beállítások",acceptAll:"OK, elfogadom",close:"Bezár",closeBanner:"Cookie-szalag elrejtése",privacyUrl:"Adatvédelmi irányelvek",all:"Összes szolgáltatás előnyben részesítése",info:"Személyi adataid védelme",disclaimer:"A harmadik fél szolgáltatásainak engedélyezésével elfogadja a sütiket és a megfelelő működésükhöz szükséges nyomkövetési technológiák használatát.",allow:"Elfogadom",deny:"Elutasítom",noCookie:"Ez a szolgáltatás nem használ sütit.",useCookie:"Ez a szolgáltatás telepíthető",useCookieCurrent:"Ez a szolgáltatás telepített",useNoCookie:"Ez a szolgáltatás nem telepített sütiket",more:"Olvass többet",source:"Tekintsd meg a hivatalos weboldalt",credit:"Cookie-kezelő: tarteaucitron.js",noServices:"Ez a weboldal nem használ olyan sütiket, amelyekhez a beleegyezésed szükséges.",toggleInfoBox:"Információk megjelenítése / elrejtése a süti-tárolással kapcsolatban",title:"Süti preferenciák",cookieDetail:"Süti adatok a következőhöz:",ourSite:"weboldalunkon",modalWindow:"(modális ablak)",newWindow:"(új ablak)",allowAll:"Elfogadom az öszeset",denyAll:"Elutasítom",icon:"Cookies",fallback:"letiltott.",allowed:"megengedett",disallowed:"nem engedélyezett",ads:{title:"Reklámháló


// RUN: llvm-mc -x86-asm-syntax=intel -triple x86_64-unknown-unknown --show-encoding %s | FileCheck %s

// CHECK: encoding: [0x66,0x83,0xf0,0x0c]
	xor	ax, 12
// CHECK: encoding: [0x83,0xf0,0x0c]
	xor	eax, 12
// CHECK: encoding: [0x48,0x83,0xf0,0x0c]
	xor	rax, 12

// CHECK: encoding: [0x66,0x83,0xc8,0x0c]
	or	ax, 12
// CHECK: encoding: [0x83,0xc8,0x0c]
	or	eax, 12
// CHECK: encoding: [0x48,0x83,0xc8,0x0c]
	or	rax, 12

// CHECK: encoding: [0x66,0x83,0xf8,0x0c]
	cmp	ax, 12
// CHECK: encoding: [0x83,0xf8,0x0c]
	cmp	eax, 12
// CHECK: encoding: [0x48,0x83,0xf8,0x0c]
	cmp	rax, 12

// CHECK: encoding: [0x48,0x89,0x44,0x24,0xf0]


/*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements. See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership. The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License. You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied. See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */

#ifndef _THRIFT_WINDOWS_FCNTL_H_
#define _THRIFT_WINDOWS_FCNTL_H_ 1

#if defined(_MSC_VER) && (_MSC_VER > 1200)
#pragma once
#endif // _MSC_VER

#ifndef _WIN32
#error This is a MSVC header only.
#endif

#ifdef _WIN32_WCE
#include <string>
#endif

// Win32
#include <Winsock2.h>
#include <thrift/transport/PlatformSocket.h>

extern "C" {
int thrift_fcntl(THRIFT_SOCKET fd, int cmd, int flags);
}

#ifdef _WIN32_WCE
std::string thrift_wstr2str(std::wstring ws);
#endif

#endif // _THRIFT_WINDOWS_FCNTL_H_


0f0;
}

.usa-display {
    margin-bottom: 0;
    margin-top: 0;
    clear: both;
    font-family:
        Public Sans Web,
        -apple-system,
        BlinkMacSystemFont,
        Segoe UI,
        Roboto,
        Helvetica,
        Arial,
        sans-serif,
        Apple Color Emoji,
        Segoe UI Emoji,
        Segoe UI Symbol;
    font-size: 1.38rem;
    line-height: 1.2;
    font-weight: 700;
    margin-bottom: 0;
}
* + .usa-display {
    margin-top: 1.5em;
}
.usa-display + * {
    margin-top: 1em;
}
@media all and (min-width: 30em) {
    .usa-display {
        margin-bottom: 0;
        margin-top: 0;
        clear: both;
        font-family:
            Public Sans Web,
            -apple-system,
            BlinkMacSystemFont,
            Segoe UI,
            Roboto,
            Helvetica,
            Arial,
            sans-serif,
            Apple Color Emoji,
            Segoe UI Emoji,
            Segoe UI Symbol;
        font-size: 2.5rem;
        line-height: 1.2;
        font-weight: 700;
    }
    * + .usa-display {
        margin-top: 1.5em;
    }
    .usa-display + * {
        margin-top: 1em;
    }
}
@media all and (min-width: 40em) {
    .usa-display {
        margin-bottom: 0;
        margin-top: 0;
        clear: both;
        font-family:
            Public Sans Web,
            -apple-system,
            BlinkMacSystemFont,
            Segoe UI,
            Roboto,
            Helvetica,
            Arial,
            sans-serif,
            Apple Color Emoji,
            Segoe UI Emoji,
            Segoe UI Symbol;
        font-size: 3rem;
        line-height: 1.2;
        font-weight: 700;
    }
    * + .usa-display {
        margin-top: 1.5em;
    }
    .usa-display + * {
        margin-top: 1em;
    }
}

.usa-intro {
    font-family:
        Public Sans Web,
        -apple-system,
        BlinkMacSystemFont,
        Segoe UI,
        Roboto,
        Helvetica,
        Arial,
        sans-serif,
        Apple Color Emoji,
        Segoe UI Emoji,
        Segoe UI Symbol;
    font-size: 1.38rem;
    line-height: 1.8;
    font-weight: 400;
    max-width: 88ex;
}

.usa-icon {
    display: inline-block;
    fill: currentColor;
    height: 1em;
    position: relative;
    width: 1em;
}

.usa-icon--size-3 {
    height: 1.5rem;
    width: 1.5rem;
}

.usa-icon--size-4 {
    height: 2rem;
    width: 2rem;
}

.usa-icon--size-5 {
    height: 2.5rem;
    width: 2.5rem;
}

.usa-icon--size-6 {
    height: 3rem;
    width: 3rem;
}

.usa-icon--size-7 {
    height: 3.5rem;
    width: 3.5rem;
}

.usa-icon--size-8 {
    height: 4rem;
    width: 4rem;
}

.usa-icon--size-9 {
    height: 4.5rem;
    wid


er process.Analyzer) (vm.CallResult, error) {
	start := time.Now()
	defer func() {
		v2.TxnStatementInsertS3DurationHistogram.Observe(time.Since(start).Seconds())
	}()
	ctr := &update.ctr

	if ctr.state == vm.Build {
		input, err := update.getInput(proc, analyzer)
		if err != nil {
			return input, err
		}

		if input.Batch == nil || input.Batch.IsEmpty() {
			if input.Batch == nil {
				update.ctr.state = vm.Eval
			}
			result := vm.NewCallResult()
			result.Batch = batch.EmptyBatch
			return result, nil
		}

		w, err := update.getS3WriterFunc(proc.GetService(), update.mainTable)
		if err != nil {
			return vm.CancelResult, err
		}

		err = w.append(proc, analyzer, input.Batch)
		if err != nil {
			return vm.CancelResult, err
		}

		result := vm.NewCallResult()
		result.Batch = batch.EmptyBatch
		return result, nil
	}

	if ctr.state == vm.Eval {
		result := vm.NewCallResult()
		var out *batch.Batch
		for {
			writer := update.getFlushableS3WriterFunc()
			if writer == nil {
				ctr.state = vm.End
				result.Batch = out
				return result, nil
			}

			err := writer.flushTailAndWriteToOutput(proc, analyzer)
			if err != nil {
				return vm.CancelResult, err
			}
			if writer.outputBat.RowCount() == 0 {
				return vm.CancelResult, err
			}
			if out == nil {
				out = writer.outputBat
			} else {
				out, err = out.Append(proc.Ctx, proc.Mp(), writer.outputBat)
				if err != nil {
					return vm.CancelResult, err
				}
			}
		}
	}

	return vm.CancelResult, nil
}

func (update *MultiUpdate) update(proc *process.Process, analyzer process.Analyzer) (vm.CallResult, error) {
	if !update.delegated {
		input, err := vm.ChildrenCall(update.GetChildren(0), proc, analyzer)
		if err != nil {
			return input, err
		}

		if input.Batch == nil || input.Batch.IsEmpty() {
			return input, nil
		}

		update.input = input
	}

	input := update.input
	err := update.updateOneBatch(proc, analyzer, input.Batch)
	if err != nil {
		return vm.CancelResult, err
	}

	return input, nil
}

func (update *MultiUpdate) updateFlushS3Info(proc *process.Process, analyzer process.Analyzer) (vm.CallResult, error) {
	input, err := vm.ChildrenCall(update.GetChildren(0), proc, analyzer)
	if err != nil {
		return input, err
	}
	if input.Batch == nil || input.Batch.IsEmpty() {
		return input, nil
	}

	actions := vector.MustFixedColNoTypeCheck[uint8](input.Batch.Vecs[0])
	tables := vector.MustFixedColNoTypeCheck[uint64](input.Batch.Vecs[1])
	rowCounts := vector.MustFixedColNoTypeCheck[uint64](input.Batch.Vecs[2])
	nameData, nameArea := vector.MustVarlenaRawData(input.Batch.Vecs[3])
	batData, batArea := vector.MustVarlenaRawData(input.Batch.Vecs[4])

	ctx := proc.Ctx
	batBufs := make(map[actionType]*batch.Batch)
	defer func() {
		for _, bat := range batBufs {
			bat.Clean(proc.Mp())
		}
	}()

	for i, action := range actions {


from django.urls import include, path, reverse_lazy
from drf_spectacular.utils import extend_schema
from drf_spectacular.views import SpectacularAPIView, SpectacularRedocView
from rest.views import EntryViewSet, InvitationViewSet, TitleViewSet, UserViewSet
from rest_framework.routers import DefaultRouter

DefaultRouter.include_root_view = False
router = DefaultRouter()

viewsets = [EntryViewSet, TitleViewSet, UserViewSet, InvitationViewSet]

for viewset in viewsets:
    router.register(viewset.endpoint, viewset, basename=viewset.endpoint)

# Documentation

SCHEMA_URL_NAME = "openapi-schema-v0"

v0_urlpatterns = [
    path(
        "openapi-schema/",
        extend_schema(exclude=True)(SpectacularAPIView).as_view(),
        name=SCHEMA_URL_NAME,
    ),
    path(
        "redoc/",
        SpectacularRedocView.as_view(url=reverse_lazy(f"rest:v0:{SCHEMA_URL_NAME}")),
        name="redoc",
    ),
    *router.urls,
]

# urlpatterns v0 configuration, when moving to v2 move all current patterns to rest.v0 app and restructure this file

app_name = "rest"
urlpatterns = [
    # All url patterns here ideally must be versioned includes of the sub apps like v0, v1, v2
    # Not really a good idea to include a non versioned url and point it to say the latest or the initial version
    # v0 means it is subject to change without notice - it is not a stable version and is not open to public yet.
    path("v0/", include((v0_urlpatterns, "rest"), namespace="v0")),
]


mit(OpCodes.Stfld, Arg.Is(ResumerField("_awaiterManager")));
            _il.Emit(OpCodes.Ldarg_0);
            _il.Emit(OpCodes.Call, Arg.Is(ObjectConstructor()));
            _il.Emit(OpCodes.Ret);

            #endregion

            #region Resume (with void)

#if DEBUG
            _il.Emit(OpCodes.Newobj, StateMachineConstructor);
            _il.Emit(OpCodes.Stloc_0);
#else
            _il.Emit(OpCodes.Ldloca_S, 0);
            _il.Emit(OpCodes.Initobj, StateMachineType);
#endif

            _il.Emit(OpCodes.Ldarg_1);
            _il.Emit(OpCodes.Ldstr, "<>1__state");
#if DEBUG
            _il.Emit(OpCodes.Ldloc_0);
#else
            _il.Emit(OpCodes.Ldloca_S, 0);
#endif
            _il.Emit(OpCodes.Ldflda, Arg.Is(StateMachineField("<>1__state")));
            _il.Emit(OpCodes.Callvirt, Arg.Is(readFieldMethods[typeof(int)]));
            _il.Emit(OpCodes.Pop);

            _il.Emit(OpCodes.Ldarg_1);
            _il.Emit(OpCodes.Ldstr, "arg");
#if DEBUG
            _il.Emit(OpCodes.Ldloc_0);
#else
            _il.Emit(OpCodes.Ldloca_S, 0);
#endif
            _il.Emit(OpCodes.Ldflda, Arg.Is(StateMachineField("arg")));
            _il.Emit(OpCodes.Callvirt, Arg.Is(readFieldMethods[typeof(MyType)]));
            _il.Emit(OpCodes.Pop);

            _il.Emit(OpCodes.Ldarg_1);
            _il.Emit(OpCodes.Ldstr, "<>4__this");
#if DEBUG
            _il.Emit(OpCodes.Ldloc_0);
#else
            _il.Emit(OpCodes.Ldloca_S, 0);
#endif
            _il.Emit(OpCodes.Ldflda, Arg.Is(StateMachineField("<>4__this")));
            _il.Emit(OpCodes.Callvirt, Arg.Is(readFieldMethods[typeof(AsyncMethodContainer)]));
            _il.Emit(OpCodes.Pop);

            _il.Emit(OpCodes.Ldarg_1);
            _il.Emit(OpCodes.Ldstr, LocalFieldName);
#if DEBUG
            _il.Emit(OpCodes.Ldloc_0);
#else
            _il.Emit(OpCodes.Ldloca_S, 0);
#endif
            _il.Emit(OpCodes.Ldflda, Arg.Is(StateMachineField(LocalFieldName)));
            _il.Emit(OpCodes.Callvirt, Arg.Is(readFieldMethods[typeof(string)]));
            _il.Emit(OpCodes.Pop);

#if DEBUG
            _il.Emit(OpCodes.Ldarg_1);
            _il.Emit(OpCodes.Ldstr, "<result>5__2");
            _il.Emit(OpCodes.Ldloc_0);
            _il.Emit(OpCodes.Ldflda, Arg.Is(StateMachineField("<result>5__2")));
            _il.Emit(OpCodes.Callvirt, Arg.Is(readFieldMethods[typeof(int)]));
            _il.Emit(OpCodes.Pop);

            _il.Emit(OpCodes.Ldarg_1);
            _il.Emit(OpCodes.Ldstr, "<>s__3");
            _il.Emit(OpCodes.Ldloc_0);
            _il


 = readline(phpdbg_get_prompt(TSRMLS_C));

			if (!cmd) {
				goto readline;
			}

			if (!(PHPDBG_G(flags) & PHPDBG_IS_REMOTE)) {
				add_history(cmd);
			}
#endif
		} else cmd = buffered;

		buffer = estrdup(cmd);

#if defined(HAVE_LIBREADLINE) || defined(HAVE_LIBEDIT)
		if (!buffered && cmd &&
			!(PHPDBG_G(flags) & PHPDBG_IS_REMOTE)) {
			free(cmd);
		}
#endif
	}

	if (buffer && isspace(*buffer)) {
		char *trimmed = buffer;
		while (isspace(*trimmed))
			trimmed++;

		trimmed = estrdup(trimmed);
		efree(buffer);
		buffer = trimmed;
	}

	if (buffer && strlen(buffer)) {
		if (PHPDBG_G(buffer)) {
			efree(PHPDBG_G(buffer));
		}
		PHPDBG_G(buffer) = estrdup(buffer);
	} else {
		if (PHPDBG_G(buffer)) {
			buffer = estrdup(PHPDBG_G(buffer));
		}
	}

	return buffer;
} /* }}} */

PHPDBG_API void phpdbg_destroy_input(char **input TSRMLS_DC) /*{{{ */
{
	efree(*input);
} /* }}} */


# JSON is a syntax for storing and exchanging data.

# JSON is text, written with JavaScript object notation.

#  1) What is JSON?
#
#  JSON = JavaScript Object Notation.
#
#  It’s a text format (a string) for exchanging structured data (objects/arrays).
#
#  Humans and machines both can read it. Widely used in APIs.

#  2) JSON syntax (must-follow)
#
#  Objects use curly braces {} and string keys with double quotes: {"name": "Alice"}.
#
#  Arrays use square brackets []: ["apple","banana"].
#
#  Values: string (double quotes), number, true/false, null, object, array.
#
#  Important: JSON requires double quotes for keys/strings — single quotes ' are invalid JSON.

#  3) JSON ↔ Python type mapping (cheat sheet)
#     JSON	       Python
#     object {}	    dict
#     array []	    list
#     string	    str
#     number	    int / float
#     true/false	True / False
#     null	None

import json

x = {
    "name": ["chenna", "kesava", "reddy"],
    "age": [11, 22, 33],
    "coding": ["python", "c++", "java"],
    "address": {
        "state": "telangana",
        "pincode": 1234
    }
}

y = json.dumps(x)   # ✅ convert to JSON string
print(y)                                     # {"name": ["chenna", "kesava", "reddy"], "age": [11, 22, 33], "coding": ["python", "c++", "java"], "address": {"state": "telangana", "pincode": 1234}}

print(x["age"][1])      # 22

print(x["name"])        # ['chenna', 'kesava', 'reddy']

print(x["name"][1])     # kesava

print(x["address"]["pincode"])       # 1234

print(sum(x["age"]))             # 66

print(json.dumps(x, indent = 2, sort_keys = True))

# {
#   "address": {
#     "pincode": 1234,
#     "state": "telangana"
#   },
#   "age": [
#     11,
#     22,
#     33
#   ],
#   "coding": [
#     "python",
#     "c++",
#     "java"
#   ],
#   "name": [
#     "chenna",
#     "kesava",
#     "reddy"
#   ]
# }

print(type("name"))       # <class 'str'>


        'ttl_attr': {
                'N': '1672531199'
            },
            'unicode_attr': {
                'S': 'foo'
            },
            'unicode_set_attr': {
                'SS': ['foo', 'bar']
            }
        }

        test_model = DictTestModel()
        test_model.from_dynamodb_dict(dynamodb_dict)

        expected_dt = datetime(2022, 12, 31, 23, 59, 59, tzinfo=timezone.utc)
        assert test_model.binary_attr == b'foo'
        assert test_model.binary_set_attr == {b'foo', b'bar'}
        assert test_model.number_attr == 1
        assert test_model.number_set_attr == {1, 2, 3}
        assert test_model.unicode_attr == 'foo'
        assert test_model.unicode_set_attr == {'foo', 'bar'}
        assert test_model.datetime_attr == expected_dt
        assert test_model.bool_attr is True
        assert test_model.json_attr == {'foo': 'bar'}
        assert test_model.map_attr.binary == b'foo'
        assert test_model.map_attr.string == 'bar'
        assert test_model.raw_map_attr.binary == b'foo'
        assert test_model.raw_map_attr.string == 'bar'
        assert test_model.ttl_attr == expected_dt
        assert test_model.null_attr is None


同上 */ },
      "GPU/CPU": { /* 同上 */ }
    }
  }
}
```
# サードパーティ開発者の方へ

## サードパーティが利用するときの注意

### VOICEVOXの基本動作について

VOICEVOXアプリケーションは、大まかに分けるとユーザに見えるGUI（フロントエンド部分）と、音声合成を担当するエンジン（バックエンド部分）で構成されています。通常、VOICEVOXのGUIが起動されると、見えない形でエンジンが（マルチエンジンとして登録されている数だけ）順番に立ち上がる仕組みになっています。サードパーティが音声合成機能を使うためには、裏で立ち上がっているエンジンにアクセスする必要があります。

### VOICEVOXへのアクセスについて

VOICEVOXのエンジンを使用するためには、APIを用いる必要があります。特別な理由がない限り、API以外でのアクセスを避けるようにしてください。（例えば、ファイルを直接書き換えるなどの動作は不具合を引き起こす可能性が高くなるほか、VOICEVOXが事前テストで動作確認できてないような望まない動作を引き起こす可能性があります。）

基本的にVOICEVOXで音声を合成するために必要なAPIはすでに用意されていますが、もしAPIで実現できない機能/操作がある場合は、VOIEVOX の Issue ページにてAPIの実装提案を行う事をお勧めします。

### APIのアクセス先について

HTTP経由でAPIにアクセスできます。

* VOICEVOXエンジンがデフォルトで使用するポート番号は、内部で決まっています（例：50021/tcp）。
* 他のアプリケーションが同じポート番号を使用している場合、競合が発生するため別のポートを開きます。
* 最終的に開いたポート番号については、情報ファイルを参照して特定してください。
* 動的に番号が変更されるのは、VOICEVOX v0.16以降の機能です。

### ランタイム情報ファイル（以下情報ファイル）について

サードパーティが必要な情報を手に入れるために、「情報ファイル」というものが生成されるようになっています。サードパーティの製作者は、まずはこのファイルを参照してアクセス先を決定してください。

また、VOICEVOX内でエンジンが再起動した場合に、通信ポート番号が変わる可能性があります。サードパーティ側でAPI使用中に突如通信失敗が発生した場合は、このファイルが更新されているか確認するようにしてください。

（なお、古いVOICEVOXではこのファイル生成機能が実装されていません。また、動的にポート番号を決定しないバージョンもあります。下位互換性を保つためには、このファイルがない場合も想定してください）

## 情報ファイルについて

### ファイルの場所

ファイルは下記の場所にあります。

|OS              |ファイルパス                                                                 |
|----------------|-----------------------------------------------------------------------------|
|Windows         |C:\Users\（ユーザー名）\AppData\Roaming\voicevox\runtime-info.json           |
|MacOS           |/Users/（ユーザー名）/Library/Application Support/voicevox/runtime-info.json |

なお、Windows のプロファイル設定次第では、上記ファイルの配置が変更されることがあります。確実に場所を特定するためには、環境変数 ``APPDATA`` を用いて、Roamingフォルダの位置を特定してください。

### ファイルの中身と意味

ファイル自体はJSON形式になっています。構造としては下記のような形になります。

```JSONC
{
  //[string] VOICEVOXのバージョン番号
  "appVersion": "xxx.yyy.zzz",

  //[numb


//
//     Generated by class-dump 3.5 (64 bit).
//
//     class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2015 by Steve Nygard.
//

#import <IMAPSingleCommand.h>

@class NSDictionary, NSString;

@interface IMAPListCommand : IMAPSingleCommand
{
    NSString *_mailboxName;
    NSString *_referenceName;
    long long _options;
    NSDictionary *_listing;
    NSString *_separator;
}

@property(copy) NSString *separator; // @synthesize separator=_separator;
@property(copy) NSDictionary *listing; // @synthesize listing=_listing;
@property long long options; // @synthesize options=_options;
@property(copy) NSString *referenceName; // @synthesize referenceName=_referenceName;
@property(readonly, copy) NSString *mailboxName; // @synthesize mailboxName=_mailboxName;
//- (void).cxx_destruct;
- (long long)maxAllowedConnectionState;
- (long long)minRequiredConnectionState;
- (BOOL)executeOnConnection:(id)arg1;
- (id)newCommandDataForLiteralPlus:(BOOL)arg1;
- (BOOL)shouldSendAgainOnError;
- (id)activityString;
- (id)commandTypeString;
- (id)init;
- (id)initWithMailboxName:(id)arg1 options:(long long)arg2;
- (id)initWithMailboxName:(id)arg1 referenceName:(id)arg2 options:(long long)arg3;

@end


:after{border-left-color:#fff}.dropdown-submenu.pull-left{float:none}.dropdown-submenu.pull-left>.dropdown-menu{left:-100%;margin-left:00px}.bs-callout{padding:20px;margin:20px 0;border:1px solid #eee;border-left-width:5px;border-radius:3px;background-color:#fcfdff}.bs-callout h4{font-style:normal;font-weight:400;margin-top:0;margin-bottom:5px}.bs-callout p:last-child{margin-bottom:0}.bs-callout code{border-radius:3px}.bs-callout+.bs-callout{margin-top:-5px}.bs-callout-default{border-left-color:#fa023c}.bs-callout-default h4{color:#fa023c}.bs-callout-primary{border-left-color:#428bca}.bs-callout-primary h4{color:#428bca}.bs-callout-success{border-left-color:#5cb85c}.bs-callout-success h4{color:#5cb85c}.bs-callout-danger{border-left-color:#d9534f}.bs-callout-danger h4{color:#d9534f}.bs-callout-warning{border-left-color:#f0ad4e}.bs-callout-warning h4{color:#f0ad4e}.bs-callout-info{border-left-color:#5bc0de}.bs-callout-info h4{color:#5bc0de}.headerlink{display:none;padding-left:.5em}h1:hover .headerlink,h2:hover .headerlink,h3:hover .headerlink,h4:hover .headerlink,h5:hover .headerlink,h6:hover .headerlink{display:inline-block}.admonition{padding:20px;margin:20px 0;border:1px solid #eee;border-left-width:5px;border-radius:3px;background-color:#fcfdff}.admonition p:last-child{margin-bottom:0}.admonition code{border-radius:3px}.admonition+.admonition{margin-top:-5px}.admonition.note{border-left-color:#428bca}.admonition.warning{border-left-color:#f0ad4e}.admonition.danger{border-left-color:#d9534f}.admonition-title{font-size:19px;font-style:normal;font-weight:400;margin-top:0;margin-bottom:5px}.admonition.note>.admonition-title{color:#428bca}.admonition.warning>.admonition-title{color:#f0ad4e}.admonition.danger>.admonition-title{color:#d9534f}
@font-face {
  font-family: Ubuntu;
  src: url(Ubuntu/Ubuntu-Regular.ttf) format("truetype");
}
@font-face {
    font-family: UbuntuMono;
    src: url(Ubuntu_Mono/UbuntuMono-Regular.ttf) format("truetype");
  }

.remark-slide-number {
    display: none;
}

div.remark-slide {
    font-family: "Ubuntu";
}

/* Hide the preview of the next notes */
div.remark-notes-preview, div.remark-toggle, div.remark-notes-preview-area {
    display: none;
}

/*  Hide title of notes */
.remark-notes-area .remark-bottom-area .remark-toggle {
    display: none;
}

.remark-notes-area .remark-bottom-area .remark-notes-current-area .remark-notes {
    top: 0px;
}

/* Hide the timer */
.remark-toolbar span.remark-toolbar-timer {
    display: none;
}

div.remark-slide-content.middle {
    padding-top: 0em;
    pad


onSubmit = e => {
      e.preventDefault();
      saveNonPersonnelCost(activityIndex, index, {
        ...item,
        ...getValues()
      });
    };

    useEffect(() => {
      setFormValid(isValid);
    }, [isValid]); // eslint-disable-line react-hooks/exhaustive-deps

    const categories = catList.map(category => ({
      label: category,
      value: category
    }));
    categories.unshift({ label: 'Select an option', value: '' });
    return (
      <form id={`non-personnel-cost-${index}`} onSubmit={onSubmit}>
        {/* Prevent implicit submission of the form. */}
        <button
          type="submit"
          disabled
          style={{ display: 'none' }}
          aria-hidden="true"
          aria-label="submitButton"
        />

Non-Personnel Cost {index + 1}:

        <Controller
          control={control}
          name="category"
          render={({ field: { value, ...props } }) => (
            <Dropdown
              {...props}
              label="Category"
              name="category"
              options={categories}
              value={value}
              onChange={e => {
                setValue('category', e.target.value);
                trigger('category');
              }}
              onBlur={() => {
                trigger('category');
              }}
              errorMessage={errors?.category?.message}
              errorPlacement="bottom"
            />
          )}
        />

        <Controller
          control={control}
          name="description"
          render={({ field: { onChange, value, ...props } }) => (
            <TextArea
              {...props}
              label="Description"
              rows={5}
              name="description"
              value={value}
              onChange={onChange}
              errorMessage={errors?.description?.message}
              errorPlacement="bottom"
            />
          )}
        />

        {Object.entries(item.years).map(([year]) => (
          <Controller
            key={year}
            control={control}
            name={`years[${year}]`}
            render={({ field: { onChange, value, ...props } }) => (
              <DollarField
                {...props}
                key={year}
                label={`FFY ${year} Cost`}
                name={`years[${year}]`}
                size="medium"
                value={value}
                onChange={onChange}
                errorMessage={
                  errors && errors.years && errors?.years[`${year}`]?.message
                }
                errorPlacement="bottom"
              />
            )}
          />
        ))}
        <input
          className="ds-u-visibility--hidden"
          type="submit"
          ref={ref}
          hidden
          aria-label="submitButton"
        />
      </form>
    );
  }
);

NonPersonnelCostForm.propTypes = {
  activityIndex: PropTypes.number.isRequired,
  apdType: PropTypes.string,
  index: PropTypes.number.isRequired,
  item: PropTypes.shape({
    category: PropTypes.string.isRequired,
    description: PropTypes.string.isRequired,
    years: PropTypes.object.isRequired
  }).isRequired,
  saveNonPersonnelCost: PropTypes.func


mtime_linker_define_func(linker, "env", 3,    // module name
                                name, strlen(name),  // export name
                                ft,                  // type
                                cb,                  // callback
                                nullptr,             // env  (not needed)
                                nullptr              // finalizer (not needed)
    );
}

void wasm_dsp_factory::registerMathFuns(wasmtime_linker_t* linker, wasmtime_store_t* s)
{
    define_func(linker, s, "_abs", fn_1_1(WASM_I32, WASM_I32), _abs_cb);

#define REG_UN(name, kind) define_func(linker, s, #name, fn_1_1(kind, kind), name##_cb)
#define REG_BIN(name, kind) define_func(linker, s, #name, fn_2_1(kind, kind, kind), name##_cb)

    // Float
    REG_UN(_sinf, WASM_F32);
    REG_UN(_cosf, WASM_F32);
    REG_UN(_tanf, WASM_F32);
    REG_UN(_asinf, WASM_F32);
    REG_UN(_acosf, WASM_F32);
    REG_UN(_atanf, WASM_F32);
    REG_UN(_expf, WASM_F32);
    REG_UN(_logf, WASM_F32);
    REG_UN(_log10f, WASM_F32);
    REG_UN(_roundf, WASM_F32);
    REG_UN(_sinhf, WASM_F32);
    REG_UN(_coshf, WASM_F32);
    REG_UN(_tanhf, WASM_F32);
    REG_UN(_asinhf, WASM_F32);
    REG_UN(_acoshf, WASM_F32);
    REG_UN(_atanhf, WASM_F32);

    REG_BIN(_atan2f, WASM_F32);
    REG_BIN(_fmodf, WASM_F32);
    REG_BIN(_powf, WASM_F32);
    REG_BIN(_remainderf, WASM_F32);

    // Double
    REG_UN(_sin, WASM_F64);
    REG_UN(_cos, WASM_F64);
    REG_UN(_tan, WASM_F64);
    REG_UN(_asin, WASM_F64);
    REG_UN(_acos, WASM_F64);
    REG_UN(_atan, WASM_F64);
    REG_UN(_exp, WASM_F64);
    REG_UN(_log, WASM_F64);
    REG_UN(_log10, WASM_F64);
    REG_UN(_round, WASM_F64);
    REG_UN(_sinh, WASM_F64);
    REG_UN(_cosh, WASM_F64);
    REG_UN(_tanh, WASM_F64);
    REG_UN(_asinh, WASM_F64);
    REG_UN(_acosh, WASM_F64);
    REG_UN(_atanh, WASM_F64);

    REG_BIN(_atan2, WASM_F64);
    REG_BIN(_fmod, WASM_F64);
    REG_BIN(_pow, WASM_F64);
    REG_BIN(_remainder, WASM_F64);

#undef REG_UN
#undef REG_BIN
}

wasm_dsp_factory::wasm_dsp_factory(dsp_factory_base* factory)
    : wasm_dsp_factory(factory->getBinaryCode())
{
    fFactory = factory;
}

wasm_dsp_factory::~wasm_dsp_factory()
{
    if (fModule) {
        wasmtime_module_delete(fModule);
    }
    if (fLinker) {
        wasmtime_linker_delete(fLinker);
    }
    if (fEngine) {
        wasm_engine_delete(fEngine);
    }
    wasm_byte_vec_delete(&fWasmBytes);
}

LIBFAUST_API string wasm_dsp_factory::getSHAKey()
{
    return fFactory->getSHAKey();
}
LIBFAUST_API void wasm_dsp_factory::setSHAKey(const string& sha_key)
{
    fFactory->setSHAKey(sha_key);
}

LIBFAUST_API string wasm_dsp_factory:


, and IOE) are all zero.
//     * Generates only the default NaN, as if FPCR .DN is 1.
//
// ID_AA64ISAR1_EL1 .BF16 indicates whether this instruction is supported.
//
// 2. BFloat16 floating-point dot product (vector)
//
//    BFDOT  <Vd>.<Ta>, <Vn>.<Tb>, <Vm>.<Tb>
//
// BFloat16 floating-point dot product (vector). This instruction delimits the
// source vectors into pairs of BFloat16 elements.
//
// If FEAT_EBF16 is not implemented or FPCR .EBF is 0, this instruction:
//
//     * Performs an unfused sum-of-products of each pair of adjacent BFloat16
//       elements in the source vectors. The intermediate single-precision
//       products are rounded before they are summed, and the intermediate sum
//       is rounded before accumulation into the single-precision destination
//       element that overlaps with the corresponding pair of BFloat16 elements
//       in the source vectors.
//     * Uses the non-IEEE 754 Round-to-Odd rounding mode, which forces bit 0
//       of an inexact result to 1, and rounds an overflow to an appropriately
//       signed Infinity.
//     * Flushes denormalized inputs and results to zero, as if FPCR .{FZ, FIZ}
//       is {1, 1}.
//     * Disables alternative floating point behaviors, as if FPCR .AH is 0.
//
// If FEAT_EBF16 is implemented and FPCR .EBF is 1, then this instruction:
//
//     * Performs a fused sum-of-products of each pair of adjacent BFloat16
//       elements in the source vectors. The intermediate single-precision
//       products are not rounded before they are summed, but the intermediate
//       sum is rounded before accumulation into the single-precision
//       destination element that overlaps with the corresponding pair of
//       BFloat16 elements in the source vectors.
//     * Follows all other floating-point behaviors that apply to single-
//       precision arithmetic, as governed by FPCR .RMode, FPCR .FZ, FPCR .AH,
//       and FPCR .FIZ.
//
// Irrespective of FEAT_EBF16 and FPCR .EBF, this instruction:
//
//     * Does not modify the cumulative FPSR exception bits (IDC, IXC, UFC,
//       OFC, DZC, and IOC).
//     * Disables trapped floating-point exceptions, as if the FPCR trap enable
//       bits (IDE, IXE, UFE, OFE, DZE, and IOE) are all zero.
//     * Generates only the default NaN, as if FPCR .DN is 1.
//
// ID_AA64ISAR1_EL1 .BF16 indicates whether this instruction is supported.
//
func (self *Program) BFDOT(v0, v1, v2 interface{}) *Instruction {
    p := self.alloc("BFDOT", 3, asm.Operands { v0, v1, v2 })
    // BFDOT  <Vd>.<Ta>, <Vn>.<Tb>, <Vm>.2H[<index>]
    if isVr(v0) &&
       isVfmt(v0, Vec2S, Vec4S) &&
       isVr(v1) &&
       isVfmt(v1, Vec4H, Vec8H) &&
       isVri(v2) &&
       vmoder(v2) == Mode2H {
        self.Arch.Require(FEAT_BF16)
        p.Domain = DomainAdvSimd
        var sa_ta uint32
        var sa_tb uint32
        sa_vd := uint32(v0.(asm.Register).ID())
        switch vfmt(v0) {
            case Vec2S: sa_ta = 0b0
            case Vec4S: sa_ta = 0b1
            default: panic("aarch64: unreachable")
        }
        sa_vn := uint32(v1.(asm.Register).ID())
        switch vfmt(v1) {
            case Vec4H: sa_tb = 0b0
            case Vec8H: sa_tb = 0b1
            default: panic("aarch64: unreachable")
        }


 values for ManagedClusterSKUName.
    /// </summary>
    /// <summary>
    /// Determine base value for a given allowed value if exists, else return
    /// the value itself
    /// </summary>
    [JsonConverter(typeof(Management.ResourceManager.Fluent.Core.ExpandableStringEnumConverter<ManagedClusterSKUName>))]
    public class ManagedClusterSKUName : Management.ResourceManager.Fluent.Core.ExpandableStringEnum<ManagedClusterSKUName>
    {
        public static readonly ManagedClusterSKUName Basic = Parse("Basic");
    }
}


Class&, getClass);
PROXY(IClass, void, setClass, PlayerClass&);
PROXY_CAST(IClass, IIDProvider);

PROXY(IClassesComponent, IClass*, create, int, int, Vector3, float, WeaponSlots&);

PROXY_EVENT_DISPATCHER(IClassesComponent, ClassEventHandler, getEventDispatcher);
PROXY_EVENT_HANDLER_BEGIN(ClassEventHandler)
    PROXY_EVENT_HANDLER_EVENT(bool, onPlayerRequestClass, IPlayer&, unsigned int)
PROXY_EVENT_HANDLER_END(ClassEventHandler, onPlayerRequestClass)

// include/Server/Components/Console
PROXY(IConsoleComponent, void, send, StringView, ConsoleCommandSenderData&);
PROXY(IConsoleComponent, void, sendMessage, ConsoleCommandSenderData&, StringView);

PROXY_EVENT_DISPATCHER(IConsoleComponent, ConsoleEventHandler, getEventDispatcher);
PROXY_EVENT_HANDLER_BEGIN(ConsoleEventHandler)
    PROXY_EVENT_HANDLER_EVENT(bool, onConsoleText, StringView, StringView, const ConsoleCommandSenderData&)
    PROXY_EVENT_HANDLER_EVENT(void, onRconLoginAttempt, IPlayer&, StringView, bool)
    PROXY_EVENT_HANDLER_EVENT(void, onConsoleCommandListRequest, FlatHashSet<StringView>&)
PROXY_EVENT_HANDLER_END(ConsoleEventHandler, onConsoleText, onRconLoginAttempt, onConsoleCommandListRequest)

PROXY(IPlayerConsoleData, bool, hasConsoleAccess);
PROXY(IPlayerConsoleData, void, setConsoleAccessibility, bool);

// include/Server/Components/CustomModels
PROXY(IPlayerCustomModelsData, uint32_t, getCustomSkin);
PROXY(IPlayerCustomModelsData, void, setCustomSkin, uint32_t);
PROXY(IPlayerCustomModelsData, bool, sendDownloadUrl, StringView);

PROXY(ICustomModelsComponent, bool, addCustomModel, ModelType, int32_t, int32_t, StringView, StringView, int32_t, uint8_t, uint8_t);
PROXY(ICustomModelsComponent, bool, getBaseModel, uint32_t&, uint32_t&);
PROXY(ICustomModelsComponent, StringView, getModelNameFromChecksum, uint32_t);
PROXY(ICustomModelsComponent, bool, isValidCustomModel, int32_t);
PROXY(ICustomModelsComponent, bool, getCustomModelPath, int32_t, StringView&, StringView&);

PROXY_EVENT_DISPATCHER(ICustomModelsComponent, PlayerModelsEventHandler, getEventDispatcher);
PROXY_EVENT_HANDLER_BEGIN(PlayerModelsEventHandler)
    PROXY_EVENT_HANDLER_EVENT(void, onPlayerFinishedDownloading, IPlayer&)
    PROXY_EVENT_HANDLER_EVENT(bool, onPlayerRequestDownload, IPlayer&, ModelDownloadType, uint32_t)
PROXY_EVENT_HANDLER_END(PlayerModelsEventHandler, onPlayerFinishedDownloading, onPlayerRequestDownload)

// include/Server/Components/Databases
// @skip

// include/Server/Components/Dialogs
PROXY(IPlayerDialogData, void, hide, IPlayer&);
PROXY(IPlayerDialogData, void, show, IPlayer&, int, DialogStyle, StringView, StringView, StringView, StringView);
PROXY(IPlayerDialogData, void, get, int&, DialogStyle&, StringView&, StringView&, StringView&, StringView&);
PROXY(IPlayerDialogData, int, getActiveID)

PROXY_EVENT_DISPATCHER(IDialogsComponent, PlayerDialogEventHandler


// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

#nullable disable

using System.Collections.Generic;
using System.Collections.Immutable;

namespace Microsoft.CodeAnalysis.CSharp.Symbols
{
    internal sealed class ReturnTypeWellKnownAttributeData : CommonReturnTypeWellKnownAttributeData
    {
        private bool _hasMaybeNullAttribute;
        public bool HasMaybeNullAttribute
        {
            get
            {
                VerifySealed(expected: true);
                return _hasMaybeNullAttribute;
            }
            set
            {
                VerifySealed(expected: false);
                _hasMaybeNullAttribute = value;
                SetDataStored();
            }
        }

        private bool _hasNotNullAttribute;
        public bool HasNotNullAttribute
        {


());
	statScreenRefresh();
	clearOutput();
	outputText("You feel tougher from all the fights you have endured.");
	doNext(perkBuyMenu);
}

private  levelUpStatSpeed(): void {
	dynStats("spe", 5); //Gain +5 speed due to level
	clearOutput();
	outputText("Your time in combat has driven you to move faster.");
	doNext(perkBuyMenu);
}

private  levelUpStatIntelligence(): void {
	dynStats("int", 5); //Gain +5 Intelligence due to level
	clearOutput();
	outputText("Your time spent fighting the creatures of this realm has sharpened your wit.");
	doNext(perkBuyMenu);
}

private  perkBuyMenu(): void {
	clearOutput();
var  perkList: any[] = buildPerkList();

	if (perkList.length == 0) {
		outputText("You do not qualify for any perks at present.  In case you qualify for any in the future, you will keep your " + num2Text(player.perkPoints) + " perk point");
		if(player.perkPoints > 1) outputText("s");
		outputText(".");
		doNext(playerMenu);
		return;
	}
	if (testingBlockExiting) {
		menu();
		addButton(0, "Next", perkSelect, perkList[rand(perkList.length)].perk);
	}
	else {
		outputText("Please select a perk from the drop-down list, then click 'Okay'.  You can press 'Skip' to save your perk point for later.\n\n");
		mainView.aCb.x = 210;
		mainView.aCb.y = 112;

		if (mainView.aCb.parent == undefined) {
			mainView.addChild(mainView.aCb);
			mainView.aCb.visible = true;
		}

		mainView.hideMenuButton( MainView.MENU_NEW_MAIN );
		menu();
		addButton(1, "Skip", perkSkip);
	}
}

private  perkSelect(selected:PerkClass): void {
	stage.focus = undefined;
	if (mainView.aCb.parent != undefined) {
		mainView.removeChild(mainView.aCb);
		applyPerk(selected);
	}
}

private  perkSkip(): void {
	stage.focus = undefined;
	if (mainView.aCb.parent != undefined) {
		mainView.removeChild(mainView.aCb);
		playerMenu();
	}
}

private  changeHandler(event:Event): void {
 	//Store perk name for later addition
	clearOutput();
 var  selected:PerkClass = ComboBox(event.target).selectedItem.perk;
	mainView.aCb.move(210, 85);
	outputText("You have selected the following perk:\n\n");
	outputText("" + selected.perkName + ": " + selected.perkLongDesc + "\n\nIf you would like to select this perk, click Okay.  Otherwise, select a new perk, or press Skip to make a decision later.");
	menu();
	addButton(0, "Okay", perkSelect, selected);
	addButton(1, "Skip", perkSkip);
}

public  buildPerkList(): any[] {
var  perkList: any[] = [];
function  _add(p:PerkClass): void{
		perkList.push({label: p.perkName,perk:p});
	}
	//STRENGTH PERKS
	if(player.str >= 25) {
		_add(new PerkClass(PerkLib.StrongBack));
	}
	if(player.findPerk(PerkLib.StrongBack) >= 0 && player.str >= 50) {
		_add(new PerkClass(PerkLib.StrongBack2));
	}
	//Tier 1 Strength Perks
	if(player.level >= 6) {
		//Thunderous Strikes - +20% basic attack damage while str > 80.
		if(player.str >= 80) {
			_add(new PerkClass(PerkLib.ThunderousStrikes));
		}
		//Weapon Mastery -


h3>

Before animating, ngAnimate checks to see if the element being animated is inside the application DOM tree,
and if it is not, no animation is run. Usually, this is not a problem as most apps use the ngApp
attribute / bootstrap the app on the html or body element.

Problems arise when the application is bootstrapped on a different element, and animations are
attempted on elements that are outside the application tree, e.g. when libraries append popup and modal
elements as the last child in the body tag.

You can use $animate.pin(elementToAnimate, parentHost) to specify that an
element belongs to your application. Simply call it before the element is added to the DOM / before
the animation starts, with the element you want to animate, and the element which should be its
assumed parent.

More about animations

For a full breakdown of each method available on $animate, see the API documentation.

To see a complete demo, see the animation step within the AngularJS phonecat tutorial.

 Improve this Doc

In this step, we will change the way our application fetches data.

We define a custom service that represents a RESTful client. Using this client we can
make requests for data to the server in an easier way, without having to deal with the lower-level
$http API, HTTP methods and URLs.

Dependencies

The RESTful functionality is provided by Angular in the ngResource module, which
is distributed separately from the core Angular framework.

Since we are using Bower to install client-side dependencies, this step updates the
bower.json configuration file to include the new dependency:

bower.json:

{
  "name": "angular-phonecat",
  "description": "A starter project for AngularJS",
  "version": "0.0.0",
  "homepage": "https://github.com/angular/angular-phonecat",
  "license": "MIT",
  "private": true,
  "dependencies": {
    "angular": "1.5.x",
    "angular-mocks": "1.5.x",
    "angular-resource": "1.5.x",
    "angular-route": "1.5.x",
    "bootstrap": "3.3.x"
  }
}

The new dependency "angular-resource": "1.5.x"


psllw $100,%xmm4
	psrad $100,%xmm4
	psraw $100,%xmm4
	psrld $100,%xmm4
	psrldq $100,%xmm4
	psrlq $100,%xmm4
	psrlw $100,%xmm4

# Tests for op imm8, xmm, regl
	pextrw $100,%xmm4,%ecx

	.intel_syntax noprefix
# Tests for op mem64
	ldmxcsr DWORD PTR [ecx]
	stmxcsr DWORD PTR [ecx]

# Tests for op xmm/mem128, xmm
	cvtdq2ps xmm6,xmm4
	cvtdq2ps xmm4,XMMWORD PTR [ecx]
	cvtpd2dq xmm6,xmm4
	cvtpd2dq xmm4,XMMWORD PTR [ecx]
	cvtpd2ps xmm6,xmm4
	cvtpd2ps xmm4,XMMWORD PTR [ecx]
	cvtps2dq xmm6,xmm4
	cvtps2dq xmm4,XMMWORD PTR [ecx]
	cvttpd2dq xmm6,xmm4
	cvttpd2dq xmm4,XMMWORD PTR [ecx]
	cvttps2dq xmm6,xmm4
	cvttps2dq xmm4,XMMWORD PTR [ecx]
	movapd xmm6,xmm4
	movapd xmm4,XMMWORD PTR [ecx]
	movaps xmm6,xmm4
	movaps xmm4,XMMWORD PTR [ecx]
	movdqa xmm6,xmm4
	movdqa xmm4,XMMWORD PTR [ecx]
	movdqu xmm6,xmm4
	movdqu xmm4,XMMWORD PTR [ecx]
	movshdup xmm6,xmm4
	movshdup xmm4,XMMWORD PTR [ecx]
	movsldup xmm6,xmm4
	movsldup xmm4,XMMWORD PTR [ecx]
	movupd xmm6,xmm4
	movupd xmm4,XMMWORD PTR [ecx]
	movups xmm6,xmm4
	movups xmm4,XMMWORD PTR [ecx]
	pabsb xmm6,xmm4
	pabsb xmm4,XMMWORD PTR [ecx]
	pabsw xmm6,xmm4
	pabsw xmm4,XMMWORD PTR [ecx]
	pabsd xmm6,xmm4
	pabsd xmm4,XMMWORD PTR [ecx]
	phminposuw xmm6,xmm4
	phminposuw xmm4,XMMWORD PTR [ecx]
	ptest xmm6,xmm4
	ptest xmm4,XMMWORD PTR [ecx]
	rcpps xmm6,xmm4
	rcpps xmm4,XMMWORD PTR [ecx]
	rsqrtps xmm6,xmm4
	rsqrtps xmm4,XMMWORD PTR [ecx]
	sqrtpd xmm6,xmm4
	sqrtpd xmm4,XMMWORD PTR [ecx]
	sqrtps xmm6,xmm4
	sqrtps xmm4,XMMWORD PTR [ecx]
	aesimc xmm6,xmm4
	aesimc xmm4,XMMWORD PTR [ecx]

# Tests for op xmm, xmm/mem128
	movapd xmm6,xmm4
	movapd XMMWORD PTR [ecx],xmm4
	movaps xmm6,xmm4
	movaps XMMWORD PTR [ecx],xmm4
	movdqa xmm6,xmm4
	movdqa XMMWORD PTR [ecx],xmm4
	movdqu xmm6,xmm4
	movdqu XMMWORD PTR [ecx],xmm4
	movupd xmm6,xmm4
	movu


anaguru.rules.keystore.RemarkMessageStore.CHECK_LINK_PERTINENCE_MSG;
import static org.tanaguru.rules.keystore.RemarkMessageStore.UNEXPLICIT_LINK_MSG;

/**
 * Implementation of the rule 6.3.3 of the referential Accessiweb 2.2.
 *

 * For more details about the implementation, refer to the rule 6.3.3 design page.
 * @see  6.3.3 rule specification
 *
 */
public class Aw22Rule06033 extends AbstractLinkRuleImplementation {

    /**
     * Default constructor
     */
    public Aw22Rule06033 () {
        // context is taken into consideration
        super(new AreaLinkElementSelector(false),
              new LinkPertinenceChecker(
                    // not pertinent solution
                    TestSolution.FAILED,
                    // not pertinent message
                    UNEXPLICIT_LINK_MSG,
                    // manual check message
                    CHECK_LINK_PERTINENCE_MSG,
                    // evidence elements
                    TEXT_ELEMENT2,
                    TITLE_ATTR
              ),
              null);
    }
}/*
 * Tanaguru - Automated webpage assessment
 * Copyright (C) 2008-2015  Tanaguru.org
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as
 * published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 * Contact us by mail: tanaguru AT tanaguru DOT org
 */

package org.tanaguru.rules.accessiweb22;

import org.tanaguru.entity.audit.TestSolution;
import org.tanaguru.ruleimplementation.AbstractDetectionPageRuleImplementation;
import org.tanaguru.rules.elementselector.ImageElementSelector;
import static org.tanaguru.rules.keystore.AttributeStore.CODE_ATTR;
import static org.tanaguru.rules.keystore.HtmlElementStore.APPLET_ELEMENT;
import static org.tanaguru.rules.keystore.RemarkMessageStore.MANUAL_CHECK_ON_ELEMENTS_MSG;

/**
 * Implementation of the rule 1.8.4 of the referential Accessiweb 2.2.
 *

 * For more details about the implementation, refer to the rule 1.8.4 design page.
 * @see  1.8.4 rule specification
 *
 * @author jkowalczyk
 */

public class Aw22Rule01084 extends AbstractDetectionPageRuleImplementation {

    /**
     * Default constructor
     */
    public Aw22Rule01084 () {
        super(
                new ImageElementSelector(APPLET_ELEMENT),
                // solution when at least one element is found
                TestSolution.NEED_MORE_INFO,
                // solution when no element is found
                TestSolution.NOT_APPLICABLE,
                // manual check message
                MANUAL_CHECK_ON_ELEMENTS_MSG,
                null,
                // evidence elements
                CODE_ATTR
            );
    }

}/*
 * Tanaguru - Automated webpage assessment
 * Copyright (C) 2008-2015  Tanaguru.org
 *
 *


+ kernel_w_, width_ + pad_w_);
            int pool_size = (hend - hstart) * (wend - wstart);
            hstart = max(hstart, 0);
            wstart = max(wstart, 0);
            hend = min(hend, height_);
            wend = min(wend, width_);
            for (int h = hstart; h < hend; ++h) {
              for (int w = wstart; w < wend; ++w) {
                bottom_diff[h * width_ + w] +=
                  top_diff[ph * pooled_width_ + pw] / pool_size;
              }
            }
          }
        }
        // offset
        bottom_diff += bottom[0]->offset(0, 1);
        top_diff += top[0]->offset(0, 1);
      }
    }
    break;
  case PoolingParameter_PoolMethod_STOCHASTIC:
    NOT_IMPLEMENTED;
    break;
  default:
    LOG(FATAL) << "Unknown pooling method.";
  }
}

#ifdef CPU_ONLY
STUB_GPU(PoolingLayer);
#endif

INSTANTIATE_CLASS(PoolingLayer);

}  // namespace caffe
#include <algorithm>
#include <vector>

#include "caffe/layer.hpp"
#include "caffe/layers/concat_layer.hpp"
#include "caffe/layers/flatten_layer.hpp"
#include "caffe/layers/pooling_layer.hpp"
#include "caffe/layers/split_layer.hpp"
#include "caffe/layers/spp_layer.hpp"

namespace caffe {

using std::min;
using std::max;

template <typename Dtype>
LayerParameter SPPLayer<Dtype>::GetPoolingParam(const int pyramid_level,
      const int bottom_h, const int bottom_w, const SPPParameter spp_param) {
  LayerParameter pooling_param;
  int num_bins = pow(2, pyramid_level);

  // find padding and kernel size so that the pooling is
  // performed across the entire image
  int kernel_h = ceil(bottom_h / static_cast<double>(num_bins));
  // remainder_h is the min number of pixels that need to be padded before
  // entire image height is pooled over with the chosen kernel dimension
  int remainder_h = kernel_h * num_bins - bottom_h;
  // pooling layer pads (2 * pad_h) pixels on the top and bottom of the
  // image.
  int pad_h = (remainder_h + 1) / 2;

  // similar logic for width
  int kernel_w = ceil(bottom_w / static_cast<double>(num_bins));
  int remainder_w = kernel_w * num_bins - bottom_w;
  int pad_w = (remainder_w + 1) / 2;

  pooling_param.mutable_pooling_param()->set_pad_h(pad_h);
  pooling_param.mutable_pooling_param()->set_pad_w(pad_w);
  pooling_param.mutable_pooling_param()->set_kernel_h(kernel_h);
  pooling_param.mutable_pooling_param()->set_kernel_w(kernel_w);
  pooling_param.mutable_pooling_param()->set_stride_h(kernel_h);
  pooling_param.mutable_pooling_param()->set_stride_w(kernel_w);

  switch (spp_param.pool()) {
  case SPPParameter_PoolMethod_MAX:
    pooling_param.mutable_pooling_param()->set_pool(
        PoolingParameter_PoolMethod_MAX);
    break;
  case SPPParameter_PoolMethod_AVE:
    pooling_param.mutable_pooling_param()->set_pool(
        PoolingParameter_PoolMethod_AVE);
    break;
  case SPPParameter_PoolMethod_STOCHASTIC:
    pooling_param.mutable_pooling_param()->set_pool(
        PoolingParameter_PoolMethod_STOCH


# MIT License
#
# Copyright The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
# distribute, sublicense, and/or sell copies of the Software, and to
# permit persons to whom the Software is furnished to do so, subject to
# the following conditions:
#
# The above copyright notice and this permission notice shall be included
# in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
# KIND, EXPRESS OR IMPLIED, INCLUDING 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.

"""
Internal method dispatcher for Microsoft Visual C/C++.

MSVC modules can register their module (register_modulename) and individual
classes (register_class) with the method dispatcher during initialization. MSVC
modules tend to be registered immediately after the Dispatcher import near the
top of the file. Methods in the MSVC modules can be invoked indirectly without
having to hard-code the method calls effectively decoupling the upstream module
with the downstream modules:

The reset method dispatches calls to all registered objects with a reset method
and/or a _reset method. The reset methods are used to restore data structures
to their initial state for testing purposes. Typically, this involves clearing
cached values.

The verify method dispatches calls to all registered objects with a verify
method and/or a _verify method. The verify methods are used to check that
initialized data structures distributed across multiple modules are internally
consistent.  An exception is raised when a verification constraint violation
is detected.  Typically, this verifies that initialized dictionaries support
all of the requisite keys as new versions are added.
"""

import sys

from ..common import (
    debug,
)

_refs = []

def register_modulename(modname):
    module = sys.modules[modname]
    _refs.append(module)

def register_class(ref):
    _refs.append(ref)

def reset():
    debug('')
    for ref in _refs:
        for method in ['reset', '_reset']:
            if not hasattr(ref, method) or not callable(getattr(ref, method, None)):
                continue
            debug('call %s.%s()', ref.__name__, method)
            func = getattr(ref, method)
            func()

def verify():
    debug('')
    for ref in _refs:
        for method in ['verify', '_verify']:
            if not hasattr(ref, method) or not callable(getattr(ref, method, None)):
                continue
            debug('call %s.%s()', ref.__name__, method)
            func = getattr(ref, method)
            func()


SOCIAL_LEVELING;
	else
		return nil;
	end
end

function ClubFinderGuildCardMixin:SetReportedCardState(isReported)
	self.Name:SetShown(not isReported);
	self.Description:SetShown(not isReported);
	self.MemberCount:SetShown(not isReported);
	self.RequestJoin:SetShown(not isReported);
	self.MemberIcon:SetShown(not isReported);
	self.ReportedDescription:SetShown(isReported);
	self.RequestStatus:SetShown(isReported);
	self.Focus:SetShown(not isReported);
	self:SetDisabledState(isReported)
	if(isReported) then
		self.RequestStatus:SetText(CLUB_FINDER_REPORTED);
		SetLargeGuildTabardTextures(nil, self.GuildBannerEmblemLogo, self.GuildBannerBackground, self.GuildBannerBorder, nil);
		self.RequestStatus:SetTextColor(RED_FONT_COLOR:GetRGB());
	end
	self.isReported = isReported;
end

function ClubFinderGuildCardMixin:UpdateCard()
	local info = self.cardInfo;
	if (info.isReported) then
		self:SetReportedCardState(true);
		return;
	else
		self:SetReportedCardState(false);
	end
	local clubStatus = C_ClubFinder.GetPlayerClubApplicationStatus(info.clubFinderGUID);

	self:CreateRecruitingSpecsMap();

	self.Name:SetText(info.name);
	self.Description:SetText(info.comment:gsub("\n",""));
	self.MemberCount:SetText(info.numActiveMembers);
	local focusString = ClubFinderGetFocusStringFromFlags(info.recruitmentFlags);
	if (focusString) then
		self.Focus:SetText(CLUB_FINDER_FOCUS_STRING:format(focusString));
		self.Focus:Show();
	else
		self.Focus:Hide();
	end
	SetLargeGuildTabardTextures(nil, self.GuildBannerEmblemLogo, self.GuildBannerBackground, self.GuildBannerBorder, info.tabardInfo);

	if(C_ClubFinder.DoesPlayerBelongToClubFromClubGUID(info.clubFinderGUID)) then
		self.RequestJoin:Hide();
		self.RequestStatus:Show();
		self.RequestStatus:SetText(CLUB_FINDER_ALREADY_IN_THAT_CLUB);
		self.RequestStatus:SetTextColor(RED_FONT_COLOR:GetRGB());
		self:SetDisabledState(true);
	elseif (clubStatus) then
		self.RequestJoin:Hide();
		self.RequestStatus:Show();
		if(clubStatus == Enum.PlayerClubRequestStatus.None) then
			self.RequestJoin:Show();
			self.RequestStatus:Hide();
			self:SetDisabledState(false);
		elseif (clubStatus == Enum.PlayerClubRequestStatus.Pending) then
			self.RequestStatus:SetTextColor(GREEN_FONT_COLOR:GetRGB());
			self.RequestStatus:SetText(CLUB_FINDER_PENDING);
			self:SetDisabledState(false);
		elseif (clubStatus == Enum.PlayerClubRequestStatus.Approved or clubStatus == Enum.PlayerClubRequestStatus.AutoApproved) then
			self.RequestStatus:SetText(CLUB_FINDER_INVITED);
			self.RequestStatus:SetTextColor(GREEN_FONT_COLOR:GetRGB());
			self:SetDisabledState(false);
		elseif (clubStatus == Enum.PlayerClubRequestStatus.Declined) then
			self.RequestStatus:SetText(CLUB_FINDER_DECLINED);
			self.RequestStatus:SetTextColor(RED_FONT_COLOR:GetRGB());
			self:SetDisabledState(true);
		elseif (clubStatus == Enum.PlayerClubRequestStatus.Canceled) then
			s


tree--directory__children{overflow:hidden;padding-left:16px}.tox .tox-tree .tox-tree--directory__children.tox-tree--directory__children--growing,.tox .tox-tree .tox-tree--directory__children.tox-tree--directory__children--shrinking{transition:height .5s ease-in-out}.tox .tox-tree .tox-trbtn.tox-tree--leaf__label{display:flex;justify-content:space-between}.tox .tox-view-wrap,.tox .tox-view-wrap__slot-container{background-color:#222f3e;display:flex;flex:1;flex-direction:column}.tox .tox-view{display:flex;flex:1 1 auto;flex-direction:column;overflow:hidden}.tox .tox-view__header{align-items:center;display:flex;font-size:16px;justify-content:space-between;padding:8px 8px 0 8px;position:relative}.tox .tox-view--mobile.tox-view__header,.tox .tox-view--mobile.tox-view__toolbar{padding:8px}.tox .tox-view--scrolling{flex-wrap:nowrap;overflow-x:auto}.tox .tox-view__toolbar{display:flex;flex-direction:row;gap:8px;justify-content:space-between;padding:8px 8px 0 8px}.tox .tox-view__toolbar__group{display:flex;flex-direction:row;gap:12px}.tox .tox-view__header-end,.tox .tox-view__header-start{display:flex}.tox .tox-view__pane{height:100%;padding:8px;width:100%}.tox .tox-view__pane_panel{border:1px solid #161f29;border-radius:6px}.tox:not([dir=rtl]) .tox-view__header .tox-view__header-end>*,.tox:not([dir=rtl]) .tox-view__header .tox-view__header-start>*{margin-left:8px}.tox[dir=rtl] .tox-view__header .tox-view__header-end>*,.tox[dir=rtl] .tox-view__header .tox-view__header-start>*{margin-right:8px}.tox .tox-well{border:1px solid #161f29;border-radius:6px;padding:8px;width:100%}.tox .tox-well>:first-child{margin-top:0}.tox .tox-well>:last-child{margin-bottom:0}.tox .tox-well>:only-child{margin:0}.tox .tox-custom-editor{border:1px solid #161f29;border-radius:6px;display:flex;flex:1;overflow:hidden;position:relative}.tox .tox-dialog-loading::before{background-color:rgba(0,0,0,.5);content:"";height:100%;position:absolute;width:100%;z-index:1000}.tox .tox-tab{cursor:pointer}.tox .tox-dialog__content-js{display:flex;flex:1}.tox .tox-dialog__body-content .tox-collection{display:flex;flex:1}.tox.tox-tinymce-aux .tox-toolbar__overflow{box-shadow:0 0 0 1px rgba(255,255,255,.15)}
@charset "UTF-8";
/*!
 * Bootstrap  v5.3.3 (https://getbootstrap.com/)
 * Copyright 2011-2024 The Bootstrap Authors
 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
 */
:root,
[data-bs-theme=light] {
  --bs-blue: #0d6efd;
  --bs-indigo: #6610f2;
  --bs-purple: #6f42c1;
  --bs-pink: #d63384;
  --bs-red: #dc3545;
  --bs-orange: #fd7e14;
  --bs-yellow: #ffc107;
  --bs-green: #198754;
  --bs-teal: #20c997;
  --bs-cyan: #0dcaf0;
  --bs-black: #000;
  --bs-white: #fff;
  --bs-gray: #6c757d;
  --bs-gray-dark:


 9
            orange 4
            lemon 12
        */
        //</Union>

        //<Distinct>
        Product[] products = { new Product { Name = "apple", Code = 9 },
                               new Product { Name = "orange", Code = 4 },
                               new Product { Name = "apple", Code = 9 },
                               new Product { Name = "lemon", Code = 12 } };

        // Exclude duplicates.

        IEnumerable<Product> noduplicates =
            products.Distinct(new ProductComparer());

        foreach (var product in noduplicates)
            Console.WriteLine(product.Name + " " + product.Code);

        /*
            This code produces the following output:
            apple 9
            orange 4
            lemon 12
        */
        //</Distinct>

        //<Contains>
        Product[] fruits = { new Product { Name = "apple", Code = 9 },
                               new Product { Name = "orange", Code = 4 },
                               new Product { Name = "lemon", Code = 12 } };

        Product apple = new Product { Name = "apple", Code = 9 };
        Product kiwi = new Product { Name = "kiwi", Code = 8 };

        ProductComparer prodc = new ProductComparer();

        bool hasApple = fruits.Contains(apple, prodc);
        bool hasKiwi = fruits.Contains(kiwi, prodc);

        Console.WriteLine("Apple? " + hasApple);
        Console.WriteLine("Kiwi? " + hasKiwi);

        /*
            This code produces the following output:

            Apple? True
            Kiwi? False
        */

        //</Contains>

        //<Except>
        Product[] fruits1 = { new Product { Name = "apple", Code = 9 },
                               new Product { Name = "orange", Code = 4 },
                                new Product { Name = "lemon", Code = 12 } };

        Product[] fruits2 = { new Product { Name = "apple", Code = 9 } };

        // Get all the elements from the first array
        // except for the elements from the second array.

        IEnumerable<Product> except =
            fruits1.Except(fruits2, new ProductComparer());

        foreach (var product in except)
            Console.WriteLine(product.Name + " " + product.Code);

        /*
          This code produces the following output:

          orange 4
          lemon 12
        */

        //</Except>

        //<SequenceEqual>

        Product[] storeA = { new Product { Name = "apple", Code = 9 },
                               new Product { Name = "orange", Code = 4 } };

        Product[] storeB = { new Product { Name = "apple", Code = 9 },
                               new Product { Name = "orange", Code = 4 } };

        bool equalAB = storeA.SequenceEqual(storeB, new ProductComparer());

        Console.WriteLine("Equal? " + equalAB);

        /*
            This code produces the following output:

            Equal? True
        */

        //</SequenceEqual>

        Console.ReadLine();
    }
}


{
            page = pageContainer.CurrentPage;
        }
        else if (parent is FlyoutPage flyoutPage)
        {
            page = flyoutPage.IsPresented ? flyoutPage.Flyout : flyoutPage.Detail;

            if (page is IPageContainer<Page> container)
            {
                page = container.CurrentPage;
            }
        }
        else
        {
            while (parent is not null)
            {
                if (parent is ContentPage contentPage)
                {
                    page = contentPage;
                    break;
                }

                parent = parent.Parent;
            }
        }

        return page;
    }
}