padding-left:2.5em}.go-p[data-v-1f1a2a96]{padding:0!important}.go-d-inline-block[data-v-1f1a2a96]{display:inline-block}.go-d-block[data-v-1f1a2a96]{display:block}#go-chart-edit-layout[data-v-1f1a2a96]{position:relative;width:100%;overflow:hidden}[data-theme=light] #go-chart-edit-layout[data-v-1f1a2a96]{background-image:linear-gradient(#fafafc 14px,transparent 0),linear-gradient(90deg,transparent 14px,#373739 0)}[data-theme=dark] #go-chart-edit-layout[data-v-1f1a2a96]{background-image:linear-gradient(#18181c 14px,transparent 0),linear-gradient(90deg,transparent 14px,#86909c 0)}#go-chart-edit-layout #go-chart-edit-content[data-v-1f1a2a96]{border-radius:10px;overflow:hidden}[data-theme=light] #go-chart-edit-layout #go-chart-edit-content[data-v-1f1a2a96]{box-shadow:0 8px 10px #00000012}[data-theme=dark] #go-chart-edit-layout #go-chart-edit-content[data-v-1f1a2a96]{box-shadow:0 8px 10px #1e1e1e1f}#go-chart-edit-layout #go-chart-edit-content .edit-content-chart[data-v-1f1a2a96]{position:absolute;overflow:hidden}.filter-content[data-v-1f1a2a96]{margin-bottom:16px;overflow:hidden}
.checkbox.btn {margin-top: 0px;}
#releaseInfo > div {padding-top: 15px;}

.linkBox #queryBox .search-form .form-actions {padding-bottom: 5px;}
.linkBox .table-header {padding: 8px 15px; border-bottom: 1px solid #cbd0db;}
#unlinkStoryList, #unlinkBugList, #unlinkLeftBugList {border-top: 1px solid #cbd0db;}

#tabsNav .nav-tabs > li.pull-right {margin-right: 120px; margin-top: -5px;}
#tabsNav .nav-tabs > li.active + li.pull-right {margin-right: 0;}
ol, ul {padding-left: 20px;}
.body-modal #mainContent {min-height: 240px;}
.c-id {width: 110px;}
td.c-build{white-space: nowrap; overflow:hidden;}
th.c-user,td.c-user{text-align:left}

#stories th, #stories td{padding-left:16px;padding-right:16px;}
#stories .c-build{width:160px; text-align:left;}
#stories .c-status{width:120px;}
#stories .c-stage{width:112px; text-align:left;}
#stories .c-estimate{width:90px; text-align:right;}
#bugs .c-build{width:160px; text-align:left;}
#bugs .c-user{width:120px;}
#bugs .c-date{width:130px;}
#leftBugs .c-id{width:90px;}
#leftBugs .c-build{width:160px; text-align:left;}
#leftBugs .c-user{width:120px;}
.block-burn .panel-body {margin-top: 20px;}
.data-stats .statsTr td {padding: 0px;}
.data-stats .statsTr td:first-child {width: 80px;}
[lang^=en] .data-stats .statsTr td:first-child, [lang^=fr] .data-stats .statsTr td:first-child, [lang^=de] .data-stats .statsTr td:first-child {width: 100px;}

#burnWrapper {max-width: 400px; margin: 0 auto; padding: 8px; position: relative;}
#burnYUnit {position: absolute; color: #CBD0DB; top: -10px; left: 10px;}
#burnLegend


anyhow) is fantastic for applications where the rest of its features are needed.

## Contributing

We appreciate all kinds of contributions, check out our [contributing guidelines](./CONTRIBUTING.md) for more information! Also, please be sure to follow our [code of conduct](./CODE_OF_CONDUCT.md).

## License

See [`LICENSE`](./LICENSE).
*/

mod fmt;
pub use fmt::fmt_err;
// An alias because it's nice
pub use fmt::fmt_err as fmterr;
<reponame>SamuelMarks/umya-spreadsheet
use std::io;

use structs::Image;
use super::driver::*;
use super::XlsxError;

pub(crate) fn write<W: io::Seek + io::Write>(images: Vec<&Image>, arv: &mut zip::ZipWriter<W>, sub_dir: &str) -> Result<(), XlsxError> {
    for image in images {
        let file_name = image.get_image_name();
        let writer = image.get_image_data().as_ref();
        let _ = make_file_from_bin(file_name, arv, writer, Some(sub_dir)).unwrap();
    }

    Ok(())
}
<filename>front/src/components/form/webhook.rs<gh_stars>1-10
pub(crate) enum Message {
    Cancel,
    Submit,
    UpdateMarkRead(bool),
    UpdateName(String),
    UpdateUrl(String),
}

#[derive(Clone, yew::Properties)]
pub(crate) struct Properties {
    pub webhook: oxfeed_common::webhook::Entity,
    pub on_cancel: yew::Callback<()>,
    pub on_submit: yew::Callback<oxfeed_common::webhook::Entity>,
}

pub(crate) struct Component {
    link: yew::ComponentLink<Self>,
    props: Properties,
}

impl yew::Component for Component {
    type Message = Message;
    type Properties = Properties;

    fn create(props: Self::Properties, link: yew::ComponentLink<Self>) -> Self {
        Self { link, props }
    }

    fn update(&mut self, msg: Self::Message) -> yew::ShouldRender {
        match msg {
            Self::Message::Cancel => self.props.on_cancel.emit(()),
            Self::Message::Submit => self.props.on_submit.emit(self.props.webhook.clone()),
            Self::Message::UpdateMarkRead(mark_read) => self.props.webhook.mark_read = mark_read,
            Self::Message::UpdateName(name) => self.props.webhook.name = name,
            Self::Message::UpdateUrl(url) => self.props.webhook.url = url,
        }

        true
    }

    fn view(&self) -> yew::Html {
        yew::html! {
            <form>

                    { "Name" }

                        <input
                            class="form-control"
                            name="name"
                            required=true
                            value=self.props.webhook.name.clone()
                            oninput=self.link.callback(|e: yew::InputData| Self::Message::UpdateName(e.value))
                        />

                    { "URL" }

                        <input
                            class="form-control"
                            name="url"
                            required=true


ver="UNKNOWN",le="262144"} 1
    caddy_http_request_size_bytes_bucket{code="200",handler="empty",host="example.com",method="GET",server="UNKNOWN",le="1.048576e+06"} 1
    caddy_http_request_size_bytes_bucket{code="200",handler="empty",host="example.com",method="GET",server="UNKNOWN",le="4.194304e+06"} 1
    caddy_http_request_size_bytes_bucket{code="200",handler="empty",host="example.com",method="GET",server="UNKNOWN",le="+Inf"} 1
    caddy_http_request_size_bytes_sum{code="200",handler="empty",host="example.com",method="GET",server="UNKNOWN"} 23
    caddy_http_request_size_bytes_count{code="200",handler="empty",host="example.com",method="GET",server="UNKNOWN"} 1
	caddy_http_request_size_bytes_bucket{code="429",handler="foo",host="example.com",method="GET",server="UNKNOWN",le="256"} 1
	caddy_http_request_size_bytes_bucket{code="429",handler="foo",host="example.com",method="GET",server="UNKNOWN",le="1024"} 1
	caddy_http_request_size_bytes_bucket{code="429",handler="foo",host="example.com",method="GET",server="UNKNOWN",le="4096"} 1
	caddy_http_request_size_bytes_bucket{code="429",handler="foo",host="example.com",method="GET",server="UNKNOWN",le="16384"} 1
	caddy_http_request_size_bytes_bucket{code="429",handler="foo",host="example.com",method="GET",server="UNKNOWN",le="65536"} 1
	caddy_http_request_size_bytes_bucket{code="429",handler="foo",host="example.com",method="GET",server="UNKNOWN",le="262144"} 1
	caddy_http_request_size_bytes_bucket{code="429",handler="foo",host="example.com",method="GET",server="UNKNOWN",le="1.048576e+06"} 1
	caddy_http_request_size_bytes_bucket{code="429",handler="foo",host="example.com",method="GET",server="UNKNOWN",le="4.194304e+06"} 1
	caddy_http_request_size_bytes_bucket{code="429",handler="foo",host="example.com",method="GET",server="UNKNOWN",le="+Inf"} 1
	caddy_http_request_size_bytes_sum{code="429",handler="foo",host="example.com",method="GET",server="UNKNOWN"} 23
	caddy_http_request_size_bytes_count{code="429",handler="foo",host="example.com",method="GET",server="UNKNOWN"} 1
	# HELP caddy_http_response_size_bytes Size of the returned response.
	# TYPE caddy_http_response_size_bytes histogram
	caddy_http_response_size_bytes_bucket{code="200",handler="bar",host="example.com",method="GET",server="UNKNOWN",le="256"} 1
	caddy_http_response_size_bytes_bucket{code="200",handler="bar",host="example.com",method="GET",server="UNKNOWN",le="1024"} 1
	caddy_http_response_size_bytes_bucket{code="200",handler="bar",host="example.com",method="GET",server="UNKNOWN",le="4096"} 1
	caddy_http_response_size_bytes_bucket{code="200",handler="bar",host="example.com",method="GET",server="UNKNOWN",le="16384"} 1
	caddy_http_response_size_bytes_bucket{code="200",handler="bar",host="example.com",method="GET",server="UNKNOWN",le="65536"} 1
	caddy_http_response_size_bytes_bucket{code="200",handler="bar",host="example.com",method="GET",server="UNKNOWN",le="262144"} 1


/*
 * SonarLint for Visual Studio
 * Copyright (C) 2016-2025 SonarSource SA
 * mailto:info AT sonarsource DOT com
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 3 of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program; if not, write to the Free Software Foundation,
 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 */

using SonarLint.VisualStudio.Core.Analysis;

namespace SonarLint.VisualStudio.Integration.Vsix.Analysis.UnitTests
{
    [TestClass]
    public class AnalysisRequesterTests
    {
        [TestMethod]
        public void NoListeners_NoError()
        {
            var logger = new TestLogger();
            var testSubject = new AnalysisRequester(logger);

            testSubject.RequestAnalysis();

            logger.AssertNoOutputMessages();
        }

        [TestMethod]
        public void OneListener_EventIsRaised()
        {
            var logger = new TestLogger();
            var testSubject = new AnalysisRequester(logger);

            bool eventRaised = false;
            object actualSender = null;
            AnalysisRequestEventArgs actualEventArgs = null;

            testSubject.AnalysisRe


static str = r#<caret>"
        {% extends "parent.html" %}
        ";
    """, '#')

    private fun doTest(before: String, after: String) {
        // First type a pound sign...
        doTestByText(before, after, '#')
        // ...then delete it.
        doTestByText(after, before, '\b')
    }
}
/*
 * Use of this source code is governed by the MIT license that can be
 * found in the LICENSE file.
 */

package org.rust.ide.annotator

class RsUnionExprWithWrongFieldCountTest : RsAnnotatorTestBase(RsErrorAnnotator::class) {
    fun `test E0784 union literal ok`() = checkErrors("""
        union U { a: u8, b: u16 }
        fn main() {
            _ = U { a: 0 };
            _ = U { b: 0 };
        }
    """)

    fun `test E0784 union literal with wrong fields count`() = checkErrors("""
        union U { a: u8, b: u16 }
        fn main() {
            _ = /*error descr="Union expressions should have exactly one field [E0784]"*/U {}/*error**/;
            _ = /*error descr="Union expressions should have exactly one field [E0784]"*/U { a: 0, b: 1 }/*error**/;
            _ = /*error descr="Union expressions should have exactly one field [E0784]"*/U { a: 0, b: 1, c: 2 }/*error**/;
        }
    """)

    fun `test E0784 union literal with struct update instead of fields`() = checkErrors("""
        union U { a: u8, b: u16 }
        fn main() {
             _ = /*error descr="Union expressions should have exactly one field [E0784]"*/U { ..u }/*error**/;
        }
    """)

    fun `test E0784 fix by removing first field`() = checkFixByText("Remove `a: 0`", """
        union U { a: u8, b: u16 }
        fn main() {
            _ = /*error descr="Union expressions should have exactly one field [E0784]"*/U { a: 0, b: 1 }/*caret*//*error**/;
        }
    """, """
        union U { a: u8, b: u16 }
        fn main() {
            _ = U { b: 1 }/*caret*/;
        }
    """)

    fun `test E0784 fix by removing last field`() = checkFixByText("Remove `b: 1`", """
        union U { a: u8, b: u16 }
        fn main() {
            _ = /*error descr="Union expressions should have exactly one field [E0784]"*/U { a: 0, b: 1 }/*caret*//*error**/;
        }
    """, """
        union U { a: u8, b: u16 }
        fn main() {
            _ = U { a: 0 }/*caret*/;
        }
    """)
}
/*
 * Use of this source code is governed by the MIT license that can be
 * found in the LICENSE file.
 */

package org.rust.ide.annotator

import com.intellij.codeInspection.InspectionProfileEntry
import com.intellij.lang.annotation.HighlightSeverity
import com.intellij.openapi.vfs.VirtualFile
import com.intellij.testFramework.fixtures.CodeInsightTestFixture
import com.intellij.testFramework.fixtures.CodeInsightTestFixture.*
import com.intellij.testFramework.fixtures.impl.CodeInsightTestFixtureImpl
import junit.framework.TestCase
import org.intellij.lang.annotations.Language
import org.rust.*
import org.rust.lang.core.macros.MacroExpansionManager
import org.rust.lang.core.macros.macroExpansionManagerIfCreated
import kotlin.reflect.KClass

open class RsAnnotationTestFixture<C>(
    testCase: TestCase,
    codeInsightFixture: CodeInsightTestFixture,
    annotatorClasses: List<KClass<out AnnotatorBase>> = emptyList(),
    inspectionClasses: List<KClass<out InspectionProfileEntry>> = emptyList(),
    override val baseFileName: String


CSIZ;
				}
				if (++i >= ARJ_FDICSIZ)
					i = 0;
			}
		}
	}
	if (r != 0) {
        memcpy(_outstream, _ntext, r);
        _outstream += r;
    }
}

    byte    *bck = _outstream;

    if(method4) {
        ArjDecoder__decode_f(_outstream_size);
    } else {
        ArjDecoder__decode(_outstream_size);
    }

    return _outstream - bck;

#else
    return -1;
#endif
}

/*****************/

    static int FabDecompressor__bitsLeft;
    static uint32 FabDecompressor__bitBuffer;
	static const byte *FabDecompressor__srcData, *FabDecompressor__srcP;
	static int FabDecompressor__srcSize;

static int FabDecompressor__getBit() {
	FabDecompressor__bitsLeft--;
	if (FabDecompressor__bitsLeft == 0) {
		if (FabDecompressor__srcP - FabDecompressor__srcData == FabDecompressor__srcSize)
			return -1; //error(FabInputExceededError);

		FabDecompressor__bitBuffer = (READ_LE_UINT16(FabDecompressor__srcP) << 1) | (FabDecompressor__bitBuffer & 1);
		FabDecompressor__srcP += 2;
		FabDecompressor__bitsLeft = 16;
	}

	int bit = FabDecompressor__bitBuffer & 1;
	FabDecompressor__bitBuffer >>= 1;
	return bit;
}

int FabDecompressor__decompress(const byte *srcData, int srcSize, byte *destData, int destSize) {
	byte copyLen, copyOfsShift, copyOfsMask, copyLenMask;
	unsigned long copyOfs;
	byte *destP;

	// Validate that the data starts with the FAB header
	if (strncmp((const char *)srcData, "FAB", 3) != 0)
		return -1; //error("FabDecompressor - Invalid compressed data");

	int shiftVal = srcData[3];
	if ((shiftVal < 10) || (shiftVal > 13))
		return -1; //error("FabDecompressor - Invalid shift start");

	copyOfsShift = 16 - shiftVal;
	copyOfsMask = 0xFF << (shiftVal - 8);
	copyLenMask = (1 << copyOfsShift) - 1;
	copyOfs = 0xFFFF0000;
	destP = destData;

	// Initialize data fields
	FabDecompressor__srcData = srcData;
	FabDecompressor__srcP = FabDecompressor__srcData + 6;
	FabDecompressor__srcSize = srcSize;
	FabDecompressor__bitsLeft = 16;
	FabDecompressor__bitBuffer = READ_LE_UINT16(srcData + 4);

	for (;;) {
		if (FabDecompressor__getBit() == 0) {
			if (FabDecompressor__getBit() == 0) {
				copyLen = ((FabDecompressor__getBit() << 1) | FabDecompressor__getBit()) + 2;
				copyOfs = *FabDecompressor__srcP++ | 0xFFFFFF00;
			} else {
				copyOfs = (((FabDecompressor__srcP[1] >> copyOfsShift) | copyOfsMask) << 8) | FabDecompressor__srcP[0];
				copyLen = FabDecompressor__srcP[1] & copyLenMask;
				FabDecompressor__srcP += 2;
				if (copyLen == 0) {
					copyLen = *FabDecompressor__srcP++;
					if (copyLen == 0)
						break;
					else if (copyLen == 1)
						continue;
					else
						copyLen++;
				} else {
					copyLen += 2;
				}
				copyOfs |= 0xFFFF0000;
			}
			while (copyLen-- > 0) {
				if (destP - destData == destSize)
					return -1; //error(FabOutputExceededError);

				*destP = destP[(signed int)copyOfs];
				destP++;
			}
		} else {
			if (FabDecompressor__srcP - srcData == srcSize)
				return -1; //error(FabInputExceededError);
			if (destP - destData == destSize)
				return -1; //error(FabOutputExceededError);

			*destP++ = *FabDecompressor__srcP++;
		}
	}

    return destP - destData;
}

/*****************/


of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.

    Contact:
    Lucas Czech <lucas.czech@h-its.org>
    Exelixis Lab, Heidelberg Institute for Theoretical Studies
    Schloss-Wolfsbrunnenweg 35, D-69118 Heidelberg, Germany
*/

/**
 * @brief
 *
 * @file
 * @ingroup test
 */

#include "src/common.hpp"

#include "genesis/taxonomy/functions/ranks.hpp"

#include <stdexcept>

using namespace genesis::taxonomy;

TEST( Taxonomy, Rank )
{
    EXPECT_EQ( "Kingdom", rank_from_abbreviation( 'k' ));
    EXPECT_EQ( "",        rank_from_abbreviation( 'q' ));

    EXPECT_EQ( "f", rank_to_abbreviation( "familY" ));
    EXPECT_EQ( "",  rank_to_abbreviation( "hamlet" ));

    auto rra_0 = resolve_rank_abbreviation( "K__Bacteria" );
    EXPECT_EQ( "Kingdom",  rra_0.first );
    EXPECT_EQ( "Bacteria", rra_0.second );

    auto rra_1 = resolve_rank_abbreviation( "q__quartz" );
    EXPECT_EQ( "",  rra_1.first );
    EXPECT_EQ( "q__quartz", rra_1.second );

    auto rra_2 = resolve_rank_abbreviation( "Panthera tigris altaicia" );
    EXPECT_EQ( "",  rra_2.first );
    EXPECT_EQ( "Panthera tigris altaicia", rra_2.second );
}
/*
    Genesis - A toolkit for working with phylogenetic data.
    Copyright (C) 2014-2018 Lucas Czech and HITS gGmbH

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.

    Contact:
    Lucas Czech <lucas.czech@h-its.org>
    Exelixis Lab, Heidelberg Institute for Theoretical Studies
    Schloss-Wolfsbrunnenweg 35, D-69118 Heidelberg, Germany
*/

/**
 * @brief
 *
 * @file
 * @ingroup test
 */

#include "src/common.hpp"

#include "genesis/taxonomy/taxon.hpp"
#include "genesis/taxonomy/taxonomy.hpp"
#include "genesis/taxonomy/taxopath.hpp"
#include "genesis/taxonomy/formats/taxopath_parser.hpp"
#include "genesis/taxonomy/formats/taxopath_generator.hpp"
#include "genesis/taxonomy/functions/taxonomy.hpp"
#include "genesis/taxonomy/functions/taxopath.hpp"

#include <stdexcept>

using namespace genesis::taxonomy;

TEST( Taxopath, Comparison )
{
    // Add some elements.
    Taxonomy tax;


0x8E03004C ; 800D07C4
	dw 0xAE021978 ; 800D07C8
	dw 0x8C640008 ; 800D07CC
	dw 0x0C017227 ; 800D07D0
	dw 0x00402821 ; 800D07D4
	dw 0x28420002 ; 800D07D8
	dw 0x14400004 ; 800D07DC
	dw 0x00001021 ; 800D07E0
	dw 0x08034201 ; 800D07E4
	dw 0x24020001 ; 800D07E8
	dw 0x00001021 ; 800D07EC
	dw 0x8E0319D0 ; 800D07F0
	dw 0x8E041A28 ; 800D07F4
	dw 0x24630001 ; 800D07F8
	dw 0xAE0419B4 ; 800D07FC
	dw 0xAE0319D0 ; 800D0800
	dw 0x8FBF0014 ; 800D0804
	dw 0x8FB00010 ; 800D0808
	dw 0x03E00008 ; 800D080C
	dw 0x27BD0018 ; 800D0810


r()?", false);
			}
			if ((byte)(parts & MeshParts.Verts) != 0 || (byte)(parts & MeshParts.Tris) != 0)
			{
				this.mesh.Clear();
			}
			if ((byte)(parts & MeshParts.Verts) != 0)
			{
				if (this.verts.Count > 0)
				{
					this.mesh.SetVertices(this.verts);
				}
				else
				{
					Log.Error("Cannot cook Verts for " + this.material.ToString() + ": no ingredients data. If you want to not render this submesh, disable it.", false);
				}
			}
			if ((byte)(parts & MeshParts.Tris) != 0)
			{
				if (this.tris.Count > 0)
				{
					this.mesh.SetTriangles(this.tris, 0);
				}
				else
				{
					Log.Error("Cannot cook Tris for " + this.material.ToString() + ": no ingredients data.", false);
				}
			}
			if ((byte)(parts & MeshParts.Colors) != 0 && this.colors.Count > 0)
			{
				this.mesh.SetColors(this.colors);
			}
			if ((byte)(parts & MeshParts.UVs) != 0 && this.uvs.Count > 0)
			{
				this.mesh.SetUVs(0, this.uvs);
			}
			this.finalized = true;
		}

		public override string ToString()
		{
			return "LayerSubMesh(" + this.material.ToString() + ")";
		}
	}
}


, 'c');
    Table<String, Integer, Character> hashCopy = HashBasedTable.create(table);
    Table<String, Integer, Character> reordered
        = create("foo", 3, 'c', "foo", 1, 'a', "bar", 1, 'b');
    Table<String, Integer, Character> smaller
        = create("foo", 1, 'a', "bar", 1, 'b');
    Table<String, Integer, Character> swapOuter
        = create("bar", 1, 'a', "foo", 1, 'b', "bar", 3, 'c');
    Table<String, Integer, Character> swapValues
        = create("foo", 1, 'c', "bar", 1, 'b', "foo", 3, 'a');

    new EqualsTester()
        .addEqualityGroup(table, hashCopy, reordered)
        .addEqualityGroup(smaller)
        .addEqualityGroup(swapOuter)
        .addEqualityGroup(swapValues)
        .testEquals();
  }

  public void testHashCode() {
    table = create("foo", 1, 'a', "bar", 1, 'b', "foo", 3, 'c');
    int expected = Objects.hashCode("foo", 1, 'a')
        + Objects.hashCode("bar", 1, 'b')
        + Objects.hashCode("foo", 3, 'c');
    assertEquals(expected, table.hashCode());
  }

  public void testToStringSize1() {
    table = create("foo", 1, 'a');
    assertEquals("{foo={1=a}}", table.toString());
  }

  public void testRow() {
    table = create("foo", 1, 'a', "bar", 1, 'b', "foo", 3, 'c');
    assertEquals(ImmutableMap.of(1, 'a', 3, 'c'), table.row("foo"));
  }

  // This test assumes that the implementation does not support null keys.
  public void testRowNull() {
    table = create("foo", 1, 'a', "bar", 1, 'b', "foo", 3, 'c');
    try {
      table.row(null);
      fail();
    } catch (NullPointerException expected) {}
  }

  public void testColumn() {
    table = create("foo", 1, 'a', "bar", 1, 'b', "foo", 3, 'c');
    assertEquals(ImmutableMap.of("foo", 'a', "bar", 'b'), table.column(1));
  }

  // This test assumes that the implementation does not support null keys.
  public void testColumnNull() {
    table = create("foo", 1, 'a', "bar", 1, 'b', "foo", 3, 'c');
    try {
      table.column(null);
      fail();
    } catch (NullPointerException expected) {}
  }

  public void testColumnSetPartialOverlap() {
    table = create(
        "foo", 1, 'a', "bar", 1, 'b', "foo", 2, 'c', "bar", 3, 'd');
    ASSERT.that(table.columnKeySet()).hasContentsAnyOrder(1, 2, 3);
  }

  @GwtIncompatible("NullPointerTester")
  public void testNullPointerInstance() throws Exception {
    table = create(
        "foo", 1, 'a', "bar", 1, 'b', "foo", 2, 'c', "bar", 3, 'd');
    new NullPointerTester().testAllPublicInstanceMethods(table);
  }
}
/*
 * Copyright (C) 2009 Google 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 com.google.common.collect;

import static org.


기 뒤섞인 코드에, 좌절한 고객과, 테스트에 쏟아 부은 노력이 허사였다는 실망감만 남긴다.

내가 이야기가 전하는 교훈은 다음과 같다. **테스트 코드는 실제 코드 못지 않게 중요하다.** 테스트 코드는 이류 시민이 아니다. 테스트 코드는 사고와 설계와 주의가 필요하다. 실제 코드 못지 않게 깨끗하게 짜야 한다.

### 🎈 테스트는 유연성, 유지보수성, 재사용성을 제공한다
테스트 코드를 깨끗하게 유지하지 않으면 결국 잃어버린다. 그리고 테스트 케이스가 없으면 실제 코드를 유연하게 만드는 버팀목도 사라진다. 맞다, 제대로 읽었다. 코드에 유연성, 유지보수성, 재사용성을 제공하는 버팀목이 바로 **단위 테스트**다. 이유는 단순하다. 테스트 케이스가 있으면 변경이 두렵지 않으니까! 테스트 케이스가 없다면 모든 변경이 잠정적인 버그다. 아키텍쳐가 아무리 유연하더라도, 설계를 아무리 잘 나눴더라도, 테스트 케이스가 없으면 개발자는 변경을 주저한다. 버그가 숨어들까 두렵기 때문이다.

하지만 테스트 케이스가 **있다면** 공포는 사실상 사라진다. 테스트 커버리지가 높을수록 공포는 줄어든다. 아키텍처가 부실한 코드나 설계가 모호하고 엉망인 코드라도 별다른 우려 없이 변경할 수 있다. 아니, 오히려 안심하고 아키텍처와 설계를 개선할 수 있다.

그러므로 실제 코드


dding-box;
  padding: 0 2px;
}
div.toolbarModifier > ul > li ul li[data-type="subgroup"] [data-type="button"]:focus {
  background: rgba(0, 0, 0, 0.04);
}
div.toolbarModifier > ul > li ul li[data-type="subgroup"] [data-type="button"] input {
  vertical-align: middle;
}
div.toolbarModifier > ul > li ul li > p,
div.toolbarModifier > ul > li ul li > ul {
  display: table-cell;
  vertical-align: middle;
}
div.toolbarModifier > ul > li ul li ul {
  padding: 0;
}
div.toolbarModifier > ul > li ul li ul li {
  padding: 0;
  display: inline-block;
  cursor: pointer;
  margin: 2px 5px 2px 0;
}
div.toolbarModifier > ul > li ul li ul li .cke_combo_text {
  cursor: pointer;
  white-space: nowrap;
}
div.toolbarModifier > ul > li ul li ul li .cke_toolgroup,
div.toolbarModifier > ul > li ul li ul li .cke_combo_button {
  cursor: pointer;
  margin: 0;
  vertical-align: middle;
  border: 1px solid #ddd;
  font-size: 11.41px;
  font-size: 0.713rem;
  line-height: 20.54px;
  line-height: 1.28rem;
}
div.toolbarModifier > .codemirror-wrapper {
  overflow-y: auto;
}
div.toolbarModifier-hints {
  float: right;
  width: 350px;
  min-width: 150px;
  overflow-y: auto;
  margin-left: 1.5em;
}
div.toolbarModifier-hints h3 {
  font-size: 18.08px;
  font-size: 1.13rem;
  line-height: 32.54px;
  line-height: 2.03rem;
  padding: 0.36em 1.5em;
  background: #f5f5f5;
  border-bottom: 1px solid #ddd;
  margin-top: 0;
  margin-bottom: 1.2em;
}
div.toolbarModifier-hints dl {
  margin-bottom: 1.2em;
  overflow: hidden;
}
div.toolbarModifier-hints dl .list-header {
  font-weight: bold;
  border: 0;
  padding-bottom: 0.6em;
}
div.toolbarModifier-hints dl > p {
  text-align: center;
}
div.toolbarModifier-hints dl dt {
  float: left;
  width: 9em;
  clear: both;
  text-align: right;
  border-top: 1px solid #ddd;
  padding-left: 1.5em;
  padding-right: .1em;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
}
div.toolbarModifier-hints dl dt code {
  background: none;
  border: none;
  vertical-align: middle;
}
div.toolbarModifier-hints dl dd {
  margin-left: 10em;
  clear: right;
  padding-right: 1.5em;
}
div.toolbarModifier-hints dl dd code {
  line-height: 2.2em;
}
div.toolbarModifier-hints dl dd:after {
  content: '\00a0';
  display: block;
  clear: left;
  float: right;
  height: 0;
  width: 0;
}
.toolbarModifier-hints,
.configContainer textarea.configCode,
.CodeMirror {
  -webkit-border-radius: 3px;
  -webkit-background-clip: padding-box;
  -moz-border-radius: 3px;
  -moz-background-clip: padding;
  border-radius: 3px;
  background-clip: padding-box;
  border: 1px solid #ccc;


E8874633AB9DD(__this, L_14, /*hidden argument*/NULL);
		NumberFormatter_Append_m89E758C0DF2C0D91CB8805EA2E8116EFBDA3FBFE(__this, ((int32_t)32), /*hidden argument*/NULL);
	}

IL_0076:
	{
		NumberFormatInfo_t58780B43B6A840C38FD10C50CDFE2128884CAD1D * L_15 = ___nfi1;
		NullCheck(L_15);
		Int32U5BU5D_t70F1BDC14B1786481B176D6139A5E3B87DC54C32* L_16 = NumberFormatInfo_get_NumberGroupSizes_mC60DCC9A6E3E8487D88C76ECA82BC51FC9771904(L_15, /*hidden argument*/NULL);
		NumberFormatInfo_t58780B43B6A840C38FD10C50CDFE2128884CAD1D * L_17 = ___nfi1;
		NullCheck(L_17);
		String_t* L_18 = NumberFormatInfo_get_NumberGroupSeparator_m1D17A9A056016A546F4C5255FA2DBEC532FC1BF1_inline(L_17, /*hidden argument*/NULL);
		NumberFormatter_AppendIntegerStringWithGroupSeparator_m457B467F1ACC94C6616CE2C7DBD91A183079E128(__this, L_16, L_18, /*hidden argument*/NULL);
		int32_t L_19 = ___precision0;
		if ((((int32_t)L_19) <= ((int32_t)0)))
		{
			goto IL_009f;
		}
	}
	{
		NumberFormatInfo_t58780B43B6A840C38FD10C50CDFE2128884CAD1D * L_20 = ___nfi1;
		NullCheck(L_20);
		String_t* L_21 = NumberFormatInfo_get_NumberDecimalSeparator_mDEE0AD902FFF6FD50CC73C9636ECF5603B5705D3_inline(L_20, /*hidden argument*/NULL);
		NumberFormatter_Append_m43BB11E4B645170922867E8AF63E8874633AB9DD(__this, L_21, /*hidden argument*/NULL);
		int32_t L_22 = ___precision0;
		NumberFormatter_AppendDecimalString_mDA8FF2EB7444D6A78FC74574BD4FF69AB18EF082(__this, L_22, /*hidden argument*/NULL);
	}

IL_009f:
	{
		bool L_23 = __this->get__positive_12();
		if (L_23)
		{
			goto IL_00f6;
		}
	}
	{
		NumberFormatInfo_t58780B43B6A840C38FD10C50CDFE2128884CAD1D * L_24 = ___nfi1;
		NullCheck(L_24);
		int32_t L_25 = NumberFormatInfo_get_NumberNegativePattern_m842B4013A8D878C97943E291420D0211540641F1_inline(L_24, /*hidden argument*/NULL);
		V_0 = L_25;
		int32_t L_26 = V_0;
		switch (L_26)
		{
			case 0:
			{
				goto IL_00ca;
			}
			case 1:
			{
				goto IL_00f6;
			}
			case 2:
			{
				goto IL_00f6;
			}
			case 3:
			{
				goto IL_00d4;
			}
			case 4:
			{
				goto IL_00e2;
			}
		}
	}
	{
		goto IL_00f6;
	}

IL_00ca:
	{
		NumberFormatter_Append_m89E758C0DF2C0


：

WizardMath 13B 在 GSM8k 上优于 PaLM 1 540B（63.9 vs 56.5）、Minerva 540B（63.9 vs 58.8）和 GPT-3.5（63.9 vs 57.1）。同时，它在 MATH 上超越了 PaLM 1 540B（14.0 vs. 8.8）、GPT-3 175B（14.0 vs. 5.2）；

WizardMath 70B 在 GSM8k 上超过 Claude Instant（81.6 vs 80.9）、ChatGPT（81.6 vs 80.8）和 PaLM 2（81.6 vs 80.7）。同时，WizardMath 70B 在 MATH 上超过了 Text-davinci-002（22.7 比 19.1）。

4.2 与开源模型比较

表 1 中所示的结果表明，WizardMath 70B 在 GSM8k 和 MATH 基准测试中大幅度超过所有开源模型。详细结果如下：

WizardMath 7B 超越了大多数参数量从 7B 到 40B 之间的开源模型，包括 MPT、Falcon、Baichuan-chat、Vicuna v1.3、ChatGLM 2、Qwen、Llama 1 和 Llama 2；

WizardMath 13B 在 GSM8k 上明显优于 Llama 1 65B（63.9 vs. 50.9）和 Llama 2 70B（63.9 vs. 56.8）。同时它在 MATH 上的表现远远优于 Llama 1 65B（14.0 vs. 10.6）和 Llama 2 70B（14.0 vs. 13.5）；

WizardMath 70B 在 GSM8k 上超越了 Llama 2 70B（81.6 vs. 56.8），提升 24.8 个点。同时它在数学方面也比 Llama 2 70B（22.7 比 13.5）高出 9.2个点。

WizardLM 团队在开源 LLM 研发上表现异常耀眼，多项世界公认大模型基准能力测评中比肩闭源巨头（OpenAI 和 Anthropic）， 这到底是怎么样的一个团队，对于大模型技术有怎样的理解和认知，外界多有


ll === sourceBall;
  },
});

$tubes.on(ballMoved, (__, { tubes, currentIndex, selectedIndex }) => {
  const sourceTube = tubes[currentIndex ?? 0];
  const sourceBall = _.head(sourceTube.balls)!;

  return tubes.map((tube, idx) => {
    if (idx === currentIndex) return { balls: tube.balls.slice(1) };
    if (idx === selectedIndex) return { balls: [sourceBall, ...tube.balls] };
    return tube;
  });
});

$moves.on(ballMoved, (count) => count + 1);
$currentSelectedTubeIndex.on(ballMoved, () => null);

guard({
  source: $filledTubesCount,
  filter: (count) => count === COLORS_IN_GAME,
  target: gameFinishedSuccessfylly,
});

$state.on(gameFinishedSuccessfylly, () => "won");

$state.reset(toMainMenuClicked);
$moves.reset(toMainMenuClicked, restartClicked);
$currentSelectedTubeIndex.reset(restartClicked);

export const stores = { $state, $moves, $tubes, $field };
export const events = {
  startClicked,
  restartClicked,
  toMainMenuClicked,
  tubeClicked,
};
export const effects = {};
import * as FilmActions from './../actions/film.actions';
import { FilmState } from '../states/film.state';
import { Film } from '../../models/film';

const initialState: FilmState = <FilmState>{
    films: [],
    filteredFilms: [],
    wordToFilter: '',
    genresToFilter: []
};

export function filmsReducer(state: FilmState = initialState, action: FilmActions.FilmActions) {
    switch (action.type) {
        case FilmActions.GET_FILMS:
            return <FilmState>{
                films: [...action.payload],
                filteredFilms: [...state.filteredFilms],
                wordToFilter: state.wordToFilter,
                genresToFilter: state.genresToFilter
            };
        case FilmActions.GET_FILTERED_FILMS:
            return <FilmState>{
                films: [...state.films],
                filteredFilms: [...action.payload],
                wordToFilter: state.wordToFilter,
                genresToFilter: state.genresToFilter
            };
        case FilmActions.FILTER_FILMS:
            return <FilmState>{
                films: [...state.films],
                filteredFilms: [...state.filteredFilms],
                wordToFilter: action.payload,
                genresToFilter: state.genresToFilter
            };
        case FilmActions.FILTER_FILMS_BY_GENRE:
            return <FilmState>{
                films: [...state.films],
                filteredFilms: [...state.filteredFilms],
                wordToFilter: state.wordToFilter,
                genresToFilter: action.payload
            };
        default:
            return state;
    }
}
import { Request, Response } from 'express';
import CreateMovieService from '../services/CreateMovieService';
import DetailsMovieService from '../services/DetailsMovieService';
import ListMovieService from '../services/ListMoviesService';

export default class MovieController {
  public async index(request: Request, response: Response): Promise<Response> {
    const list = new ListMovieService();

    const movies = await list.execute();

    return response.status(200).json(movies);
  }

  public async create(request: Request, response: Response): Promise<Response> {
    const { title, synopsis } = request.body;

    const create = new CreateMovieService();

    const movie = await create.execute({ title, synopsis });

    return response.status(200).json(movie);
  }

  public async details(


�出锅即可

## 附加内容

- 如果没有电饼铛，也可以用平底锅
- 芝麻如果没有也可不用，一样好吃

如果您遵循本指南的制作流程而发现有问题或可以改进的流程，请提出 Issue 或 Pull request 。
# 凉粉的做法

![liangfen](./lf1.jpg)

伤心凉粉吃了不会让人伤心的哦！

预估烹饪难度：★★★

## 必备原料和工具

- 豌豆淀粉
- 大蒜
- 小米辣
- 辣椒粉
- 酱油
- 醋
- 白糖
- 鸡精
- 盐
- 花生碎
- 香菜

## 计算

下述材料为一人份，每次制作前需要确定计划做几份。一份正好够一个人吃。

- 豌豆淀粉  100g
- 大蒜   3 瓣
- 小米辣  3 颗
- 辣椒粉  10g
- 酱油   10ml
- 醋   10ml
- 白糖  3ml
- 鸡精  3g
- 盐  3g
- 花生碎  5g
- 香菜  5g

## 操作

- 准备食材。

    ![1](./lf2.jpg)

- 把豌豆淀粉和水各 100 克混合搅拌。

    ![bz2](./lf3.jpg)

- 往锅中倒入 600g 水，大火煮开后转为小火。

    ![bz4](./lf4.jpg)

- 倒入淀粉水，边倒边不断的搅拌，搅拌到浓稠且色泽均匀。

    ![bz5](./lf5.jpg)

- 找一个容器，在容器中刷一层薄薄的食用油。

    ![bz6](./lf6.jpg)

- 将煮好的淀粉倒入容器中冷藏 2-4 小时。

    ![bz7](./lf7.jpg)

- 冷藏后取出，脱模，切条。

    ![bz7](./lf8.jpg)

- 大蒜和小米辣剁成沫，放上 10g 辣椒粉，5g 花生碎，热油搅拌均匀。

    ![bz7](./lf9.jpg)

- 再加入 10ml 酱油，10ml 醋，5g 白糖，3g 鸡精，3g 盐搅拌均匀。

    ![bz7](./lf10.jpg)

- 将调味料倒在凉粉上，然后撒上香菜即可。

    ![bz7](./lf11.jp


// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

#nullable disable

namespace System.Windows.Forms.Tests;

// NB: doesn't require thread affinity
public class VScrollPropertiesTests
{
    public static IEnumerable<object[]> Ctor_ScrollableControl_TestData()
    {
        yield return new object[] { new ScrollableControl() };
        yield return new object[] { null };
    }

    [Theory]
    [MemberData(nameof(Ctor_ScrollableControl_TestData))]
    public void VScrollProperties_Ctor_Control(ScrollableControl container)
    {
        SubVScrollProperties proper


p>

Let <var>session id</var> be the bytes in <var>resource name</var> following the
 "/session/" prefix.

If <var>session id</var> is not the string representation of a
 [[!RFC4122|UUID]], return null.

Return <var>session id</var>.

To <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="start-listening-for-a-websocket-connection">start listening for a WebSocket connection</dfn> given a
session <var>session</var>:

If there is an existing WebSocket listener in the set of
  active listeners which the remote end would like to reuse,
  let <var>listener</var> be that listener. Otherwise let <var>listener</var> be a new
  WebSocket listener with implementation-defined
  host, port, secure flag,
  and an empty list of WebSocket resources.

Let <var>resource name</var> be the result of constructing a WebSocket resource name given <var>session</var>.

Append <var>resource name</var> to the list of WebSocket resources for
  <var>listener</var>.

Append <var>listener</var> to the


 AccountManager internal constructor(
    private val appSettingsController: AppSettingsController,
    private val emailLanguageUtils: EmailLanguageUtils,
    private val uploadController: UploadController,
    private val transferController: TransferController,
    private val realmProvider: RealmProvider,
) {

    private val mutex = Mutex()

    // We store the currentUserId to avoid creating database instances when it's the same user
    private var currentUserId: Int? = null

    /**
     * Loads the default User account and initializes Realm Transfers for the default UserID defined in Constants.
     */
    @Throws(RealmException::class, CancellationException::class)
    suspend fun loadUser(userId: Int) {
        mutex.withLock {
            if (currentUserId != userId) {
                appSettingsController.initAppSettings(emailLanguageUtils.getEmailLanguageFromLocal())
                realmProvider.openTransfersDb(userId)
                currentUserId = userId
            }
        }
    }

    /**
     * Delete specified User data
     */
    @Throws(RealmException::class, CancellationException::class)
    suspend fun removeUser(userId: Int) {

        appSettingsController.removeData()
        uploadController.removeData()
        transferController.removeData()

        realmProvider.closeAllDatabases()
    }
}
rootProject.name = "kopycat"

if (gradle is ExtensionAware) {
    (gradle as ExtensionAware).extra["copyExternalDependencies"] = true
}

include(":kopycat")

include(":kopycat-modules:cores:mips")
include(":kopycat-modules:cores:x86")
include(":kopycat-modules:cores:v850es")
include(":kopycat-modules:cores:msp430")
include(":kopycat-modules:cores:ppc")
include(":kopycat-modules:cores:arm")

include(":kopycat-modules:mcu:cortexm0")
include(":kopycat-modules:mcu:stm32f0xx")
include(":kopycat-modules:mcu:elanSC520")
include(":kopycat-modules:mcu:atom2758")
include(":kopycat-modules:mcu:pic32mz")
include(":kopycat-modules:mcu:msp430x44x")
include(":kopycat-modules:mcu:p2020")
include(":kopycat-modules:mcu:virtarm")
include(":kopycat-modules:mcu:testbench")
include(":kopycat-modules:mcu:virtmips")

include(":kopycat-modules:misc:examples")

include(":kopycat-modules:misc:experimental")

include(":common:proposal")
include(":common:elfloader")
include(":common:elfloader2")

include (":kopycat-modules:tops:demolinux")
/*
 *
 * This file is part of Kopycat emulator software.
 *
 * Copyright (C) 2023 INFORION, LLC
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * Non-free licenses may also be purchased from INFORION, LLC,
 * for users who do not want their programs protected by the GPL.
 * Contact us for details kopycat@inforion.ru
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 *
 */
package ru.inforion.lab403.kopycat.experimental.common

import ru.inforion.lab403.kopycat.cores.base.GenericSerializer
import ru.inforion.lab403.kopycat.cores.base.common.Component
import ru.inforion.lab403.kopycat.interfaces


LD,
    required: true,
    help_text: i18n.t("fields.must_be_english"),
    hint: formMode.get("isNew") ? "" : `${i18n.t("fields.db_name")}: ${fieldName}`,
    disabled: limitedProductionSite
  }),
  helpText: FieldRecord({
    display_name: i18n.t("fields.help_text"),
    name: `${fieldName}.help_text.en`,
    type: TEXT_AREA,
    help_text: i18n.t("fields.must_be_english"),
    disabled: limitedProductionSite
  }),
  guidingQuestions: FieldRecord({
    display_name: i18n.t("fields.guidance"),
    name: `${fieldName}.guiding_questions.en`,
    type: TEXT_AREA,
    help_text: i18n.t("fields.must_be_english"),
    disabled: limitedProductionSite
  }),
  required: FieldRecord({
    display_name: i18n.t("fields.required"),
    name: `${fieldName}.required`,
    type: TICK_FIELD,
    required: true,
    disabled: limitedProductionSite
  }),
  disabled: FieldRecord({
    display_name: i18n.t("fields.enabled_label"),
    name: `${fieldName}.disabled`,
    type: TICK_FIELD,
    disabled: limitedProductionSite
  })
});

export const generalForm = ({ fields = [], fieldName, formMode, i18n, onManageTranslations, limitedProductionSite }) =>
  FormSectionRecord({
    unique_id: "field_form",
    actions: formMode.get("isEdit")
      ? [
          {
            text: i18n.t("forms.translations.manage"),
            outlined: true,
            rest: { onClick: onManageTranslations }
          }
        ]
      : [],
    fields: fields.length ? fields : Object.values(generalFields({ fieldName, formMode, i18n, limitedProductionSite }))
  });
// Copyright (c) 2014 - 2023 UNICEF. All rights reserved.

import PropTypes from "prop-types";
import AddIcon from "@mui/icons-material/Add";
import { Link } from "react-router-dom";

import { useI18n } from "../../../../../i18n";
import ConditionalTooltip from "../../../../../conditional-tooltip";
import ActionButton from "../../../../../action-button";
import { ACTION_BUTTON_TYPES } from "../../../../../action-button/constants";
import { ROUTES } from "../../../../../../config";

function Component({ canAddUsers, maximumUsers, limitUsersReached }) {
  const i18n = useI18n();
  const tooltipLabel = i18n.t("users.alerts.limit_user_reached", {
    maximum_users: maximumUsers
  });

  if (!canAddUsers) {
    return null;
  }

  return (
    <ConditionalTooltip condition={limitUsersReached} title={tooltipLabel}>
      <ActionButton
        icon={<AddIcon />}
        text="buttons.new"
        type={ACTION_BUTTON_TYPES.default}
        disabled={limitUsersReached}
        data-testid="action-button"
        rest={{
          to: ROUTES.admin_users_new,
          component: Link
        }}
      />
    </ConditionalTooltip>
  );
}

Component.displayName = "NewUserBtn";

Component.propTypes = {
  canAddUsers: PropTypes.bool,
  limitUsersReached: PropTypes.bool,
  maximumUsers: PropTypes.number
};

export default Component;
import { fromJS } from "immutable";
import { mountedComponent, screen } from "test-utils";

import { lookups } from "../../../../../../test-utils";
import { LOCALE_KEYS } from "../../../../../../config";

import Form from "./component";

describe("<Form /> - components/form/component", () => {
  const props = {
    formRef: { current: { submitForm: () => {} } },
    formMode: fromJS({ isShow: true }


ilderBase
{
    /// <summary>
    /// Initializes a new instance of the <see cref="ResiliencePipelineBuilder{TResult}"/> class.
    /// </summary>
    public ResiliencePipelineBuilder()
    {
    }

    internal ResiliencePipelineBuilder(ResiliencePipelineBuilderBase other)
        : base(other)
    {
    }

    /// <summary>
    /// Builds the resilience pipeline.
    /// </summary>
    /// <returns>An instance of <see cref="ResiliencePipeline{TResult}"/>.</returns>
    /// <exception cref="ValidationException">Thrown when this builder has invalid configuration.</exception>
    public ResiliencePipeline<TResult> Build() => new(BuildPipelineComponent(), DisposeBehavior.Allow, ContextPool);
}


# coding=utf-8
# Copyright (c) Meta Platforms, Inc. All Rights Reserved
# Copyright 2019 Google LLC.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

"""Implements Cifar data class."""

from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from . import base as base
import tensorflow_datasets as tfds
from bluestar.data.datasets.base_dataset import register_dataset

# This constant specifies the percentage of data that is used to create custom
# train/val splits. Specifically, TRAIN_SPLIT_PERCENT% of the official training
# split is used as a new training split and the rest is used for validation.
TRAIN_SPLIT_PERCENT = 90

@register_dataset("cifar100_tf")
class CifarData(base.ImageTfdsData):
  """Provides Cifar10 or Cifar100 data.

  Cifar comes only with a training and test set. Therefore, the validation set
  is split out of the original training set, and the remaining examples are used
  as the "train" split. The "trainval" split corresponds to the original
  training set.

  For additional details and usage, see the base class.
  """

  def __init__(self, num_classes=100, data_dir=None, train_split_percent=None):

    if num_classes == 10:
      dataset_builder = tfds.builder("cifar10:3.*.*", data_dir=data_dir)
    elif num_classes == 100:
      dataset_builder = tfds.builder("cifar100:3.*.*", data_dir=data_dir)
    else:
      raise ValueError(
          "Number of classes must be 10 or 100, got {}".format(num_classes))

    dataset_builder.download_and_prepare()

    train_split_percent = train_split_percent or TRAIN_SPLIT_PERCENT

    # Creates a dict with example counts for each split.
    trainval_count = dataset_builder.info.splits["train"].num_examples
    test_count = dataset_builder.info.splits["test"].num_examples
    num_samples_splits = {
        "train": (train_split_percent * trainval_count) // 100,
        "val": trainval_count - (train_split_percent * trainval_count) // 100,
        "trainval": trainval_count,
        "test": test_count,
        "train800": 800,
        "val200": 200,
        "train800val200": 1000,
    }

    # Defines dataset specific train/val/trainval/test splits.
    tfds_splits = {
        "train": "train[:{}]".format(num_samples_splits["train"]),
        "val": "train[{}:]".format(num_samples_splits["train"]),
        "trainval": "train",
        "test": "test",
        "train800": "train[:800]",
        "val200": "train[{}:{}]".format(
            num_samples_splits["train"], num_samples_splits["train"]+200),
        "train800val200": "train[:800]+train[{}:{}]".format(
            num_samples_splits["train"], num_samples_splits["train"]+200),
    }

    super(CifarData, self).__init__(
        dataset_builder=dataset_builder,
        tfds_splits=tfds_splits,
        num_samples_splits=num_samples_splits,
        num_preprocessing_threads=400,
        shuffle_buffer_size=10000,
        # Note: Export only image and label tensors with their original types.
        base_preprocess_fn=base.make_get_tensors_fn(["image", "label", "id"]),
        num_classes=dataset_builder.info.features["label"].num_classes)


har_sel_cursors
end

---@return love.Texture[]
local function loadPlayerNumberIcons(theme)
  local icons = {}
  for playerNumber = 1, MAX_SUPPORTED_PLAYERS do
    icons[playerNumber] = theme:load_theme_img("p" .. playerNumber)
  end

  theme.images.IMG_players = icons

  return theme.images.IMG_players
end

function Theme:loadSelectionGraphics()
  self.images.flags = {}
  for _, flag in ipairs(flags) do
    self.images.flags[flag] = self:load_theme_img("flags/" .. flag)
  end

  self.images.IMG_level_cursor = self:load_theme_img("level/level_cursor")
  self.images.IMG_levels = {}
  self.images.IMG_levels_unfocus = {}
  self.images.IMG_levels[1] = self:load_theme_img("level/level1")
  self.images.IMG_levels_unfocus[1] = nil -- meaningless by design
  for i = 2, levelPresets.modernPresetCount do --which should equal the number of levels in the game
    self.images.IMG_levels[i] = self:load_theme_img("level/level" .. i .. "")
    self.images.IMG_levels_unfocus[i] = self:load_theme_img("level/level" .. i .. "unfocus")
  end

  self.images.IMG_ready = self:load_theme_img("ready")
  self.images.IMG_loading = self:load_theme_img("loading")
  self.images.IMG_super = self:load_theme_img("super")
  self.images.IMG_numbers = {}
  for i = 1, 3 do
    self.images.IMG_numbers[i] = self:load_theme_img(i .. "")
  end

  local pixelFontCharacters = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ&?!%*."
  local pixelFontBlueAtlas = self:load_theme_img("pixel_font_blue")

  self.fontMaps.pixelFontBlue = GraphicsUtil.createPixelFontMap(pixelFontCharacters, pixelFontBlueAtlas)

  self.images.IMG_random_stage = self:load_theme_img("random_stage")
  self.images.IMG_random_character = self:load_theme_img("random_character")

  loadPlayerNumberIcons(self)
  loadGridCursors(self)
end

function Theme:loadIngameGraphics()
  local bgOverlay = self:load_theme_img("background/bg_overlay")
  local fgOverlay = self:load_theme_img("background/fg_overlay")
  if bgOverlay then
    self.images.bg_overlay = ImageContainer({
      image = bgOverlay,
      hAlign = "center",
      vAlign = "center",
      width = consts.CANVAS_WIDTH,
      height = consts.CANVAS_HEIGHT
    })
  end

  if fgOverlay then
    self.images.fg_overlay = ImageContainer({
      image = fgOverlay,
      hAlign = "center",
      vAlign = "center",
      width = consts.CANVAS_WIDTH,
      height = consts.CANVAS_HEIGHT
    })
  end

  self.images.pause = self:load_theme_img("pause")

  --play field frames, plus the wall at the bottom.
  self.images.frames = {}
  self.images.walls = {}
  for i = 1, MAX_SUPPORTED_PLAYERS do
    self.images.frames[i] = self:load_theme_img("frame/frame" .. i .. "P")
    self.images.walls[i] = self:load_theme_img("frame/wall" .. i .. "P")
  end

  self.images.separator = self:load_theme_img("separator")

  self:loadIngameLabels()
  self:loadMultibar()
  self:loadAnalyticsIcons()
  self:loadCards


 /// </summary>
        public string FileExtension { get; set; }

        /// <summary>
        /// CTOR
        /// </summary>
        public JsonDataProviderConfiguration()
        {
            DirectoryPath = AppDomain.CurrentDomain.BaseDirectory;
            FileExtension = "app";
            LocalizationSources = new List<LocalizationSource>();
        }
    }

    /// <summary>
    /// Localizaiton source
    /// </summary>
    public class LocalizationSource
    {
        /// <summary>
        /// Represents the source name
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// Represents the source path
        /// </summary>
        public string SourcePath { get; set; }
    }
}


ain\n", opts->username);
								usage();
							}
						}
					} else {
						err = true;
						optionNeedsArg(arg, "username");
					}
					break;

				case 'i':
					if (ix+1 < argc) {
						if (opts->credential_file) {
							fprintf(stderr, "ERROR: credential filename already specified\n");
							usage();
							err = true;
						}
						else {
							opts->credential_file = argv[ix + 1];
							++ix;
						}
					} else {
						err = true;
						optionNeedsArg(arg, "filename");
					}
					break;

				case 's':
					if (ix+1 < argc) {
						if (opts->service) {
							fprintf(stderr, "ERROR: OAuth service already specified\n");
							usage();
							err = true;
						}
						else {
							opts->service = argv[ix + 1];
							++ix;
			}
					} else {
						err = true;
						optionNeedsArg(arg, "service");
					}
					break;

				case 'H':
					if (ix+1 < argc) {
						if (opts->handle) {
							fprintf(stderr, "ERROR: OAuth handle already specified\n");
							usage();
							err = true;
						}
						else {
							opts->handle = argv[ix + 1];
							++ix;
			}
					} else {
						err = true;
						optionNeedsArg(arg, "handle");
					}
					break;

				case 'S':
					if (ix+1 < argc) {
						if (opts->scopes) {
							fprintf(stderr, "ERROR: OAuth scopes already specified\n");
							usage();
							err = true;
						}
						else {
							opts->scopes = argv[ix + 1];
							++ix;
			}
					} else {
						err = true;
						optionNeedsArg(arg, "scopes");
					}
					break;

				case 'A':
					if (ix+1 < argc) {
						if (opts->audience) {
							fprintf(stderr, "ERROR: OAuth audience already specified\n");
							usage();
							err = true;
						}
						else {
							opts->audience = argv[ix + 1];
							++ix;
			}
					} else {
						err = true;
						optionNeedsArg(arg, "audience");
					}
					break;

#if !defined(WIN32)
				case 'f':
					if (ix+1 >= argc) {
						err = true;
						optionNeedsArg(arg, "filename");
					}
					opts->pool_password_file = argv[ix+1];
					++ix;
					opts->mode = GENERIC_ADD;
					break;
#endif
				case 'd':
					if (is_dash_arg_colon_prefix(arg, "debug", &pcolon, 1)) {
						dprintf_set_tool_debug("TOOL", (pcolon && pcolon[1]) ? pcolon+1 : nullptr);
					}
					break;
				case 'P':
					opts->plain = true;
					break;
				case 'h':
					opts->help = true;
					break;
				default:
					err = true;
					badOption(arg);
			}
			break;	// break for case '-'
		default:
			err = true;
			badCommand(argv[ix]);
			break;
		}
	}

	// do inter-argument validation
	if ( ! err) {
		int cred_type = opts->mode & CRED_TYPE_MASK;
		int op_type = opts->mode & MODE_MASK;
		//int legacy = opts->mode & STORE_CRED_LEGACY;
		if ( ! cred_type) {
			opts->mode |= STORE_CRED_LEGACY_PWD;
		}

		if (op_type == GENERIC_ADD) {
			// Krb and OAuth require a credential file
			if (cred_type == STORE_CRED_USER


um_pos = sampling_results[i].pos_inds.size(0)
                num_neg = sampling_results[i].neg_inds.size(0)
                label_weights[cur_num_rois + num_pos:cur_num_rois + num_pos +
                              num_neg] = neg_label_weights[i]
                cur_num_rois += num_pos + num_neg

        cls_score = bbox_results['cls_score']
        bbox_pred = bbox_results['bbox_pred']

        # Apply ISR-P
        isr_cfg = self.train_cfg.get('isr', None)
        if isr_cfg is not None:
            bbox_targets = isr_p(
                cls_score,
                bbox_pred,
                bbox_targets,
                rois,
                sampling_results,
                self.bbox_head.loss_cls,
                self.bbox_head.bbox_coder,
                **isr_cfg,
                num_class=self.bbox_head.num_classes)
        loss_bbox = self.bbox_head.loss(cls_score, bbox_pred, rois,
                                        *bbox_targets)

        # Add CARL Loss
        carl_cfg = self.train_cfg.get('carl', None)
        if carl_cfg is not None:
            loss_carl = carl_loss(
                cls_score,
                bbox_targets[0],
                bbox_pred,
                bbox_targets[2],
                self.bbox_head.loss_bbox,
                **carl_cfg,
                num_class=self.bbox_head.num_classes)
            loss_bbox.update(loss_carl)

        bbox_results.update(loss_bbox=loss_bbox)
        return bbox_results


turn CDebugOverlay::ScreenPosition( point, screen );
	}

	int ScreenPosition(float flXPos, float flYPos, Vector& screen)
	{
		return CDebugOverlay::ScreenPosition( flXPos, flYPos, screen );
	}

	virtual OverlayText_t *GetFirst( void )
	{
		return CDebugOverlay::s_pOverlayText;
	}

	virtual OverlayText_t *GetNext( OverlayText_t *current )
	{
		return current->nextOverlayText;
	}

	virtual void ClearDeadOverlays( void )
	{
		CDebugOverlay::ClearDeadOverlays();
	}

	virtual void ClearAllOverlays()
	{
		CDebugOverlay::ClearAllOverlays();
	}

	void AddLineOverlayAlpha(const Vector& origin, const Vector& dest, int r, int g, int b, int a, bool noDepthTest, float duration)
	{
		CDebugOverlay::AddLineOverlay(origin, dest, r, g, b, a, noDepthTest, duration);
	}

	void AddBoxOverlay2( const Vector& origin, const Vector& mins, const Vector& maxs, QAngle const& orientation, const Color& faceColor, const Color& edgeColor, float duration )
	{
		CDebugOverlay::AddBoxOverlay2(origin, mins, maxs, orientation, faceColor, edgeColor, duration );
	}

	void PurgeTextOverlays()
	{
		CDebugOverlay::PurgeTextOverlays();
	}
};

static CIVDebugOverlay g_DebugOverlay;

EXPOSE_SINGLE_INTERFACE_GLOBALVAR( CIVDebugOverlay, IVDebugOverlay, VDEBUG_OVERLAY_INTERFACE_VERSION, g_DebugOverlay );
EXPOSE_SINGLE_INTERFACE_GLOBALVAR( CIVDebugOverlay, IVPhysicsDebugOverlay, VPHYSICS_DEBUG_OVERLAY_INTERFACE_VERSION, g_DebugOverlay );

//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose:
//
// $NoKeywords: $
//
//=============================================================================//
// hltvserver.cpp: implementation of the CHLTVServer class.
//
//////////////////////////////////////////////////////////////////////

#include <server_class.h>
#include <inetmessage.h>
#include <tier0/vprof.h>
#include <tier0/vcrmode.h>
#include <KeyValues.h>
#include <edict.h>
#include <eiface.h>
#include <PlayerState.h>
#include <ihltvdirector.h>
#include <time.h>

#include "hltvserver.h"
#include "sv_client.h"
#include "hltvclient.h"
#include "server.h"
#include "sv_main.h"
#include "framesnapshot.h"
#include "networkstringtable.h"
#include "cmodel_engine.h"
#include "dt_recv_eng.h"
#include "cdll_engine_int.h"
#include "GameEventManager.h"
#include "host.h"
#include "proto_version.h"
#include "proto_oob.h"
#include "dt_common_eng.h"
#include "baseautocompletefilelist.h"
#include "sv_steamauth.h"
#include "tier0/icommandline.h"
#include "sys_dll.h"

// memdbgon must be the last include file in a .cpp file!!!
#include "tier0/memdbgon.h"

#define S2A_EXTRA_DATA_HAS_GAME_PORT				0x80		// Next 2 bytes include the game port.
#define S2A_EXTRA_DATA_HAS_SPECTATOR_DATA			0x40		// Next 2 bytes include the spectator port, then the spectator server


");return n[0]&&(n[0]=this.ctx.rewriteUrl(n[0],u)),n.join(" ")}).join(", ")}unwrapSrcset(t,u=this.ctx.meta){return t.split(",").map(i=>{let n=i.trimStart().split(" ");return n[0]&&(n[0]=this.ctx.sourceUrl(n[0],u)),n.join(" ")}).join(", ")}static parse=Pu;static parseFragment=Et;static serialize=Xe},Vt=class e extends Bu.default{constructor(t,u=!1,i={}){super(),this.stream=u,this.node=t,this.options=i}setAttribute(t,u){for(let i of this.attrs)if(i.name===t)return i.value=u,!0;this.attrs.push({name:t,value:u})}getAttribute(t){return(this.attrs.find(i=>i.name===t)||{}).value}hasAttribute(t){return!!this.attrs.find(u=>u.name===t)}removeAttribute(t){let u=this.attrs.findIndex(i=>i.name===t);typeof u<"u"&&this.attrs.splice(u,1)}get tagName(){return this.node.tagName}set tagName(t){this.node.tagName=t}get childNodes(){return this.stream?null:this.node.childNodes}get innerHTML(){return this.stream?null:Xe({nodeName:"#document-fragment",childNodes:this.childNodes})}set innerHTML(t){this.stream||(this.node.childNodes=Et(t).childNodes)}get outerHTML(){return this.stream?null:Xe({nodeName:"#document-fragment",childNodes:[this]})}set outerHTML(t){this.stream||this.parentNode.childNodes.splice(this.parentNode.childNodes.findIndex(u=>u===this.node),1,...Et(t).childNodes)}get textContent(){if(this.stream)return null;let t="";return this.iterate(this.node,u=>{u.nodeName==="#text"&&(t+=u.value)}),t}set textContent(t){this.stream||(this.node.childNodes=[{nodeName:"#text",value:t,parentNode:this.node}])}get nodeName(){return this.node.nodeName}get parentNode(){return this.node.parentNode?new e(this.node.parentNode):null}get attrs(){return this.node.attrs}get namespaceURI(){return this.node.namespaceURI}},yu=class{constructor(t,u,i={}){this.attr=u,this.attrs=t.attrs,this.node=t,this.options=i}delete(){let t=this.attrs.findIndex(u=>u===this.attr);return this.attrs.splice(t,1),Object.defineProperty(this,"deleted",{get:()=>!0}),!0}get name(){return this.attr.name}set name(t){this.attr.name=t}get value(){return this.attr.value}set value(t){this.attr.value=t}get deleted(){return!1}},wu=class{constructor(t,u,i=!1,n={}){this.stream=i,this.node=t,this.element=u,this.options=n}get nodeName(){return this.node.nodeName}get parentNode(){return this.element}get value(){return this.stream?this.node.text:this.node.value}set value(t){this.stream?this.node.text=t:this.node.value=t}},yn=Ou;var wn=qe(tt(),1),Mu=class extends wn.default


, args, "CreatePageRule")
		},
	}

	CreatePagerule.Flags().StringVar(&ZoneId, "zone-id", "", "The zone id associated with the new page rule")
	CreatePagerule.MarkFlagRequired("zone-id")

	CreatePagerule.Flags().StringVar(&Targets, "targets", "", "List of page rule targets. Examples: '[{\"target\": \"url\",\"constraint\": {\"operator\": \"matches\",\"value\": \"*example.com/images/*\"}}]'")
	CreatePagerule.MarkFlagRequired("targets")

	CreatePagerule.Flags().StringVar(&Actions, "actions", "", "List of page rule actions. Examples: '[{\"id\": \"always_online\",\"value\": \"on\"}]'")
	CreatePagerule.MarkFlagRequired("actions")

	CreatePagerule.Flags().IntVar(&Priority, "priority", 0, "A number that indicates the preference for a page rule over another. default value: 1")

	CreatePagerule.Flags().StringVar(&Status, "status", "", "Status of the page rule. default value: disabled valid values: active, disabled required = false")
	CreatePagerule.MarkFlagRequired("status")

	var UpdatePagerule = &cobra.Command{
		Use:   "update-pagerule",
		Short: "Update a new page rule",
		Long:  `Update a new page rule associated with a zone and page rule`,
		Run: func(cmd *cobra.Command, args []string) {
			Main(cmd, args, "ChangePageRule")
		},
	}

	UpdatePagerule.Flags().StringVar(&ZoneId, "zone-id", "", "The zone id associated with the updated page rule")
	UpdatePagerule.MarkFlagRequired("zone-id")

	UpdatePagerule.Flags().StringVar(&PageruleId, "pagerule-id", "", "The pagerule id associated with the updated page rule")
	UpdatePagerule.MarkFlagRequired("pagerule-id")

	UpdatePagerule.Flags().StringVar(&Targets, "targets", "", "List of page rule targets. Examples: '[{\"target\": \"url\",\"constraint\": {\"operator\": \"matches\",\"value\": \"*example.com/images/*\"}}]'")
	UpdatePagerule.MarkFlagRequired("targets")

	UpdatePagerule.Flags().StringVar(&Actions, "actions", "", "List of page rule actions. Examples: '[{\"id\": \"always_online\",\"value\": \"on\"}]'")
	UpdatePagerule.MarkFlagRequired("actions")

	UpdatePagerule.Flags().IntVar(&Priority, "priority", 0, "A number that indicates the preference for a page rule over another. default value: 1")

	UpdatePagerule.Flags().StringVar(&Status, "status", "", "Status of the page rule. default value: disabled valid values: active, disabled required = false")
	UpdatePagerule.MarkFlagRequired("status")

	var CreateOrganizationAccessRule = &cobra.Command{
		Use:   "create-organization-access-rule",
		Short: "Create an organization access rule",
		Long:  `Make a new IP, IP range, or country access rule for all zones owned by the organization. Note: If you would like to create an access rule that applies to a specific zone only, use the zone firewall endpoints.`,
		Run: func(cmd *cobra.Command, args []string) {
			Main(cmd, args, "CreateOrganizationAccessRule")
		},
	}

	CreateOrganizationAccessRule.Flags().StringVar(&OrganizationId, "organization-id", "", "The organization id associated with the new access rule")
	CreateOrganizationAccessRule.MarkFlagRequired("organization-id")

	CreateOrganizationAccessRule.Flags().StringVar(&Mode, "mode", "", "The action to apply to a matched request valid values: block, challenge, whitelist, js_challenge")
	CreateOrganizationAccessRule.MarkFlagRequired("mode")

	CreateOrganizationAccessRule.Flags().StringVar(&Configuration, "configuration", "", "Rule configuration. Example {\"target\": \"ip\",\"value\": \"198.51.100.4\"}")
	CreateOrganizationAcc


    crypto::fake_tls_handshake::FakeTlsHandshake,
    metrics::{
        fetch_histogram_stats, fetch_histogram_vec_count, metric_vec, HistogramStats, MetricVec,
    },
    mock_time,
    registry::SubnetRecordBuilder,
    state::arb_stream,
    types::ids::{
        NODE_1, NODE_2, NODE_3, NODE_4, NODE_42, NODE_5, SUBNET_1, SUBNET_2, SUBNET_3, SUBNET_4,
        SUBNET_5,
    },
    with_test_replica_logger,
};
use ic_types::{
    batch::ValidationContext,
    xnet::{CertifiedStreamSlice, StreamIndex, StreamIndexedQueue, StreamSlice},
    CountBytes, Height, NodeId, RegistryVersion, SubnetId,
};
use maplit::btreemap;
use proptest::prelude::*;
use std::{
    collections::BTreeMap,
    convert::TryFrom,
    sync::{Arc, Mutex},
};
use tempfile::TempDir;
use tokio::{runtime::Handle, time::Duration};

mod common;
use common::*;

pub const OWN_NODE: NodeId = NODE_42;
pub const REGISTRY_VERSION: RegistryVersion = RegistryVersion::new(169);

/// Test fixture around a `XNetPayloadBuilderImpl` for use in payload building
/// tests.
struct XNetPayloadBuilderFixture {
    pub xnet_payload_builder: XNetPayloadBuilderImpl,
    pub state_manager: Arc<StateManagerImpl>,
    pub certified_height: Height,
    pub metrics: MetricsRegistry,
    pub _temp_dir: TempDir,
}

impl XNetPayloadBuilderFixture {
    fn new(fixture: StateManagerFixture) -> Self {
        let state_manager = Arc::new(fixture.state_manager);
        let tls_handshake = Arc::new(FakeTlsHandshake::new());

        // Throwaway runtime, we don't need registry polling or pool refill.
        let runtime_handle = tokio::runtime::Runtime::new().unwrap().handle().clone();
        let registry = get_registry_for_test(runtime_handle.clone());

        let xnet_payload_builder = XNetPayloadBuilderImpl::new(
            Arc::clone(&state_manager) as Arc<_>,
            Arc::clone(&state_manager) as Arc<_>,
            tls_handshake as Arc<_>,
            registry,
            runtime_handle,
            OWN_NODE,
            OWN_SUBNET,
            &fixture.metrics,
            fixture.log,
        );

        Self {
            xnet_payload_builder,
            state_manager,
            certified_height: fixture.certified_height,
            metrics: fixture.metrics,
            _temp_dir: fixture.temp_dir,
        }
    }

    /// Calls `get_xnet_payload()` on the wrapped `XNetPayloadBuilder` and
    /// decodes all slices in the payload.
    fn get_xnet_payload(&self, byte_limit: usize) -> BTreeMap<SubnetId, StreamSlice> {
        let time = mock_time();
        let validation_context = ValidationContext {
            registry_version: REGISTRY_VERSION,
            certified_height: self.certified_height,
            time,
        };

        self.xnet_payload_builder
            .get_xnet_payload(&validation_context, &[], (byte_limit as u64).into())
            .stream_slices
            .into_iter()
            .map(|(k, v)| {
                (
                    k,
                    self.state_manager
                        .decode_certified_stream_slice(k, REGISTRY_VERSION, &v)
                        .unwrap(),
                )
            })
            .collect()
    }

    /// Pools the provided slice coming from a given subnet and returns its byte
    /// size, as evaluated by `


ialize a CommitmentSignedMessage from a stream.
    /// </summary>
    /// <param name="stream">The stream to deserialize from.</param>
    /// <returns>The deserialized CommitmentSignedMessage.</returns>
    /// <exception cref="MessageSerializationException">Error deserializing CommitmentSignedMessage</exception>
    public async Task<CommitmentSignedMessage> DeserializeAsync(Stream stream)
    {
        try
        {
            // Deserialize payload
            var payloadSerializer = _payloadSerializerFactory.GetSerializer<CommitmentSignedPayload>()
                                 ?? throw new SerializationException("No serializer found for payload type");
            var payload = await payloadSerializer.DeserializeAsync(stream)
                       ?? throw new SerializationException("Error serializing payload");

            return new CommitmentSignedMessage(payload);
        }
        catch (SerializationException e)
        {
            throw new MessageSerializationException("Error deserializing CommitmentSignedMessage", e);
        }
    }

    async Task<IMessage> IMessageTypeSerializer.DeserializeAsync(Stream stream)
    {
        return await DeserializeAsync(stream);
    }
}


ts_error))
                    sts_comm_result, sts_error = packetHandler.WriteSpec(STS_ID_2, speed2, 0)
                    if sts_comm_result != COMM_SUCCESS:
                        print("%s" % packetHandler.getTxRxResult(sts_comm_result))
                    if sts_error != 0:
                        print("%s" % packetHandler.getRxPacketError(sts_error))

                    print(f"x: {coords[0]}, y: {coords[1]}")

    except KeyboardInterrupt:
        print("Program stopped")

    finally:
        ser.close()  # Close the serial connection when done
        sts_comm_result, sts_error = packetHandler.WriteSpec(STS_ID, 0, 0)
        if sts_comm_result != COMM_SUCCESS:
            print("%s" % packetHandler.getTxRxResult(sts_comm_result))
        if sts_error != 0:
            print("%s" % packetHandler.getRxPacketError(sts_error))
        portHandler.closePort() # Close port


从DanDanPlay API获取到剧集标题: $episodeTitle');
            }
          }
        }

        // 创建更新后的历史记录
        final updatedHistory = WatchHistoryItem(
          filePath: existingHistory.filePath,
          animeName: animeTitle ?? existingHistory.animeName,
          episodeTitle: episodeTitle ?? existingHistory.episodeTitle,
          episodeId: episodeId,
          animeId: animeId,
          watchProgress: existingHistory.watchProgress,
          lastPosition: existingHistory.lastPosition,
          duration: existingHistory.duration,
          lastWatchTime: DateTime.now(),
          thumbnailPath: existingHistory.thumbnailPath,
          isFromScan: existingHistory.isFromScan,
        );

        // 保存更新后的记录
        await WatchHistoryDatabase.instance.insertOrUpdateWatchHistory(updatedHistory);

        debugPrint('[导航服务] 成功更新当前集历史记录: ${updatedHistory.animeName} - ${updatedHistory.episodeTitle}');

        // 通知UI刷新历史记录
        // 注意：这里我们不能直接访问Provider，所以只能通过数据库更新
        // UI会在下次刷新时看到更新后的数据

      } catch (e) {
        debugPrint('[导航服务] 获取DanDanPlay信息失败: $e，使用现有信息更新');

        // 即使获取DanDanPlay信息失败，也要更新弹幕ID
        final updatedHistory = WatchHistoryItem(
          filePath: existingHistory.filePath,
          animeName: existingHistory.animeName,
          episodeTitle: existingHistory.episodeTitle,
          episodeId: episodeId,
          animeId: animeId,
          watchProgress: existingHistory.watchProgress,
          lastPosition: existingHistory.lastPosition,
          duration: existingHistory.duration,
          lastWatchTime: DateTime.now(),
          thumbnailPath: existingHistory.thumbnailPath,
          isFromScan: existingHistory.isFromScan,
        );

        await WatchHistoryDatabase.instance.insertOrUpdateWatchHistory(updatedHistory);
        debugPrint('[导航服务] 使用现有信息更新当前集历史记录');
      }

    } catch (e) {
      debugPrint('[导航服务] 更新当前集历史记录时出错: $e');
      // 错误不应阻止导航
    }
  }
} import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'base_settings_menu.dart';
import 'settings_hint_text.dart';
import 'blur_snackbar.dart';
import 'package:nipaplay/models/jellyfin_transcode_settings.dart';
import 'package:nipaplay/providers/jellyfin_transcode_provider.dart';
import 'package:nipaplay/providers/emby_transcode_provider.dart';
import 'package:nipaplay/utils/video_player_state.dart';
import 'package:nipaplay/services/jellyfin_service.dart';
import 'package:nipaplay/services/emby_service.dart';

class JellyfinQualityMenu extends StatefulWidget {
  final VoidCallback onClose;

  const JellyfinQualityMenu({
    super.key,
    required this.onClose,
  });

  @override
  State<JellyfinQualityMenu> createState() => _JellyfinQualityMenuState();
}

class _JellyfinQualityMenuState extends State<JellyfinQualityMenu> {
  JellyfinVideoQuality? _currentQuality;
  bool _isLoading = false;
  List<Map<String, dynamic>> _serverSubtitl


_.assign(DocUtils::ToAttrAccess("self", attr->name), attr->name);
  }
  stack_.assign(DocUtils::ToAttrAccess("self", "name"), "name")
      .cond_if("layouts is None")
      .assign(DocUtils::ToAttrAccess("self", "layouts"),
              "[\"\"] * " + std::to_string(plugin->inputs.size()))
      .cond_else()
      .assign(DocUtils::ToAttrAccess("self", "layouts"), "layouts")
      .cond_end()
      .line()
      .assign("attr_strs", "[]");
  for (const auto& attr : plugin->attrs) {
    stack_.func_call("append", "", "attr_strs")
        .inplace_start("to_string")
        .call_arg(attr->name)
        .inplace_end();
  }
  stack_.func_call("append", "", "attr_strs")
      .call_arg("name")
      .func_call("extend", "", "attr_strs")
      .call_arg(DocUtils::ToAttrAccess("self", "layouts"))
      .line()
      .func_call(plugin->name + "." + plugin->name, "self._inner_class", "torch.classes")
      .call_arg("attr_strs")
      .func_end();
  // forward method
  stack_.func_def("forward", "List[torch.Tensor]").func_arg("self", "torch.nn.Module");
  for (const auto& t : plugin->inputs) {
    stack_.func_arg(t->name, "torch.Tensor");
  }
  stack_.func_start()
      .func_call(plugin->name + "." + entry_name, "outputs", "torch.ops")
      .call_arg("self._inner_class");
  for (const auto& t : plugin->inputs) {
    stack_.call_arg(t->name);
  }
  for (const auto& a : plugin->attrs) {
    stack_.call_arg(DocUtils::ToAttrAccess("self", a->name));
  }
  stack_.call_arg(DocUtils::ToAttrAccess("self", "name"));
  if (plugin->outputs.size() == 1) {
    stack_.func_end(DocUtils::ToIndex("outputs", 0));
  } else {
    stack_.func_end("outputs");
  }
  // end of inner class
  stack_.class_end();
  stack_.func_call(plugin->name, "op");
  for (const auto& attr : plugin->attrs) {
    stack_.call_arg(attr->name);
  }
  stack_.call_arg("name").call_arg("layouts").func_end("op").comment(GetPyComment(plugin), true);
}

void TorchPluginCodeGen::CodeGenConvertDepends() {
  BasePluginCodeGen<TorchPluginCodeGenConfig>::CodeGenConvertDepends();
  stack_.line("from torch import fx")
      .line("from tvm.relax.frontend.torch.fx_translator import TorchFXImporter")
      .line();
}

const ffi::String TorchPluginCodeGen::CodeGenOpConvert(const Plugin& plugin) {
  stack_.func_def(ConverterName(plugin), "relax.Var")
      .func_arg("node", "fx.node.Node")
      .func_arg("ctx", "TorchFXImporter")
      .func_start()
      .func_call("retrieve_args", "args", "ctx")
      .call_arg("node");
  ffi::Array<ffi::String> args;
  for (size_t i = 0; i < plugin->inputs.size(); i++) {
    const auto& tensor = plugin->inputs[i];
    stack_.assign(tensor->name, DocUtils::ToIndex("args", i + 1));
    args.push_back(tensor->name);
  }
  for (size_t i = 0; i < plugin->attrs.size(); i++) {
    const auto& attr = plugin->attrs[i];
    stack_.func_call("plugin_utils.to_expr", attr->name)
        .call_arg(DocUtil


BTREE_SIZE_IN_BYTES) {
			BvhSubtreeInfo subtree = new BvhSubtreeInfo();
			SubtreeHeaders.add(subtree);

			subtree.setAabbFromQuantizeNode(quantizedContiguousNodes, leftChildNodexIndex);
			subtree.rootNodeIndex = leftChildNodexIndex;
			subtree.subtreeSize = leftSubTreeSize;
		}

		if (rightSubTreeSizeInBytes <= MAX_SUBTREE_SIZE_IN_BYTES) {
			BvhSubtreeInfo subtree = new BvhSubtreeInfo();
			SubtreeHeaders.add(subtree);

			subtree.setAabbFromQuantizeNode(quantizedContiguousNodes, rightChildNodexIndex);
			subtree.rootNodeIndex = rightChildNodexIndex;
			subtree.subtreeSize = rightSubTreeSize;
		}

		// PCK: update the copy of the size
		subtreeHeaderCount = SubtreeHeaders.size();
	}

	/**
	 * Sort and calc splitting index.
	 *
	 * @param startIndex
	 *            the start index
	 * @param endIndex
	 *            the end index
	 * @param splitAxis
	 *            the split axis
	 * @return the int
	 */
	protected int sortAndCalcSplittingIndex(final int startIndex, final int endIndex, final int splitAxis) {
		int i;
		int splitIndex = startIndex;
		int numIndices = endIndex - startIndex;
		float splitValue;

		Vector3f means = VECTORS.get();
		means.set(0f, 0f, 0f);
		Vector3f center = VECTORS.get();
		for (i = startIndex; i < endIndex; i++) {
			center.add(getAabbMax(i), getAabbMin(i));
			center.scale(0.5f);
			means.add(center);
		}
		means.scale(1f / numIndices);

		splitValue = VectorUtil.getCoord(means, splitAxis);

		// sort leafNodes so all values larger then splitValue comes first, and smaller values start from 'splitIndex'.
		for (i = startIndex; i < endIndex; i++) {
			// Vector3f center = new Vector3f();
			center.add(getAabbMax(i), getAabbMin(i));
			center.scale(0.5f);

			if (VectorUtil.getCoord(center, splitAxis) > splitValue) {
				// swap
				swapLeafNodes(i, splitIndex);
				splitIndex++;
			}
		}

		// if the splitIndex causes unbalanced trees, fix this by using the center in between startIndex and endIndex
		// otherwise the tree-building might fail due to stack-overflows in certain cases.
		// unbalanced1 is unsafe: it can cause stack overflows
		// bool unbalanced1 = ((splitIndex==startIndex) || (splitIndex == (endIndex-1)));

		// unbalanced2 should work too: always use center (perfect balanced trees)
		// bool unbalanced2 = true;

		// this should be safe too:
		int rangeBalancedIndices = numIndices / 3;
		boolean unbalanced =
				splitIndex <= startIndex + rangeBalancedIndices || splitIndex >= endIndex - 1 - rangeBalancedIndices;

		if (unbalanced) { splitIndex = startIndex + (numIndices >> 1); }

		boolean unbal = splitIndex == startIndex || splitIndex == endIndex;
		assert !unbal;

		VECTORS.release(means, center);

		return splitIndex;
	}

	/**
	 * Calc splitting axis.
	 *
	 * @param startIndex
	 *            the start index
	 * @param endIndex
	 *            the end index
	 * @return the int
	 */
	protected int calcSplittingAxis(final int startIndex, final int endIndex) {
		int i;

		Vector3f means = VECTORS.get();
		means.set(0f, 0f, 0f);
		Vector3f variance = VECTORS.get();
		variance.set(0f,


er, "DEBUG2:", 7))
  {
    *loglevel = CUPSD_LOG_DEBUG2;
    message   = sb->buffer + 7;
  }
  else if (!strncmp(sb->buffer, "PAGE:", 5))
  {
    *loglevel = CUPSD_LOG_PAGE;
    message   = sb->buffer + 5;
  }
  else if (!strncmp(sb->buffer, "STATE:", 6))
  {
    *loglevel = CUPSD_LOG_STATE;
    message   = sb->buffer + 6;
  }
  else if (!strncmp(sb->buffer, "JOBSTATE:", 9))
  {
    *loglevel = CUPSD_LOG_JOBSTATE;
    message   = sb->buffer + 9;
  }
  else if (!strncmp(sb->buffer, "ATTR:", 5))
  {
    *loglevel = CUPSD_LOG_ATTR;
    message   = sb->buffer + 5;
  }
  else if (!strncmp(sb->buffer, "PPD:", 4))
  {
    *loglevel = CUPSD_LOG_PPD;
    message   = sb->buffer + 4;
  }
  else
  {
    *loglevel = CUPSD_LOG_DEBUG;
    message   = sb->buffer;
  }

 /*
  * Skip leading whitespace in the message...
  */

  while (isspace(*message & 255))
    message ++;

 /*
  * Send it to the log file as needed...
  */

  if (sb->prefix[0])
  {
    if (*loglevel > CUPSD_LOG_NONE &&
	(*loglevel != CUPSD_LOG_INFO || LogLevel >= CUPSD_LOG_DEBUG))
    {
     /*
      * General status message; send it to the error_log file...
      */

      if (message[0] == '[')
	cupsdLogMessage(*loglevel, "%s", message);
      else
	cupsdLogMessage(*loglevel, "%s %s", sb->prefix, message);
    }
    else if (*loglevel < CUPSD_LOG_NONE && LogLevel >= CUPSD_LOG_DEBUG)
      cupsdLogMessage(CUPSD_LOG_DEBUG2, "%s %s", sb->prefix, sb->buffer);
  }

 /*
  * Copy the message to the line buffer...
  */

  cupsCopyString(line, message, (size_t)linelen);

 /*
  * Copy over the buffer data we've used up...
  */

  if (lineptr < sb->buffer + sb->bufused)
    _cups_strcpy(sb->buffer, lineptr);

  sb->bufused -= lineptr - sb->buffer;

  if (sb->bufused < 0)
    sb->bufused = 0;

  return (line);
}


��?

ඔව්, විකල්ප මාතෘකා නාමය (SAN) යාන්ත්‍රණය භාවිතයෙන් එකම සහතිකය තුළ වෙනස් නම් කිහිපයක් අඩංගු විය හැකිය.

## ලෙට්'ස් එන්ක්‍රිප්ට් විසින් බහුනාම සහතික නිකුත් කරනවා ද?

ඔව්. බහුනාම නිකුත් කිරීම [ව.නා.ප.-01 අභියෝගය](/docs/challenge-types/#dns-01-challenge) භාවිතයෙන් ACMEv2 හරහා සිදු කළ යුතුය. වැඩිදුර තාක්‍ෂණික තොරතුරු සඳහා [මෙම ලිපිය](https://community.letsencrypt.org/t/acme-v2-production-environment-wildcards/55578) බලන්න.

## මාගේ මෙහෙයුම් පද්ධතිය සඳහා ලෙට්'ස් එන්ක්‍රිප්ට් (ACME) අනුග්


ypeof exports === 'object') {
        // CommonJS
        module.exports = function (root, $) {
            if (!root) {
                root = window;
            }

            if (!$ || !$.fn.dataTable) {
                $ = require('datatables.net-bs')(root, $).$;
            }

            if (!$.fn.dataTable.Buttons) {
                require('datatables.net-buttons')(root, $);
            }

            return factory($, root, root.document);
        };
    } else {
        // Browser
        factory(jQuery, window, document);
    }
}(function ($, window, document, undefined) {
    'use strict';
    var DataTable = $.fn.dataTable;

    $.extend(true, DataTable.Buttons.defaults, {
        dom: {
            container: {
                className: 'dt-buttons btn-group'
            },
            button: {
                className: 'btn btn-default'
            },
            collection: {
                tag: 'ul',
                className: 'dropdown-menu',
                button: {
                    tag: 'li',
                    className: 'dt-button',
                    active: 'active',
                    disabled: 'disabled'
                },
                buttonLiner: {
                    tag: 'a',
                    className: ''
                }
            }
        }
    });

    DataTable.ext.buttons.collection.text = function (dt) {
        return dt.i18n('buttons.collection', 'Collection <span class="caret"/>');
    };

    return DataTable.Buttons;
}));
/*!
 * HTML5 export buttons for Buttons and DataTables.
 * 2016 SpryMedia Ltd - datatables.net/license
 *
 * FileSaver.js (1.3.3) - MIT license
 * Copyright © 2016 Eli Grey - http://eligrey.com
 */

(function (factory) {
    if (typeof define === 'function' && define.amd) {
        // AMD
        define(['jquery', 'datatables.net', 'datatables.net-buttons'], function ($) {
            return factory($, window, document);
        });
    } else if (typeof exports === 'object') {
        // CommonJS
        module.exports = function (root, $, jszip, pdfmake) {
            if (!root) {
                root = window;
            }

            if (!$ || !$.fn.dataTable) {
                $ = require('datatables.net')(root, $).$;
            }

            if (!$.fn.dataTable.Buttons) {
                require('datatables.net-buttons')(root, $);
            }

            return factory($, root, root.document, jszip, pdfmake);
        };
    } else {
        // Browser
        factory(jQuery, window, document);
    }
}(function ($, window, document, jszip, pdfmake, undefined) {
    'use strict';
    var DataTable = $.fn.dataTable;

// Allow the constructor to pass in JSZip and PDFMake from external requires.
// Otherwise, use globally defined variables, if they are available.
    function _jsZip() {
        return jszip || window.JSZip;
    }

    function _pdfMake() {
        return pdfmake || window.pdfMake;
    }

    DataTable.Buttons.pdfMake = function (_) {
        if (!_) {
            return _pdfMake();
        }
        pdfmake = m_ake;
    }

    DataTable.Buttons.jszip = function (_) {
        if (!_) {
            return _jsZip


ref="http://docs.gl/gl4/glBindBuffersBase">Reference Page
     */
    fun bindBuffersBase(target: BufferTarget, first: Int, buffers: GlBuffers?) =
            GL44C.nglBindBuffersBase(target.i, first, buffers?.rem ?: 0, buffers?.adr?.L ?: NULL)

    // --- [ glBindBuffersRange ] ---

    /**
     * Binds {@code count} existing buffer objects to bindings numbered {@code first} through {@code first+count-1} in the array of buffer binding points
     * corresponding to {@code target}. {@code offsets} and {@code sizes} specify arrays of {@code count} values indicating the range of each buffer to bind.
     * If {@code buffers} is {@code NULL}, all bindings from {@code first} through {@code first+count-1} are reset to their unbound (zero) state. In this
     * case, the offsets and sizes associated with the binding points are set to default values, ignoring {@code offsets} and {@code sizes}. It is equivalent
     * to:
     *
     *

     * for ( i = 0; i < count; i++ ) {
     *     if ( buffers == NULL ) {
     *         glBindBufferRange(target, first + i, 0, 0, 0);
     *     } else {
     *         glBindBufferRange(target, first + i, buffers[i], offsets[i], sizes[i]);
     *     }
     * }

     *
     *
except that the single general buffer binding corresponding to {@code target} is unmodified, and that buffers will not be created if they do not exist.

     *
     *
The values specified in {@code buffers}, {@code offsets}, and {@code sizes} will be checked separately for each binding point. When values for a
     * specific binding point are invalid, the state for that binding point will be unchanged and an error will be generated. However, state for other binding
     * points will still be changed if their corresponding values are valid.

     *
     * @param target  the buffer object target. One of:

{@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER}	{@link GL15#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}	{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}	{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}

{@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}	{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}	{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}	{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}

{@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}	{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}	{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}	{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}

{@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}	{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}

     * @param first   the first binding
     * @param buffers an array of names of existing buffers objects
     * @param offsets an array of offsets
     * @param sizes   an array of sizes
     *


04/08/addressing/role/anonymous<w:ResourceURI>http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_EthernetPort</w:ResourceURI><w:SelectorSet><w:Selector Name="CreationClassName">CIM_EthernetPort</w:Selector><w:Selector Name="DeviceID">Intel(r) AMT Ethernet Port ' + network + '</w:Selector></w:SelectorSet></w:Selector><w:Selector Name="Dependent">http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous<w:ResourceURI>http://intel.com/wbem/wscim/1/amt-schema/1/AMT_SystemDefensePolicy</w:ResourceURI><w:SelectorSet><w:Selector Name="InstanceID">' + oldpolicy['InstanceID'] + '</w:Selector></w:SelectorSet></w:Selector></w:SelectorSet>', ((i == -1) ? PullSystemDefense : function () { })); }

            if (i >= 0) {
                var policy = xxSystemDefense['AMT_SystemDefensePolicy'].responses[i];
                var eref = '<Address xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing</Address><ReferenceParameters xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing"><ResourceURI xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd">http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_EthernetPort</ResourceURI><SelectorSet xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><Selector Name="DeviceID">' + "Intel（r）AMTイーサネットポート" + ' ' + network + '</Selector></SelectorSet></ReferenceParameters>';
                var pref = '<Address xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing</Address><ReferenceParameters xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing"><ResourceURI xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd">http://intel.com/wbem/wscim/1/amt-schema/1/AMT_SystemDefensePolicy</ResourceURI><SelectorSet xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><Selector Name="InstanceID">' + policy['InstanceID'] + '</Selector></SelectorSet></ReferenceParameters>';
                amtstack.Create('AMT_NetworkPortSystemDefensePolicy', { 'Antecedent': eref, 'Dependent': pref }, changeDefaultPolicyOk2);
            }
        }

        function changeDefaultPolicyOk2(stack, name, responses, status) {
            if (status != 200) {
                messagebox("デフォルトのシステム防御ポリシー", "ポリシーを設定できません、エラー" + status);
            } else {
                PullSystemDefense();
            }
        }

        function AddDefenseFilter() {
            if (xxdialogMode) return;
            var x = '';
            x += '
<input id=filtername style=float:right;width:260px maxlength=16 onkeyup=AddDefenseFilterUpdate()>
' + "名前" + '

';
            x += '
<select id=filtertype style=float:right;width:266px onchange=AddDefenseFilterUpdate()><option value=0>' + "イーサネットIPパケットフィルター" + '<option value=1>' + "イーサネットARPパケットフィルター" + '<option value=2>' + "IPv4パケットフィルター" + '<option value=3>' +


_E = e(E_C^r_y + Z^{-r_δσ - r_δρ}, P~)
        let mut lhs = e_c;
        lhs.mul_assign(r_y);
        let mut z = proof_params.z;
        z.mul_assign(exp);
        lhs.add_assign(&z);

        // R_E *= e(K, P~)^-r_v
        let mut exp = r_v;
        exp.negate();
        let mut k = proof_params.k;
        k.mul_assign(exp);
        lhs.add_assign(&k);

        let mut cap_r_e = pair(lhs, g2);

        // R_E *= e(Z, Q~)^-r_σ - r_ρ
        let mut exp = r_sigma;
        exp.add_assign(&r_rho);
        exp.negate();
        cap_r_e.mul_assign(&pairing(proof_params.z, pubkey.0, exp));

        Self {
            e_c,
            e_d,
            e_dm1,
            t_sigma,
            t_rho,
            delta_sigma,
            delta_rho,
            blinding_factor: r_y,
            sigma,
            rho,
            tau,
            pi,
            r_u,
            r_v,
            r_w,
            r_sigma,
            r_rho,
            r_delta_sigma,
            r_delta_rho,
            cap_r_a,
            cap_r_b,
            cap_r_e,
            cap_r_delta_rho,
            cap_r_delta_sigma,
            cap_r_rho,
            cap_r_sigma,
            accumulator: accumulator.0,
            witness_d: witness.d,
            witness_value: witness.y,
            k_g1: proof_params.k,
            x_g1: proof_params.x,
            y_g1: proof_params.y,
            z_g1: proof_params.z,
        }
    }

    /// Return bytes that need to be hashed for generating challenge.
    ///
    /// V || Ec || Ed || Ed^{-1] || T_sigma || T_rho || R_A || R_B || R_E || R_sigma || R_rho || R_delta_sigma || R_delta_rho
    pub fn get_bytes_for_challenge(self) -> Vec<u8> {
        let mut out = g1_bytes(&self.accumulator).to_vec();
        out.extend_from_slice(&g1_bytes(&self.e_c));
        out.extend_from_slice(&g1_bytes(&self.e_d));
        out.extend_from_slice(&g1_bytes(&self.e_dm1));
        out.extend_from_slice(&g1_bytes(&self.t_sigma));
        out.extend_from_slice(&g1_bytes(&self.t_rho));
        out.extend_from_slice(&g1_bytes(&self.cap_r_a));
        out.extend_from_slice(&g1_bytes(&self.cap_r_b));
        out.extend_from_slice(&fq12_bytes(&self.cap_r_e));
        out.extend_from_slice(&g1_bytes(&self.cap_r_sigma));
        out.extend_from_slice(&g1_bytes(&self.cap_r_rho));
        out.extend_from_slice(&g1_bytes(&self.cap_r_delta_sigma));
        out.extend_from_slice(&g1_bytes(&self.cap_r_delta_rho));
        out
    }

    /// Given the challenge value, compute the s values for Fiat-Shamir and return the actual
    /// proof to be sent to the verifier
    pub fn gen_proof(&self, challenge_hash: Fr) -> NonMembershipProof {


                EditorGUILayout.HelpBox("Select a target to edit.", MessageType.Info);
            }
            EditorGUILayout.EndVertical();
        }

        private void _entryList_DrawHeader(Rect area)
        {
            EditorGUI.LabelField(area, "Entries");
        }

        private void _entryList_DrawElement(Rect area, int index, bool isActive, bool isFocused)
        {
            var element = _entryList.serializedProperty.GetArrayElementAtIndex(index);

            var propName = element.FindPropertyRelative(PROP_NAME);
            var propDesc = element.FindPropertyRelative(PROP_DESCRIPTIVENAME);

            EditorGUI.LabelField(area, propName.stringValue, propDesc.stringValue);
        }

        #endregion

    }

}


uality.original:
        return toFullSize() ?? this;
    }
  }

  /// Convert to WebP format if possible
  ImageUrl? _convertToWebP() {
    if (isWebp) return this;

    final uri = Uri.tryParse(value);
    if (uri == null) return null;

    final path = uri.path;
    final lastDot = path.lastIndexOf('.');
    if (lastDot == -1) return null;

    final webpPath = '${path.substring(0, lastDot)}.webp';
    final webpUri = uri.replace(path: webpPath);

    return ImageUrl(webpUri.toString());
  }

  /// Get cache key for the image
  String get cacheKey {
    return value.hashCode.toString();
  }

  /// Get filename from URL
  String get filename {
    final uri = Uri.tryParse(value);
    if (uri == null) return '';
    return uri.pathSegments.isNotEmpty ? uri.pathSegments.last : '';
  }
}

/// Image format enumeration
enum ImageFormat {
  jpeg,
  png,
  webp,
  gif,
  unknown,
}

/// Image quality levels
enum ImageQuality {
  thumbnail,
  low,
  medium,
  high,
  original,
}

/// Extension for ImageFormat
extension ImageFormatExtension on ImageFormat {
  String get extension {
    switch (this) {
      case ImageFormat.jpeg:
        return 'jpg';
      case ImageFormat.png:
        return 'png';
      case ImageFormat.webp:
        return 'webp';
      case ImageFormat.gif:
        return 'gif';
      case ImageFormat.unknown:
        return '';
    }
  }

  String get mimeType {
    switch (this) {
      case ImageFormat.jpeg:
        return 'image/jpeg';
      case ImageFormat.png:
        return 'image/png';
      case ImageFormat.webp:
        return 'image/webp';
      case ImageFormat.gif:
        return 'image/gif';
      case ImageFormat.unknown:
        return 'application/octet-stream';
    }
  }

  bool get supportsTransparency {
    return this == ImageFormat.png ||
        this == ImageFormat.webp ||
        this == ImageFormat.gif;
  }

  bool get supportsAnimation {
    return this == ImageFormat.gif || this == ImageFormat.webp;
  }
}

/// Extension for String to convert to ImageUrl
extension StringToImageUrl on String {
  ImageUrl get asImageUrl => ImageUrl.fromString(this);
  ImageUrl? get asImageUrlOrNull => ImageUrl.tryParse(this);
}
import '../base_usecase.dart';
import '../../entities/entities.dart';
import '../../value_objects/value_objects.dart';
import '../../repositories/repositories.dart';

/// Use case for adding content to reading history
class AddToHistoryUseCase extends UseCase<void, AddToHistoryParams> {
  AddToHistoryUseCase(this._userDataRepository);

  final UserDataRepository _userDataRepository;

  @override
  Future<void> call(AddToHistoryParams params) async {
    try {
      // Validate parameters
      if (!params.contentId.isValid) {
        throw ValidationException(
            'Invalid content ID: ${params.contentId.value}');
      }

      if (params.page < 1) {
        throw const ValidationException('Page number must be greater than 0');
      }

      if (params.totalPages < 1) {
        throw const ValidationException('Total pages must be greater than 0');
      }

      if (params.page > params.totalPages) {
        throw const ValidationException(
            'Current page cannot exceed total pages');
      }

      if (params.timeSpent != null && params.timeSpent!.isNegative) {
        throw const ValidationException('Time spent cannot be negative


gSimpleTokenType.bang,
    NgSimpleTokenType.forwardSlash,
    NgSimpleTokenType.unexpectedChar,
  ];
  testRecoverySolution(
    baseHtml,
    startState,
    resolveTokens,
    NgTokenType.propertySuffix,
    NgScannerState.scanAfterElementDecorator,
  );
  testRecoverySolution(
    baseHtml,
    startState,
    dropTokens,
    null,
    null,
  );

  // Resolvables
  test('Testing resolved strings of $startState', () {
    expect(untokenize(tokenize('
')), '
');
    checkException(ParserErrorCode.SUFFIX_PROPERTY, 5, 5);
    expect(untokenize(tokenize('
')), '
');
    checkException(ParserErrorCode.SUFFIX_PROPERTY, 5, 5);
    expect(
        untokenize(tokenize('
')), '
');
    checkException(ParserErrorCode.SUFFIX_PROPERTY, 5, 5);
    expect(untokenize(tokenize('
')), '
');
    checkException(ParserErrorCode.SUFFIX_PROPERTY, 5, 5);
    expect(untokenize(tokenize('
')), '
');
    checkException(ParserErrorCode.SUFFIX_PROPERTY, 5, 5);
    expect(untokenize(tokenize('
')), '
');
    checkException(ParserErrorCode.SUFFIX_PROPERTY, 5, 5);
    expect(untokenize(tokenize('
')), '
');
    checkException(ParserErrorCode.SUFFIX_PROPERTY, 5, 5);
    expect(untokenize(tokenize('
')), '
');
    checkException(ParserErrorCode.SUFFIX_PROPERTY, 5, 5);
    expect(untokenize(tokenize('<div [prop')),
        '
');
    checkException(ParserErrorCode.SUFFIX_PROPERTY, 5, 5);
    expect(untokenize(tokenize('<div [prop')), '
');
    checkException(ParserErrorCode.SUFFIX_PROPERTY, 5, 5);
    expect(untokenize(tokenize('<div [prop
')), '

');
    checkException(ParserErrorCode.SUFFIX_PROPERTY, 5, 5);
    expect(untokenize(tokenize('
')), '
');
    checkException(ParserErrorCode.SUFFIX_PROPERTY, 5, 5);
    expect(untokenize(tokenize('
')), '
');
    checkException(ParserErrorCode.SUFFIX_PROPERTY, 5, 5);
    expect(untokenize(tokenize('<div [prop')), '
');
    checkException(ParserErrorCode.SUFFIX_PROPERTY, 5, 5);
    expect(untokenize(tokenize('
')), '
');
    checkException(ParserErrorCode.SUFFIX_PROPERTY, 5, 5);
    expect(untokenize(tokenize('
')), '
');
    checkException(ParserErrorCode.SUFFIX_PROPERTY, 5, 5);
    expect(untokenize(tokenize("
")), "
");
    checkException(ParserErrorCode.SUFFIX_PROPERTY, 5, 5);
    expect(untokenize(tokenize('
')), '
');
    checkException(ParserErrorCode.SUFFIX_PROPERTY, 5, 5);

    // Drop types
    expect(untokenize(tokenize('
')), '
');
    checkException(ParserErrorCode.UNEXPECTED_TOKEN, 10, 1);
    expect(untokenize(tokenize('
')), '
');
    checkException(ParserErrorCo