 { loadGrammar } from './runparser'
import { parse } from './chartparser'
import { grammar } from './grammars/commandGrammar'

const gram = loadGrammar(grammar)

// function paeseCmd() returns formatted str containing .action & .object values
let parseCmd: (text:string) => string = function (
    text: string,
  ): string {
    let prs = parse(text.split(/\s+/), gram)
    let result = prs.resultsForRule(gram.$root)[0]
    let message;
    if (result===undefined)
        {message='NotCommand'}
    else
        {let action = result.command.action
        let thing = result.command.object
        let doing;
            if(action==='on'){doing='turning on'} if(action==='off'){doing='turning off'}
            if(action==='open'){doing='opening'} if(action==='close'){doing='closing'}
        message = `Sure, ${doing} the ${thing}.`}
    return message ;
  };

// let input1 = "close the AC please"
// let input2 = "turn off the AC please"
// console.log(parseCmd(input1))
// console.log(parseCmd(input2))

const sayResponse: Action<SDSContext, SDSEvent> = send((context: SDSContext) => (
    {type: "SPEAK", value: parseCmd(context.recResult)}
))

function say(text: string): Action<SDSContext, SDSEvent> {
    console.log(`>>Saying: ${text}`)
    return send((_context: SDSContext) => ({ type: "SPEAK", value: text }))
}

function promptAndAsk(prompt: string): MachineConfig<SDSContext, any, SDSEvent> {
    return ({
        initial: 'prompt',
        states: {
            prompt: {
                entry: say(prompt),
                on: { ENDSPEECH: 'ask' }
            },
            ask: {
                entry: send('LISTEN'),
            },
        }
    })
}

export const dmMachine: MachineConfig<SDSContext, any, SDSEvent> = ({
    id: 'SmartHome',
    initial: 'welcomePrompt',
    states: {
        init: {
            on: {
                CLICK: 'welcomePrompt'
            }
        },

        welcomePrompt: {
            on: {
                RECOGNISED: [
                    { target: 'stop', cond: (context) => context.recResult === 'stop' },
                    { target: 'NotACommand', cond: (context) => parseCmd(context.recResult) === 'NotCommand'},
                    { target: 'chore', cond: (context) => parseCmd(context.recResult) != 'NotCommand'},
                    ],
                CLICK: 'stop'
                },
            ...promptAndAsk("Please say your smart home command")
            },
        stop: {
            entry: say("Ok, stopped"),
            always: 'init'
            },
        NotACommand: {
            entry: say("Sorry, I dont know how to do that."),
            on: { ENDSPEECH: "welcomePrompt" }
            },
        chore: {
            initial: 'prompt',
            states: {
                prompt: {
                    entry: sayResponse,
                    on: { ENDSPEECH: '#root.dm.init' } //init of dmMenu
                    },

                }
            }
    }
})
import card from './card';

export default class Player {
  handCard: card[];
  id: string;
  name: string;
  ready: boolean;
  shield: boolean;
  constructor(id: string, name: string) {
    this.id = id;
    this.name = name;
    this.handCard = [];
    this.ready = false;
    this.shield = false;
  }
  peekCard(index: number): card | null


Request(
    public val clanId: Int,
) : IncomingGameMessage {
    override val category: ClientProtCategory
        get() = GameClientProtCategory.USER_EVENT

    override fun equals(other: Any?): Boolean {
        if (this === other) return true
        if (javaClass != other?.javaClass) return false

        other as ClanSettingsFullRequest

        return clanId == other.clanId
    }

    override fun hashCode(): Int = clanId

    override fun toString(): String = "ClanSettingsFullRequest(clanId=$clanId)"
}
package net.rsprot.protocol.game.outgoing.zone.header

import net.rsprot.protocol.ServerProtCategory
import net.rsprot.protocol.game.outgoing.GameServerProtCategory
import net.rsprot.protocol.message.OutgoingGameMessage

/**
 * Update zone partial follows packets are used to set the 'current zone pointer' to this
 * zone, allowing one to follow it with any other zone payload packet.
 * This packet is more efficient to use over the partial-enclosed variant
 * when there is only a single zone packet following it, in any other scenario,
 * it is more bandwidth-friendly to use the enclosed packet.
 * @property zoneX the x coordinate of the zone's south-western corner in the
 * build area.
 * @property zoneZ the z coordinate of the zone's south-western corner in the
 * build area.
 * @property level the height level of the zone, typically equal to the player's
 * own height level.
 *
 * It should be noted that the [zoneX] and [zoneZ] coordinates are relative
 * to the build area in their absolute form, not in their shifted zone form.
 * If the player is at an absolute coordinate of 50, 40 within the build area(104x104),
 * the expected coordinates to transmit here would be 48, 40, as that would
 * point to the south-western corner of the zone in which the player is standing in.
 */
public class UpdateZonePartialFollows private constructor(
    private val _zoneX: UByte,
    private val _zoneZ: UByte,
    private val _level: UByte,
) : OutgoingGameMessage {
    public constructor(
        zoneX: Int,
        zoneZ: Int,
        level: Int,
    ) : this(
        zoneX.toUByte(),
        zoneZ.toUByte(),
        level.toUByte(),
    )

    public val zoneX: Int
        get() = _zoneX.toInt()
    public val zoneZ: Int
        get() = _zoneZ.toInt()
    public val level: Int
        get() = _level.toInt()
    override val category: ServerProtCategory
        get() = GameServerProtCategory.HIGH_PRIORITY_PROT

    override fun equals(other: Any?): Boolean {
        if (this === other) return true
        if (javaClass != other?.javaClass) return false

        other as UpdateZonePartialFollows

        if (_zoneX != other._zoneX) return false
        if (_zoneZ != other._zoneZ) return false
        if (_level != other._level) return false

        return true
    }

    override fun hashCode(): Int {
        var result = _zoneX.hashCode()
        result = 31 * result + _zoneZ.hashCode()
        result = 31 * result + _level.hashCode()
        return result
    }

    override fun toString(): String =
        "UpdateZonePartialFollows(" +
            "zoneX=$zoneX, " +
            "zoneZ=$zoneZ, " +
            "level=$level" +
            ")"
}
package net.rsprot.protocol.game.outgoing.zone.payload

import net.rsprot.protocol.ServerProtCategory
import net.rsprot.protocol.game.outgoing.GameServerProtCategory
import net.rsprot.protocol.game.outgoing.zone.payload.util.CoordInZone
import net.rsprot.protocol.internal.game.outgoing.codec.zone.payload.OldSchoolZoneProt
import net.rsprot.protocol.message.ZoneProt

/**
 * Obj del packets are used to delete an existing obj from the build area,
 * assuming it exists in th


turnTypeInference() {
  acceptSupplier(Supplier { null })
}

fun <C> testNullableAcceptNullable2Vararg(nonNull: C) {
  val localNonNull = nonNull
  acceptNullable2Varargs(localNonNull, nonNull, nonNull)
}

fun <C : Any> testNonNullAcceptNullable2Vararg(nonNull: C) {
  val localNonNull = nonNull
  acceptNullable2Varargs(localNonNull, nonNull, nonNull)
}

fun <C : Any> testNonNullAcceptNonNull2Vararg(nonNull: C) {
  val localNonNull = nonNull
  acceptNonNull2Varargs(localNonNull, nonNull, nonNull)
}

private fun <T> accept1(t: T) {}

private fun <T> accept2(t1: T, t2: T) {}

private fun <T> acceptVarargs(vararg t: T) {}

private fun <T> acceptNullable2Varargs(t1: T, t2: T, vararg t: T) {}

private fun <T : Any> acceptNonNull2Varargs(t1: T, t2: T, vararg t: T) {}

private fun <V> acceptSupplier(t: Supplier<V>) {}

private class Consumer<T> {
  constructor(t: T)

  constructor(t1: T, t2: T)

  fun accept(t: T) {}
}

private class VarargConsumer<T> {
  constructor(vararg ts: T)

  fun accept(t: T) {}
}

private fun interface Supplier<V> {
  fun getValue(): V

  companion object {
    fun <V> of(v: V): Supplier<V> = Supplier { v }
  }
}

private fun testNullWildcardInLambda() {
  val supplier: Supplier<*> = wrap { null }
  supplier.getValue()
}

private fun <T> wrap(supplier: Supplier<out T>): Supplier<T> {
  return Supplier { supplier.getValue() }
}
/*
 * Copyright 2022 Google Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     https://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 allsimplebridges

import com.google.j2cl.integration.testing.Asserts.assertTrue

object Tester405 {
  internal open class C1<T> {
    open fun get(value: T): String {
      return "C1.get"
    }
  }

  internal class C2 : C1<Any>() {
    override fun get(value: Any): String {
      return "C2.get"
    }

    fun get(value: String): String {
      return "C2.get"
    }
  }

  fun test() {
    val s = C2()
    assertTrue(s.get(Any()) == "C2.get")
    assertTrue(s.get("") == "C2.get")
    assertTrue((s as C1<Any>).get("") == "C2.get")
  }
}
/*
 * Copyright 2022 Google Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     https://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 allsimplebridges

import com.google.j2cl.integration.testing.Asserts.assertTrue
import jsinterop.annotations


ysResponse.serializeBinaryToWriter(this, writer);
  return writer.getResultBuffer();
};

/**
 * Serializes the given message to binary data (in protobuf wire
 * format), writing to the given BinaryWriter.
 * @param {!proto.api.ListApiKeysResponse} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.api.ListApiKeysResponse.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getTotalCount();
  if (f !== 0) {
    writer.writeUint32(
      1,
      f
    );
  }
  f = message.getResultList();
  if (f.length > 0) {
    writer.writeRepeatedMessage(
      2,
      f,
      proto.api.ApiKey.serializeBinaryToWriter
    );
  }
};

/**
 * optional uint32 total_count = 1;
 * @return {number}
 */
proto.api.ListApiKeysResponse.prototype.getTotalCount = function() {
  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
};

/**
 * @param {number} value
 * @return {!proto.api.ListApiKeysResponse} returns this
 */
proto.api.ListApiKeysResponse.prototype.setTotalCount = function(value) {
  return jspb.Message.setProto3IntField(this, 1, value);
};

/**
 * repeated ApiKey result = 2;
 * @return {!Array<!proto.api.ApiKey>}
 */
proto.api.ListApiKeysResponse.prototype.getResultList = function() {
  return /** @type{!Array<!proto.api.ApiKey>} */ (
    jspb.Message.getRepeatedWrapperField(this, proto.api.ApiKey, 2));
};

/**
 * @param {!Array<!proto.api.ApiKey>} value
 * @return {!proto.api.ListApiKeysResponse} returns this
*/
proto.api.ListApiKeysResponse.prototype.setResultList = function(value) {
  return jspb.Message.setRepeatedWrapperField(this, 2, value);
};

/**
 * @param {!proto.api.ApiKey=} opt_value
 * @param {number=} opt_index
 * @return {!proto.api.ApiKey}
 */
proto.api.ListApiKeysResponse.prototype.addResult = function(opt_value, opt_index) {
  return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.api.ApiKey, opt_index);
};

/**
 * Clears the list making it empty but non-null.
 * @return {!proto.api.ListApiKeysResponse} returns this
 */
proto.api.ListApiKeysResponse.prototype.clearResultList = function() {
  return this.setResultList([]);
};

if (jspb.Message.GENERATE_TO_OBJECT) {
/**
 * Creates an object representation of this proto.
 * Field names that are reserved in JavaScript and will be renamed to pb_name.
 * Optional fields that are not set will be set to undefined.
 * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
 * For the list of reserved names please see:
 *     net/proto2/compiler/js/internal/generator.cc#kKeyword.
 * @param {boolean=} opt_includeInstance Deprecated. whether to include the
 *     JSPB instance for transitional soy proto support:
 *     http://goto/soy-param-migration
 * @return {!Object}
 */
proto.api.UserTenantLink.prototype.toObject = function(opt_includeInstance) {
  return proto.api.UserTenantLink.toObject(opt_includeInstance, this);
};

/**
 * Static version of the {@see toObject} method.
 * @param {boolean|undefined} includeInstance Deprecated. Whether to include
 *     the JSPB instance for transitional soy proto support:
 *     http://goto/soy-param-migration
 * @param {!proto.api.UserT


AddressWithNetwork for Script {
    fn to_address(&self, network: Network) -> Address {
        Address::PayToScriptHash {
            network,
            script_hash: Address::hash_payload(&self.0[..]),
        }
    }
    fn to_address_uncompressed(&self, network: Network) -> Address {
        Address::PayToScriptHash {
            network,
            script_hash: Address::hash_payload(&self.0[..]),
        }
    }
}

impl ToAddressWithNetwork for PublicKey {
    fn to_address(&self, network: Network) -> Address {
        Address::PayToPublicKeyHash {
            network,
            pub_key_hash: Address::hash_payload(&self.serialize()[..]),
        }
    }

    fn to_address_uncompressed(&self, network: Network) -> Address {
        Address::PayToPublicKeyHash {
            network,
            pub_key_hash: Address::hash_payload(&self.serialize_uncompressed()[..]),
        }
    }
}

impl Address {
    /// A hash of a transparent address payload, as used in
    /// transparent pay-to-script-hash and pay-to-publickey-hash
    /// addresses.
    ///
    /// The resulting hash in both of these cases is always exactly 20
    /// bytes.
    /// https://en.bitcoin.it/Base58Check_encoding#Encoding_a_Bitcoin_address
    fn hash_payload(bytes: &[u8]) -> [u8; 20] {
        let sha_hash = Sha256::digest(bytes);
        let ripe_hash = Ripemd160::digest(&sha_hash);
        let mut payload = [0u8; 20];
        payload[..].copy_from_slice(&ripe_hash[..]);
        payload
    }
}

#[cfg(test)]
impl Address {
    fn p2pkh_strategy() -> impl Strategy<Value = Self> {
        (any::<Network>(), vec(any::<u8>(), 20))
            .prop_map(|(network, payload_bytes)| {
                let mut bytes = [0; 20];
                bytes.copy_from_slice(payload_bytes.as_slice());
                Self::PayToPublicKeyHash {
                    network,
                    pub_key_hash: bytes,
                }
            })
            .boxed()
    }

    fn p2sh_strategy() -> impl Strategy<Value = Self> {
        (any::<Network>(), vec(any::<u8>(), 20))
            .prop_map(|(network, payload_bytes)| {
                let mut bytes = [0; 20];
                bytes.copy_from_slice(payload_bytes.as_slice());
                Self::PayToScriptHash {
                    network,
                    script_hash: bytes,
                }
            })
            .boxed()
    }
}

#[cfg(test)]
impl Arbitrary for Address {
    type Parameters = ();

    fn arbitrary_with(_args: Self::Parameters) -> Self::Strategy {
        prop_oneof![Self::p2pkh_strategy(), Self::p2sh_strategy(),].boxed()
    }

    type Strategy = BoxedStrategy<Self>;
}

#[cfg(test)]
mod tests {

    use secp256k1::PublicKey;

    use super::*;

    #[test]
    fn pubkey_mainnet_uncompressed() {
        zebra_test::init();

        let pub_key = PublicKey::from_slice(&[
            4, 80, 134, 58, 214, 74, 135, 174, 138, 47, 232, 6


from qiskit import QuantumCircuit, Aer, execute
from qiskit.visualization import plot_histogram
import numpy as np

def create_surface_code_lattice(n):
    """
    Create a surface code lattice of size n x n.
    Args:
    - n (int): Size of the lattice (n x n).

    Returns:
    - QuantumCircuit: Quantum circuit with surface code lattice.
    """
    qc = QuantumCircuit(n*n, n*n)

    for i in range(n):
        for j in range(n):

            if (i + j) % 2 == 0:
                qc.h(i*n + j)
            if i > 0:
                qc.cx((i-1)*n + j, i*n + j)
            if j > 0:
                qc.cx(i*n + (j-1), i*n + j)

    return qc

def simulate_surface_code(qc):
    """
    Simulate the surface code circuit and visualize results.
    Args:
    - qc (QuantumCircuit): Quantum circuit with surface code.

    Returns:
    - dict: Results of the simulation.
    """
    simulator = Aer.get_backend('qasm_simulator')
    compiled_circuit = qc.compile()
    result = execute(compiled_circuit, simulator, shots=1024).result()
    counts = result.get_counts(qc)

    return counts

def apply_error(qc, error_type, qubit_list):
    """
    Apply errors to the quantum circuit.
    Args:
    - qc (QuantumCircuit): Quantum circuit to apply errors.
    - error_type (str): Type of error ('bit-flip' or 'phase-flip').
    - qubit_list (list of int): List of qubits to apply errors.
    """
    if error_type == 'bit-flip':
        for qubit in qubit_list:
            qc.x(qubit)
    elif error_type == 'phase-flip':
        for qubit in qubit_list:
            qc.z(qubit)
def main():

    n = 5
    qc = create_surface_code_lattice(n)

    counts_no_error = simulate_surface_code(qc)
    print("Counts without errors:", counts_no_error)

    error_qubits = [0, 1, 2]
    apply_error(qc, 'bit-flip', error_qubits)
    counts_with_bit_flip = simulate_surface_code(qc)
    print("Counts with bit-flip errors:", counts_with_bit_flip)

    apply_error(qc, 'phase-flip', error_qubits)
    counts_with_phase_flip = simulate_surface_code(qc)
    print("Counts with phase-flip errors:", counts_with_phase_flip)

    plot_histogram([counts_no_error, counts_with_bit_flip, counts_with_phase_flip],
                   legend=['No Error', 'Bit-Flip Error', 'Phase-Flip Error'])

if __name__ == "__main__":
    main()


 ops.xinfoGroups(key).asFlow().toList()

    override suspend fun xinfoConsumers(key: K, group: K): List<Any> = ops.xinfoConsumers(key, group).asFlow().toList()

    override suspend fun xlen(key: K): Long? = ops.xlen(key).awaitFirstOrNull()

    override suspend fun xpending(key: K, group: K): PendingMessages? = ops.xpending(key, group).awaitFirstOrNull()

    override fun xpending(key: K, group: K, range: Range<String>, limit: Limit): Flow<PendingMessage> = ops.xpending(key, group, range, limit).asFlow()

    override fun xpending(key: K, consumer: Consumer<K>, range: Range<String>, limit: Limit): Flow<PendingMessage> = ops.xpending(key, consumer, range, limit).asFlow()

    override fun xpending(key: K, args: XPendingArgs<K>): Flow<PendingMessage> = ops.xpending(key, args).asFlow()

    override fun xrange(key: K, range: Range<String>): Flow<StreamMessage<K, V>> = ops.xrange(key, range).asFlow()

    override fun xrange(key: K, range: Range<String>, limit: Limit): Flow<StreamMessage<K, V>> = ops.xrange(key, range, limit).asFlow()

    override fun xread(vararg streams: StreamOffset<K>): Flow<StreamMessage<K, V>> = ops.xread(*streams).asFlow()

    override fun xread(args: XReadArgs, vararg streams: StreamOffset<K>): Flow<StreamMessage<K, V>> = ops.xread(args, *streams).asFlow()

    override fun xreadgroup(consumer: Consumer<K>, vararg streams: StreamOffset<K>): Flow<StreamMessage<K, V>> = ops.xreadgroup(consumer, *streams).asFlow()

    override fun xreadgroup(consumer: Consumer<K>, args: XReadArgs, vararg streams: StreamOffset<K>): Flow<StreamMessage<K, V>> = ops.xreadgroup(consumer, args, *streams).asFlow()

    override fun xrevrange(key: K, range: Range<String>): Flow<StreamMessage<K, V>> = ops.xrevrange(key, range).asFlow()

    override fun xrevrange(key: K, range: Range<String>, limit: Limit): Flow<StreamMessage<K, V>> = ops.xrevrange(key, range, limit).asFlow()

    override suspend fun xtrim(key: K, count: Long): Long? = ops.xtrim(key, count).awaitFirstOrNull()

    override suspend fun xtrim(key: K, approximateTrimming: Boolean, count: Long): Long? = ops.xtrim(key, approximateTrimming, count).awaitFirstOrNull()

    override suspend fun xtrim(key: K, args: XTrimArgs): Long? = ops.xtrim(key, args).awaitFirstOrNull()
}

/*
 * Copyright 2020-Present, Redis Ltd. and Contributors
 * All rights reserved.
 *
 * Licensed under the MIT License.
 *
 * This file contains contributions from third-party contributors
 * 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
 *
 *      https://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.
 */
@file:Suppress("unused", "UsePropertyAccessSyntax")

package io.lettuce.core.cluster.api.coroutines

import io.lettuce.core.ExperimentalLettuceCoroutinesApi
import io.lettuce.core.api.coroutines.*
import io.lettuce.core.cluster.api.rea


Test(lease, nil, LeaseStateExpired)

	// Transit to the Suspect state.
	now = time.Now()
	lease.Suspect(now)
	inspectTest(lease, &now, LeaseStateSuspect)
	inspectTest(lease, nil, LeaseStateSuspect)

	// After lease expired time, still suspect.
	sleepTest(duration, lease, LeaseStateSuspect)
	now = time.Now()
	inspectTest(lease, &now, LeaseStateSuspect)

	// Clear lease.
	lease.Expire()
	now = time.Now()
	inspectTest(lease, &now, LeaseStateExpired)
	inspectTest(lease, nil, LeaseStateExpired)

	// An expired remote lease can never renew.
	now = time.Now()
	lease.Renew(now.Add(1 * time.Minute))
	assert.Equal(t, remote.Inspect(&now), LeaseStateExpired)

	// A new remote lease.
	m1 := lease.MaybeNewRemoteLease(1)
	require.NotNil(t, m1)
	now = time.Now()
	assert.Equal(t, m1.Inspect(&now), LeaseStateValid)
}

func TestTimeU64(t *testing.T) {
	type TimeU64 struct {
		T time.Time
		U uint64
	}
	testsTimeToU64 := []TimeU64{
		{T: time.Unix(0, 0), U: 0},
		{T: time.Unix(0, 1), U: 0},      // 1ns will be rounded down to 0ms
		{T: time.Unix(0, 999999), U: 0}, // 999999ns will be rounded down to 0ms
		{T: time.Unix(1, 0), U: 1 << SecShift},
		{T: time.Unix(1, int64(NsecPerMsec)), U: (1 << SecShift) + 1},
	}

	for _, test := range testsTimeToU64 {
		assert.Equal(t, TimeToU64(test.T), test.U)
	}

	testsU64ToTime := []TimeU64{
		{T: time.Unix(0, 0), U: 0},
		{T: time.Unix(0, int64(NsecPerMsec)), U: 1},
		{T: time.Unix(1, 0), U: 1 << SecShift},
		{T: time.Unix(1, int64(NsecPerMsec)), U: (1 << SecShift) + 1},
	}
	for _, test := range testsU64ToTime {
		assert.Equal(t, U64ToTime(test.U), test.T)
	}
}

func TestCheckKeyInRegion(t *testing.T) {
	type Case struct {
		Key        []byte
		StartKey   []byte
		EndKey     []byte
		IsInRegion bool
		Inclusive  bool
		Exclusive  bool
	}
	testCases := []Case{
		{Key: []byte{}, StartKey: []byte{}, EndKey: []byte{}, IsInRegion: true, Inclusive: true, Exclusive: false},
		{Key: []byte{}, StartKey: []byte{}, EndKey: []byte{6}, IsInRegion: true, Inclusive: true, Exclusive: false},
		{Key: []byte{}, StartKey: []byte{3}, EndKey: []byte{6}, IsInRegion: false, Inclusive: false, Exclusive: false},
		{Key: []byte{4}, StartKey: []byte{3}, EndKey: []byte{6}, IsInRegion: true, Inclusive: true, Exclusive: true},
		{Key: []byte{4}, StartKey: []byte{3}, EndKey: []byte{}, IsInRegion: true, Inclusive: true, Exclusive: true},
		{Key: []byte{3}, StartKey: []byte{3}, EndKey: []byte{}, IsInRegion: true, Inclusive: true, Exclusive: false},
		{Key: []byte{2}, StartKey: []byte{3}, EndKey: []byte{6}, IsInRegion: false, Inclusive: false, Exclusive: false},
		{Key: []byte{}, StartKey: []byte{


        .get_matches();

    info!("Logger initialized. Set RUST_LOG=[debug,error,info,warn,trace] Default: info");
    info!("Mus-Fuse {}", env!("CARGO_PKG_VERSION"));

    // Read config file and env vars
    let conf = cli_args.value_of("conf").unwrap();
    let mut settings = config::Config::default();
    settings = match settings.merge(config::File::with_name(conf)) {
        Ok(conf_content) => {
            info!("Using config file {}", conf);
            conf_content.to_owned()
        }
        Err(e) => {
            warn!("Can't read config file {}", e);
            config::Config::default()
        }
    };
    settings = match settings.merge(config::Environment::with_prefix("MUS")) {
        Ok(conf) => conf.to_owned(),
        Err(_) => config::Config::default(),
    };
    let http_user = match settings.get_str("http_user") {
        Ok(u) => u,
        Err(_) => {
            info!("User for basic auth is not defined.");
            String::new()
        }
    };
    let http_pass = match settings.get_str("http_pass") {
        Ok(u) => u,
        Err(_) => String::new(),
    };
    let server = match settings.get_str("server") {
        Ok(server_cfg) => match cli_args.value_of("server") {
            Some(server_opt) => server_opt.to_string(),
            None => server_cfg,
        },
        Err(_) => match cli_args.value_of("server") {
            Some(server_opt) => server_opt.to_string(),
            None => {
                error!("Server is not set in config nor via run options.");
                process::exit(0x0001)
            }
        },
    };
    let mountpoint = match settings.get_str("mountpoint") {
        Ok(mountpoint_cfg) => match cli_args.value_of("mountpoint") {
            Some(mountpoint_opt) => mountpoint_opt.to_string(),
            None => mountpoint_cfg,
        },
        Err(_) => match cli_args.value_of("mountpoint") {
            Some(mountpoint_opt) => mountpoint_opt.to_string(),
            None => {
                error!("Mount point is not set in config nor via run options.");
                process::exit(0x0001)
            }
        },
    };
    let cache_head = match settings.get_str("cache_head") {
        Ok(cache_head_cfg) => match cli_args.value_of("cache_head") {
            Some(cache_head_opt) => 1024 * cache_head_opt.parse::<u64>().unwrap(),
            None => 1024 * cache_head_cfg.parse::<u64>().unwrap(),
        },
        Err(_) => match cli_args.value_of("cache_head") {
            Some(cache_head_opt) => 1024 * cache_head_opt.parse::<u64>().unwrap(),
            None => 768 * 1024,
        },
    };
    let cache_max_count = match settings.get_str("cache_max_count") {
        Ok(cache_max_count_cfg) => match cli_args.value_of("cache_max_count") {
            Some(cache_max_count_opt) => cache_max_count_opt.parse::<u64>().unwrap(),
            None => cache_max_count_cfg.parse::<u64>().unwrap(),
        },
        Err(_) => match cli_args.value_of("cache_max_count") {
            Some(cache_max_count_opt) => cache_max_count_opt.parse::<u64>().unwrap(),
            None => 10,
        },
    };

    unsafe {
        METRICS.server_addr = server.clone();
        let mut buf = String::new();
        buf.push_str(&http_user);
        buf.push_str(":");
        buf.push_str(&http_pass);
        HTTP_AUTH = base64::encode(buf)
    }
    let lib = match get_tracks(&server) {
        Ok(library) => library,
        Err(err) => {


c0 53.02 42.98 96 96 96s96-42.98 96-96-43-96-96-96zm256 0c-11.28 0-21.95 2.305-32 5.879V224c0-35.3 28.7-64 64-64 17.67 0 32-14.33 32-32s-14.33-32-32-32c-70.58 0-128 57.42-128 128v96c0 53.02 42.98 96 96 96s96-42.98 96-96-43-96-96-96z'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'%3E%3Cpath d='M96 224c-11.28 0-21.95 2.3-32 5.9V224c0-35.3 28.7-64 64-64 17.67 0 32-14.33 32-32s-14.3-32-32-32C57.42 96 0 153.4 0 224v96c0 53.02 42.98 96 96 96s96-42.98 96-96-43-96-96-96zm256 0c-11.28 0-21.95 2.305-32 5.879V224c0-35.3 28.7-64 64-64 17.67 0 32-14.33 32-32s-14.33-32-32-32c-70.58 0-128 57.42-128 128v96c0 53.02 42.98 96 96 96s96-42.98 96-96-43-96-96-96z'/%3E%3C/svg%3E")}.EasyMDEContainer .editor-toolbar .code:before{-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 640 512'%3E%3Cpath d='M416 31.94C416 21.75 408.1 0 384.1 0c-13.98 0-26.87 9.072-30.89 23.18l-128 448a31.933 31.933 0 0 0-1.241 8.801C223.1 490.3 232 512 256 512c13.92 0 26.73-9.157 30.75-23.22l128-448c.85-2.97 1.25-5.93 1.25-8.84zM176 143.1c0-18.28-14.95-32-32-32-8.188 0-16.38 3.125-22.62 9.376l-112 112C3.125 239.6 0 247.8 0 255.1s3.125 17.3 9.375 23.5l112 112c6.225 6.3 14.425 8.5 22.625 8.5 17.05 0 32-13.73 32-32 0-8.188-3.125-16.38-9.375-22.63L77.25 255.1l89.38-89.38c6.27-5.42 9.37-13.52 9.37-22.62zm464 112c0-8.188-3.125-16.38-9.375-22.63l-112-112C512.4 115.1 504.2 111.1 496 111.1c-17.05 0-32 13.73-32 32 0 8.188 3.125 16.38 9.375 22.63l89.38 89.38-89.38 89.38C467.1 351.6 464 359.8 464 367.1c0 18.28 14.95 32 32 32 8.188 0 16.38-3.125 22.62-9.376l112-112C636.9 272.4 640 264.2 640 255.1z'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 640 512'%3E%3C


.Sprite;
var button1: Phaser.Button;
var button2: Phaser.Button;
var button3: Phaser.Button;
var button3: Phaser.Button;
var button4: Phaser.Button;
var button5: Phaser.Button;
var button6: Phaser.Button;

var game: Phaser.Game = new Phaser.Game(800, 600, Phaser.CANVAS, "phaser-example", {
    preload: () => {
        game.load.spritesheet("button", "assets/buttons/button_sprite_sheet.png", 193, 71);
        game.load.image("sky0","assets/skies/space2.png");
        game.load.image("sky1","assets/skies/cavern1.png");
        game.load.image("sky2","assets/skies/chrome.png");
        game.load.image("sky3","assets/skies/fire.png");
        game.load.image("sky4","assets/skies/fog.png");
        game.load.image("sky5","assets/skies/sky1.png");
        game.load.image("sky6","assets/skies/toxic.png");
    },

    create: () => {
        background = game.add.sprite(0, 0, "sky0");
        background.name = "background";

        //  Standard button (also used as our pointer tracker)
        button1 = game.add.button(100, 100, "button", buttonScaleChangeSky, this, 2, 1, 0);
        button1.name = "sky1";
        button1.anchor.setTo(0.5, 0.5);

        //  Rotated button
        button2 = game.add.button(330, 200, "button", buttonScaleChangeSky, this, 2, 1, 0);
        button2.name = "sky2";
        button2.angle = 24;
        button2.anchor.setTo(0.5, 0.5);

        //  Width scaled button
        button3 = game.add.button(100, 300, "button", buttonScaleChangeSky, this, 2, 1, 0);
        button3.name = "sky3";
        button3.width = 300;
        button3.anchor.setTo(0, 0.5);
        // button3.angle = 0.1;

        //  Scaled button
        button4 = game.add.button(300, 450, "button", buttonScaleChangeSky, this, 2, 1, 0);
        button4.name = "sky4";
        button4.scale.setTo(2, 2);

        //  Shrunk button
        button5 = game.add.button(100, 450, "button", buttonScaleChangeSky, this, 2, 1, 0);
        button5.name = "sky5";
        button5.scale.setTo(0.5, 0.5);

        //  Scaled and Rotated button
        button6 = game.add.button(570, 200, "button", buttonScaleChangeSky, this, 2, 1, 0); // anchor 0.5
        button6.name = "sky6";
        button6.angle = 32;
        button6.scale.setTo(2, 2);
        button6.anchor.setTo(0.5, 0.5);
    }
});

function buttonScaleChangeSky (button: Phaser.Button) {
    // TODO update phaser.d.ts?
    (<any> background).loadTexture(button.name);
}
import {Check} from './Check';

/**
 * A table with checks and closed checks.
 */
export interface Table {
    id: string;
    number: number;
    check?: Check;
    closedChecks: Check[];
}import { expect } from 'chai';
import Code from '../model/Code';
import User from '../model/User';

describe('User Tests', () => {

    describe('constructor', () => {
        let user = new User("username", "password");

        it('Calling the constructor creates an object of the same type', () => {
            expect(typeof new User("a", "b")).to.equal(typeof user);
        });
    });

    describe('getUsername()', () => {
        let user = new User("username", "password");

        it('Calling the username returns the same as given in the constructor', () => {
            expect(user.getUsername()).to.equal("username");
        });
    });


p_rho_chra_04",
	"p_rho_chra_05",
	"p_rho_chra_06",
	"p_rho_chra_07",
	"p_rho_cottongin_03",
	"p_rho_cottongin_03_slod",
	"p_rho_fencez_posta",
	"p_rho_gen_hml_a",
	"p_rho_gen_hml_b",
	"p_rho_gen_pil1",
	"p_rho_gro01_a",
	"p_rho_gs_11",
	"p_rho_gstor_01",
	"p_rho_guns_01",
	"p_rho_guns_02",
	"p_rho_int_ban1",
	"p_rho_int_bar_01",
	"p_rho_int_drwdressing01x",
	"p_rho_int_drwdressing02x",
	"p_rho_int_drwdressing03x",
	"p_rho_int_stair1",
	"p_rho_limp_1",
	"p_rho_no_a1",
	"p_rho_oats_01",
	"p_rho_off_01",
	"p_rho_palsgn_01",
	"p_rho_palsgn_02",
	"p_rho_patio_11",
	"p_rho_patio_12",
	"p_rho_patio_13",
	"p_rho_roadsign01x",
	"p_rho_roadsign02x",
	"p_rho_saloon_curtain02b",
	"p_rho_saloon_curtain02c",
	"p_rho_saloon_curtain05a",
	"p_rho_saloon_curtain05b",
	"p_rho_saloon_curtain06a",
	"p_rho_saloon_curtain06b",
	"p_rho_saloon_curtain07a",
	"p_rho_saloon_curtain07b",
	"p_rho_saloon_curtain08b",
	"p_rho_saloon_curtain08c",
	"p_rho_saloon_curtain09a",
	"p_rho_saloon_curtain09b",
	"p_rho_saloon_curtain09c",
	"p_rho_saloon_curtain10a",
	"p_rho_saloon_curtain10c",
	"p_rho_saloon_curtain11a",
	"p_rho_saloon_curtain11b",
	"p_rho_saloon_curtain11c",
	"p_rho_saloon_curtain11d",
	"p_rho_saloon_curtain12c",
	"p_rho_saloon_curtain12d",
	"p_rho_saloon_curtain13a",
	"p_rho_saloon_curtain13b",
	"p_rho_saloon_curtain13c",
	"p_rho_saloon_curtain14a",
	"p_rho_saloon_curtain14b",
	"p_rho_saloon_curtain14c",
	"p_rho_saloon_curtain15c",
	"p_rho_saloon_curtain16b",
	"p_rho_saloon_curtain16c",
	"p_rho_saloon_curtain17a",
	"p_rho_saloon_curtain17b",
	"p_rho_saloon_curtain17c",
	"p_rho_saloon_curtain17d",
	"p_rho_saloon_curtain18c",
	"p_rho_saloon_curtain18d",
	"p_rho_saloon_curtain19a",
	"p_rho_saloon_curtain19b",
	"p_rho_saloon_curtain19c"


ne_list[0])
                        if udp_prot_list:
                            item_obj['udp_list'] = udp_prot_list

                        udp_prot_range = _parse_port_range(line_list[0])
                        if udp_prot_range:
                            item_obj['udp_ranges'] = udp_prot_range

                # 'any' case
                else:
                    t_list = []
                    t_range = []
                    u_list = []
                    u_range = []

                    if 'tcp_list' in item_obj:
                        t_list = item_obj['tcp_list']

                    if 'tcp_ranges' in item_obj:
                        t_range = item_obj['tcp_ranges']

                    if 'udp_list' in item_obj:
                        u_list = item_obj['udp_list']

                    if 'udp_ranges' in item_obj:
                        u_range = item_obj['udp_ranges']

                    t_p_list = _parse_port_list(line, t_list)
                    if t_p_list:
                        item_obj['tcp_list'] = t_p_list

                    t_r_list = _parse_port_range(line, t_range)
                    if t_r_list:
                        item_obj['tcp_ranges'] = t_r_list

                    u_p_list = _parse_port_list(line, u_list)
                    if u_p_list:
                        item_obj['udp_list'] = u_p_list

                    u_r_list = _parse_port_range(line, u_range)
                    if u_r_list:
                        item_obj['udp_ranges'] = u_r_list

    if item_obj:
        raw_output.append(item_obj)

    if raw:
        return raw_output
    else:
        return _process(raw_output)


nQueueSize &&
				   oldest != null &&
				   cutoff - oldest.Timestamp > 0)
			{
				var removed = oldest;
				if (removed.IsAccelerating)
					acceleratingCount--;

				sampleCount--;
				oldest = removed.Next;

				if (oldest == null)
					newest = null;

				pool.Release(removed);
			}
		}

		// Returns true if we have enough samples to detect if we are shaking the device and that more than 3/4th of them are accelerating
		internal bool IsShaking => newest != null &&
						  oldest != null &&
						  newest.Timestamp - oldest.Timestamp >= minWindowSize &&
						  acceleratingCount >= (sampleCount >> 1) + (sampleCount >> 2);

		internal class AccelerometerSample
		{
			public long Timestamp { get; set; }

			public bool IsAccelerating { get; set; }

			public AccelerometerSample Next { get; set; }
		}

		internal class AccelerometerDataPool
		{
			AccelerometerSample head;

			internal AccelerometerSample Acquire()
			{
				var aquired = head;
				if (aquired == null)
					aquired = new AccelerometerSample();
				else
					head = aquired.Next;

				return aquired;
			}

			internal void Release(AccelerometerSample sample)
			{
				sample.Next = head;
				head = sample;
			}
		}
	}
}


Pay: 0, //платеж в месяц
    maxPay: 0, //макс платеж
    minPay: 0, //мин платеж
    totalSum: 0, //общая сумма платежа
    overpayment: 0, //сумма переплаты
    type: 0 //тип кредита 0 - аннуитентный, 1 - дифференциальный
  }
  //массива месячных платежей по кредиту
  private table: tablePaymentType[] = [];

  getCreditParams(){
    return this.creditParams;
  }

  getCreditTime(){
    return  this.creditTime;
  }

  getResultCredit(){
    return this.resultCredit;
  }

  getTable(){
    return this.table;
  }

  changeCreditTime(e: any) {
    this.creditParams.time = e.value;
  }

  changeType(typeCredit: number){
    this.creditParams.type = typeCredit;
  }

  errorInput(){
    if(this.creditParams.rate === null){
      this.creditParams.rate = 0;
    }
    if(this.creditParams.sum === null){
      this.creditParams.sum = 0;
    }
  }
  //подсчет кредита и таблицы выплат
  calc(){
    Object.assign(this.resultCredit, this.calculationService.calcCredit(this.creditParams));
    Object.assign(this.table, this.calculationService.calcTable(this.creditParams, this.resultCredit))
  }

}

import * as eta from "../eta";
import * as engine from "./engine";
import * as generateMaze from "generate-maze";
import ChatMessage from "./ChatMessage";
import Client from "./Client";

let instance: Server;

export class Server {
    public uid: string;
    public chatMessages: ChatMessage[] = [];
    public clients: Client[] = [];
    public game: engine.Game;
    public io: SocketIO.Server;

    public constructor(io: SocketIO.Server) {
        instance = this;
        this.uid = eta.crypto.generateSalt();
        this.game = new engine.Game();
        this.io = io;
        this.io.on("connection", socket => this.onConnect(<any>socket).catch(err => eta.logger.error(err)));
        engine.Enemy.load().then(() => this.generateMap())
            .catch(err => eta.logger.error(err));
    }

    public close(): void {
        this.io.close();
    }

    private async onConnect(socket: SocketIO.Socket): Promise<void> {
        const client = new Client(this, socket);
        this.clients.push(client);
        await client.setup();
    }

    private generateMap(): void {
        const generator = new engine.LevelGenerator();
        generator.generateRooms(new engine.Vector2(100, 50), 4)
            .forEach(wall => this.game.level.addEntity(wall));
        this.game.level.on("entity-add", (entity: engine.Entity) => {
            if (entity instanceof engine.Enemy) {
                entity.on("killed", (killer: engine.Player) => {
                    this.sendChat("Server", `${killer.coloredName} killed ${entity.coloredName}.`, "white");
                });
            }
        });
        generator.generateEnemies().forEach(enemy => this.game.level.addEntity(enemy));
    }

    public sendRender(): void {
        this.io.emit("render", this.game.level.buildRender());
        this.clients.forEach(c => {
            if (c.socket.disconnected) return;
            if (c.player && c.player.name) c.socket.emit("stats", c.player.getStats());
        });
    }

    public sendChat(name: string, message: string, color: string, auto


T_READ = 8906;
     */
    RET_PRIVATE_CHAT_REPEAT_READ(8906),
    /**
     * RET_PRIVATE_CHAT_READ_NOT_FRIEND = 8907;
     */
    RET_PRIVATE_CHAT_READ_NOT_FRIEND(8907),
    /**
     * RET_REUNION_FINISHED = 9001;
     */
    RET_REUNION_FINISHED(9001),
    /**
     * RET_REUNION_NOT_ACTIVATED = 9002;
     */
    RET_REUNION_NOT_ACTIVATED(9002),
    /**
     * RET_REUNION_ALREADY_TAKE_FIRST_REWARD = 9003;
     */
    RET_REUNION_ALREADY_TAKE_FIRST_REWARD(9003),
    /**
     * RET_REUNION_SIGN_IN_REWARDED = 9004;
     */
    RET_REUNION_SIGN_IN_REWARDED(9004),
    /**
     * RET_REUNION_WATCHER_REWARDED = 9005;
     */
    RET_REUNION_WATCHER_REWARDED(9005),
    /**
     * RET_REUNION_WATCHER_NOT_FINISH = 9006;
     */
    RET_REUNION_WATCHER_NOT_FINISH(9006),
    /**
     * RET_REUNION_MISSION_REWARDED = 9007;
     */
    RET_REUNION_MISSION_REWARDED(9007),
    /**
     * RET_REUNION_MISSION_NOT_FINISH = 9008;
     */
    RET_REUNION_MISSION_NOT_FINISH(9008),
    /**
     * RET_REUNION_WATCHER_REWARD_NOT_UNLOCKED = 9009;
     */
    RET_REUNION_WATCHER_REWARD_NOT_UNLOCKED(9009),
    /**
     * RET_BLESSING_CONTENT_CLOSED = 9101;
     */
    RET_BLESSING_CONTENT_CLOSED(9101),
    /**
     * RET_BLESSING_NOT_ACTIVE = 9102;
     */
    RET_BLESSING_NOT_ACTIVE(9102),
    /**
     * RET_BLESSING_NOT_TODAY_ENTITY = 9103;
     */
    RET_BLESSING_NOT_TODAY_ENTITY(9103),
    /**
     * RET_BLESSING_ENTITY_EXCEED_SCAN_NUM_LIMIT = 9104;
     */
    RET_BLESSING_ENTITY_EXCEED_SCAN_NUM_LIMIT(9104),
    /**
     * RET_BLESSING_DAILY_SCAN_NUM_EXCEED_LIMIT = 9105;
     */
    RET_BLESSING_DAILY_SCAN_NUM_EXCEED_LIMIT(9105),
    /**
     * RET_BLESSING_REDEEM_REWARD_NUM_EXCEED_LIMIT = 9106;
     */
    RET_BLESSING_REDEEM_REWARD_NUM_EXCEED_LIMIT(9106),
    /**
     * RET_BLESSING_REDEEM_PIC_NUM_NOT_ENOUGH = 9107;
     */
    RET_BLESSING_REDEEM_PIC_NUM_NOT_ENOUGH(9107),
    /**
     * RET_BLESSING_PIC_NOT_ENOUGH = 9108;
     */
    RET_BLESSING_PIC_NOT_ENOUGH(9108),
    /**
     * RET_BLESSING


= "" then
      cmd = "DiffviewOpen"
    else
      cmd = string.format("DiffviewOpen %s", base_ref)
      -- Show warning about diffview limitation
      vim.notify("reviewthem.nvim: Due to diffview limitations, showing two-dot diff instead of three-dot diff", vim.log.levels.WARN)
    end
  else
    -- Normal comparison
    cmd = string.format("DiffviewOpen %s...%s", base_ref, compare_ref)
  end

  vim.cmd(cmd)
  return true
end

-- Close diffview session
M.close = function()
  pcall(vim.cmd, "DiffviewClose")
end

return M


 args{
				ctx: context.Background(),
				req: &openapi.OtelIngestTracesRequest{
					Body:            createValidJSONTraceData(),
					ContentType:     "application/json",
					ContentEncoding: "",
					WorkspaceID:     "123",
				},
			},
			want: &openapi.OtelIngestTracesResponse{
				Body:        createValidProtoBufResponse(),
				ContentType: ptr.Of("application/x-protobuf"),
			},
			wantErr: false,
		},
		{
			name: "fail with empty request",
			fieldsGetter: func(ctrl *gomock.Controller) fields {
				traceServiceMock := servicemocks.NewMockITraceService(ctrl)
				authMock := rpcmocks.NewMockIAuthProvider(ctrl)
				benefitMock := benefitmocks.NewMockIBenefitService(ctrl)
				tenantMock := tenantmocks.NewMockITenantProvider(ctrl)
				workspaceMock := workspacemocks.NewMockIWorkSpaceProvider(ctrl)
				workspaceMock.EXPECT().GetThirdPartyQueryWorkSpaceID(gomock.Any(), int64(123)).Return("123").AnyTimes()
				workspaceMock.EXPECT().GetIngestWorkSpaceID(gomock.Any(), gomock.Any()).DoAndReturn(func(ctx context.Context, spans []*span.InputSpan) string {
					if len(spans) > 0 {
						switch spans[0].SpanID {
						case "span1":
						case "span2":
						case "span3":
							return "workspace2"
						}
					}
					return ""
				}).AnyTimes()
				rateLimiterMock := limitermocks.NewMockIRateLimiterFactory(ctrl)
				rateLimiterMock.EXPECT().NewRateLimiter().Return(limitermocks.NewMockIRateLimiter(ctrl)).AnyTimes()
				traceConfigMock := configmocks.NewMockITraceConfig(ctrl)
				metricsMock := metricsmocks.NewMockITraceMetrics(ctrl)
				return fields{
					traceService: traceServiceMock,
					auth:         authMock,
					benefit:      benefitMock,
					tenant:       tenantMock,
					workspace:    workspaceMock,
					rateLimiter:  rateLimiterMock,
					traceConfig:  traceConfigMock,
					metrics:      metricsMock,
				}
			},
			args: args{
				ctx: context.Background(),
				req: nil,
			},
			want:    nil,
			wantErr: true,
		},
		{
			name: "fail with empty body",
			fieldsGetter: func(ctrl *gomock.Controller) fields {
				traceServiceMock := servicemocks.NewMockITraceService(ctrl)
				authMock := rpcmocks.NewMockIAuthProvider(ctrl)
				benefitMock := benefitmocks.NewMockIBenefitService(ctrl)
				tenantMock := tenantmocks.NewMockITenantProvider(ctrl)
				workspaceMock := workspacemocks.NewMockIWorkSpaceProvider(ctrl)
				workspaceMock.EXPECT().GetThirdPartyQueryWorkSpaceID(gomock.Any(), int64(123)).Return("123").AnyTimes()
				workspaceMock.EXPECT().GetIngestWorkSpaceID(gomock.Any(), gomock.Any()).DoAndReturn(func(ctx context.Context, spans []*span.InputSpan) string {
					if len(spans) > 0 {
						switch spans[0].SpanID {
						case "span1":
						case "span2":
						case "span3":
							return "workspace2"
						}
					}
					return ""
				}).AnyTimes()
				rateLimiterMock := limitermocks.NewMockIRateLimiterFactory(ctrl)
				rateLimiterMock.EXPECT().NewRateLimiter().Return(limitermocks.NewMockIRateLimiter(ctrl)).AnyTimes()
				traceConfigMock := configmocks.NewMockITraceConfig(ctrl)
				metricsMock := metricsmocks.NewMockITraceMetrics(ctrl)
				return fields{
					traceService: traceServiceMock,
					auth:         authMock,
					b


throw new Error(errorMessage);
}
const em = require('../src/em').em;

// This is one unit test.
test('em.random with lower and upper specified, upper excluded', () => {
  for (let i = 0; i < 1000; i = i + 1) {

    const v = '' + em.random(4, 6); // Normal, positive case.
    expect(v).toMatch(/4|5/);

    const a = '' + em.random(0, 5); // One parameter is 0 (w/ positive) test case.
    expect(a).toMatch(/0|1|2|3|4/);

    expect(em.random(0, 0)).toBe(0); // Both parameters are 0 test case.

    expect(em.random(14, 14)).toBe(14); // Same number, positive.

    expect(em.random(-1, -1)).toBe(-1); // Same number, negative.

    const b = '' + em.random(-3, -1); // Negative case
    expect(b).toMatch(/-3|-2/);

    const c = '' + em.random(-4, 2); // One negative & one positive.
    expect(c).toMatch(/-4|-3|-2|-1|0|1/);

  }
});

test('em.random with no parameters specified', () => {
  for (let i = 0; i < 1000; i = i + 1) {

  	expect(em.random()).toBeGreaterThanOrEqual(0); // Lower bound
  	expect(em.random()).toBeLessThan(1); // Upper bound

  }
});

test('em.random with lower, upper, and decimalPosition specified', () => {
  for (let i = 0; i < 1000; i = i + 1) {

  	const a = '' + em.random(3, 8, 2); // Normal case, two positives
  	const dotIndexA = a.lastIndexOf('.');
  	const dotToEndA = a.length - dotIndexA - 1;
  	expect(dotToEndA).toBeLessThanOrEqual(2);
  	expect(Number(a)).toBeGreaterThanOrEqual(3);
  	expect(Number(a)).toBeLessThan(8);

  	const b = '' + em.random(-3, 2, 3); // Negative Number to Positive
  	const dotIndexB = b.lastIndexOf('.');
  	const dotToEndB = b.length - dotIndexB - 1;
  	expect(dotToEndB).toBeLessThanOrEqual(3);
  	expect(Number(b)).toBeGreaterThanOrEqual(-3);
  	expect(Number(b)).toBeLessThan(2);

  	const c = '' + em.random(-2, 0, 5); // One zero, one negative
  	const dotIndexC = c.lastIndexOf('.');
  	const dotToEndC = c.length - dotIndexC - 1;
  	expect(dotToEndC).toBeLessThanOrEqual(5);
  	expect(Number(c)).toBeGreaterThanOrEqual(-2);
  	expect(Number(c)).toBeLessThan(0);

  	const d = '' + em.random(0, 0, 1); // Both zeros
  	expect(Number(d)).toBe(0);

  	const e = '' + em.random(5.13, 9.7, 4);
  	const dotIndexE = e.lastIndexOf('.');
  	const dotToEndE = e.length - dotIndexE - 1;
  	expect(dotToEndE).toBeLessThanOrEqual(4);
  	expect(Number(e)).toBeGreaterThanOrEqual(5.13);
  	expect(Number(e)).toBeLessThan(9.7);

  }
});

test('em.randomInt with min and max', () => {
  for (let i = 0; i < 1000; i = i + 1) {
    const a = em.randomInt(3, 15); // Normal inputs (positive)
    expect(a).toBeGreaterThanOrEqual(3);
    expect(a).toBeLessThan(15);

    const b = em.randomInt(4.4, 9.1); // Floating point inputs
    expect(b).toBeGreaterThanOrEqual(5);
    expect(b).toBeLessThan(9);

    const c = em.randomInt(-4, 19); // Negative inputs
    expect(c).toBeGreaterThanOrEqual(-4);
    expect(c).toBeLessThan(19);

    const d = em.randomInt(-12.3, -1.7); // Negative floating point inputs
    expect(d).toBeGreaterThanOrEqual(-12);
    expect(d).toBeLessThan(-2);
  }
});


 caja_ars + resultado.
  // 5. actualizar input caja.
  // 6. resetear operacion.

  actualizarCaja() {
    const calculadora = this.calculadoraForms.value;
    let resultadoCajaUsd = 0;
    let resultadoCajaArs = 0;
    console.log("caja_ars",this.calculadoraForms.value["caja_ars"]);

    if (calculadora.tipo_accion == 'compra') {
      resultadoCajaUsd = calculadora.caja_usd + calculadora.monto;
      resultadoCajaArs = calculadora.caja_ars - this.resultado;
    } else if (calculadora.tipo_accion == 'venta') {
      resultadoCajaUsd = calculadora.caja_usd - calculadora.monto;
      resultadoCajaArs = calculadora.caja_ars + this.resultado;
    }

    if (resultadoCajaArs < 0 || resultadoCajaUsd < 0) {
      this.mostrarMensaje('SIN SALDO EN CAJAS', 'alineaMensaje', 2000);
    } else {
      //caja_ars se actualiza con lo que calculamos arriba en caja_ars.
      this.mostrarMensaje('CAJA ACTUALIZADA', 'alineaMensaje2', 4000);

      // Cree un objeto con los atributos de la operación
      const objeto_resultadoFinal = {

        caja_ars: this.calculadoraForms.value["caja_ars"],
        caja_usd: this.calculadoraForms.value["caja_usd"],
        monto: calculadora.monto,
        hora: Date.now(),
        operacion: calculadora.tipo_accion,
        cotizacion: this.cotizacion,
      };

      // se actualiza la parte visual de las cajas.
      this.calculadoraForms.patchValue({
        caja_ars: resultadoCajaArs,
        caja_usd: resultadoCajaUsd,
        tipo_accion: '',
        monto: '',
      });

      // Mandamos el objeto al servicio
      this.historicoService.cargarResultado(objeto_resultadoFinal);
    }
  }

  // fin funcion actualizar caja

  // 1. sacar los datos del formulario.
  // 2. obtener tipo_accion.
  // 3. dependiendo tipo_accion es la operacion matematica a realizar.
  // 3.a. COMPRA -> resultado = coti_compra * monto.
  // 3.b. VENTA -> resultado = coti_venta * monto.

  calcular() {
    //calculadora es un objeto que esta guardando todo lo que tiene el formulario.
    const calculadora = this.calculadoraForms.value;

    console.log('Desde funcion calcular', calculadora);
    if (calculadora.tipo_accion == 'compra') {
      this.resultado = calculadora.coti_compra * calculadora.monto;
      this.cotizacion = calculadora.coti_compra;
    } else if (calculadora.tipo_accion == 'venta') {
      this.resultado = calculadora.coti_venta * calculadora.monto;
      this.cotizacion = calculadora.coti_venta;
    }
  } // fin funcion calcular

  mostrarMensaje(message: string, nombreStylo: string, duracion: number) {
    this._snackBar.open(message, '', {
      duration: duracion,
      horizontalPosition: 'center',
      verticalPosition: 'bottom',
      panelClass: [nombreStylo],
    });
  } // fin de mostrar mensaje.

  onToogleChange() {
    this.isToogled= !this.isToogled;

  }

}
import { IExtendedPlayer, IPlayersByRole } from '../interfaces';
import { getPlayerRole } from './getPlayerRole';


                  'debug' : undefined
                    })
                ]
            });
            continue;
        }

        if (/\.(?:mjs|js)$/.test(file)) {
            options.push({
                input,
                output: {
                    file: output,
                    format: 'esm'
                },
                context: 'this',
                external: [
                    'playcanvas',
                    /^https?:\/\/.+/
                ]
            });
            continue;
        }

        options.push(staticRollupOption({
            src: input,
            dest: output
        }));
    }
    return options;
});

const ENGINE_TARGETS = (() => {
    /** @type {RollupOptions[]} */
    const options = [];

    // Types
    // Outputs: dist/iframe/playcanvas.d.ts
    options.push(buildTypesOption({
        root: '..',
        dir: 'dist/iframe'
    }));

    // Sources
    if (ENGINE_PATH) {
        const src = path.resolve(ENGINE_PATH);
        const content = fs.readFileSync(src, 'utf8');
        const isUnpacked = isModuleWithExternalDependencies(content);

        if (isUnpacked) {
            options.push(staticRollupOption({
                src: path.dirname(src),
                dest: 'dist/iframe/ENGINE_PATH'
            }));
        } else {
            options.push(staticRollupOption({
                src,
                dest: 'dist/iframe/ENGINE_PATH/index.js'
            }));
        }
        return options;
    }

    // Builds
    if (NODE_ENV === 'production') {
        // Outputs: dist/iframe/playcanvas.mjs
        options.push(
            ...buildJSOptions({
                moduleFormat: 'esm',
                buildType: 'release',
                bundleState: 'bundled',
                input: '../src/index.js',
                dir: 'dist/iframe'
            })
        );
    }
    if (NODE_ENV === 'production' || NODE_ENV === 'development') {
        // Outputs: dist/iframe/playcanvas.dbg.mjs
        options.push(
            ...buildJSOptions({
                moduleFormat: 'esm',
                buildType: 'debug',
                bundleState: 'bundled',
                input: '../src/index.js',
                dir: 'dist/iframe'
            })
        );
    }
    if (NODE_ENV === 'production' || NODE_ENV === 'profiler') {
        // Outputs: dist/iframe/playcanvas.prf.mjs
        options.push(
            ...buildJSOptions({
                moduleFormat: 'esm',
                buildType: 'profiler',
                bundleState: 'bundled',
                input: '../src/index.js',
                dir: 'dist/iframe'
            })
        );
    }
    return options;
})();

const APP_TARGETS = [{
    // A debug build is ~2.3MB and a release build ~0.6MB
    input: 'src/app/index.mjs',
    output: {
        dir: 'dist',
        format: 'umd'
    },
    treeshake: 'smallest',
    plugins: [
        commonjs(),
        treeshakeIgnore([/@playcanvas\/pcui/g]), // ignore PCUI treeshake
        resolve(),
        replace({
            values: {
                'process.env.NODE_ENV': JSON.stringify(NODE_ENV), // for REACT bundling
                'process.env.VERSION': JSON.stringify(version) // for VERSION in constants.mjs
            },
            preventAssignment: true
        }),
        // @ts-ignore
        NODE_ENV === 'production' && terser()
    ]
}];

export default [
    ...STATIC_TARGETS,
    ...EXAMPLE_TARGETS,
    ...ENGINE_TARGETS,
    ...APP_TARGETS
];
var Tween = pc.createScript('tween');

Tween.attributes.add('tweens', {
    type: 'json',
    schema: [
        {
            name: 'auto


Field_get01 extends JTTTest {

    public static final byte byteField = 11;
    public static final short shortField = 12;
    public static final char charField = 13;
    public static final int intField = 14;
    public static final long longField = 15;
    public static final float floatField = 16;
    public static final double doubleField = 17;
    public static final boolean booleanField = true;

    public static boolean test(int arg) throws NoSuchFieldException, IllegalAccessException {
        if (arg == 0) {
            return Field_get01.class.getField("byteField").get(null).equals(byteField);
        } else if (arg == 1) {
            return Field_get01.class.getField("shortField").get(null).equals(shortField);
        } else if (arg == 2) {
            return Field_get01.class.getField("charField").get(null).equals(charField);
        } else if (arg == 3) {
            return Field_get01.class.getField("intField").get(null).equals(intField);
        } else if (arg == 4) {
            return Field_get01.class.getField("longField").get(null).equals(longField);
        } else if (arg == 5) {
            return Field_get01.class.getField("floatField").get(null).equals(floatField);
        } else if (arg == 6) {
            return Field_get01.class.getField("doubleField").get(null).equals(doubleField);
        } else if (arg == 7) {
            return Field_get01.class.getField("booleanField").get(null).equals(booleanField);
        }
        return false;
    }

    @Test
    public void run0() throws Throwable {
        runTest("test", 0);
    }

    @Test
    public void run1() throws Throwable {
        runTest("test", 1);
    }

    @Test
    public void run2() throws Throwable {
        runTest("test", 2);
    }

    @Test
    public void run3() throws Throwable {
        runTest("test", 3);
    }

    @Test
    public void run4() throws Throwable {
        runTest("test", 4);
    }

    @Test
    public void run5() throws Throwable {
        runTest("test", 5);
    }

    @Test
    public void run6() throws Throwable {
        runTest("test", 6);
    }

    @Test
    public void run7() throws Throwable {
        runTest("test", 7);
    }

    @Test
    public void run8() throws Throwable {
        runTest("test", 8);
    }

}
/*
 * Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved.
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 *
 * This code is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License version 2 only, as
 * published by the Free Software Foundation.  Oracle designates this
 * particular file as subject to the "Classpath" exception as provided
 * by Oracle in the LICENSE file that accompanied this code.
 *
 * This code is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 * version 2 for more details (a copy is included in the LICENSE file that
 * accompanied this code).
 *
 * You should have received a copy of the GNU General Public License version
 * 2 along with this work; if not, write to the Free Software Foundation,
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 *
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 * or visit www.oracle.com if you need additional information or have any
 * questions.
 */
package jdk.graal.compiler.jtt.reflect;

import jdk.graal.compiler.jtt.JTTTest;
import org.junit.Test;

/*
 */
public class Field_get02 extends JTTTest


			else if (strcmp(opt, "-map") == 0) {
				checkMode(options.mode);
				options.mode = modeMap;
            }
			else if (strcmp(opt, "-size") == 0) {
				checkMode(options.mode);
				options.mode = modeSize;
            }
			else if (strcmp(opt, "-extract") == 0) {
				checkMode(options.mode);
				options.mode = modeExtract;
 				options.extractionDir = argv[++i];
                if ( i >= argc ) {
                    fprintf(stderr, "Error: option -extract requires a directory argument\n");
                    usage();
                    exit(1);
                }
           }
			else if (strcmp(opt, "-uuid") == 0) {
                options.printUUIDs = true;
            }
			else if (strcmp(opt, "-inode") == 0) {
                options.printInodes = true;
            }
			else if (strcmp(opt, "-versions") == 0) {
                options.printDylibVersions = true;
            }
			else if (strcmp(opt, "-vmaddr") == 0) {
				options.printVMAddrs = true;
		    }
			else {
                fprintf(stderr, "Error: unrecognized option %s\n", opt);
                usage();
                exit(1);
            }
        }
		else {
            sharedCachePath = opt;
        }
    }

	if ( options.mode == modeNone ) {
		fprintf(stderr, "Error: select one of -list, -dependents, -info, -linkedit, or -map\n");
		usage();
		exit(1);
	}

	if ( options.mode != modeSlideInfo ) {
		if ( options.printUUIDs && (options.mode != modeList) )
			fprintf(stderr, "Warning: -uuid option ignored outside of -list mode\n");

		if ( options.printVMAddrs && (options.mode != modeList) )
			fprintf(stderr, "Warning: -vmaddr option ignored outside of -list mode\n");

		if ( options.printDylibVersions && (options.mode != modeDependencies) )
			fprintf(stderr, "Warning: -versions option ignored outside of -dependents mode\n");

		if ( (options.mode == modeDependencies) && (options.dependentsOfPath == NULL) ) {
			fprintf(stderr, "Error: -dependents given, but no dylib path specified\n");
			usage();
			exit(1);
		}
	}

	struct stat statbuf;
	if ( ::stat(sharedCachePath, &statbuf) == -1 ) {
		fprintf(stderr, "Error: stat() failed for dyld shared cache at %s, errno=%d\n", sharedCachePath, errno);
		exit(1);
	}

	int cache_fd = ::open(sharedCachePath, O_RDONLY);
	if ( cache_fd < 0 ) {
		fprintf(stderr, "Error: open() failed for shared cache file at %s, errno=%d\n", sharedCachePath, errno);
		exit(1);
	}
	options.mappedCache = ::mmap(NULL, (size_t)statbuf.st_size, PROT_READ, MAP_PRIVATE, cache_fd, 0);
	if (options.mappedCache == MAP_FAILED) {
		fprintf(stderr, "Error: mmap() for shared cache at %s failed, errno=%d\n", sharedCachePath, errno);
		exit(1);
	}

	if ( options.mode == modeSlideInfo ) {
		const dyldCacheHeader<LittleEndian>* header = (dyldCacheHeader<LittleEndian>*)options.mappedCache;
		if ( header->slideInfoOffset() == 0 ) {
			fprintf(stderr


   queue_cur->trim_done = 1;

    if (len != queue_cur->len) len = queue_cur->len;

  }

  memcpy(out_buf, in_buf, len);

  /*********************
   * PERFORMANCE SCORE *
   *********************/
//分数 计算；对分数的计算（比如上下文敏感的情况，可以在里面调整分数的计算机制）
//“分数计算”的函数论文中用到比较多
  orig_perf = perf_score = calculate_score(queue_cur);

  /* Skip right away if -d is given, if we have done deterministic fuzzing on
     this entry ourselves (was_fuzzed), or if it has gone through deterministic
     testing in earlier, resumed runs (passed_det). */
//如果已经经过了确定性变异（也就是bit、ari、int、dic的确定性变异）
  if (skip_deterministic || queue_cur->was_fuzzed || queue_cur->passed_det)
    goto havoc_stage;

  /* Skip deterministic fuzzing if exec path checksum puts this out of scope
     for this master instance. */

  if (master_max && (queue_cur->exec_cksum % master_max) != master_id - 1)
    goto havoc_stage;

  doing_det = 1;
//**********************
//种子变异开始！！！
//**********************
  /*********************************************
   * SIMPLE BITFLIP (+dictionary construction) *
   *********************************************/
//位翻转（同时会有自动的字典生成【tokens】）
//定义位翻转的函数宏定义
#define FLIP_BIT(_ar, _b) do { \
    u8* _arf = (u8*)(_ar); \
    u32 _bf = (_b); \
    _arf[(_bf) >> 3] ^= (128 >> ((_bf) & 7)); \
  } while (0)

  /* Single walking bit. */

  stage_short = "flip1";
  stage_max   = len << 3;
  stage_name  = "bitflip 1/1";

  stage_val_type = STAGE_VAL_NONE;

  orig_hit_cnt = queued_paths + unique_crashes;

  prev_cksum = queue_cur->exec_cksum;

  for (stage_cur = 0; stage_cur < stage_max; stage_cur++) {

    stage_cur_byte = stage_cur >> 3;

    FLIP_BIT(out_buf, stage_cur);

    if (common_fuzz_stuff(argv, out_buf, len)) goto abandon_entry;

    FLIP_BIT(out_buf, stage_cur);

    /* While flipping the least significant bit in every byte, pull of an extra
       trick to detect possible syntax tokens. In essence, the idea is that if
       you have a binary blob like this:

       xxxxxxxxIHDRxxxxxxxx

       ...and changing the leading and trailing bytes causes variable or no
       changes in program flow, but touching any character in the "IHDR" string
       always produces the same, distinctive path, it's highly likely that
       "IHDR" is an atomically-checked magic value of special significance to
       the fuzzed format.

       We do this here, rather than as a separate stage, because it's a nice
       way to keep the operation approximately "free" (i.e., no extra execs).

       Empirically, performing the check when flipping the least significant bit
       is advantageous, compared to doing it at the time of more disruptive
       changes, where the program flow may be affected in more violent ways.

       The caveat is that we won't generate dictionaries in the -d mode or -S
       mode - but that's probably a fair trade-off.

       This won't work particularly well with paths that exhibit variable
       behavior, but fails gracefully, so we'll carry out the checks anyway.

      */
//怎么选择token，加到自动的字典里
    if (!dumb_mode && (stage_cur & 7) == 7) {

      u32 cksum = hash32(trace_bits, MAP_SIZE, HASH_CONST);

      if (stage_cur == stage_max - 1 && cksum == prev_cksum) {

        /* If at end of file and we are still collecting a string, grab the
           final character and force output. */

        if (a_len < MAX_AUTO_EXTRA) a_collect[a_len] = out_buf[stage_cur >> 3];
        a_len++;

        if (a_len >= MIN_AUTO_EXTRA && a_len <= MAX_AUTO_EXTRA)
          maybe_add_auto(a_collect, a_len);

      } else if (cksum != prev_cksum) {

        /* Otherwise, if the checksum has changed, see if we have something
           worthwhile queued up, and collect that if the answer is yes. */

        if (a_len >= MIN_AUTO_EXTRA && a_len <= MAX_AUTO_EXTRA)
          maybe_add_auto(a_collect, a_len);

        a_len = 0;
        prev_cksum = cksum;

      }

      /* Continue collecting string, but only if the bit flip actually made
         any difference - we don't want no-op tokens. */

      if (cksum != queue_cur->exec_cksum) {

        if (a_len < MAX_AUTO_EXTRA) a_collect[a_len] = out_buf[stage_cur >> 3];
        a_len++;

      }

    }

  }

  new_hit_cnt = queued_paths + unique_crashes;

  stage_finds[STAGE_FLIP1]  += new_hit_cnt - orig_hit_cnt;
  stage_cycles[STAGE_FLIP1] += stage_max;

  /* Two walking bits. */

  stage_name  = "bitflip 2/1";
  stage_short = "flip2";
  stage_max   = (len << 3) - 1;

  orig_hit_cnt = new_


ia] AS [e.Key.ShipVia], [t].[$inner.Key.Freight] AS [e.Key.Freight], [t].[$inner.Key.ShipName] AS [e.Key.ShipName], [t].[$inner.Key.ShipAddress] AS [e.Key.ShipAddress], [t].[$inner.Key.ShipCity] AS [e.Key.ShipCity], [t].[$inner.Key.ShipRegion] AS [e.Key.ShipRegion], [t].[$inner.Key.ShipPostalCode] AS [e.Key.ShipPostalCode], [t].[$inner.Key.ShipCountry] AS [e.Key.ShipCountry], (
    SELECT [d].[OrderID] AS [OrderID], [d].[ProductID] AS [ProductID], [d].[UnitPrice] AS [UnitPrice], [d].[Quantity] AS [Quantity], [d].[Discount] AS [Discount]
    FROM [dbo].[Order Details] AS [d]
    INNER JOIN [dbo].[Orders] AS [o] ON [d].[OrderID] = [o].[OrderID]
    WHERE [t].[$inner.Key.OrderID] = [o].[OrderID]
    FOR JSON PATH
) AS [e.Elements]
FROM (
    SELECT [o_0].[OrderID] AS [$outer.OrderID], [o_0].[CustomerID] AS [$outer.CustomerID], [o_0].[EmployeeID] AS [$outer.EmployeeID], [o_0].[OrderDate] AS [$outer.OrderDate], [o_0].[RequiredDate] AS [$outer.RequiredDate], [o_0].[ShippedDate] AS [$outer.ShippedDate], [o_0].[ShipVia] AS [$outer.ShipVia], [o_0].[Freight] AS [$outer.Freight], [o_0].[ShipName] AS [$outer.ShipName], [o_0].[ShipAddress] AS [$outer.ShipAddress], [o_0].[ShipCity] AS [$outer.ShipCity], [o_0].[ShipRegion] AS [$outer.ShipRegion], [o_0].[ShipPostalCode] AS [$outer.ShipPostalCode], [o_0].[ShipCountry] AS [$outer.ShipCountry], [o_0].[OrderID] AS [$inner.Key.OrderID], [o_0].[CustomerID] AS [$inner.Key.CustomerID], [o_0].[EmployeeID] AS [$inner.Key.EmployeeID], [o_0].[OrderDate] AS [$inner.Key.OrderDate], [o_0].[RequiredDate] AS [$inner.Key.RequiredDate], [o_0].[ShippedDate] AS [$inner.Key.ShippedDate], [o_0].[ShipVia] AS [$inner.Key.ShipVia], [o_0].[Freight] AS [$inner.Key.Freight], [o_0].[ShipName] AS [$inner.Key.ShipName], [o_0].[ShipAddress] AS [$inner.Key.ShipAddress], [o_0].[ShipCity] AS [$inner.Key.ShipCity], [o_0].[ShipRegion] AS [$inner.Key.ShipRegion], [o_0].[ShipPostalCode] AS [$inner.Key.ShipPostalCode], [o_0].[ShipCountry] AS [$inner.Key.ShipCountry]
    FROM [dbo].[Order Details] AS [d_0]
    INNER JOIN [dbo].[Orders] AS [o_0] ON [d_0].[OrderID] = [o_0].[OrderID]
    GROUP BY [o_0].[OrderID], [o_0].[CustomerID], [o_0].[EmployeeID], [o_0].[OrderDate], [o_0].[RequiredDate], [o_0].[ShippedDate], [o_0].[ShipVia], [o_0].[Freight], [o_0].[ShipName], [o_0].[ShipAddress], [o_0].[ShipCity], [o_0].[ShipRegion], [o_0].[ShipPostalCode], [o_0].[ShipCountry]
) AS [t]
INNER JOIN [dbo].[Customers] AS [c] ON [t].[$outer.CustomerID] = [c].[CustomerID]",
                context.SqlLog);
        }

        [TestMethod]
        public void GroupBy3_navigation_aggregate_key()
        {
            var query
                = context.OrderDetails
                    .GroupBy(
                        d => d.Order,
                        (k, e) => new { k.OrderID, e })
                    .Select(
                        g => new
                        {


kage com.example.trabajo

import android.content.Intent
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.os.Handler
import android.os.Looper
import android.view.WindowManager.LayoutParams.*
import kotlinx.coroutines.delay

class SplashActivity : AppCompatActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_splash)
        window.setFlags(
            FLAG_FULLSCREEN,
            FLAGS_CHANGED
        )

        Handler(Looper.getMainLooper()).postDelayed({
            val intent = Intent(this, WelcomeActivity::class.java)
            startActivity(intent)
            finish()
        }, 2000)
    }
}// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
    id("com.android.application") version "8.1.3" apply false
    id("org.jetbrains.kotlin.android") version "1.9.0" apply false
}package com.example.family_protection_app

import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle

class MainActivity : AppCompatActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)
    }
}// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
    id("com.android.application") version "8.2.2" apply false
    id("com.google.gms.google-services") version "4.4.1" apply false
}allprojects {
    repositories {
        google()
        mavenCentral()
    }
}

val newBuildDir: Directory =
    rootProject.layout.buildDirectory
        .dir("../../build")
        .get()
rootProject.layout.buildDirectory.value(newBuildDir)

subprojects {
    val newSubprojectBuildDir: Directory = newBuildDir.dir(project.name)
    project.layout.buildDirectory.value(newSubprojectBuildDir)
}
subprojects {
    project.evaluationDependsOn(":app")
}

tasks.register<Delete>("clean") {
    delete(rootProject.layout.buildDirectory)
}
plugins {
    alias(libs.plugins.androidApplication)
    alias(libs.plugins.kotlinAndroid)
    alias(libs.plugins.compose.compiler)
    kotlin("plugin.serialization") version "1.9.0"
    id("com.google.firebase.crashlytics")
    id("com.google.gms.google-services")
    id("kotlin-kapt")
}
apply(plugin= "com.mikepenz.aboutlibraries.plugin")

android {
    namespace = "com.rgr.fosdem.android"
    compileSdk = 34
    defaultConfig {
        applicationId = "com.rgr.fosdem.android"
        minSdk = 27
        targetSdk = 34
        versionCode = 20240130
        versionName = "0.5.1"
    }
    buildFeatures {
        compose = true
    }

    packaging {
        resources {
            excludes += "/META-INF/{AL2.0,LGPL2.1}"
        }
    }
    buildTypes {
        getByName("debug") {
            buildConfigField("String[]", "languages", "{\"English\",\"Français\",\"Español\"}")
            buildConfigField("String", "license", "\"https://www.apache.org/licenses/LICENSE-2.0.txt\"")
            buildConfigField("String", "linkedIn", "\"https://www.linkedin.com/in/rgr92\"")
            buildConfigField("String", "gitHub", "\"https://github.com/brickbit/fosdem_app\"")
            buildConfigField("String", "location", "\"https://fosdem.org/2024/practical/transportation/\"")
            buildConfigField("String", "scheduleSaturday", "\"https://fosdem.


  // Default presets
        Config.recovery = getBool("RECOVERYMODE")
        Config.keepVerity = getBool("KEEPVERITY")
        Config.keepEnc = getBool("KEEPFORCEENCRYPT")

        return true
    }
}
import org.gradle.api.DefaultTask
import org.gradle.api.file.DirectoryProperty
import org.gradle.api.file.RegularFileProperty
import org.gradle.api.provider.Property
import org.gradle.api.tasks.*
import java.io.ByteArrayInputStream
import java.io.ByteArrayOutputStream
import java.io.File
import java.io.PrintStream
import java.security.SecureRandom
import java.util.*
import javax.crypto.Cipher
import javax.crypto.CipherOutputStream
import javax.crypto.spec.IvParameterSpec
import javax.crypto.spec.SecretKeySpec
import kotlin.random.asKotlinRandom

// Set non-zero value here to fix the random seed for reproducible builds
// CI builds are always reproducible
val RAND_SEED = if (System.getenv("CI") != null) 42 else 0
private lateinit var RANDOM: Random
private val kRANDOM get() = RANDOM.asKotlinRandom()

private val c1 = mutableListOf<String>()
private val c2 = mutableListOf<String>()
private val c3 = mutableListOf<String>()

fun initRandom(dict: File) {
    RANDOM = if (RAND_SEED != 0) Random(RAND_SEED.toLong()) else SecureRandom()
    c1.clear()
    c2.clear()
    c3.clear()
    for (a in chain('a'..'z', 'A'..'Z')) {
        if (a != 'a' && a != 'A') {
            c1.add("$a")
        }
        for (b in chain('a'..'z', 'A'..'Z', '0'..'9')) {
            c2.add("$a$b")
            for (c in chain('a'..'z', 'A'..'Z', '0'..'9')) {
                c3.add("$a$b$c")
            }
        }
    }
    c1.shuffle(RANDOM)
    c2.shuffle(RANDOM)
    c3.shuffle(RANDOM)
    PrintStream(dict).use {
        for (c in chain(c1, c2, c3)) {
            it.println(c)
        }
    }
}

private fun <T> chain(vararg iters: Iterable<T>) = sequence {
    iters.forEach { it.forEach { v -> yield(v) } }
}

private fun PrintStream.byteField(name: String, bytes: ByteArray) {
    println("public static byte[] $name() {")
    print("byte[] buf = {")
    print(bytes.joinToString(",") { it.toString() })
    println("};")
    println("return buf;")
    println("}")
}

@CacheableTask
abstract class ManifestUpdater: DefaultTask() {
    @get:Input
    abstract val applicationId: Property<String>

    @get:InputFile
    @get:PathSensitive(PathSensitivity.RELATIVE)
    abstract val mergedManifest: RegularFileProperty

    @get:InputFiles
    @get:PathSensitive(PathSensitivity.RELATIVE)
    abstract val factoryClassDir: DirectoryProperty

    @get:InputFiles
    @get:PathSensitive(PathSensitivity.RELATIVE)
    abstract val appClassDir: DirectoryProperty

    @get:OutputFile
    abstract val outputManifest: RegularFileProperty

    @TaskAction
    fun taskAction() {
        fun String.ind(level: Int) = replaceIndentByMargin("    ".repeat(level))

        val cmpList = mutableListOf<String>()

        cmpList.add("""
            |<provider
            |    android:name="x.COMPONENT_PLACEHOLDER_0"
            |    android:authorities="${'$'}{applicationId}.provider"
            |    android:directBootAware="true"
            |    android:exported="false"
            |    android:grantUriPermissions="true" />""".


::ffi::CStr {
        ::std::ffi::CStr::from_bytes_with_nul(b"VK_EXT_direct_mode_display\0")
            .expect("Wrong extension string")
    }
}
#[allow(non_camel_case_types)]
pub type PFN_vkReleaseDisplayEXT =
    extern "system" fn(physical_device: PhysicalDevice, display: DisplayKHR) -> Result;
pub struct ExtDirectModeDisplayFn {
    pub release_display_ext:
        extern "system" fn(physical_device: PhysicalDevice, display: DisplayKHR) -> Result,
}
unsafe impl Send for ExtDirectModeDisplayFn {}
unsafe impl Sync for ExtDirectModeDisplayFn {}
impl ::std::clone::Clone for ExtDirectModeDisplayFn {
    fn clone(&self) -> Self {
        ExtDirectModeDisplayFn {
            release_display_ext: self.release_display_ext,
        }
    }
}
impl ExtDirectModeDisplayFn {
    pub fn load<F>(mut _f: F) -> Self
    where
        F: FnMut(&::std::ffi::CStr) -> *const c_void,
    {
        ExtDirectModeDisplayFn {
            release_display_ext: unsafe {
                extern "system" fn release_display_ext(
                    _physical_device: PhysicalDevice,
                    _display: DisplayKHR,
                ) -> Result {
                    panic!(concat!("Unable to load ", stringify!(release_display_ext)))
                }
                let raw_name = stringify!(vkReleaseDisplayEXT);
                let cname = ::std::ffi::CString::new(raw_name).unwrap();
                let val = _f(&cname);
                if val.is_null() {
                    release_display_ext
                } else {
                    ::std::mem::transmute(val)
                }
            },
        }
    }
    #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkReleaseDisplayEXT.html>"]
    pub unsafe fn release_display_ext(
        &self,
        physical_device: PhysicalDevice,
        display: DisplayKHR,
    ) -> Result {
        (self.release_display_ext)(physical_device, display)
    }
}
impl ExtAcquireXlibDisplayFn {
    pub fn name() -> &'static ::std::ffi::CStr {
        ::std::ffi::CStr::from_bytes_with_nul(b"VK_EXT_acquire_xlib_display\0")
            .expect("Wrong extension string")
    }
}
#[allow(non_camel_case_types)]
pub type PFN_vkAcquireXlibDisplayEXT = extern "system" fn(
    physical_device: PhysicalDevice,
    dpy: *mut Display,
    display: DisplayKHR,
) -> Result;
#[allow(non_camel_case_types)]
pub type PFN_vkGetRandROutputDisplayEXT = extern "system" fn(
    physical_device: PhysicalDevice,
    dpy: *mut Display,
    rr_output: RROutput,
    p_display: *mut DisplayKHR,
) -> Result;
pub struct ExtAcquireXlibDisplayFn {
    pub acquire_xlib_display_ext: extern "system" fn(
        physical_device: PhysicalDevice,
        dpy: *mut Display,
        display: DisplayKHR,
    ) -> Result,
    pub get_rand_r_output_display_ext: extern "system" fn(
        physical_device: PhysicalDevice,
        dpy: *mut Display,
        rr_output: RROutput,
        p_display: *mut DisplayKHR,
    ) -> Result,
}
unsafe impl Send for ExtAcquireXlibDisplayFn {}
unsafe impl Sync for ExtAcquireXlibDisplayFn {}
impl ::std::clone::Clone for ExtAcquireXlibDisplayFn {
    fn clone(&self) -> Self {
        ExtAcquireXlibDisplayFn {
            acquire_xlib_display_ext: self.acquire_xlib_display_ext,
            get_rand_r_output_display_ext: self.get_rand_r_output_displ


 (mfhd_id == null) {
                MarcRecordBuilder builder = MarcRecordBuilderFactory.newBuilder();
                MarcRecord holdRecord = builder.createMarcRecord();
                java.util.Date date= new java.util.Date();
                Format sdf = new SimpleDateFormat("yyMMdd");
                String timestamp = sdf.format(date);
                String val008 = timestamp + "||0000|||||001||||||000000";
                holdRecord.setLeader("     nx  a22     1n 4500");
                holdRecord.addField(holdRecord.createControlfield("004", bibToBeSaved.getShortId()));
                holdRecord.addField(holdRecord.createControlfield("008", val008));
                holdRecord.addField(holdRecord
                        .createDatafield("852")
                        .setIndicator(0, ' ')
                        .setIndicator(1, ' ')
                        .addSubfield('b', sigel)
                        .addSubfield('x', non_public_note)
                        .addSubfield('z', "Digitaliserat exemplar")
                        .addSubfield('z', "Fritt tillgängligt via internet"));
                // skapa ny beståndspost
                // lägg till beståndspost
                {
                    ByteArrayOutputStream baos = new ByteArrayOutputStream();
                    MarcXmlRecordWriter marcXmlRecordWriter = new MarcXmlRecordWriter(baos);
                    marcXmlRecordWriter.writeRecord(eRecord);
                    Document holdToBeSaved = Utils.convertToRDF(baos.toString("UTF-8"), "hold", null, false);
                    Utils.s_whelk.createDocument(holdToBeSaved, Utils.APIX_SYSTEM_CODE, request.getRemoteUser(), "hold", false);
                    out.write(holdToBeSaved.getShortId() + "\tMFHD CREATED\n");
                }
            }

            if (newbib) {
                String digid = r2.getShortId();
                Datafield df776_2 = printRecord.createDatafield("776")
                        .setIndicator(0, '0')
                        .setIndicator(1, '8')
                        .addSubfield('i', "Digitaliserad version:");
                addSubfieldIfExists(df776_2, 'a', getSubfieldDataAsString(eRecord, "100|110|111|130", "a"));
                addSubfieldIfExists(df776_2, 't', getSubfieldDataAsString(eRecord, "222|245", null));
                addSubfieldIfExists(df776_2, 'd', getSubfieldDataAsString(eRecord, "260", "c"));
                addSubfieldIfExists(df776_2, 'x', getSubfieldDataAsString(printRecord, "020", "a"));
                addSubfieldIfExists(df776_2, 'z', getSubfieldDataAsString(printRecord, "022", "a"));
                df776_2.addSubfield('w', digid);
                printRecord.addField(df776_2);

                // lägg till länk från tryck till digi

                // något med printRecord ...

                // spara tryck
                {
                    ByteArrayOutputStream baos = new ByteArrayOutputStream();
                    MarcXmlRecordWriter marcXmlRecordWriter = new MarcXmlRecordWriter(baos);
                    marcXmlRecordWriter.writeRecord(eRecord);
                    Document printBibToBeSaved = Utils.convertToRDF(baos.toString("UTF-8"), "bib", null, true);
                    Utils.s_whelk.storeAtomicUpdate(printBibToBeSaved.getShortId(), false, false,
                            Utils.APIX_SYSTEM_CODE, request.getRemoteUser(), (Document doc) -> doc.data = printBibToBeSaved.data);
                    out.write(printBibToBeSaved.getShortId() + "\tPRINT UPDATED\n");
                }
            }
        }

        response.setStatus(HttpServletResponse.SC_OK);
        response.setContentType("text/plain");
        ServletOutputStream outStream = response


instances)
  // into config blocks.
}).
run(function(injectables) { // instance-injector
  // This is an example of a run block.
  // You can have as many of these as you want.
  // You can only inject instances (not Providers)
  // into run blocks
});

Configuration Blocks

There are some convenience methods on the module which are equivalent to the config block. For
example:

angular.module('myModule', []).
  value('a', 123).
  factory('a', function() { return 123; }).
  directive('directiveName', ...).
  filter('filterName', ...);

// is same as

angular.module('myModule', []).
  config(function($provide, $compileProvider, $filterProvider) {
    $provide.value('a', 123);
    $provide.factory('a', function() { return 123; });
    $compileProvider.directive('directiveName', ...);
    $filterProvider.register('filterName', ...);
  });

When bootstrapping, first Angular applies all constant definitions.
Then Angular applies configuration blocks in the same order they were registered.

Run Blocks

Run blocks are the closest thing in Angular to the main method. A run block is the code which
needs to run to kickstart the application. It is executed after all of the services have been
configured and the injector has been created. Run blocks typically contain code which is hard
to unit-test, and for this reason should be declared in isolated modules, so that they can be
ignored in the unit-tests.

Dependencies

Modules can list other modules as their dependencies. Depending on a module implies that the required
module needs to be loaded before the requiring module is loaded. In other words the configuration
blocks of the required modules execute before the configuration blocks of the requiring module.
The same is true for the run blocks. Each module can only be loaded once, even if multiple other
modules require it.

Asynchronous Loading

Modules are a way of managing $injector configuration, and have nothing to do with loading of
scripts into a VM. There are existing projects which deal with script loading, which may be used
with Angular. Because modules do nothing at load time they can be loaded into the VM in any order
and thus script loaders can take advantage of this property and parallelize the loading process.

Creation versus Retrieval

Beware that using angular.module('myModule', []) will create the module myModule and overwrite any
existing module named myModule. Use angular.module('myModule') to retrieve an existing module.

var myModule = angular.module('myModule', []);

// add some directives and services
myModule.service('myService', ...);
myModule.directive('myDirective', ...);

// overwrites both myService and myDirective by creating a new module
var myModule = angular.module('myModule', []);

// throws an error because myOtherModule has yet to be defined
var myModule = angular.module('myOtherModule');

<h1 id="uni


一个字符串的输出rune序列相同。错误的utf-8编码会翻译为
	//	U+FFFD = "\xef\xbf\xbd"，但只会消耗一个字节。调用者无法区分正确编码的rune和错误编码的rune。
	//
	//
	//func ScanWords(data []byte, atEOF bool) (advance int, token []byte, err error)
	//	ScanRunes是用于Scanner类型的分割函数（符合SplitFunc），本函数会将空白（参见unicode.IsSpace）
	//	分隔的片段（去掉前后空白后）作为一个token返回。本函数永远不会返回空字符串。
	//
	//
	//func ScanLines(data []byte, atEOF bool) (advance int, token []byte, err error)
	//	ScanRunes是用于Scanner类型的分割函数（符合SplitFunc），本函数会将每一行文本去掉末尾的换行标记作
	//	为一个token返回。返回的行可以是空字符串。换行标记为一个可选的回车后跟一个必选的换行符。最后一行即
	//	使没有换行符也会作为一个token返回。
}

package main

import (
	//"bytes"
	"fmt"
	"github.com/axgle/mahonia"
	"log"
	"os"
	"os/exec"
	//"io"
)

//src为要转换的字符串，srcCode为待转换的编码格式，targetCode为要转换的编码格式
func ConvertToByte(src string, srcCode string, targetCode string) []byte {
	srcCoder := mahonia.NewDecoder(srcCode)
	srcResult := srcCoder.ConvertString(src)
	tagCoder := mahonia.NewDecoder(targetCode)
	_, cdata, _ := tagCoder.Translate([]byte(srcResult), true)
	return cdata
}

func main() {
	for key, value := range os.Environ() {
		fmt.Println(key, ":",value)
	}
	// LookPath在由PATH环境变量命名的目录中搜索一个名为可执行文件的文件。
	//如果文件包含斜杠，则直接尝试使用该斜杠，并且不查询PATH。
	// LookPath还使用PATHEXT环境变量来匹配合适的候选者。
	//结果可能是绝对路径，也可能是相对于当前目录的路径。
	//path, err := exec.LookPath("go.exe")
	path, err := exec.LookPath(`C:\Go\bin\go.exe`)//也可以给一个完整的路径
	if err != nil {
		log.Fatal("在当前系统的环境变量中无法找到相应的文件")
	}
	fmt.Println(path)//C:\Go\bin\go.exe
	fmt.Printf("找到了，路径是：%s\n", path)

	fmt.Println("-------------------")
	cmd := exec.Command(`ping`,"www.baidu.com" )
	//cmd


se+size-1"
        to fit in bits [17:0] or bits[25:0] for 8 bits of device ID */
    if (base < (1ull<<34))
    {
        needed_subid.s.ba = destid;
        needed_s2m_type.s.iaow_sel = 0;
    }
    else if (base < (1ull<<42))
    {
        needed_subid.s.ba = (base>>34) & 0xff;
        needed_subid.s.ba |= ((uint64_t)destid & 0xff) << (42-34);
        needed_subid.s.ba |= (((uint64_t)destid>>8) & 0xff) << (51-34);
        needed_s2m_type.s.iaow_sel = 1;
    }
    else
    {
        if (destid>>8)
        {
            cvmx_dprintf("SRIO%d: Attempt to map 16bit device ID 0x%x using 66bit addressing\n", srio_port, destid);
            return 0;
        }
        if (base>>50)
        {
            cvmx_dprintf("SRIO%d: Attempt to map address 0x%llx using 66bit addressing\n", srio_port, (ULL)base);
            return 0;
        }
        needed_subid.s.ba = (base>>34) & 0xffff;
        needed_subid.s.ba |= ((uint64_t)destid & 0xff) << (51-34);
        needed_s2m_type.s.iaow_sel = 2;
    }

    /* Find a S2M_TYPE index to use. If this fails return 0 */
    s2m_index = __cvmx_srio_alloc_s2m(srio_port, needed_s2m_type);
    if (s2m_index == -1)
        return 0;

    /* Attach the SubID to the S2M_TYPE index */
    needed_subid.s.rtype = s2m_index & 3;
    needed_subid.s.wtype = s2m_index & 3;
    needed_subid.s.ba |= (((uint64_t)s2m_index >> 2) & 1) << (50-34);
    needed_subid.s.ba |= (((uint64_t)s2m_index >> 3) & 1) << (59-34);

    /* Allocate a SubID for use */
    subdid = __cvmx_srio_alloc_subid(needed_subid);
    if (subdid == -1)
    {
        /* Free the s2m_index as we aren't using it */
        __cvmx_srio_free_s2m(srio_port, s2m_index);
        return 0;
    }

    /* Build the final core physical address */
    sli_address.u64 = 0;
    sli_address.mem.io = 1;
    sli_address.mem.did = 3;
    sli_address.mem.subdid = subdid>>2;
    sli_address.mem.se = subdid & 3;
    sli_address.mem.address = base; /* Bits[33:0] of full address */
    return sli_address.u64;
}

/**
 * Unmap a physical address window created by cvmx_srio_phys_map().
 *
 * @param physical_address
 *               Physical address returned by cvmx_srio_phys_map().
 * @param size   Size used on original call.
 *
 * @return Zero on success, negative on failure.
 */
int cvmx_srio_physical_unmap(uint64_t physical_address, uint64_t size)
{
    cvmx_sli_mem_access_subidx_t subid;
    int subdid = (physical_address >> 40) & 7;
    int extender = (physical_address >> 34) & 3;
    int mem_index = subdid * 4 + extender;
    int read_s2m_type;

    /* Get the subid setup so we can figure out where this mapping was for */
    subid.u64 = cvmx_read_csr(CVMX_PEXP_SLI_MEM_ACCESS_SUBIDX(mem_index));
    /* Type[0] is mapped to the Relaxed Ordering
       Type[1] is mapped to the No Snoop
       Type[2] is mapped directly to bit 50 of the SLI address
       Type[3] is mapped directly to bit 59 of the SLI address */
    read_s2m_type = ((subid.s.ba>>(50-34))&1<<2) | ((subid.s.ba>>(59-34))&1<<3);
    read_s2m_type |= subid.s.rtype;
    __cvmx_srio_free_subid(mem_index);
    __cvmx_srio_free_s2m(subid.s.port, read_s2m_type);
    return 0;
}
#endif


data);
	    if (ret) {
		kadm5_free_principal_ent(context, out);
		goto out;
	    }
	}
	if(ret){
	    kadm5_free_principal_ent(context, out);
	    goto out;
	}

	ret = hdb_entry_get_aliases(&ent.entry, &aliases);
	if (ret == 0 && aliases) {
	    krb5_data buf;
	    size_t len;

	    ASN1_MALLOC_ENCODE(HDB_Ext_Aliases, buf.data, buf.length,
			       aliases, &len, ret);
	    if (ret) {
		kadm5_free_principal_ent(context, out);
		goto out;
	    }
	    if (len != buf.length)
		krb5_abortx(context->context,
			    "internal ASN.1 encoder error");
	    ret = add_tl_data(out, KRB5_TL_ALIASES, buf.data, buf.length);
	    free(buf.data);
	    if (ret) {
		kadm5_free_principal_ent(context, out);
		goto out;
	    }
	}
	if(ret){
	    kadm5_free_principal_ent(context, out);
	    goto out;
	}

    }
out:
    hdb_free_entry(context->context, &ent);

    return _kadm5_error_code(ret);
}


 !important; }
  .layout-composed .page-content .page-breadcrumb,
  .layout-composed .page-content .subheader {
    display: none; }

/* responsive helpers */
@media only screen and (max-width: 992px) {
  /* layout composed mobile only */
  .layout-composed-mobile .page-content {
    padding: 0 !important; }
    .layout-composed-mobile .page-content .page-breadcrumb,
    .layout-composed-mobile .page-content .subheader {
      display: none; }
  /* positions on mobile view */
  .position-on-mobile-absolute {
    position: absolute !important; }
  .position-on-mobile-relative {
    position: relative !important; }
  .position-on-mobile-static {
    position: static !important; }
  /* RESET HEIGHTS */
  .height-mobile-auto {
    height: auto;
    min-height: auto;
    max-height: auto; }
  .width-mobile-auto {
    width: auto;
    min-width: auto;
    max-width: auto; }
  /* FULL HEIGHT ON MOBILE */
  .expand-full-height-on-mobile {
    height: calc(100vh - 4.125rem) !important; }
  .expand-full-width-on-mobile {
    width: 100vw !important;
    max-width: 100vw !important; } }

/* list style none */
.list-style-none {
  list-style: none; }
  .list-style-none ul {
    list-style: none; }

/* row grid */
.row-grid {
  overflow: hidden; }
  .row-grid > .col,
  .row-grid > [class^="col-"],
  .row-grid > [class*=" col-"],
  .row-grid > [class^="col "],
  .row-grid > [class*=" col "],
  .row-grid > [class$=" col"],
  .row-grid > [class="col"] {
    position: relative; }
  .row-grid > .col:after,
  .row-grid > [class^="col-"]:after,
  .row-grid > [class*=" col-"]:after,
  .row-grid > [class^="col "]:after,
  .row-grid > [class*=" col "]:after,
  .row-grid > [class$=" col"]:after,
  .row-grid > [class="col"]:after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: -1px;
    display: block;
    width: 0;
    border-left: 1px solid rgba(29, 29, 29, 0.07); }
  .row-grid > .col:before,
  .row-grid > [class^="col-"]:before,
  .row-grid > [class*=" col-"]:before,
  .row-grid > [class^="col "]:before,
  .row-grid > [class*=" col "]:before,
  .row-grid > [class$=" col"]:before,
  .row-grid > [class="col"]:before {
    content: "";
    position: absolute;
    right: 0;
    bottom: -1px;
    left: 0;
    display: block;
    height: 0;
    border-top: 1px solid rgba(29, 29, 29, 0.07); }

/* List table */
.list-table {
  height: auto;
  display: table;
  margin: 0;
  padding: 0; }
  .list-table > li {
    display: table-cell;
    vertical-align: middle;
    position: relative;
    padding: 0; }
    .list-table > li.search {
      position: static; }

/* mostly used for nav items */
.disabled:not(.btn),
.disabled:not(.btn) > * {
  -webkit-filter: grayscale(80%);
          filter: grayscale(80%);
  opacity: 0.80;
  cursor: not-allowed; }
  .disabled:not(.btn) ul,
  .disabled:not(.btn) .collapse-sign,
  .disabled:not(.btn


_messages.StepValidateResponse{IsValid: false, ErrorMessage: "my err msg", ErrorType: gauge_messages.StepValidateResponse_STEP_IMPLEMENTATION_NOT_FOUND}
			return &gauge_messages.Message{MessageType: gauge_messages.Message_StepValidateResponse, StepValidateResponse: res}, nil
		},
	}
	specVal := &SpecValidator{specification: &gauge.Specification{FileName: "foo.spec"}, runner: runner}
	valErr := specVal.validateStep(myStep)

	c.Assert(valErr, Not(Equals), nil)
	c.Assert(valErr.Error(), Equals, "foo.spec:3 Step implementation not found => 'my step'")
	c.Assert(valErr.(StepValidationError).suggestion, Equals, "")
}

func (s *MySuite) TestValidateStepInConcept(c *C) {
	HideSuggestion = false
	var suggestion bytes.Buffer
	parentStep := &gauge.Step{Value: "my concept", LineNo: 2, IsConcept: true, LineText: "my concept"}
	myStep := &gauge.Step{Value: "my step", LineText: "my step", IsConcept: false, LineNo: 3, Parent: parentStep}
	cptDict := gauge.NewConceptDictionary()
	cptDict.ConceptsMap["my concept"] = &gauge.Concept{ConceptStep: parentStep, FileName: "concept.cpt"}
	runner := &mockRunner{
		ExecuteMessageFunc: func(m *gauge_messages.Message) (*gauge_messages.Message, error) {
			suggestion.WriteString("\n\t@Step(\"my step\")\n\tpublic void implementation1(){\n\t\t// your code here...\n\t}")
			res := &gauge_messages.StepValidateResponse{IsValid: false, ErrorMessage: "my err msg", ErrorType: gauge_messages.StepValidateResponse_STEP_IMPLEMENTATION_NOT_FOUND, Suggestion: suggestion.String()}
			return &gauge_messages.Message{MessageType: gauge_messages.Message_StepValidateResponse, StepValidateResponse: res}, nil
		},
	}

	specVal := &SpecValidator{specification: &gauge.Specification{FileName: "foo.spec"}, conceptsDictionary: cptDict, runner: runner}
	valErr := specVal.validateStep(myStep)

	c.Assert(valErr, Not(Equals), nil)
	c.Assert(valErr.Error(), Equals, "concept.cpt:3 Step implementation not found => 'my step'")
	c.Assert(valErr.(StepValidationError).Suggestion(), Equals, "\n\t@Step(\"my step\")\n\t"+
		"public void implementation1(){\n\t"+
		"\t// your code here...\n\t"+
		"}")
}

func (s *MySuite) TestFilterDuplicateValidationErrors(c *C) {
	specText := `Specification Heading
=====================
Scenario 1
----------
* abc

Scenario 2
----------
* hello
`
	step := gauge.Step{
		Value: "abc",
	}
	step1 := gauge.Step{
		Value: "helo",
	}
	implNotFoundError := StepValidationError{
		step:       &step,
		errorType:  &implNotFound,
		suggestion: "suggestion",
	}
	dupImplFoundError := StepValidationError{
		step:       &step1,
		errorType:  &dupImplFound,
		suggestion: "suggestion1",
	}

	p := new(parser.SpecParser)
	spec, _, _ := p.Parse(specText, gauge.NewConceptDictionary(), "")

	errs := validationErrors{spec: []error{
		implNotFoundError,
		implNotFoundError,
		dupImplFoundError,
	}}

	want := []error{implNotFoundError, dupImplFoundError}

	got := FilterDuplicates(errs)

	c.Assert(got, DeepEquals, want)
}

type tableRow struct {
	name           string
	input          string
	tableRowsCount int
	err            error
}

var tableRowTests = []*tableRow{
	{"Valid single row number", "3", 5, nil},
	{"Invalid single row number", "2", 1, errors.New(


witchboard#Server-side%20Experiments">Switch on the test to be able to opt in
                }

}
@(league: pa.Season, tableEntries: List[pa.LeagueTableEntry], selectedTeams: List[String] = Nil)(implicit context: model.ApplicationContext, request: RequestHeader)

@views.html.football.main(s"${league.name} table") {
    <hgroup class="page-header">

@league.name table

    </hgroup>

                Pos
                Team
                P
                GD
                Pts

            @for((tableEntry, prevTableEntry) <- tableEntries.zip(None :: tableEntries.init.map(Option(_)))) {

 @if(prev.team.rank + 1 != tableEntry.team.rank) {table-row--divider} else {}}.getOrElse("")'>
                @tableEntry.team.rank
                @tableEntry.team.name
                @tableEntry.team.total.played
                @tableEntry.team.goalDifference
                @tableEntry.team.points

            }

}

27. The Competition will be governed by English law.

Print this

Share

<img
                src="http://static.guim.co.uk/static/6d5811c93d9b815024b5a6c