# Copyright 2025 Pasteur Labs. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0

# Configuration file for the Sphinx documentation builder.
#
# For the full list of built-in configuration values, see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html

# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information

import os
import re
import shutil
from pathlib import Path

from tesseract_core import __version__

# Set the TESSERACT_API_PATH environment variable to the dummy Tesseract API
# This will be used to instantiate the Tesseract runtime so we can generate api docs
os.environ["TESSERACT_API_PATH"] = os.path.abspath(
    os.path.join(
        os.path.dirname(__file__), "..", "tests", "dummy_tesseract", "tesseract_api.py"
    )
)

project = "Tesseract"
copyright = "2025, Pasteur Labs"
author = "The Tesseract Team @ Pasteur Labs + OSS contributors"

# The short X.Y version
parsed_version = re.match(r"(\d+\.\d+\.\d+)", __version__)
if parsed_version:
    version = parsed_version.group(1)
else:
    version = "0.0.0"

# The full version, including alpha/beta/rc tags
release = __version__

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

extensions = [
    "myst_nb",
    "sphinx.ext.intersphinx",
    "sphinx.ext.autodoc",
    "sphinx.ext.napoleon",
    "sphinx.ext.viewcode",
    "sphinx_autodoc_typehints",
    "sphinx_click.ext",
    # Copy button for code blocks
    "sphinx_copybutton",
    # OpenGraph metadata for social media sharing
    "sphinxext.opengraph",
    # For tab-set directive
    "sphinx_design",
    # For nice rendering of Pydantic models
    "sphinxcontrib.autodoc_pydantic",
]

myst_enable_extensions = [
    "dollarmath",
    "colon_fence",
]

intersphinx_mapping = {
    "python": ("https://docs.python.org/3", None),
    "numpy": ("http://docs.scipy.org/doc/numpy/", None),
}

templates_path = []
exclude_patterns = ["build", "Thumbs.db", ".DS_Store"]

# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output

html_theme = "furo"
html_static_path = ["static"]
html_theme_options = {
    "light_logo": "logo-light.png",
    "dark_logo": "logo-dark.png",
    "sidebar_hide_name": True,
}
html_css_files = ["custom.css"]

# -- Custom directives ----------------------------------------------------

def zip_examples_folder() -> None:
    """Zip a folder and save it to the specified path."""
    import shutil
    from pathlib import Path

    here = Path(__file__).parent

    root_dir = (here / "..").resolve()
    archive_path = here / "downloads" / "examples.zip"

    shutil.make_archive(archive_path.with_suffix(""), "zip", root_dir, "examples")
    assert archive_path.exists()

def setup(app) -> None:
    """Sphinx setup function. Used to register custom stuff."""
    # HACK: We zip the examples folder here so that it can be downloaded
    zip_examples_folder()

# -- Handle Jupyter notebooks ------------------------------------------------

# Do not execute notebooks during build (just take existing output)
nb_execution_mode = "off"

# Copy example notebooks to auto_examples folder on every build
for example_notebook in Path("../demo").glob("*/demo.ipynb"):
    # Copy the example notebook to the docs folder
    dest = (Path("content/demo") / example_notebook.parent.name).with_suffix(".ipynb")
    shutil.copyfile(example_notebook, dest)


     border: Border.all(color: WebTheme.isDarkMode(context) ? WebTheme.darkGrey200 : WebTheme.grey200),
      ),
      child: Column(
        crossAxisAlignment: CrossAxisAlignment.start,
        children: [
          Material(
            color: Colors.transparent,
            child: InkWell(
              splashColor: WebTheme.getPrimaryColor(context).withOpacity(0.1),
              highlightColor: WebTheme.getPrimaryColor(context).withOpacity(0.05),
              onTap: () => widget.onToggleChapter(widget.chapter.id),
              child: Padding(
                padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 8),
                child: Row(
                  children: [
                    // 🚀 移除动画，简化箭头图标
                    Transform.rotate(
                      angle: isChapterExpandedForScenes ? 0.0 : -1.5708,
                      child: Icon(
                        Icons.keyboard_arrow_down,
                        size: 14,
                        color: WebTheme.getSecondaryTextColor(context),
                      ),
                    ),
                    const SizedBox(width: 6),

                    // 🚀 移除活跃状态指示器

                    Expanded(
                      child: Text(
                        '第${widget.chapterNumberInAct}章：${widget.chapter.title}',
                        style: TextStyle(
                          fontSize: 12,
                          fontWeight: FontWeight.w500, // 🚀 统一字重
                          color: WebTheme.getTextColor(context),
                        ),
                        overflow: TextOverflow.ellipsis,
                      ),
                    ),

                    // 简化跳转按钮
                    Material(
                      color: Colors.transparent,
                      child: InkWell(
                        onTap: () => widget.onNavigateToChapter(widget.act.id, widget.chapter.id),
                        child: Tooltip(
                          message: '跳转到此章节',
                          child: Padding(
                            padding: const EdgeInsets.all(4.0),
                            child: Icon(
                              Icons.shortcut_rounded,
                              size: 14,
                              color: WebTheme.getSecondaryTextColor(context),
                            ),
                          ),
                        ),
                      ),
                    ),
                    const SizedBox(width: 4),

                    Container(
                      padding: const EdgeInsets.symmetric(horizontal: 4, vertical: 1),
                      color: WebTheme.isDarkMode(context) ? WebTheme.darkGrey100 : WebTheme.grey100,
                      child: Row(
                        mainAxisSize: MainAxisSize.min,
                        children: [
                          Icon(
                            Icons.notes_outlined,
                            size: 8,
                            color: WebTheme.getSecondaryTextColor(context),
                          ),
                          const SizedBox(width: 2),
                          Text(
                            '${widget.chapter.scenes.length}',
                            style: TextStyle(
                              fontSize: 9,
                              color: WebTheme.getSecondaryTextColor(context),
                              fontWeight: FontWeight.w500,
                            ),
                          ),
                        ],
                      ),
                    ),
                  ],
                ),
              ),
            ),
          ),
          // 🚀 优化：只有展开时才构建场景列表
          if (isChapterExpanded


 {
    checkins: createSelectorFromImageSrc(['a0b87sO1_bq', '9Zt6zuj8e1D']),
    website: createSelectorFromImageSrc(['TcXGKbk-rV1', 'xVA3lB-GVep', 'EaDvTjOwxIV', 'aE7VLFYMYdl', '_E0siE7VRxg']),
    categories: createSelectorFromImageSrc(['Knsy-moHXi6', 'LwDWwC1d0Rx', '3OfQvJdYD_W', 'Esxx6rJcLfG']),
    email: createSelectorFromImageSrc(['C1eWXyukMez', 'vKDzW_MdhyP', 'vPTKpTJr2Py']),
    info: createSelectorFromImageSrc(['u_owK2Sz5n6', 'fTt3W6Nw8z-', 'ufx6pe0BYZ9', 'nUK82gYKq3c']), // about / founded
    impressum: createSelectorFromImageSrc(['7Pg05R2u_QQ', 'xJ79lPp3fxx']),
    instagram: createSelectorFromImageSrc(['EZj5-1P4vhh', 'kupnBwrQuQt']),
    twitter: createSelectorFromImageSrc(['IP-E0-f5J0m', '4D5dB8JnGdq']),
    youtube: createSelectorFromImageSrc(['MyCpzAb80U1']),
    overview: createSelectorFromImageSrc(['uAsvCr33XaU', 'J7QgCgbppF8']),
    awards: createSelectorFromImageSrc(['rzXNHRgEfui', 'catvAig7x2x']),
    mission: createSelectorFromImageSrc(['z-wfU5xgk6Z', '3vccp1jK8fn']),
    address: createSelectorFromImageSrc(['h2e1qHNjIzG', 'ya-WX5CZARc']),
    phone: createSelectorFromImageSrc(['6oGknb-0EsE', 'znYEAkatLCe', 'BaiUsFiMGWy']),
    priceRange: createSelectorFromImageSrc(['q-WY9vrfkFZ', 'cAfaJdw2ZpN']),
    products: createSelectorFromImageSrc(['bBMZ-3vnEih', '9gnPGIXZf0x']),
    transit: createSelectorFromImageSrc(['uQHLMTQ0fUS', 'hHYECN5fVxU']),
    payment: createSelectorFromImageSrc(['Dx9c291MaDt', '8qES65kbIT8']),
};

/**
 * General page selectors
 */
export const pageSelectors = {
    // eslint-disable-next-line max-len
    verified: createPageSelector('#msite-pages-header-contents > div:not([class]):not([id]) > div:not([class]):not([id])', 'mobilePageHeader', async (els) => {
        if (!els.length) {
            return false;
        }

        return !!(await els[0].$(CSS_SELECTORS.VERIFIED));
    }),
    messenger: createPageSelector('a[href^="https://m.me"]', 'messenger', async (els) => {
        if (!els.length) {
            return '';
        }

        return els[0].evaluate(async (el) => (el as HTMLLinkElement).href);
    }),
    // returns LD+JSON page information
    ld: createPageSelector(CSS_SELECTORS.LDJSON, 'ld', async (els) => {
        if (!els.length) {
            return [] as FbLocalBusiness[];
        }

        return evaluateFilterMap(els, async (el) => {
            const jsonContent = el.innerHTML;

            if (!jsonContent) {
                return;
            }

            return JSON.parse(jsonContent) as FbLocalBusiness;
        });
    }),
    // get metadata from posts
    posts: createPageSelector(CSS_SELECTORS.POST_TIME, 'posts', async (els) => {
        return evaluateFilterMap(els, async (el) => {
            const article = el.closest<HTMLDivElement>('[role="article"]');

            if (article) {
                const isPinned = !!(article.querySelector('i[data-tooltip-content].img'));
                const { utime } = (el as HTMLElement).dataset;
                const url = el.closest<HTMLAnchorElement>('a[href]:not([data-ft])')?.href;

                if (!utime || !url) {
                    return;
                }

                con


e,L,C,g),S6n(g,w,a,f)&&(a=g,f=w,o=E);return o}function f_n(e,t,n,r){var a,o,f,g,w,E,C,L,B,z,V;for(f=l(Oe(t,0),27),Ku(f,0),Wu(f,0),B=new bt,zn(B.c,f),g=f,o=new q4e(e.a,f.g,f.f,(VA(),zB)),z=1;z<t.i;z++)V=l(Oe(t,z),27),w=ble(e,Q6,V,g,o,B,n),E=ble(e,e9,V,g,o,B,n),C=ble(e,xM,V,g,o,B,n),L=ble(e,yM,V,g,o,B,n),a=zLn(e,w,E,C,L,V,g,r),Ku(V,a.d),Wu(V,a.e),Re(a,zB),o=a,g=V,zn(B.c,V);return o}function d_n(e,t,n){var r,a,o,f,g,w,E,C,L,B;if(C=null,B=t,L=Kct(e,Fct(n),B),fE(L,Wg(B,Id)),f=Mw(B,fSe),r=new wtt(e,L),Bkn(r.a,r.b,f),g=Mw(B,Xfe),a=new ytt(e,L),Fkn(a.a,a.b,g),(!L.b&&(L.b=new An(Sr,L,4,7)),L.b).i==0||(!L.c&&(L.c=new An(Sr,L,5,8)),L.c).i==0)throw o=Wg(B,Id),w=x4t+o,E=w+kT,ue(new ld(E));return vU(B,L),mIn(e,B,L),C=yce(e,B,L),C}function g_n(e,t){var n,r,a,o,f,g,w;for(a=We(Vr,gi,28,e.e.a.c.length,15,1),f=new G(e.e.a);f.a<f.c.c.length;)o=l(re(f),125),a[o.d]+=o.b.a.c.length;for(g=PO(t);g.b!=0;)for(o=l(g.b==0?null:(mr(g.b!=0),sf(g,g.a.a)),125),r=cx(new G(o.g.a));r.Ob();)n=l(r.Pb(),218),w=n.e,w.e=b.Math.max(w.e,o.e+n.a),--a[w.d],a[w.d]==0&&_s(g,w,g.c.b,g.c)}function smt(e){var t,n,r,a,o,f,g,w,E,C,L;for(n=co,a=Oi,g=new G(e.e.a);g.a<g.c.c.length;)o=l(re(g),125),a=b.Math.min(a,o.e),n=b.Math.max(n,o.e);for(t=We(Vr,gi,28,n-a+1,15,1),f=new G(e.e.a);f.a<f.c.c.length;)o=l(re(f),125),o.e-=a,++t[o.e];if(r=0,e.k!=null)for(E=e.k,C=0,L=E.length;C<L&&(w=E[C],t


    ],
    'padded-blocks': [2, 'never'],
    quotes: [
      2,
      'single',
      {
        avoidEscape: true,
        allowTemplateLiterals: true
      }
    ],
    semi: [2, 'never'],
    'semi-spacing': [
      2,
      {
        before: false,
        after: true
      }
    ],
    'space-before-blocks': [2, 'always'],
    'space-before-function-paren': [2, 'never'],
    'space-in-parens': [2, 'never'],
    'space-infix-ops': 2,
    'space-unary-ops': [
      2,
      {
        words: true,
        nonwords: false
      }
    ],
    'spaced-comment': [
      2,
      'always',
      {
        markers: ['global', 'globals', 'eslint', 'eslint-disable', '*package', '!', ',']
      }
    ],
    'template-curly-spacing': [2, 'never'],
    'use-isnan': 2,
    'valid-typeof': 2,
    'wrap-iife': [2, 'any'],
    'yield-star-spacing': [2, 'both'],
    yoda: [2, 'never'],
    'prefer-const': 2,
    'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0,
    'object-curly-spacing': [
      2,
      'always',
      {
        objectsInObjects: false
      }
    ],
    'array-bracket-spacing': [2, 'never']
  }
}
/*!-----------------------------------------------------------
 * Copyright (c) Microsoft Corporation. All rights reserved.
 * Version: 0.23.0(82e8ea39fc101d639262435542c7d43bc20d8aa2)
 * Released under the MIT license
 * https://github.com/microsoft/vscode/blob/main/LICENSE.txt
 *-----------------------------------------------------------*/define("vs/editor/editor.main.nls.ko",{"vs/base/browser/ui/actionbar/actionViewItems":["{0}({1})"],"vs/base/browser/ui/findinput/findInput":["\uC785\uB825"],"vs/base/browser/ui/findinput/findInputCheckboxes":["\uB300/\uC18C\uBB38\uC790 \uAD6C\uBD84","\uB2E8\uC5B4 \uB2E8\uC704\uB85C","\uC815\uADDC\uC2DD \uC0AC\uC6A9"],"vs/base/browser/ui/findinput/replaceInput":["\uC785\uB825","\uB300/\uC18C\uBB38\uC790 \uBCF4\uC874"],"vs/base/browser/ui/iconLabel/iconLabel":["\uB85C\uB4DC \uC911..."],"vs/base/browser/ui/inputbox/inputBo


bject []? GetUnignoredChildren (NSObject originalChild)
		{
			if (originalChild is null)
				throw new ArgumentNullException ("originalChild");

			var handle = NSAccessibilityUnignoredChildrenForOnlyChild (originalChild.Handle);
			GC.KeepAlive (originalChild);
			return NSArray.ArrayFromHandle<NSObject> (handle);
		}

		[DllImport (Constants.AppKitLibrary)]
		static extern byte NSAccessibilitySetMayContainProtectedContent (byte flag);

		/// <param name="flag">To be added.</param>
		///         <summary>To be added.</summary>
		///         <returns>To be added.</returns>
		///         <remarks>To be added.</remarks>
		public static bool SetMayContainProtectedContent (bool flag)
		{
			return NSAccessibilitySetMayContainProtectedContent (flag ? (byte) 1 : (byte) 0) != 0;
		}
#endif
	}
}
#endif // !__MACCATALYST__


ion (unit, type, target_unit)
	local target_attack_intensity_extension = ScriptUnit.has_extension(target_unit, "attack_intensity_system")

	if not target_attack_intensity_extension then
		return true
	end

	local attack_intensity_extension = ScriptUnit.has_extension(unit, "attack_intensity_system")

	if not attack_intensity_extension then
		return true
	end

	local target_allowed_attack = target_attack_intensity_extension:attack_allowed(type)

	if target_allowed_attack and attack_intensity_extension then
		local attack_allowed = attack_intensity_extension:can_attack(type)

		return attack_allowed
	end
end

AttackIntensity.set_monster_attacker = function (target_unit, attacker_unit)
	local target_attack_intensity_extension = ScriptUnit.has_extension(target_unit, "attack_intensity_system")

	if not target_attack_intensity_extension then
		return
	end

	target_attack_intensity_extension:set_monster_attacker(attacker_unit)
end

AttackIntensity.monster_attacker = function (target_unit)
	local target_attack_intensity_extension = ScriptUnit.has_extension(target_unit, "attack_intensity_system")

	if not target_attack_intensity_extension then
		return
	end

	return target_attack_intensity_extension:monster_attacker()
end

AttackIntensity.player_can_be_attacked = function (player_unit, type)
	local attack_intensity_extension = ScriptUnit.extension(player_unit, "attack_intensity_system")

	return attack_intensity_extension:attack_allowed(type)
end

AttackIntensity.player_is_locked_in_melee = function (player_unit)
	local attack_intensity_extension = ScriptUnit.extension(player_unit, "attack_intensity_system")

	return attack_intensity_extension:locked_in_melee()
end

return AttackIntensity


from streamlit_carousel import carousel

test_items = [
    dict(
        title="Slide 1",
        text="A tree in the savannah",
        img="https://img.freepik.com/free-photo/wide-angle-shot-single-tree-growing-clouded-sky-during-sunset-surrounded-by-grass_181624-22807.jpg?w=1380&t=st=1688825493~exp=1688826093~hmac=cb486d2646b48acbd5a49a32b02bda8330ad7f8a0d53880ce2da471a45ad08a4",
        link="https://discuss.streamlit.io/t/new-component-react-bootstrap-carousel/46819"
    ),
    dict(
        title="Slide 2",
        text="A wooden bridge in a forest in Autumn",
        img="https://img.freepik.com/free-photo/beautiful-wooden-pathway-going-breathtaking-colorful-trees-forest_181624-5840.jpg?w=1380&t=st=1688825780~exp=1688826380~hmac=dbaa75d8743e501f20f0e820fa77f9e377ec5d558d06635bd3f1f08443bdb2c1",
        link="https://github.com/thomasbs17/streamlit-contributions/tree/master/bootstrap_carousel"
    ),
    dict(
        title="Slide 3",
        text="A distant mountain chain preceded by a sea",
        img="https://img.freepik.com/free-photo/aerial-beautiful-shot-seashore-with-hills-background-sunset_181624-24143.jpg?w=1380&t=st=1688825798~exp=1688826398~hmac=f623f88d5ece83600dac7e6af29a0230d06619f7305745db387481a4bb5874a0",
        link="https://github.com/thomasbs17/streamlit-contributions/tree/master"
    ),
]


iew))]
	public class UIGuidanceViewOnEnableSystem : OnEnableSystem<UIGuidanceView,GameObject,int>
	{

		public override void OnEnable(UIGuidanceView self,GameObject obj,int type)
		{
			self.CurCanvas = self.GetGameObject().GetComponentInParent<Canvas>();

			self.Mask.Target = obj;

			self.CircleMask.SetActive(false);
			self.RectMask.SetActive(false);
			if (type == GuidanceGameObejctType.Rect)
			{
				self.RectMask.SetActive(true,obj.GetComponent<RectTransform>(),self.CurCanvas);
			}
			else if (type == GuidanceGameObejctType.Circle)
			{
				self.CircleMask.SetActive(true, obj.GetComponent<RectTransform>(), self.CurCanvas);
			}
			else
			{
				Log.Error("未处理的类型 Guidance Type ="+type);
			}
		}

	}
	[FriendClass(typeof(UIGuidanceView))]
	public static class UIGuidanceViewSystem
	{

	}

}


e 75       	.word 0x4e75
    1a0a:	42 41       	.word 0x4241
    1a0c:	16 18       	mov.l	r1,@(32,r6)
    1a0e:	4e fa       	ldc	r14,dbr
    1a10:	0d c2       	stc	r4_bank,r13
    1a12:	4e 75       	.word 0x4e75
    1a14:	47 ee       	ldc	r7,r6_bank
    1a16:	18 90       	mov.l	r9,@(0,r8)
    1a18:	45 ee       	ldc	r5,r6_bank
    1a1a:	10 00       	mov.l	r0,@(0,r0)
    1a1c:	1e 28       	mov.l	r2,@(32,r14)
    1a1e:	00 00       	.word 0x0000
    1a20:	6a 00       	mov.b	@r0,r10
    1a22:	01 0c       	mov.b	@(r0,r0),r1
    1a24:	02 47       	mul.l	r4,r2
    1a26:	00 07       	mul.l	r0,r0
    1a28:	de 47       	mov.l	1b48 <_sddrv_129i+0x1b48>,r14	! 8b30007
    1a2a:	18 33       	mov.l	r3,@(12,r8)
    1a2c:	70 00       	add	#0,r0
    1a2e:	08 f3       	.word 0x08f3
    1a30:	00 07       	mul.l	r0,r0
    1a32:	70 00       	add	#0,r0
    1a34:	02 44       	mov.b	r4,@(r0,r2)
    1a36:	00 1f       	mac.l	@r1+,@r0+
    1a38:	ed 4c       	mov	#76,r13
    1a3a:	1a 33       	mov.l	r3,@(12,r10)
    1a3c:	70 01       	add	#1,r0
    1a3e:	08 f3       	.word 0x08f3
    1a40:	00 07       	mul.l	r0,r0
    1a42:	70 01       	add	#1,r0
    1a44:	02 45       	mov.w	r4,@(r0,r2)
    1a46:	00 1f       	mac.l	@r1+,@r0+
    1a48:	ed 4d       	mov	#77,r13
    1a4a:	10 28       	mov.l	r2,@(32,r0)
    1a4c:	00 00       	.word 0x0000
    1a4e:	1e 00       	mov.l	r0,@(0,r14)
    1a50:	02 40       	.word 0x0240
    1a52:	00 07       	mul.l	r0,r0
    1a54:	00 00       	.word 0x0000
    1a56:	00 80       	.word 0x0080
    1a58:	15 80       	mov.l	r8,@(0,r5)
    1a5a:	40 34       	.word 0x4034
    1a5c:	15 80       	mov.l	r8,@(0,r5)
    1a5e:	50 34       	mov.l	@(16,r3),r0
    1a60:	e2 4c       	mov	#76,r2
    1a62:	e2 4d       	mov	#77,r2


c_string<char,std::char_traits<char>,std::allocator<char>>::substr(sub_1,
inp_data, 0LL, r);
 mpz_set_str(x, sub_1, 10u);
std::__cxx11::basic_string<char,std::char_traits<char>,std::allocator<char>>::~basic_string(sub_1);
std::__cxx11::basic_string<char,std::char_traits<char>,std::allocator<char>>::substr(sub_2,
inp_data, r, -1LL);
 mpz_set_str(y, sub_2, 10u);
std::__cxx11::basic_string<char,std::char_traits<char>,std::allocator<char>>::~basic_string(sub_2);
```
Then it splits the integer string into two parts using a random number as
offset and converts them to mpz integer string, there is a logical error here
but we can guess what's the program is trying to do.

**POC**

```cpp
if ( str_len != r ) // to bypass this r = str_len
//then
sub_2 = inp_data.substr(r,-1) // == inp_data.substr(str_len,-1) --> which will
return null to sub_2
mpz_set_str(y, sub_2, 10LL); // bcz sub_2 is null this causes error
```

```cpp
 r1 = rand_int_2(1LL, 0x1FFFFFFFFFFFLL);
 r2 = rand_int_2(1LL, 0x1FFFFFFFFFFFLL);
 mpz_init_set(y1, y);
 mpz_init_set(x1, x);
 Some_enc(enc_out_1, x1, y1, r1, 2u);
 mpz_get_str(out_str_1, enc_out_1, 0x10u);
 mpz_clear(enc_out_1);
 mpz_clear(x1);
 mpz_clear(y1);
 set[0] = sub_4D79(2, x);
 set[1] = v5;
 sub_4DB2(y2, set);                            // y2 = x * 2
 mpz_init_set(x2, y);
 Some_enc(enc_out_2, x2, y2, r2, 2u);
 mpz_get_str(out_str_2, enc_out_2, 0x10u);
 mpz_clear(enc_out_2);
 mpz_clear(x2);
 mpz_clear(y2);
```
Then it does some encryption on `x,y,r1,2` and `y,x*2,r2,2` and stores the mpz
result to hex strings `out_str_1` and `out_str_2`

### enc
```cpp
 mpz_set_str__(output, "AAAA", 0x10u);
 sub_4081(tmp_range, len);
 mpz_set_str(range, tmp_range, 10u);
std::__cxx11::basic_string<char,std::char_traits<char>,std::allocator<char>>::~basic_string(tmp_range);
 mpz_set_str__(i, "0", 10u);
 while ( mpz_cmp(i, range) )
 {
   sub_48EB(x, y);
   set_1[0] = v5;                              // x
   set_1[1] = v6;                              // y
   sub_491C(set_1, num);
   set_2[0] = v7;                              // -> set_1
   set_2[1] = v8;                              // num
   sub_4956(output, set_2);                    // output = x + y // 2
   mpz_set(x, y);                              // x = y
   mpz_set(y, output);                         // y = output
   inc(tmp, i);                                // i++
   mpz_clear(tmp);
 }
 mpz_clear(i);
 mpz_clear(range);
```
It


meters: Array<Array<any>>;
    };

    type Class<T> = {
        new (): T;
    };

    type ScenariosDescriptions<G, W, T> = {
        (scenariosParam: ScenariosParam<G, W, T>): {
            [key: string]: ScenarioDescription;
        };
    };

    type ScenarioDescription = {
        scenarioFunction: ScenarioFunc;
    };

    type ScenarioOptions = {};
    function scenario(
        options: ScenarioOptions,
        scenarioFunction: ScenarioFunc
    ): ScenarioDescription;

    function scenarios<S>(
        groupName: string,
        stagesParam: Class<S>,
        scenarioFunc: ScenariosDescriptions<S, S, S>
    ): void;
    function scenarios<G, W, T>(
        groupName: string,
        stagesParam: [Class<G>, Class<W>, Class<T>],
        scenarioFunc: ScenariosDescriptions<G, W, T>
    ): void;

    function setupForRspec(describe: any, it: any): void;
    function setupForAva(test: any): void;

    type StateType = {
        (target: object, decoratedPropertyKey: string, descriptor?: TypedPropertyDescriptor<
            () => any
        >): any;
        addProperty: (target: Class<Stage>, propertyName: string) => void;
    };
    var State: StateType;

    type HiddenType = {
        (target: object, decoratedPropertyKey: string, descriptor?: TypedPropertyDescriptor<
            () => any
        >): any;
        addHiddenStep: (target: Class<Stage>, methodName: string) => void;
    };
    var Hidden: HiddenType;

    function doAsync(action: () => Promise<any>): void;

    function setupForAva(test: any): void;

    function parametrized(
        parameters: Array<Array<any>>,
        func: () => void
    ): ParametrizedScenarioFuncWithParameters;
    function parametrized1<T>(
        parameters: T[],
        func: (a: T) => void
    ): ParametrizedScenarioFuncWithParameters;
    function parametrized2<A, B>(
        parameters: Array<[A, B]>,
        func: (a: A, b: B) => void
    ): ParametrizedScenarioFuncWithParameters;
    function parametrized3<A, B, C>(
        parameters: Array<[A, B, C]>,
        func: (a: A, b: B, c: C) => void
    ): ParametrizedScenarioFuncWithParameters;
    function parametrized4<A, B, C, D>(
        parameters: Array<[A, B, C, D]>,
        func: (a: A, b: B, c: C, d: D) => void
    ): ParametrizedScenarioFuncWithParameters;
    function parametrized5<A, B, C, D, E>(
        parameters: Array<[A, B, C, D, E]>,
        func: (a: A, b: B, c: C, d: D, e: E) => void
    ): ParametrizedScenarioFuncWithParameters;
    function parametrized6<A, B, C, D, E, F>(
        parameters: Array<[A, B, C, D, E, F]>,
        func: (a: A, b: B, c: C, d: D, e: E, f: F) => void
    ): ParametrizedScenarioFuncWithParameters;
    function parametrized7<A, B, C, D, E, F, G>(
        parameters: Array<[A, B, C, D, E, F, G]>,
        func: (a: A, b: B, c: C, d: D, e: E, f: F, g: G) => void
    ): ParametrizedScenarioFuncWithParameters;

    type ParameterFormatterDecorator = {
        (target: object, decoratedPropertyKey: string, descriptor?: TypedPropertyDescriptor<
            ()


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

import torch
import math
from diff_gaussian_rasterization import GaussianRasterizationSettings, GaussianRasterizer
from scene.gaussian_model import GaussianModel
from utils.sh_utils import eval_sh

def render(viewpoint_camera, pc : GaussianModel, pipe, bg_color : torch.Tensor,
           scaling_modifier = 1.0, override_color = None, dropout_factor=0.0,
           sigma_noise = 0.0, render_pts=False, render_pts_scale=0.1, train=True):
    """
    Render the scene.

    Background tensor (bg_color) must be on GPU!
    """

    # Create zero tensor. We will use it to make pytorch return gradients of the 2D (screen-space) means
    screenspace_points = torch.zeros_like(pc.get_xyz, dtype=pc.get_xyz.dtype,
                                          requires_grad=True, device="cuda") + 0
    try:
        screenspace_points.retain_grad()
    except:
        pass

    # Set up rasterization configuration
    tanfovx = math.tan(viewpoint_camera.FoVx * 0.5)
    tanfovy = math.tan(viewpoint_camera.FoVy * 0.5)

    # init random dropout mask
    if dropout_factor > 0.0 and train:
        dropout_mask = torch.rand(pc.get_opacity.shape[0], device=pc.get_opacity.device).cuda()
        dropout_mask = dropout_mask < (1 - dropout_factor)
    else:
        dropout_mask = torch.rand(pc.get_opacity.shape[0], device=pc.get_opacity.device).cuda()
        dropout_mask = dropout_mask < 1.1

    raster_settings = GaussianRasterizationSettings(
        image_height=int(viewpoint_camera.image_height),
        image_width=int(viewpoint_camera.image_width),
        tanfovx=tanfovx,
        tanfovy=tanfovy,
        bg=bg_color,
        scale_modifier=scaling_modifier,
        viewmatrix=viewpoint_camera.world_view_transform,
        projmatrix=viewpoint_camera.full_proj_transform,
        sh_degree=pc.active_sh_degree,
        campos=viewpoint_camera.camera_center,
        prefiltered=False,
        debug=pipe.debug
    )

    rasterizer = GaussianRasterizer(raster_settings=raster_settings)

    means3D = pc.get_xyz
    means2D = screenspace_points
    opacity = pc.get_opacity

    # If precomputed 3d covariance is provided, use it. If not, then it will be computed from
    # scaling / rotation by the rasterizer.
    scales = None
    rotations = None
    cov3D_precomp = None
    if pipe.compute_cov3D_python:
        cov3D_precomp = pc.get_covariance(scaling_modifier)
    else:
        scales = pc.get_scaling
        rotations = pc.get_rotation

    # If precomputed colors are provided, use them. Otherwise, if it is desired to precompute colors
    # from SHs in Python, do it. If not, then SH -> RGB conversion will be done by rasterizer.
    shs = None
    colors_precomp = None
    if override_color is None:
        if pipe.convert_SHs_python:
            shs_view = pc.get_features.transpose(1, 2).view(-1, 3, (pc.max_sh_degree+1)**2)
            dir_pp = (pc.get_xyz - viewpoint_camera.camera_center.repeat(pc.get_features.shape[0], 1))
            dir_pp_normalized = dir_pp/dir_pp.norm(dim=1, keepdim=True)
            sh2rgb = eval_sh(pc.active_sh_degree, shs_view, dir_pp_normalized)
            colors_precomp = torch.clamp_min(sh2rgb + 0.5, 0.0)
        else:
            shs = pc.get_features
    else:
        colors_precomp = override_color

    if render_pts:
        scales = torch.full_like(scales, render_pts_scale).cuda()

    # 1. randomly dropout 3DGS points during training
    if dropout_factor > 0.0 and train:
        means3D      = means3D[dropout_mask]
        means2D      = means2D[dropout_mask]
        shs          = shs[dropout_mask]
        opacity      = opacity[dropout_mask]
        scales       = scales[dropout_mask]
        rotations    = rotations[dropout_mask]
    elif (not train):
        # scale oapcity for test stage rendering
        opacity *= 1 - dropout_factor

    # 2. add noise to opacity during training
    if train and sigma_noise > 0.0:
        # sigma_noise = 0.8  # 0.8
        epsilon_opacity = torch.randn_like(opacity, device=opacity.device) * sigma_noise
        epsilon_opacity = torch.clamp(epsilon_opacity, min=-sigma_noise, max=sigma_noise)  # 根据实际训练经验设定合理范围
        opacity = torch.clamp(opacit


 NativeAccessSpecifierPublic)
};
static_assert(alignof(AIServiceManagerCCS_OnMessageReceived) == 0x000008, "Wrong alignment on AIServiceManagerCCS_OnMessageReceived");
static_assert(sizeof(AIServiceManagerCCS_OnMessageReceived) == 0x000018, "Wrong size on AIServiceManagerCCS_OnMessageReceived");
static_assert(offsetof(AIServiceManagerCCS_OnMessageReceived, ConnectionId) == 0x000000, "Member 'AIServiceManagerCCS_OnMessageReceived::ConnectionId' has a wrong offset!");
static_assert(offsetof(AIServiceManagerCCS_OnMessageReceived, Message) == 0x000008, "Member 'AIServiceManagerCCS_OnMessageReceived::Message' has a wrong offset!");

// Function MLAI.MLAISubsystem.SetupAIService
// 0x0008 (0x0008 - 0x0000)
struct MLAISubsystem_SetupAIService final
{
public:
	class UWorld*                                 InWorld;                                           // 0x0000(0x0008)(Parm, ZeroConstructor, IsPlainOldData, NoDestructor, HasGetValueTypeHash, NativeAccessSpecifierPublic)
};
static_assert(alignof(MLAISubsystem_SetupAIService) == 0x000008, "Wrong alignment on MLAISubsystem_SetupAIService");
static_assert(sizeof(MLAISubsystem_SetupAIService) == 0x000008, "Wrong size on MLAISubsystem_SetupAIService");
static_assert(offsetof(MLAISubsystem_SetupAIService, InWorld) == 0x000000, "Member 'MLAISubsystem_SetupAIService::InWorld' has a wrong offset!");

}

#pragma once

/*
* SDK generated by Dumper-7
*
* https://github.com/Encryqed/Dumper-7
*/

// Package: UI_HUD_KillCombo

#include "Basic.hpp"

namespace SDK::Params
{

// Function UI_HUD_KillCombo.UI_HUD_KillCombo_C.ExecuteUbergraph_UI_HUD_KillCombo
// 0x0020 (0x0020 - 0x0000)
struct UI_HUD_KillCombo_C_ExecuteUbergraph_UI_HUD_KillCombo final
{
public:
	int32                                         EntryPoint;                                        // 0x0000(0x0004)(BlueprintVisible, BlueprintReadOnly, Parm, ZeroConstructor, IsPlainOldData, NoDestructor, HasGetValueTypeHash)
	uint8                                         Pad_4[0x4];                                        // 0x0004(0x0004)(Fixing Size After Last Property [ Dumper-7 ])
	class UUMGSequencePlayer*                     CallFunc_PlayAnimation_ReturnValue;                // 0x0008(0x0008)(ZeroConstructor, IsPlainOldData, NoDestructor, HasGetValueTypeHash)
	TDelegate<void()>                             K2Node_CreateDelegate_OutputDelegate;              // 0x0010(0x0010)(ZeroConstructor, NoDestructor)
};
static_assert(alignof(UI_HUD_KillCombo_C_ExecuteUbergraph_UI_HUD_KillCombo) == 0x000008, "Wrong alignment on UI_HUD_KillCombo_C_ExecuteUbergraph_UI_HUD_KillCombo");
static_assert(sizeof(UI_HUD_KillCombo_C_ExecuteUbergraph_UI_HUD_KillCombo) == 0x000020, "Wrong size on UI_HUD_KillCombo_C_ExecuteUbergraph_UI_HUD_KillCombo");
static_assert(offsetof(UI_HUD_KillCombo_C_ExecuteUbergraph_UI_HUD_KillCombo, EntryPoint) == 0x000000, "Member 'UI_HUD_KillCombo_C_ExecuteUbergraph_UI_HUD_KillCombo::EntryPoint' has a wrong offset!");
static_assert(offsetof(UI_HUD_KillCombo_C_ExecuteUbergraph_UI_HUD_KillCombo, CallFunc_PlayAnimation_ReturnValue) == 0x000008, "Member 'UI_HUD_KillCombo_C_ExecuteUbergraph_UI_HUD_KillCombo::CallFunc_PlayAnimation_ReturnValue' has a wrong offset!");
static_assert(offsetof


dashboard-left .block-content ul li:before {
        content: '\f105';
        display: inline-block;
        font-family: FontAwesome;
        font-style: normal;
        line-height: 1.5;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
        width: 30px;
        height: 35px;
        text-align: center;
        font-size: 18px;
        font-weight: 700;
        margin-top: 3px; }
      .dashboard-left .block-content ul li a {
        color: #333333;
        font-size: calc(14px + (20 - 14) * ((100vw - 320px) / (1920 - 320))); }
      .dashboard-left .block-content ul li:hover {
        padding-left: 10px;
        color: #00baf2;
        -webkit-transition: all 0.5s ease;
        transition: all 0.5s ease; }
        .dashboard-left .block-content ul li:hover a {
          color: #00baf2;
          -webkit-transition: all 0.5s ease;
          transition: all 0.5s ease; }

.padding-cls {
  padding-left: 50px;
  padding-right: 50px; }

.dashboard-right {
  background-color: #ffffff; }
  .dashboard-right p {
    font-size: calc(14px + (16 - 14) * ((100vw - 320px) / (1920 - 320)));
    line-height: 20px; }
  .dashboard-right .dashboard {
    padding: 30px; }
    .dashboard-right .dashboard .page-title h2 {
      font-size: calc(18px + (22 - 18) * ((100vw - 320px) / (1920 - 320)));
      margin-bottom: 15px;
      color: #333333;
      line-height: 1;
      font-weight: 600; }
    .dashboard-right .dashboard .welcome-msg p {
      margin-bottom: 0;
      font-size: calc(14px + (16 - 14) * ((100vw - 320px) / (1920 - 320)));
      line-height: 1.6; }

.dashboard .box-head h2 {
  font-size: calc(18px + (22 - 18) * ((100vw - 320px) / (1920 - 320)));
  margin: 20px 0 0;
  text-transform: capitalize;
  color: #333333; }

.dashboard .box a {
  color: #00baf2;
  font-weight: 700; }

.dashboard .box h6 {
  margin-bottom: 0;
  font-size: calc(14px + (16 - 14) * ((100vw - 320px) / (1920 - 320))); }

.dashboard .box .box-title {
  border-bottom: 1px solid #dddddd;
  display: inline-block;
  margin-bottom: 5px;
  padding: 12px 0;
  position: relative;
  width: 100%; }
  .dashboard .box .box-title h3 {
    font-size: calc(14px + (18 - 14) * ((100vw - 320px) / (1920 - 320)));
    margin: 0;
    text-transform: capitalize;
    color: #333333;
    letter-spacing: 0.05em; }
  .dashboard .box .box-title > a {
    position: absolute;
    right: 0;
    top: 12px;
    color: #00baf2;
    font-weight: 700;
    font-size: calc(14px + (18 - 14) * ((100vw - 320px) / (1920 - 320))); }

.dashboard .box address {
  margin-bottom: 0;
  font-size: calc(14px + (16 - 14) * ((100v


8)
                 || task_status  == (TaskStatus::Arbitrating as u8)
                 || task_status  == (TaskStatus::Judging as u8)
                 || task_status  == (TaskStatus::Finished as u8)), Error::<T>::InvalidTaskStatus);

            // 获取任务创建者
            let (owner, _, _) = TaskDetail::<T>::get(&task_id);

            // 获取任务中标者
            let receiver = RelTaskReceiver::<T>::get(&task_id);

            // 检查操作权限
            // 任务状态的更新默认只有任务创建者才有权限
            // 但其中Completed只有任务中标者有权限操作，Arbitrating、Judging两个状态双方都有权限操作
            if task_status == (TaskStatus::Delivered as u8) {
                ensure!(sender == receiver, Error::<T>::NotTaskReceiver);
            } else if task_status == (TaskStatus::Arbitrating as u8) || task_status == (TaskStatus::Judging as u8) {
                ensure!((sender == owner || sender == receiver), Error::<T>::NotTaskOwnerOrReceiver);
            } else {
                ensure!(sender == owner, Error::<T>::NotTaskOwner);
            }

            // 更新任务状态
            RelTaskStatus::insert(&task_id, task_status.clone());

            // TODO 任务正常完成后
            let finished = TaskStatus::Finished as u8;
            if finished == task_status {
                //TODO 自动解除质押、转账
            }

            // 触发修改任务事件
            Self::deposit_event(RawEvent::TaskStatusUpdated(sender, task_id, task_status));

			// Return a successful DispatchResult
			Ok(())

        }

        /// 投标任务
        #[weight = 10_000]
        fn bid_task(origin, task_id: u128, stake_token: u128) -> dispatch::DispatchResult {
            // 检查当前操作者是否已签名
            // 如果未签名，则返回错误
            // https://substrate.dev/docs/en/knowledgebase/runtime/origin
            let sender = ensure_signed(origin)?;

            // 获取任务创建者
            let (owner, _, _) = TaskDetail::<T>::get(&task_id);

            // 检查当前操作者是否为任务的创建者 不能自己投标自己
            ensure!(sender != owner, Error::<T>::NotBidSelf);

            // 检查任务是否存在
            ensure!(TaskDetail::<T>::contains_key(&task_id), Error::<T>::NoSuchTask);

            // 检查质押token是否满足要求：任务创建者质押数量的1/10
            let create_task_stake = RelCreateTaskStake::get(&task_id);
            ensure!(stake_token < (((create_task_stake as f32) * config::BID_STAKE_RATIO) as u128), Error::<T>::InvalidStakeToken);

            // 检查任务状态是否为投标中
            let task_status = RelTaskStatus::get(&task_id);
            ensure!((TaskStatus::Bidding as u8) == task_status, Error::<T>::BidClosed);

            // 检查是否已经投标过了
            ensure!(!RelBidTaskStake::<T>::contains_key(&task_id, &sender), Error::<T>::NoDuplicateBid);

            // TODO 质押token

            // 保存投标任务与质押的Token数量关系
            RelBidTaskStake::


          env.securityConfig().tlsEnabled(),
          env.eventBus()
        );
        topologyParser = createTopologyParser(core.environment(), seedNodes);
        setSeedNodes(seedNodes).orThrow();
        log.info("Resolved seed nodes: {}", redactSystem(seedNodes));
      })
      .subscribeOn(Schedulers.boundedElastic()) // DNS SRV lookup blocks
      .doOnError(t -> log.warn("Seed node resolution failed. Will try again after a brief delay. Cause:", t))
      // keep retrying until the task is cancelled (config provider is closed)
      .retryWhen(Retry.backoff(Long.MAX_VALUE, Duration.ofMillis(10))
        .maxBackoff(Duration.ofSeconds(60))
        .jitter(1.0)
      )
      .subscribe();
  }

  private static TopologyParser createTopologyParser(
    CoreEnvironment env,
    Set<SeedNode> seedNodes
  ) {
    boolean tls = env.securityConfig().tlsEnabled();
    return new TopologyParser(
      NetworkSelector.create(
        env.ioConfig().networkResolution(),
        makeDefaultPortsExplicitForNetworkDetection(seedNodes, tls)
      ),
      tls ? PortSelector.TLS : PortSelector.NON_TLS,
      env.ioConfig().memcachedHashingStrategy()
    );
  }

  private static Set<SeedNode> makeDefaultPortsExplicitForNetworkDetection(
    Set<SeedNode> seedNodes,
    boolean tls
  ) {
    return seedNodes.stream()
      .map(it -> {
        if (it.kvPort().isPresent() || it.clusterManagerPort().isPresent()) {
          // User specified at least one port, which is sufficient for network detection.
          return it;
        }
        // User didn't specify any ports, so assume defaults.
        return it
          .withKvPort(tls ? 11207 : 11210)
          .withManagerPort(tls ? 18091 : 8091);
      })
      .collect(toSet());
  }

  @Override
  public CollectionMap collectionMap() {
    return collectionMap;
  }

  @Override
  public Flux<ClusterConfig> configs() {
    return configs;
  }

  @Override
  public ClusterConfig config() {
    return currentConfig;
  }

  @Override
  public Flux<Set<SeedNode>> seedNodes() {
    return seedNodes;
  }

  private Mono<Set<SeedNode>> waitForSeedNodes() {
    return seedNodes.next()
      // Mono might be empty if cluster was shut down before first set of seed nodes was published.
      .switchIfEmpty(Mono.error(new AlreadyShutdownException()));
  }

  @Override
  public Mono<Void> openBucket(final String name) {
    return Mono.defer(() -> {
      if (!shutdown.get()) {
        bucketConfigLoadInProgress.incrementAndGet();
        boolean tls = core.context().environment().securityConfig().tlsEnabled();

        return waitForSeedNodes()
          .flatMap(seedNodes -> fetchBucketConfigs(name, seedNodes, tls).switchIfEmpty(Mono.error(
              new ConfigException("Could not locate a single bucket configuration for bucket: " + name)
            ))
          )
          .map(ctx -> {
            proposeBucketConfig(ctx);
            return ctx;
          })
          .then(registerRefresher(name))
          .doOnTerminate(bucketConfigLoadInProgress::decrementAndGet)
          .onErrorResume(t -> closeBucketIgnoreShutdown(name, true).then(Mono.error(t)));
      } else {
        return Mono.error(new AlreadyShutdownException());
      }
    });
  }

  /**
   * Encapsulates the logic to load the bucket config from kv and then fall back to manager.
   * <p>
   * This method can be overridden in tests to simulate various states/errors from the loaders.
   *
   * @param identifier the identifier to load it from.
   * @param mappedKvPort the port of the kv loader.
   * @param mappedManagerPort the port for the manager.
   * @param name the name of the bucket.
   * @return returns the bucket config context if present, or an error.
   */
  protected Mono<ProposedBucketConfig


('s'),
                                        BLispExpr::cons_sexp(
                                            BLispExpr::Char('t'),
                                            BLispExpr::Nil
                                        )
                                    )
                                )
                            ),
                            BLispExpr::Nil
                        )
                    ),
                    BLispExpr::Nil
                )
            ))
        );
    }
}
/// Codes used for FetchOrientation in `SQLFetchScroll`, `SQLDataSources` and in `SQLDrivers`
#[repr(u16)]
#[allow(non_camel_case_types)]
#[derive(Debug, PartialEq, Eq, Clone, Copy)]
pub enum FetchOrientation {
    SQL_FETCH_NEXT = 1,
    SQL_FETCH_FIRST = 2,
    // Other codes used for FetchOrientation in SQLFetchScroll()
    SQL_FETCH_LAST = 3,
    SQL_FETCH_PRIOR = 4,
    SQL_FETCH_ABSOLUTE = 5,
    SQL_FETCH_RELATIVE = 6,
    // additional SQLDataSources fetch directions
    SQL_FETCH_FIRST_USER = 31,
    SQL_FETCH_FIRST_SYSTEM = 32,
}
pub use self::FetchOrientation::*;
<reponame>RobotHuang/notes
fn get_str<'a, 'b>(x: &'a str, _y: &'b str) -> &'a str {
    x
}

struct ImportantExcerpt<'a> {
    part: &'a str,
}

fn main() {
    let s: &'static str = "I have a static lifetime.";
    println!("{}", get_str("a", "b"));
    let novel = String::from("Call me Ishmael. Some years ago...");
    let first_sentence = novel.split('.')
        .next()
        .expect("Could not find a '.'");
    let i = ImportantExcerpt { part: first_sentence };
    println!("{}", i.part);
    println!("{}", s);
}
<reponame>lunabunn/kapp<filename>examples/hello.rs
/// Just display a window
use kapp::*;

fn main() {
    let (app, event_loop) = initialize();
    let _window = app.new_window().minimum_size(1000, 1000).build().unwrap();

    event_loop.run(move |event| match event {
        Event::WindowCloseRequested { .. } => app.quit(),
        Event::Draw { .. } => {
            // Render something here.
        }
        _ => {}
    });
}
use fefix::{AppVersion, Dictionary};

fn main() {
    let dict = Dictionary::from_version(AppVersion::Fix42);
    let code = fefix::codegen(&dict);
    println!("{}", code);
}
use crate::{list, List};

// conversions

macro_rules! ListIdent {
    [] => {
        $crate::list::base::Nil
    };
    [$name:ident $(,


e_02_00, self.le_03_00)
        QWidget.setTabOrder(self.le_03_00, self.le_02_01)
        QWidget.setTabOrder(self.le_02_01, self.le_03_01)
        QWidget.setTabOrder(self.le_03_01, self.le_00_02)
        QWidget.setTabOrder(self.le_00_02, self.le_01_02)
        QWidget.setTabOrder(self.le_01_02, self.le_00_03)
        QWidget.setTabOrder(self.le_00_03, self.le_01_03)
        QWidget.setTabOrder(self.le_01_03, self.le_02_02)
        QWidget.setTabOrder(self.le_02_02, self.le_03_02)
        QWidget.setTabOrder(self.le_03_02, self.le_02_03)
        QWidget.setTabOrder(self.le_02_03, self.le_03_03)

        self.retranslateUi(UploadWindow4x4)

        QMetaObject.connectSlotsByName(UploadWindow4x4)
    # setupUi

    def retranslateUi(self, UploadWindow4x4):
        UploadWindow4x4.setWindowTitle(QCoreApplication.translate("UploadWindow4x4", u"Upload Sudoku", None))
        self.le_00_00.setPlaceholderText("")
        self.le_01_00.setPlaceholderText("")
        self.le_02_00.setPlaceholderText("")
        self.le_03_00.setPlaceholderText("")
        self.le_00_01.setPlaceholderText("")
        self.le_01_01.setPlaceholderText("")
        self.le_02_01.setPlaceholderText("")
        self.le_03_01.setPlaceholderText("")
        self.le_00_02.setPlaceholderText("")
        self.le_01_02.setPlaceholderText("")
        self.le_02_02.setPlaceholderText("")
        self.le_03_02.setPlaceholderText("")
        self.le_00_03.setPlaceholderText("")
        self.le_01_03.setPlaceholderText("")
        self.le_02_03.setPlaceholderText("")
        self.le_03_03.setPlaceholderText("")
        self.return_button.setText(QCoreApplication.translate("UploadWindow4x4", u"Return to\n"
"main menu", None))
        self.upload_button.setText(QCoreApplication.translate("UploadWindow4x4", u"Upload my Sudoku!", None))
        self.label.setText("")
    # retranslateUi


,  1, SIDE_UNKNOWN,    11, UT.NBT.make("gt.dungeonloot", ChestGenHooks.VILLAGE_BLACKSMITH , NBT_FACING, SIDE_X_NEG), T, T);
		aData.smooth          (14, 1,  2);
		aData.set             (14, 1,  3, SIDE_UNKNOWN, (1102+tCrucibleType), UT.NBT.make(NBT_FACING, SIDE_X_NEG), T, T);
		aData.smooth          (14, 1,  4);
		aData.ingots_or_plates(14, 1,  5, 0, sMetals);
		aData.ingots_or_plates(10, 1,  1, 0, sMetals);
		aData.set             (11, 1,  1, Blocks.anvil, 3 | (aData.next(3) << 2), 0);
		aData.set             (12, 1,  1, SIDE_UNKNOWN, 32703, UT.NBT.make(NBT_FACING, SIDE_Z_POS, NBT_STATE, 1+aData.next(4)), T, T);
		aData.set             (11, 1,  4, SIDE_UNKNOWN,(32034+aData.next(4)), UT.NBT.make(NBT_INV_LIST, UT.NBT.makeInv(ToolsGT.sMetaTool.getToolWithStats(ToolsGT.HARDHAMMER, MT.VanadiumSteel, MT.WOODS.Spruce))), T, T);
		aData.ingots_or_plates(11, 1,  5, 0, sMetals);

		aData.set             (14, 2,  2, SIDE_UNKNOWN, (1070+tCrucibleType), UT.NBT.make("gt.mold", tMoldShapes.isEmpty()?0:tMoldShapes.get(aData.next(tMoldShapes.size()))), T, T);
		aData.set             (14, 2,  3, SIDE_UNKNOWN, (1020+tCrucibleType), UT.NBT.make(NBT_FACING, SIDE_X_NEG), T, T);
		aData.set             (14, 2,  4, SIDE_UNKNOWN, (1070+tCrucibleType), UT.NBT.make("gt.mold", tMoldShapes.isEmpty()?0:tMoldShapes.get(aData.next(tMoldShapes.size()))), T, T);

		//-----

		aData.set             (11, 1, 14, SIDE_UNKNOWN,  8762, UT.NBT.make(NBT_FACING, ALL_SIDES_HORIZONTAL[aData.next(4)], NBT_INV_LIST, UT.NBT.makeInv(
		  aData.next3in4() ? IL.Bottle_Mercury     .get(1+aData.next(8)) : aData.next1in2() ? IL.Bottle_Empty.get(1+aData.next(8)) : NI
		, aData.next3in4() ? IL.Bottle_Mercury     .get(1+aData.next(8)) : aData.next1in2() ? IL.Bottle_Empty.get(1+aData.next(8)) : NI
		, aData.next3in4() ? IL.Bottle_Mercury     .get(1+aData.next(8)) : aData.next1in2() ? IL.Bottle_Empty.get(1+aData.next(8)) : NI
		, aData.next3in4() ? IL.Bottle_Glue        .get(1+aData.next(8)) : aData.next1in2() ? IL.Bottle_Empty.get(1+aData.next(8)) : NI
		, aData.next3in4() ? IL.Bottle_Lubricant   .get(1+aData.next(8)) : aData.next1in2() ? IL.Bottle_E


####### Dataset settings #######
## NeRF-LLFF
SCENES = ["fern", "flower", "fortress", "horns", "leaves", "orchids", "room", "trex"]
SHOTS = [2, 3, 5]

## MipNeRF360
# SCENES = ["bicycle", "bonsai", "counter", "garden", "kitchen", "stump"]
# SHOTS = [6,9,12,18,24]

## DTU
# SCENES = ['scan31', 'scan40', 'scan34', 'scan55', 'scan110', 'scan45', 'scan63', 'scan114', 'scan82', 'scan41']
# SCENES = ['scan65', 'scan106', 'scan118']
# SHOTS = [3,6,9,12]

## NeRF-synthetic
# SCENES = ["chair", "drums", "hotdog", "lego"]
# SHOTS = [3,6,9,12,18]
###############################

### The method number is describe in the `scripts/task_consumer.py` (see METHOD_COMMAND_TEMPLATE -- e.g. 1: LLFF/3DGS, 2: LLFF/Ours)
METHODS = [1, 2] # [1, 2, 11, 12, 21, 22, 31, 32]

### The list of seeds are written in `scripts/seed_list.txt`. You can add/edit the seeds as you like.
SEED_IDS = [0, 1] # [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]

### the method numbers which you want to run first
METHOD_URGENT = []

if __name__ == "__main__":
    with open(f"scripts/all_tasks.txt", "w") as fp:
        for shot in SHOTS:
            for scene in SCENES:
                for seed_id in SEED_IDS:
                    for method in METHODS:
                        if method in METHOD_URGENT:
                            print(f"{method}#{scene}#{shot}#{seed_id}", file=fp)
                        else: # not in Method URGENT
                            print(f"{method}#{scene}#{shot}#{seed_id}", file=fp)


erOfElements );
  }

  /**
   * Factory method for creating circle-shaped elements, sized to fit.
   */
  public static circleFactory( diameter: number, numberOfElements: number ): Circle {
    return new Circle( 0.8 * diameter / numberOfElements );
  }
}

sceneryPhet.register( 'SpinningIndicatorNode', SpinningIndicatorNode );import { RGB8, RGBF, Lab, XYZ } from '../';
import { XYZHelper } from '../util/helpers';
import { XYZRefs } from '../util/xyz-refs';
import { FromXYZ } from './xyz';

export class FromLab {
  /**
   * Converts Lab object to XYZ.
   * @param {Lab} lab
   * @returns {XYZ}
   */
  static toXYZ(lab: Lab): XYZ;
  /**
   * Converts Lab values to XYZ.
   * @param {number} l
   * @param {number} a
   * @param {number} b
   * @returns {XYZ}
   */
  static toXYZ(l: number, a: number, b: number): XYZ;
  static toXYZ(l: any, a?: number, b?: number): XYZ {
    const args = FromLab.resolveArguments(l, a, b);

    let y = ( args.l + 16 ) / 116;
    let x = args.a / 500 + y;
    let z = y - args.b / 200;

    x = XYZHelper.pivotFromLab(x);
    y = XYZHelper.pivotFromLab(y);
    z = XYZHelper.pivotFromLab(z);

    // We assume D65 at 2deg illuminant here which corresponds to sRGB.
    return {
      x: x * XYZRefs.D65_2d.x,
      y: y * XYZRefs.D65_2d.y,
      z: z * XYZRefs.D65_2d.z
    };
  }

  /**
   * Converts Lab object to RGBF.
   * @param {Lab} lab
   * @returns {RGBF}
   */
  static toRGBF(lab: Lab): RGBF;
  /**
   * Converts Lab values to RGBF.
   * @param {number} l
   * @param {number} a
   * @param {number} b
   * @returns {RGBF}
   */
  static toRGBF(l: number, a: number, b: number): RGBF;
  static toRGBF(l: any, a?: number, b?: number): RGBF {
    return FromXYZ.toRGBF(FromLab.toXYZ(l, a, b));
  }

  /**
   * Converts Lab object to RGB8.
   * @param {Lab} lab
   * @returns {RGB8}
   */
  static toRGB8(lab: Lab): RGB8;
  /**
   * Converts Lab values to XYZ.
   * @param {number} l
   * @param {number} a
   * @param {number} b
   * @returns {RGB8}
   */
  static toRGB8(l: number, a: number, b: number): RGB8;
  static toRGB8(l: any, a?: number, b?: number): RGB8 {
    return FromXYZ.toRGB8(FromLab.toXYZ(l, a, b));
  }

  private static resolveArguments(l: any, a?: number, b?: number): Lab {
    const argumentType = typeof l;

    if (argumentType === 'object' && l !== null) {
      return { l: l.l, a: l.a, b: l.b };
    }

    if (argumentType === 'number') {
      return { l: l, a: a, b: b };
    }

    throw new TypeError('Unknown arguments passed');
  }
}
/*
Algorithms explained:
http://archive.bridgesmathart.org/2008/bridges2008-131.pdf
*/

let pow = Math.pow,
    sin = Math.sin,
    cos = Math.cos,
    pi = Math.PI;

function _d(z, t, p, q) {
    // The square of the distance between z*e^(it) and z*e^(it)^(p/q).
    let w = pow(z, p / q),
        s = (p * t + 2 * pi) / q;
    return (
        pow(z * cos(t) - w * cos(s), 2)
        + pow(z * sin(t) - w * sin(s), 2


../../system'
import { IRepo } from '../model/repo'

/**
 * create a repo with name
 * @param repo string
 * @param components IComponents
 */
export const newRepo = async (repo: string, { git }: IComponents): Promise<void> => {
  const exists = await git.repoExists(repo)
  if (exists) {
    throw boom.conflict(`${repo} already exists.`)
  }
  return git.newRepo(repo)
}

/**
 * delete a repo by name
 * @param repo string
 * @param components IComponents
 */
export const deleteRepo = (repo: string, { git }: IComponents): Promise<void> => {
  return git.deleteRepo(repo)
}

/**
 * get info for repo by name
 * @param repo string
 * @param components IComponents
 */
export const getRepo = async (repo: string, { git }: IComponents): Promise<IRepo> => {
  if (!await git.repoExists(repo))  {
    throw boom.notFound(`${repo} not found`)
  }

  return {
    name: repo,
  }
}
export class Article {
  title: string;
  price: string;
  link: string;
  notice: string;
  noticeIsHidden: boolean;

  constructor(title: string, price: string, link: string, notice: string, noticeIsHidden: boolean) {
    this.title = title;
    this.price = price;
    this.link = link;
    this.notice = notice;
    this.noticeIsHidden = noticeIsHidden;
  }

  forHash() {
    return {title: this.title, price: this.price};
  }
}export default function isArray(thing:any):thing is Array<any>{
	return (thing && Array.isArray(thing));
}// Partial copy from stentor-core
/**
 * App represents a set of publishing data and configuration data
 * for running the app.
 *
 * @export
 * @interface App
 */
export interface App {
    /**
     * The name of the app
     *
     * @type {string}
     * @memberof App
     */
    name: string;
    /**
     * The invocation name
     *
     * @type {string}
     * @memberof App
     */
    invocationName?: string | string[];
    /**
     * The summary of the app.
     *
     * Shorter then description.
     *
     * @type {string}
     * @memberof App
     */
    summary?: string;
    /**
     * The description for the app
     *
     * @type {string}
     * @memberof App
     */
    description?: string;
    /**
     * A large icon for the app, 512x512 PNG
     *
     * @type {string}
     * @memberof App
     */
    largeIcon?: string;
    /**
     * A small icon for the app, 108x108 PNG
     *
     * @type {string}
     * @memberof App
     */
    smallIcon?: string;
}

import { createStore } from '../utils/createStore';

import { Chat, AddChat, Message } from '@chickenhan/sdk/lib/types';
import { chickenhan } from './chickenhan';
import { Opponent } from '@chickenhan/components/src/types';

// too complex return type
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
interface Chats {
  chats: Chat[];
  discover: Chat[];
  nextFromId?: number;
  hasMore?: boolean;
}

export function createChatsStore() {
  const initialState: Chats = {
    chats: [],
    discover: [],
  };

  const [state, setState, useState, useSelector] = createStore(initialState);

  async function createChat(chat: AddChat): Promise<void> {
    const addedChat = await chickenhan.chats.createChat(chat);

    if (addedChat.hasOwnProperty('error


date_lock);

	hwmon_dev = devm_hwmon_device_register_with_groups(dev, client->name,
							   data,
							   emc6w201_groups);
	return PTR_ERR_OR_ZERO(hwmon_dev);
}

static const struct i2c_device_id emc6w201_id[] = {
	{ "emc6w201", 0 },
	{ }
};
MODULE_DEVICE_TABLE(i2c, emc6w201_id);

static struct i2c_driver emc6w201_driver = {
	.class		= I2C_CLASS_HWMON,
	.driver = {
		.name	= "emc6w201",
	},
	.probe_new	= emc6w201_probe,
	.id_table	= emc6w201_id,
	.detect		= emc6w201_detect,
	.address_list	= normal_i2c,
};

module_i2c_driver(emc6w201_driver);

MODULE_AUTHOR("Jean Delvare <jdelvare@suse.de>");
MODULE_DESCRIPTION("SMSC EMC6W201 hardware monitoring driver");
MODULE_LICENSE("GPL");


mm1, %xmm1
	vpxor	%xmm1, %xmm3, %xmm1
	vpshufd	$78, %xmm1, %xmm3
	vpxor	%xmm3, %xmm2, %xmm2
	vpshufb	%xmm12, %xmm4, %xmm3
	vpxor	16(%rsp), %xmm3, %xmm3
	vaesenc	(%rsp), %xmm3, %xmm3
	vaesenc	64(%rsp), %xmm3, %xmm3
	vaesenc	48(%rsp), %xmm3, %xmm3
	vaesenc	%xmm5, %xmm3, %xmm3
	vaesenc	%xmm6, %xmm3, %xmm3
	vaesenc	%xmm7, %xmm3, %xmm3
	vaesenc	%xmm8, %xmm3, %xmm3
	vaesenc	%xmm9, %xmm3, %xmm3
	vaesenc	%xmm10, %xmm3, %xmm3
	vaesenclast	%xmm11, %xmm3, %xmm3
	vpxor	%xmm3, %xmm15, %xmm3
	vmovdqu	%xmm3, (%rax)
	vpclmulqdq	$16, %xmm13, %xmm1, %xmm1
	vpxor	%xmm2, %xmm1, %xmm1
	leaq	16(%rax), %r14
	addq	$-16, %rbx
	addq	$16, %r9
	vpaddd	.LCPI2_1(%rip), %xmm4, %xmm14
	movq	%r14, %rax
	cmpq	$15, %rbx
	ja	.LBB2_30
	jmp	.LBB2_31
.LBB2_24:
	movq	%r15, %rbx
	vmovdqa	%xmm12, %xmm1
	cmpq	$16, %rbx
	jae	.LBB2_29
.LBB2_26:
	movq	%rdi, %r13
	movq	%rax, %r14
.LBB2_31:
	vmovdqa	%xmm1, 16(%rsp)
	movq	%r8, %rbp
	vpxor	%xmm1, %xmm1, %xmm1
	vpxor	%xmm2, %xmm2, %xmm2
	testq	%rbx, %rbx
	je	.LBB2_33
	vpxor	%xmm0, %xmm0, %xmm0
	vmovdqa	%xmm0, 32(%rsp)
	leaq	32(%rsp), %rdi
	movq	memcpy@GOTPCREL(%rip), %r12
	movq	%r9, %rsi
	movq	%rbx, %rdx
	vmovdqa	%xmm14, (%rsp)
	callq	*%r12
	vmovdqa	(%rsp), %xmm0
	vpshufb	.LCPI2_2(%rip), %xmm0, %xmm0
	vpxor	(%r13), %xmm0, %xmm0
	vaesenc	16(%r13), %xmm0, %xmm0
	vaesenc	32(%r13), %xmm0, %xmm0
	vaesenc	48(%r13), %xmm0, %xmm0
	vaesenc	64(%r13), %xmm0, %xmm0
	vaesenc	80(%r13), %xmm0, %xmm0
	vaesenc	96(%r13), %xmm0, %xmm0
	vaesenc	112(%r13), %xmm0, %xmm0
	vaesenc	128(%r13), %xmm0, %xmm0
	vaesenc	144(%r13), %xmm0, %xmm0
	vmovdqa	32(%rsp), %xmm1
	vmovdqa	%xmm1, (%rsp)
	vaesenclast	160(%r13), %xmm0, %xmm0
	vpxor	%xmm1,


/source/parser/expat/lib/xmlparse.c#4078">c:\builds\moz2_slave\m-aurora-w32-ntly-000000000000\build\src\parser\expat\lib\xmlparse.c @ 4078]
0d 00afe2c0 558805e4 xul!prologProcessor+0x4d [c:\builds\moz2_slave\m-aurora-w32-ntly-000000000000\build\src\parser\expat\lib\xmlparse.c @ 3812]
0e 00afe2d8 558821e9 xul!prologInitProcessor+0x2c [c:\builds\moz2_slave\m-aurora-w32-ntly-000000000000\build\src\parser\expat\lib\xmlparse.c @ 3629]
0f 00afe300 55881aed xul!MOZ_XML_Parse+0x6b [c:\builds\moz2_slave\m-aurora-w32-ntly-000000000000\build\src\parser\expat\lib\xmlparse.c @ 1530]
10 00afe31c 55881c97 xul!nsExpatDriver::ParseBuffer+0x3e [c:\builds\moz2_slave\m-aurora-w32-ntly-000000000000\build\src\parser\htmlparser\nsexpatdriver.cpp @ 1007]
11 00afe460 558819ed xul!nsExpatDriver::ConsumeToken+0x100 [c:\builds\moz2_slave\m-aurora-w32-ntly-000000000000\build\src\parser\htmlparser\nsexpatdriver.cpp @ 1106]
12 00afe488 55881839 xul!nsParser::Tokenize+0x6b [c:\builds\moz2_slave\m-aurora-w32-ntly-000000000000\build\src\parser\htmlparser\nsparser.cpp @ 1944]
13 00afe4a8 5587f3b8 xul!nsParser::ResumeParse+0x75 [c:\builds\moz2_slave\m-aurora-w32-ntly-000000000000\build\src\parser\htmlparser\nsparser.cpp @ 1462]
14 00afe4ec 55c828d6 xul!nsParser::OnDataAvailable+0xd1 [c:\builds\moz2_slave\m-aurora-w32-ntly-000000000000\build\src\parser\htmlparser\nsparser.cpp @ 1842]

1:036> .exr -1; $$ Get exception record
ExceptionAddress: 5696bb2d (xul


lative(0.995f, 0.995f, 0.0f, false, false, 0.973f, 0.001f)
                lineToRelative(8.978f, -5.0f)
                arcToRelative(1.0f, 1.0f, 0.0f, false, false, -0.002f, -1.749f)
                close()
            }
            path(fill = SolidColor(Color(0xFF000000)), stroke = null, strokeLineWidth = 0.0f,
                    strokeLineCap = Butt, strokeLineJoin = Miter, strokeLineMiter = 4.0f,
                    pathFillType = NonZero) {
                moveTo(20.515f, 15.126f)
                lineTo(12.0f, 19.856f)
                lineToRelative(-8.515f, -4.73f)
                lineToRelative(-0.971f, 1.748f)
                lineToRelative(9.0f, 5.0f)
                arcToRelative(1.0f, 1.0f, 0.0f, false, false, 0.971f, 0.0f)
                lineToRelative(9.0f, -5.0f)
                lineToRelative(-0.97f, -1.748f)
                close()
                moveTo(16.0f, 4.0f)
                horizontalLineToRelative(6.0f)
                verticalLineToRelative(2.0f)
                horizontalLineToRelative(-6.0f)
                close()
            }
        }
        .build()
        return _bxsLayerMinus!!
    }

private var _bxsLayerMinus: ImageVector? = null
package com.woowla.compose.icon.collections.boxicons.boxicons.solid

import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.PathFillType.Companion.NonZero
import androidx.compose.ui.graphics.SolidColor
import androidx.compose.ui.graphics.StrokeCap.Companion.Butt
import androidx.compose.ui.graphics.StrokeJoin.Companion.Miter
import androidx.compose.ui.graphics.vector.ImageVector
import androidx.compose.ui.graphics.vector.ImageVector.Builder
import androidx.compose.ui.graphics.vector.path
import androidx.compose.ui.unit.dp
import com.woowla.compose.icon.collections.boxicons.boxicons.SolidGroup

public val SolidGroup.BxsBath: ImageVector
    get() {
        if (_bxsBath != null) {
            return _bxsBath!!
        }
        _bxsBath = Builder(name = "BxsBath", defaultWidth = 24.0.dp, defaultHeight = 24.0.dp,
                viewportWidth = 24.0f, viewportHeight = 24.0f).apply {
            path(fill = SolidColor(Color(0xFF000000)), stroke = null, strokeLineWidth = 0.0f,
                    strokeLineCap = Butt, strokeLineJoin = Miter, strokeLineMiter = 4.0f,
                    pathFillType = NonZero) {
                moveTo(21.0f, 10.0f)
                horizontalLineTo(7.0f)
                verticalLineTo(7.113f)
                curveToRelative(0.0f, -0.997f, 0.678f, -1.923f, 1.661f, -2.085f)
                arcTo(2.003f, 2.003f, 0.0f, false, true, 11.0f, 7.0f)
                horizontalLineToRelative(2.0f)
                arcToRelative(4.003f, 4.003f, 0.0f, false, false, -4.398f, -3.98f)
                curveTo(6.523f, 3.222f, 5.0f, 5.089f, 5.0f, 7.178f)
                verticalLineTo(10.0f)
                horizontalLineTo(3.0f)
                arcToRelative(1.0f, 1.0f, 0.0f, false


18nDe extends I18n {
  I18nDe([String locale = 'de']) : super(locale);

  @override
  String get numSb404 => 'Du hast dich verirrt. Diese Seite existiert nicht.';

  @override
  String about250Sbblock8722Sb18722Sbtext(Object appName) {
    return 'Unser Ziel bei $appName ist es, eine sichere und einfach zu bedienende Peer-2-Peer-Plattform einzurichten, die es jedem ermöglicht, seine lokale Währung überall gegen Monero zu tauschen. Unsere Benutzer veröffentlichen Anzeigen, in denen sie ihre bevorzugte Zahlungsmethode angeben (z. B. Banküberweisung, Bargeld, Online-Zahlungsprozessor wie PayPal, Geschenkkarten usw.), andere Benutzer antworten auf diese Anzeigen, $appName nimmt eine Schlichtungsbürgschaft in Höhe des Handelsbetrags von dem Benutzer, der der Monero-Verkäufer in einem bestimmten Geschäft ist, und der Verkäufer sendet das Monero an den Käufer, wenn der Verkäufer bestätigt, dass er die Zahlung vom Käufer erhalten hat, woraufhin die Schlichtungsbürgschaft an den Verkäufer zurückgegeben wird. $appName kann auch eingreifen, um bei eventuell auftretenden Streitigkeiten zu schlichten.';
  }

  @override
  String about250Sbblock8722Sb18722Sbtext57Sbagoradesk(Object appName) {
    return 'Unser Ziel bei $appName ist es, eine sichere und einfach zu bedienende Peer-zu-Peer-Plattform einzurichten, die es jedem ermöglicht, seine lokale Währung überall gegen Kryptowährung zu tauschen. Unsere Benutzer veröffentlichen Anzeigen, in denen sie ihre bevorzugte Zahlungsmethode angeben (z. B. Banküberweisung, Bargeld, Online-Zahlungsprozessor wie PayPal, Geschenkkarten usw.), andere Benutzer antworten auf diese Anzeigen, $appName nimmt eine Schlichtungsbürgschaft in Höhe des Handelsbetrags vom Benutzer, der der Kryptowährungsverkäufer in einem bestimmten Geschäft ist, und der Verkäufer sendet die Kryptowährung an den Käufer, wenn der Verkäufer bestätigt, dass er die Zahlung vom Käufer erhalten hat, woraufhin die Schlichtungsbürgschaft an den Verkäufer zurückgegeben wird. $appName kann auch eingreifen, um bei eventuellen Streitigkeiten zu schlichten.';
  }

  @override
  String get about250Sbblock8722Sb18722Sbtitle => 'Unsere Aufgabe';

  @override
  String about250Sbblock8722Sb28722Sbtext(Object appName) {
    return 'Auf $appName handeln Sie mit echten Menschen. Im Gegensatz zu zentralisierten Kryptowährungsbörsen handeln Sie direkt mit einer anderen Person. Das macht den Prozess schlank und schnell, da kein unternehmensinterner Overhead anfällt. Sie erhalten Ihr Monero sofort. Außerdem kann $appName jede Zahlungsmethode unterstützen, die seine Benutzergemeinschaft unterstützt, sodass Benutzer ohne Zugang zum traditionellen Banking auch Monero kaufen oder verkaufen können. Für jede Transaktion verlangt $appName vom Verkäufer, eine Schlichtungsbürgschaft zu hinterlegen, um den Monero-Käufer zu schützen.';
  }

  @override
  Stri


<gh_stars>0
use crate::ir::*;

#[derive(Debug, Clone)]
pub struct IrField {
    pub ty: IrType,
    pub name: IrIdent,
    pub comments: Vec<IrComment>,
}

impl IrField {
    pub fn name_rust_style(&self, is_fields_named: bool) -> String {
        if is_fields_named {
            self.name.rust_style().to_string()
        } else {
            // TO DO this is so hacky...
            self.name.rust_style().replace("field", "")
        }
    }
}
<reponame>miguelsaldivar/c2rust<gh_stars>0
#![feature(rustc_private)]
extern crate syntax;
extern crate rustc;
extern crate syntax_pos;
extern crate rustc_target;

mod builder;
pub use builder::{Builder, Make, mk};

mod into_symbol;
pub use into_symbol::IntoSymbol;
<reponame>GarettCooper/y-crdt
pub mod client_hasher;
#![no_std]

extern crate contract_ffi;

use contract_ffi::contract_api::{runtime, system, Error};
use contract_ffi::unwrap_or_revert::UnwrapOrRevert;
use contract_ffi::value::account::PublicKey;
use contract_ffi::value::U512;

const ACCOUNT_2_ADDR: [u8; 32] = [2u8; 32];

#[no_mangle]
pub extern "C" fn call() {
    let public_key = PublicKey::new(ACCOUNT_2_ADDR);
    let amount: U512 = runtime::get_arg(0)
        .unwrap_or_revert_with(Error::MissingArgument)
        .unwrap_or_revert_with(Error::InvalidArgument);

    let result = system::transfer_to_account(public_key, amount);
    assert!(result.is_ok());
}
<reponame>SpeedyNinja/laminar<gh_stars>0
use crate::packet::OrderingGuarantee;
use crate::packet::SequenceNumber;
use crate::sequence_buffer::{sequence_less_than, SequenceBuffer};
use std::collections::HashMap;

const REDUNDANT_PACKET_ACKS_SIZE: u16 = 32;
const DEFAULT_SEND_PACKETS_SIZE: usize = 256;

/// Responsible for handling the acknowledgment of packets.
pub struct AcknowledgmentHandler {
    // Local sequence number which we'll bump each time we send a new packet over the network
    sequence_number: SequenceNumber,
    // The last acked sequence number of the packets we've sent to the remote host.
    remote_ack_sequence_num: SequenceNumber,
    // Using a Hashmap to track every packet we send out so we can ensure that we can resend when
    // dropped.
    sent_packets: HashMap<u16, SentPacket>,
    // However, we can only reasonably ack up to REDUNDANT_PACKET_ACKS_SIZE + 1 packets on each
    // message we send so this should be that large
    received_packets: SequenceBuffer<ReceivedPacket>,
}

impl AcknowledgmentHandler {
    /// Constructs a new `AcknowledgmentHandler` with which you can perform acknowledgment operations.
    pub fn new() -> Self {
        AcknowledgmentHandler {
            sequence_number: 0,
            remote_ack_sequence_num: u16::max_value(),
            sent_packets: HashMap::with_capacity(DEFAULT_SEND_PACKETS_SIZE),
            received_packets: SequenceBuffer::with_capacity(REDUNDANT_PACKET_ACKS_SIZE + 1),
        }
    }

    /// Returns the next sequence number to send.
    pub fn local_sequence_num(&self) -> SequenceNumber {
        self.sequence_number
    }

    /// Returns the last sequence number received from the remote host (+1)
    pub fn remote_sequence_num(&self) -> SequenceNumber {
        self.received_packets.sequence_num().wrapping_sub(1)
    }

    /// Returns the ack_bitfield corresponding to which of the past 32 packets we've
    /// successfully received.
    pub fn ack_bitfield(&


GetVFEngineUtilizationExp_t pfnGetVFEngineUtilizationExp = [&result] {
        auto pfnGetVFEngineUtilizationExp = ze_lib::context->zesDdiTable.load()->VFManagementExp.pfnGetVFEngineUtilizationExp;
        if( nullptr == pfnGetVFEngineUtilizationExp ) {
            result = ZE_RESULT_ERROR_UNSUPPORTED_FEATURE;
        }
        return pfnGetVFEngineUtilizationExp;
    }();
    if (result != ZE_RESULT_SUCCESS) {
        return result;
    }
    return pfnGetVFEngineUtilizationExp( hVFhandle, pCount, pEngineUtil );
    #else
    if(ze_lib::destruction) {
        return ZE_RESULT_ERROR_UNINITIALIZED;
    }

    auto pfnGetVFEngineUtilizationExp = ze_lib::context->zesDdiTable.load()->VFManagementExp.pfnGetVFEngineUtilizationExp;
    if( nullptr == pfnGetVFEngineUtilizationExp ) {
        if(!ze_lib::context->isInitialized)
            return ZE_RESULT_ERROR_UNINITIALIZED;
        else
            return ZE_RESULT_ERROR_UNSUPPORTED_FEATURE;
    }

    return pfnGetVFEngineUtilizationExp( hVFhandle, pCount, pEngineUtil );
    #endif
}

///////////////////////////////////////////////////////////////////////////////
/// @brief Configure utilization telemetry enabled or disabled associated with
///        Virtual Function (VF)
///
/// @details
///     - [DEPRECATED] No longer supported.
///     - The application may call this function from simultaneous threads.
///     - The implementation of this function should be lock-free.
///
/// @returns
///     - ::ZE_RESULT_SUCCESS
///     - ::ZE_RESULT_ERROR_UNINITIALIZED
///     - ::ZE_RESULT_ERROR_DEVICE_LOST
///     - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY
///     - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY
///     - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE
///         + `nullptr == hVFhandle`
///     - ::ZE_RESULT_ERROR_INVALID_ENUMERATION
///         + `0xf < flags`
ze_result_t ZE_APICALL
zesVFManagementSetVFTelemetryModeExp(
    zes_vf_handle_t hVFhandle,                      ///< [in] Sysman handle for the component.
    zes_vf_info_util_exp_flags_t flags,             ///< [in] utilization flags to enable or disable. May be 0 or a valid
                                                    ///< combination of ::zes_vf_info_util_exp_flag_t.
    ze_bool_t enable                                ///< [in] Enable utilization telemetry.
    )
{
    #ifdef L0_STATIC_LOADER_BUILD
    ze_result_t result = ZE_RESULT_SUCCESS;
    if(ze_lib::destruction) {
        return ZE_RESULT_ERROR_UNINITIALIZED;
    }
    static const zes_pfnVFManagementSetVFTelemetryModeExp_t pfnSetVFTelemetryModeExp = [&result] {
        auto pfnSetVFTelemetryModeExp = ze_lib::context->zesDdiTable.load()->VFManagementExp.pfnSetVFTelemetryModeExp;
        if( nullptr == pfnSetVFTelemetryModeExp ) {
            result = ZE_RESULT_ERROR_UNSUPPORTED_FEATURE;
        }
        return pfnSetVFTelemetryModeExp;
    }();
    if (result != ZE_RESULT_SUCCESS) {
        return result;
    }
    return pfnSetVFTelemetryModeExp( hVFhandle, flags, enable );
    #else
    if(ze_lib::destruction) {
        return ZE_RESULT_ERROR_UNINITIALIZED;
    }

    auto pfnSetVFTelemetryModeExp = ze_lib::context->zesDdiTable.load()->VFManagementExp.pfnSetVFTelemetryModeExp;
    if( nullptr == pfnSetVFTelemetryModeExp ) {
        if(!ze_lib::context->isInitialized)
            retu


GPRD-------";
    /** Point Of Intended Movement (PIM) */
    final String C2GM_GNL_PNT_REFPNT_PIM = "G-G-GPRP-------";
    /** Marshall Point */
    final String C2GM_GNL_PNT_REFPNT_MRSH = "G-G-GPRM-------";
    /** Waypoint */
    final String C2GM_GNL_PNT_REFPNT_WAP = "G-G-GPRW-------";
    /** Corridor Tab */
    final String C2GM_GNL_PNT_REFPNT_CRDRTB = "G-G-GPRC-------";
    /** Point Of Interest */
    final String C2GM_GNL_PNT_REFPNT_PNTINR = "G-G-GPRI-------";
    /** Aim Point */
    final String C2GM_GNL_PNT_WPN_AIMPNT = "G-G-GPWA-------";
    /** Drop Point */
    final String C2GM_GNL_PNT_WPN_DRPPNT = "G-G-GPWD-------";
    /** Entry Point */
    final String C2GM_GNL_PNT_WPN_ENTPNT = "G-G-GPWE-------";
    /** Ground Zero */
    final String C2GM_GNL_PNT_WPN_GRDZRO = "G-G-GPWG-------";
    /** MSL Detect Point */
    final String C2GM_GNL_PNT_WPN_MSLPNT = "G-G-GPWM-------";
    /** Impact Point */
    final String C2GM_GNL_PNT_WPN_IMTPNT = "G-G-GPWI-------";
    /** Predicted Impact Point */
    final String C2GM_GNL_PNT_WPN_PIPNT = "G-G-GPWP-------";
    /** Formation */
    final String C2GM_GNL_PNT_FRMN = "G-G-GPF--------";
    /** Harbor (General) */
    final String C2GM_GNL_PNT_HBR = "G-G-GPH--------";
    /** Point Q */
    final String C2GM_GNL_PNT_HBR_PNTQ = "G-G-GPHQ-------";
    /** Point A */
    final String C2GM_GNL_PNT_HBR_PNTA = "G-G-GPHA-------";
    /** Point Y */
    final String C2GM_GNL_PNT_HBR_PNTY = "G-G-GPHY-------";
    /** Point X */
    final String C2GM_GNL_PNT_HBR_PNTX = "G-G-GPHX-------";
    /** Route */
    final String C2GM_GNL_PNT_RTE = "G-G-GPO--------";
    /** Rendezvous */
    final String C2GM_GNL_PNT_RTE_RDV = "G-G-GPOZ-------";
    /** Diversions */
    final String C2GM_GNL_PNT_RTE_DVSN = "G-G-GPOD-------";
    /** Waypoint */
    final String C2GM_GNL_PNT_RTE_WAP = "G-G-GPOW-------";
    /** PIM */
    final String C2GM_GNL_PNT_RTE_PIM = "G-G-GPOP-------";
    /** Point R */
    final String C2GM_GNL_PNT_RTE_PNTR = "G-G-GPOR-------";
    /** Air Control */
    final String C2GM_GNL_PNT_ACTL = "G-G-GPA--------";
    /** Combat Air Patrol (CAP) */
    final String C2GM_GNL_PNT_ACTL_CAP = "G-G-GPAP-------";
    /** Airborne Early Warning (AEW) */
    final String C2GM_GNL_PNT_ACTL_ABNEW = "G-G-GPAW-------";
    /**


world");
		}
	});

	test("return value alt_abc", () => {
		const alt_abc = mod.alt_abc as () => number;
		const memory = mod.memory as WebAssembly.Memory;

		const ptr_arr = alt_abc();
		const arr_count = read_i32(memory, ptr_arr);

		expect(arr_count).toBe(3);

		{
			const ptr_a = read_i32(memory, ptr_arr + 4);

			expect(read_i32(memory, ptr_a)).toBe(0);
		}

		{
			const ptr_b = read_i32(memory, ptr_arr + 8);

			expect(read_i32(memory, ptr_b)).toBe(1);
			expect(read_i32(memory, ptr_b + 4)).toBe(42);
			expect(read_i32(memory, ptr_b + 8)).toBe(193);
		}

		{
			const ptr_c = read_i32(memory, ptr_arr + 12);

			expect(read_i32(memory, ptr_c)).toBe(2);
			const str_ptr = read_i32(memory, ptr_c + 4);
			expect(read_string(memory, str_ptr)).toBe("Hello world");
		}
	});
});

describe("loose typing", () => {
	let mod: Record<string, WebAssembly.ExportValue>;

	test("compiles", async () => {
		mod = await execute_string(`enum Example {
			case A, case B, case C
		}

		let a = [
			[
				Example.A {},
				Example.A {}
			],
			[
				Example.B {},
				Example.A {},
				Example.A {}
			],
			[
				Example.A {}
			]
		]

		export fn get_a -> Example[][3] {
			a
		}

		export fn get_a_member (i: i32) -> Example[] {
			a[i]
		}`);
	});

	test("export functions", () => {
		expect(mod).toHaveProperty("get_a");
		expect(mod.get_a).toBeInstanceOf(Function);
		expect(mod).toHaveProperty("get_a_member");
		expect(mod.get_a_member).toBeInstanceOf(Function);
	});

	test("return value get_a", () => {
		const get_a = mod.get_a as () => number;
		const memory = mod.memory as WebAssembly.Memory;

		const ptr = get_a();
		expect(read_i32(memory, ptr)).toBe(3);
	});

	test("return value get_a_member", () => {
		const get_a_member = mod.get_a_member as (i:number) => number;
		const memory = mod.memory as WebAssembly.Memory;

		expect(read_i32(memory, get_a_member(0))).toBe(2);
		expect(read_i32(memory, get_a_member(1))).toBe(3);
		expect(read_i32(memory, get_a_member(2))).toBe(1);
	});
})

describe("return test", () => {
	let mod: Record<string, WebAssembly.ExportValue>;

	test("compiles", async () => {
		mod = await execute_string(`

		type num = u32

		export fn implicit (val: num) -> num {
			val
		}

		export fn explicit (val: num) -> num {
			return val
		}

		export fn conditional (val: num) -> num {
			if val > 42 {
				return val
			}
			42
		}

		export fn explicit_branch (val: num) -> num {
			if val > 42 {
				return val
			}
			else {
				return 42
			}
		}

		export fn implicit_branch (val: num) -> num {
			if val > 42 {
				val
			}
			else {
				42
			}
		}
		`);
	});

	test("exports functions", () => {
		expect(mod).toHaveProperty("implicit");
		expect


mm0 {k1}, xmmword ptr [rsp+0x1*0x10]
        vmovdqa32 xmm2 {k1}, xmmword ptr [rsp+0x5*0x10]
        vmovdqa xmmword ptr [rsp], xmm0
        vmovdqa xmmword ptr [rsp+0x40], xmm2
        add     rbx, 128
        add     rdi, 32
        sub     rsi, 4
3:
        test    esi, 0x2
        je      3f
        vbroadcasti128 ymm0, xmmword ptr [rcx]
        vbroadcasti128 ymm1, xmmword ptr [rcx+0x10]
        vmovd   xmm13, dword ptr [rsp]
        vpinsrd xmm13, xmm13, dword ptr [rsp+0x40], 1
        vpinsrd xmm13, xmm13, dword ptr [BLAKE3_BLOCK_LEN+rip], 2
        vmovd   xmm14, dword ptr [rsp+0x4]
        vpinsrd xmm14, xmm14, dword ptr [rsp+0x44], 1
        vpinsrd xmm14, xmm14, dword ptr [BLAKE3_BLOCK_LEN+rip], 2
        vinserti128 ymm13, ymm13, xmm14, 0x01
        mov     r8, qword ptr [rdi]
        mov     r9, qword ptr [rdi+0x8]
        movzx   eax, byte ptr [rbp+0x40]
        or      eax, r13d
        xor     edx, edx
.p2align 5
2:
        mov     r14d, eax
        or      eax, r12d
        add     rdx, 64
        cmp     rdx, r15
        cmovne  eax, r14d
        mov     dword ptr [rsp+0x88], eax
        vbroadcasti128 ymm2, xmmword ptr [BLAKE3_IV+rip]
        vpbroadcastd ymm8, dword ptr [rsp+0x88]
        vpblendd ymm3, ymm13, ymm8, 0x88
        vmovups ymm8, ymmword ptr [r8+rdx-0x40]
        vinsertf128 ymm8, ymm8, xmmword ptr [r9+rdx-0x40], 0x01
        vmovups ymm9, ymmword ptr [r8+rdx-0x30]
        vinsertf128 ymm9, ymm9, xmmword ptr [r9+rdx-0x30], 0x01
        vshufps ymm4, ymm8, ymm9, 136
        vshufps ymm5, ymm8, ymm9, 221
        vmovups ymm8, ymmword ptr [r8+rdx-0x20]
        vinsertf128 ymm8, ymm8, xmmword ptr [r9+rdx-0x20], 0x01
        vmovups ymm9, ymmword ptr [r8+rdx-0x10]
        vinsertf128 ymm9, ymm9, xmmword ptr [r9+rdx-0x10], 0x01
        vshufps ymm6, ymm8, ymm9, 136
        vshufps ymm7, ymm8, ymm9, 221
        vpshufd ymm6, ymm6, 0x93
        vpshufd ymm7, ymm7, 0x93
        mov     al, 7
9:
        vpaddd  ymm0, ymm0, ymm4
        vpaddd  ymm0, ymm0, ymm1
        vpxord  ymm3, ymm3, ymm0
        vprord  ymm3, ymm3


typelib_002d_003emodule">typelib->module:	 	Typelib Introspection

	typelibs:	 	Typelib Introspection

	types:	 	Working with GObjects

U

	use-modules:	 	Utilities

	use-typelibs:	 	Utilities

	Utilities:	 	Utilities

V

	values:	 	Function Parameters Arity and Return Values

Jump to:   	(

-

<

A

C

D

E

F

G

I

L

M</a


ys == nil {
		l.ArgError(1, "expects a valid set of object IDs")
		return 0
	}

	size := keys.Len()
	if size == 0 {
		return 0
	}

	ops := make(StorageOpDeletes, 0, size)
	conversionError := false
	keys.ForEach(func(k, v lua.LValue) {
		if conversionError {
			return
		}

		keyTable, ok := v.(*lua.LTable)
		if !ok {
			conversionError = true
			l.ArgError(1, "expects a valid set of object IDs")
			return
		}

		var userID uuid.UUID
		objectID := &api.DeleteStorageObjectId{}
		keyTable.ForEach(func(k, v lua.LValue) {
			if conversionError {
				return
			}

			switch k.String() {
			case "collection":
				if v.Type() != lua.LTString {
					conversionError = true
					l.ArgError(1, "expects collection to be string")
					return
				}
				objectID.Collection = v.String()
				if objectID.Collection == "" {
					conversionError = true
					l.ArgError(1, "expects collection to be a non-empty string")
					return
				}
			case "key":
				if v.Type() != lua.LTString {
					conversionError = true
					l.ArgError(1, "expects key to be string")
					return
				}
				objectID.Key = v.String()
				if objectID.Key == "" {
					conversionError = true
					l.ArgError(1, "expects key to be a non-empty string")
					return
				}
			case "user_id":
				if v.Type() != lua.LTString {
					conversionError = true
					l.ArgError(1, "expects user_id to be string")
					return
				}
				var err error
				if userID, err = uuid.FromString(v.String()); err != nil {
					conversionError = true
					l.ArgError(1, "expects user_id to be a valid ID")
					return
				}
			case "version":
				if v.Type() != lua.LTString {
					conversionError = true
					l.ArgError(1, "expects version to be string")
					return
				}
				objectID.Version = v.String()
				if objectID.Version == "" {
					conversionError = true
					l.ArgError(1, "expects version to be a non-empty string")
					return
				}
			}
		})

		if conversionError {
			return
		}

		if objectID.Collection == "" {
			conversionError = true
			l.ArgError(1, "expects collection to be supplied")
			return
		} else if objectID.Key == "" {
			conversionError = true
			l.ArgError(1, "expects key to be supplied")
			return
		}

		ops = append(ops, &StorageOpDelete{
			OwnerID:  userID.String(),
			ObjectID: objectID,
		})
	})
	if conversionError {
		return 0
	}

	if _, err := StorageDeleteObjects(l.Context(), n.logger, n.db, n.storageIndex, true, ops); err != nil {
		l.RaiseError("failed to remove storage: %s", err.Error())
	}

	return 0
}

// @group users
// @summary Update account, storage, and wallet information simultaneously.
// @param accountUpdates(type=table) List of account information to be updated.
// @param storageWrites(type=table) List of storage objects to be updated.
// @param storageDeletes(type=table) A list of storage objects to be deleted.
// @param walletUpdates(type=table) List of wallet updates to be made.
// @param updateLedger(type=bool, optional=true, default=false) Whether to record this wallet update in the ledger


#!/usr/bin/python3
"""
Python script that takes in a URL, sends a request to the URL
and manage HTTP Errors
"""
import urllib.request
import sys

if __name__ == "__main__":

    req = urllib.request.Request(sys.argv[1])

    try:
        with urllib.request.urlopen(req) as res:
            reqst = res.read().decode('utf8')
        print(reqst)

    except urllib.error.HTTPError as err:
        print("Error code: {}".format(err.code))


import os
import json

from eth.tools.test_builder.test_builder import (
    fill_test,
)
from eth.tools.test_builder.formatters import (
    filler_formatter,
)
from eth.tools.test_builder.builder_utils import (
    get_test_name,
)

from eth_hash.auto import keccak

from eth.utils.hexadecimal import (
    encode_hex,
)

PARENT_DIR = os.path.dirname(os.path.abspath(__file__))
OUTPUT_DIR = os.path.join(PARENT_DIR, "json")
FILLER_PARENT_DIR = os.path.join(OUTPUT_DIR, "fillers")
TEST_PARENT_DIR = os.path.join(OUTPUT_DIR, "tests")

DIR_STRUCTURE = {

}

if __name__ == "__main__":
    for (filler_dir, test_dir), test_groups in DIR_STRUCTURE.items():
        for test_group, tests in test_groups.items():
            for filler, filler_kwargs in tests:
                test_name = get_test_name(filler)
                filename = test_name + ".json"

                filler_src_path = os.path.join(filler_dir, test_group, filename)
                filler_path = os.path.join(FILLER_PARENT_DIR, filler_src_path)
                test_path = os.path.join(TEST_PARENT_DIR, test_dir, test_group, filename)

                for path in [filler_path, test_path]:
                    os.makedirs(os.path.dirname(path), exist_ok=True)

                formatted_filler = filler_formatter(filler)
                filler_string = json.dumps(formatted_filler, indent=4, sort_keys=True)
                with open(filler_path, "w") as filler_file:
                    filler_file.write(filler_string)

                filler_hash = keccak(filler_string.encode("ascii"))
                info = {
                    "source": filler_src_path,
                    "sourceHash": encode_hex(filler_hash),
                }

                test = fill_test(filler, info=info, **filler_kwargs or {})
                with open(test_path, "w") as test_file:
                    json.dump(test, test_file, indent=4, sort_keys=True)


.dropup,
.navbar-fixed-bottom .dropdown {
  // Reverse the caret
  .caret {
    border-top: 0;
    border-bottom: @caret-width-base solid;
    content: "";
  }
  // Different positioning for bottom up menu
  .dropdown-menu {
    top: auto;
    bottom: 100%;
    margin-bottom: 1px;
  }
}

// Component alignment
//
// Reiterate per navbar.less and the modified component alignment there.

@media (min-width: @grid-float-breakpoint) {
  .navbar-right {
    .dropdown-menu {
      .dropdown-menu-right();
    }
    // Necessary for overrides of the default right aligned menu.
    // Will remove come v4 in all likelihood.
    .dropdown-menu-left {
      .dropdown-menu-left();
    }
  }
}
// Core variables and mixins
@import "variables.less";
@import "mixins.less";

// Reset and dependencies
@import "normalize.less";
@import "print.less";
@import "glyphicons.less";

// Core CSS
@import "scaffolding.less";
@import "type.less";
@import "code.less";
@import "grid.less";
@import "tables.less";
@import "forms.less";
@import "buttons.less";

// Components
@import "component-animations.less";
@import "dropdowns.less";
@import "button-groups.less";
@import "input-groups.less";
@import "navs.less";
@import "navbar.less";
@import "breadcrumbs.less";
@import "pagination.less";
@import "pager.less";
@import "labels.less";
@import "badges.less";
@import "jumbotron.less";
@import "thumbnails.less";
@import "alerts.less";
@import "progress-bars.less";
@import "media.less";
@import "list-group.less";
@import "panels.less";
@import "responsive-embed.less";
@import "wells.less";
@import "close.less";

// Components w/ JavaScript
@import "modals.less";
@import "tooltip.less";
@import "popovers.less";
@import "carousel.less";

// Utility classes
@import "utilities.less";
@import "responsive-utilities.less";
//
// Labels
// --------------------------------------------------

.label {
  display: inline;
  padding: .2em .6em .3em;
  font-size: 75%;
  font-weight: bold;
  line-height: 1;
  color: @label-color;
  text-align: center;
  white-space: nowrap;
  vertical-align: baseline;
  border-radius: .25em;

  // Add hover effects, but only for links
  a& {
    &:hover,
    &:focus {
      color: @label-link-hover-color;
      text-decoration: none;
      cursor: pointer;
    }
  }

  // Empty labels collapse automatically (not available in IE8)
  &:empty {
    display: none;
  }

  // Quick fix for labels in buttons
  .btn & {
    position: relative;
    top: -1px;
  }
}

// Colors
// Contextual variations (linked labels get darker on :hover)

.label-default {
  .label-variant(@label-default-bg);
}

.label-primary {
  .label-variant(@label-primary-bg);
}

.label-success {
  .label-variant(@label-success-bg);
}

.label-info {
  .label-variant(@label-info-bg);
}

.label-warning {
  .label-variant(@label-warning-bg);
}

.label-danger {
  .label-variant(@label-danger-bg);
}
//
// Buttons
// --------------------------------------------------

// Base


Status.ACTIVE,
                PingPongStatus.MATCHED,
                PingPongStatus.STOPPED
            )
        ) ?: throw IllegalArgumentException("고객센터에 문의해주세요")
    }

    @Transactional
    fun matchRandomBottle(
        userId: Long,
        matchingHour: Int,
        blockUserIds: Set<Long>,
        blockedMeUserIds: Set<Long>,
        count: Int = 1,
    ): List<Bottle> {
        val user = userRepository.findByIdOrNull(userId) ?: throw IllegalStateException("회원가입 상태를 문의해주세요")

        if (user.isNotRegisterProfile()) return emptyList()
        if (user.isMatchInactive()) return emptyList()

        val matchingTime = getMatchingTime(matchingHour)
        if (user.lastRandomMatchedAt > matchingTime) return emptyList()

        val usersCanBeMatched = bottleMatchingRepository.findAllUserCanBeMatched(user.id, user.gender!!)
            .filter { it.willMatchUserId !in blockUserIds }
            .filter { it.willMatchUserId !in blockedMeUserIds }

        if (usersCanBeMatched.isEmpty()) return emptyList()

        val matchingUserDtos = findUserSameRegionOrRandom(usersCanBeMatched, user, count)
        val matchingUsers = userRepository.findByIdInAndDeletedFalse(matchingUserDtos.map { it.willMatchUserId })

        val now = LocalDateTime.now()
        var bottles = matchingUsers.map { matchingUser ->
            Bottle(
                targetUser = user,
                sourceUser = matchingUser,
                expiredAt = now.plusDays(1)
            )
        }
        val savedBottles = bottleRepository.saveAll(bottles)

        user.updateLastRandomMatchedAt(LocalDateTime.now())

        return savedBottles
    }

    @Transactional
    fun matchAdditionalRandomBottle(
        userId: Long,
        matchingHour: Int,
        blockUserIds: Set<Long>,
        blockedMeUserIds: Set<Long>,
        count: Int = 1,
    ): List<Bottle> {
        val user = userRepository.findByIdOrNull(userId) ?: throw IllegalStateException("회원가입 상태를 문의해주세요")

        if (user.isNotRegisterProfile()) return emptyList()
        if (user.isMatchInactive()) return emptyList()

        var usersCanBeMatched = bottleMatchingRepository.findAllUserCanBeMatched(user.id, user.gender!!)
            .filter { it.willMatchUserId !in blockUserIds }
            .filter { it.willMatchUserId !in blockedMeUserIds }
        // 보틀 더받기 API는 매칭 상대가 없으면 이전에 매칭된 상대라도 보여준다
        if (usersCanBeMatched.isEmpty()) {
            usersCanBeMatched = bottleMatchingRepository.findAdditionalAllUserCanBeMatched(user.id, user.gender!!)
                .filter { it.willMatchUserId !in blockUserIds }
                .filter { it.willMatchUserId !in blockedMeUserIds }
        }

        if (usersCanBeMatched.isEmpty()) return emptyList()

        val matchingUserDtos = findUserSameRegionOrRandom(usersCanBeMatched, user, count)
        val matchingUsers = userRepository.findByIdInAndDeletedFalse(matchingUserDtos.map { it.willMatchUserId })

        val now = LocalDateTime.now()


中只是提到这个功能是由 GCP 统一提供。

集中式健康检查这个功能也算是一个卖点，毕竟，虽然 Envoy 自带健康检测机制，但是如果由客户端来实现健康检测，的确是需要每个客户端都检查所有其他服务，连接太多，请求太多，而且随着服务数量和实例数量的增加，健康检测的开销会直线上涨。由平台/基础设施/云等来统一提供集中式健康检查，再通过 xDS/EDS API 下发结果应该会是一个通用的做法。

### 流量控制

Traffic Director 目前提供流量控制功能，包括流量路由和策略执行。官方文档的介绍描述如下：

> 通过请求路由和丰富的流量政策进行流量控制（Alpha 版）
>
> Traffic Director 支持高级请求路由功能，如流量拆分、启用 Canary 更新等用例、网址重写/重定向、故障注入、流量镜像，以及基于各种标头值的高级路由功能，包括 Cookie。此外，Traffic Director 还支持许多高级流量政策，包括多种负载平衡方案、熔断和后端异常检测。
>
> 您可以使用 Traffic Director 轻松部署一切功能：从简单的负载平衡，到请求路由和基于百分比的流量拆分等高级功能。

从最新的 Traffic Director 的介绍 PPT 上看到，Traffic Director 的流量控制功能包含两个部分：

1. **Routing Rules**：定义请求如何路由到网格中的服务
   - Traffic splitting
   - Traffic steering
   - Timeouts and retries
   - Fault Injection
   - Mirroring
2. **Traffic Policies**：用于服务的路由相关策略
   - Load balancing schemes.
   - Outlier detection.
   - Circuit breakers
   - Timeouts

熟悉 Istio API 和 Envoy xDS API 的同学就会发现这些功能非常眼熟，基本上和 Istio / Envoy 提供的功能相同。

和包括 Istio 在内的所有 Service Mesh 产品一致，Traffic Director 也在强调说这些功能都是可以在不修改应用代码的前提下获得，这是理所当然的重要卖点。

但是注意：目前这些功能都还是 alpha 阶段，因此支持度应该不会像 Istio 那么齐全。

我们快速过一下目前提供的功能（图片来自 Google Traffic Director 的演讲 PPT）：

Traffic Splitting/流量拆分，支持百分比拆分，这是 version based routing，用于实现金丝雀发布/蓝绿部署/AB 测试等：

![img](https://skyao.io/post/201905-google-traffic-director-detail/images/tra


teResource(service.Authenticationradiuspolicy.Type(), authenticationradiuspolicyName, &authenticationradiuspolicy)
		if err != nil {
			return fmt.Errorf("Error updating authenticationradiuspolicy %s", authenticationradiuspolicyName)
		}
	}
	return readAuthenticationradiuspolicyFunc(d, meta)
}

func deleteAuthenticationradiuspolicyFunc(d *schema.ResourceData, meta interface{}) error {
	log.Printf("[DEBUG]  citrixadc-provider: In deleteAuthenticationradiuspolicyFunc")
	client := meta.(*NetScalerNitroClient).client
	authenticationradiuspolicyName := d.Id()
	err := client.DeleteResource(service.Authenticationradiuspolicy.Type(), authenticationradiuspolicyName)
	if err != nil {
		return err
	}

	d.SetId("")

	return nil
}
/*
Copyright 2016 Citrix Systems, Inc

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

	http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package citrixadc

import (
	"fmt"
	"github.com/citrix/adc-nitro-go/service"
	"github.com/hashicorp/terraform-plugin-sdk/helper/resource"
	"github.com/hashicorp/terraform-plugin-sdk/terraform"
	"testing"
)

const testAccTunneltrafficpolicy_basic = `

resource "citrixadc_tunneltrafficpolicy" "tf_tunneltrafficpolicy" {
	name   = "my_tunneltrafficpolicy"
	rule   = "true"
	action = "COMPRESS"
  }

`
const testAccTunneltrafficpolicy_update = `

resource "citrixadc_tunneltrafficpolicy" "tf_tunneltrafficpolicy" {
	name   = "my_tunneltrafficpolicy"
	rule   = "false"
	action = "NOCOMPRESS"
  }

`

func TestAccTunneltrafficpolicy_basic(t *testing.T) {
	resource.Test(t, resource.TestCase{
		PreCheck:     func() { testAccPreCheck(t) },
		Providers:    testAccProviders,
		CheckDestroy: testAccCheckTunneltrafficpolicyDestroy,
		Steps: []resource.TestStep{
			{
				Config: testAccTunneltrafficpolicy_basic,
				Check: resource.ComposeTestCheckFunc(
					testAccCheckTunneltrafficpolicyExist("citrixadc_tunneltrafficpolicy.tf_tunneltrafficpolicy", nil),
					resource.TestCheckResourceAttr("citrixadc_tunneltrafficpolicy.tf_tunneltrafficpolicy", "name", "my_tunneltrafficpolicy"),
					resource.TestCheckResourceAttr("citrixadc_tunneltrafficpolicy.tf_tunneltrafficpolicy", "rule", "true"),
					resource.TestCheckResourceAttr("citrixadc_tunneltrafficpolicy.tf_tunneltrafficpolicy", "action", "COMPRESS"),
				),
			},
			{
				Config: testAccTunneltrafficpolicy_update,
				Check: resource.ComposeTestCheckFunc(
					testAccCheckTunneltrafficpolicyExist("citrixadc_tunneltrafficpolicy.tf_tunneltrafficpolicy", nil),
					resource.TestCheckResourceAttr("citrixadc_tunneltrafficpolicy.tf_tunneltrafficpolicy", "name", "my_tunneltrafficpolicy"),
					resource.TestCheckResourceAttr("citrixadc_tunneltrafficpolicy.tf_tunneltrafficpolicy", "rule", "false"),
					resource.TestCheckResourceAttr("citrixadc_tunneltrafficpolicy.tf_tunneltrafficpolicy", "action", "NOCOMPRESS"),
				),
			},
		},


компанию!', 'success'));
    })
    .catch(() => {
      dispatch(show('Ошибка в удалении компании!', 'warning'));
    });
  trigger(triggerUrl);

};
export const changeCompany = (id: number, name: string, url: string, info: string): ThunkType => async dispatch => {
  const triggerUrl = "/api/company/";
  changeCompanyMutate(triggerUrl, id, name, info, url);

  const token = Cookie.get('token');
  await instance(token)
    .put(`/api/company/${id}/`, {
      name,
      url,
      info,
    })
    .then(() => {
      dispatch(show('Вы успешно изменили данные о компании!', 'success'));
    })
    .catch(() => {
      dispatch(show('Ошибка в изменении данных о компании!', 'warning'));
    });
  trigger(triggerUrl);

};// This should really be in common but common doesn't support testing

import { isState, getState } from '../common'

describe('isState', () => {
  test('returns true for valid state', () => {
      const state = 'Florida'
      expect(isState(state)).toBe(true)
  })

  test('returns false for invalid state', () => {
    const state = 'Blorida'
    expect(isState(state)).toBe(false)
  })

  test('returns false for mismatched case', () => {
    const state = 'florida'
    expect(isState(state)).toBe(false)
  })
})

describe('getState', () => {
  test('returns state for found state case insensitively', () => {
    const state = 'florida'
    expect(getState(state)).toBe('Florida')
  })

  test('returns state for found state abbreviation', () => {
    const state = 'fl'
    expect(getState(state)).toBe('Florida')
  })

  test('returns undefined for unidentified state', () => {
    const state = 'abc'
    expect(getState(state)).toBeUndefined()
  })
})
/**
 * @license
 * Copyright 2017 Google Inc.
 *
 * 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.
 */

import { cssClasses } from './constants';

export default class MDCCircularProgressFoundation {
  public determinate_: Boolean = true;
  public progress_: Number = 0;
  public color_: any;
  public adapter_!: any;

  static get cssClasses() {
    return cssClasses;
  }

  static get defaultAdapter() {
    return {
      addClass: (/* className: string */) => { },
      hasClass: (/* className: string */) => false,