text:
<?php

declare(strict_types=1);

namespace Vpn\Portal;

use GMP;
use Vpn\Portal\Exception\IpException;

/**
 * This class would be a lot simpler if only IPv4 existed with 32 bit
 * addresses :-).
 */
class Ip
{
    public const IP_4 = 4;
    public const IP_6 = 6;

    private GMP $ipAddress;
    private int $ipPrefix;
    private int $ipFamily;

    private function __construct(GMP $ipAddress, int $ipPrefix, int $ipFamily)
    {
        $this->ipAddress = $ipAddress;
        $this->ipPrefix = $ipPrefix;
        $this->ipFamily = $ipFamily;
    }

    public function __toString(): string
    {
        return $this->address().'/'.$this->ipPrefix;
    }

    public static function fromIp(string $ipAddress, ?int $ipPrefix = null): self
    {
        if (false === strpos($ipAddress, ':')) {
            // IPv4
            return self::fromIpFour($ipAddress, $ipPrefix);
        }

        // IPv6
        return self::fromIpSix($ipAddress, $ipPrefix);
    }

    public static function fromIpPrefix(string $ipAddressPrefix): self
    {
        if (false === strpos($ipAddressPrefix, '/')) {
            // no prefix specified
            return self::fromIp($ipAddressPrefix);
        }

        [$ipAddress, $ipPrefix] = explode('/', $ipAddressPrefix, 2);

        return self::fromIp($ipAddress, (int) $ipPrefix);
    }

    public function address(): string
    {
        return self::toAddress($this->ipAddress, $this->addressBits());
    }

    public function network(): self
    {
        return self::fromIp(
            self::toAddress(
                gmp_and(
                    $this->ipAddress,
                    gmp_and(
                        gmp_sub(gmp_pow(2, $this->addressBits()), 1),
                        gmp_sub(gmp_pow(2, $this->addressBits()), gmp_pow(2, $this->addressBits() - $this->ipPrefix))
                    )
                ),
                $this->addressBits()
            ),
            $this->ipPrefix
        );
    }

    public function netmask(): string
    {
        return self::toAddress(
            gmp_xor(
                gmp_sub(gmp_pow(2, $this->addressBits()), 1),
                gmp_sub(gmp_pow(2, $this->addressBits() - $this->ipPrefix), 1),
            ),
            $this->addressBits()
        );
    }

    /**
     * Get the number of available IP addresses in the network represented by
     * the IP range specified in this object.
     */
    public function numberOfHostsFour(): int
    {
        if (self::IP_4 !== $this->ipFamily) {
            throw new IpException('IPv4 only');
        }

        return 2 ** (32 - $this->ipPrefix) - 2;
    }

    /**
     * Get the first usable IP in the network represented by the IP range
     * specified in this object.
     */
    public function firstHost(): string
    {
        if (self::IP_4 === $this->ipFamily && 31 <= $this->ipPrefix) {
            throw new IpException('network not big enough');
        }
        if (self::IP_6 === $this->ipFamily && 127 <= $this->ipPrefix) {
            throw new IpException('network not big enough');
        }

        return self::toAddress(
            gmp_add(
                self::fromAddress($this->network()->address()),
                1
            ),
            $this->addressBits()
        );
    }

    public function lastHost(): string
    {
        return self::toAddress(
            gmp_add(
                self::fromAddress($this->network()->address()),
                gmp_sub(
                    gmp_pow(2, $this->addressBits() - $this->prefix()),
                    1
                )
            ),
            $this->addressBits()
        );
    }

    public function firstHostPrefix(): string
    {
        return $this->firstHost().'/'.$this->prefix();
    }

    /**
     * @return array{0:Ip,1:Ip}
     */
    public function splitInHalf(): array
    {
        if (self::IP_4 === $this->ipFamily && $this->ipPrefix > 31) {
            throw new IpException(sprintf('can not split prefix "/%d"', $this->ipPrefix));
        }

        if (self::IP_6 === $this->ipFamily && $this->ipPrefix > 127) {
            throw new IpException(sprintf('can not split prefix "/%d"', $this->ipPrefix));
        }

        $prefixBits = $this->ipPrefix + 1;
        $netIp = $this->network();
        $noOfHosts = gmp_pow(2, $this->addressBits() - $prefixBits);

        return [
            new self(
                self::fromAddress($netIp->address()),
                $prefixBits,
                $this->ipFamily
            ),
            new self(
                gmp_add($noOfHosts, self::fromAddress($netIp->address())),
                $prefixBits,
                $this->ipFamily
            ),
        ];
    }

    /**
     * @return array<Ip>
     */
    public function split(int $networkCount): array
    {
        // XXX what if we split in three?!
        // XXX introduce "maxPrefix" parameter?
        if (2 ** ($this->addressBits() - $this->ipPrefix - 2) < $networkCount) {
            throw new IpException('network too small to split in this many networks');
        }

        $requiredBits = (int) log($networkCount, 2);
        $prefixBits = self::IP_4 === $this->ipFamily ? $this->ipPrefix + $requiredBits : 112;
        if (self::IP_6 === $this->ipFamily) {
            $minPrefix = 112 - $requiredBits;
            if ($minPrefix < $this->ipPrefix) {
                throw new IpException('network too small, must be >= /'.$minPrefix);
            }
        }
        $netIp = $this->network();
        $splitRanges = [];
        for ($i = 0; $i < $networkCount; ++$i) {
            $noOfHosts = gmp_pow(2, $this->addressBits() - $prefixBits);
            $netAddress = gmp_add(gmp_mul($i, $noOfHosts), self::fromAddress($netIp->address()));
            $splitRanges[] = new self($netAddress, $prefixBits, $this->ipFamily);
        }

        return $splitRanges;
    }

    /**
     * @return array<string>
     */
    public function clientIpListFour(): array
    {
        if (self::IP_4 !== $this->ipFamily) {
            throw new IpException('IPv4 only');
        }

        if (31 <= $this->ipPrefix) {
            throw new IpException('network not big enough to create a list of client IPs');
        }

        $maxNoOfHosts = 2 ** (32 - $this->ipPrefix) - 3;
        $hostIpList = [];
        for ($i = 0; $i < $maxNoOfHosts; ++$i) {
            $hostIpList[] = self::toAddress(
                gmp_add(
                    self::fromAddress($this->network()->address()),
                    2 + $i
                ),
                $this->addressBits()
            );
        }

        return $hostIpList;
    }

    /**
     * @return array<string>
     */
    public function clientIpListSix(int $maxNoOfHosts): array
    {
        if (self::IP_6 !== $this->ipFamily) {
            throw new IpException('IPv6 only');
        }

        if (127 <= $this->ipPrefix) {
            throw new IpException('network not big enough to create a list of client IPs');
        }

        // make sure we do not specify a "maxNumberOfHosts" that is bigger
        // than the prefix we have
        $prefixMaxNoOfHosts = gmp_sub(gmp_pow(2, (128 - $this->ipPrefix)), 3);
        if (gmp_cmp($maxNoOfHosts, $prefixMaxNoOfHosts) > 0) {
            throw new IpException(sprintf('prefix "/%d" does not contain "%d" hosts', $this->ipPrefix, $maxNoOfHosts));
        }

        $hostIpList = [];
        for ($i = 0; $i < $maxNoOfHosts; ++$i) {
            $hostIpList[] = self::toAddress(
                gmp_add(
                    self::fromAddress($this->network()->address()),
                    2 + $i
                ),
                $this->addressBits()
            );
        }

        return $hostIpList;
    }

    public function equals(self $i): bool
    {
        return $this->address() === $i->address() && $this->prefix() === $i->prefix();
    }

    public function contains(self $i): bool
    {
        if ($this->family() !== $i->family()) {
            return false;
        }

        // the first address of the range
        $lowerAddress = self::fromAddress($this->network()->address());
        // the last address of the range
        $upperAddress = self::fromAddress($this->network()->lastHost());

        $lowerCompare = gmp_cmp(self::fromAddress($i->network()->address()), $lowerAddress);
        $upperCompare = gmp_cmp(self::fromAddress($i->network()->lastHost()), $upperAddress);

        return $lowerCompare >= 0 && $upperCompare <= 0;
    }

    public function prefix(): int
    {
        return $this->ipPrefix;
    }

    public function family(): int
    {
        return $this->ipFamily;
    }

    private function addressBits(): int
    {
        return self::IP_4 === $this->ipFamily ? 32 : 128;
    }

    private static function fromIpFour(string $ipAddress, ?int $ipPrefix = null): self
    {
        if (false === filter_var($ipAddress, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4)) {
            throw new IpException('invalid IPv4 address');
        }
        if (null === $ipPrefix) {
            $ipPrefix = 32;
        }
        if ($ipPrefix < 0 || $ipPrefix > 32) {
            throw new IpException('invalid IPv4 prefix');
        }

        return new self(self::fromAddress($ipAddress), $ipPrefix, self::IP_4);
    }

    private static function fromIpSix(string $ipAddress, ?int $ipPrefix = null): self
    {
        if (false === filter_var($ipAddress, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)) {
            throw new IpException('invalid IPv6 address');
        }
        if (null === $ipPrefix) {
            $ipPrefix = 128;
        }
        if ($ipPrefix < 0 || $ipPrefix > 128) {
            throw new IpException('invalid IPv6 prefix');
        }

        return new self(self::fromAddress($ipAddress), $ipPrefix, self::IP_6);
    }

    private static function fromAddress(string $ipAddress): GMP
    {
        return gmp_init(bin2hex(inet_pton($ipAddress)), 16);
    }

    private static function toAddress(GMP $ipAddress, int $addressBits): string
    {
        return inet_ntop(
            hex2bin(
                str_pad(
                    gmp_strval($ipAddress, 16),
                    (int) ($addressBits / 4),
                    '0',
                    STR_PAD_LEFT
                )
            )
        );
    }
}


text:
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

using System.Net.Test.Common;

namespace System.Net.Security.Tests
{
    internal class NotifyReadVirtualNetworkStream : VirtualNetworkStream
    {
        public delegate void ReadEventHandler(byte[] buffer, int offset, int count);
        public event ReadEventHandler OnRead;

        public NotifyReadVirtualNetworkStream(VirtualNetwork network, bool isServer)
            : base(network, isServer)
        {
        }

        public override int Read(byte[] buffer, int offset, int count)
        {
            OnRead?.Invoke(buffer, offset, count);
            return base.Read(buffer, offset, count);
        }
    }
}

redpajama_set_name: RedPajamaGithub


text:
package com.azure.resourcemanager.datalakestore.implementation;

import com.azure.core.http.rest.PagedIterable;
import com.azure.core.http.rest.Response;
import com.azure.core.http.rest.SimpleResponse;
import com.azure.core.util.Context;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.datalakestore.fluent.LocationsClient;
import com.azure.resourcemanager.datalakestore.fluent.models.CapabilityInformationInner;
import com.azure.resourcemanager.datalakestore.fluent.models.UsageInner;
import com.azure.resourcemanager.datalakestore.models.CapabilityInformation;
import com.azure.resourcemanager.datalakestore.models.Locations;
import com.azure.resourcemanager.datalakestore.models.Usage;
import com.fasterxml.jackson.annotation.JsonIgnore;

public final class LocationsImpl implements Locations {
    @JsonIgnore private final ClientLogger logger = new ClientLogger(LocationsImpl.class);

    private final LocationsClient innerClient;

    private final com.azure.resourcemanager.datalakestore.DataLakeStoreManager serviceManager;

    public LocationsImpl(
        LocationsClient innerClient, com.azure.resourcemanager.datalakestore.DataLakeStoreManager serviceManager) {
        this.innerClient = innerClient;
        this.serviceManager = serviceManager;
    }

    public CapabilityInformation getCapability(String location) {
        CapabilityInformationInner inner = this.serviceClient().getCapability(location);
        if (inner != null) {
            return new CapabilityInformationImpl(inner, this.manager());
        } else {
            return null;
        }
    }

    public Response<CapabilityInformation> getCapabilityWithResponse(String location, Context context) {
        Response<CapabilityInformationInner> inner = this.serviceClient().getCapabilityWithResponse(location, context);
        if (inner != null) {
            return new SimpleResponse<>(
                inner.getRequest(),
                inner.getStatusCode(),
                inner.getHeaders(),
                new CapabilityInformationImpl(inner.getValue(), this.manager()));
        } else {
            return null;
        }
    }

    public PagedIterable<Usage> getUsage(String location) {
        PagedIterable<UsageInner> inner = this.serviceClient().getUsage(location);
        return Utils.mapPage(inner, inner1 -> new UsageImpl(inner1, this.manager()));
    }

    public PagedIterable<Usage> getUsage(String location, Context context) {
        PagedIterable<UsageInner> inner = this.serviceClient().getUsage(location, context);
        return Utils.mapPage(inner, inner1 -> new UsageImpl(inner1, this.manager()));
    }

    private LocationsClient serviceClient() {
        return this.innerClient;
    }

    private com.azure.resourcemanager.datalakestore.DataLakeStoreManager manager() {
        return this.serviceManager;
    }
}


text:
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>W29334_text</title>
        <link rel="stylesheet" type="text/css" href="style.css" />

                «

    <p class="styleSans557.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">Gas Capture Plan
KLINE FEDERAL 5300 21-18 4T2 Section 18 T153N R100W
McKenzie County. North Dakota

Gas Gatherer: Hiland Partners, LP Gas to be processed at: Watford City Plant
— Hilnnd Gm Line PETROLEUM — Oneok Gas Line
— wmuon Basin lnlemate


text:
using System.ComponentModel;

namespace Hl7.Fhir.Publication.Specification.ExtensionMethods
{
    internal static class Content
    {
        public static string GetPath(this Page.Content content)
        {
            switch (content)
            {
                case Page.Content.Structure:
                    return "StructureDefinitions";
                case Page.Content.Dictionary:
                    return string.Empty;
                case Page.Content.Operation:
                    return "OperationDefinitions";
                case Page.Content.OtherText:
                    return "string.Empty";
                case Page.Content.Valueset:
                    return "ValueSets";
                case Page.Content.Example:
                    return "Examples";
                case Page.Content.Resource:
                    return "Resources";
                default:
                    throw new InvalidEnumArgumentException($" {content} is not a supported resource!");
            }
        }
    }
}


text:
package mina.imagine.step1.codec;

import mina.imagine.step1.ImageResponse;

import org.apache.mina.filter.codec.ProtocolDecoderOutput;
import org.apache.mina.filter.codec.CumulativeProtocolDecoder;
import org.apache.mina.core.buffer.IoBuffer;
import org.apache.mina.core.session.IoSession;

import javax.imageio.ImageIO;

import java.awt.image.BufferedImage;
import java.io.ByteArrayInputStream;
import java.io.IOException;

/**
 * a decoder for {@link ImageResponse} objects
 *
 * @author Apache MINA Project
 */

public class ImageResponseDecoder extends CumulativeProtocolDecoder {

    private static final String DECODER_STATE_KEY = ImageResponseDecoder.class.getName() + ".STATE";

    public static final int MAX_IMAGE_SIZE = 5 * 1024 * 1024;

    private static class DecoderState {
        BufferedImage image1;
    }

    protected boolean doDecode(IoSession session, IoBuffer in, ProtocolDecoderOutput out) throws Exception {
        DecoderState decoderState = (DecoderState) session.getAttribute(DECODER_STATE_KEY);
        if (decoderState == null) {
            decoderState = new DecoderState();
            session.setAttribute(DECODER_STATE_KEY, decoderState);
        }
        if (decoderState.image1 == null) {
            // try to read first image
            if (in.prefixedDataAvailable(4, MAX_IMAGE_SIZE)) {
                decoderState.image1 = readImage(in);
            } else {
                // not enough data available to read first image
                return false;
            }
        }
        if (decoderState.image1 != null) {
            // try to read second image
            if (in.prefixedDataAvailable(4, MAX_IMAGE_SIZE)) {
                BufferedImage image2 = readImage(in);
                ImageResponse imageResponse = new ImageResponse(decoderState.image1, image2);
                out.write(imageResponse);
                decoderState.image1 = null;
                return true;
            } else {
                // not enough data available to read second image
                return false;
            }
        }
        return false;
    }

    private BufferedImage readImage(IoBuffer in) throws IOException {
        int length = in.getInt();
        byte[] bytes = new byte[length];
        in.get(bytes);
        ByteArrayInputStream bais = new ByteArrayInputStream(bytes);
        return ImageIO.read(bais);
    }

}


text:
<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE TS>
<TS version="2.1" language="nl_NL">
<context>
    <name>Break</name>
    <message>
        <location filename="../qml/BridgeClock/tournamentTime.qml" line="287"></location>
        <location filename="../qml/BridgeClock/tournamentTime.qml" line="319"></location>
        <location filename="../qml/BridgeClock/tournamentTime.qml" line="351"></location>
        <location filename="../timemodel.cpp" line="259"></location>
        <source>Lunch</source>
        <extracomment>A short text visible to players telling that now or soon is a Lunch break</extracomment>
        <translation>Middagmaal</translation>
    </message>
    <message>
        <location filename="../qml/BridgeClock/tournamentTime.qml" line="289"></location>
        <location filename="../qml/BridgeClock/tournamentTime.qml" line="324"></location>
        <location filename="../qml/BridgeClock/tournamentTime.qml" line="359"></location>
        <location filename="../timemodel.cpp" line="260"></location>
        <source>Dinner</source>
        <extracomment>A short text visible to players telling that now or soon is a Dinner break</extracomment>
        <translation>Avondmaal</translation>
    </message>
    <message>
        <location filename="../qml/BridgeClock/tournamentTime.qml" line="291"></location>
        <location filename="../qml/BridgeClock/tournamentTime.qml" line="329"></location>
        <location filename="../qml/BridgeClock/tournamentTime.qml" line="367"></location>
        <location filename="../timemodel.cpp" line="261"></location>
        <source>Coffee</source>
        <extracomment>A short text visible to players telling that now or soon is a short coffee break</extracomment>
        <translation>Koffiepauze</translation>
    </message>
    <message>
        <location filename="../qml/BridgeClock/tournamentTime.qml" line="314"></location>
        <location filename="../qml/BridgeClock/tournamentTime.qml" line="343"></location>
        <location filename="../timemodel.cpp" line="418"></location>
        <location filename="../timemodel.cpp" line="671"></location>
        <source>Change</source>
        <extracomment>A short text visible to players telling that now is a change between rounds</extracomment>
        <translation>Wissel</translation>
    </message>
    <message>
        <location filename="../timecontroller.cpp" line="243"></location>
        <source>Tournament begins</source>
        <extracomment>The player visible text when count down shows time to begin of tournament. This should be fairly short text if possible.</extracomment>
        <translation>Toernooi begint</translation>
    </message>
    <message>
        <location filename="../timemodel.cpp" line="426"></location>
        <location filename="../timemodel.cpp" line="673"></location>
        <source>Round %1</source>
        <extracomment>The name of round. %1 is the number of round.</extracomment>
        <translation>Ronde %1</translation>
    </message>
    <message>
        <location filename="../timemodel.cpp" line="676"></location>
        <source>End</source>
        <translation>Einde</translation>
    </message>
    <message>
        <location filename="../compactmodel.cpp" line="61"></location>
        <source>Rounds %1-%2</source>
        <translation>Rondes %1-%2</translation>
    </message>
</context>
<context>
    <name>Clock</name>
    <message>
        <location filename="../qml/BridgeClock/Clock.qml" line="35"></location>
        <source>The time view</source>
        <extracomment>The tile of window that shows the time and result information for players.</extracomment>
        <translation>De tijdsweergave</translation>
    </message>
    <message>
        <location filename="../qml/BridgeClock/Clock.qml" line="284"></location>
        <source>Tournament will end: </source>
        <extracomment>Label visible to players before or above the tournament end time</extracomment>
        <translation>Toernooi eindigt : </translation>
    </message>
    <message>
        <location filename="../qml/BridgeClock/Clock.qml" line="365"></location>
        <source>The next break: </source>
        <extracomment>The player visible label before or above next break name, start time and end time</extracomment>
        <translation>De volgende pauze : </translation>
    </message>
    <message>
        <location filename="../qml/BridgeClock/Clock.qml" line="393"></location>
        <source> - </source>
        <extracomment>A character between start and end time of the next break (visible to players)</extracomment>
        <translation> - </translation>
    </message>
    <message>
        <location filename="../qml/BridgeClock/Clock.qml" line="576"></location>
        <source>Double click to make fullscreen</source>
        <extracomment>Tooltip help telling to double click the player visible window to make it fullscreen</extracomment>
        <translation>Dubbelklikken om weer te geven op volledig scherm</translation>
    </message>
    <message>
        <location filename="../qml/BridgeClock/Clock.qml" line="578"></location>
        <source>Double click to restore back to window</source>
        <extracomment>Tooltip help telling to double click the player visible window to restore window from fullscreen mode</extracomment>
        <translation>Dubbelklikken om schermgrootte te herstellen</translation>
    </message>
</context>
<context>
    <name>TimeModel</name>
    <message>
        <location filename="../timemodel.cpp" line="311"></location>
        <source>Begin</source>
        <translation>Begin</translation>
    </message>
</context>
<context>
    <name>main</name>
    <message>
        <location filename="../qml/BridgeClock/main.qml" line="33"></location>
        <source>Bridge clock %1</source>
        <extracomment>The window header including version number as parameter %1</extracomment>
        <translation>Bridge klok %1</translation>
    </message>
    <message>
        <location filename="../qml/BridgeClock/main.qml" line="67"></location>
        <source>A new version of bridge clock %1 is available for download.
%2Ignore%3</source>
        <extracomment>%1 is version number with downloadable link %2 & %3 html code for ignore link</extracomment>
        <translation>Een nieuwe versie van bridge klok %1 is beschikbaar om te downloaden.
%2Negeer%3</translation>
    </message>
    <message>
        <location filename="../qml/BridgeClock/main.qml" line="123"></location>
        <source>Start</source>
        <extracomment>The title for initial setup tab with round number and length settings</extracomment>
        <translation>Start</translation>
    </message>
    <message>
        <location filename="../qml/BridgeClock/main.qml" line="129"></location>
        <source>Time</source>
        <extracomment>The title for time settings tab to setup breaks and modify length of rounds</extracomment>
        <translation>Tijd</translation>
    </message>
    <message>
        <location filename="../qml/BridgeClock/main.qml" line="135"></location>
        <source>Results</source>
        <extracomment>The title for result view settings tab to select the visible result file and limit the visible area</extracomment>
        <translation>Resultaten</translation>
    </message>
</context>
<context>
    <name>tournamentResults</name>
    <message>
        <location filename="../qml/BridgeClock/tournamentResults.qml" line="52"></location>
        <source>Show results</source>
        <extracomment>The label text for checkbox that selects if results are shown under the clock</extracomment>
        <translation>Toon resultaten</translation>
    </message>
    <message>
        <location filename="../qml/BridgeClock/tournamentResults.qml" line="61"></location>
        <source>Result address: </source>
        <extracomment>The label text above url text input for result file</extracomment>
        <translation>Resultaat adres: </translation>
    </message>
    <message>
        <location filename="../qml/BridgeClock/tournamentResults.qml" line="67"></location>
        <source>Browse files</source>
        <extracomment>Button to open file browser to find the results to be shown</extracomment>
        <translation>Door bestanden bladeren</translation>
    </message>
    <message>
        <location filename="../qml/BridgeClock/tournamentResults.qml" line="335"></location>
        <source>Select a file to be shown in result view</source>
        <extracomment>File chooser dialog title shown when user is searching for a result file</extracomment>
        <translation>Selecteer een bestand om weer te geven in de resultaatweergave</translation>
    </message>
    <message>
        <location filename="../qml/BridgeClock/tournamentResults.qml" line="338"></location>
        <source>HTML-files (*.htm *.html)</source>
        <extracomment>File filter entry that lets users hide all files except html files</extracomment>
        <translation>HTML-bestanden (*.htm *.html)</translation>
    </message>
    <message>
        <location filename="../qml/BridgeClock/tournamentResults.qml" line="340"></location>
        <source>All files (*)</source>
        <extracomment>File filter entry that lets users to show all files</extracomment>
        <translation>Alle bestanden (*)</translation>
    </message>
</context>
<context>
    <name>tournamentStart</name>
    <message>
        <location filename="../qml/BridgeClock/tournamentStart.qml" line="36"></location>
        <source>Tournament time</source>
        <extracomment>The header text for initial setup</extracomment>
        <translation>Toernooitijd</translation>
    </message>
    <message>
        <location filename="../qml/BridgeClock/tournamentStart.qml" line="46"></location>
        <source>Number of rounds</source>
        <extracomment>Label for number of rounds slider and input box</extracomment>
        <translation>Aantal ronden</translation>
    </message>
    <message>
        <location filename="../qml/BridgeClock/tournamentStart.qml" line="83"></location>
        <source>Round time</source>
        <extracomment>Label for length of round in minutes</extracomment>
        <translation>Rondetijd</translation>
    </message>
    <message numerus="yes">
        <location filename="../qml/BridgeClock/tournamentStart.qml" line="103"></location>
        <location filename="../qml/BridgeClock/tournamentStart.qml" line="148"></location>
        <source>minute(s)</source>
        <extracomment>Label after input box accepting minutes</extracomment>
        <translation>
            <numerusform>minuut</numerusform>
            <numerusform>minuten</numerusform>
        </translation>
    </message>
    <message>
        <location filename="../qml/BridgeClock/tournamentStart.qml" line="129"></location>
        <source>Change time</source>
        <extracomment>Label before slider and text input for length of change between round in minutest</extracomment>
        <translation>Wijzig tijd</translation>
    </message>
    <message>
        <location filename="../qml/BridgeClock/tournamentStart.qml" line="172"></location>
        <source>Start time</source>
        <extracomment>Subheader before the tournament start time selector</extracomment>
        <translation>Starttijd</translation>
    </message>
    <message>
        <location filename="../qml/BridgeClock/tournamentStart.qml" line="180"></location>
        <source>Now</source>
        <extracomment>The button text that sets tournament start time to be now</extracomment>
        <translation>Nu</translation>
    </message>
    <message>
        <location filename="../qml/BridgeClock/tournamentStart.qml" line="208"></location>
        <source>Start a new tournament</source>
        <extracomment>The button text that resets round and break modifications to start a new tournament</extracomment>
        <translation>Start een nieuw toernooi</translation>
    </message>
</context>
<context>
    <name>tournamentTime</name>
    <message>
        <location filename="../qml/BridgeClock/tournamentTime.qml" line="48"></location>
        <source> -> </source>
        <extracomment>Arrow between break and next round name in time settings tab.</extracomment>
        <translation> -> </translation>
    </message>
    <message>
        <location filename="../qml/BridgeClock/tournamentTime.qml" line="64"></location>
        <source>Remaining:</source>
        <extracomment>Label before count down to the end of current round or break</extracomment>
        <translation>Resterend:</translation>
    </message>
    <message>
        <location filename="../qml/BridgeClock/tournamentTime.qml" line="82"></location>
        <source>Stop the clock</source>
        <extracomment>The label for checkbox that stops count down in time settings tab.</extracomment>
        <translation>Stop de klok</translation>
    </message>
    <message>
        <location filename="../qml/BridgeClock/tournamentTime.qml" line="117"></location>
        <source>+10s</source>
        <extracomment>The text for button that adds ten seconds to current round or break in time settings tab.</extracomment>
        <translation>+10s</translation>
    </message>
    <message>
        <location filename="../qml/BridgeClock/tournamentTime.qml" line="123"></location>
        <source>+1m</source>
        <extracomment>The text for button that adds a minute to current round or break in time settings tab.</extracomment>
        <translation>+1m</translation>
    </message>
    <message>
        <location filename="../qml/BridgeClock/tournamentTime.qml" line="129"></location>
        <source>+5m</source>
        <extracomment>The text for button that adds five minutes to current round or break in time settings tab.</extracomment>
        <translation>+5m</translation>
    </message>
    <message>
        <location filename="../qml/BridgeClock/tournamentTime.qml" line="135"></location>
        <source>-10s</source>
        <extracomment>The text for button that subtracts ten seconds from current round or break in time settings tab.</extracomment>
        <translation>-10s</translation>
    </message>
    <message>
        <location filename="../qml/BridgeClock/tournamentTime.qml" line="141"></location>
        <source>-1m</source>
        <extracomment>The text for button that subtracts a minute from current round or break in time settings tab.</extracomment>
        <translation>-1m</translation>
    </message>
    <message>
        <location filename="../qml/BridgeClock/tournamentTime.qml" line="147"></location>
        <source>-5m</source>
        <extracomment>The text for button that subtracts five minutes from current round or break in time settings tab.</extracomment>
        <translation>-5m</translation>
    </message>
    <message>
        <location filename="../qml/BridgeClock/tournamentTime.qml" line="174"></location>
        <location filename="../qml/BridgeClock/tournamentTime.qml" line="194"></location>
        <location filename="../qml/BridgeClock/tournamentTime.qml" line="214"></location>
        <location filename="../qml/BridgeClock/tournamentTime.qml" line="234"></location>
        <location filename="../qml/BridgeClock/tournamentTime.qml" line="254"></location>
        <source>No choice</source>
        <extracomment>Place holder text that shouldn't ever be visible to user</extracomment>
        <translation>Geen keuze</translation>
    </message>
    <message>
        <location filename="../qml/BridgeClock/tournamentTime.qml" line="183"></location>
        <source>Begin:</source>
        <extracomment>The label before the begin time of round or break in time settings tab</extracomment>
        <translation>Begin :</translation>
    </message>
    <message>
        <location filename="../qml/BridgeClock/tournamentTime.qml" line="203"></location>
        <source>End:</source>
        <extracomment>The label before the end time of round or break in time settings tab</extracomment>
        <translation>Einde :</translation>
    </message>
    <message>
        <location filename="../qml/BridgeClock/tournamentTime.qml" line="223"></location>
        <source>Length:</source>
        <extracomment>The label before the length of round or break in hours and minutes</extracomment>
        <translation>Duur :</translation>
    </message>
    <message>
        <location filename="../qml/BridgeClock/tournamentTime.qml" line="243"></location>
        <source>Previous:</source>
        <extracomment>Label before text showing the name of previous round or break in settings tab.</extracomment>
        <translation>Vorige :</translation>
    </message>
    <message>
        <location filename="../qml/BridgeClock/tournamentTime.qml" line="376"></location>
        <source>Custom:</source>
        <extracomment>Label before text input for custom round break name</extracomment>
        <translation>Aangepast :</translation>
    </message>
    <message>
        <location filename="../qml/BridgeClock/tournamentTime.qml" line="555"></location>
        <source>Begin</source>
        <extracomment>The column header showing the begin time of round or break in time settings tab.</extracomment>
        <translation>Begin</translation>
    </message>
    <message>
        <location filename="../qml/BridgeClock/tournamentTime.qml" line="576"></location>
        <source>Happening</source>
        <extracomment>The column header showing the name of round or break in time settings tab.</extracomment>
        <translation>Evenement</translation>
    </message>
</context>
</TS>


text:
namespace itk
{
namespace simple
{
class AffineTransform : public Transform
  {
  public:
    AffineTransform();
    virtual ::itk::TransformBase::Pointer GetTransform ( int dimension );
    virtual std::vector<double> GetOptimizerScales ( int dimension );
  protected:
    virtual Transform* Clone() { std::cout << "Cloned an AffineTransform" << std::endl; return new AffineTransform ( *this ); }
  };
}
}

#endif


text:
package org.rpwf.action.scope;

import java.util.*;
import java.util.stream.Collectors;

/**
 * Abstracts a scope as a simple map with String keys and Object values.
 */
public interface Scope extends Map<String, Object> {

  /**
   * Sets a value in the scope using the given key.
   * @param key the key
   * @param value the value
   * @return the old value which is relaced by the new one
   */
  Object put(String key, Object value);

  /**
   * Gets a value stored using the given key.
   * @param key the key
   * @return the value
   */
  Object get(String key);

  /**
   * Returns a set of all keys.
   * @return key set
   */
  Set<String> keySet();

  @Override
  default int size() {
    return keySet().size();
  }

  @Override
  default boolean isEmpty() {
    return keySet().isEmpty();
  }

  @Override
  default boolean containsKey(Object key) {
    return keySet().contains(key);
  }

  @Override
  default boolean containsValue(Object value) {
    for(String key : keySet()){
      Object v = get(key);
      if(value == null ? v == null : value.equals(v)){
	return true;
      }
    }
    return false;
  }

  @Override
  default Object get(Object key) {
    return get((String)key);
  }

  @Override
  default void putAll(Map<? extends String, ?> m) {
    for(String key : m.keySet()){
      put(key, m.get(key));
    }
  }

  @Override
  default void clear() {
    throw new UnsupportedOperationException("A Scope cannot be cleared");
  }

  @Override
  default Collection<Object> values() {
    return keySet().stream().map(key -> get(key)).collect(Collectors.toList());
  }

  @Override
  default Set<Entry<String, Object>> entrySet() {
    throw new UnsupportedOperationException("entrySet() is not implemented in Scope");
  }
}


text:
package com.telinc1.rpjg.script.command;

import java.util.HashMap;

import com.telinc1.rpjg.script.Script;
import com.telinc1.rpjg.script.command.branch.CommandCallIf;
import com.telinc1.rpjg.script.command.branch.CommandCompareVar;
import com.telinc1.rpjg.script.command.branch.CommandCompareVars;
import com.telinc1.rpjg.script.command.branch.CommandGotoIf;
import com.telinc1.rpjg.script.command.buffer.CommandBufferString;
import com.telinc1.rpjg.script.command.buffer.CommandBufferVariable;
import com.telinc1.rpjg.script.command.buffer.CommandClearBuffer;
import com.telinc1.rpjg.script.command.buffer.CommandClearString;
import com.telinc1.rpjg.script.command.buffer.CommandLoadString;
import com.telinc1.rpjg.script.command.control.CommandBlock;
import com.telinc1.rpjg.script.command.control.CommandCall;
import com.telinc1.rpjg.script.command.control.CommandEnd;
import com.telinc1.rpjg.script.command.control.CommandGoto;
import com.telinc1.rpjg.script.command.control.CommandLock;
import com.telinc1.rpjg.script.command.control.CommandRelease;
import com.telinc1.rpjg.script.command.control.CommandReturn;
import com.telinc1.rpjg.script.command.flag.CommandCheckFlag;
import com.telinc1.rpjg.script.command.flag.CommandClearFlag;
import com.telinc1.rpjg.script.command.flag.CommandSetFlag;
import com.telinc1.rpjg.script.command.message.CommandError;
import com.telinc1.rpjg.script.command.message.CommandMessage;
import com.telinc1.rpjg.script.command.variable.CommandAddVar;
import com.telinc1.rpjg.script.command.variable.CommandAddVars;
import com.telinc1.rpjg.script.command.variable.CommandAndVar;
import com.telinc1.rpjg.script.command.variable.CommandAndVars;
import com.telinc1.rpjg.script.command.variable.CommandCopyVar;
import com.telinc1.rpjg.script.command.variable.CommandDivVar;
import com.telinc1.rpjg.script.command.variable.CommandDivVars;
import com.telinc1.rpjg.script.command.variable.CommandLslVar;
import com.telinc1.rpjg.script.command.variable.CommandLsrVar;
import com.telinc1.rpjg.script.command.variable.CommandMulVar;
import com.telinc1.rpjg.script.command.variable.CommandMulVars;
import com.telinc1.rpjg.script.command.variable.CommandNotVar;
import com.telinc1.rpjg.script.command.variable.CommandOrVar;
import com.telinc1.rpjg.script.command.variable.CommandOrVars;
import com.telinc1.rpjg.script.command.variable.CommandSetVar;
import com.telinc1.rpjg.script.command.variable.CommandSubVar;
import com.telinc1.rpjg.script.command.variable.CommandSubVars;
import com.telinc1.rpjg.script.command.variable.CommandXorVar;
import com.telinc1.rpjg.script.command.variable.CommandXorVars;
import com.telinc1.rpjg.script.exception.ScriptException;

public abstract class ScriptCommand {
    private static HashMap<Integer, ScriptCommand> commands = new HashMap<>();
    private static HashMap<String, Integer> commandNames = new HashMap<>();

    static {
        ScriptCommand.addCommand(0, new CommandLock());
        ScriptCommand.addCommand(1, new CommandRelease());
        ScriptCommand.addCommand(2, new CommandBlock());
        ScriptCommand.addCommand(3, new CommandEnd());
        ScriptCommand.addCommand(4, new CommandGoto());
        ScriptCommand.addCommand(5, new CommandCall());
        ScriptCommand.addCommand(6, new CommandReturn());
        ScriptCommand.addCommand(7, new CommandSetFlag());
        ScriptCommand.addCommand(8, new CommandClearFlag());
        ScriptCommand.addCommand(9, new CommandSetVar());
        ScriptCommand.addCommand(10, new CommandAddVar());
        ScriptCommand.addCommand(11, new CommandSubVar());
        ScriptCommand.addCommand(12, new CommandAndVar());
        ScriptCommand.addCommand(13, new CommandOrVar());
        ScriptCommand.addCommand(14, new CommandXorVar());
        ScriptCommand.addCommand(15, new CommandAddVars());
        ScriptCommand.addCommand(16, new CommandSubVars());
        ScriptCommand.addCommand(17, new CommandAndVars());
        ScriptCommand.addCommand(18, new CommandOrVars());
        ScriptCommand.addCommand(19, new CommandXorVars());
        ScriptCommand.addCommand(20, new CommandCopyVar());
        ScriptCommand.addCommand(21, new CommandLoadString());
        ScriptCommand.addCommand(22, new CommandClearString());
        ScriptCommand.addCommand(23, new CommandBufferString());
        ScriptCommand.addCommand(24, new CommandBufferVariable());
        ScriptCommand.addCommand(25, new CommandClearBuffer());
        ScriptCommand.addCommand(26, new CommandMessage());
        ScriptCommand.addCommand(27, new CommandError());
        ScriptCommand.addCommand(28, new CommandNop());
        ScriptCommand.addCommand(29, new CommandNop());
        ScriptCommand.addCommand(30, new CommandNop());
        ScriptCommand.addCommand(31, new CommandNop());
        ScriptCommand.addCommand(32, new CommandNop());
        ScriptCommand.addCommand(33, new CommandCompareVar());
        ScriptCommand.addCommand(34, new CommandCompareVars());
        ScriptCommand.addCommand(35, new CommandGotoIf());
        ScriptCommand.addCommand(36, new CommandCallIf());
        ScriptCommand.addCommand(37, new CommandMulVar());
        ScriptCommand.addCommand(38, new CommandDivVar());
        ScriptCommand.addCommand(39, new CommandMulVars());
        ScriptCommand.addCommand(40, new CommandDivVars());
        ScriptCommand.addCommand(41, new CommandLslVar());
        ScriptCommand.addCommand(42, new CommandLsrVar());
        ScriptCommand.addCommand(43, new CommandNotVar());
        ScriptCommand.addCommand(44, new CommandNop());
        ScriptCommand.addCommand(45, new CommandCheckFlag());
    }

    /**
     * Adds a new command.
     *
     * @param id - The ID of the new command.
     * @param command - The command to add.
     */
    public static void addCommand(int id, ScriptCommand command){
        ScriptCommand.commands.put(id, command);
        ScriptCommand.commandNames.put(command.getName(), id);
    }

    /**
     * Checks if the given script command exists.
     *
     * @param id - The ID to check for.
     * @return Whether the command exists.
     */
    public static boolean exists(int id){
        return ScriptCommand.commands.containsKey(id);
    }

    /**
     * Checks if the given script command exists.
     *
     * @param name - The name to check for.
     * @return Whether the command exists.
     */
    public static boolean exists(String name){
        if(!ScriptCommand.commandNames.containsKey(name)){
            return false;
        }

        return ScriptCommand.exists(ScriptCommand.commandNames.get(name));
    }

    /**
     * Gets an already registered command.
     *
     * @param id - The ID of the requested command.
     * @return The requested command, or null if it doesn't exist.
     */
    public static ScriptCommand getCommand(int id){
        if(!ScriptCommand.exists(id)){
            return null;
        }

        return ScriptCommand.commands.get(id);
    }

    /**
     * Gets an already registered command.
     *
     * @param name - The name of the requested command.
     * @return The requested command, or null if it doesn't exist.
     */
    public static ScriptCommand getCommand(String name){
        if(!ScriptCommand.exists(name)){
            return null;
        }

        return ScriptCommand.getCommand(ScriptCommand.commandNames.get(name));
    }

    /**
     * Runs the command: reads the parameters, does everything necessary.
     *
     * @param script - The script which is executing this command.
     * @throws ScriptException If anything goes wrong.
     */
    public abstract void run(Script script) throws ScriptException;

    /**
     * @return The command's name (as defined in scripts.md).
     */
    public abstract String getName();

    public String getNameFormat(){
        return null;
    }

    /**
     * @return A list of the command's parameters.
     */
    public EnumCommandParameter[] getParameterTypes(){
        return new EnumCommandParameter[0];
    }
}


text:
using ExpressionBuilder.Interfaces;
using System;

namespace ExpressionBuilder.Exceptions
{
    /// <summary>
    /// Represents an attempt to use an operation providing the wrong number of values.
    /// </summary>
    [Serializable]
    public class WrongNumberOfValuesException : Exception
    {
        /// <summary>
        /// Gets the <see cref="Operation" /> attempted to be used.
        /// </summary>
        public IOperation Operation { get; private set; }

        /// <summary>
        /// Gets a message that describes the current exception.
        /// </summary>
        public override string Message
        {
            get
            {
                return string.Format("The operation '{0}' admits exactly '{1}' values (not more neither less than this).", Operation.Name, Operation.NumberOfValues);
            }
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="WrongNumberOfValuesException" /> class.
        /// </summary>
        /// <param name="operation">Operation used.</param>
        public WrongNumberOfValuesException(IOperation operation)
        {
            Operation = operation;
        }
    }
}


text:
<!--
Copyright 2020 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->

<!--
This file is used to generate a comprehensive list of Stability histograms
along with a detailed description for each histogram.

For best practices on writing histogram descriptions, see
https://chromium.googlesource.com/chromium/src.git/+/HEAD/tools/metrics/histograms/README.md

Please follow the instructions in the OWNERS file in this directory to find a
reviewer. If no OWNERS file exists, please consider signing up at
go/reviewing-metrics (Googlers only), as all subdirectories are expected to
have an OWNERS file. As a last resort you can send the CL to
chromium-metrics-reviews@google.com.
-->

<histogram-configuration>

<histograms>

<histogram name="Stability.Android.OomKillReverseRank" units="rank"
    expires_after="2022-05-01">
  <owner>boliu@chromium.org</owner>
  <owner>ssid@chromium.org</owner>
  <summary>
    Records the reverse rank of a child process when it is killed by android if
    applicable. Chrome on Android ranks some child processes and provides hints
    to android that it should kill from lowest to highest ranked. The lowest
    ranked process has reverse rank 0. This is a measure how good the hints to
    android are; if hints were perfect, then all android kills should have
    reverse rank 0.
  </summary>
</histogram>

<histogram name="Stability.Android.OomKillReverseRankSuccess"
    enum="BooleanSuccess" expires_after="2020-04-10">
  <owner>boliu@chromium.org</owner>
  <owner>ssid@chromium.org</owner>
  <summary>
    Getting value for OomKillReverseRank may fail. Recorded when an applicable
    child process is killed by android.
  </summary>
</histogram>

<histogram name="Stability.Android.ProcessedCrashCounts"
    enum="AndroidProcessedCrashCounts" expires_after="never">
<!-- expires-never: Critical stability metric that includes OOM rate. -->

  <owner>boliu@chromium.org</owner>
  <owner>ssid@chromium.org</owner>
  <owner>wnwen@chromium.org</owner>
  <summary>
    Individual enum counts specific conditions of child process terminations.
    There are too many individual states to enumerate into a single histogram,
    so this effectively does the aggregration that normally happens on the
    server side in the client instead. The benefit is this is easily extensible
    in the future, and downside is that it does not allow additional server side
    analysis. Note a single child process termination may fall into multiple
    enums.
  </summary>
</histogram>

<histogram name="Stability.Android.ProcessedRealMinidumps"
    enum="AndroidProcessedMinidumps" expires_after="2022-04-10">
  <owner>mheikal@chromium.org</owner>
  <owner>smaier@chromium.org</owner>
  <owner>wnwen@chromium.org</owner>
  <summary>
    Records the number of non-simulated minidumps processed by Crashpad, split
    by process type. This metric is similar to one that could be computed
    server-side based on received crash uploads; but the client-side metric also
    includes any minidumps that were not successfully uploaded.
  </summary>
</histogram>

<histogram name="Stability.Android.ProcessedSimulatedMinidumps"
    enum="AndroidProcessedMinidumps" expires_after="2022-05-01">
  <owner>mheikal@chromium.org</owner>
  <owner>smaier@chromium.org</owner>
  <owner>wnwen@chromium.org</owner>
  <summary>
    Records the number of simulated minidumps processed by Crashpad, split by
    process type. This metric is similar to one that could be computed
    server-side based on received crash uploads; but the client-side metric also
    includes any minidumps that were not successfully uploaded.
  </summary>
</histogram>

<histogram name="Stability.Android.RendererCrash" enum="Boolean"
    expires_after="2022-04-24">
  <owner>wnwen@chromium.org</owner>
  <summary>
    Counts renderer crashes including OOMs. Android only. Mirrors old stability
    proto renderer crashes.
  </summary>
</histogram>

<histogram name="Stability.Android.StrongBindingOomRemainingBindingState"
    enum="Android.ChildProcessBindingStateCombination"
    expires_after="2021-08-09">
  <obsolete>
    Removed on 08/2021. No longer needed.
  </obsolete>
  <owner>boliu@chromium.org</owner>
  <owner>ssid@chromium.org</owner>
  <summary>
    Record the state of child service bindings left when a child service with
    strong binding is OOM killed by Android. Recorded when such a OOM kill is
    detected by browser. Note this does not distinguish process type, and is for
    example recorded for both GPU and renderer process.
  </summary>
</histogram>

<histogram name="Stability.Android.StrongBindingOomRemainingStrongBindingCount"
    units="units" expires_after="2020-08-30">
  <obsolete>
    Removed on 08/2021. No longer needed.
  </obsolete>
  <owner>boliu@chromium.org</owner>
  <owner>ssid@chromium.org</owner>
  <summary>
    Record the count of strongly bound child services left when a child service
    with strong binding is OOM killed by Android. Recorded when such a OOM kill
    is detected by browser. Note this does not distinguish process type, and is
    for example count both GPU and renderer process.
  </summary>
</histogram>

<histogram base="true" name="Stability.Android.SystemExitReason"
    enum="AndroidProcessExitReason" expires_after="2022-05-01">
  <owner>boliu@chromium.org</owner>
  <owner>ssid@chromium.org</owner>
  <owner>wnwen@chromium.org</owner>
  <summary>
    Reason given by Android ActivityManager for the exit of the process, only
    recorded in Android R+. Recorded on the next browser startup for browser
    exits, or right after the process died for child processes.
  </summary>
</histogram>

<histogram name="Stability.BadMessageTerminated.Autofill"
    enum="BadMessageReasonAutofill" expires_after="never">
<!-- expires-never: Monitoring renderer kills triggered by auto-fill. -->

  <owner>vollick@chromium.org</owner>
  <owner>battre@chromium.org</owner>
  <summary>
    Count of processes killed because they sent a bad IPC that couldn't be
    properly handled. Categories are the reasons (code locations) for the kills.
  </summary>
</histogram>

<histogram name="Stability.BadMessageTerminated.Chrome"
    enum="BadMessageReasonChrome" expires_after="never">
<!-- expires-never: Monitoring renderer kills triggered by //chrome. -->

  <owner>creis@chromium.org</owner>
  <owner>jamescook@chromium.org</owner>
  <summary>
    Count of processes killed by chrome/browser because they sent an IPC that
    couldn't be properly handled. Categories are the reasons (code locations)
    for the kills.
  </summary>
</histogram>

<histogram name="Stability.BadMessageTerminated.Content"
    enum="BadMessageReasonContent" expires_after="never">
<!-- expires-never: Monitoring renderer kills triggered by //content. -->

  <owner>jam@chromium.org</owner>
  <owner>jamescook@chromium.org</owner>
  <summary>
    Count of child processes killed because they sent an IPC that couldn't be
    properly handled. Categories are the reasons (code locations) for the kills.
  </summary>
</histogram>

<histogram name="Stability.BadMessageTerminated.Extensions"
    enum="BadMessageReasonExtensions" expires_after="never">
<!-- expires-never: Monitoring renderer kills triggered by //extensions. -->

  <owner>rdevlin.cronin@chromium.org</owner>
  <owner>extensions-core@chromium.org</owner>
  <summary>
    Count of extension processes killed because they sent an IPC that couldn't
    be properly handled. Categories are the reasons (code locations) for the
    kills.
  </summary>
</histogram>

<histogram name="Stability.BadMessageTerminated.GuestView"
    enum="BadMessageReasonGuestView" expires_after="never">
<!-- expires-never: Monitoring renderer kills triggered by GuestView. -->

  <owner>mcnee@chromium.org</owner>
  <owner>wjmaclean@chromium.org</owner>
  <summary>
    Count of processes killed because they sent a bad IPC that couldn't be
    properly handled. Categories are the reasons (code locations) for the kills.

    Warning: this histogram was expired from M85 to M97; data may be missing.
  </summary>
</histogram>

<histogram name="Stability.BadMessageTerminated.NaCl"
    enum="BadMessageReasonNaCl" expires_after="never">
<!-- expires-never: Monitoring renderer kills triggered by NaCl. -->

  <owner>creis@chromium.org</owner>
  <owner>jamescook@chromium.org</owner>
  <summary>
    Count of processes killed because they sent a NaCl IPC that couldn't be
    properly handled. Categories are the reasons (code locations) for the kills.

    Warning: this histogram was expired from 2020-11-01 to 2021-12-07; data may
    be missing.
  </summary>
</histogram>

<histogram name="Stability.BadMessageTerminated.PasswordManager"
    enum="BadMessageReasonPasswordManager" expires_after="never">
<!-- expires-never: Monitoring renderer kills triggered by password manager. -->

  <owner>creis@chromium.org</owner>
  <owner>jamescook@chromium.org</owner>
  <summary>
    Count of processes killed because they sent a bad IPC that couldn't be
    properly handled. Categories are the reasons (code locations) for the kills.

    Warning: this histogram was expired from M85 to M97; data may be missing.
  </summary>
</histogram>

<histogram name="Stability.BrowserExitCodes" enum="WindowsExitCode"
    expires_after="never">
<!-- expires-never: Critical stability metrics. go/chrome-stability-metrics -->

  <owner>siggi@chromium.org</owner>
  <owner>chrome-stability-core@google.com</owner>
  <summary>
    Records the exit code of the browser process (on Windows) from the previous
    launch. On crash, the exit code will indicate the exception code of the
    crash. This is emitted in stability data with the first report on a
    subsequent launch. Note: Due to https://crbug.com/805754, the enum labels
    for RESULT_CODE_* are off by 1 for M56 and earlier.
  </summary>
</histogram>

<histogram name="Stability.ChildFrameCrash.ShownAfterCrashingReason"
    enum="ShownAfterCrashingReason" expires_after="2022-08-18">
  <owner>alexmos@chromium.org</owner>
  <owner>boliu@chromium.org</owner>
  <owner>lukasza@chromium.org</owner>
  <summary>
    Logs the reason that a crashed subframe was shown. Logged at most once per
    crash, and only if the subframe was hidden when it crashed and became
    visible later.
  </summary>
</histogram>

<histogram name="Stability.ChildFrameCrash.TabMarkedForReload"
    enum="BooleanMarkedForReload" expires_after="2022-08-18">
  <owner>alexmos@chromium.org</owner>
  <owner>boliu@chromium.org</owner>
  <summary>
    Logs whether or not a tab is marked for reload when a cross-process subframe
    crashes. Logged once per subframe process crash.
  </summary>
</histogram>

<histogram name="Stability.ChildFrameCrash.TabMarkedForReload.Visibility"
    enum="FrameVisibility" expires_after="2022-08-18">
  <owner>alexmos@chromium.org</owner>
  <owner>boliu@chromium.org</owner>
  <summary>
    Logs the visibility of a subframe when a subframe process crashes and the
    corresponding tab is marked for reload. This indicates whether the crashed
    subframe was visible or scrolled out of view at the time of crash.
  </summary>
</histogram>

<histogram name="Stability.ChildFrameCrash.Visibility" enum="CrashVisibility"
    expires_after="2022-08-18">
  <owner>alexmos@chromium.org</owner>
  <owner>boliu@chromium.org</owner>
  <owner>lfg@chromium.org</owner>
  <owner>lukasza@chromium.org</owner>
  <summary>
    Logged after detecting that a sad subframe is shown (logged at most once per
    crash).
  </summary>
</histogram>

<histogram name="Stability.Counts2" enum="StabilityEventType"
    expires_after="never">
<!--
  expires-never: Critical stability metrics. go/chrome-browser-guardian-metrics
  -->

  <owner>rkaplow@chromium.org</owner>
  <owner>chrome-metrics-team@google.com</owner>
  <summary>
    Collects various counters related to stability. The majority of them are
    crash types.
  </summary>
</histogram>

<histogram name="Stability.DebugScenario.Navigation" enum="DebugScenario"
    expires_after="2022-03-19">
  <owner>nasko@chromium.org</owner>
  <owner>altimin@chromium.org</owner>
  <summary>
    Logged at the time when a complex debugging scenario is encountered. The
    enum value is the type of scenario encountered. This metric will give us two
    benefits: 1. It will tell us the magnitute of the scenario being debugged
    since crash reports are throttled client side and cannot presently expess
    magnitude. 2. If the client is configured to report traces based on this
    metric, it will upload Chrometto trace for analysis by developers.
  </summary>
</histogram>

<histogram name="Stability.ExitFunnel" units="ms" expires_after="M85">
  <obsolete>
    Removed 10/2020 although this has been dead for many years.
  </obsolete>
  <owner>siggi@chromium.org</owner>
  <summary>
    Temporary instrumentation to record the Windows browser's exit path. See
    http://crbug.com/412384.
  </summary>
</histogram>

<histogram name="Stability.Experimental.BrowserCrash" enum="Boolean"
    expires_after="2021-10-31">
  <obsolete>
    Removed 2021/09
  </obsolete>
  <owner>asvitkine@chromium.org</owner>
  <owner>chrome-metrics-team@google.com</owner>
  <summary>
    Logged at the same time as the kBrowserCrash bucket of Stability.Counts2,
    for debugging crbug.com/1176977.
  </summary>
</histogram>

<histogram name="Stability.Experimental.Counts" enum="StabilityEventType"
    expires_after="2021-01-15">
  <obsolete>
    Removed 01/2021, replaced with Stability.Counts2.
  </obsolete>
  <owner>rkaplow@chromium.org</owner>
  <owner>chrome-metrics-team@google.com</owner>
  <summary>
    Collects various counters related to stability. The majority of them are
    crash types.
  </summary>
</histogram>

<histogram name="Stability.Experimental.Counts2" enum="StabilityEventType"
    expires_after="2021-10-31">
  <obsolete>
    Removed 2021/09
  </obsolete>
  <owner>asvitkine@chromium.org</owner>
  <owner>chrome-metrics-team@google.com</owner>
  <summary>
    Like Stability.Counts2, but logged as a sparse histogram for debugging
    crbug.com/1176977.
  </summary>
</histogram>

<histogram name="Stability.Experimental.PageLoads" enum="StabilityPageLoadType"
    expires_after="2022-04-10">
  <owner>fdoray@chromium.org</owner>
  <owner>catan-team@chromium.org</owner>
  <summary>
    Counts "pageloads" by type. This is recorded when a page stops
    loading, i.e. from WebContentsObserver::DidStopLoading. The sum of all
    buckets of this histogram should be equal to the "Total pageloads"
    shown on Stability dashboards and can be used to diagnose changes to this
    value.
  </summary>
</histogram>

<histogram name="Stability.Experimental.ProcessId" units="process id"
    expires_after="2021-10-31">
  <obsolete>
    Removed 2021/09
  </obsolete>
  <owner>asvitkine@chromium.org</owner>
  <owner>chrome-metrics-team@google.com</owner>
  <summary>
    Logs the process id as a histogram, to help debug crbug.com/1176977. Logged
    with MOD 1000 to limit the number of distinct values reported.
  </summary>
</histogram>

<histogram name="Stability.Experimental.RandInt" units="random number"
    expires_after="2021-10-31">
  <obsolete>
    Removed 2021/09
  </obsolete>
  <owner>asvitkine@chromium.org</owner>
  <owner>chrome-metrics-team@google.com</owner>
  <summary>
    Logs a random number in the range 0 to 999 to help debug crbug.com/1176977.
  </summary>
</histogram>

<histogram name="Stability.Experimental.SessionId" units="session id"
    expires_after="2021-10-31">
  <obsolete>
    Removed 2021/09
  </obsolete>
  <owner>asvitkine@chromium.org</owner>
  <owner>chrome-metrics-team@google.com</owner>
  <summary>
    Logs the UMA session id as a histogram, to help debug crbug.com/1176977.
    Logged with MOD 1000 to limit the number of distinct values reported.
  </summary>
</histogram>

<histogram name="Stability.Internals.DataDiscardCount" units="counts"
    expires_after="M77">
  <obsolete>
    Removed on 10/2020.
  </obsolete>
  <owner>siggi@chromium.org</owner>
  <summary>
    Number of times stability data was discarded. This is accumulated since the
    last report, even across versions. This is logged during stability metric
    recording for the following log sent.
  </summary>
</histogram>

<histogram
    name="Stability.Internals.FileMetricsProvider.BrowserMetrics.UnsentFilesCount"
    units="counts" expires_after="M89">
  <owner>michaelbai@chromium.org</owner>
  <owner>src/base/metrics/OWNERS</owner>
  <summary>
    The number of unsent files. Emitted when the stability is recorded.
  </summary>
</histogram>

<histogram
    name="Stability.Internals.FileMetricsProvider.BrowserMetrics.UnsentSamplesCount"
    units="samples" expires_after="M89">
  <owner>michaelbai@chromium.org</owner>
  <owner>src/base/metrics/OWNERS</owner>
  <summary>
    The total number of samples that will be lost if ASSOCIATE_INTERNAL_PROFILE
    hasn't been enabled since the previous stability recorded. This is different
    than the previous browser run because one file was just uploaded before the
    stability is recorded.
  </summary>
</histogram>

<histogram name="Stability.Internals.InitialStabilityLogDeferredCount"
    units="counts" expires_after="M77">
  <obsolete>
    Removed on 10/2020.
  </obsolete>
  <owner>siggi@chromium.org</owner>
  <summary>
    Number of times the initial stability log upload was deferred to the next
    startup. This is logged during stability metric recording for the following
    log sent.
  </summary>
</histogram>

<histogram name="Stability.Internals.SystemCrashCount" units="crashes"
    expires_after="2022-10-20">
  <owner>davidbienvenu@chromium.org</owner>
  <owner>jessemckenna@google.com</owner>
  <summary>
    Number of times a browser crash was detected, where the browser was last
    known to be alive in a Windows system session that terminated abnormally.
  </summary>
</histogram>

<histogram name="Stability.Internals.VersionMismatchCount" units="counts"
    expires_after="M77">
  <obsolete>
    Removed on 10/2020.
  </obsolete>
  <owner>siggi@chromium.org</owner>
  <summary>
    Number of times the version number stored in prefs did not match the
    serialized system profile version number. This is logged during stability
    metric recording.
  </summary>
</histogram>

<histogram name="Stability.IOS.Crashpad.Initialized" enum="BooleanSuccess"
    expires_after="2022-06-15">
  <owner>justincohen@chromium.org</owner>
  <owner>olivierrobin@chromium.org</owner>
  <summary>
    Records whether Crashpad init was successful. Recorded on every app startup.
  </summary>
</histogram>

<histogram name="Stability.IOS.Experimental.Counts"
    enum="IOSStabilityUserVisibleTerminationType" expires_after="2022-06-15">
  <owner>ajuma@chromium.org</owner>
  <owner>olivierrobin@chromium.org</owner>
  <summary>
    Recorded when iOS app has started after a crash caused by system signal or
    hang. Not recorded when app has started after UTE / XTE or started after
    Chrome update. See go/bling-stability-101 for information about signal
    crashes, hangs, UTEs and XTEs. This metric intends to complement
    Stability.Counts. Stability.Counts does include UTEs / XTEs and thus is a
    noisy metric which significantly overcounts user-visible crashes.
    Stability.IOS.Experimental.Counts is not recorded on OOM crashes, so it does
    not represent all user-visible crashes, but OOMs are so rare in Chrome for
    iOS that Stability.IOS.Experimental.Counts is still a good proxy for
    user-visible crashes. IOS.MetricKit.ForegroundExitData includes OOM crashes
    (iOS 14 and higher) and can be used in conjunction with this metric.
  </summary>
</histogram>

<histogram name="Stability.iOS.TabCountBefore{Event}" units="tabs"
    expires_after="2022-05-05">
  <owner>djean@chromium.org</owner>
  <owner>olivierrobin@chromium.org</owner>
  <summary>
    The number of tabs opened in the previous session when the app starts after
    {Event}. Can be used to understand if there is a correlation between
    increase of number of tabs and decline in stability. iOS Only.
  </summary>
  <token key="Event">
    <variant name="CleanShutdown" summary="a clean shutdown"/>
    <variant name="Crash"
        summary="a crash. This metric is a superset of these 3 metrics:
                 Stability.iOS.TabCountBeforeFreeze,
                 Stability.iOS.TabCountBeforeSignalCrash,
                 Stability.iOS.TabCountBeforeUTE"/>
    <variant name="Freeze" summary="a UI thread freeze"/>
    <variant name="SignalCrash" summary="a signal crash"/>
    <variant name="UTE" summary="a crash (UTE or XTE)"/>
  </token>
</histogram>

<histogram name="Stability.IOS.UTE.AppWillTerminateWasCalledInForeground"
    enum="Boolean" expires_after="2022-06-06">
  <owner>olivierrobin@chromium.org</owner>
  <owner>ajuma@chromium.org</owner>
  <summary>
    Recorded on iOS when applicationWillTerminate callback is called when app is
    in the foreground. When this happens the app will not write clean exit
    beacon and shutdown will not be clean.
  </summary>
</histogram>

<histogram name="Stability.iOS.UTE.AvailableStorage" units="KB"
    expires_after="2021-10-10">
  <owner>michaeldo@chromium.org</owner>
  <owner>olivierrobin@chromium.org</owner>
  <summary>
    Number of kilobytes available for "important" data. When an iOS
    device is critically low on space, actions generally assumed to succeed can
    fail. In extreme cases, this could potentially include writing the
    "unclean shutdown" bit to signal a clean shutdown. Logged on
    application launch if the last session terminated in an unclean state.
  </summary>
</histogram>

<histogram name="Stability.iOS.UTE.BatteryCharge" units="%"
    expires_after="2022-05-01">
  <owner>michaeldo@chromium.org</owner>
  <owner>olivierrobin@chromium.org</owner>
  <summary>
    The last known battery charge before a crash occurred. This will only be
    logged for devices which were last known to be in the "unplugged"
    state because the intention is to identify devices which may have died
    leading to unexpected terminations. Logged on application launch if the last
    session terminated in an unclean state.
  </summary>
</histogram>

<histogram name="Stability.iOS.UTE.DeviceThermalState"
    enum="IOSDeviceThermalState" expires_after="2022-05-01">
  <owner>michaeldo@chromium.org</owner>
  <owner>olivierrobin@chromium.org</owner>
  <summary>
    The thermal state of the device when a crash occured. Logged on application
    launch if the last session terminated in an unclean state.
  </summary>
</histogram>

<histogram name="Stability.iOS.UTE.HasPossibleExplanation"
    enum="BooleanHasPossibleExplanation" expires_after="2022-04-24">
  <owner>michaeldo@chromium.org</owner>
  <owner>olivierrobin@chromium.org</owner>
  <summary>
    Indicates whether or not one of the Stability.iOS.UTE.* metrics could
    explain the cause of the UTE which terminated the previous session. Logged
    on application launch if the last session terminated in an unclean state.
  </summary>
</histogram>

<histogram name="Stability.iOS.UTE.LowPowerModeEnabled" enum="BooleanEnabled"
    expires_after="2021-12-12">
  <obsolete>
    Removed 11/2021
  </obsolete>
  <owner>michaeldo@chromium.org</owner>
  <owner>olivierrobin@chromium.org</owner>
  <summary>
    The power mode of the device when a crash occurred. Logged on application
    launch if the last session terminated in an unclean state.
  </summary>
</histogram>

<histogram name="Stability.iOS.UTE.MobileSessionAppState" enum="IOSAppState"
    expires_after="2022-12-11">
  <owner>justincohen@chromium.org</owner>
  <owner>olivierrobin@chromium.org</owner>
  <summary>
    Recorded when app starts after Unexplained Termination Event (UTE) or
    Explained Termination Event (XTE). Values other than Active indicate that
    prefs::kLastSessionExitedCleanly was not properly stored.
  </summary>
</histogram>

<histogram name="Stability.iOS.UTE.MobileSessionAppWillTerminateWasReceived"
    enum="AppWillTerminateReceived" expires_after="2022-11-14">
  <owner>michaeldo@chromium.org</owner>
  <owner>olivierrobin@chromium.org</owner>
  <summary>
    Recorded when app starts after Unexplained Termination Event (UTE) or
    Explained Termination Event (XTE). UTEs/XTEs can happen when app did not
    finish writing prefs. This histogram should help to understand if prefs did
    not get written during normal app termination sequence when
    ApplicationWillTerminate notification was called.
  </summary>
</histogram>

<histogram name="Stability.iOS.UTE.MobileSessionOOMShutdownHint"
    enum="OOMShutdownHint" expires_after="2022-05-11">
  <owner>olivierrobin@chromium.org</owner>
  <owner>sdefresne@chromium.org</owner>
  <summary>
    Recorded when app starts after Unexplained Termination Event (UTE) or
    Explained Termination Event (XTE). UTEs/XTEs can be caused by large memory
    allocations and this histogram provides information which memory heavy
    operation has being performed before UTE/XTE.
  </summary>
</histogram>

<histogram name="Stability.iOS.UTE.OSRestartedAfterPreviousSession"
    enum="BooleanRebooted" expires_after="2022-05-01">
  <owner>olivierrobin@chromium.org</owner>
  <owner>michaeldo@chromium.org</owner>
  <summary>
    true if OS was restarted after the previous session. Logged on application
    launch if the last session terminated in an unclean state. If this is false
    then UTE was not caused by OS restart or shutdown.
  </summary>
</histogram>

<histogram name="Stability.iOS.UTE.OSVersion" enum="VersionComparison"
    expires_after="2022-05-01">
  <owner>michaeldo@chromium.org</owner>
  <owner>olivierrobin@chromium.org</owner>
  <summary>
    Logged on the session following a crash with the result of a comparison
    between the OS version of the session which crashed and the current OS
    version. Logged on application launch if the last session terminated in an
    unclean state.
  </summary>
</histogram>

<histogram name="Stability.iOS.UTE.TimeBetweenUTEAndNextLaunch" units="ms"
    expires_after="2022-05-01">
  <owner>michaeldo@chromium.org</owner>
  <owner>olivierrobin@chromium.org</owner>
  <summary>
    The estimated amount of time between when a crash occurred and when the user
    relaunched the application. Logged on application launch if the last session
    terminated in an unclean state.
  </summary>
</histogram>

<histogram name="Stability.MobileSessionShutdownType"
    enum="MobileSessionShutdownType" expires_after="2022-05-01">
  <owner>michaeldo@chromium.org</owner>
  <owner>olivierrobin@chromium.org</owner>
  <summary>
    Type of the shutdown. This histogram is recorded at startup and logs a
    sample for the previous session. A clean shutdown is one where the app
    enters the background before being killed. Other shutdowns are all some sort
    of crash. The absence of a crash log indicates that the app was killed by
    the OS, normally due to memory pressure. If memory pressure is extremely
    high, the app may not have had a chance to response to a memory warning
    before being killed. For first launch after upgrade, the crash reports may
    be discarded before this histogram is written to so it's not possible to
    determine if there's a valid crash log present or not.
  </summary>
</histogram>

<histogram name="Stability.RendererUnresponsiveBeforeTermination"
    enum="BooleanUnresponsive" expires_after="2020-04-26">
  <obsolete>
    Removed 12/2020.
  </obsolete>
  <owner>dtapuska@chromium.org</owner>
  <summary>
    If the renderer is considered unresponsive from the browser's perspective
    before the process is terminated. This metric is being used to figure out
    crash reports that have all idle threads and perhaps the process is being
    terminated when it shouldn't be. crbug.com/615090.
  </summary>
</histogram>

</histograms>

</histogram-configuration>


text:
{{'SIDE_NAV.SYSTEM_MGMT.REGISTRY' | translate}}

                    <hbr-filter [withDivider]="true" filterPlaceholder='{{"REPLICATION.FILTER_TARGETS_PLACEHOLDER" | translate}}' (filterEvt)="doSearchTargets($event)" [currentValue]="targetName"></hbr-filter>

                        <clr-icon shape="refresh"></clr-icon>

            <clr-datagrid (clrDgRefresh)="retrieve($event)" [clrDgLoading]="loading"  [(clrDgSelected)]="selectedRow">
                <clr-dg-action-bar>
                    <button id="add" type="button" class="btn  btn-secondary" (click)="openModal()"><clr-icon shape="plus" size="16"></clr-icon> {{'DESTINATION.NEW_ENDPOINT' | translate}}</button>
                    <button id="edit" type="button" class="btn  btn-secondary" [disabled]="!(selectedRow.length ===1)"  (click)="editTargets(selectedRow)" ><clr-icon shape="pencil" size="16"></clr-icon> {{'DESTINATION.EDIT' | translate}}</button>
                    <button id="delete" type="button" class="btn  btn-secondary" [disabled]="!selectedRow.length" (click)="deleteTargets(selectedRow)"><clr-icon shape="times" size="16"></clr-icon> {{'DESTINATION.DELETE' | translate}}</button>
                </clr-dg-action-bar>
                <clr-dg-column [clrDgSortBy]="'name'" class="flex-min-width">{{'DESTINATION.NAME' | translate}}</clr-dg-column>
                <clr-dg-column class="flex-min-width">{{'DESTINATION.STATUS' | translate}}</clr-dg-column>
                <clr-dg-column [clrDgField]="'url'" class="flex-min-width">{{'DESTINATION.URL' | translate}}</clr-dg-column>
                <clr-dg-column>{{'DESTINATION.PROVIDER' | translate}}</clr-dg-column>
                <clr-dg-column [clrDgSortBy]="'insecure'">{{'CONFIG.VERIFY_REMOTE_CERT' | translate }}</clr-dg-column>
                <clr-dg-column>{{'DESTINATION.AUTHENTICATION' | translate }}</clr-dg-column>
                <clr-dg-column [clrDgSortBy]="'creation_time'">{{'DESTINATION.CREATION_TIME' | translate}}</clr-dg-column>
                <clr-dg-placeholder>{{'DESTINATION.PLACEHOLDER' | translate }}</clr-dg-placeholder>
                <clr-dg-row *ngFor="let t of targets" [clrDgItem]='t'>
                    <clr-dg-cell class="flex-min-width">{{t.name}}</clr-dg-cell>
                    <clr-dg-cell class="flex-min-width">
                        {{'SCANNER.HEALTHY' | translate}}
                        <ng-template #elseBlock>
                            {{'SCANNER.UNHEALTHY' | translate}}
                        </ng-template>
                    </clr-dg-cell>
                    <clr-dg-cell class="flex-min-width">{{t.url}}</clr-dg-cell>
                    <clr-dg-cell>
                        {{getAdapterText(t.type)}}
                        <clr-signpost *ngIf="isHelmHub(t.type)">
                            <clr-icon clrSignpostTrigger
                                      class="color-red" shape="error-standard"></clr-icon>
                            <clr-signpost-content *clrIfOpen>
                                {{'DESTINATION.DEPRECATED' | translate}}
                            </clr-signpost-content>
                        </clr-signpost>
                    </clr-dg-cell>
                    <clr-dg-cell>
                        {{!t.insecure}}
                    </clr-dg-cell>
                    <clr-dg-cell>{{t.credential.type}}</clr-dg-cell>
                    <clr-dg-cell>{{t.creation_time | harborDatetime: 'short'}}</clr-dg-cell>
                </clr-dg-row>
                <clr-dg-footer>
                    <clr-dg-pagination #pagination [clrDgPageSize]="pageSize" [(clrDgPage)]="page" [clrDgTotalItems]="total">
                        <clr-dg-page-size [clrPageSizeOptions]="[15,25,50]">{{"PAGINATION.PAGE_SIZE" | translate}}</clr-dg-page-size>
                        {{pagination.firstItem + 1}} - {{pagination.lastItem + 1}} {{'DESTINATION.OF' | translate}}
                    {{total}} {{'DESTINATION.ITEMS' | translate}}
                    </clr-dg-pagination>
                </clr-dg-footer>
            </clr-datagrid>

    <confirmation-dialog #confirmationDialog (confirmAction)="confirmDeletion($event)"></confirmation-dialog>
    <hbr-create-edit-endpoint (reload)="refreshTargets()"></hbr-create-edit-endpoint>


text:
package benchmark

import (
	"reflect"
	"testing"
)

func isBoolToUint64FuncCalibrated(supplier func() bool) bool {
	return isCalibrated(reflect.Bool, reflect.Uint64, reflect.ValueOf(supplier).Pointer())
}

func isIntToUint64FuncCalibrated(supplier func() int) bool {
	return isCalibrated(reflect.Int, reflect.Uint64, reflect.ValueOf(supplier).Pointer())
}

func isInt8ToUint64FuncCalibrated(supplier func() int8) bool {
	return isCalibrated(reflect.Int8, reflect.Uint64, reflect.ValueOf(supplier).Pointer())
}

func isInt16ToUint64FuncCalibrated(supplier func() int16) bool {
	return isCalibrated(reflect.Int16, reflect.Uint64, reflect.ValueOf(supplier).Pointer())
}

func isInt32ToUint64FuncCalibrated(supplier func() int32) bool {
	return isCalibrated(reflect.Int32, reflect.Uint64, reflect.ValueOf(supplier).Pointer())
}

func isInt64ToUint64FuncCalibrated(supplier func() int64) bool {
	return isCalibrated(reflect.Int64, reflect.Uint64, reflect.ValueOf(supplier).Pointer())
}

func isUintToUint64FuncCalibrated(supplier func() uint) bool {
	return isCalibrated(reflect.Uint, reflect.Uint64, reflect.ValueOf(supplier).Pointer())
}

func isUint8ToUint64FuncCalibrated(supplier func() uint8) bool {
	return isCalibrated(reflect.Uint8, reflect.Uint64, reflect.ValueOf(supplier).Pointer())
}

func isUint16ToUint64FuncCalibrated(supplier func() uint16) bool {
	return isCalibrated(reflect.Uint16, reflect.Uint64, reflect.ValueOf(supplier).Pointer())
}

func isUint32ToUint64FuncCalibrated(supplier func() uint32) bool {
	return isCalibrated(reflect.Uint32, reflect.Uint64, reflect.ValueOf(supplier).Pointer())
}

func isUint64ToUint64FuncCalibrated(supplier func() uint64) bool {
	return isCalibrated(reflect.Uint64, reflect.Uint64, reflect.ValueOf(supplier).Pointer())
}

func setBoolToUint64FuncCalibrated(supplier func() bool) {
	setCalibrated(reflect.Bool, reflect.Uint64, reflect.ValueOf(supplier).Pointer())
}

func setIntToUint64FuncCalibrated(supplier func() int) {
	setCalibrated(reflect.Int, reflect.Uint64, reflect.ValueOf(supplier).Pointer())
}

func setInt8ToUint64FuncCalibrated(supplier func() int8) {
	setCalibrated(reflect.Int8, reflect.Uint64, reflect.ValueOf(supplier).Pointer())
}

func setInt16ToUint64FuncCalibrated(supplier func() int16) {
	setCalibrated(reflect.Int16, reflect.Uint64, reflect.ValueOf(supplier).Pointer())
}

func setInt32ToUint64FuncCalibrated(supplier func() int32) {
	setCalibrated(reflect.Int32, reflect.Uint64, reflect.ValueOf(supplier).Pointer())
}

func setInt64ToUint64FuncCalibrated(supplier func() int64) {
	setCalibrated(reflect.Int64, reflect.Uint64, reflect.ValueOf(supplier).Pointer())
}

func setUintToUint64FuncCalibrated(supplier func() uint) {
	setCalibrated(reflect.Uint, reflect.Uint64, reflect.ValueOf(supplier).Pointer())
}

func setUint8ToUint64FuncCalibrated(supplier func() uint8) {
	setCalibrated(reflect.Uint8, reflect.Uint64, reflect.ValueOf(supplier).Pointer())
}

func setUint16ToUint64FuncCalibrated(supplier func() uint16) {
	setCalibrated(reflect.Uint16, reflect.Uint64, reflect.ValueOf(supplier).Pointer())
}

func setUint32ToUint64FuncCalibrated(supplier func() uint32) {
	setCalibrated(reflect.Uint32, reflect.Uint64, reflect.ValueOf(supplier).Pointer())
}

func setUint64ToUint64FuncCalibrated(supplier func() uint64) {
	setCalibrated(reflect.Uint64, reflect.Uint64, reflect.ValueOf(supplier).Pointer())
}

// BoolToUint64Func benchmarks a function with the signature:
//     func(bool) uint64
// ID: B-11-1
func BoolToUint64Func(b *testing.B, supplier func() bool, toUint64Func func(bool) uint64) {
	if !isBoolSupplierCalibrated(supplier) {
		panic("supplier function not calibrated")
	}
	if !isBoolToUint64FuncCalibrated(supplier) {
		panic("BoolToUint64Func not calibrated with this supplier")
	}
	for i, count := 0, b.N; i < count; i++ {
		toUint64Func(supplier())
	}
}

// IntToUint64Func benchmarks a function with the signature:
//     func(int) uint64
// ID: B-11-2
func IntToUint64Func(b *testing.B, supplier func() int, toUint64Func func(int) uint64) {
	if !isIntSupplierCalibrated(supplier) {
		panic("supplier function not calibrated")
	}
	if !isIntToUint64FuncCalibrated(supplier) {
		panic("IntToUint64Func not calibrated with this supplier")
	}
	for i, count := 0, b.N; i < count; i++ {
		toUint64Func(supplier())
	}
}

// Int8ToUint64Func benchmarks a function with the signature:
//     func(int8) uint64
// ID: B-11-3
func Int8ToUint64Func(b *testing.B, supplier func() int8, toUint64Func func(int8) uint64) {
	if !isInt8SupplierCalibrated(supplier) {
		panic("supplier function not calibrated")
	}
	if !isInt8ToUint64FuncCalibrated(supplier) {
		panic("Int8ToUint64Func not calibrated with this supplier")
	}
	for i, count := 0, b.N; i < count; i++ {
		toUint64Func(supplier())
	}
}

// Int16ToUint64Func benchmarks a function with the signature:
//     func(int16) uint64
// ID: B-11-4
func Int16ToUint64Func(b *testing.B, supplier func() int16, toUint64Func func(int16) uint64) {
	if !isInt16SupplierCalibrated(supplier) {
		panic("supplier function not calibrated")
	}
	if !isInt16ToUint64FuncCalibrated(supplier) {
		panic("Int16ToUint64Func not calibrated with this supplier")
	}
	for i, count := 0, b.N; i < count; i++ {
		toUint64Func(supplier())
	}
}

// Int32ToUint64Func benchmarks a function with the signature:
//     func(int32) uint64
// ID: B-11-5
func Int32ToUint64Func(b *testing.B, supplier func() int32, toUint64Func func(int32) uint64) {
	if !isInt32SupplierCalibrated(supplier) {
		panic("supplier function not calibrated")
	}
	if !isInt32ToUint64FuncCalibrated(supplier) {
		panic("Int32ToUint64Func not calibrated with this supplier")
	}
	for i, count := 0, b.N; i < count; i++ {
		toUint64Func(supplier())
	}
}

// Int64ToUint64Func benchmarks a function with the signature:
//     func(int64) uint64
// ID: B-11-6
func Int64ToUint64Func(b *testing.B, supplier func() int64, toUint64Func func(int64) uint64) {
	if !isInt64SupplierCalibrated(supplier) {
		panic("supplier function not calibrated")
	}
	if !isInt64ToUint64FuncCalibrated(supplier) {
		panic("Int64ToUint64Func not calibrated with this supplier")
	}
	for i, count := 0, b.N; i < count; i++ {
		toUint64Func(supplier())
	}
}

// UintToUint64Func benchmarks a function with the signature:
//     func(uint) uint64
// ID: B-11-7
func UintToUint64Func(b *testing.B, supplier func() uint, toUint64Func func(uint) uint64) {
	if !isUintSupplierCalibrated(supplier) {
		panic("supplier function not calibrated")
	}
	if !isUintToUint64FuncCalibrated(supplier) {
		panic("UintToUint64Func not calibrated with this supplier")
	}
	for i, count := 0, b.N; i < count; i++ {
		toUint64Func(supplier())
	}
}

// Uint8ToUint64Func benchmarks a function with the signature:
//     func(uint8) uint64
// ID: B-11-8
func Uint8ToUint64Func(b *testing.B, supplier func() uint8, toUint64Func func(uint8) uint64) {
	if !isUint8SupplierCalibrated(supplier) {
		panic("supplier function not calibrated")
	}
	if !isUint8ToUint64FuncCalibrated(supplier) {
		panic("Uint8ToUint64Func not calibrated with this supplier")
	}
	for i, count := 0, b.N; i < count; i++ {
		toUint64Func(supplier())
	}
}

// Uint16ToUint64Func benchmarks a function with the signature:
//     func(uint16) uint64
// ID: B-11-9
func Uint16ToUint64Func(b *testing.B, supplier func() uint16, toUint64Func func(uint16) uint64) {
	if !isUint16SupplierCalibrated(supplier) {
		panic("supplier function not calibrated")
	}
	if !isUint16ToUint64FuncCalibrated(supplier) {
		panic("Uint16ToUint64Func not calibrated with this supplier")
	}
	for i, count := 0, b.N; i < count; i++ {
		toUint64Func(supplier())
	}
}

// Uint32ToUint64Func benchmarks a function with the signature:
//     func(uint32) uint64
// ID: B-11-10
func Uint32ToUint64Func(b *testing.B, supplier func() uint32, toUint64Func func(uint32) uint64) {
	if !isUint32SupplierCalibrated(supplier) {
		panic("supplier function not calibrated")
	}
	if !isUint32ToUint64FuncCalibrated(supplier) {
		panic("Uint32ToUint64Func not calibrated with this supplier")
	}
	for i, count := 0, b.N; i < count; i++ {
		toUint64Func(supplier())
	}
}

// Uint64ToUint64Func benchmarks a function with the signature:
//     func(uint64) uint64
// ID: B-11-11
func Uint64ToUint64Func(b *testing.B, supplier func() uint64, toUint64Func func(uint64) uint64) {
	if !isUint64SupplierCalibrated(supplier) {
		panic("supplier function not calibrated")
	}
	if !isUint64ToUint64FuncCalibrated(supplier) {
		panic("Uint64ToUint64Func not calibrated with this supplier")
	}
	for i, count := 0, b.N; i < count; i++ {
		toUint64Func(supplier())
	}
}


text:
/*
*	jQueryUI.Combobox, v1.0.7
*	(c) 2015–2017 Artyom "Sleepwalker" Fedosov <mail@asleepwalker.ru>
*	https://github.com/asleepwalker/jquery-ui.combobox
*
*	Original from NPM 1.0.7
* 	Modified by Neil Smith, DLS to incorporate changes made to earlier vendor copy
* 	Added value method and pass classes into each item
*/

(function (factory) {
	if (typeof define === 'function' && define.amd) {
		define(['jquery'], factory);
	} else if (typeof module === 'object' && module.exports) {
		module.exports = function (root, jQuery) {
			if (jQuery === undefined) {
				if (typeof window !== 'undefined') {
					jQuery = require('jquery');
				} else {
					jQuery = require('jquery')(root);
				}
			}
			factory(jQuery);
			return jQuery;
		};
	} else {
		factory(jQuery);
	}
}(function ($) {

	$.widget('custom.combobox', {
		_create: function () {
			this.wrapper = $('<div>')
				.addClass('ui-combobox')
				.insertAfter(this.element);
			this.element.hide();
			this._createAutocomplete();
			this._createShowAllButton();
		},
		_createAutocomplete: function () {
			var selected = this.element.children(':selected');
			var value = selected.val() ? selected.text() : '';

			this.input = $('<input>')
				.appendTo(this.wrapper)
				.val(value)
				.attr('title', '')
				.addClass('ui-combobox-input ui-widget ui-widget-content ui-state-default ui-corner-left')
				.autocomplete({
					delay: 0,
					minLength: 0,
					source: $.proxy(this, '_source')
				});
			// Our items have HTML tags.  The default rendering uses text()
			// to set the content of the <a> tag.  We need html().
			this.input.data( "ui-autocomplete" )._renderItem = function( ul, item ) {
                return $( "<li>" )
                            .addClass(item.class)
							.append( $( "<a>" ).html( item.label+'' ) )
							.appendTo( ul );

			};
			this._on(this.input, {
				autocompleteselect: function (event, ui) {
					var input = this.input;

					input.removeClass('ui-input-invalid');
					ui.item.option.selected = true;
					this._trigger('select', event, {
						item: ui.item.option
					});
					setTimeout(function () {
						input.blur();
					}, 1);
				},
				focus: function () {

					// Make input empty but still keep visible previous value
					this.input
						.attr('placeholder', this.input.val())
						.val('');

					// Pass empty string as value to search for, displaying all results
					this.input.autocomplete('search', '');
				},
				blur: function () {

					// Restore previous value if another wasn't typed
					if (this.input.val() === '') {
						this.input.val(this.input.attr('placeholder'));
					}
					this._removeIfInvalid();
					this.element.trigger('change');
				}
			});
		},
		_createShowAllButton: function () {
			var input = this.input;
			var wasOpen = false;

			$('<span>')
				.addClass('ui-icon ui-icon-triangle-1-s')
				.attr('tabIndex', -1)
				.appendTo(this.wrapper)
				.click(function () {
					input.focus();
				});
		},
		_source: function (request, response) {
			var matcher = new RegExp($.ui.autocomplete.escapeRegex(request.term), 'i');
			response(this.element.children('option').map(function () {
				var text = $(this).text();
				if (this.value && (!request.term || matcher.test(text))) {
					// Concatenate the classes passed into this combobox
					var classes = []
					_.each(this.className.split(/\s+/), function(v) {
						classes.push(v)
					})

					return {
						label: text,
						value: text,
						option: this,
						class: classes.join(' ')
					};
				}
			}));
		},
		_removeIfInvalid: function (event, ui) {
			this.input.removeClass('ui-input-invalid');

			// Selected an item, nothing to do
			if (ui && ui.item) {
				return;
			}

			// Search for a match (case-insensitive)
			var value = this.input.val();
			var valueLowerCase = value.toLowerCase();
			var valid = false;

			this.element.children('option').each(function () {
				if ($(this).text().toLowerCase() === valueLowerCase) {
					this.selected = valid = true;
					return false;
				}
			});

			// Found a match, nothing to do
			if (valid) {
				return;
			}

			// Remove invalid value
			this.element.val('');
			this.input.autocomplete('instance').term = '';
			this.input.addClass('ui-input-invalid');
		},

		// New Method added from earlier vendor copy
		value: function ( newVal ) {
			var select = this.element,
				valid = false,
				selected;

			if ( !arguments.length ) {
			   selected = select.children( ":selected" );
			   return selected.length > 0 ? selected.val() : null;
			}

			select.prop('selectedIndex', -1);
			select.children('option').each(function() {
				  if ( this.value == newVal ) {
					 this.selected = valid = true;
					 return false;
				  }
			   });

			if ( valid ) {
			   this.input.val(select.children(':selected').text());
			} else {
			   this.input.val( "" );
			   this.element.prop('selectedIndex', -1);
			}

		 },

		_destroy: function () {
			this.wrapper.remove();
			this.element.show();
		}
	});

}));