        done()
      }, 500)
    }, 200)
  })

  it('picker onConfirm 确认回调', done => {
    vm = Picker({
      slots: [{
        type: 'data',
        flex: 1,
        values: ['北京', '上海', '广州'],
        textAlign: 'center'
      }],
      onConfirm: (instance, datas) => {
        document.body.testToken = datas.slot0
        instance.value = false
      },
    })
    Vue.nextTick(() => {
      const $btn = document.querySelector('.wd-picker-header-confirm')
      $btn.click()
      expect(document.body.testToken).to.equal('北京')
      setTimeout(() => {
        delete document.body.testToken
        done()
      }, 500)
    })
  })

  it('picker onChange 改变回调', done => {
    vm = Picker({
      slots: [{
        type: 'data',
        flex: 1,
        values: ['北京', '上海', '广州'],
        textAlign: 'center'
      }],
      onChange: (instance, changeInfo) => {
        document.body.testToken = changeInfo
      }
    })
    setTimeout(() => {
      vm.$refs.slot0[0].locateItem(1)
      Vue.nextTick(() => {
        expect(document.body.testToken.changedSlotIndex).to.equal(0)
        expect(document.body.testToken.oldSlotValue).to.equal('北京')
        expect(document.body.testToken.newSlotValue).to.equal('上海')
        expect(document.body.testToken.val).to.eql({
          slot0: '上海'
        })
        vm.value = false
        setTimeout(() => {
          delete document.body.testToken
          done()
        }, 500)
      })
    }, 200)
  })

  it('picker onCancel 取消回调', done => {
    vm = Picker({
      slots: [{
        type: 'data',
        flex: 1,
        values: ['北京', '上海', '广州'],
        textAlign: 'center'
      }],
      onCancel: (instance) => {
        document.body.testToken = 'cancel'
        instance.value = false
      },
    })
    Vue.nextTick(() => {
      const $btn = document.querySelector('.wd-picker-header-cancel')
      $btn.click()
      expect(document.body.testToken).to.equal('cancel')
      setTimeout(() => {
        delete document.body.testToken
        done()
      }, 500)
    })
  })

  it('picker onShow 窗体出现回调', done => {
    vm = Picker({
      slots: [{
        type: 'data',
        flex: 1,
        values: ['北京', '上海', '广州'],
        textAlign: 'center'
      }],
      onShow: (instance) => {
        document.body.testToken = 'show'
        instance.value = false
      },
    })
    setTimeout(() => {
      expect(document.body.testToken).to.equal('show')
      setTimeout(() => {
        delete document.body.testToken
        done()
      }, 500)
    }, 400)
  })

  it('picker onHide 窗体隐藏回调', done => {
    vm = Picker({
      slots: [{
        type: 'data',
        flex: 1,
        values: ['北京', '上海', '广州'],
        textAlign: 'center'
      }],
      onHide: (instance) => {
        document.body.testToken = 'hide'
        instance.value = false
      },
    })
    Vue.nextTick(() => {


using FluentAssertions;

// To interact with Amazon EBS
using Amazon.EBS;
using Amazon.EBS.Model;

using System.Security.Cryptography;

public class EbsSnashotTest
{
    [Fact]
    public async Task TestSnapshotCreation()
    {

        AmazonEBSConfig config = new AmazonEBSConfig()
        {
            ServiceURL = "http://localhost:5000",
        };

        AmazonEBSClient ebsClient = new AmazonEBSClient(config);

        // https://docs.aws.amazon.com/ebs/latest/APIReference/API_StartSnapshot.html
        var startSnapshotRequest = new StartSnapshotRequest { VolumeSize = 1 };
        var startSnapshotResponse = await ebsClient.StartSnapshotAsync(startSnapshotRequest);
        startSnapshotResponse.Status.Should().Be("pending");

        // https://docs.aws.amazon.com/ebs/latest/APIReference/API_PutSnapshotBlock.html
        var blockData = new byte[] { 0x01, 0x02, 0x03, 0x04 };
        Stream blockDataStream = new MemoryStream(blockData);
        SHA256Managed sha256hasher = new SHA256Managed();
        byte[] sha256Hash = sha256hasher.ComputeHash(blockDataStream);


",
  [7587] = "Instrucciones de Thun\'grim",
  [7606] = "Guanteletes polares",
  [7607] = "Varita de dientes de sable",
  [7608] = "Jarra de profeta de gran calidad",
  [7609] = "Bastón ámbar de anciano",
  [7610] = "Esfera aurora",
  [7611] = "Bastón Escapabruma",
  [7612] = "Monstruo: hacha, especial PNJ (Herod)",
  [7613] = "Patrón: armadura de cuero verde",
  [7626] = "Fardo de pieles",
  [7627] = "Entrega de Dolanaar",
  [7628] = "Carta anodina",
  [7629] = "Carga de Ukor",
  [7646] = "Cajón de suministros del mesón",
  [7666] = "Collar destrozado",
  [7667] = "Ampolla de visión de Talvash",
  [7668] = "Diario manchado de sangre",
  [7669] = "Rubí del collar destrozado",
  [7670] = "Zafiro del collar destrozado",
  [7671] = "Topacio del collar destrozado",
  [7672] = "Fuente de poder del collar destrozado",
  [7673] = "Collar de mejoría de Talvash",
  [7674] = "Envío a Mathias",
  [7675] = "Calendario de envíos Defias",
  [7676] = "Té de cardo",
  [7677] = "Gran espada de metal negro",
  [7678] = "Receta: té de cardo",
  [7679] = "Colmillo de murciélago verdugo",
  [7680] = "Escama de basilisco espina de jade",
  [7681] = "Obsidian Golem Shard",
  [7682] = "Atizador de tortura",
  [7683] = "Nudillos de latón sangrientos",
  [7684] = "Manto de mago de sangre",
  [7685] = "Orbe del profeta olvidado",
  [7686] = "Ojo de Dorsacerado",
  [7687] = "Puño de Dorsacerado",
  [7688] = "Caja torácica de Dorsacerado",
  [7689] = "Amanecer mórbido",
  [7690] = "Torno de ébano",
  [7691] = "Sudario embalsamado",
  [7706] = "Monstruo: maza 2M, especial NPC (Mograine)",
  [7707] = "Prueba de Oposti",
  [7708] = "Varita necrótica",
  [7709] = "Leotardos infestados",
  [7710] = "Varita de entrenamiento de Loksey",
  [7711] = "Toga de Doan",
  [7712] = "Manto de Doan",
  [7713] = "Vara ilusionaria",
  [7714] = "Hoja hipnótica",
  [7715] = "Informe de Onin",
  [7716] = "Shattered Necklace",
  [7717] = "Devastador",
  [7718] = "Hombro de Herod",
  [7719] = "Yelmo de rabioso enfurecido",
  [7720] = "Sombrero de Melenablanca",
  [7721] = "Mano de Rectitud",
  [7722] = "Amuleto Triune",
  [7723] = "Poderío de Mograine",
  [7724] = "Guanteletes de Divinidad",
  [7725] = "Tabardo de la Cruzada Escarlata DEPRE


/* File: startup_armv6-m.S
 * Purpose: startup file for armv6-m architecture devices.
 *          Should be used with ARMCLANG
 * Version: V2.00
 * Date: 16 November 2015
 *
 */
/* Copyright (c) 2011 - 2015 ARM LIMITED

   All rights reserved.
   Redistribution and use in source and binary forms, with or without
   modification, are permitted provided that the following conditions are met:
   - Redistributions of source code must retain the above copyright
     notice, this list of conditions and the following disclaimer.
   - Redistributions in binary form must reproduce the above copyright
     notice, this list of conditions and the following disclaimer in the
     documentation and/or other materials provided with the distribution.
   - Neither the name of ARM nor the names of its contributors may be used
     to endorse or promote products derived from this software without
     specific prior written permission.
   *
   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
   AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
   ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE
   LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
   CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
   SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
   INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
   ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
   POSSIBILITY OF SUCH DAMAGE.
   ---------------------------------------------------------------------------*/
/*
  ;//-------- <<< Use Configuration Wizard in Context Menu >>> ------------------
*/

    .syntax unified
    .arch   armv6-m

/* .eabi_attribute Tag_ABI_align8_preserved,1    www.support.code-red-tech.com/CodeRedWiki/Preserve8 */
.eabi_attribute 25, 1   /* Tag_ABI_align_preserved */

/*
  ;<h> Stack Configuration
  ;  <o> Stack Size (in Bytes) <0x0-0xFFFFFFFF:8>
  ;</h>
*/
    .equ    Stack_Size, 0x00000400

    .section STACK, "w"
    .align  3
    .globl  __StackTop
    .globl  __StackLimit
__StackLimit:
    .space  Stack_Size
__StackTop:   /* formerly known as __initial_sp */

/*
  ;<h> Heap Configuration
  ;  <o>  Heap Size (in Bytes) <0x0-0xFFFFFFFF:8>
  ;</h>
*/
    .equ    Heap_Size, 0x00000C00

    .section HEAP, "w"
    .align  3
    .globl  __HeapBase
    .globl  __HeapLimit
__HeapBase:
    .if Heap_Size
    .space  Heap_Size
    .endif
__HeapLimit:

    .section RESET, "x"
    .align  2
    .globl  __Vectors
    .globl  __Vectors_End
    .globl  __Vectors_Size
__Vectors:
    .long   __StackTop            /* Top of Stack */
    .long   Re


Verify(Balance("test", 13), "");

            Verify(Balance("test", 100), "test");
            Verify(Balance("test", 100), "test");
            Verify(Balance("test", 100), "test");

            Verify(Balance("test", 10), "");
            Verify(Balance("test", 10), "");
            Verify(Balance("abcd▪efghijklmnop", 7), "abcd");
            Verify(Balance("abcd▪efg", 17), "abcd▪");
            Verify(Balance("abcd▪efg", 34, new DoubleCostFilter()), "abcd▪");

            Verify(Balance("<c>

", int.MaxValue), "<c>

");
            Verify(BalanceForUrl("test", 20), "tes");

            Verify(Balance("test", 2, new TextOnlyCostFilter()), "te");
            Verify(Balance("test test", 8, new TextOnlyCostFilter()), "test");
        }

        private static void Verify(string a, string b)
        {
            if (a != b)
                throw new Exception(a + " != " + b);
        }

        private class DoubleCostFilter : HTMLBalancerCostFilter
        {
            public override int ElementCost(Element el)
            {
                return el.ToString().Length * 2;
            }

            protected override int CharCost(char c)
            {
                return 2;
            }
        }
#endif
    }
}


ettings", "Invalid crossfade duration: $duration, keeping current value")
        }
    }

    fun setAudioNormalization(enable: Boolean) {
        prefs.edit().putBoolean(KEY_AUDIO_NORMALIZATION, enable).apply()
        _audioNormalization.value = enable
    }

    fun setReplayGain(enable: Boolean) {
        prefs.edit().putBoolean(KEY_REPLAY_GAIN, enable).apply()
        _replayGain.value = enable
    }

    // Lyrics Settings Methods
    fun setShowLyrics(show: Boolean) {
        prefs.edit().putBoolean(KEY_SHOW_LYRICS, show).apply()
        _showLyrics.value = show
    }

    fun setOnlineOnlyLyrics(onlineOnly: Boolean) {
        prefs.edit().putBoolean(KEY_ONLINE_ONLY_LYRICS, onlineOnly).apply()
        _onlineOnlyLyrics.value = onlineOnly
    }

    // Theme Settings Methods
    fun setUseSystemTheme(use: Boolean) {
        prefs.edit().putBoolean(KEY_USE_SYSTEM_THEME, use).apply()
        _useSystemTheme.value = use
    }

    fun setDarkMode(dark: Boolean) {
        prefs.edit().putBoolean(KEY_DARK_MODE, dark).apply()
        _darkMode.value = dark
    }

    fun setUseDynamicColors(use: Boolean) {
        prefs.edit().putBoolean(KEY_USE_DYNAMIC_COLORS, use).apply()
        _useDynamicColors.value = use
    }

    fun setCustomColorScheme(scheme: String) {
        prefs.edit().putString(KEY_CUSTOM_COLOR_SCHEME, scheme).apply()
        _customColorScheme.value = scheme
    }

    fun setCustomFont(font: String) {
        prefs.edit().putString(KEY_CUSTOM_FONT, font).apply()
        _customFont.value = font
    }

    fun setColorSource(source: String) {
        prefs.edit().putString(KEY_COLOR_SOURCE, source).apply()
        _colorSource.value = source
    }

    fun setExtractedAlbumColors(colorsJson: String?) {
        prefs.edit().putString(KEY_EXTRACTED_ALBUM_COLORS, colorsJson).apply()
        _extractedAlbumColors.value = colorsJson
    }

    fun setFontSource(source: String) {
        prefs.edit().putString(KEY_FONT_SOURCE, source).apply()
        _fontSource.value = source
    }

    fun setCustomFontPath(path: String?) {
        prefs.edit().putString(KEY_CUSTOM_FONT_PATH, path).apply()
        _customFontPath.value = path
    }

    fun setCustomFontFamily(family: String) {
        prefs.edit().putString(KEY_CUSTOM_FONT_FAMILY, family).apply()
        _customFontFamily.value = family
    }

    // Library Settings Methods
    fun setAlbumViewType(viewType: AlbumViewType) {
        prefs.edit().putString(KEY_ALBUM_VIEW_TYPE, viewType.name).apply()
        _albumViewType.value = viewType
    }

    fun setArtistViewType(viewType: ArtistViewType) {
        prefs.edit().putString(KEY_ARTIST_VIEW_TYPE, viewType.name).apply()
        _artistViewType.value = viewType
    }

    fun setAlbumSortOrder(sortOrder: String) {
        prefs.edit().putString(KEY_ALBUM_SORT_ORDER, sortOrder).apply()
        _albumSortOrder.value = sortOrder
    }

    fun setArtistCollaborationMode(enabled: Boolean) {
        prefs.edit().putBoolean(KEY_ARTIST_COLLABORATION_MODE, enabled).apply()
        _artistCollaborationMode.value = enabled
    }

    fun setLibraryTabOrder(tabOrder: List<String>) {
        val orderString = tabOrder.


eObject*)L_5, MaskableGraphic_tDA46A5925C6A2101217C9F52C855B5C1A36A7A0F_il2cpp_TypeInfo_var)))
		{
			goto IL_004e;
		}
	}
	{
		// (graphic as MaskableGraphic).isMaskingGraphic = true;
		Graphic_tBA2C3EF11D3DAEBB57F6879AB0BB4F8BD40D00D8 * L_6 = Mask_get_graphic_m5B49E746A9E93A4D1BAAFD83F9ACB7C90633B5B3(__this, /*hidden argument*/NULL);
		NullCheck(((MaskableGraphic_tDA46A5925C6A2101217C9F52C855B5C1A36A7A0F *)IsInstClass((RuntimeObject*)L_6, MaskableGraphic_tDA46A5925C6A2101217C9F52C855B5C1A36A7A0F_il2cpp_TypeInfo_var)));
		MaskableGraphic_set_isMaskingGraphic_m2E6B1415EB6E0A0EF864752310B44F1306F429DC(((MaskableGraphic_tDA46A5925C6A2101217C9F52C855B5C1A36A7A0F *)IsInstClass((RuntimeObject*)L_6, MaskableGraphic_tDA46A5925C6A2101217C9F52C855B5C1A36A7A0F_il2cpp_TypeInfo_var)), (bool)1, /*hidden argument*/NULL);
	}

IL_004e:
	{
		// MaskUtilities.NotifyStencilStateChanged(this);
		MaskUtilities_NotifyStencilStateChanged_m939869F3BB83A2846052F702B4FB09244AC502AD(__this, /*hidden argument*/NULL);
		// }
		return;
	}
}
// System.Void UnityEngine.UI.Mask::OnDisable()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void Mask_OnDisable_m9ACB6854596A0A91E3990F9CE1D7C693B513A9A0 (Mask_t082A7A79B4BF2063E5F81D2F84D968569D737CCB * __this, const RuntimeMethod* method)
{
	static bool s_Il2CppMethodInitialized;
	if (!s_Il2CppMethodInitialized)
	{
		il2cpp_codegen_initialize_method (Mask_OnDisable_m9ACB6854596A0A91E3990F9CE1D7C693B513A9A0_MetadataUsageId);
		s_Il2CppMethodInitialized = true;
	}
	{
		// base.OnDisable();
		UIBehaviour_OnDisable_mDA7B89CA939C50BD6F81CC350C2969755B1576A0(__this, /*hidden argument*/NULL);
		// if (graphic != null)
		Graphic_tBA2C3EF11D3DAEBB57F6879AB0BB4F8BD40D00D8 * L_0 = Mask_get_graphic_m5B49E746A9E93A4D1BAAFD83F9ACB7C90633B5B3(__this, /*hidden argument*/NULL);
		IL2CPP_RUNTIME_CLASS_INIT(Object_tAE11E5E46CD5C37C9F3E8950C00CD8B45666A2D0_il2cpp_TypeInfo_var);
		bool L_1 = Object_op_Inequality_m31EF58E217E8F4BDD3E409DEF79E1AEE95874FC1(L_0, (Object_tAE11E5E46CD5C37C9F3E8950C00CD8B45666A2D0 *)NULL, /*hidden argument*/NULL);
		if (!L_1


 80%')
      .classed('light-markup', true);
  topKey.append('tspan')
      .attr('x', width + 3)
      .attr('dy', -10)
      .text('transit time');
  var topKeyMedian = sideKey.append('text')
      .attr('x', width + 8)
      .attr('dy', 3)
      .text('median')
      .classed('light-markup', true);
  var bottomKey = sideKey.append('text');
  bottomKey.append('tspan')
      .attr('x', width + 3)
      .attr('dy', 10)
      .text('middle 80%')
      .classed('light-markup', true);
  bottomKey.append('tspan')
      .attr('x', width + 3)
      .attr('dy', 8)
      .text('wait time');
  var bottomKeyMedian = sideKey.append('text')
      .attr('x', width + 8)
      .attr('dy', 3)
      .text('median')
      .classed('light-markup', true);
  var bottomKeyPath = sideKey.append('path').attr('class', 'key-marker');
  var topKeyPath = sideKey.append('path').attr('class', 'key-marker');

  x.domain([5, 24]);

  layerBelowTheData.append("g")
      .attr("class", "x axis")
      .attr("transform", "translate(0," + height + ")")
      .call(xAxis);
  layerBelowTheData.append("g")
      .attr("class", "x axis bold-ticks")
      .attr("transform", "translate(0," + height + ")")
      .call(xAxis2);
  var yAxisG = layerBelowTheData.append("g")
      .attr("class", "y axis");
  var yAxisG2 = layerBelowTheData.append("g")
      .attr("class", "y axis bold-ticks");
  var zeroMinutesLine = layerAboveTheData.append("line")
      .attr("class", "y axis midpoint")
      .style('opacity', 0);
  yAxisG.append("text")
      .attr("class", "label")
      .attr("transform", "rotate(-90)")
      .attr("y", -35)
      .attr("dy", ".71em")
      .style("text-anchor", "end")
      .text("Trip duration (min)");
  yAxisG.append("text")
      .attr("class", "label")
      .attr("transform", "rotate(-90)")
      .attr("y", -35)
      .attr("x", -height)
      .attr("dy", ".71em")
      .style("text-anchor", "start")
      .text("Minutes between trains");

  /* 4. When a drag finishes, render the scatterplot of wait/transit times between chosen stops
   *************************************************************/
  var lastHour = null;
  var idx = 0;
  var lastFrom = null;
  var lastTo = null;
  function render(from, to) {
    // don't re-render the same thing
    if (lastFrom === from && lastTo === to) { return; }
    lastFrom = from;
    lastTo = to;
    highlightPath(from, to);
    d3.selectAll('.section-pick-two a.anchor').attr('href', ['#your-commute', from, to].join('.'));
    idx = idx + 1;
    var myIdx = idx;
    d3.select('.pick-two').classed('loading-data', true);
    VIZ.requiresData([
      'json!data/upick2-weekday-rollup-' + from + '.json'
    ]).progress(function (percent) {
      if (idx !== myIdx) { return; } // another request went out that supersedes this one
      d3.selectAll(".section-pick-two .loading").text('Loading... ' + percent + '%').classed('err', false);
    }).onerror(function () {
      if (idx !== myIdx) { return; } // another request went out that supersedes this one
      d3.selectAll(".section-pick-two .loading").text('Error loading


, 244f, 308f)
      lineTo(40f, 308f)
      arcTo(12f, 12f, 0f, isMoreThanHalf = false, isPositiveArc = true, 28f, 296f)
      lineTo(28f, 296f)
      arcTo(12f, 12f, 0f, isMoreThanHalf = false, isPositiveArc = true, 40f, 284f)
      moveTo(231f, 260f)
      curveTo(224.37f, 260f, 219f, 265.37f, 219f, 272f)
      curveTo(219f, 278.63f, 224.37f, 284f, 231f, 284f)
      horizontalLineTo(36f)
      curveTo(42.63f, 284f, 48f, 278.63f, 48f, 272f)
      curveTo(48f, 265.37f, 42.63f, 260f, 36f, 260f)
      horizontalLineTo(231f)
      moveTo(24f, 236f)
      lineTo(228f, 236f)
      arcTo(12f, 12f, 0f, isMoreThanHalf = false, isPositiveArc = true, 240f, 248f)
      lineTo(240f, 248f)
      arcTo(12f, 12f, 0f, isMoreThanHalf = false, isPositiveArc = true, 228f, 260f)
      lineTo(24f, 260f)
      arcTo(12f, 12f, 0f, isMoreThanHalf = false, isPositiveArc = true, 12f, 248f)
      lineTo(12f, 248f)
      arcTo(12f, 12f, 0f, isMoreThanHalf = false, isPositiveArc = true, 24f, 236f)
      close()
    }

    val lineOn = 16f
    val lineOff = 24f
    val roadLineOffsetX by infiniteTransition.animateFloat(
      initialValue = 0f,
      targetValue = lineOn + lineOff,
      animationSpec = infiniteRepeatable(
        animation = tween(600, easing = LinearEasing),
        repeatMode = RepeatMode.Restart,
      ),
    )

    Path(
      stroke = SolidColor(Color(0xFFF7E96D)),
      strokeLineWidth = 8f,
      strokeLineCap = StrokeCap.Round,
    ) {
      val startX = 66f
      val endX = startX + 140f
      moveTo(startX, 272f)

      var start = startX
      while (start < endX) {
        if (startX == start) {
          val trimmedStep = (lineOn - roadLineOffsetX)
          if (trimmedStep >= 0) {
            horizontalLineToRelative(trimmedStep)
            moveToRelative(lineOff, 0f)
          } else {
            moveToRelative((lineOn + lineOff) - roadLineOffsetX, 0f)
          }
          start += trimmedStep + lineOff
        } else if ((start + lineOn) > endX) {
          horizontalLineTo(endX)
          start += lineOn + lineOff
        } else {
          horizontalLineToRelative(lineOn)
          moveToRelative(lineOff, 0f)
          start += lineOn + lineOff
        }
      }
    }
  }
}

@VectorComposable
@Composable
private fun Camper(
  infiniteTransition: InfiniteTransition,
) {
  val travelMagnitude = 2f
  val travelDurationMs = 300
  val camperTranslationY by infiniteTransition.animateFloat(
    initialValue = -travelMagnitude,
    targetValue = travelMagnitude,
    animationSpec = infiniteRepeatable(
      animation = tween(travelDurationMs, easing = LinearEasing),
      rep


do             2f-1b(%rp),%rp
	depdi           0,31,32,%rp
	bv              (%rp)
	ssm             PSW_SM_W,%r0
2:
#endif

	/*  Initialize the SP - monarch sets up smp_init_current_idle_task */
	load32		PA(smp_init_current_idle_task),%sp
	LDREG		0(%sp),%sp	/* load task address */
	tophys_r1	%sp
	LDREG		TASK_THREAD_INFO(%sp),%sp
	mtctl           %sp,%cr30       /* store in cr30 */
	ldo             THREAD_SZ_ALGN(%sp),%sp

	/* point CPU to kernel page tables */
	load32		PA(swapper_pg_dir),%r4
	mtctl		%r4,%cr24	/* Initialize kernel root pointer */
	mtctl		%r4,%cr25	/* Initialize user root pointer */

#ifdef CONFIG_64BIT
	/* Setup PDCE_PROC entry */
	copy            %arg0,%r3
#else
	/* Load RFI *return* address in case smp_callin bails */
	load32		smp_callin_rtn,%r2
#endif

	/* Load RFI target address.  */
	load32		smp_callin,%r11

	/* ok...common code can handle the rest */
	b		common_stext
	nop

	.procend
#endif /* CONFIG_SMP */

ENDPROC(parisc_kernel_start)

#ifndef CONFIG_64BIT
	.section .data..ro_after_init

	.align	4
	.export	$global$,data

	.type	$global$,@object
	.size	$global$,4
$global$:
	.word 0
#endif /*!CONFIG_64BIT*/


sNothing);
//     expect(
//         find.byKey(Key("sendViewPasteAddressFieldButtonKey")), findsOneWidget);
//     expect(
//         (find.byType(GradientButton).evaluate().single.widget as GradientButton)
//             .enabled,
//         false);
//   });
//
//   testWidgets("enter an invalid address", (tester) async {
//     final wallet =  MockManager();
//     final notesService = MockNotesService();
//     final clipboard = FakeClipboard();
//
//     when(manager.validateAddress("hahahahahaha")).thenAnswer((_) => false);
//     when(manager.validateAddress("")).thenAnswer((_) => false);
//
//     when(manager.allOwnAddresses).thenAnswer((_) async => []);
//     when(manager.coinTicker).thenAnswer((_) => "FIRO");
//     when(manager.fiatCurrency).thenAnswer((_) => "USD");
//     when(manager.fiatPrice).thenAnswer((_) async => Decimal.ten);
//     when(manager.balanceMinusMaxFee)
//         .thenAnswer((_) async => Decimal.fromInt(9));
//     when(manager.maxFee)
//         .thenAnswer((_) async => LelantusFeeData(null, 100000000, null));
//
//     await tester.pumpWidget(
//       MaterialApp(
//         home: Material(
//           child: MultiProvider(
//             providers: [
//               ChangeNotifierProvider<Manager>(
//                 create: (_) => manager,
//               ),
//               ChangeNotifierProvider<NotesService>(
//                 create: (_) => notesService,
//               ),
//             ],
//             child: SendView(
//               clipboard: clipboard,
//             ),
//           ),
//         ),
//       ),
//     );
//     await tester.pumpAndSettle();
//
//     await tester.enterText(
//         find.byKey(Key("sendViewAddressFieldKey")), "hahahahahaha");
//     await tester.pumpAndSettle();
//
//     expect(find.text("hahahahahaha"), findsNothing);
//     expect(find.text("Invalid address"), findsNothing);
//     expect(find.byKey(Key("sendViewClearAddressFieldButtonKey")), findsNothing);
//     expect(
//         find.byKey(Key("sendViewPasteAddressFieldButtonKey")), findsOneWidget);
//     expect(
//         (find.byType(GradientButton).evaluate().single.widget as GradientButton)
//             .enabled,
//         false);
//   });
//
//   testWidgets("enter a firo amount", (tester) async {
//     final wallet =  MockManager();
//     final notesService = MockNotesService();
//     final clipboard = FakeClipboard();
//
//     when(manager.validateAddress("a8VV7vMzJdTQj1eLEJNskhLEBUxfNWhpAg"))
//         .thenAnswer((_) => true);
//     when(manager.validateAddress("")).thenAnswer((_) => false);
//
//     when(manager.allOwnAddresses).thenAnswer((_) async => []);
//     when(manager.coinTicker).thenAnswer((_) => "FIRO");
//     when(manager.fiatCurrency).thenAnswer((_) => "USD");
//     when(manager.fiatPrice).thenAnswer((_) async => Decimal.ten);
//     when(manager.balanceMinusMaxFee)
//         .thenAnswer((_) async => Decimal.fromInt(9));
//     when(manager.maxFee)
//         .thenAnswer((_) async => LelantusFeeData(null, 100000000, null));
//
//     await tester.pumpWidget(
//       MaterialApp(
//         home: Material(
//           child: MultiProvider(
//             providers: [
//               ChangeNotifierProvider<Manager>(
//                 create: (_


using System;
using Xunit;

namespace k8s.Tests;

public class KubernetesJsonTests
{
    [System.Diagnostics.CodeAnalysis.SuppressMessage("Build", "CA1812:'KubernetesJsonTests.RfcTime' is an internal class that is apparently never instantiated. If so, remove the code from the assembly. If this class is intended to contain only static members, make it 'static' (Module in Visual Basic). (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1812)", Justification = "json type")]
    private class RfcTime
    {
        public DateTime Rfc3339 { get; set; }
        public DateTime Rfc3339micro { get; set; }
        public DateTime Rfc3339nano { get; set; }
        public DateTime Rfc3339nanolenient1 { get; set; }
        public DateTime Rfc3339nanolenient2 { get; set; }
        public DateTime Rfc3339nanolenient3 { get; set; }
        public DateTime Rfc3339nanolenient4 { get; set; }
        public DateTime Rfc3339nanolenient5 { get; set; }
        public DateTime Rfc3339nanolenient6 { get; set; }
        public DateTime Rfc3339nanolenient7 { get; set; }
        public DateTime Rfc3339nanolenient8 { get; set; }
        public DateTime Rfc3339nanolenient9 { get; set; }
    }

    [Fact]
    public void RFC3339()
    {
        /* go code to generate the json https://go.dev/play/p/VL95pugm6o8

        const RFC3339Micro = "2006-01-02T15:04:05.000000Z07:00"
        const RFC3339Nano = "2006-01-02T15:04:05.000000000Z07:00"

        func main() {
            t := time.Now()
            type Time struct {
                RFC3339      string `json:"rfc3339"`
                RFC3339Micro string `json:"rfc3339micro"`
                RFC3339Nano  string `json:"rfc3339nano"`

                RFC3339NanoLenient1 string `json:"rfc3339nanolenient1"`
                RFC3339NanoLenient2 string `json:"rfc3339nanolenient2"`
                RFC3339NanoLenient3 string `json:"rfc3339nanolenient3"`
                RFC3339NanoLenient4 string `json:"rfc3339nanolenient4"`
                RFC3339NanoLenient5 string `json:"rfc3339nanolenient5"`
                RFC3339NanoLenient6 string `json:"rfc3339nanolenient6"`
                RFC3339NanoLenient7 string `json:"rfc3339nanolenient7"`
                RFC3339NanoLenient8 string `json:"rfc3339nanolenient8"`
                RFC3339NanoLenient9 string `json:"rfc3339nanolenient9"`
            }
            t1 := Time{
                RFC3339:      t.Add(45 * time.Minute).Add(12 * time.Second).Add(123456789 * time.Nanosecond).Format(time.RFC3339),
                RFC3339Micro: t.Add(45 * time.Minute).Add(12 * time.Second).Add(123456789 * time.Nanosecond).Format(RFC3339Micro),
                RFC3339Nano:  t.Add(24 * time.Minute).Add(56 * time.Second).Add(123456789 * time.Nanosecond).For


)+1)
				for i := range adinfo.EncryptionKeys {
					adinfo.EncryptionKeys[i] = randBytes(128)
				}
			}

			copy(adinfo.Hash[:], randBytes(16))
			adinfo.TimestampNs = rand.Int63()

			adinfo.DirAddrs = make([]string, rand.Intn(3)+1)
			for i := range adinfo.DirAddrs {
				adinfo.DirAddrs[i] = randString(128)
			}

			encoded, err := encodeAdInfo(&adinfo)
			if err != nil {
				t.Errorf("encode failed: %v", err)
				continue
			}
			encodedAdinfos[adinfo.Ad.Id] = encoded

			if len(adinfo.Ad.Attachments) > 0 {
				adinfo.Status = idiscovery.AdPartiallyReady
			} else {
				adinfo.DirAddrs = nil
				adinfo.Status = idiscovery.AdReady
			}
			adinfo.Ad.Attachments = nil
			expectedAdinfos[adinfo.Ad.Id] = adinfo
		}

		cs := packToCharacteristics(encodedAdinfos)
		unpacked, err := unpackFromCharacteristics(cs)
		if err != nil {
			t.Errorf("unpack failed: %v", err)
			continue
		}

		for _, encoded := range unpacked {
			adinfo, err := decodeAdInfo(encoded)
			if err != nil {
				t.Errorf("decode failed: %v", err)
				continue
			}

			if !reflect.DeepEqual(*adinfo, expectedAdinfos[adinfo.Ad.Id]) {
				t.Errorf("decoded to %#v, but want %#v", *adinfo, expectedAdinfos[adinfo.Ad.Id])
			}
		}
	}
}

func TestDecodeInvalid(t *testing.T) {
	tests := []map[string]string{
		{"1234": "00"}, // Invalid uuid.
		{"31ca10d5-0195-54fa-9344-25fcd7072f00": "00"}, // Invalid characteristic uuid.
		{"31ca10d5-0195-54fa-9344-25fcd7072e10": "00"}, // Invalid characteristic uuid sequence.
		{ //  Invalid characteristic split.
			"31ca10d5-0195-54fa-9344-25fcd7072e00": "08eff4d54d979febed94a1b551b0316733762e696f2f782f7265662f73657276696365732f73796e63626173652f7365727665722f696e74657266616365732f53796e63fd01d4ce4d4ec33010c57171205c3b76c633b3321b2e8158f8b30db471459cf4442c90e00270390a4854e204416ff7167ffd5eaf360e5c68ee46322906622296926fe5069c030c9474510a7456bdf15afa10256934600329e92697f222163154ae0c12c92894d8f5706df4d2ca98729b2c3d967ee7230e797e6815515b0029fcf138896daddb7d9ea7fc14ebd8f2d844ac074efe348ac58f3e0df3c16d0f7ed87ffdcebd7c6b4fd3cea9ce0a799e627deee1faa86f172a7542010a044176addce75fee1db3ba5f2bf3e3c22c1925b3c13eb189a570c9bab0eda85b2dfefd2f1e2044feb11bc3d123fc1f7bc8bde5dc81e292348309b85afb67000000ffff010501640264620


:
/* 803C3608 003BEB48  38 03 FF 4A */	addi r0, r3, -182
/* 803C360C 003BEB4C  7C 00 00 34 */	cntlzw r0, r0
/* 803C3610 003BEB50  54 03 D9 7E */	srwi r3, r0, 5
/* 803C3614 003BEB54  4E 80 00 20 */	blr

.global func_803C3618
func_803C3618:
/* 803C3618 003BEB58  38 03 FF 79 */	addi r0, r3, -135
/* 803C361C 003BEB5C  7C 00 00 34 */	cntlzw r0, r0
/* 803C3620 003BEB60  54 03 D9 7E */	srwi r3, r0, 5
/* 803C3624 003BEB64  4E 80 00 20 */	blr

.global func_803C3628
func_803C3628:
/* 803C3628 003BEB68  38 03 FF 77 */	addi r0, r3, -137
/* 803C362C 003BEB6C  7C 00 00 34 */	cntlzw r0, r0
/* 803C3630 003BEB70  54 03 D9 7E */	srwi r3, r0, 5
/* 803C3634 003BEB74  4E 80 00 20 */	blr

.global func_803C3638
func_803C3638:
/* 803C3638 003BEB78  38 03 FF 76 */	addi r0, r3, -138
/* 803C363C 003BEB7C  7C 00 00 34 */	cntlzw r0, r0
/* 803C3640 003BEB80  54 03 D9 7E */	srwi r3, r0, 5
/* 803C3644 003BEB84  4E 80 00 20 */	blr

.global func_803C3648
func_803C3648:
/* 803C3648 003BEB88  38 03 FF 75 */	addi r0, r3, -139
/* 803C364C 003BEB8C  7C 00 00 34 */	cntlzw r0, r0
/* 803C3650 003BEB90  54 03 D9 7E */	srwi r3, r0, 5
/* 803C3654 003BEB94  4E 80 00 20 */	blr

.global func_803C3658
func_803C3658:
/* 803C3658 003BEB98  38 03 FF 74 */	addi r0, r3, -140
/* 803C365C 003BEB9C  7C 00 00 34 */	cntlzw r0, r0
/* 803C3660 003BEBA0  54 03 D9 7E */	srwi r3, r0, 5
/* 803C3664 003BEBA4  4E 80 00 20 */	blr

.global func_803C3668
func_803C3668:
/* 803C3668 003BEBA8  38 03 FF 73 */	addi r0, r3, -141
/* 803C366C 003BEBAC  7C 00 00 34 */	cntlzw r0, r0
/* 803C3670 003BEBB0  54 03 D9 7E */	srwi r3, r0, 5
/* 803C3674 003BEBB4  4E 80 00 20 */	blr

.global func_803C3678
func_803C3678:
/* 803C3678 003BEBB8  38 03 FF 8D */	addi r0, r3, -115
/* 803C367C 003BEBBC  7C 00 00 34 */	cntlzw r0, r0
/* 803C3680 003BEBC0  54 03 D9 7E */	srwi r3, r0, 5
/* 803C3684 0


etminus \{d\},k}$ 转移而来。
    - 假设最优解中 $d$ 在团中，则从 $f_{L\cap N(d),k}+\textit{value}(d)$ 转移而来，其中 $N(d)$ 表示 $d$ 的邻居集合。
    - 别忘了还要用 $f_{L,k+1}$ 来更新 $f_{L,k}$。

这个解法会超时。尝试优化：

-   平分点集时均匀随机地划分。这样的话，最优解的点集 $C_{res}$ 以可观的概率也被恰好平分（即 $|C_{res}\cap V_L|=|C_{res}\cap V_R|$）。
    - 当然，$|C_{res}|$ 可能是奇数。简单起见，这里假设它是偶数；奇数的情况对解法没有本质改变。
    - 实验发现，随机尝试约 20 次就能以很大概率有至少一次满足该性质。也就是说，如果我们的算法依赖于“$C_{res}$ 被平分”这一性质，则将算法重复执行 20 次取最优，同样也能保证以很大概率得到正确答案。
-   有了这一性质，我们就可以直接钦定左侧团 $L$、右侧团 $C_R$ 的大小都 $\geq \dfrac n3$。这会对复杂度带来两处改进：
    - $f$ 可以省掉记录大小的维度。
    - 因为只需考虑大小 $\geq \dfrac n3$ 的团，所以需要考虑的左侧团 $L$ 和 右侧团 $C_R$ 的数量也大大减少至约 $1.8\cdot 10^6$。
-   现在的瓶颈变成了求单侧的某一子集的权值和，因为这需要 $O\big(2^{|V_L|}+2^{|V_R|}\big)$ 的预处理。
    - 解决方案：在 $V_L,V_R$ 内部再次折半；当查询一个子集的权值和时，将这个子集分成左右两半查询，再把答案相加。
- 这样即可通过本题。

* * *

**回顾**：一个随机的集合有着“在划分出的两半的数量差距不会太悬殊”这一性质，而我们通过随机划分获取了这个性质。

## 随机化用于哈希

### 例：[UOJ #207 共价大爷游长沙](https://uoj.ac/problem/207)

???+ note "简要题意"
    维护一棵动态变化的树，和一个动态变化的结点二元组集合。你需要支持：

    - 删边、加边。保证得到的还是一棵树。
    - 加入/删除某个结点二元组。
    - 给定一条边 $e$，判断是否对于集合中的每个结点二元组 $(s,t)$，$e$ 都在 $s,t$ 间的简单路径上。

对图中的每条边 $e$，我们定义集合 $S_e$ 表示经过该边的关键路径（即题中的 $(a,b)$）集合。考虑对每条边动态维护集合 $S_e$ 的哈


) ? end : start;

		// boolean flip = end.before(start);

		int days = (int) DateHelper.daysBetween(trueStart, trueEnd, mSettings.getLocale());

		for (int i = 0; i <= days; i++) {
			// we need new objects for each day
			Calendar cal = Calendar.getInstance(mSettings.getLocale());
			cal.setTime(trueStart.getTime());

			cal.add(Calendar.DATE, i);
			ret.add(clearTime(cal));
		}

		return ret;
	}

	private Calendar clearTime(Calendar cal) {
		cal.set(Calendar.HOUR_OF_DAY, 0);
		cal.set(Calendar.MINUTE, 0);
		cal.set(Calendar.SECOND, 0);
		cal.set(Calendar.MILLISECOND, 0);
		return cal;
	}

	private void drawArrow(GC gc, int x, int y, int style) {
		gc.setForeground(mColorManager.getArrowColor());
		switch (style) {
		case ARROW_RIGHT:
			gc.drawLine(x, y - 4, x, y + 4);
			gc.drawLine(x + 1, y - 3, x + 1, y + 3);
			gc.drawLine(x + 2, y - 2, x + 2, y + 2);
			gc.drawLine(x + 3, y - 1, x + 3, y + 1);
			gc.drawLine(x + 4, y, x + 4, y);
			mRightArrowBounds = new Rectangle(x - 4, y - 4, x + 8, y);
			break;
		case ARROW_LEFT:
			gc.drawLine(x - 1, y, x - 1, y);
			gc.drawLine(x, y - 1, x, y + 1);
			gc.drawLine(x + 1, y - 2, x + 1, y + 2);
			gc.drawLine(x + 2, y - 3, x + 2, y + 3);
			gc.drawLine(x + 3, y - 4, x + 3, y + 4);
			mLeftArrowBounds = new Rectangle(x - 4, y - 4, x + 8, y);
			break;
		}
	}

	private boolean isInside(int x, int y, Rectangle rect) {
		if (rect == null)
			return false;

		if (x >= rect.x && y >= rect.y && x <= (rect.x + rect.width) && y <= (rect.y + rect.height))
			return true;

		return false;
	}

	public void mouseMove(MouseEvent e) {
		if (mMonthSelectorOpen)
			return;

		// "dragging" the day, just paint it
		if (e.stateMask != 0)
			doDaySelection(e.x, e.y);

		if (mArrowRun && mArrowThread != null) {
			if (!isInside(e.x, e.y, mLeftArrowBounds) && !isInside(e.x, e.y, mRightArrowBounds)) {
				mArrowPause = true;
				// also pause the speed
				mArrowIterations = 0;
				mArrowSleepTime = ARROW_SLOW_TIME;
			} else {
				if (isInside(e.x, e.y, mLeftArrowBounds))
					mArrowThreadDirection = ARROW_LEFT;
				else
					mArrowThreadDirection = ARROW_RIGHT;

				mArrowPause = false;
			}
		}
	}

	public void mouseDoubleClick(MouseEvent event) {
	}

	// draw the date selection on mouse down to give that flicker of "response"
	// to the user
	public void mouseDown(MouseEvent event) {
		mMouseIsDown = true;
		if (mDateRange)
			mMouseUpDay = null;

		if (isInside(event.x, event.y, mLeftArrowBounds)) {
			prevMonth();

			runArrowThread(ARROW_LEFT);

			return;
		}

		if (isInside(event.x, event.y, mRightArrowBounds)) {
			nextMonth();

			runArrowThread(ARROW_RIGHT);

			return;
		}

		if (mSettings.showMonthPickerOnMonthNameMousePress() && isInside(e


boolean hasFilter();
    /**
     * optional .Filter filter = 4;
     */
    org.apache.hadoop.hbase.protobuf.generated.FilterProtos.Filter getFilter();
    /**
     * optional .Filter filter = 4;
     */
    org.apache.hadoop.hbase.protobuf.generated.FilterProtos.FilterOrBuilder getFilterOrBuilder();

    // optional .TimeRange time_range = 5;
    /**
     * optional .TimeRange time_range = 5;
     */
    boolean hasTimeRange();
    /**
     * optional .TimeRange time_range = 5;
     */
    org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.TimeRange getTimeRange();
    /**
     * optional .TimeRange time_range = 5;
     */
    org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.TimeRangeOrBuilder getTimeRangeOrBuilder();

    // optional uint32 max_versions = 6 [default = 1];
    /**
     * optional uint32 max_versions = 6 [default = 1];
     */
    boolean hasMaxVersions();
    /**
     * optional uint32 max_versions = 6 [default = 1];
     */
    int getMaxVersions();

    // optional bool cache_blocks = 7 [default = true];
    /**
     * optional bool cache_blocks = 7 [default = true];
     */
    boolean hasCacheBlocks();
    /**
     * optional bool cache_blocks = 7 [default = true];
     */
    boolean getCacheBlocks();

    // optional uint32 store_limit = 8;
    /**
     * optional uint32 store_limit = 8;
     */
    boolean hasStoreLimit();
    /**
     * optional uint32 store_limit = 8;
     */
    int getStoreLimit();

    // optional uint32 store_offset = 9;
    /**
     * optional uint32 store_offset = 9;
     */
    boolean hasStoreOffset();
    /**
     * optional uint32 store_offset = 9;
     */
    int getStoreOffset();

    // optional bool existence_only = 10 [default = false];
    /**
     * optional bool existence_only = 10 [default = false];
     *
     *

     * The result isn't asked for, just check for
     * the existence.
     *

     */
    boolean hasExistenceOnly();
    /**
     * optional bool existence_only = 10 [default = false];
     *
     *

     * The result isn't asked for, just check for
     * the existence.
     *

     */
    boolean getExistenceOnly();

    // optional bool closest_row_before = 11 [default = false];
    /**
     * optional bool closest_row_before = 11 [default = false];
     *
     *

     * If the row to get doesn't exist, return the
     * closest row before.
     *

     */
    boolean hasClosestRowBefore();
    /**
     * optional bool closest_row_before = 11 [default = false];
     *
     *

     * If the row to get doesn't exist, return the
     * closest row before.
     *

     */
    boolean getClosestRowBefore();
  }
  /**
   * Protobuf type {@code Get}
   *
   *

   **
   * The protocol buffer version of Get.
   * Unless existence_only is specified, return all the requested data
   * for the row that matches exactly, or the one that immediately
   * precedes it if closest_row_before is specified.
   *

   */
  public static final class Get extends
      com.google.protobuf.GeneratedMessage
      implements GetOrBuilder {
    // Use Get.newBuilder() to construct


        #
        #
    .   #
   / \\  #
  / ._) #
 /      ##
          #
      /   #
  ---/--- #
    /     #
   /      #
          ##
         #
         #
   )  (  #
  (    ) #
   \`--': #
         ##
          #
          #
  )   .-. #
 (   /    #
  \\_/     #
          ##
          #
          #
 \`)    (  #
 /  .   ) #
(_.' \`-'  #
          ##
          #
\`--.  .-. #
    \\/    #
    /\\    #
 .-'  \`-. #
          ##
           #
           #
  .    .-. #
   )  /    #
  (_.'     #
..-._)      ##
       #
       #
 .-.   #
    )_ #
 (   ) #
  \`-'  ##
{#
 #
 #
 #
 #
 ##
|#
 #
 #
 #
 #
 ##
}#
 #
 #
 #
 #
 ##
~#
 #
 #
 #
 #
 ##
         /\\   #
     _  / |   #
    (  /  |  .#
     \`/.__|_.'#
 .:' /    |   #
(__.'     \`-' ##
              #
   .--.    .- #
  /    )\`-'   #
 /    /       #
(    /        #
 \`-.'         ##
            #
  _     .-. #
 '     (    #
  /     )   #
 (     /    #
  \`._.'     ##
        #
        #
  .-.   #
 (  |   #
  \`-'-' #
        ##
        #
        #
  .-._. #
 (   )  #
  \`-'   #
        ##
         #
         #
   )  (  #
  (    ) #
   \`--': #
         ##
�#
 #
 #
 #
 #
 ##`export default `flf2a$ 11 9 40 32 14
Univers by Normand Veilleux <nveilleu@emr.ca>
figletized by Glenn Chappell <ggc@uiuc.edu> January 12, 1994
Date: 5 Mar 1994

Explanation of first line:
flf2 - "magic number" for file identification
a    - should always be \`a', for now
$    - the "hardblank" -- prints as a blank, but can't be smushed
11   - height of a character
9    - height of a character, not including descenders
40   - max line length (excluding comment lines) + a fudge factor
32   - default smushmode for this font
14   - number of comment lines

$  $@
$  $@
$  $@
$  $@
$  $@
$  $@
$  $@
$  $@
$  $@
$  $@
$  $@@
    @
88 $@
88 $@
88 $@
88 $@
88 $@
"" $@
aa $@
88 $@
    @
    @@
       @
88 88 $@
88 88 $@
"" "" $@
 $  $  @
 $  $  @
 $  $  @
 $  $  @
 $  $  @
 $  $  @
 $  $  @@
             @
  88   88 $  @
  88   88 $  @
aa88aaa88aa $@
""88"""88"" $@
aa88aaa88aa $@
""88"""88"" $@
  88   88 $  @
  88   88 $  @
             @
             @@
    8 8 $    @
 ad88888ba $ @
d8" 8 8 "8b $@
Y8, 8 8 $    @
\`Y8a8a8a, $  @
  \`"8"8"8b, $@
 $  8 8 \`8b $@
Y8a 8 8 a8P $@
 "Y88888P" $ @
    8 8 $    @


/*
 * Copyright 2017 Google
 *
 * 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.
 */

#import "FIRQuerySnapshot.h"

#include "Firestore/core/src/firebase/firestore/api/firestore.h"
#include "Firestore/core/src/firebase/firestore/api/query_snapshot.h"
#include "Firestore/core/src/firebase/firestore/api/snapshot_metadata.h"
#include "Firestore/core/src/firebase/firestore/core/view_snapshot.h"

@class FIRFirestore;
@class FIRSnapshotMetadata;
@class FSTQuery;

using firebase::firestore::api::Firestore;
using firebase::firestore::api::QuerySnapshot;
using firebase::firestore::api::SnapshotMetadata;
using firebase::firestore::core::ViewSnapshot;

NS_ASSUME_NONNULL_BEGIN

/** Internal FIRQuerySnapshot API we don't want exposed in our public header files. */
@interface FIRQuerySnapshot (/* Init */)

- (instancetype)initWithSnapshot:(QuerySnapshot &&)snapshot NS_DESIGNATED_INITIALIZER;

- (instancetype)initWithFirestore:(Firestore *)firestore
                    originalQuery:(FSTQuery *)query
                         snapshot:(ViewSnapshot &&)snapshot
                         metadata:(SnapshotMetadata)metadata;

@end

NS_ASSUME_NONNULL_END


WPF;
            Ho_Window = Halcon.HalconWindow;
            MyFindShapeModelVM = (e.Source as MetrologyTool).MyFindShapeModelControl.DataContext as FindShapeModelVM;
            MyMetrologyObjectVM = (e.Source as MetrologyTool).MyMetrologyObjectControl.DataContext as MetrologyObjectVM;
            DrawingCanvas = (e.Source as MetrologyTool).DrawingCanvas;
            DrawingBorder = (e.Source as MetrologyTool).DrawingBorder;
            MyImageChannelVM = (e.Source as MetrologyTool).MyImageChannelControl.DataContext as ImageChannelVM;
            MyPixelValueControl = (e.Source as MetrologyTool).MyPixelValueControl;

            if (Ho_Image == null)
            {
                HOperatorSet.GenEmptyObj(out Ho_Image);
            }

            // 鼠标事件
            DrawingBorder.MouseWheel += DrawingBorder_MouseWheel;
            DrawingBorder.MouseLeftButtonDown += DrawingBorder_MouseLeftButtonDown;
            DrawingBorder.MouseMove += DrawingBorder_MouseMove;
            DrawingBorder.MouseLeftButtonUp += DrawingBorder_MouseLeftButtonUp;
            DrawingBorder.MouseRightButtonDown += DrawingBorder_MouseRightButtonDown;
        }

        /// <summary>
        /// 开始抓图
        /// </summary>
        public RelayCommand CmdGrabImage => new Lazy<RelayCommand>(() => new RelayCommand(GrabImage)).Value;
        private void GrabImage()
        {
            try
            {
                int camId = CcdManager.Instance.CurrentCamId;
                if (camId < 0 || !CcdManager.Instance.HikCamInfos[camId].IsOpened)
                {
                    PrintLog("当前相机未连接", EnumLogType.Warning);
                    return;
                }

                // 抓图：开启、关闭
                if (CcdManager.Instance.HikCamInfos[camId].IsGrabbing)
                {
                    CanRefreshImage = false;
                    // 等待一段时间 考虑图像刷新为空的情况
                    for (int i = 0; i < 5; i++)
                    {
                        Thread.Sleep(300);
                        if (Ho_Image.IsInitialized())
                        {
                            break;
                        }
                    }

                    _ = CcdManager.Instance.Stop(camId);
                    StrGrabContent = "开始采集";
                    PrintLog("停止采集：" + CcdManager.Instance.HikCamInfos[camId].UserName, EnumLogType.Info);
                }
                else
                {
                    _ = CcdManager.Instance.Start(camId);
                    StrGrabContent = "停止采集";
                    PrintLog("开始采集：" + CcdManager.Instance.HikCamInfos[camId].UserName, EnumLogType.Info);

                    CanRefreshImage = true;
                    Task task = new Task(CaptureImageTask);
                    task.Start();
                }
            }
            catch (Exception ex)
            {
                PrintLog("抓图异常：" + ex.Message, EnumLogType.Error);
            }
        }

        /// <summary>
        /// 加载图像 保存图像
        /// </summary>
        public RelayCommand<string> CmdLoadSaveImage => new Lazy<RelayCommand<string>>(() => new RelayCommand<string>(LoadSaveImage)).Value;
        private void LoadSaveImage(string name)
        {
            try
            {
                // 载入图像
                if (name == "LoadImage")
                {
                    OpenFileDialog dialog = new OpenFileDialog
                    {
                        Title = "选择图片",
                        Filter = "图像文件(*.jpg;*.png;*.bmp)|*.jpg;*.png;*.bmp",
                        RestoreDirectory = true,
                        InitialDirectory = Environment.CurrentDirectory + "\\Image",
                    };
                    if (dialog.ShowDialog() != true)
                    {
                        return;
                    }
                    string filename = dialog.FileNam


itle = fmt.Sprintf(color.TableTitleFmt, v.app.kind, clusterName, len(v.instances))
	headers = []string{
		"Instance ID ▾",
		"Status",
		"Running Tasks",
		"Pending Tasks",
		"Agent Connected",
		"Agent Version",
		"Docker Version",
		"Registered At",
	}

	dataBuilder = func() (data [][]string) {
		for _, instance := range v.instances {
			row := []string{
				utils.ArnToName(instance.ContainerInstanceArn),
				utils.ShowGreenGrey(instance.Status, "active"),
				fmt.Sprintf("%d", instance.RunningTasksCount),
				fmt.Sprintf("%d", instance.PendingTasksCount),
				fmt.Sprintf("%v", instance.AgentConnected),
				utils.ShowString(instance.VersionInfo.AgentVersion),
				utils.ShowString(instance.VersionInfo.DockerVersion),
				utils.ShowTime(instance.RegisteredAt),
			}
			data = append(data, row)
		}
		return data
	}

	return
}
package view

import (
	"fmt"

	"github.com/keidarcy/e1s/internal/color"
	"github.com/keidarcy/e1s/internal/utils"
	"github.com/rivo/tview"
)

// View footer struct
type footer struct {
	footerFlex        *tview.Flex
	cluster           *tview.TextView
	service           *tview.TextView
	task              *tview.TextView
	container         *tview.TextView
	instance       *tview.TextView
	taskDefinition    *tview.TextView
	serviceDeployment *tview.TextView
	help              *tview.TextView
}

func newFooter() *footer {
	footerFlex := tview.NewFlex().SetDirection(tview.FlexColumn)
	footerFlex.SetBackgroundColor(color.Color(theme.BgColor))
	return &footer{
		footerFlex:        footerFlex,
		cluster:           tview.NewTextView().SetDynamicColors(true).SetText(fmt.Sprintf(color.FooterItemFmt, ClusterKind)),
		service:           tview.NewTextView().SetDynamicColors(true).SetText(fmt.Sprintf(color.FooterItemFmt, ServiceKind)),
		task:              tview.NewTextView().SetDynamicColors(true).SetText(fmt.Sprintf(color.FooterItemFmt, TaskKind)),
		container:         tview.NewTextView().SetDynamicColors(true).SetText(fmt.Sprintf(color.FooterItemFmt, ContainerKind)),
		instance:       tview.NewTextView().SetDynamicColors(true).SetText(fmt.Sprintf(color.FooterItemFmt, InstanceKind)).SetTextAlign(L),
		taskDefinition:    tview.NewTextView().SetDynamicColors(true).SetText(fmt.Sprintf(color.FooterItemFmt, TaskDefinitionKind)).SetTextAlign(L),
		serviceDeployment: tview.NewTextView().SetDynamicColors(true).SetText(fmt.Sprintf(color.FooterItemFmt, ServiceDeploymentKind)).SetTextAlign(L),
		help:              tview.NewTextView().SetDynamicColors(true).SetText(fmt.Sprintf(color.FooterItemFmt, HelpKind)).SetTextAlign(L),
	}
}
func (v *view) addFooterItems() {
	// left resources
	v.footer.footerFlex.AddItem(v.footer.cluster, 13, 0, false).
		AddItem(v.footer.service, 13, 0, false).
		AddItem(v.footer.task, 10, 0, false).
		AddItem(v.footer.container, 15, 0, false)

	// keep middle space
	if v.app.kind == TaskDefinitionKind {
		v.footer.footerFlex.
			AddItem(tview.NewTextView(), 5, 0, false).
			AddItem(v.footer.taskDefinition, 0, 1, false)
	} else if v.app.kind == InstanceKind {
		v.footer.footerFlex.
			AddItem(tview.NewTextView


ядеть так',
    'Use album art primary color': 'Подбирать акцент в цвет обложки',
    'Warning: might be buggy': 'Осторожно: может вызвать баги',
    'Mobile streaming': 'Воспроизведение в мобильной сети',
    'Wifi streaming': 'Потоковое воспроизведение по Wi-Fi',
    'External downloads': 'Скачанные треки',
    'Content language': 'Язык контента',
    'Not app language, used in headers. Now': 'Используется в тегах',
    'Select language': 'Выберите язык',
    'Content country': 'Страна контента',
    'Country used in headers. Now': 'Также используется в тегах',
    'Log tracks': 'Отправлять статистику',
    'Send track listen logs to Deezer, enable it for features like Flow to work properly':
        'Отправлять статистику прослушивания. Необходимо для правильной работы рекомендаций',
    'Offline mode': 'Автономный режим',
    'Will be overwritten on start.':
        'Будет перезаписано при запуске приложения.',
    'Error logging in, check your internet connections.':
        'Ошибка входа, проверьте соединение с интернетом.',
    'Logging in...': 'Вход...',
    'Download path': 'Папка загрузок',
    'Downloads naming': 'Шаблон для названия',
    'Downloaded tracks filename': 'Шаблон для названия загруженных треков',
    'Valid variables are': 'Доступные переменные',
    'Reset': 'Сброс',
    'Clear': 'Очистить',
    'Create folders for artist': 'Создавать папки для исполнителей',
    'Create folders for albums': 'Создавать папки для альбомов',
    'Separate albums by discs': 'Разделять альбомы по дискам',
    'Overwrite already downloaded files': 'Перезаписывать существующие',
    'Copy ARL': 'Скопировать токен (ARL)',
    'Copy userToken/ARL Cookie for use in other apps.':
        'Может быть полезно для использования в других приложениях. Не сообщайте токен никому!',
    'Copied': 'Скопировано',
    'Log out': 'Выйти',
    'Due to plugin incompatibility, login using browser is unavailable without restart.':
        'После авторизации/выхода через браузер требуется перезапуск.',
    '(ARL ONLY) Continue': '(Вход по токену) Продолжить',
    'Log out & Exit': 'Выйти и перезапустить',
    'Pick-a-Path': 'Выберите папку',
    'Select storage': 'Выберите хранилище',
    'Go up': 'На уровень вверх',
    'Permission denied': 'Доступ запрещен',
    'Language': 'Язык',
    'Language changed, please restart ReFreezer to apply!':
        'Язык изменен, перезапустите приложение ReFreezer для применения!',
    'Importing...': 'Импортирование...


get_pred()[ .. action_dim].iter().map(|&v| F32InfNan(v))).unwrap();
          argmax_k as u32
        };
        let action = <E::Action as DiscreteAction>::from_idx(act_idx);
        let res = self.eval_env.step(&action).unwrap();
        step_res.push(res.unwrap());
      }
      let mut v = <EvalV as Value>::from_scalar(0.0, self.cfg.eval_cfg);
      for &r in step_res.iter().rev() {
        v.lreduce(r);
      }
      //let step_value = v.to_scalar();
      //avg_value += step_value;
      self.avg_value += (v.to_scalar() - self.avg_value) / (idx + 1) as f32;
      self.min_value = self.min_value.min(v.to_scalar());
      self.max_value = self.max_value.max(v.to_scalar());
    }
    //avg_value /= num_trials as f32;
    println!("DEBUG: dq: valid: epoch: {} avg value: {:.4} min value: {:.4} max value: {:.4}",
        self.epoch_count, self.avg_value, self.min_value, self.max_value);
    let valid_rec = DiffQRecord{
      iter:         self.iter_count,
      step:         self.step_count,
      avg_episodes: num_trials,
      avg_value:    self.avg_value,
      min_value:    self.min_value,
      max_value:    self.max_value,
      elapsed:      0.0,
    };
    self.avg_value = 0.0;
    self.min_value = f32::INFINITY;
    self.max_value = -f32::INFINITY;

    (train_rec, valid_rec)*/
  }
}
<filename>src/object/mod.rs
use crate::link::{Link, Mime};
pub use article::Article;
pub use document::Document;
pub use document::DocumentType;
use serde::{Deserialize, Serialize};

use std::time::Duration;
pub use video::Video;

mod article;
// mod audio;
mod document;
// mod event;
// mod image;
// mod note;
// mod page;
// mod place;
// mod profile;
// mod relationship;
// mod tombstone;
mod video;

#[typetag::serde(tag = "type")]
pub trait TypedObjectType: ObjectType {}

pub trait ObjectType {
    fn attachment(&self) {}
    fn attributed_to(&self) {}
    fn audience(&self) {}
    fn content(&self) -> Option<&String> {
        None
    }
    fn context(&self) {}
    fn name(&self) -> Option<&String> {
        None
    }
    fn end_time(&self) {}
    fn generator(&self) {}
    fn icon(&self) {}
    fn image(&self) {}
    fn in_reply_to(&self) {}
    fn location(&self) {}
    fn preview(&self) {}
    fn published(&self) {}
    fn summary(&self) {}
    fn tag(&self) {}
    fn updated(&self) {}
    fn url(&self) -> Option<&Link> {
        None
    }
    fn to(&self) {}
    fn bto(&self) {}
    fn cc(&self) {}
    fn bcc(&self) {}
    fn media_type(&self) -> Option<Mime> {
        None
    }
    fn duration(&self) -> Option<Duration> {
        None
    }
}

#[derive(Deserialize, Serialize)]
pub enum LinkOrObject {
    Link(Link),
    Object(Box<dyn TypedObjectType>),
}

#[derive(Deserialize, Serialize)]
pub enum LinkOrList {
    Link(Link),
    List(Vec<Box<dyn TypedObjectType>>),
}

#[derive(Deserialize, Serialize)]
pub enum LinkObjectOrList {
    Link(Link),
    Object(Box


id-redis-enterprise-1                                     1/1       Running   0          4h
david-redis-enterprise-2                                     1/1       Running   0          4h
david-redis-enterprise-3                                     1/1       Running   0          4h
david-redis-enterprise-4                                     1/1       Running   0          4h
david-redis-enterprise-services-rigger-5f85564c66-2w7td      1/1       Running   0          4h

```

Show moreShow more icon

查看部署的 Service，如清单 9 所示：

##### 清单 9\. Redis 的 service

```
# oc get svc
NAME          TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)                      AGE
david-redis-enterprise         ClusterIP   None             <none>        9443/TCP,8001/TCP,8070/TCP   1d
david-redis-enterprise-ui      ClusterIP   172.30.135.160   <none>        8443/TCP                     1d

```

Show moreShow more icon

我们为 david-redis-enterprise-ui 创建路由后，可以通过图形化配置 Redis，如下图 30 所示。

##### 图 30\. Redis 图形化配置公户

![Redis 图形化配置公户](../ibm_articles_img/cl-lo-building-distributed-cache-based-container-paas-platform_images_image031.png)

我们可以创建单区域或多区域的 redis 数据库，如下图 31 所示：

##### 图 31\. 选择数据库的部署模式

![选择数据库的部署模式](../ibm_articles_img/cl-lo-building-distributed-cache-based-container-paas-platform_images_image032.png)

我们输入 redis 的相关参数，创建单实例 redis，如下图 32 所示：

##### 图 32\. 创建 redis

![创建 redis](../ibm_articles_img/cl-lo-building-distributed-cache-based-container-paas-platform_images_image033.png)

创建成功以后，可以获取到登录方式等信息，如下图 33 所示：

##### 图 33\. 创建 redis 的信息

![创建 redis 的信息](../ibm_articles_img/cl-lo-building-distributed-cache-based-container-paas-platform_images_image034.png)

使用命令行连接创建好的 redis 数据库：

```
# oc rsh weixinyu-redis-enterprise-0
$ redis-cli -c -h  10.1.4.30 -p 12297
10.1.4.30:12297> auth 111111
OK

```

Show moreShow more icon

设置 key 并查询，返回正常。

```
10.1.4.30:12297> set rh 111
OK
10.1.4.30:12297> get rh
"111"

```

Show moreShow more icon

接下来，我们使用 redis 图形化配置工具创建 redis 的双主双从，如下图 34 所示：

##### 图 34\. 配置双主双从数据库

![配置双主双从数据库](../ibm_articles_img/cl-lo-building-distributed-cache-based-container-paas-platform_images_image035.png)

创建成功后，查看数据库信息，如下图 35 所示：

##### 图 35\. 创建数据库的信息

![创


 in your application. To fix, cancel all subscriptions and asynchronous tasks in %s.%s",d===k?"the componentWillUnmount method":"a useEffect cleanup function",Cr(c))}}var N1;if(X0){var cy=null;N1=function(c,d,D){var C=Gg(cy,d);try{return lp(c,d,D)}catch(z){if(z!==null&&typeof z=="object"&&typeof z.then=="function")throw z;if(yt(),_d(),nv(d),Gg(d,C),en&&d.mode&ni&&H2(d),pl(null,lp,null,c,d,D),tr()){var O=Qs();throw O}else throw z}}}else N1=lp;var Av=!1,Ov=!1;function dy(c){if(c.tag===k)switch(Nr){case"getChildContext":if(Ov)return;Ve(!1,"setState(...): Cannot call setState() inside getChildContext()"),Ov=!0;break;case"render":if(Av)return;Ve(!1,"Cannot update during an existing state transition (such as within `render`). Render methods should be a pure function of props and state."),Av=!0;break}}var qf={current:!1};function zp(c){vs===!0&&vl.current===!0&&qf.current!==!0&&Ve(!1,`It looks like you're using the wrong act() around your test interactions.
Be sure to use the matching version of act() corresponding to your renderer:

// for react-dom:
import {act} from 'react-dom/test-utils';
// ...
act(() => ...);

// for react-test-renderer:
import TestRenderer from 'react-test-renderer';
const {act} = TestRenderer;
// ...
act(() => ...);%s`,Cr(c))}function Mv(c){vs===!0&&(c.mode&mr)!==Ar&&vl.current===!1&&qf.current===!1&&Ve(!1,`An update to %s ran an effect, but was not wrapped in act(...).

When testing, code that causes React state updates should be wrapped into act(...):

act(() => {
  /* fire events that update state */
});
/* assert on the output */

This ensures that you're testing the behavior the user would see in the browser. Learn more at https://fb.me/react-wrap-tests-with-act%s`,qt(c.type),Cr(c))}function py(c){vs===!0&&nr===yu&&vl.current===!1&&qf.current===!1&&Ve(!1,`An update to %s inside a test was not wrapped in act(...).

When testing, code that causes React state updates should be wrapped into act(...):

act(() => {
  /* fire events that update state */
});
/* assert on the output */

This ensures that you're testing the behavior the user would see in the browser. Learn more at https://fb.me/react-wrap-tests-with-act%s`,qt(c.type),Cr(c))}var hy=py,Hp=!1;function vy(c){Hp===!1&&t.unstable_flushAllWithoutAsserting===void 0&&(c.mode&K||c.mode&ti?(Hp=!0,Ve(!1,`In Concurrent or Sync modes, the "scheduler" module needs to be mocked to guarantee consistent behaviour across tests and browsers. For example, with jest:
jest.mock('scheduler', () => require('scheduler/


umerable<IConfigurationNode> _matches;
    /// <summary>
    /// The best matching node.
    /// </summary>
    private IConfigurationNode _bestMatch;

    #endregion

    #region Properties

    /// <summary>
    /// Gets all configuration nodes matching the searchterm.
    /// </summary>
    public IEnumerable<IConfigurationNode> Matches
    {
      get { return _matches; }
    }

    /// <summary>
    /// Gets the best matching instances of <seealso cref="IConfigurationNode"/>.
    /// </summary>
    public IConfigurationNode BestMatch
    {
      get { return _bestMatch; }
    }

    #endregion

    #region Constructors

    /// <summary>
    /// Initializes a new instance of SearchResult
    /// based on the given <paramref name="matches"/> and the specified <paramref name="bestMatch"/>.
    /// </summary>
    /// <param name="matches">All matching instances of <see cref="IConfigurationNode"/>.</param>
    /// <param name="bestMatch">The best matching instance of <see cref="IConfigurationNode"/>.</param>
    public SearchResult(IEnumerable<IConfigurationNode> matches, IConfigurationNode bestMatch)
    {
      _matches = matches;
      _bestMatch = bestMatch;
    }

    #endregion

  }

}


"""
This module contains the class for representing an explicit dimension characteristic.
Explicit members are a wrapper for a dimension- and a member report element.

====================

- author: Robin Schmidiger
- version: 0.2
- date: 2023-12-06

====================
"""

from brel.characteristics import Aspect, ICharacteristic
from brel.reportelements import Dimension, Member

class ExplicitDimensionCharacteristic(ICharacteristic):
    """
    Class for representing an explicit dimension characteristic.
    An explicit dimension characteristic assigns a dimension a member.

    The dimension is both a dimension report element as well as an aspect with the same QName as
    the dimension report element.

    The member is a member report element and the value of the explicit dimension characteristic.
    """

    def __init__(self, dimension: Dimension, member: Member, aspect: Aspect) -> None:
        self.__dimension = dimension
        self.__member = member
        self.__aspect = aspect

    # first class citizens
    def get_aspect(self) -> Aspect:
        """
        Info: Both typed and explicit dimension characteristics are not statically bound to an
        aspect.
        :returns Aspect: the aspect of the explicit dimension characteristic.
        """
        return self.__aspect

    def get_value(self) -> Member:
        """
        returns the value of the explicit dimension characteristic.
        Values of explicit dimension characteristics are member report elements.
        :returns Member: the member of the explicit dimension characteristic.
        """
        return self.__member

    def get_dimension(self) -> Dimension:
        """
        returns the name/dimension/axis of the explicit dimension characteristic.
        Names of explicit dimension characteristics are dimensions.
        This is not the same as calling `get_aspect()`.
        :returns Dimension: the dimension of the explicit dimension characteristic.
        """
        return self.__dimension

    # second class citizens
    def get_member(self) -> Member:
        """
        returns the member of the explicit dimension characteristic.
        This is equivalent to calling `get_value()`.
        :returns Member: the member of the explicit dimension characteristic.
        """
        return self.get_value()

    def __str__(self) -> str:
        return self.__member.__str__()

    def __eq__(self, __value: object) -> bool:
        if not isinstance(__value, ExplicitDimensionCharacteristic):
            return False
        return (
            self.get_member() == __value.get_member()
            and self.get_aspect() == __value.get_aspect()
        )


s) => res.json())
  .catch(this.handleError);
}
///Mostrar mis eventos
getMyEvent():Observable<any>{
  console.log("entro en servicio de mis eventos")
  return this.http.get(`${this.BASEURL}/api/evento/event/myshow`, this.options)
  .map((res)=>res.json())
  .catch(this.handleError);
}
get(id) {
  return this.http.get(`${this.BASEURL}/api/evento/event/join/${id}`)
    .map((res) => res.json());
}

///Unirme a un evento Funciona

joinEvent(eventid,evento):Observable<any>{
  console.log("entro servicio")
  return this.http.post(`${this.BASEURL}/api/evento/event/join/${eventid}`,evento, this.options)
  .map((res) => res.json())
  .catch(this.handleError);
}

editEvent(evento,eventid):Observable<any> {
  return this.http.put(`${this.BASEURL}/api/evento/event/edit/${eventid}`,evento,this.options)
    .map((res) => res.json())
    .catch(this.handleError);
}

remove(eventid) {
  console.log("entraaaa servicio remove")
  return this.http.post(`${this.BASEURL}/api/evento/event/delete/${eventid}`,this.options)
    .map((res) => res.json());

}
removePart(evento,eventid) {
  console.log("entra al servicio borrar part")
  return this.http.put(`${this.BASEURL}/api/evento/event/deletepart/${eventid}`,evento,this.options)
  .map((res) =>res.json())
  .catch(this.handleError);
}

}import * as fs from 'fs';
import * as del from 'del';

import CONFIG from '../utils/config';
import CognigyClient from '../utils/cognigyClient';
import { pullLocales } from '../lib/locales';

/**
 * Checks whether the agent directory exists
 */
export const checkAgentDir = () => {
    if (!fs.existsSync(CONFIG.agentDir)) {
        console.log(`Agent directory ${CONFIG.agentDir} can't be found.`);
        process.exit(0);
    }
};

/**
 * Checks whether a directory exists and if not creates it
 */
export const checkCreateDir = async (dir: string): Promise<void> => {
    const splits = dir.split("/");
    let folder = splits[0];
    for (let i = 1; i < splits.length; i++) {
        folder += "/" + splits[i];
        if (!fs.existsSync(folder)) {
            fs.mkdirSync(folder);
        }
    }
    return;
};

/**
 * Checks whether a directory exists and if not creates it
 */
export const removeCreateDir = async (dir: string): Promise<void> => {
    // remove target directory
    try {
        await del(dir, { force: true });
    } catch (err) {
        console.log(err.message);
    }

    // make sure flow directory exists
    checkCreateDir(dir);
    return;
};

/**
 * Checks whether a specific resource directory exists
 */
export const checkResourceDir = (resourceType: string, resourceName: string) => {
    const resourceDir = CONFIG.agentDir + '/' + resourceType + 's/' + resourceName;
    if (!fs.existsSync(resourceDir)) {
        console.log(`${resourceType} ${resourceName} can't be found in directory '${resourceDir}'.`);
        process.exit(0);
    }
};

/**
 * Checks whether the agent project exists
 */
export const checkProject = async () => {
    try {
        await CognigyClient.readProject({
            projectId: CONFIG.


/*
Copyright (C) 2011 Jay Satiro <raysatiro@yahoo.com>
All rights reserved.

This file is part of GetHooks.

GetHooks 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.

GetHooks 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 GetHooks.  If not, see <https://www.gnu.org/licenses/>.
*/

/**
This file contains functions for creating the global store 'G', which is the store of global stores.
Each function is documented in the comment block above its definition.

There are several global stores (these are referred to as descendants of 'G'):
'G->prog' is the global program store. It holds basic program and system info.
'G->config' is the global configuration store. It holds the user's configuration.
'G->desktops' is the global desktop store. It holds the list of attached to desktops.

Each of the global stores and their functions are defined in their own units, eg prog.h/prog.c

-
create_global_store()

Create the global store and its descendants or die.
-

-
print_global_store()

Print the global store and all its descendants.
-

-
free_global_store()

Free the global store and all its descendants.
-

*/

#include <stdio.h>

#include "util.h"

#include "global.h"

/* A pointer to this process' global store. The global store is the store of global stores. */
struct global *G;   // create_global_store(), free_global_store()

/* create_global_store()
Create the global store and its descendants or die.

Everything that must be available globally descends from the global store.
 */
void create_global_store( void )
{
	FAIL_IF( G );   // Fail if the global store already exists

	/* the global store (the store of global stores) */
	G = must_calloc( 1, sizeof( *G ) );

	/* program store (command line arguments, OS version, etc) */
	create_prog_store( &G->prog );

	/* configuration store (user-specified command line configuration) */
	create_config_store( &G->config );

	/* desktop store (linked list of desktops' heap and thread info) */
	create_desktop_store( &G->desktops );

	return;
}

/* print_global_store()
Print the global store and all its descendants.
*/
void print_global_store( void )
{
	if( !G )
		return;

	printf( "\n" );
	print_global_prog_store();
	printf( "\n" );
	print_global_config_store();
	printf( "\n" );
	print_global_desktop_store();
	printf( "\n" );

	return;
}

/* free_global_store()
Free the global store and all its descendants.

this function then sets the global store pointer (G) to NULL and returns
if( !G ) then this function returns.
*/
void free_global_store( void )
{
	if( !G )
		return;

	free_desktop_store( &G->desktops );

	free_config_store( &G->config );

	free_prog_store( &G->prog );

	free( G );
	G = NULL;

	return;
}


}},
    ['Holy Missile'] =             {id = 130, words = 'adori san',             exhaustion = 2000,  premium = false, type = 'Conjure', icon = 'holymissile',            mana = 350,    level = 27, soul = 3, group = {[3] = 2000},               vocations = {3, 7}}
  }--[[,

  ['Sample'] = {
    ['Wind Walk'] =                {id = 1, words = 'windwalk',        description = 'Run at enormous speed.',          exhaustion = 2000,  premium = false, type = 'Instant', icon = 1,  mana = 50,     level = 10, soul = 0, group = {[3] = 2000}, vocations = {1, 2}},
    ['Fire Breath'] =              {id = 2, words = 'firebreath',      description = 'A strong firewave.',              exhaustion = 2000,  premium = false, type = 'Instant', icon = 2,  mana = 350,    level = 27, soul = 0, group = {[1] = 2000}, vocations = {4, 8}},
    ['Moonglaives'] =              {id = 3, words = 'moonglaives',     description = 'Throw moonglaives around you.',   exhaustion = 2000,  premium = false, type = 'Instant', icon = 3,  mana = 90,     level = 55, soul = 0, group = {[1] = 2000}, vocations = {3, 7}},
    ['Critical Strike'] =          {id = 4, words = 'criticalstrike',  description = 'Land a critical strike.',         exhaustion = 2000,  premium = false, type = 'Instant', icon = 4,  mana = 350,    level = 27, soul = 0, group = {[1] = 2000}, vocations = {3, 4, 7, 8}},
    ['Firefly'] =                  {id = 5, words = 'firefly',         description = 'Summon a angry firefly',          exhaustion = 2000,  premium = false, type = 'Instant', icon = 5,  mana = 350,    level = 27, soul = 0, group = {[1] = 2000}, vocations = {1, 2, 5, 6}}
  }]]
}

-- ['const_name'] =       {client_id, TFS_id}
-- Conversion from TFS icon id to the id used by client (icons.png order)
SpellIcons = {
  ['intenserecovery']           = {16, 160},
  ['recovery']                  = {15, 159},
  ['intensewoundcleansing']     = {4, 158},
  ['ultimateterrastrike']       = {37, 157},
  ['ultimateicestrike']         = {34, 156},
  ['ultimateenergystrike']      = {31, 155},
  ['ultimateflamestrike']       = {28, 154},
  ['strongterrastrike']         = {36, 153},
  ['strongicestrike']           = {33, 152},
  ['strongenergystrike']        = {30, 151},
  ['strongflamestrike']         = {27, 150},
  ['lightning']                 = {51, 149},
  ['physicalstrike']            = {17, 148},
  ['curecurse']                 = {11, 147},
  ['curseelectrification']      = {14, 146},
  ['cureburning']               = {13, 145},
  ['curebleeding']              = {12, 144},
  ['holyflash']                 = {53, 143},
  ['envenom']                   = {58, 142},
  ['inflictwound']              = {57, 141},
  ['electrify']                 = {56, 140},
  ['curse']                     = {54, 139},
  ['ignite']                    = {55, 138},
  -- [[ 136 / 137 Unknown ]]
  ['sharpshooter']              = {121, 135},
  ['swiftfoot']                 = {119, 134},
  ['bloodrage']                 = {96, 133},
  ['protector']                 = {122, 132},
  ['charge']                    = {98, 131


'q':
                SetCastling (BLACK, QSIDE, true);
                break;
            case 'K':
                SetCastling (WHITE, KSIDE, true);
                break;
            case 'k':
                SetCastling (BLACK, KSIDE, true);
                break;
            default:
                return ERROR_InvalidFEN;
            }
        }
    }

    // Now the EP target:
    skip_spaces();
    if (*str == '-') {
        EPTarget = NULL_SQUARE;
        str++;  // No EP target
    } else if (*str) {
        char fylec = *str++;
        if (fylec < 'a'  ||  fylec > 'h') {
            return ERROR_InvalidFEN;
        }
        char rankc = *str++;
        if (rankc != '3'  &&  rankc != '6') {
            return ERROR_InvalidFEN;
        }
        EPTarget = square_Make(fyle_FromChar(fylec), rank_FromChar(rankc));
    }

    // Now the capture/pawn halfmove clock:
    skip_spaces();
    if (*str) {
        char* end;
        HalfMoveClock = (ushort)std::max(0l, strtol(str, &end, 10));
        str = end;
    }

    // Finally, the fullmove counter:
    skip_spaces();
    if (*str) {
        int i = atoi(str);
        if (i >= 1) {
            PlyCounter = (i - 1) * 2;
        }
    }
    if (ToMove == BLACK) { PlyCounter++; }
    return OK;
}

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Position::PrintFEN():
//      Print the FEN representation of the position.
//      If flags == FEN_COMPACT, only the board and side-to-move fields
//              are printed, in compact form (no slashes between rows).
//      If flags == FEN_BOARD, only the board and side-to-move fields
//              are printed.
//      If flags == FEN_CASTLING_EP, the castling and en passant fields
//              are also printed.
//      If flags == FEN_ALL_FIELDS, all fields are printed including
//              the halfmove clock and ply counter.
//
void Position::PrintFEN(char* str, uint flags) const {
    ASSERT (str != NULL);
    uint emptyRun, iRank, iFyle;
    for (iRank = 0; iRank < 8; iRank++) {
        const pieceT* pBoard = &(Board[(7 - iRank) * 8]);
        emptyRun = 0;
        if (iRank > 0  &&  flags > FEN_COMPACT) { *str++ = '/'; }
        for (iFyle = 0; iFyle < 8; iFyle++, pBoard++) {
            if (*pBoard != EMPTY) {
                if (emptyRun) { *str++ = (byte) emptyRun + '0'; }
                emptyRun = 0;
                *str++ = PIECE_CHAR[*pBoard];
            } else {
                emptyRun++;
            }
        }
        if (emptyRun) { *str++ = (byte) emptyRun + '0'; }
    }

    if (flags > FEN_COMPACT) { *str++ = ' '; }
    *str++ = (ToMove == WHITE ? 'w' : 'b');
    *str = 0;

    if (flags >= FEN_CASTLING_EP) {
        // Add the castling flags and EP flag as well:
        *str++ = ' ';
        if (Castling == 0)  {
            *str++ = '-';
        } else {
            if (GetCastling (WHITE, KSIDE))  { *str++ = 'K'; }
            if (GetCastling (WHITE, QSIDE))  { *str++ = 'Q'; }
            if (GetCastling (BLACK, KSIDE))  { *str++ = 'k'; }
            if (GetCastling (BLACK, QSIDE))  { *str++ = 'q'; }
        }
        *str++


urn tp
		}

		t.Run("api", apiTests(tpg))
	})

	t.Run("store=bundle_local", func(t *testing.T) {
		tpg := func(version bundle.Version) func(t *testing.T) testParam {
			return func(t *testing.T) testParam {
				t.Helper()
				ctx, cancelFunc := context.WithCancel(t.Context())
				t.Cleanup(cancelFunc)

				dir := test.PathToDir(t, filepath.Join("bundle", fmt.Sprintf("v%d", version)))

				conf := &hubstore.Conf{
					CacheSize: 1024,
					Local: &hubstore.LocalSourceConf{
						BundlePath: filepath.Join(dir, "bundle.crbp"),
						TempDir:    t.TempDir(),
					},
				}

				switch version {
				case bundle.Version1:
					keyBytes, err := os.ReadFile(filepath.Join(dir, "secret_key.txt"))
					require.NoError(t, err, "Failed to read secret key")

					conf.Credentials = &hub.CredentialsConf{WorkspaceSecret: string(bytes.TrimSpace(keyBytes))}
				case bundle.Version2:
					keyBytes, err := os.ReadFile(filepath.Join(dir, "encryption_key.txt"))
					require.NoError(t, err, "Failed to read encryption key")

					conf.Local.EncryptionKey = string(keyBytes)
				default:
				}

				store, err := hubstore.NewStore(ctx, conf)
				require.NoError(t, err)

				schemaMgr := schema.NewFromConf(ctx, store, schema.NewConf(schema.EnforcementReject))
				return testParam{
					store:        store,
					policyLoader: store,
					schemaMgr:    schemaMgr,
				}
			}
		}

		t.Run("api", func(t *testing.T) {
			t.Run("bundlev1", apiTests(tpg(bundle.Version1)))
			t.Run("bundlev2", apiTests(tpg(bundle.Version2)))
		})
	})
}

func apiTests(tpg testParamGen) func(*testing.T) {
	return func(t *testing.T) {
		tr := LoadTestCases(t, nil, "checks", "playground", "plan_resources")

		t.Run("with_tls", func(t *testing.T) {
			testdataDir := test.PathToDir(t, "server")

			t.Run("tcp", func(t *testing.T) {
				conf := defaultConf()
				conf.HTTPListenAddr = getFreeListenAddr(t)
				conf.GRPCListenAddr = getFreeListenAddr(t)
				conf.TLS = &TLSConf{
					Cert: filepath.Join(testdataDir, "tls.crt"),
					Key:  filepath.Join(testdataDir, "tls.key"),
				}

				startServer(t, conf, tpg)

				tlsConf := &tls.Config{InsecureSkipVerify: true} //nolint:gosec

				t.Run("grpc", tr.RunGRPCTests(conf.GRPCListenAddr, grpc.WithTransportCredentials(credentials.NewTLS(tlsConf))))
				t.Run("grpc_over_http", tr.RunGRPCTests(conf.HTTPListenAddr, grpc.WithTransportCredentials(credentials.NewTLS(tlsConf))))
				t.Run("http", tr.RunHTTPTests(fmt.Sprintf("https://%s", conf.HTTPListenAddr), nil))
			})

			t.Run("uds", func(t *testing.T) {
				tempDir := createTempDirForUDS(t)

				conf := defaultConf()
				conf.HTTPListenAddr = fmt.Sprintf("unix:%s", filepath.Join(tempDir, "http.sock"))
				conf.GRPCListenAddr = fmt.Sprintf("unix:%s", filepath.Join(tempDir, "grpc.sock"))
				conf.TLS = &TLSConf


eScore 3

BatonPass_SetupAtHighHP:
    ; On turn 1 of the entire battle, score +5.
    LoadTurnCount
    IfLoadedEqualTo 0, ScorePlus5

    ; If the attacker is at < 60% HP, score -10.
    IfHPPercentLessThan AI_BATTLER_ATTACKER, 60, ScoreMinus10

    ; Otherwise, score +1.
    GoTo ScorePlus1

BatonPass_EvalProtect:
    ; If the current move's effect is Protect and the last move that we used
    ; is either Detect or Protect, score -2.
    LoadBattlerPreviousMove AI_BATTLER_ATTACKER
    IfLoadedInTable BatonPass_ProtectDetect, ScoreMinus2

    ; Else, score +2.
    AddToMoveScore 2
    PopOrEnd

BatonPass_ProtectDetect:
    TableEntry MOVE_PROTECT
    TableEntry MOVE_DETECT
    TableEntry TABLE_END

BatonPass_EvalBatonPass:
    ; On turn 1 of the entire battle, score -2.
    LoadTurnCount
    IfLoadedEqualTo 0, ScoreMinus2

    ; Score +1 for each positive stat stage for Attack or Special Attack
    IfStatStageGreaterThan AI_BATTLER_ATTACKER, BATTLE_STAT_ATTACK, 8, ScorePlus3
    IfStatStageGreaterThan AI_BATTLER_ATTACKER, BATTLE_STAT_ATTACK, 7, ScorePlus2
    IfStatStageGreaterThan AI_BATTLER_ATTACKER, BATTLE_STAT_ATTACK, 6, ScorePlus1
    IfStatStageGreaterThan AI_BATTLER_ATTACKER, BATTLE_STAT_SP_ATTACK, 8, ScorePlus3
    IfStatStageGreaterThan AI_BATTLER_ATTACKER, BATTLE_STAT_SP_ATTACK, 7, ScorePlus2
    IfStatStageGreaterThan AI_BATTLER_ATTACKER, BATTLE_STAT_SP_ATTACK, 6, ScorePlus1
    PopOrEnd

BatonPass_Terminate:
    PopOrEnd

TagStrategy_Main:
    IfTargetIsPartner TagStrategy_Partner

    ; If the move does not deal damage, skip ahead
    FlagMoveDamageScore FALSE
    IfLoadedEqualTo AI_NO_COMPARISON_MADE, TagStrategy_CheckSpecialScoring

    ; Flat-damage move effects have a special handler; this includes OHKO moves
    IfCurrentMoveEffectEqualTo BATTLE_EFFECT_ONE_HIT_KO, TagStrategy_ScoreMove
    IfCurrentMoveEffectEqualTo BATTLE_EFFECT_40_DAMAGE_FLAT, TagStrategy_ScoreMove
    IfCurrentMoveEffectEqualTo BATTLE_EFFECT_LEVEL_DAMAGE_FLAT, TagStrategy_ScoreMove
    IfCurrentMoveEffectEqualTo BATTLE_EFFECT_RANDOM_DAMAGE_1_TO_150_LEVEL, TagStrategy_ScoreMove
    IfCurrentMoveEffectEqualTo BATTLE_EFFECT_20_DAMAGE_FLAT, TagStrategy_ScoreMove

    ; If the move is not-very-effective, try to reduce its score
    IfMoveEffectivenessEquals TYPE_MULTI_HALF_DAMAGE, TagStrategy_TryScoreMinus1
    IfMoveEffectivenessEquals TYPE_MULTI_QUARTER_DAMAGE, TagStrategy_TryScoreMinus2

    ; All other moves
    GoTo TagStrategy_ScoreMove

TagStrategy_TryScoreMinus1:
    ; If the maximum roll would kill, do not reduce the score
    IfCurrentMoveKills USE_MAX_DAMAGE, TagStrategy_ScoreMove

    ; If the target is on their last Pokemon, do not reduce the score
    IfHPPercentEqualTo AI_BATTLER_DEFENDER_PARTNER, 0, TagStrategy_ScoreMove

    ; 75% of the time, reduce


                        const std::string &type_macro,
                                            const std::string &descriptor_addr) const;
  const FieldDescriptor *descriptor_;
};

// Convenience class which constructs FieldGenerators for a Descriptor.
class FieldGeneratorMap {
 public:
  explicit FieldGeneratorMap(const Descriptor* descriptor);
  ~FieldGeneratorMap();

  const FieldGenerator& get(const FieldDescriptor* field) const;

 private:
  const Descriptor* descriptor_;
  std::unique_ptr<std::unique_ptr<FieldGenerator>[]> field_generators_;

  static FieldGenerator* MakeGenerator(const FieldDescriptor* field);
};

}  // namespace c
}  // namespace compiler
}  // namespace protobuf

}  // namespace google
#endif  // GOOGLE_PROTOBUF_COMPILER_C_FIELD_H__


ろしくないケースもある

 * 整合性チェック integrity checking できるデバイスで、ディスクに書き込む内容と
カーネルの pre-write checksum を比較する
   * カーネルが checksum を計算したとあとに page の内容が書き変わると 疑似? write w error となってしまう
   * Software RAID がコレでコケる

ということでファイルシステムで ___stable page___ という仕組みで writeback 中に page の内容が書き変わらんことを保証しよう

## http://lwn.net/Articles/429295/ のパッチ

 * integrity check が使われるケースでは writeback する前の page のコピーを取っておく
  * コピーについてはユーザ空間では気にする必要ない
  * ページの内容が書き変わる事があってもコピーを参照して integrity check できる
  * integrity check での問題は解決したけど コピーはコスト高い

もっといい方法無いの?

## http://lwn.net/Articles/442156/ のパッチ

 * writeback する page に write する際は、writeback が終わるまで待つだけにする
   * 先に書いたように writeback する際に page は read-only にマークされる
   * 加えて writeback 中であることを示すフラグがある
 * ___page_mkwrite___
   * read-only page が writable になったことを通知する
   * vm_operations_struct の .page_mkwrite を指す
 * .page_mkwrite を実装してないファイルシステムもある
   * その場合 ___generic_empty_page_mkwrite___ を使う
     * page をロック、 write back が終わるまで待つ、ロックしたページを返す
   * ext2, ext4, FAT で似たような機能のをつくった
   * Btrfs は内部で実装してて必要無かった
   * ext3 は journal との兼ね合いで実装むずかった
     * ext3 を侵害する (めっちゃ変える?) ようなパッチは歓迎されない。で、 ext3 では stable page サポートが無い

## アプリを遅くしてしまう懸念

いいこと尽くめでなくて問題あり

 * ファイルの同じ箇所に書き込みまくるアプリの場合
   * ___stable page___ 実装前は連続した write でも 遅くなる事はなかった
   * 実装後は writeback で待たされるようになった
   * ベンチ取ったら12% のパフォーマンスデグレード
     * 好ましくない結果なのだけど、この問題にぶつかるアプリは少ないンじゃね？ってな合意でマージ
     * 稀

あれ、まさに MySQL ... ですよね
これの影響されるアプリに気がつかなかったから? といって存在無い訳でない

 * 数年してディストリビューションやユーザのによって開発されてから現実的な問題を生む
 * it's far too late to go back.  時既におそし〜
   * 問題の問いかけなのかな ?

----

無効にするパッチ

 * http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=1d1d1a767206fbe5d4c69493b7e6d2a8d08cc0a0
   * bdi_cap_stable_pages_required で挙動を変える

## CentOS6.5

デバイスが writeback 中に stable page を必要とするかの判定

```c
static inline bool bdi_cap_


const jni$_.JObjectNullableType());
  }

  static final _id_newWorkStealingPool$1 = _class.staticMethodId(
    r'newWorkStealingPool',
    r'(I)Ljava/util/concurrent/ExecutorService;',
  );

  static final _newWorkStealingPool$1 = jni$_.ProtectedJniExtensions.lookup<
              jni$_.NativeFunction<
                  jni$_.JniResult Function(jni$_.Pointer<jni$_.Void>,
                      jni$_.JMethodIDPtr, jni$_.VarArgs<(jni$_.Int32,)>)>>(
          'globalEnv_CallStaticObjectMethod')
      .asFunction<
          jni$_.JniResult Function(
              jni$_.Pointer<jni$_.Void>, jni$_.JMethodIDPtr, int)>();

  /// from: `static public java.util.concurrent.ExecutorService newWorkStealingPool(int i)`
  /// The returned object must be released after use, by calling the [release] method.
  static jni$_.JObject? newWorkStealingPool$1(
    int i,
  ) {
    return _newWorkStealingPool$1(_class.reference.pointer,
            _id_newWorkStealingPool$1 as jni$_.JMethodIDPtr, i)
        .object<jni$_.JObject?>(const jni$_.JObjectNullableType());
  }

  static final _id_privilegedCallable = _class.staticMethodId(
    r'privilegedCallable',
    r'(Ljava/util/concurrent/Callable;)Ljava/util/concurrent/Callable;',
  );

  static final _privilegedCallable = jni$_.ProtectedJniExtensions.lookup<
              jni$_.NativeFunction<
                  jni$_.JniResult Function(
                      jni$_.Pointer<jni$_.Void>,
                      jni$_.JMethodIDPtr,
                      jni$_.VarArgs<(jni$_.Pointer<jni$_.Void>,)>)>>(
          'globalEnv_CallStaticObjectMethod')
      .asFunction<
          jni$_.JniResult Function(jni$_.Pointer<jni$_.Void>,
              jni$_.JMethodIDPtr, jni$_.Pointer<jni$_.Void>)>();

  /// from: `static public java.util.concurrent.Callable<T> privilegedCallable(java.util.concurrent.Callable<T> callable)`
  /// The returned object must be released after use, by calling the [release] method.
  static jni$_.JObject? privilegedCallable<$T extends jni$_.JObject?>(
    jni$_.JObject? callable, {
    required jni$_.JObjType<$T> T,
  }) {
    final _$callable = callable?.reference ?? jni$_.jNullReference;
    return _privilegedCallable(_class.reference.pointer,
            _id_privilegedCallable as jni$_.JMethodIDPtr, _$callable.pointer)
        .object<jni$_.JObject?>(const jni$_.JObjectNullableType());
  }

  static final _id_privilegedCallableUsingCurrentClassLoader =
      _class.staticMethodId(
    r'privilegedCallableUsingCurrentClassLoader',
    r'(Ljava/util/concurrent/Callable;)Ljava/util/concurrent/Callable;',
  );

  static final _privilegedCallableUsingCurrentClassLoader =
      jni$_.ProtectedJniExtensions.lookup<
                  jni$_.NativeFunction<
                      jni$_.JniResult Function(
                          jni$_.Pointer<jni$_.Void>,
                          jni$_.JMethodIDPtr,
                          jni$_.VarArgs<(jni$_.Pointer<jni$_.Void>,)>)>>(
              'globalEnv_CallStaticObjectMethod')
          .asFunction<
              jni$_.JniResult Function(jni$_.Pointer<jni$_.Void>,
                  jni$_.JMethodIDPtr, jni$_.Pointer<jni$_.Void>)>();

  /// from: `static public java.util.concurrent.Callable<T> privilegedCallableUsingCurrentClassLoade


01LjA0IiBmaWxsPSIjZmZmIj48L3BhdGg+PC9nPjwvc3ZnPg==) 50% 50% no-repeat;
}
 span.PIN_1701652279808_embed_pin .PIN_1701652279808_pages .PIN_1701652279808_overlay .PIN_1701652279808_controls .PIN_1701652279808_pause {
  background: rgba(0,0,0,.8) url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgd2lkdGg9IjI0cHgiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PGc+PHBhdGggZD0iTTcgMGMxLjY1IDAgMyAxLjM1IDMgM3YxOGMwIDEuNjUtMS4zNSAzLTMgM3MtMy0xLjM1LTMtM1YzYzAtMS42NSAxLjM1LTMgMy0zem0xMCAwYzEuNjUgMCAzIDEuMzUgMyAzdjE4YzAgMS42NS0xLjM1IDMtMyAzcy0zLTEuMzUtMy0zVjNjMC0xLjY1IDEuMzUtMyAzLTN6IiBmaWxsPSIjZmZmIj48L3BhdGg+PC9nPjwvc3ZnPg==) 50% 50% no-repeat;
}
 span.PIN_1701652279808_embed_pin .PIN_1701652279808_pages .PIN_1701652279808_overlay .PIN_1701652279808_controls .PIN_1701652279808_pause,  span.PIN_1701652279808_embed_pin .PIN_1701652279808_pages .PIN_1701652279808_overlay .PIN_1701652279808_controls .PIN_1701652279808_play {
  position: absolute;
  display: block;
  height: 64px;
  width: 64px;
  border-radius: 32px;
}
 span.PIN_1701652279808_embed_pin .PIN_1701652279808_pages .PIN_1701652279808_overlay .PIN_1701652279808_nav {
  user-select: none;
  position: absolute;
  height: 100%;
  width: 20%;
  background: transparent url() 0 0 no-repeat;
  background-size: 24px 24px;
  z-index: 1;
}
 span.PIN_1701652279808_embed_pin .PIN_1701652279808_pages .PIN_1701652279808_overlay .PIN_1701652279808_nav.PIN_1701652279808_forward,  span.PIN_1701652279808_embed_pin .PIN_1701652279808_pages .PIN_1701652279808_overlay .PIN_1701652279808_nav.PIN_1701652279808_forward_noop {
  right: 0;
}
 span.PIN_1701652279808_embed_pin .PIN_1701652279808_pages .PIN_1701652279808_overlay .PIN_1701652279808_nav.PIN_1701652279808_backward,  span.PIN_1701652279808_embed_pin .PIN_1701652279808_pages .PIN_1701652279808_overlay .PIN_1701652279808_nav.PIN_1701652279808_backward_


tions.keyboard = new pc.Keyboard(document.body);

// render at full native resolution
device.maxPixelRatio = window.devicePixelRatio;

createOptions.componentSystems = [
    pc.RenderComponentSystem,
    pc.CameraComponentSystem,
    pc.LightComponentSystem,
    pc.ScriptComponentSystem
];
createOptions.resourceHandlers = [pc.TextureHandler, pc.ScriptHandler, pc.ContainerHandler];

const app = new pc.AppBase(canvas);
app.init(createOptions);

// Set the canvas to fill the window and automatically change resolution to be the same as the canvas size
app.setCanvasFillMode(pc.FILLMODE_FILL_WINDOW);
app.setCanvasResolution(pc.RESOLUTION_AUTO);

// Ensure canvas is resized when window changes size
const resize = () => app.resizeCanvas();
window.addEventListener('resize', resize);
app.on('destroy', () => {
    window.removeEventListener('resize', resize);
});

const assetListLoader = new pc.AssetListLoader(Object.values(assets), app.assets);
assetListLoader.load(() => {
    app.start();

    // setup skydome
    app.scene.envAtlas = assets.envAtlas.resource;
    app.scene.skyboxMip = 2;
    app.scene.exposure = 4.5;

    /**
     * Helper function to create a primitive with shape type, position, scale, color and layer.
     *
     * @param {string} primitiveType - The primitive type.
     * @param {number | pc.Vec3} position - The position.
     * @param {number | pc.Vec3} scale - The scale.
     * @param {pc.Color} color - The color.
     * @returns {pc.Material} The returned entity.
     */
    function createPrimitive(primitiveType, position, scale, color) {
        // create material of specified color
        const material = new pc.StandardMaterial();
        material.diffuse = color;
        material.diffuseMap = assets.diffuse.resource;
        material.update();

        // create primitive
        const primitive = new pc.Entity(primitiveType);
        primitive.addComponent('render', {
            type: primitiveType,
            material: material
        });

        // set position and scale and add it to scene
        primitive.setLocalPosition(position);
        primitive.setLocalScale(scale);
        app.root.addChild(primitive);

        return material;
    }

    // create a ground plane
    createPrimitive('plane', new pc.Vec3(0, 0, 0), new pc.Vec3(30, 1, 30), new pc.Color(0.8, 0.8, 0.8));

    // create an instance of the table
    const tableEntity = assets.table.resource.instantiateRenderEntity();
    tableEntity.setLocalScale(3, 3, 3);
    app.root.addChild(tableEntity);

    // get all materials that have blending enabled
    const materials = [];
    tableEntity.findComponents('render').forEach((render) => {
        render.meshInstances.forEach((meshInstance) => {
            if (meshInstance.material.blendType !== pc.BLEND_NONE) {
                materials.push(meshInstance.material);
            }
        });
    });

    // Create an Entity with a directional light, casting soft VSM shadow
    const light = new pc.Entity();
    light.addComponent('light', {
        type: 'directional',
        color: pc.Color.WHITE,
        range: 200,
        castShadows: true,
        shadowResolution: 2048,
        shadowType: pc.SHADOW_VSM_16F,
        vsmBlurSize: 20,
        shadowBias: 0.1,
        normalOffsetBias: 0.1
    });
    light.setLocalEulerAngles(75, 120, 20);
    app.root.addChild(light);

    // Create the camera
    const cameraEntity = new pc.Entity('Camera');
    cameraEntity.addComponent('camera', {


8,
    final_xor: u8,
    reflect: bool,
}

#[cfg(feature = "alloc")]
impl Debug for CRCu8 {
    #[inline]
    fn fmt(&self, f: &mut Formatter) -> Result<(), fmt::Error> {
        if self.by_table {
            impl_debug_for_struct!(CRCu64, f, self, let .lookup_table = self.lookup_table.as_ref(), (.sum, "0x{:02X}", self.sum), .bits, (.initial, "0x{:02X}", self.initial), (.final_xor, "0x{:02X}", self.final_xor), .reflect);
        } else {
            impl_debug_for_struct!(CRCu64, f, self, (.poly, "0x{:02X}", self.poly), (.sum, "0x{:02X}", self.sum), .bits, (.initial, "0x{:02X}", self.initial), (.final_xor, "0x{:02X}", self.final_xor), .reflect);
        }
    }
}

#[cfg(feature = "alloc")]
impl Display for CRCu8 {
    #[inline]
    fn fmt(&self, f: &mut Formatter) -> Result<(), fmt::Error> {
        f.write_fmt(format_args!("0x{:01$X}", self.get_crc(), (self.bits as usize + 3) >> 2))
    }
}

impl CRCu8 {
    /// Create a `CRCu8` instance by providing the length of bits, expression, reflection, an initial value and a final xor value.
    pub fn create_crc(poly: u8, bits: u8, initial: u8, final_xor: u8, reflect: bool) -> CRCu8 {
        debug_assert!(bits <= 8 && bits > 0);

        if bits % 8 == 0 {
            let lookup_table = if reflect {
                Self::crc_reflect_table(poly)
            } else {
                Self::crc_table(poly)
            };

            Self::create_crc_with_exists_lookup_table(
                lookup_table,
                bits,
                initial,
                final_xor,
                reflect,
            )
        } else {
            Self::create(false, [0u8; 256], poly, bits, initial, final_xor, reflect)
        }
    }

    #[inline]
    pub(crate) fn create_crc_with_exists_lookup_table(
        lookup_table: [u8; 256],
        bits: u8,
        initial: u8,
        final_xor: u8,
        reflect: bool,
    ) -> CRCu8 {
        debug_assert!(bits % 8 == 0);

        Self::create(true, lookup_table, 0, bits, initial, final_xor, reflect)
    }

    #[inline]
    fn create(
        by_table: bool,
        lookup_table: [u8; 256],
        mut poly: u8,
        bits: u8,
        initial: u8,
        final_xor: u8,
        reflect: bool,
    ) -> CRCu8 {
        let high_bit = 1 << (bits - 1);
        let mask = ((high_bit - 1) << 1) | 1;

        let sum = if reflect {
            Self::reflect_function(high_bit, initial)
        } else {
            initial
        };

        if !by_table && reflect {
            poly = Self::reflect_function(high_bit, poly);
        }

        CRCu8 {
            by_table,
            poly,
            lookup_table,
            sum,
            #[cfg(any(feature = "alloc", feature = "heapless"))]
            bits,
            high_bit,
            mask,
            initial,
            final_xor,
            reflect,
        }
    }

    #[inline]
    pub(crate) fn reflect_function(high_bit: u8, n: u8) -> u8 {
        let mut i = high_bit;
        let mut j = 1;
        let mut out = 0;

        while i != 0 {
            if n & i != 0 {
                out |= j;
            }

            j <<= 1;
            i >>= 1;


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

using Microsoft.Extensions.DependencyInjection;

namespace Microsoft.AspNetCore.Http.Features;

/// <summary>
/// An implementation for <see cref="IServiceProvidersFeature"/> for accessing request services.
/// </summary>
public class RequestServicesFeature : IServiceProvidersFeature, IDisposable, IAsyncDisposable
{
    private readonly IServiceScopeFactory? _scopeFactory;
    private IServiceProvider? _requestServices;
    private IServiceScope? _scope;
    private bool _requestServicesSet;
    private readonly HttpContext _context;

    /// <summary>
    /// Initializes a new instance of <see cref="RequestServicesFeature"/>.
    /// </summary>
    /// <param name="context">The <see cref="HttpContext"/>.</param>
    /// <param name="scopeFactory">The <see cref="IServiceScopeFactory"/>.</param>
    public RequestServicesFeature(HttpContext context, IServiceScopeFactory? scopeFactory)
    {
        _context = context;
        _scopeFactory = scopeFactory;
    }

    /// <inheritdoc />
    public IServiceProvider RequestServices
    {
        get
        {
            if (!_requestServicesSet && _scopeFactory != null)
            {
                _context.Response.RegisterForDisposeAsync(this);
                _scope = _scopeFactory.