lass Queue {

    fun submit(vararg cmdBuffers: CommandBuffer)

    fun writeBuffer(
        buffer: Buffer,
        data: ByteArray,
        offset: Long = 0,
        dataOffset: Long = 0,
        size: Long = data.size.toLong()
    )
}

object ShaderVisibility {
    const val VERTEX: Long = 1
    const val FRAGMENT: Long = 2
    const val COMPUTE: Long = 4
}

expect class ShaderModule

expect class Extent3D(width: Long, height: Long, depth: Long)

expect class Origin3D(x: Long, y: Long, z: Long)

/**
 * The usages determine what kind of memory the texture is allocated from and what actions the
 * texture can partake in.
 */
object TextureUsage {
    /** Allows a texture to be the source in a copy operation */
    const val COPY_SRC: Long = 1

    /**
     * Allows a texture to the destination of a copy operation such as
     * [CommandEncoder.copyBufferToTexture]
     */
    const val COPY_DST: Long = 2

    /** Allows a texture to be a sampled texture in a bind group */
    const val SAMPLED: Long = 4

    /** Allows a texture to be a storage texture in a bind group */
    const val STORAGE: Long = 8

    /** Allows a texture to be a output attachment of a render pass */
    const val OUTPUT_ATTACHMENT: Long = 16
}

expect class SwapChain {

    fun getCurrentTextureView(): TextureView

    fun present()

    @Deprecated("Old API. Instead use Window#onResize")
    fun isOutOfDate(): Boolean
}

expect class SwapChainDescriptor(
    device: Device, format: TextureFormat, usage: Long = TextureUsage.OUTPUT_ATTACHMENT
)

expect class TextureViewDescriptor(
    format: TextureFormat,
    dimension: TextureViewDimension,
    aspect: TextureAspect = TextureAspect.ALL,
    baseMipLevel: Long = 0,
    mipLevelCount: Long = 0,
    baseArrayLayer: Long = 0,
    arrayLayerCount: Long = 0
)

expect class TextureDescriptor(
    size: Extent3D,
    mipLevelCount: Long,
    sampleCount: Int,
    dimension: TextureDimension,
    format: TextureFormat,
    usage: Long
)

expect class Texture {
    fun createView(desc: TextureViewDescriptor? = null): TextureView

    fun destroy()
}

expect class TextureView : IntoBindingResource

/**
 * The usages determine what kind of memory the buffer is allocated from and what actions the buffer
 * can partake in.
 */
object BufferUsage {
    /**
     * Allow a buffer to be mapped for reading. Does not need to be enabled for mapped_at_creation.
     */
    const val MAP_READ: Int = 1

    /**
     * Allow a buffer to be mapped for writing. Does not need to be enabled for mapped_at_creation.
     */
    const val MAP_WRITE: Int = 2

    /**
     * Allow a buffer to be the source buffer for [CommandEncoder.copyBufferToBuffer] or
     * [CommandEncoder.copyBufferToTexture]
     */
    const val COPY_SRC: Int = 4

    /** Allow a buffer to be the destination buffer for [CommandEncoder.copyBufferToBuffer] */
    const val COPY_DST: Int = 8

    /** Allow a buffer to be used as index buffer for draw calls */
    const val INDEX: Int = 16

    /** Allow a buffer to be used as vertex buffer for draw calls */
    const val VERTEX: Int = 32

    /** Allow a buffer to be used as uniform buffer */
    const val UNIFORM: Int = 64

    /** Allows a buffer to be used as a storage buffer */
    const val STORAGE: Int = 128

    /** Allow a buffer to be the indirect buffer in an indirect draw call. */
    const val INDIRECT: Int = 256

    const val QUERY_RESOLVE: Int = 512
}

expect class BufferDescriptor(label: String, size: Long, usage: Int, mappedAtCreation: Boolean)


121, 0x128, 0x12f, 0x132, 0x138, 0x14f,
	0x15d, 0x164, 0x16b, 0x16b, 0x175, 0x18c, 0x199, 0x1a2, 0x1b3, 0x1b7, 0x1bc, 0x1bc,
	0x1c4, 0x1cc, 0x1d4, 0x1d9, 0x1d9, 0x1e0, 0x1e6, 0x1e6, 0x1e9, 0x1ee, 0x1f1, 0x201,
	0x20e, 0x214, 0x21b, 0x220, 0x220, 0x220, 0x220, 0x220, 0x226, 0x22c, 0x22c, 0x234,
	0x23e, 0x24e, 0x24e, 0x24e, 0x256, 0x25f, 0x25f, 0x265, 0x268, 0x268, 0x274, 0x27b,
	0x27b, 0x27b, 0x27b, 0x27e, 0x27e, 0x283, 0x28b, 0x290, 0x295, 0x29c, 0x29c, 0x29c,
	0x2aa, 0x2b1, 0x2b4, 0x2b7, 0x2c4, 0x2ca, 0x2d8, 0x2dc, 0x2e3, 0x2ed, 0x2f2, 0x2fb,
	0x301, 0x301, 0x30a, 0x31b, 0x322, 0x322, 0x322, 0x322, 0x328, 0x328, 0x32e, 0x33b,
	0x341, 0x356, 0x356, 0x356, 0x35e, 0x35e, 0x364, 0x371, 0x376, 0x376, 0x37a, 0x380,
	0x387, 0x38e, 0x395, 0x39a, 0x39d, 0x3a2, 0x3a2, 0x3a8, 0x3ab, 0x3be, 0x3be, 0x3be,
	0x3ca, 0x3e1, 0x3e3, 0x3e3, 0x3e7, 0x3f0, 0x3f9, 0x405, 0x414,
}

const bgScriptStr = "" +
	"арабскаАрамейскаарменскаАвестанскаБалийскиБатакскабенгалскаБлис символибопомофоБ" +
	"рахмиБрайловаБугинскаБухидЧакмаУнифицирани символи на канадски аборигениКарийска" +
	"ХамитскаЧерокиКиртКоптскаКипърскакирилицадеванагариДезеретЕгипетско демотично пи" +
	"смоЕгипетско йератично писмоЕгипетски йероглифиетиопскаГрузинска хуцуригрузинска" +
	"ГлаголическаГотическагръцкагуджаратигурмукхихангълкитайскаХанунуопростен китайск" +
	"итрадиционен китайскиивритхираганаПахау хмонгКатакана или ХираганаСтароунгарскаХ" +
	"арапскаДревно италийскаЯванскаяпонскаКая ЛикатаканаКхароштхикхмерскаканнадакорей" +
	"скаКайтхиЛанналаоскаЛатинска фрактураГалска латинскалатиницаЛепчаЛимбуЛинейна АЛ" +
	"инейна БЛицийскаЛидий


  width: 100%;
  background-color: $p4-pswp-top-bar-background;
}

.pswp__caption,
.pswp__top-bar,
.pswp--has_mouse .pswp__button--arrow--left,
.pswp--has_mouse .pswp__button--arrow--right {
  backface-visibility: hidden;
  will-change: opacity;
  transition: opacity $pswp__controls-transition-duration cubic-bezier(.4, 0, .22, 1);
}

/* pswp--has_mouse class is added only when two subsequent mousemove events occur */
.pswp--has_mouse {
  .pswp__button--arrow--left,
  .pswp__button--arrow--right {
    visibility: visible;
  }
}

/* pswp__ui--fit class is added when main image "fits" between top bar and bottom bar (caption) */
.pswp__ui--fit {
  .pswp__top-bar {
    background-color: $p4-pswp-top-bar-background;
  }

  .pswp__caption {
    background-color: $p4-pswp-caption-background;
  }
}

/* pswp__ui--idle class is added when mouse isn't moving for several seconds (JS option timeToIdle) */
.pswp__ui--idle {
  .pswp__top-bar {
    opacity: 0;
  }

  .pswp__button--arrow--left,
  .pswp__button--arrow--right {
    opacity: 0;
  }
}

/*
pswp__ui--hidden class is added when controls are hidden
e.g. when user taps to toggle visibility of controls
*/

.pswp__ui--hidden {
  .pswp__top-bar,
  .pswp__caption,
  .pswp__button--arrow--left,
  .pswp__button--arrow--right {
    /* Force paint & create composition layer for controls. */
    opacity: 0.001;
  }
}

/* pswp__ui--one-slide class is added when there is just one item in gallery */
.pswp__ui--one-slide {
  .pswp__button--arrow--left,
  .pswp__button--arrow--right,
  .pswp__counter {
    display: none;
  }
}

.pswp__element--disabled {
  display: none !important;
}

@if $pswp__include-minimal-style == true {
  .pswp--minimal--dark {
    .pswp__top-bar {
      background: none;
    }
  }
}

.p4-photoswipe-indicators-wrapper {
  padding: 20px 0;
  width: 100%;
  left: 0;
  right: 0;
  text-align: center;
  position: absolute;
  z-index: 9999;
  /*bottom: 0;*/
  line-height: 0;
}

.p4-photoswipe-indicators-wrapper span.p4-photoswipe-indicator-click-area {
  width: 40px;
  margin: -4px 8px 0 8px;
  display: inline-block;
  padding: 8px 0;
}

.p4-photoswipe-indicators-wrapper span.p4-photoswipe-indicator-bar {
  height: 4px;
  background: #999999;
  display: block;
}

.p4-photoswipe-indicators-wrapper
span.p4-photoswipe-indicator-click-area.active
span.p4-photoswipe-indicator-bar {
  background: #333333;
}

.p4-caption-and-indicators {
  padding: 0;
  bottom: 0;
  position: fixed;
  width: 100%;
  height: 48px;
  line-height: 48px;
  background: white;
}
/*
 * Table styles
 */
table.dataTable {
  width: 100%;
  margin: 0 auto;
  clear: both;
  border-collapse: separate;
  border-spacing: 0;
  /*
   * Header and footer styles
   */


eometry';

	this.parameters = {
		radiusTop: radiusTop,
		radiusBottom: radiusBottom,
		height: height,
		radialSegments: radialSegments,
		heightSegments: heightSegments,
		openEnded: openEnded,
		thetaStart: thetaStart,
		thetaLength: thetaLength
	};

	radiusTop = radiusTop !== undefined ? radiusTop : 20;
	radiusBottom = radiusBottom !== undefined ? radiusBottom : 20;
	height = height !== undefined ? height : 100;

	radialSegments = radialSegments || 8;
	heightSegments = heightSegments || 1;

	openEnded = openEnded !== undefined ? openEnded : false;
	thetaStart = thetaStart !== undefined ? thetaStart : 0;
	thetaLength = thetaLength !== undefined ? thetaLength : 2 * Math.PI;

	var heightHalf = height / 2;

	var x, y, vertices = [], uvs = [];

	for ( y = 0; y <= heightSegments; y ++ ) {

		var verticesRow = [];
		var uvsRow = [];

		var v = y / heightSegments;
		var radius = v * ( radiusBottom - radiusTop ) + radiusTop;

		for ( x = 0; x <= radialSegments; x ++ ) {

			var u = x / radialSegments;

			var vertex = new THREE.Vector3();
			vertex.x = radius * Math.sin( u * thetaLength + thetaStart );
			vertex.y = - v * height + heightHalf;
			vertex.z = radius * Math.cos( u * thetaLength + thetaStart );

			this.vertices.push( vertex );

			verticesRow.push( this.vertices.length - 1 );
			uvsRow.push( new THREE.Vector2( u, 1 - v ) );

		}

		vertices.push( verticesRow );
		uvs.push( uvsRow );

	}

	var tanTheta = ( radiusBottom - radiusTop ) / height;
	var na, nb;

	for ( x = 0; x < radialSegments; x ++ ) {

		if ( radiusTop !== 0 ) {

			na = this.vertices[ vertices[ 0 ][ x ] ].clone();
			nb = this.vertices[ vertices[ 0 ][ x + 1 ] ].clone();

		} else {

			na = this.vertices[ vertices[ 1 ][ x ] ].clone();
			nb = this.vertices[ vertices[ 1 ][ x + 1 ] ].clone();

		}

		na.setY( Math.sqrt( na.x * na.x + na.z * na.z ) * tanTheta ).normalize();
		nb.setY( Math.sqrt( nb.x * nb.x + nb.z * nb.z ) * tanTheta ).normalize();

		for ( y = 0; y < heightSegments; y ++ ) {

			var v1 = vertices[ y ][ x ];
			var v2 = vertices[ y + 1 ][ x ];
			var v3 = vertices[ y + 1 ][ x + 1 ];
			var v4 = vertices[ y ][ x + 1 ];

			var n1 = na.clone();
			var n2 = na.clone();
			var n3 = nb.clone();
			var n4 = nb.clone();

			var uv1 = uvs[ y ][ x ].clone();
			var uv2 = uvs[ y + 1 ][ x ].clone();
			var uv3 = uvs[ y + 1 ][ x + 1 ].clone();
			var uv4 = uvs[ y ][ x + 1 ].clone();

			this.faces.push( new THREE.Face3( v1, v2, v4, [ n1, n2, n4 ] ) );
			this.faceVertexUvs[ 0 ].push( [ uv1, uv2, uv4 ] );

			this.faces.push( new THREE.Face3( v2, v3, v4, [ n2.clone(), n3, n4.clone() ] ) );
			this.faceVertexUvs[ 0 ].push( [ uv2.clone(), uv3, uv4.clone() ] );

		}

	}

	// top cap

	if ( openEnded === false && radiusTop > 0 ) {

		this.vertices.push( new THREE.Vector3( 0, heightHalf, 0 ) );

		for ( x = 0; x < radialSegments; x ++ ) {

			var v1 = vertices[


ructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),i=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0}),e.FindMathML=void 0;var Q=r(3494),T="http://www.w3.org/1998/Math/MathML",s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.findMath=function(t){var e=new Set;this.findMathNodes(t,e),this.findMathPrefixed(t,e);var r=this.adaptor.root(this.adaptor.document);return"html"===this.adaptor.kind(r)&&0===e.size&&this.findMathNS(t,e),this.processMath(e)},e.prototype.findMathNodes=function(t,e){var r,n;try{for(var o=i(this.adaptor.tags(t,"math")),Q=o.next();!Q.done;Q=o.next()){var T=Q.value;e.add(T)}}catch(t){r={error:t}}finally{try{Q&&!Q.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}},e.prototype.findMathPrefixed=function(t,e){var r,n,o,Q,s=this.adaptor.root(this.adaptor.document);try{for(var a=i(this.adaptor.allAttributes(s)),l=a.next();!l.done;l=a.next()){var c=l.value;if("xmlns:"===c.name.substr(0,6)&&c.value===T){var u=c.name.substr(6);try{for(var p=(o=void 0,i(this.adaptor.tags(t,u+":math"))),h=p.next();!h.done;h=p.next()){var d=h.value;e.add(d)}}catch(t){o={error:t}}finally{try{h&&!h.done&&(Q=p.return)&&Q.call(p)}finally{if(o)throw o.error}}}}}catch(t){r={error:t}}finally{try{l&&!l.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}},e.prototype.findMathNS=function(t,e){var r,n;try{for(var o=i(this.adaptor.tags(t,"math",T)),Q=o.next();!Q.done;Q=o.next()){var s=Q.value;e.add(s)}}catch(t){r={error:t}}finally{try{Q&&!Q.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}},e.prototype.processMath=function(t){var e,r,n=[];try{for(var o=i(Array.from(t)),Q=o.next();!Q.done;Q=o.next()){var T=Q.value,s="block"===this.adaptor.getAttribute(T,"display")||"display"===this.adaptor.getAttribute(T,"mode"),a={node:T,n:0,delim:""},l={node:T,n:0,delim:""};n.push({math:this.adaptor.outerHTML(T),start:a,end:l,display:s})}}catch(t){e={error:t}}finally{try{Q&&!Q.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}return n},e.OPTIONS={},e}(Q.AbstractFindMath);e.FindMathML=


using NUnit.Framework;
using Unity.Mathematics;

namespace MaxMath.Tests
{
    unsafe public static class t_ulong3x3
    {
        private const int COLUMNS = 3;
        private const int ROWS = 3;

        [Test]
        public static void op_Increment()
        {
            Random64 rng = Random64.New;

            for (int i = 0; i < 16; i++)
            {
                ulong3x3 l = new ulong3x3(rng.NextULong3(), rng.NextULong3(), rng.NextULong3());
                ulong3x3 test = l;
                test++;

                for (int j = 0; j < COLUMNS; j++)
                {
                    Assert.AreEqual(test[j], l[j] + 1);
                }
            }
        }

        [Test]
        public static void op_Decrement()
        {
            Random64 rng = Random64.New;

            for (int i = 0; i < 16; i++)
            {
                ulong3x3 l = new ulong3x3(rng.NextULong3(), rng.NextULong3(), rng.NextULong3());
                ulong3x3 test = l;
                test--;

                for (int j = 0; j < COLUMNS; j++)
                {
                    Assert.AreEqual(test[j], l[j] - 1);
                }
            }
        }

        [Test]
        public static void op_Addition()
        {
            Random64 rng = Random64.New;

            for (int i = 0; i < 16; i++)
            {
                ulong3x3 l = new ulong3x3(rng.NextULong3(), rng.NextULong3(), rng.NextULong3());
                ulong3x3 r = new ulong3x3(rng.NextULong3(), rng.NextULong3(), rng.NextULong3());

                ulong3x3 test = l + r;

                for (int j = 0; j < COLUMNS; j++)
                {
                    Assert.AreEqual(test[j], l[j] + r[j]);
                }
            }
        }

        [Test]
        public static void op_Subtraction()
        {
            Random64 rng = Random64.New;

            for (int i = 0; i < 16; i++)
            {
                ulong3x3 l = new ulong3x3(rng.NextULong3(), rng.NextULong3(), rng.NextULong3());
                ulong3x3 r = new ulong3x3(rng.NextULong3(), rng.NextULong3(), rng.NextULong3());

                ulong3x3 test = l - r;

                for (int j = 0; j < COLUMNS; j++)
                {
                    Assert.AreEqual(test[j], l[j] - r[j]);
                }
            }
        }

        [Test]
        public static void op_Multiply()
        {
            Random64 rng = Random64.New;

            for (int i = 0; i < 16; i++)
            {
                ulong3x3 l = new ulong3x3(rng.NextULong3(), rng.NextULong3(), rng.NextULong3());
                ulong3x3 r = new ulong3x3(rng.NextULong3(), rng.NextULong3(), rng.NextULong3());

                ulong3x3 test = l * r;

                for (int j = 0; j < COLUMNS; j++)
                {
                    Assert.AreEqual(test[j], l[j] * r[j]);
                }
            }
        }

        [Test]
        public static void op_Multiply_ulong()
        {
            Random64 rng = Random64.New;

            for (int i = 0; i < 16; i++)
            {
                ulong3x3 l = new ulo


 ?: return

        if (rtpEventsEnabled && DYNAMIC_PT.contains(rtpPacketPayload.payloadType) && isRtpEvent(buffer)) {
            rtpPacketPayload.event = buffer.readInt()
        }

        val recording = recordingManager.record(packet)
        if (recording != null) {
            val p = packet.rejected ?: packet.clone()
            p.apply {
                protocolCode = ProtocolCodes.REC
                payload = recording
            }
            recordings.add(p)

            if (recordings.size >= bulkSize) {
                vertx.eventBus().localSend(RoutesCE.encoder, recordings.toList())
                recordings.clear()
            }

            rtpPacketPayload.recorded = true
        }

        if (collectorEnabled) {
            val index = rtpPacketPayload.ssrc % instances

            val packetsByIndex = packets.getOrPut(index) { mutableListOf() }
            packet.apply {
                payload = rtpPacketPayload
            }
            packetsByIndex.add(packet)

            if (packetsByIndex.size >= bulkSize) {
                vertx.eventBus().localSend(RoutesCE.rtp + "_$index", packetsByIndex.toList())
                packetsByIndex.clear()
            }
        }
    }

    private fun readRtpHeader(buffer: ByteBuf): RtpPacketPayload? {
        return RtpPacketPayload().apply {
            // Version & P & X & CC
            val flags = buffer.readByte()
            val x = (flags.and(16) == 16.toByte())
            val cc = flags.and(15)
            // Marker & Payload Type
            buffer.readUnsignedByte().let { byte ->
                marker = (byte.and(128) == 128.toShort())
                payloadType = byte.and(127).toByte()
            }
            // Sequence Number
            sequenceNumber = buffer.readUnsignedShort()
            // Timestamp
            timestamp = buffer.readUnsignedInt()
            // SSRC
            ssrc = buffer.readUnsignedInt()

            // Make sure the payload is RTP packet before parsing the rest of it
            if (ssrc <= 0 || payloadType < 0 || (payloadTypes.isNotEmpty() && !payloadTypes.contains(payloadType))) {
                return null
            }

            // CSRC
            if (cc > 0) buffer.skipBytes(cc * 4)
            // Header Extension
            if (x) {
                // Profile-Specific Identifier
                buffer.skipBytes(2)
                // Length
                val length = buffer.readUnsignedShort()
                // Extension Header
                buffer.skipBytes(4 * length)
            }
        }
    }

    private fun isRtpEvent(buffer: ByteBuf): Boolean {
        return (buffer.readableBytes() == 4)
                && (buffer.getInt(buffer.readerIndex()) shr 22) and 1 == 0
    }
}/*
 * Copyright 2018-2025 SIP3.IO, Corp.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package io.sip3.captain.ce.pipeline

import io.sip3.captain.ce.domain.Packet
import io.sip3.captain.ce.util.SipUtil
import io.sip3.commons.domain.payload.Encodable
import io.vertx.core.Vertx
import io.vertx.core.json.JsonObject

/**
 * Handles UDP packets
 */
class UdpHandler(vertx: Vertx, config: JsonObject, bulkOperationsEnabled: Boolean) : Handler(vertx, config, bulkOperationsEnabled


/*
 * Copyright (c) 2018-2025 Tencent. All Rights Reserved.
 *
 * 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.
 */

namespace TencentCloud.Vpc.V20170312.Models
{
    using Newtonsoft.Json;
    using System.Collections.Generic;
    using TencentCloud.Common;

    public class CreateAddressTemplateGroupResponse


بو_هشام" title="نقاش المستخدم:أبو هشام">«نقاش» 14:03، 9 مارس 2020 (ت ع م)

مقالة شبكة خاصة افتراضية تجاوزت مرحلة مراجعة الزملاء، وهي الآن في مرحلة التصويت لنيل وسم المقالة الجيدة في هذه الصفحة--MichelBakni (نقاش) 21:14، 9 مارس 2020 (ت ع م)

مقالة ألعاب الفيديو في العالم العربي تجاوزت مرحلة مراجعة الزملاء، وهي الآن في مرحلة التصويت لنيل وسم المقالة الجيدة في هذه الصفحة--MichelBakni (نقاش) 21:40، 9 مارس 2020 (ت ع م)

مرحبًا جميعًا، مقالة إيناس دو بورغوانغ من تطوير الزميل عادل فوزي، تخضع لمراجعة الزملاء لنيل وسم


ense::init(){
    // configure ADC variables
    if(initCallback != nullptr) initCallback();
    // calibrate zero offsets
    calibrateOffsets();
    // set the initialized flag
    initialized = (params!=SIMPLEFOC_CURRENT_SENSE_INIT_FAILED);
    // return success
    return 1;
}
// Function finding zero offsets of the ADC
void GenericCurrentSense::calibrateOffsets(){
    const int calibration_rounds = 1000;

    // find adc offset = zero current voltage
    offset_ia = 0;
    offset_ib = 0;
    offset_ic = 0;
    // read the adc voltage 1000 times ( arbitrary number )
    for (int i = 0; i < calibration_rounds; i++) {
        PhaseCurrent_s current = readCallback();
        offset_ia += current.a;
        offset_ib += current.b;
        offset_ic += current.c;
        _delay(1);
    }
    // calculate the mean offsets
    offset_ia = offset_ia / calibration_rounds;
    offset_ib = offset_ib / calibration_rounds;
    offset_ic = offset_ic / calibration_rounds;
}

// read all three phase currents (if possible 2 or 3)
PhaseCurrent_s GenericCurrentSense::getPhaseCurrents(){
    PhaseCurrent_s current = readCallback();
    current.a = (current.a - offset_ia); // amps
    current.b = (current.b - offset_ib); // amps
    current.c = (current.c - offset_ic); // amps
    return current;
}

// Function aligning the current sense with motor driver
// if all pins are connected well none of this is really necessary! - can be avoided
// returns flag
// 0 - fail
// 1 - success and nothing changed
// 2 - success but pins reconfigured
// 3 - success but gains inverted
// 4 - success but pins reconfigured and gains inverted
int GenericCurrentSense::driverAlign(float voltage){
    _UNUSED(voltage) ; // remove unused parameter warning
    int exit_flag = 1;
    if(skip_align) return exit_flag;

    if (!initialized) return 0;

    // // set phase A active and phases B and C down
    // driver->setPwm(voltage, 0, 0);
    // _delay(200);
    // PhaseCurrent_s c = getPhaseCurrents();
    // // read the current 100 times ( arbitrary number )
    // for (int i = 0; i < 100; i++) {
    //     PhaseCurrent_s c1 = getPhaseCurrents();
    //     c.a = c.a*0.6f + 0.4f*c1.a;
    //     c.b = c.b*0.6f + 0.4f*c1.b;
    //     c.c = c.c*0.6f + 0.4f*c1.c;
    //     _delay(3);
    // }
    // driver->setPwm(0, 0, 0);
    // // align phase A
    // float ab_ratio = fabs(c.a / c.b);
    // float ac_ratio = c.c ? fabs(c.a / c.c) : 0;
    // if( ab_ratio > 1.5f ){ // should be ~2
    //     gain_a *= _sign(c.a);
    // }else if( ab_ratio < 0.7f ){ // should be ~0.5
    //     // switch phase A and B
    //     int tmp_pinA = pinA;
    //     pinA = pinB;
    //     pinB = tmp_pinA;
    //     gain_a *= _sign(c.b);
    //     exit_flag = 2; // signal that pins have been switched
    // }else if(_isset(pinC) &&  ac_ratio < 0.7f ){ // should be ~0.5
    //     // switch phase A and C
    //


    'whoami; date -R; sleep 5s; date -R; uname -a',
            ],
            description: 'test instance that terminates rather quickly',
          );
          print('Created instance: ${instance.instanceName}, $instance');
        });

        // Wait until we have a terminated instance
        print('### Wait for instance to terminate on its own');
        while (!instances.any((i) => i.state == InstanceState.terminated)) {
          instances = await gce.listInstances().toList();
          print('listInstances():');
          for (final inst in instances) {
            print(' - ${inst.instanceName}, state: ${inst.state}');
          }
          await Future.delayed(Duration(seconds: 1));
        }
        // Delete instances
        print('### Delete all instances');
        for (final inst in instances) {
          await gce.delete(inst.zone, inst.instanceName);
        }

        // Wait until instances are deleted from listing
        print('### Wait for instance to disappear from listings');
        while (instances.isNotEmpty) {
          instances = await gce.listInstances().toList();
          print('listInstances():');
          for (final inst in instances) {
            print(' - ${inst.instanceName}, state: ${inst.state}');
          }
          await Future.delayed(Duration(seconds: 1));
        }
      });
    },
    timeout: Timeout.parse('30m'),
    skip:
        envConfig.googleCloudProject == null ||
            // Avoid running against production by accident
            envConfig.googleCloudProject == 'dartlang-pub'
        ? 'createGoogleCloudCompute testing requires GOOGLE_CLOUD_PROJECT'
        : false,
  );
}
// Copyright (c) 2022, the Dart project authors.  Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

@Tags(['load_test'])
library;

import 'dart:ffi';
import 'dart:io';
import 'dart:math';

import 'package:ffi/ffi.dart';
import 'package:jni/jni.dart';
import 'package:jni/src/third_party/generated_bindings.dart';
import 'package:test/test.dart';

import 'test_util/test_util.dart';

/// Taken from
/// https://github.com/dart-lang/ffigen/blob/master/test/native_objc_test/automated_ref_count_test.dart
final executeInternalCommand = DynamicLibrary.process().lookupFunction<
    Void Function(Pointer<Char>, Pointer<Void>),
    void Function(Pointer<Char>, Pointer<Void>)>('Dart_ExecuteInternalCommand');

void doGC() {
  final gcNow = 'gc-now'.toNativeUtf8();
  executeInternalCommand(gcNow.cast(), nullptr);
  calloc.free(gcNow);
}

void main() {
  if (!Platform.isAndroid) {
    checkDylibIsUpToDate();
    spawnJvm();
  }
  run(testRunner: test);
}

const k4 = 4 * 1024;
const k256 = 256 * 1024;

const secureRandomSeedBound = 4294967296;

final random = Random.secure();

final randomClass = JClass.forName('java/util/Random');
JObject newRandom() => randomClass
    .constructorId('(J)V')
    .call(randomClass, JObject.type, [random.nextInt(secureRandomSeedBound)]);

void run({required TestRunnerCallback testRunner}) {
  testRunner('Test 4K refs can be created in a row', () {
    final list = <JObject>[];
    for (var i = 0; i < k4; i++) {
      list.add(newRandom());
    }
    for (final jobject in list) {
      jobject.release();
    }
  });

  testRunner('Create and release 256K references in a loop using arena', () {
    for (var i = 0; i < k256; i++) {
      using((arena) {
        final random = new


to check a number of interfaces for a
-- non-existent writer. For this to work you need to set the nowriter_interfaces
-- member variable of the state to an array of interfaces to check.
-- @return true if any of the interfaces in the nowriter_interfaces table does not
-- have a writer, false if no interfaces given or all interfaces have a writer
function JumpState:jumpcond_nowriter()
    if self.nowriter_interfaces and type(self.nowriter_interfaces) == "table" then
        fo


radient(to bottom,#3c3c3c 0,#222 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3c3c3c', endColorstr='#ff222222', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-radius:4px}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.open>a{background-image:-webkit-linear-gradient(top,#080808 0,#0f0f0f 100%);background-image:-o-linear-gradient(top,#080808 0,#0f0f0f 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#080808),to(#0f0f0f));background-image:linear-gradient(to bottom,#080808 0,#0f0f0f 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff080808', endColorstr='#ff0f0f0f', GradientType=0);background-repeat:repeat-x;-webkit-box-shadow:inset 0 3px 9px rgba(0,0,0,.25);box-shadow:inset 0 3px 9px rgba(0,0,0,.25)}.navbar-inverse .navbar-brand,.navbar-inverse .navbar-nav>li>a{text-shadow:0 -1px 0 rgba(0,0,0,.25)}.navbar-fixed-bottom,.navbar-fixed-top,.navbar-static-top{border-radius:0}@media (max-width:767px){.navbar .navbar-nav .open .dropdown-menu>.active>a,.navbar .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar .navbar-nav .open .dropdown-menu>.active>a:hover{color:#fff;background-image:-webkit-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-o-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#2e6da4));background-image:linear-gradient(to bottom,#337ab7 0,#2e6da4 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);background-repeat:repeat-x}}.alert{text-shadow:0 1px 0 rgba(255,255,255,.2);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 2px rgba(0,0,0,.05)}.alert-success{background-image:-webkit-linear-gradient(top,#dff0d8 0,#c8e5bc 100%);background-image:-o-linear-gradient(top,#dff0d8 0,#c8e5bc 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#dff0d8),to(#c8e5bc));background-image:linear-gradient(to bottom,#dff0d8 0,#c8e5bc 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffc8e5bc', GradientType=0);background-repeat:repeat-x;border-color:#b2dba1}.alert-info{background-image:-webkit-linear-gradient(top,#d9edf7 0,#b9def0 100%);background-image:-o-linear-gradient(top,#d9edf7 0,#b9def0 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9edf7),to(#b9def0));background-image:linear-gradient(to bottom,#d9edf7 0,#b9def0 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='


-rotate-z: initial;
      --tw-skew-x: initial;
      --tw-skew-y: initial;
      --tw-border-style: solid;
      --tw-font-weight: initial;
      --tw-duration: initial;
      --tw-scale-x: 1;
      --tw-scale-y: 1;
      --tw-scale-z: 1;
      --tw-blur: initial;
      --tw-brightness: initial;
      --tw-contrast: initial;
      --tw-grayscale: initial;
      --tw-hue-rotate: initial;
      --tw-invert: initial;
      --tw-opacity: initial;
      --tw-saturate: initial;
      --tw-sepia: initial;
      --tw-drop-shadow: initial;
      --tw-drop-shadow-color: initial;
      --tw-drop-shadow-alpha: 100%;
      --tw-drop-shadow-size: initial;
    }
  }
}
/**
 * Copyright 2015 Google Inc. All Rights Reserved.
 *
 * 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 "material-design-lite";

$padding: 24px;

body {
  margin: 0px;
}

.styleguide-demo h1 {
  margin: ($padding * 2) $padding 0 $padding;
}

.styleguide-demo h1:after {
  content: '';

  display: block;
  width: 100%;

  border-bottom: 1px solid rgba(0,0,0,0.5);
  margin-top: $padding;
}

.styleguide-demo {
  opacity: 0;

  transition: opacity 0.6s ease;
}

.styleguide-masthead {
  height: 256px;
  background: unquote("rgb(#{nth($palette-grey, 10)})");
  padding: 115px 16px 0;
}

.styleguide-container {
  position: relative;
  max-width: 960px;
  width: 100%;
}

.styleguide-title {
  color: #fff;
  bottom: auto;
  position: relative;
  font-size: 56px;
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.02em;

  &:after {
    border-bottom: 0px;
  }

  span {
    font-weight: 300;
  }
}

.mdl-styleguide .mdl-layout__drawer .mdl-navigation__link {
  padding: 10px 24px;
}

.demosLoaded .styleguide-demo {
  opacity: 1;
}

iframe {
  display: block;

  width: 100%;

  border: none;
}

iframe.heightSet {
  overflow: hidden;
}

.demo-wrapper {
  margin: $padding;

  iframe {
    border: 1px solid rgba(0,0,0,0.5);
  }
}
/**
 * Copyright 2015 Google Inc. All Rights Reserved.
 *
 * 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.
 */

/* Material Design Lite */

// Variables and mixins
@import "variables";
@import "mixins";

// Resets and dependencies
@import "resets/resets";
@import "typography/typography";

// Components
@import "palette/palette";
@import "ripple/rip


n)
#else
	str	a3, [ip, #0]		@ environ = envp
#endif

#ifdef WANT_ELFINFO
	mov	r6, a3			@ work on a copy of a3 so that common
					@ 'main(argc, argv, envp)' function
					@ stays valid
1:	ldr	r5, [r6], #4		@ load *envp and increment it
	cmp	r5, #0			@ read value==0?
	bne	1b
#ifdef __DYN_LIB
	str	r6, [ip, sl]		@ __elfinfo = envp
#else
	str	r6, [ip, #4]		@ __elfinfo = envp
#endif
#endif

#ifdef PROFILING
	stmdb	sp!, { r0 - r3 }
	ldr	r0, .L5
	ldr	r1, .L6
	bl	monitor
	ldmia	sp!, { r0 - r3 }
#endif

	bl	CALL_IN_STARTCODE

@
@ The exit status from main() is already in r0.
@ We need to branch to 'exit' in case we have linked with 'atexit'.
@
	bl	exit
FUNC_END	_start

FUNC_START	_exit
FUNC_START_WEAK	exit
#ifdef PROFILING
	mov	r4, r0			@ save a copy of exit status
	bl	_stop_monitor
	mov	r0, r4
#endif
	swi	$__NR_exit		@ never returns.
FUNC_END	exit
FUNC_END	_exit

	.align	2
#ifdef __DYN_LIB
.L3:	.word 	environ(GOT)
.L4:	.word 	_GLOBAL_OFFSET_TABLE_-(1b+8)
#else
.L3:	.word 	environ
#endif

#ifdef PROFILING
.L5:	.word	.text
.L6:	.word	_etext
#endif

#endif

.section .ctors,"aw"
.global __CTOR_LIST__
__CTOR_LIST__:

.section .dtors,"aw"
.global __DTOR_LIST__
__DTOR_LIST__:

.section .eh_frame,"aw"
.global __EH_FRAME_BEGIN__
__EH_FRAME_BEGIN__:


, bits(8*size)) PhysMemRead(AddressDescriptor desc, integer size, AccessDescriptor accdesc)">PhysMemRead(memaddrdesc, halfsize, accdesc);
        if IsFault(memstatus) then
            HandleExternalReadAbort(memstatus, memaddrdesc, halfsize, accdesc);
        memaddrdesc.paddress.address = memaddrdesc.paddress.address + halfsize;
        (memstatus, highhalf) = PhysMemRead(memaddrdesc, halfsize, accdesc);
        if IsFault(memstatus) then
            HandleExternalReadAbort(memstatus, memaddrdesc, halfsize, accdesc);

        value = highhalf:lowhalf;
    else
        for i = 0 to size-1
            (memstatus, value<8*i+7:8*i>) = PhysMemRead(memaddrdesc, 1, accdesc);
            if IsFault(memstatus) then
                HandleExternalReadAbort(memstatus, memaddrdesc, 1, accdesc);
            memaddrdesc.paddress.address = memaddrdesc.paddress.address + 1;
    return value;

// AArch64.MemSingle[] - assignment (write) form
// =============================================

AArch64.MemSingle[bits(64) address, integer size,
                  <a href="shared_pseudocode.html#AccessDescriptor" title="type AccessDescriptor is ( AccessType acctype, bits(2) el, SecurityState ss, boolean acqsc, boolean acqpc, boolean relsc, boolean limitedordered, boolean exclusive, boolean atomicop, MemAtomicOp modop, boolean nontemporal, boolean read, boolean write, CacheOp cacheop, CacheOpScope opscope, CacheType cachetype, boolean pan, boolean transactional, boolean nonfault, boolean firstfault, boolean first, boolean contiguous, boolean streamingsve, boolean ls64, boolean mops, boolean rcw, boolean rcws, boolean toplevel, VARange varange, boolean a32lsmd, boolean tagchecked, boolean tagaccess, MPAMinfo mpam )">AccessDescriptor accdesc, boolean aligned] = bits(size*8) value
    boolean ispair = FALSE;
    AArch64.MemSingle[address, si


Names.includes("regex")
            ? flags[
                flagNames.lastIndexOf("r") < 0
                  ? flagNames.lastIndexOf("regex")
                  : flagNames.lastIndexOf("r")
              ].index
            : flagNames.includes("n") || flagNames.includes("name")
            ? flags[
                flagNames.lastIndexOf("n") < 0
                  ? flagNames.lastIndexOf("name")
                  : flagNames.lastIndexOf("n")
              ].index
            : 0),
        flagNames.includes("H") || flagNames.includes("hard")
          ? args.lastIndexOf(
              [...args].reverse().find((a) => a.startsWith("-"))!
            )
          : undefined
      )
      .filter((arg) => !/--?\w+/.test(arg))
      .join(" ") || "No reason specified";

  await Promise.all(
    members.map(async (m, i) => {
      try {
        if (!booleanFlags.has("-s"))
          try {
            const dm = await m.createDM(true);
            await (await client.users.fetch(m.id))?.createDM();
            await dm.send(
              `You have been kicked from **${
                message.guild?.name
              }** for \`${reason}\`${
                booleanFlags.has("-H")
                  ? `\n**${message.author.tag}**'s comment: ${args
                      .slice(
                        flags[
                          flagNames.indexOf("H") < 0
                            ? flagNames.indexOf("hard")
                            : flagNames.indexOf("H")
                        ].index + 1
                      )
                      .join(" ")}`
                  : ""
              }`.slice(0, 2000)
            );
          } catch (e) {
            console.log(e);
            await message.channel.send(
              `Could not send DM to **${m.user.tag}**`
            );
          }

        if (!booleanFlags.has("-d")) await m.kick(reason);

        if (booleanFlags.has("-S")) {
          await message.guild?.members.unban(m.user);
          client.commands
            .get("clear")!
            .run(client, message, ["100", "-u", m.id], lang);
        }
      } catch {
        members.splice(i, 1);
        if (!booleanFlags.has("-s"))
          await message.channel.send(`Could not kick **${m.user.tag}**`);
      }
    })
  );

  if (!members.length)
    return message.channel.send(`Could not find any users to kick`);

  if (booleanFlags.has("-s")) return;

  return message.channel.send(
    new Embed()
      .setTitle(
        `Kicked ${members.length} user${members.length !== 1 ? "s" : ""}`
      )
      .addField("Reason", `\`${reason}\``)
      .setDescription(
        `**Kicked users:**\n${members.map((m) => `${m.user.tag}`).join("\n")}`
      )
  );
};

export const name: string = "kick";
export const category: string = "Moderation";
export const usage: string = "!kick <user(s)> <Optional flags>.";
export const botPerms: string[] = ["KICK_MEMBERS", "MANAGE_CHANNEL"];
export const userPerms: string[] = ["KICK_MEMBERS"];
export const modCommand: boolean = true;
import { LoxtObject, TokenType } from './types/types';

class Token {
  type: TokenType;
  lexeme: string;
  literal: LoxtObject;
  line: number;

  constructor(type: TokenType, lexeme: string, literal:


ding tasks.
  pending_regathering_.reset(new ScopedTaskSafety());

  thread_->PostDelayedTask(
      ToQueuedTask(*pending_regathering_.get(),
                   [this]() {
                     RTC_DCHECK_RUN_ON(thread_);
                     // Only regather when the current session is in the CLEARED
                     // state (i.e., not running or stopped). It is only
                     // possible to enter this state when we gather continually,
                     // so there is an implicit check on continual gathering
                     // here.
                     if (allocator_session_ &&
                         allocator_session_->IsCleared()) {
                       allocator_session_->RegatherOnFailedNetworks();
                     }
                     ScheduleRecurringRegatheringOnFailedNetworks();
                   }),
      config_.regather_on_failed_networks_interval);
}

}  // namespace webrtc
/*
 *  Copyright 2016 The WebRTC Project Authors. All rights reserved.
 *
 *  Use of this source code is governed by a BSD-style license
 *  that can be found in the LICENSE file in the root of the source
 *  tree. An additional intellectual property rights grant can be found
 *  in the file PATENTS.  All contributing project authors may
 *  be found in the AUTHORS file in the root of the source tree.
 */

#include "p2p/base/tcp_port.h"

#include <list>
#include <memory>
#include <vector>

#include "p2p/base/basic_packet_socket_factory.h"
#include "p2p/base/p2p_constants.h"
#include "p2p/base/transport_description.h"
#include "rtc_base/gunit.h"
#include "rtc_base/helpers.h"
#include "rtc_base/ip_address.h"
#include "rtc_base/third_party/sigslot/sigslot.h"
#include "rtc_base/thread.h"
#include "rtc_base/time_utils.h"
#include "rtc_base/virtual_socket_server.h"
#include "test/gtest.h"

using cricket::Connection;
using cricket::ICE_PWD_LENGTH;
using cricket::ICE_UFRAG_LENGTH;
using cricket::Port;
using cricket::TCPPort;
using rtc::SocketAddress;

static int kTimeout = 1000;
static const SocketAddress kLocalAddr("11.11.11.11", 0);
static const SocketAddress kLocalIPv6Addr("2401:fa00:4:1000:be30:5bff:fee5:c3",
                                          0);
static const SocketAddress kAlternateLocalAddr("1.2.3.4", 0);
static const SocketAddress kRemoteAddr("22.22.22.22", 0);
static const SocketAddress kRemoteIPv6Addr("2401:fa00:4:1000:be30:5bff:fee5:c4",
                                           0);

class ConnectionObserver : public sigslot::has_slots<> {
 public:
  explicit ConnectionObserver(Connection* conn) {
    conn->SignalDestroyed.connect(this, &ConnectionObserver::OnDestroyed);
  }

  bool connection_destroyed() { return connection_destroyed_; }

 private:
  void OnDestroyed(Connection*) { connection_destroyed_ = true; }

  bool connection_destroyed_ = false;
};

class TCPPortTest : public ::testing::Test, public sigslot::has_slots<> {
 public:
  TCPPortTest()
      : ss_(new rtc::VirtualSocketServer()),
        main_(ss_.get()),
        socket_factory_(rtc::Thread::Current()),
        username_(rtc::CreateRandomString(ICE_UFRAG_LENGTH)),
        password_(rtc::CreateRandomString(ICE_PWD_LENGTH)) {}

  rtc::Network* MakeNetwork(const SocketAddress& addr) {
    networks_.emplace_back("unittest", "unittest", addr.ipaddr(), 32);
    networks_.back().AddIP(addr.ipaddr());
    return &networks_.back();
  }

  std::unique_ptr


ipsis then return elipsis:sub(1,sz) end
        if tail then
            local i = #self - sz + 1 + n_elipsis
            return elipsis .. self:sub(i)
        else
            return self:sub(1,sz-n_elipsis) .. elipsis
        end
    end
    return self
end

function stringx.import(dont_overload)
    utils.import(stringx,string)
end

return stringx


-fences .CodeMirror.cm-s-inner[lang=math]{border-radius:var(--v-r-t)var(--v-r-t-xc)0 0}.md-fences .CodeMirror.cm-s-inner:not([lang=math]){border-radius:var(--v-r-t)var(--v-r-t-xc)}.v-caption.codeblock[data-cap-count="2"] .md-fences .CodeMirror.cm-s-inner:not([lang=math]){border-radius:0}content>#write .md-diagram .CodeMirror.cm-s-inner{border-radius:var(--v-r-t)var(--v-r-t-xc)0 0}.CodeMirror .CodeMirror-cursor{border-left:2px solid var(--cm-CodeMirror-cursor)}.CodeMirror-gutters{border-width:0;border-right:1px solid var(--pn-c);height:100%!important}.CodeMirror-linenumber{color:var(--d-fc-a);font-family:var(--v-f-fm-num);min-width:fit-content!important}content>#write .CodeMirror-focused .CodeMirror-activeline-gutter>.CodeMirror-linenumber{color:var(--h-f);font-weight:var(--v-f-w-bd)}.cm-s-inner :is(.cm-variable,.cm-operator,.cm-property){color:var(--cm-variable)}.cm-s-inner .cm-variable-2{color:var(--cm-variable-2)}.cm-s-inner .cm-variable-3{color:var(--cm-variable-3)}.cm-s-inner .cm-keyword{color:var(--cm-keyword)}.cm-s-inner .cm-tag{color:var(--cm-tag)}.cm-s-inner .cm-attribute{color:var(--cm-attribute)}.cm-s-inner .cm-string{color:var(--cm-string)}.cm-s-inner .cm-string-2{color:var(--cm-string-2)}.cm-s-inner .cm-comment,.cm-s-inner.cm-comment{color:var(--cm-comment)}.cm-s-inner :is(.cm-header,.cm-def),.cm-s-inner.cm-header,.cm-s-inner.cm-def{color:var(--cm-header)}.cm-s-inner .cm-quote,.cm-s-inner.cm-quote{color:var(--cm-quote)}.cm-s-inner .cm-hr{color:var(--cm-hr)}.cm-s-inner .cm-link{color:var(--cm-link);border-bottom:1px solid var(--cm-link);text-decoration:none}.cm-s-inner .cm-negative{color:var(--cm-negative)}.cm-s-inner .cm-positive{color:var(--cm-positive)}.cm-s-inner :is(.cm-meta,.cm-qualifier){color:var(--cm-meta)}.cm-s-inner .cm-builtin{color:var(--cm-bulidin)}.cm-s-inner .cm-bracket{color:var(--cm-bracket)}.cm-s-inner .cm-atom,.cm-s-inner.cm-atom{color:var(--cm-atom)}.cm-s-inner .cm-number{color:var(--cm-number)}#write .md-fences{border-radius:var(--v-r-b)var(--v-r-b-xc);width:100%;margin:.5em 0 0;padding:0}#write .md-fences .CodeMirror-lines{background-image:var(--c-blk-bg);background-repeat:inherit;background-positi


c68k_ipls[MAC68K_IPL_NET] = (PSL_S | PSL_IPL2);
		mac68k_ipls[MAC68K_IPL_TTY] = (PSL_S | PSL_IPL1);
		mac68k_ipls[MAC68K_IPL_IMP] = (PSL_S | PSL_IPL2);
		mac68k_ipls[MAC68K_IPL_STATCLOCK] = (PSL_S | PSL_IPL2);
		mac68k_ipls[MAC68K_IPL_CLOCK] = (PSL_S | PSL_IPL2);
		mac68k_ipls[MAC68K_IPL_SCHED] = (PSL_S | PSL_IPL3);

		/* Non-standard interrupt priorities */
		mac68k_ipls[MAC68K_IPL_ADB] = (PSL_S | PSL_IPL1);
		mac68k_ipls[MAC68K_IPL_AUDIO] = (PSL_S | PSL_IPL2);

		if (current_mac_model->class == MACH_CLASSAV) {
			inames = AV_INAMES;
			mac68k_ipls[MAC68K_IPL_BIO] =
			    mac68k_ipls[MAC68K_IPL_NET] = (PSL_S | PSL_IPL4);
		}
	}

	memcpy(g_inames, inames, MAX_INAME_LENGTH);

	intr_computeipl();

	/* Initialize the VIAs */
	via_init();

	/* Initialize the PSC (if present) */
	psc_init();
}

/*
 * Compute the interrupt levels for the spl*()
 * calls.  This doesn't have to be fast.
 */
void
intr_computeipl()
{
	/*
	 * Enforce the following relationship, as defined in spl(9):
	 * `bio <= net <= tty <= imp <= statclock <= clock <= sched <= serial'
	 */
	if (mac68k_ipls[MAC68K_IPL_BIO] > mac68k_ipls[MAC68K_IPL_NET])
		mac68k_ipls[MAC68K_IPL_NET] = mac68k_ipls[MAC68K_IPL_BIO];

	if (mac68k_ipls[MAC68K_IPL_NET] > mac68k_ipls[MAC68K_IPL_TTY])
		mac68k_ipls[MAC68K_IPL_TTY] = mac68k_ipls[MAC68K_IPL_NET];

	if (mac68k_ipls[MAC68K_IPL_TTY] > mac68k_ipls[MAC68K_IPL_IMP])
		mac68k_ipls[MAC68K_IPL_IMP] = mac68k_ipls[MAC68K_IPL_TTY];

	if (mac68k_ipls[MAC68K_IPL_IMP] > mac68k_ipls[MAC68K_IPL_STATCLOCK])
		mac68k_ipls[MAC68K_IPL_STATCLOCK] = mac68k_ipls[MAC68K_IPL_IMP];

	if (mac68k_ipls[MAC68K_IPL_STATCLOCK] > mac68k_ipls[MAC68K_IPL_CLOCK])
		mac68k_ipls[MAC68K_IPL_CLOCK] =
		    mac68k_ipls[MAC68K_IPL_STATCLOCK];

	if (mac68k_ipls[MAC68K_IPL_CLOCK] > mac68k_ipls[MAC68K_IPL_SCHED])
		mac68k_ipls[MAC68K_IPL_SCHED] = mac68k_ipls[MAC68K_IPL_CLOCK];

	if (mac68k_ipls[MAC68K_IPL_SCHED] > mac68k_ipls[MAC68K_IPL_SERIAL])
		mac68k_ipls[MAC68K_IPL_SERIAL] = mac68k_ipls[MAC68K_IPL_SCHED];
}

/*
 * Establish an autovectored interrupt handler.
 * Called by driver attach functions.
 *
 * XXX Warning!  DO NOT use Macintosh ROM traps from an interrupt handler
 * established by this routine, either directly or indirectly, without
 * properly saving and restoring all registers.  If not, chaos _will_
 * ensue!  (sar 19980806)
 */
void
intr_establish(func, arg, ipl)
	int (*func) __P((void *));
	void *arg;
	int ipl;
{
	if ((ipl < 0) || (ipl >= NISR))
		panic("intr_establish: bad ipl %d", ipl);

#ifdef DIAGNOSTIC
	if (intr_func[ipl] != intr_noint)
		printf("intr_establish: attempt to share ipl %d\n", ipl);
#endif

	intr_func[ipl] = func;
	intr_arg[ipl] = arg;
}

/*
 * Disestablish an interrupt handler.
 */
void
intr_disestablish(ipl)
	int ipl;
{
	if ((ipl < 0) || (ipl >= NISR))
		panic("intr_disestablish: bad ipl %d", ipl);

	intr_func[ipl] = intr_noint;
	intr_arg[ipl] = (void *)ipl;
}

/*
 * This is the dispatcher called by the low-level
 * assembly language interrupt routine.
 *
 * XXX Note: see the warning in intr_establish()
 */
void
intr_dispatch(evec)
	int evec;		/* format | vector offset */
{
	int ipl, vec;

	vec = (evec & 0xfff) >> 2;
#ifdef DIAGNOSTIC
	if ((vec < ISRLOC) || (vec >= (ISRLOC + NISR)))
		panic("intr_dispatch: bad vec 0x%x", vec);
#endif
	ipl = vec - ISRLOC;

	intrcnt[ipl]++;
	uvmexp.intrs++;

	(void)(*intr_func[ipl])(intr_arg[ipl]);
}

/*
 * Default interrupt handler:  do nothing.
 */
static int
intr_noint(arg)
	void *arg;
{
#ifdef DEBUG
	if (intr_debug)
		printf("intr_noint: ipl %d\n", (int)arg);
#endif
	return 0;
}

void
netintr()
{
	int s, isr;

	for (;;) {
		s = splhigh();
		isr = netisr;
		netisr = 0;
		splx(s);

		if (isr == 0)
			return;

#define DONETISR(bit, fn) do {		\
	if (isr & (1 << bit))		\
		fn();			\
} while (0)

#include <net/netisr_dispatch.h>

#undef DONETISR
	}
}


from fastapi import APIRouter, Query
from pydantic import NonNegativeInt
from schemas.products import PRODUCTS_LIST
from services.apriori import AprioriService

class AprioriRouter:
    def __init__(self) -> None:
        self.apriori_service = AprioriService()
        self.router = APIRouter(
            prefix="/apriori",
            tags=["Apriori"],
        )
        self.router.add_api_route(
            path="",
            endpoint=self.run_apriori,
            methods=["Post"],
        )
        self.router.add_api_route(
            path="/products/all",
            endpoint=self.get_all_products,
            methods=["Get"],
        )

    async def run_apriori(
        self,
        arguments: list[str] = [],
        min_support: int = Query(ge=10, le=AprioriService.SETS_COUNT),
        offset: NonNegativeInt = 0,
        limit: int = Query(default=10, ge=10, le=50),
        min_confidence: float = 0.5,
    ):
        """Number of sets 9836"""
        return self.apriori_service.get_associations_apriori(
            min_support=min_support,
            min_confidence=min_confidence,
            limit=limit,
            offset=offset,
            arguments=arguments,
        )

    @staticmethod
    async def get_all_products() -> list[str]:
        return PRODUCTS_LIST


 dispatches to the :meth:`default_estimator` method which provides more details on what is happening.

        :param image_ind: An index specifying which image to process or ``None`` to indicate that all turned on images
                          should be processed.
        :param include_targets: A list of booleans specifying which targets in the scene should be processed or ``None``
                                to indicate that all targets in the scene should be processed
        """

        self.default_estimator('_moment_algorithm', [RelNavObservablesType.CENTER_FINDING], image_ind, include_targets)

    def constraint_matching_estimate(self, image_ind: Optional[int] = None, include_targets: Optional[List[bool]] = None):
        """
        This method loops applies the :mod:`.constraint_matching` technique to image/target pairs.

        This method does nothing to check if it makes sense to apply the constraint matching technique to each pair, it
        just attempts to and if something fails then the results are recorded appropriately.  If you are looking for
        something that will attempt to automatically choose the right technique to use for each image/target pair, see
        the :meth:`auto_estimate` method instead.

        The results from applying the :mod:`.constraint_matching` technique to each image/target pair are stored in the
        :attr:`constraint_matching_results` attribute.  If the :attr:`save_templates` is set to true, then this will also
        save the rendered templates the :attr:`saved_templates` attribute.  Finally, this will save fit information for
        each image/target pair to the :attr:`constraint_matching` attribute.

        This method dispatches to the :meth:`default_estimator` method which provides more details on what is happening.

        :param image_ind: An index specifying which image to process or ``None`` to indicate that all turned on images
                          should be processed.
        :param include_targets: A list of booleans specifying which targets in the scene should be processed or ``None``
                                to indicate that all targets in the scene should be processed
        """

        self.default_estimator('_constraint_matching', [RelNavObservablesType.CONSTRAINT], image_ind, include_targets)


 2
	jsr	multiply						; 6

	stx	FACTOR_I						; 3
	sta	FACTOR_F						; 3

	rts								; 6
								;===========
								;        60

;===========================
; Draw the Mode7 Background
;===========================

draw_background_mode7:

	; Only draw sky if necessary
	; (at start, or if we have switched to text, we never overwrite it)

	lda	DRAW_SKY						; 3
	beq	no_draw_sky						;^2nt/3
								;==============
								;	  6

.if .def(CHECKERBOARD_MAP)
	lda	#0
	sta	CV

	jsr	scroll_background

.else
	; Draw Sky
	; not performance critical as this happens rarely

	dec	DRAW_SKY	; usually 2 as we redraw both pages	; 5
	lda	#COLOR_BOTH_MEDIUMBLUE	; MEDIUMBLUE color		; 2
	sta	COLOR							; 3
	lda	#0							; 2
								;===========
								;	 11

sky_loop:				; draw line across screen
	ldy	#39			; from y=0 to y=6		; 2
	sty	V2							; 3
	ldy	#0							; 2
	pha								; 3
	jsr	hlin_double		; hlin y,V2 at A	; 63+(X*16)
	pla								; 4
	clc								; 2
	adc	#2							; 2
	cmp	#6							; 2
	bne	sky_loop						; 3/2nt
								;=============
								; (23+63+(X*16))*5
	; Draw Hazy Horizon

	lda	#COLOR_BOTH_GREY	; Horizon is Grey		; 2
	sta	COLOR							; 3
	lda	#6			; draw single line at 6/7	; 2
	ldy	#39							; 2
	sty	V2			; hlin	Y,V2 at A		; 3
	ldy	#0							; 2
	jsr	hlin_double		; hlin	0,40 at 6	; 63+(X*16)
								;===========
								; 63+(X*16)+14

.endif

no_draw_sky:

	; setup initial odd/even color mask
	lda	#$f0							; 2
	sta	COLOR_MASK						; 3

	; start Y at 8 (below horizon line)
	lda	#8							; 2
	sta	SCREEN_Y						; 3
								;=============
								;	 10

screeny_loop:
	and	#$fe		; be sure SCREEN_Y used later is even	; 2
	tay			; put in Y for lookup table later	; 2

	lda	COLOR_MASK	; flip mask for odd/even row plotting	; 3
	eor	#$ff							; 2
	sta	COLOR_MASK						; 3
	sta	mask_label+1	; setup self-modifying code		; 4

	eor	#$ff		; setup self-modifying branch later	; 2
	bmi	odd_branch	; beq is $f0 (too clever FIXME)		; 2nt/3
	lda	#$d0		; bne is $d0				; 2
odd_branch:
	sta	mask_branch_label	; actually update branch	; 4
								;============
								;	 27

setup_gr_addr:
	lda	gr_offsets,Y	; lookup low-res memory row address	; 4
	sta	GBASL		; store in GBASL zero-page pointer	; 3
	iny			; point to high part of address		; 2

	lda	gr_offsets,Y	; load high


if (_timestampHandler != null) {
var offset = 0;
final tvSecHi = ByteData.view(data.buffer).getUint32(offset, Endian.little);
offset += 4;
final tvSecLo = ByteData.view(data.buffer).getUint32(offset, Endian.little);
offset += 4;
final tvNsec = ByteData.view(data.buffer).getUint32(offset, Endian.little);
offset += 4;
var event = ZwpInputTimestampsV1TimestampEvent(
tvSecHi,
tvSecLo,
tvNsec,
        );
         _timestampHandler!(event);
       }
       break;
   }
 }
}

// Generated by dart-wayland-scanner
// https://github.com/your-repo/dart-wayland-scanner
// XML file : https://gitlab.freedesktop.org/wayland/wayland-protocols/-/raw/main/unstable/fullscreen-shell/fullscreen-shell-unstable-v1.xml
//
// fullscreen_shell_unstable_v1 Protocol Copyright:
///
/// Copyright © 2016 Yong Bakos
/// Copyright © 2015 Jason Ekstrand
/// Copyright © 2015 Jonas Ådahl
///
/// Permission is hereby granted, free of charge, to any person obtaining a
/// copy of this software and associated documentation files (the "Software"),
/// to deal in the Software without restriction, including without limitation
/// the rights to use, copy, modify, merge, publish, distribute, sublicense,
/// and/or sell copies of the Software, and to permit persons to whom the
/// Software is furnished to do so, subject to the following conditions:
///
/// The above copyright notice and this permission notice (including the next
/// paragraph) shall be included in all copies or substantial portions of the
/// Software.
///
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
/// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
/// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
/// DEALINGS IN THE SOFTWARE.
///

library client;

import 'package:wayland/wayland.dart';
import 'package:wayland/protocols/wayland.dart';
import 'dart:async';
import 'dart:convert';
import 'dart:typed_data';
import 'package:result_dart/result_dart.dart';

/// advertises a capability of the compositor
///
/// Advertises a single capability of the compositor.
///
/// When the wl_fullscreen_shell interface is bound, this event is emitted
/// once for each capability advertised.  Valid capabilities are given by
/// the wl_fullscreen_shell.capability enum.  If clients want to take
/// advantage of any of these capabilities, they should use a
/// wl_display.sync request immediately after binding to ensure that they
/// receive all the capability events.
///
class ZwpFullscreenShellV1CapabilityEvent {
///
  final int capability;

  ZwpFullscreenShellV1CapabilityEvent(
this.capability,

);

@override
toString(){
return "ZwpFullscreenShellV1CapabilityEvent (capability: $capability)";
}
}

typedef ZwpFullscreenShellV1CapabilityEventHandler = void Function(ZwpFullscreenShellV1CapabilityEvent);

/// displays a single surface per output
///
/// Displays a single surface per output.
///
/// This interface provides a mechanism for a single client to display
/// simple full-screen surfaces.  While there technically may be multiple
/// clients bound to this interface, only one of those clients should be
/// shown at a time.
///
/// To present a surface, the client uses either the present_surface or
/// present_surface_for_mode requests.  Presenting a surface takes effect
/// on the next wl_surface.commit.  See the individual requests for
/// details about scaling and mode switches.
///
/// The client can have at most one surface per output at any time.
/// Requesting a surface to be presented on an output that alre


l-900 left-1/2'
        responsiveSizeEl.style.zIndex = 9999;

        if(!document.getElementById(resizerElementId)){
            const responsiveSizeHTML = `

                        XS
                        SM
                        MD
                        LG
                        XL

                    ${currentWidth}px

                        <svg class="w-3 h-3" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12" /></svg>

                `;
            responsiveSizeEl.innerHTML = responsiveSizeHTML;
            document.body.appendChild(responsiveSizeEl);
            setTimeout(function(){
                document.getElementById('resizerElementCloseButton').addEventListener('click', function(event){
                    breakPointToolRemoveResizerElement();
                });
                responsiveSizeEl.classList.remove('-translate-y-full');
                responsiveSizeEl.classList.add('mt-3');
            }, 1);
        }

        document.getElementById('currentWidth').innerText = currentWidth;

        clearInterval(removeElementInterval);
        removeElementInterval = setInterval(function(){
            breakPointToolRemoveResizerElement();
        }, removeElementDelay);

    });
});'use strict';

/**
 * A connection handler for Amazon ES.
 *
 * Uses the aws-sdk to make signed requests to an Amazon ES endpoint.
 *
 * @param client {Client} - The Client that this class belongs to
 * @param config {Object} - Configuration options
 * @param [config.protocol=http:] {String} - The HTTP protocol that this connection will use, can be set to https:
 * @class HttpConnector
 */

const AWS = require('aws-sdk');
const HttpConnector = require('elasticsearch/src/lib/connectors/http');
const HttpClient = require('./src/node');

class HttpAmazonESConnector extends HttpConnector {
  constructor(host, config) {
    super(host, config);

    const protocol = host.protocol;
    const port = host.port;
    const endpoint = new AWS.Endpoint(host.host);

    if (protocol) endpoint.protocol = protocol.replace(/:?$/, ":");
    if (port) endpoint.port = port;

    this.awsConfig = config.awsConfig || AWS.config;
    this.endpoint = endpoint;
    this.httpOptions = config.httpOptions || this.awsConfig.httpOptions;
    this.httpClient = new HttpClient();
  }

  request(params, cb) {
    const reqParams = this.makeReqParams(params);

    let req;
    let cancelled;

    const cancel = () => {
      cancelled = true;
      req && req.abort();
    };

    const done = (err, response, status, headers) => {
      this.log.trace(params.method, reqParams, params.body, response, status);
      cb(err, response, status, headers);
    };

    // load creds
    this.getAWSCredentials()


_, sq, _): (usize, &'input str, usize),
) -> WordPtr
{
    {
        WordPtr::new (Word::Quotes(sq[1..sq.len()-1].to_string()))
    }
}

#[allow(unused_variables)]
fn __action36<
    'input,
>(
    input: &'input str,
    (_, e, _): (usize, WordPtr, usize),
) -> WordPtr
{
    e
}

#[allow(unused_variables)]
fn __action37<
    'input,
>(
    input: &'input str,
    (_, _, _): (usize, &'input str, usize),
    (_, w, _): (usize, &'input str, usize),
) -> WordPtr
{
    {
        WordPtr::new (Word::Expand (w.to_string()))
    }
}

#[allow(unused_variables)]
fn __action38<
    'input,
>(
    input: &'input str,
    (_, _, _): (usize, &'input str, usize),
    (_, _, _): (usize, &'input str, usize),
    (_, w, _): (usize, &'input str, usize),
    (_, _, _): (usize, &'input str, usize),
) -> WordPtr
{
    {
        WordPtr::new (Word::Expand (w.to_string()))
    }
}

#[allow(unused_variables)]
fn __action39<
    'input,
>(
    input: &'input str,
    (_, _, _): (usize, &'input str, usize),
    (_, _, _): (usize, &'input str, usize),
    (_, s, _): (usize, CommandPtr, usize),
    (_, _, _): (usize, &'input str, usize),
) -> WordPtr
{
    {
        WordPtr::new (Word::Execute (s))
    }
}

pub trait __ToTriple<'input, > {
    fn to_triple(value: Self) -> Result<(usize,Token<'input>,usize), __lalrpop_util::ParseError<usize, Token<'input>, &'static str>>;
}

impl<'input, > __ToTriple<'input, > for (usize, Token<'input>, usize) {
    fn to_triple(value: Self) -> Result<(usize,Token<'input>,usize), __lalrpop_util::ParseError<usize, Token<'input>, &'static str>> {
        Ok(value)
    }
}
impl<'input, > __ToTriple<'input, > for Result<(usize, Token<'input>, usize), &'static str> {
    fn to_triple(value: Self) -> Result<(usize,Token<'input>,usize), __lalrpop_util::ParseError<usize, Token<'input>, &'static str>> {
        match value {
            Ok(v) => Ok(v),
            Err(error) => Err(__lalrpop_util::ParseError::User { error }),
        }
    }
}
<filename>gstreamer-pbutils/src/encoding_profile.rs
// Copyright (C) 2018 <NAME> <<EMAIL>>
//                    <NAME> <<EMAIL>>
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.

use glib;
use gst;
use gst_pbutils_sys;
use gst_sys;

use std::error;
use std::fmt;

use glib::object::IsA;
use glib::translate::*;

use auto::EncodingAudioProfile;
use auto::EncodingContainerProfile;
use auto::EncodingProfile;
use auto::EncodingVideoProfile;

trait EncodingProfileBuilderCommon {
    fn set_allow_dynamic_output(&self, allow_dynamic_output: bool);

    fn set_description(&self, description


 os.OpenFile(newFilePath, os.O_RDWR|os.O_CREATE|os.O_TRUNC, info.Mode())
		if err != nil {
			log.Errorf("Unzip File Error : " + err.Error())
			debug.PrintStack()
			continue
		}

		// 拷贝该文件到新文件中
		if _, err := io.Copy(newFile, srcFile); err != nil {
			debug.PrintStack()
			return err
		}

		// 关闭该文件
		if err := srcFile.Close(); err != nil {
			debug.PrintStack()
			return err
		}

		// 关闭新文件
		if err := newFile.Close(); err != nil {
			debug.PrintStack()
			return err
		}
	}
	return nil
}

// Compress 压缩文件
// files 文件数组，可以是不同dir下的文件或者文件夹
// dest 压缩文件存放地址
func Compress(files []*os.File, dest string) error {
	d, _ := os.Create(dest)
	defer Close(d)
	w := zip.NewWriter(d)
	defer Close(w)
	for _, file := range files {
		if err := _Compress(file, "", w); err != nil {
			return err
		}
	}
	return nil
}

func _Compress(file *os.File, prefix string, zw *zip.Writer) error {
	info, err := file.Stat()
	if err != nil {
		debug.PrintStack()
		return err
	}
	if info.IsDir() {
		prefix = prefix + "/" + info.Name()
		fileInfos, err := file.Readdir(-1)
		if err != nil {
			debug.PrintStack()
			return err
		}
		for _, fi := range fileInfos {
			f, err := os.Open(file.Name() + "/" + fi.Name())
			if err != nil {
				debug.PrintStack()
				return err
			}
			err = _Compress(f, prefix, zw)
			if err != nil {
				debug.PrintStack()
				return err
			}
		}
	} else {
		header, err := zip.FileInfoHeader(info)
		if err != nil {
			debug.PrintStack()
			return err
		}
		header.Name = prefix + "/" + header.Name
		writer, err := zw.CreateHeader(header)
		if err != nil {
			debug.PrintStack()
			return err
		}
		_, err = io.Copy(writer, file)
		Close(file)
		if err != nil {
			debug.PrintStack()
			return err
		}
	}
	return nil
}

func TrimFileData(data []byte) (res []byte) {
	if string(data) == constants.EmptyFileData {
		return res
	}
	return data
}

func ZipDirectory(dir, zipfile string) error {
	zipFile, err := os.Create(zipfile)
	if err != nil {
		return err
	}
	defer zipFile.Close()

	zipWriter := zip.NewWriter(zipFile)
	defer zipWriter.Close()

	baseDir := filepath.Dir(dir)

	err = filepath.Walk(dir, func(path string, info os.FileInfo, err error) error {
		if err != nil {
			return err
		}

		if info.IsDir() {
			return nil
		}

		relPath, err := filepath.Rel(baseDir, path)
		if err != nil {
			return err
		}

		zipFile, err := zipWriter.Create(relPath)
		if err != nil {
			return err
		}

		file, err := os.Open(path)
		if err != nil {
			return err
		}
		defer file.Close()

		_, err = io.Copy(zipFile, file)
		if err != nil {
			return err
		}

		return nil


l">

进度：[[${json[progress]}]]%

												[[${json[content]}]]

												[[(#{delete})]]

												[[${#dates.format(json[addDate], 'yyyy-MM-dd HH:mm:ss')}]]

													<textarea name="myReplyTextareaContent" th:id="'get' + ${json[id]}" class="myTextarea"></textarea>

															 [(#{needHidden})]
															<input type="hidden" th:id="'isSecret' + ${json[id]}" th:name="'isSecret' + ${json[id]}" value="0"/>

													<input type="hidden" th:id="'myActionId' + ${json[id]}" th:name="'myActionId' + ${json[id]}" value=""/>
													<input type="hidden" th:id="'discussId' + ${json[id]}" th:name="'discussId' + ${json[id]}" th:value="${json[id]}"/>
													<input type="hidden" th:id="'flow_id' + ${json[id]}" th:name="'flow_id' + ${json[id]}" th:value="${json[flowId]}"/>
													<input type="hidden" th:id="'action_id' + ${json[id]}" th:name="'action_id' + ${json[id]}" th:value="${json[actionId]}"/>
													<input type="hidden" th:id="'user_name' + ${json[id]}" th:name="'user_name' + ${json[id]}" th:value="${myUserName}"/>
													<input type="hidden" th:id="'userRealName' + ${json[id]}" th:name="'userRealName' + ${json[id]}" th:value="${myRealName}"/>
													<input type="hidden" th:id="'reply_name' + ${json[id]}" th:name="'reply_name' + ${json[id]}" th:value="${json[userName]}"/>
													<input type="hidden" th:id="'parent_id' + ${json[id]}" th:name="'parent_id' + ${json[id]}" th:value="${json[id]}"/>
													<input class="mybtn" type="button" th:value="#{sure}" th:onclick="submitPostscript('[(${json[id]})]','[(${json[id]})]')"/>

													[[${jo[realName]}]]
													 回复 [[${jo[replyRealName]}]] :

												<


888.96h752.928c62.496 0 113.088-50.592 113.088-112.096V268.96c0-61.504-50.592-112.096-113.088-112.096zM646.912 380.064h156.736c12.896 0 23.808 16.864 23.808 29.76s-11.904 29.76-23.808 29.76H646.912c-12.896 0-23.808-16.864-23.808-29.76s11.904-29.76 23.808-29.76z m0 125.984h156.736c12.896 0 23.808 16.864 23.808 29.76s-11.904 29.76-23.808 29.76H646.912c-12.896 0-23.808-16.864-23.808-29.76s11.904-29.76 23.808-29.76zM137.024 723.296c-11.904-1.984-19.84-13.888-17.856-26.784C134.048 621.12 190.592 562.592 262.016 541.76c-36.704-19.84-62.496-58.528-62.496-103.168 0-65.472 52.576-118.048 118.048-118.048 64.48 0 118.048 52.576 118.048 118.048 0 44.64-25.792 83.328-62.496 103.168 71.424 20.832 127.968 79.36 142.848 155.744 1.984 11.904-5.952 23.808-17.856 25.792h-3.968M879.04 689.568H646.912c-12.896 0-23.808-16.864-23.808-29.76s11.904-29.76 23.808-29.76H879.04c12.896 0 23.808 16.864 23.808 29.76s-11.904 29.76-23.808 29.76z m0 0" fill="" ></path></symbol><symbol id="iconxiangji" viewBox="0 0 1024 1024"><path d="M512.2 373.7c-102.8 0-186.1 83.3-186.1 186.1s83.3 186.1 186.1 186.1 186.1-83.3 186.1-186.1S615 373.7 512.2 373.7z m0 0"  ></path><path d="M958.2 234.2H763.7c-10.3-31.7-45.6-126.6-97.2-126.6H357.9c-47.8 0-86.5 94.9-98.2 126.6H66.3c-36.5 0-66.1 31.3-66.1 70v542.1c0 38.6 29.6 70 66.1 70h891.9c36.5 0 66.1-31.3 66.1-70V304.1c-0.1-38.6-29.6-69.9-66.1-69.9zM512.1 792.6c-128.4 0-232.6-104.2-232.6-232.6 0-128.5 104.1-232.6 232.6-232.6 128.4 0 232.6 104.2 232.6 232.6 0 128.5-104.2 232.6-232.6 232.6z m333.5-418.8c-21.4 0-38.7-17.4-38.7-38.8 0-21.5 17.3-38.8 38.7-38.8 21.4 0 38.7 17.4 38.7 38.8s-17.3 38.8-38.7 38.8z m0 0"  ></path><path d="M227.2 173.8c0 13.9-11.2 25.1-25.1 25.1H85.3c-13.9 0-25.1-11.2-25.1-25.1 0-13.


ra_of_conagusuri_02%E5%B0%81%E9%9D%A2.png 2x" data-file-width="600" data-file-height="600">

	レゾナンス・メッセージ

Era of conagusuri 02 （2012-05-27）

- 歌词语言：日文

言葉を真似て賢くなれると思っていたの

何にも知らずいること気にする年頃なのと

どうして君はおんなじ言葉を繰り返したの？

問い掛けそれも真似っこ　何だか笑えてくるね

大きな声だと気持ちがいいからついつい言っちゃう

<


      SomeVector = RandomVector(),
                SomeQuaternion = RandomQuaternion()
            };

            entityComponentAccessor.AddComponents(entity, component1, component2);
        }

        public string RandomString()
        {
            var length = _random.Next(2, 24);
            var randomness = Enumerable
                .Repeat(Chars, length)
                .Select(s => s[_random.Next(s.Length)])
                .ToArray();

            return new string(randomness);
        }

        public Vector3 RandomVector()
        {
            return new Vector3(
                (float)_random.NextDouble(),
                (float)_random.NextDouble(),
                (float)_random.NextDouble());
        }

        public Quaternion RandomQuaternion()
        { return new Quaternion(RandomVector(), (float)_random.NextDouble()); }
    }
}


 field, obj)
		default:
			panic("unknown field " + strconv.Quote(field.Name))
		}
	}
	out.Dispatch(ctx)
	if out.Invalids > 0 {
		return graphql.Null
	}

	atomic.AddInt32(&ec.deferred, int32(len(deferred)))

	for label, dfs := range deferred {
		ec.processDeferredGroup(graphql.DeferredGroup{
			Label:    label,
			Path:     graphql.GetPath(ctx),
			FieldSet: dfs,
			Context:  ctx,
		})
	}

	return out
}

var k8s__io___api___core___v1__PersistentVolumeClaimConditionImplementors = []string{"K8s__io___api___core___v1__PersistentVolumeClaimCondition"}

func (ec *executionContext) _K8s__io___api___core___v1__PersistentVolumeClaimCondition(ctx context.Context, sel ast.SelectionSet, obj *model.K8sIoAPICoreV1PersistentVolumeClaimCondition) graphql.Marshaler {
	fields := graphql.CollectFields(ec.OperationContext, sel, k8s__io___api___core___v1__PersistentVolumeClaimConditionImplementors)

	out := graphql.NewFieldSet(fields)
	deferred := make(map[string]*graphql.FieldSet)
	for i, field := range fields {
		switch field.Name {
		case "__typename":
			out.Values[i] = graphql.MarshalString("K8s__io___api___core___v1__PersistentVolumeClaimCondition")
		case "lastProbeTime":
			out.Values[i] = ec._K8s__io___api___core___v1__PersistentVolumeClaimCondition_lastProbeTime(ctx, field, obj)
		case "lastTransitionTime":
			out.Values[i] = ec._K8s__io___api___core___v1__PersistentVolumeClaimCondition_lastTransitionTime(ctx, field, obj)
		case "message":
			out.Values[i] = ec._K8s__io___api___core___v1__PersistentVolumeClaimCondition_message(ctx, field, obj)
		case "reason":
			out.Values[i] = ec._K8s__io___api___core___v1__PersistentVolumeClaimCondition_reason(ctx, field, obj)
		case "status":
			out.Values[i] = ec._K8s__io___api___core___v1__PersistentVolumeClaimCondition_status(ctx, field, obj)
			if out.Values[i] == graphql.Null {
				out.Invalids++
			}
		case "type":
			out.Values[i] = ec._K8s__io___api___core___v1__PersistentVolumeClaimCondition_type(ctx, field, obj)
			if out.Values[i] == graphql.Null {
				out.Invalids++
			}
		default:
			panic("unknown field " + strconv.Quote(field.Name))
		}
	}
	out.Dispatch(ctx)
	if out.Invalids > 0 {
		return graphql.Null
	}

	atomic.AddInt32(&ec.deferred, int32(len(deferred)))

	for label, dfs := range deferred {
		ec.processDeferredGroup(graphql.DeferredGroup{
			Label:    label,
			Path:     graphql.GetPath(ctx),
			FieldSet: dfs,
			Context:  ctx,
		})
	}

	return out
}

var k8s__io___api___core___v1__PersistentVolumeClaimSpecImplementors = []string{"K8s__io___api___core___v1__PersistentVolumeClaimSpec"}

func (ec *executionContext) _K8s__io___api___core___v1__PersistentVolumeClaimSpec(ctx context.Context, sel ast.SelectionSet, obj *model.K8sIoAPICoreV1PersistentVolumeClaimSpec) graphql.Marshaler {
	fields := graphql.


olor: var(--gray);
    max-width: 55em;
    padding: 0 var(--double-baseline) var(--baseline);

    & a {
        text-decoration: underline;
    }
}

@media (--almost-collapse) {
    .article__footer {
        padding: 0 var(--baseline) var(--baseline);
    }
}
.markup > *:not(pre) {
    @apply break-words;
}

.markup > *:not(:last-child) {
    @apply mb-6;
}

.link,
.markup :not(.no-markup) a:not(.permalink) {
    @apply text-blue-700 underline;
}

.markup .permalink {
    @apply inline-block ml-1 text-gray-400;
}

.markup h1 {
    @apply text-3xl font-extrabold leading-tight;
}

.markup h2 {
    @apply text-2xl font-bold leading-tight mt-12;
}

.h3,
.markup h3 {
    @apply font-semibold leading-tight mt-12;
}

.markup ul,
.markup ol {
    list-style-position: inside;
}

.markup ul {
    list-style-type: disc;
}

.markup ol {
    list-style-type: decimal;
}

.markup img {
    @apply block;
}

.markup blockquote {
    @apply -mx-4 p-4 bg-indigo-100 relative;
    font-size: 0.925em;
}

@screen sm {
    .markup blockquote {
        @apply mx-0 p-6 border-b-5 border-indigo-200;
    }
}

@screen md {
    .markup blockquote {
        @apply p-8;
    }
}

.markup blockquote:after {
    position: absolute;
    left: -12px;
    top: -50px;
    content: '“';
    font-size: 100px;
}

.markup code {
    @apply font-mono;
}

.markup :not(pre) > code {
    @apply p-1 bg-gray-100 border-b-2 border-gray-200;
    font-size: 0.8em;
}

.markup pre {
    @apply -mx-4 p-4 bg-gray-100 overflow-x-auto;
    font-size: 0.75em;
    line-height: 2.25;
}

@screen sm {
    .markup pre {
        @apply mx-0 p-6 border-b-5 border-gray-200 bg-gray-100 !important;
    }
}

@screen md {
    .markup pre {
        @apply p-8;
    }
}

.markup iframe {
    @apply w-full;
}
/*
    Light & dark colors in one class
*/

.\~text-gray-500 {
    @apply text-gray-500;
    @apply dark:text-gray-400;
}

.\~text-violet-500 {
    @apply text-violet-500;
    @apply dark:text-violet-400;
}

.\~text-gray-600 {
    @apply text-gray-600;
    @apply dark:text-gray-300;
}

.\~text-indigo-600 {
    @apply text-indigo-600;
    @apply dark:text-indigo-400;
}

.hover\:\~text-indigo-600 {
    @apply hover:text-indigo-600;
    @apply hover:dark:text-indigo-400;
}

.\~text-blue-600 {
    @apply text-blue-600;
    @apply dark:text-blue-400;
}

.\~text-violet-600 {
    @apply text-violet-600;
    @apply dark:text-violet-400;
}

.hover\:\~text-violet-600 {
    @apply hover:text-violet-600;
    @apply hover:dark:text-violet-300;
}

.\~text-emerald-600 {
    @apply


 to summons if you don't know whether you will lose a usage or not
            if (ReadyIn(AID.Aethercharge) <= GCD && Player.InCombat)
            {
                if (!Unlocked(AID.DreadwyrmTrance) || DowntimeIn > GCD + 15)
                    // scarlet flame and wyrmwave are both single target, this is ok
                    PushGCD(BestAethercharge, primaryTarget);
            }

            if (TranceFlags.HasFlag(SmnFlags.Topaz))
                PushGCD(AID.SummonTopaz, Unlocked(TraitID.TopazSummoningMastery) ? BestAOETarget : primaryTarget);

            if (TranceFlags.HasFlag(SmnFlags.Emerald))
                PushGCD(AID.SummonEmerald, Unlocked(TraitID.EmeraldSummoningMastery) ? BestAOETarget : primaryTarget);

            if (TranceFlags.HasFlag(SmnFlags.Ruby))
                PushGCD(AID.SummonRuby, Unlocked(TraitID.RubySummoningMastery) ? BestAOETarget : primaryTarget);
        }

        if (FurtherRuin > GCD && SummonLeft == 0)
            PushGCD(AID.Ruin4, BestAOETarget);

        if (NumAOETargets > 2)
            PushGCD(BestOutburst, BestAOETarget);

        PushGCD(BestRuin, primaryTarget);

    }

    private void OGCDs(StrategyValues strategy, Enemy? primaryTarget)
    {
        if (!Player.InCombat || primaryTarget == null)
            return;

        if (Favor == Favor.Titan)
            PushOGCD(AID.MountainBuster, BestAOETarget);

        // don't overwrite other player's searing light in roulettes lol i guess
        if (ShouldBuff(strategy))
            PushOGCD(AID.SearingLight, Player);

        switch (Trance)
        {
            case Trance.Dreadwyrm:
                PushOGCD(AID.EnkindleBahamut, BestAOETarget);
                PushOGCD(AID.Deathflare, BestAOETarget);
                break;

            case Trance.Lightwyrm:
                PushOGCD(AID.EnkindleSolarBahamut, BestAOETarget);
                PushOGCD(AID.Sunflare, BestAOETarget);
                break;

            case Trance.Phoenix:
                PushOGCD(AID.EnkindlePhoenix, BestAOETarget);

                if (CanWeave(AID.Rekindle))
                {
                    static float HPRatio(Actor a) => (float)a.HPMP.CurHP / a.HPMP.MaxHP;

                    var rekindleTarget = World.Party.WithoutSlot(excludeAlliance: true).Where(x => HPRatio(x) < 1).MinBy(HPRatio);
                    if (rekindleTarget is Actor a)
                        PushOGCD(AID.Rekindle, a);

                    if (SummonLeft < 2)
                        PushOGCD(AID.Rekindle, Player);
                }
                break;
        }

        if (Aetherflow > 0)
        {
            // have to separate these because they don't share a cdgroup, meaning you can accidentally do painflare and fester in one window when 2 festers in 2 windows is optimal
            if (Unlocked(AID.Painflare) && NumAOETargets > 2)
                PushOGCD(AID.Painflare, BestAOETarget);
            else
                PushOGCD(AID.Fester, primaryTarget);
        }

        if (NumAOETargets > 2)
            PushOGCD(AID.EnergySiphon, BestAOETarget);

        PushOGCD(AID.EnergyDrain, primaryTarget);

        if (SearingFlash > 0)
            PushOGCD(AID.SearingFlash, BestAOETarget);

        if (MP <= Player.HPMP.MaxMP * 0.7f)
            PushOGCD(AID.LucidDreaming, Player);

        if (RefulgentLux is > 0 and < 2.5f)
            PushOGCD(AID.LuxSolaris, Player


) const;

    int* p;
};

struct CV_EXPORTS MatStep
{
    MatStep();
    explicit MatStep(size_t s);
    const size_t& operator[](int i) const;
    size_t& operator[](int i);
    operator size_t() const;
    MatStep& operator = (size_t s);

    size_t* p;
    size_t buf[2];
protected:
    MatStep& operator = (const MatStep&);
};

/** @example samples/cpp/cout_mat.cpp
An example demonstrating the serial out capabilities of cv::Mat
*/

 /** @brief n-dimensional dense array class \anchor CVMat_Details

The class Mat represents an n-dimensional dense numerical single-channel or multi-channel array. It
can be used to store real or complex-valued vectors and matrices, grayscale or color images, voxel
volumes, vector fields, point clouds, tensors, histograms (though, very high-dimensional histograms
may be better stored in a SparseMat ). The data layout of the array `M` is defined by the array
`M.step[]`, so that the address of element \f$(i_0,...,i_{M.dims-1})\f$, where \f$0\leq i_k<M.size[k]\f$, is
computed as:
\f[addr(M_{i_0,...,i_{M.dims-1}}) = M.data + M.step[0]*i_0 + M.step[1]*i_1 + ... + M.step[M.dims-1]*i_{M.dims-1}\f]
In case of a 2-dimensional array, the above formula is reduced to:
\f[addr(M_{i,j}) = M.data + M.step[0]*i + M.step[1]*j\f]
Note that `M.step[i] >= M.step[i+1]` (in fact, `M.step[i] >= M.step[i+1]*M.size[i+1]` ). This means
that 2-dimensional matrices are stored row-by-row, 3-dimensional matrices are stored plane-by-plane,
and so on. M.step[M.dims-1] is minimal and always equal to the element size M.elemSize() .

So, the data layout in Mat is fully compatible with CvMat, IplImage, and CvMatND types from OpenCV
1.x. It is also compatible with the majority of dense array types from the standard toolkits and
SDKs, such as Numpy (ndarray), Win32 (independent device bitmaps), and others, that is, with any
array that uses *steps* (or *strides*) to compute the position of a pixel. Due to this
compatibility, it is possible to make a Mat header for user-allocated data and process it in-place
using OpenCV functions.

There are many different ways to create a Mat object. The most popular options are listed below:

- Use the create(nrows, ncols, type) method or the similar Mat(nrows, ncols, type[, fillValue])
constructor. A new array of the specified size and type is allocated. type has the same meaning as
in the cvCreateMat method. For example, CV_8UC1 means a 8-bit single-channel array, CV_32FC2
means a 2-channel (complex) floating-point array, and so on.
@code
    // make a 7x7 complex matrix filled with 1+3j.
    Mat M(7,7,CV_32FC2,Scalar(1,3));
    // and now turn M to a 100x60 15-channel 8-bit matrix.
    // The old content will be deallocated
    M.create(100,60,CV_8UC(15));
@endcode
As noted in the introduction to this chapter, create() allocates only a new array when the shape
or type of the current array are different from the specified ones.

- Create a multi-dimensional array:
@code
    // create a 100x100x100 8-bit array
    int sz[] = {100, 100, 100};
    Mat bigCube(3, sz, CV_8U, Scalar::all(0));
@endcode
It passes the number of dimensions =1 to the Mat constructor but the created array will be
2-d


-text-inherit).atk-label,
.atk-table td.atk-swatch-blue:not(.atk-text-inherit),
.atk-table th.atk-swatch-blue:not(.atk-text-inherit),
.atk-table.atk-table-zebra tr.atk-swatch-blue:not(.atk-text-inherit) > td,
.atk-table.atk-table-zebra tbody > tr > td.atk-swatch-blue:not(.atk-text-inherit),
.atk-swatch-blue:not(.atk-text-inherit) > .atk-popover-arrow:before,
.atk-swatch-blue:not(.atk-text-inherit).atk-popover-arrow:before {
  color: white;
}
.atk-swatch-blue:not(.atk-text-inherit) h1,
.atk-swatch-blue:not(.atk-text-inherit) h2,
.atk-swatch-blue:not(.atk-text-inherit) h3,
.atk-swatch-blue:not(.atk-text-inherit) h4,
.atk-swatch-blue:not(.atk-text-inherit) h5,
.atk-swatch-blue:not(.atk-text-inherit) h6 {
  color: white;
}
.atk-swatch-blue:not(.atk-text-inherit) .atk-text-dimmed {
  color: white;
  opacity: 0.5;
  filter: alpha(opacity=50);
}
.atk-swatch-blue:not(.atk-text-inherit)[class*=icon-],
a.atk-swatch-blue:not(.atk-text-inherit)[class*=icon-] {
  background: none;
  color: #0095ff;
}
.atk-swatch-blue:not(.atk-text-inherit)[class*=icon-][class*=atk-shape] {
  color: white;
  background-color: #0095ff;
}
.atk-swatch-blue:not(.atk-text-inherit)[class*=icon-]:hover {
  background: none;
  color: #0095ff;
}
a.atk-swatch-blue:not(.atk-text-inherit):hover,
.atk-swatch-blue:not(.atk-text-inherit)[class*=atk-button]:hover {
  color: white;
  background-color: #0f9bff;
}
.atk-swatch-blue:not(.atk-text-inherit)[class*='atk-button'],
.atk-swatch-blue:not(.atk-text-inherit).atk-label,
.atk-table td.atk-swatch-blue:not(.atk-text-inherit),
.atk-table th.atk-swatch-blue:not(.atk-text-inherit),
.atk-table.atk-table-zebra tr.atk-swatch-blue:not(.atk-text-inherit) > td,
.atk-table.atk-table-zebra tbody > tr > td.atk-swatch-blue:not(.atk-text-inherit),
.atk-swatch-blue:not(.atk-text-inherit) > .atk-popover-arrow:before,
.atk-swatch-blue:not(.atk-text-inherit).atk-popover-arrow:before {
  background-color: #0095ff;
  border-color: #0095ff;
}
.atk-swatch-blue:not(.atk-text-inherit)[class*='atk-button'] {
  border-color: #0077cc;
  border-width: 1px;
  -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.07);
  -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.07);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.07);
}
.atk-swatch-blue:not(.atk-text-inherit)[class*='atk


Counter % 4 ? bitStorage * 64 + buffer : buffer;
			// Unless this is the first of a group of 4 characters…
			if (bitCounter++ % 4) {
				// …convert the first 8 bits to a single ASCII character.
				output += String.fromCharCode(
					0xFF & bitStorage >> (-2 * bitCounter & 6)
				);
			}
		}
		return output;
	};

	// `encode` is designed to be fully compatible with `btoa` as described in the
	// HTML Standard: http://whatwg.org/html/webappapis.html#dom-windowbase64-btoa
	public static encode(input): string {
		input = String(input);
		if (/[^\0-\xFF]/.test(input)) {
			// Note: no need to special-case astral symbols here, as surrogates are
			// matched, and the input is supposed to only contain ASCII anyway.
			Base64.error(
				'The string to be encoded contains characters outside of the ' +
				'Latin1 range.'
			);
		}
		var padding = input.length % 3;
		var output = '';
		var position = -1;
		var a;
		var b;
		var c;
		var d;
		var buffer;
		// Make sure any padding is handled outside of the loop.
		var length = input.length - padding;

		while (++position < length) {
			// Read three bytes, i.e. 24 bits.
			a = input.charCodeAt(position) << 16;
			b = input.charCodeAt(++position) << 8;
			c = input.charCodeAt(++position);
			buffer = a + b + c;
			// Turn the 24 bits into four chunks of 6 bits each, and append the
			// matching character for each of them to the output.
			output += (
				Base64.TABLE.charAt(buffer >> 18 & 0x3F) +
				Base64.TABLE.charAt(buffer >> 12 & 0x3F) +
				Base64.TABLE.charAt(buffer >> 6 & 0x3F) +
				Base64.TABLE.charAt(buffer & 0x3F)
			);
		}

		if (padding == 2) {
			a = input.charCodeAt(position) << 8;
			b = input.charCodeAt(++position);
			buffer = a + b;
			output += (
				Base64.TABLE.charAt(buffer >> 10) +
				Base64.TABLE.charAt((buffer >> 4) & 0x3F) +
				Base64.TABLE.charAt((buffer << 2) & 0x3F) +
				'='
			);
		} else if (padding == 1) {
			buffer = input.charCodeAt(position);
			output += (
				Base64.TABLE.charAt(buffer >> 2) +
				Base64.TABLE.charAt((buffer << 4) & 0x3F) +
				'=='
			);
		}

		return output;
	};

}
import { standardDeck, StandardPlayingCard } from "./decks/standard";
import Dealer from "./dealer";

describe("Dealer Class", () => {
  it("export exists", () => expect(Dealer).not.toBeUndefined());

  it("draw() returns 1 card by default", () => {
    const dealer = new Dealer<StandardPlayingCard>(standardDeck);
    const result = dealer.draw();
    expect(result).toHaveLength(1);
  });

  it("draw() returns the number of cards specified", () => {
    const qty = 5;
    const dealer = new Dealer<StandardPlayingCard>(standardDeck);
    const result = dealer.draw(qty);
    expect(result).toHaveLength(qty);
  });

  it("draw() returns cards in default order if shuffle() is not invoked", () => {
    const dealer = new Dealer<StandardPlayingCard>(standardDeck);
    const drawnDeck = dealer.draw(standardDeck.length);
    const result = drawnDeck.every((card: StandardPlayingCard, index) => {
      const compare = standardDeck[index];
      return card.suit === compare.suit || card.rank === compare.rank;
    });
    expect(result).toBeTruthy();
  });

  it("discard()


ne61OCubRR9DqFtAhhtvGAk7hIvDaMybJk1chZuY8aHiOIbxHyMEVoVzdbG99O7gg41pftCGtRNzvIJfceSm3zuCMB/tvoDhgPiNLwZE53eml8dItyDxEsUIVeCrczMUUDiX19pbIklZlto7nhHHY8bYIaBiqDBJUw63JmhLl1GwNsh7JosUCWEeaAmYfHog1AImb/Pa1YiufBqqBkG4lxmEHG1s71tjSYvHEaQ9Z3JRna7lLIpk7bK65pyBV0JMOSyMOlDdO/hLW0QleRMNJj8CrR36L8MsFtWaZL9RryAwiQX2kM760QgskP61nCijsKr3ANzKt4j+AvE0FCqorDBkPa6uL8JjxYkH8qT2YflXqw7MYBuehVJKcai2zLH/oq9tUWnn1eFp+zj9ZJb/fXJaKvVI84xil6cZgNvaLoIrfT3uUC9N1Pto8mYna5GW6Q8UZIi60lrlHyagJOxA8vvR52GFcrxiSftw7GlFxAH22PSco0wCA8ouaCzTDFgEVkKW4SOCFLMKOL90WjaPeM4SgaObGsMMDh0z71Ay1bXtScAuEDY8ODFnv24VykItLcKVEd8Q3o7zBaw5Fq6I4WkahlWHHsSpYLCY5tHmYjZ6pDAHvD6jGB8FsjqjvJSDAbpf6F6DOnPrrffWtPG+YXpNkvLmFmBuIFQz1B+dcd8Eg1U7jE7uosvYe8qa3PtD9fjuu3CxiN4YDF9Vaz+OmlMBjh9x52KHxg5yOBSG96eHOLgh1wtFsKph74vbfKNePSFcR1E4+V31DBIb+iqvkreGnyyZLej+ERWeEgPuQbiezcccUCikwkBEkvGdoWzxZKFSYfxieLAlxkxKGVjKAf99PT4WZ8ubwhnY0CM7rbUCwqGwTQlZTDda0KBn2lRQD') format('woff2')/*!
 * Bootstrap v4.3.1 (https://getbootstrap.com/)
 * Copyright 2011-2019 The Bootstrap Authors
 * Copyright 2011-2019 Twitter, Inc.
 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
 */:root{--blue:#007bff;--indigo:#6610f2;--purple:#6f42c1;--pink:#e83e8c;--red:#dc3545;--orange:#fd7e14;--yellow:#ffc107;--green:#28a745;--teal:#20c997;--cyan:#17a2b8;--white:#fff;--gray:#6c757d;--gray-dark:#343a40;--primary:#007bff;--secondary:#6c757d;--success:#28a745;--info:#17a2b8;--warning:#ffc107;--danger:#dc3545;--light:#f8f9fa;--dark:#343a40;--breakpoint-xs:0;--breakpoint-sm:576px;--breakpoint-md:768px;--breakpoint-lg:992px;--breakpoint-xl:1200px;--font-family-sans-serif:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-family-monospace:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace}*,::after,::before{box-sizing:border-box}html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent}article,aside,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Co


ger: function(callback, activateDebug){
			var htmlLoader;
			var loadDebugger = arguments.callee;
			if(loadDebugger.htmlLoader && typeof loadDebugger.htmlLoader.window.isLoaded != 'undefined'){
				if(loadDebugger.htmlLoader.window.isLoaded){
					callback(loadDebugger.htmlLoader.window.debugWindow);
				}else{
					if(loadDebugger.htmlLoader.window.initCallbacks){
						loadDebugger.htmlLoader.window.initCallbacks.push(callback);
					}else{
						loadDebugger.initCallbacks.push(callback);
					}
				}
				return;
			}
			if(typeof loadDebugger.initCallbacks=='undefined'){
				loadDebugger.initCallbacks = [function(){
					delete loadDebugger.initCallbacks;
				}, callback];
			}else{
				loadDebugger.initCallbacks.push(callback);
			}
			if(isAppSandbox){
			    htmlLoader = air.Introspector.runtime.HTMLLoader.createRootWindow(false);
			    air.Introspector.addEventListener(htmlLoader, air.Introspector.runtime.Event.HTML_DOM_INITIALIZE, function(){
					try{
						air.Introspector.removeEventListener(htmlLoader, air.Introspector.runtime.Event.HTML_DOM_INITIALIZE, arguments.callee);
						htmlLoader.window.initCallbacks = loadDebugger.initCallbacks;
						htmlLoader.window.isLoaded = false;
						htmlLoader.window.config = air.Introspector.config;
						htmlLoader.window.activateDebug = activateDebug;
						htmlLoader.window.isAppSandbox = isAppSandbox;
					}catch(e){
						air.Introspector.runtime.trace(e);
						air.Introspector.runtime.trace(e.line);
					}
				});
				htmlLoader.window.isLoaded = false;

			    var nativeWindow = htmlLoader.stage.nativeWindow;
				nativeWindow.width = 640;
				nativeWindow.height = 480;
			    air.Introspector.addEventListener(htmlLoader, runtime.flash.events.HTMLUncaughtScriptExceptionEvent.UNCAUGHT_SCRIPT_EXCEPTION, function(e){
			         air.Introspector.logError(e.exceptionValue, {htmlLoader: self.htmlLoader});
			         e.preventDefault();
			    });
			    if(typeof air.Introspector.config.useAirDebugHtml=='undefined'||air.Introspector.config.useAirDebugHtml==false){
			        htmlLoader.loadString(air.Introspector.contentString);
			    }else{
			        htmlLoader.load(new air.Introspector.runtime.URLRequest('app:/DebugUI.html'));
			    }
			}else{
				air.Introspector.noBridge(function(){
					var w = air.Introspector.tryCreateWindow(loadDebugger.initCallbacks);
					if(w){
						var htmlLoader = {window: w};
						loadDebugger.htmlLoader = htmlLoader;
					}
				});
			}
			loadDebugger.htmlLoader = htmlLoader;
	},

	/**
	*	@function findDebugWindow
	*	@description Look up the Introspector in other windows. Maybe somebody else just opened it before us.
	*/
    findDebugWindow: function(){
		if(isAppSandbox){
			try{
	    		if(air.Introspector.debugWindow&&air.Introspector.debugWindow.nativeWindow.closed==false)
		    	   return air.Introspector.debugWindow;
			}catch(e){
			}
			try{
		        var htmlWindows = air.Introspector.getHtmlWindows(true);
		        for(var i=htmlWindows.length-1;i>=0;i--){
		            try{
		                if(typeof htmlWindows[i].htmlLoader.window.air!='undefined'
		                   && typeof htmlWindows[i].htmlLoader.window.air.Introspector!='undefined'


.16b, maskv.16b, maskv.16b
	cmeq	maskv.8b, maskv.8b, 0
	fmov	synd, maskd
	cbz	synd, L(loop)

	/* Low 32 bits of synd are non-zero if a NUL was found in datav1.  */
	cmeq	maskv.16b, datav1.16b, 0
	sub	len, src, srcin
	cbnz	syndw, 1f
	cmeq	maskv.16b, datav2.16b, 0
	add	len, len, 16
1:
	/* Generate a bitmask and compute correct byte offset.  */
	shrn	maskv.8b, maskv.8h, 4
	fmov	synd, maskd
#ifndef __AARCH64EB__
	rbit	synd, synd
#endif
	clz	tmp, synd
	add	len, len, tmp, lsr 2
	ret

L(page_cross):


// SPDX-License-Identifier: GPL-2.0
/*
 *  linux/fs/sysv/file.c
 *
 *  minix/file.c
 *  Copyright (C) 1991, 1992  Linus Torvalds
 *
 *  coh/file.c
 *  Copyright (C) 1993  Pascal Haible, Bruno Haible
 *
 *  sysv/file.c
 *  Copyright (C) 1993  Bruno Haible
 *
 *  SystemV/Coherent regular file handling primitives
 */

#include "sysv.h"

/*
 * We have mostly NULLs here: the current defaults are OK for
 * the coh filesystem.
 */
const struct file_operations sysv_file_operations = {
	.llseek		= generic_file_llseek,
	.read_iter	= generic_file_read_iter,
	.write_iter	= generic_file_write_iter,
	.mmap		= generic_file_mmap,
	.fsync		= generic_file_fsync,
	.splice_read	= filemap_splice_read,
};

static int sysv_setattr(struct mnt_idmap *idmap,
			struct dentry *dentry, struct iattr *attr)
{
	struct inode *inode = d_inode(dentry);
	int error;

	error = setattr_prepare(&nop_mnt_idmap, dentry, attr);
	if (error)
		return error;

	if ((attr->ia_valid & ATTR_SIZE) &&
	    attr->ia_size != i_size_read(inode)) {
		error = inode_newsize_ok(inode, attr->ia_size);
		if (error)
			return error;
		truncate_setsize(inode, attr->ia_size);
		sysv_truncate(inode);
	}

	setattr_copy(&nop_mnt_idmap, inode, attr);
	mark_inode_dirty(inode);
	return 0;
}

const struct inode_operations sysv_file_inode_operations = {
	.setattr	= sysv_setattr,
	.getattr	= sysv_getattr,
};