!(5u8, ..=5));
    assert!(!yes!(6u8, ..=5));

    // i16; `..=X`
    assert!(yes!(core::i16::MIN, ..=core::i16::MIN));
    assert!(yes!(core::i16::MIN, ..=0));
    assert!(yes!(core::i16::MIN, ..=-5));
    assert!(yes!(-5, ..=-5));
    assert!(!yes!(-4, ..=-5));

    // char; `..=X`
    assert!(yes!('\u{0}', ..='\u{0}'));
    assert!(yes!('\u{0}', ..='a'));
    assert!(yes!('a', ..='a'));
    assert!(!yes!('b', ..='a'));

    // f32; `..=X`
    assert!(yes!(core::f32::NEG_INFINITY, ..=core::f32::NEG_INFINITY));
    assert!(yes!(core::f32::NEG_INFINITY, ..=1.0f32));
    assert!(yes!(1.5f32, ..=1.5f32));
    assert!(!yes!(1.6f32, ..=-1.5f32));

    // f64; `..=X`
    assert!(yes!(core::f64::NEG_INFINITY, ..=core::f64::NEG_INFINITY));
    assert!(yes!(core::f64::NEG_INFINITY, ..=1.0f64));
    assert!(yes!(1.5f64, ..=1.5f64));
    assert!(!yes!(1.6f64, ..=-1.5f64));
}

fn range_to() {
    // `..X` (`RangeTo`-equivalent):
    //-----------------------------

    // u8; `..X`
    assert!(yes!(0u8, ..1));
    assert!(yes!(0u8, ..5));
    assert!(!yes!(5u8, ..5));
    assert!(!yes!(6u8, ..5));

    // u8; `..X`
    const NU8: u8 = core::u8::MIN + 1;
    assert!(yes!(core::u8::MIN, ..NU8));
    assert!(yes!(0u8, ..5));
    assert!(!yes!(5u8, ..5));
    assert!(!yes!(6u8, ..5));

    // i16; `..X`
    const NI16: i16 = core::i16::MIN + 1;
    assert!(yes!(core::i16::MIN, ..NI16));
    assert!(yes!(core::i16::MIN, ..5));
    assert!(yes!(-6, ..-5));
    assert!(!yes!(-5, ..-5));

    // char; `..X`
    assert!(yes!('\u{0}', ..'\u{1}'));
    assert!(yes!('\u{0}', ..'a'));
    assert!(yes!('a', ..'b'));
    assert!(!yes!('a', ..'a'));
    assert!(!yes!('b', ..'a'));

    // f32; `..X`
    assert!(yes!(core::f32::NEG_INFINITY, ..1.0f32));
    assert!(!yes!(1.5f32, ..1.5f32));
    const E32: f32 = 1.5f32 + core::f32::EPSILON;
    assert!(yes!(1.5f32, ..E32));
    assert!(!yes!(1.6f32, ..1.5f32));

    // f64; `..X`
    assert!(yes!(core::f64::NEG_INFINITY, ..1.0f64));
    assert!(!yes!(1.5f64, ..1.5f64));
    const E64: f64 = 1.5f64 + core::f64::EPSILON;
    assert!(yes!(1.5f64, ..E64));
    assert!(!yes!(1.6f64, ..1.5f64));
}

fn range_from() {
    // `X..` (`RangeFrom`-equivalent):
    //--------------------------------

    // u8; `X..`
    assert!(yes!(core::u8::MIN, core::u8::MIN..));
    assert!(yes!(core::u8::MAX, core::u8::MIN..));
    assert!(!yes!(core::u8::MIN, 1..));
    assert!(!yes!(4, 5..));
    assert!(yes!(5, 5..));
    assert!(yes!(6, 5..));
    assert


eckSolution();

				if (val == TRUE)
				{
					self->mental = 2;

					e = self->target;

					while (e != NULL)
					{
						e->flags &= ~DO_NOT_PERSIST;

						e = e->target;
					}
				}

				else if (val == FALSE)
				{
					self->endY -= TILE_SIZE;
					self->endX = self->x;

					if (self->endY < self->y)
					{
						self->endY = self->y;

						self->mental = 1;
					}
				}
			}

			break;
		}

		e = e->target;
	}
}

static void addCursor()
{
	Entity *e = getFreeEntity();

	if (e == NULL)
	{
		showErrorAndExit("No free slots to add a Mastermind Cursor");
	}

	loadProperties("item/jigsaw_puzzle_cursor", e);

	e->x = self->endX;
	e->y = self->endY;

	e->action = &cursorWait;

	e->draw = &drawLoopingAnimationToMap;

	e->head = self;

	setEntityAnimation(e, "STAND");
}

static void cursorWait()
{
	self->x = self->head->endX;
	self->y = self->head->endY;
}

static void generateSolution()
{
	int i;
	char c[2];
	Entity *e;

	for (i=0;i<4;i++)
	{
		SNPRINTF(c, 2, "%ld", 1 + prand() % self->health);

		self->requires[i] = c[0];
	}

	self->requires[i] = '\0';

	e = self->target;

	while (e != NULL)
	{
		e->health = 0;

		setEntityAnimationByID(e, e->health);

		e = e->target;
	}

	self->endX = self->x;
	self->endY = self->y + self->h - TILE_SIZE;
}

static int checkSolution()
{
	int i, total;
	char solution[6], c[2];
	Entity *e;

	e = self->target;

	while (e != NULL)
	{
		if (e->y == self->endY && e->x == self->x)
		{
			break;
		}

		e = e->target;
	}

	if (e == NULL)
	{
		showErrorAndExit("Could not find starting peg for row");
	}

	for (i=0;i<4;i++)
	{
		if (e->health == 0)
		{
			setInfoBoxMessage(180, 255, 255, 255, _("Select a colour for every peg in the row"));

			return -1;
		}

		SNPRINTF(c, 2, "%d", e->health);

		solution[i] = c[0];

		e = e->target;
	}

	solution[i] = '\0';

	total = 0;

	for (i=0;i<4;i++)
	{
		if (solution[i] == self->requires[i])
		{
			total++;
		}
	}

	e->health = total + 1;

	setEntityAnimationByID(e, e->health);

	return strcmpignorecase(solution, self->requires) == 0 ? TRUE : FALSE;
}

static void pegInit()
{
	setEntityAnimationByID(self, self->health);

	self->mental = 0;

	self->action = &entityWait;

	self->flags &= ~DO_NOT_PERSIST;
}


_LEAVE)
                            leaveKeyPoints.push(tOjb.key_point);
                        if ((tOjb.key_point.value_type & td.data.KEY_POINT_TYPE_LEAVE) && (tOjb.key_point.value_type & td.data.KEY_POINT_TYPE_CAR))
                            carleaveKeyPoint = tOjb.key_point;
                        if (tOjb.key_point.value_type & td.data.KEY_POINT_TYPE_CAR)
                            carKeyPoints.push(tOjb.key_point);
                        if (tOjb.key_point.value_type & td.data.KEY_POINT_TYPE_STOP && !tOjb.key_point.id)
                            carstopKeyPoint = tOjb.key_point;

                    }

                    if (!tOjb.key_point || !tOjb.key_point.id || (tOjb.key_point.value_type & td.data.KEY_POINT_TYPE_QUEUE))
                        normalTrunkPoints.push(tOjb);
                    let tkpt: TrunkPoint = new TrunkPoint();
                    tkpt.id = trunkPoints.length;
                    tkpt.x = tOjb.x;
                    tkpt.y = tOjb.y;
                    let nextArr = tOjb.next;
                    let nextLen: number = nextArr.length;
                    for (var j: number = 0; j < nextLen; j = j + 2) {
                        tkpt.nextPoints.push(new Point(Number(nextArr[j]), Number(nextArr[j + 1])));
                    }

                    tkpt.key_point = tOjb.key_point
                    trunkPoints.push(tkpt);
                }

                conf.trunkPath = new TrunkPath();
                conf.trunkPath.trunkPoints = trunkPoints;
                let arrss = ["0_1", "5_1", "6_1", "7_1"];
                if (arrss.indexOf(conf.id) == -1)
                    console.log("闲逛点数量:", hangKeyPoints.length)
                if (!hangKeyPoints.length && arrss.indexOf(conf.id) == -1)
                    console.log("非科室闲逛点: " + conf.id);
                if (!departhangKeyPoints.length && arrss.indexOf(conf.id) == -1)
                    console.log("科室闲逛点: " + conf.id);
                if (!outdepartKeyPoints.length && arrss.indexOf(conf.id) == -1)
                    console.log("科室出口点: " + conf.id);
                if (!guardKeyPoints.length && (arrss.indexOf(conf.id) == -1 || conf.id == "7_1"))
                    console.log("门卫闲逛点: " + conf.id);
                if (!bornKeyPoints.length && arrss.indexOf(conf.id) == -1)
                    console.log("人出生点: " + conf.id);
                if (!leaveKeyPoints.length && arrss.indexOf(conf.id) == -1)
                    console.log("人离开点: " + conf.id);
                if (!carKeyPoints.length && arrss.indexOf(conf.id) == -1)
                    console.log("车道点: " + conf.id);
                if (!carbornKeyPoint && arrss.indexOf(conf.id) == -1)
                    console.log("车出生点: " + conf.id);
                if (!carleaveKeyPoint && arrss.indexOf(conf.id) == -1)
                    console.log("车离开点: " + conf.id);
                if (!carstopKeyPoint && arrss.indexOf(conf.id) == -1)
                    console.log("车停驻点: " + conf.id);
                if (!normalTrunkPoints.length && arrss.indexOf(conf.id) == -1)
                    console.log("非科室干道点: " + conf.id);
                if (!keyPoints.length && arrss.indexOf(conf.id) == -1)
                    console.log("关键点: " + conf.id);
                len = hangKeyPoints.length;
                for (let i = 0; i < len; i++) {


_,j,M,$,W,X,Y,Z,ee,ae=1,ie=!1,le=!1;if(null!==i.listener&&i.listener("open",i),i.tag=null,i.anchor=null,i.kind=null,i.result=null,_=j=M=Kr===u||Wr===u,m&&skipSeparationSpace(i,!0,-1)&&(ie=!0,i.lineIndent>s?ae=1:i.lineIndent===s?ae=0:i.lineIndent<s&&(ae=-1)),1===ae)for(;readTagProperty(i)||readAnchorProperty(i);)skipSeparationSpace(i,!0,-1)?(ie=!0,M=_,i.lineIndent>s?ae=1:i.lineIndent===s?ae=0:i.lineIndent<s&&(ae=-1)):M=!1;if(M&&(M=ie||v),1!==ae&&Kr!==u||(Z=Ur===u||Vr===u?s:s+1,ee=i.position-i.lineStart,1===ae?M&&(readBlockSequence(i,ee)||function readBlockMapping(i,s,u){var m,v,_,j,M,$,W,X=i.tag,Y=i.anchor,Z={},ee=Object.create(null),ae=null,ie=null,le=null,ce=!1,pe=!1;if(-1!==i.firstTabInLine)return!1;for(null!==i.anchor&&(i.anchorMap[i.anchor]=Z),W=i.input.charCodeAt(i.position);0!==W;){if(ce||-1===i.firstTabInLine||(i.position=i.firstTabInLine,throwError(i,"tab characters must not be used in indentation")),m=i.input.charCodeAt(i.position+1),_=i.line,63!==W&&58!==W||!is_WS_OR_EOL(m)){if(j=i.line,M=i.lineStart,$=i.position,!composeNode(i,u,Vr,!1,!0))break;if(i.line===_){for(W=i.input.charCodeAt(i.position);is_WHITE_SPACE(W);)W=i.input.charCodeAt(++i.position);if(58===W)is_WS_OR_EOL(W=i.input.charCodeAt(++i.position))||throwError(i,"a whitespace character is expected after the key-value separator within a block mapping"),ce&&(storeMappingPair(i,Z,ee,ae,ie,null,j,M,$),ae=ie=le=null),pe=!0,ce=!1,v=!1,ae=i.tag,ie=i.result;else{if(!pe)return i.tag=X,i.anchor=Y,!0;throwError(i,"can not read an implicit mapping pair; a colon is missed")}}else{if(!pe)return i.tag=X,i.anchor=Y,!0;throwError(i,"can not read a block mapping entry; a multiline key may not be an implicit key")}}else 63===W?(ce&&(storeMappingPair(i,Z,ee,ae,ie,null,j,M,$),ae=ie=le=null),pe=!0,ce=!0,v=!0):ce?(ce=!1,v=!0):throwError(i,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),i.position+=1,W=m;if((i.line===_||i.lineIndent>s)&&(ce&&(j=i.line,M=i.lineStart,$=i.position),composeNode(i,s,Kr,!0,v)&&(ce?ie=i.result:le=i.result),ce||(storeMappingPair(i,Z,ee,ae,ie,le,j,M,$),ae=ie=le=null),skipSeparationSpace(i,!0,-1),W=i.input.charCodeAt(i.position)),(i.line===_||i.lineIndent>s)&&0!==W)throwError(i,"bad indentation of


 lose a connectivity between the source and destination).

### get the shortest path
`src_node` and `dst_node` accepts OSPF RID as a value.
```
r_post = requests.post('https://topolograph.com/api/path', auth=('', ''), json={'graph_time': '27Dec2022_22h46m01s_7_hosts_ospfwatcher', 'src_node': '192.168.100.100', 'dst_node': '10.1.123.23'})
r_post.json()
```
![](https://github.com/Vadims06/topolograph/blob/aaabbef7bcbf5666024702aa1419599e9b9cd617/docs/release-notes/v2.28/api_shortest_path.png)
A `'192.168.100.100' - '10.1.1.4'` link is shown as nonbackuped
The visual path
![](https://github.com/Vadims06/topolograph/blob/aaabbef7bcbf5666024702aa1419599e9b9cd617/docs/release-notes/v2.28/shortest_path_graph.png)

### get backup path
`removedEdgesAsNodePairsFromSptPath_ll_in_ll` accepts a list of edges which will be treated as down links
```
r_post = requests.post('https://topolograph.com/api/path', auth=('', ''), json={'graph_time': '27Dec2022_22h46m01s_7_hosts_ospfwatcher', 'src_node': '192.168.100.100', 'dst_node': '10.1.123.23', 'removedEdgesAsNodePairsFromSptPath_ll_in_ll': [['10.1.1.4', '10.1.1.2']]})
r_post.json()
```
![](https://github.com/Vadims06/topolograph/blob/aaabbef7bcbf5666024702aa1419599e9b9cd617/docs/release-notes/v2.28/api_backup_path.png)
The visual path
![](https://github.com/Vadims06/topolograph/blob/aaabbef7bcbf5666024702aa1419599e9b9cd617/docs/release-notes/v2.28/backup_path_graph.png)

### get the shortest path for networks
There is a separate method for getting the shortest path, which accepts IP addresses/IP network as an input.
Let's build a path between `192.1.113.99` IP and `192.1.213.0/24` network.
```
r_post = requests.post('https://topolograph.com/api/path/network', auth=('', ''), json={'graph_time': '27Dec2022_22h46m01s_7_hosts_ospfwatcher', 'src_ip_or_network': '192.1.113.99', 'dst_ip_or_network': '192.1.213.0/24'})
r_post.json()
```
![](https://github.com/Vadims06/topolograph/blob/aaabbef7bcbf5666024702aa1419599e9b9cd617/docs/release-notes/v2.28/api__shortest_path_between_networks.png)
The visual path
![](https://github.com/Vadims06/topolograph/blob/921fcf316f63f3ff6fafc1f6c899031952ad0bc4/docs/release-notes/v2.28/shortest_path_between_networks.png)

Full API schema is [here](https://topolograph.com/api/ui/)
# Topolog


#######################################################################
#
# Example of using Python and the XlsxWriter module to create
# worksheet panes.
#
# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2013-2025, John McNamara, jmcnamara@cpan.org
#
import xlsxwriter

workbook = xlsxwriter.Workbook("panes.xlsx")

worksheet1 = workbook.add_worksheet("Panes 1")
worksheet2 = workbook.add_worksheet("Panes 2")
worksheet3 = workbook.add_worksheet("Panes 3")
worksheet4 = workbook.add_worksheet("Panes 4")

#######################################################################
#
# Set up some formatting and text to highlight the panes.
#
header_format = workbook.add_format(
    {
        "bold": True,
        "align": "center",
        "valign": "vcenter",
        "fg_color": "#D7E4BC",
        "border": 1,
    }
)

center_format = workbook.add_format({"align": "center"})

#######################################################################
#
# Example 1. Freeze pane on the top row.
#
worksheet1.freeze_panes(1, 0)

# Other sheet formatting.
worksheet1.set_column("A:I", 16)
worksheet1.set_row(0, 20)
worksheet1.set_selection("C3")

# Some text to demonstrate scrolling.
for col in range(0, 9):
    worksheet1.write(0, col, "Scroll down", header_format)

for row in range(1, 100):
    for col in range(0, 9):
        worksheet1.write(row, col, row + 1, center_format)

#######################################################################
#
# Example 2. Freeze pane on the left column.
#
worksheet2.freeze_panes(0, 1)

# Other sheet formatting.
worksheet2.set_column("A:A", 16)
worksheet2.set_selection("C3")

# Some text to demonstrate scrolling.
for row in range(0, 50):
    worksheet2.write(row, 0, "Scroll right", header_format)
    for col in range(1, 26):
        worksheet2.write(row, col, col, center_format)

#######################################################################
#
# Example 3. Freeze pane on the top row and left column.
#
worksheet3.freeze_panes(1, 1)

# Other sheet formatting.
worksheet3.set_column("A:Z", 16)
worksheet3.set_row(0, 20)
worksheet3.set_selection("C3")
worksheet3.write(0, 0, "", header_format)

# Some text to demonstrate scrolling.
for col in range(1, 26):
    worksheet3.write(0, col, "Scroll down", header_format)

for row in range(1, 50):
    worksheet3.write(row, 0, "Scroll right", header_format)
    for col in range(1, 26):
        worksheet3.write(row, col, col, center_format)

#######################################################################
#
# Example 4. Split pane on the top row and left column.
#
# The divisions must be specified in terms of row and column dimensions.
# The default row height is 15 and the default column width is 8.43
#
worksheet4.split_panes(15, 8.43)

# Other sheet formatting.
worksheet4.set_selection("C3")

# Some text to demonstrate scrolling.
for col in range(1, 26):
    worksheet4.write(0, col, "Scroll", center_format)

for row in range(1, 50):
    worksheet4.write(row, 0, "Scroll", center_format)
    for col in range(1, 26):
        worksheet4.write(row, col, col, center_format)

workbook.close()


# coding: utf-8

## Quick start guide

# This short guide shows the key steps in using BayesPy for variational Bayesian inference by applying BayesPy to a simple problem. The key steps in using BayesPy are the following:
#
# * Construct the model
#
# * Observe some of the variables by providing the data in a proper format
#
# * Run variational Bayesian inference
#
# * Examine the resulting posterior approximation
#
# To demonstrate BayesPy, we'll consider a very simple problem: we have a set of observations from a Gaussian distribution with unknown mean and variance, and we want to learn these parameters.  In this case, we do not use any real-world data but generate some artificial data. The dataset consists of ten samples from a Gaussian distribution with mean 5 and standard deviation 10. This dataset can be generated with NumPy as follows:

# In[1]:

import numpy as np
data = np.random.normal(5, 10, size=(10,))

# Now, given this data we would like to estimate the mean and the standard deviation as if we didn't know their values. The model can be defined as follows:
#
# $$
# \begin{split}
# p(\mathbf{y}|\mu,\tau) &= \prod^{9}_{n=0} \mathcal{N}(y_n|\mu,\tau) \\
# p(\mu) &= \mathcal{N}(\mu|0,10^{-6}) \\
# p(\tau) &= \mathcal{G}(\tau|10^{-6},10^{-6})
# \end{split}
# $$
#
# where $\mathcal{N}$ is the Gaussian distribution parameterized by its mean and precision (i.e., inverse variance), and $\mathcal{G}$ is the gamma distribution parameterized by its shape and rate parameters. Note that we have given quite uninformative priors for the variables $\mu$ and $\tau$.  This simple model can also be shown as a directed factor graph:

# This model can be constructed in BayesPy as follows:

# In[2]:

from bayespy.nodes import GaussianARD, Gamma
mu = GaussianARD(0, 1e-6)
tau = Gamma(1e-6, 1e-6)
y = GaussianARD(mu, tau, plates=(10,))

# In[3]:

y.observe(data)

# Next we want to estimate the posterior distribution.  In principle, we could use different inference engines (e.g., MCMC or EP) but currently only variational Bayesian (VB) engine is implemented.  The engine is initialized by giving all the nodes of the model:

# In[4]:

from bayespy.inference import VB
Q = VB(mu, tau, y)

# The inference algorithm can be run as long as wanted (max. 20 iterations in this case):

# In[5]:

Q.update(repeat=20)

# Now the algorithm converged after four iterations, before the requested 20 iterations.
#
# VB approximates the true posterior $p(\mu,\tau|\mathbf{y})$ with a distribution which factorizes with respect to the nodes: $q(\mu)q(\tau)$. The resulting approximate posterior distributions $q(\mu)$ and $q(\tau)$ can be examined, for instance, by plotting the marginal probability density functions:

# In[6]:

import bayespy.plot as bpplt
# The following two two lines are just for enabling matplotlib plotting in notebooks
get_ipython().magic('matplotlib inline')
bpplt.pyplot.plot([])
bpplt.pyplot.subplot(2, 1, 1)
bpplt.pdf(mu, np.linspace(-10, 20, num=100), color='k', name=r'\mu')
bpplt.pyplot.subplot(2, 1, 2)
bpplt.pdf(tau, np.linspace(1e-6, 0.08, num=100), color='k', name=r'\tau');

# This example was a very simple introduction to using BayesPy.  The model can be much more complex and each phase contains more options to give the user more control over the inference.  The following sections give more details about the phases.


        u8 *reporters = (u8 *)q->state + m->reporter_offset;

        if (mmbit_any_precise(reporters, m->kilo_count)) {
            DEBUG_PRINTF("next byte\n");
            return 1; /* need to match at next byte */
        } else {
            s64a next_event = q->length;
            s64a next_pq = q->length;

            if (q->cur < q->end) {
                next_event = q->items[q->cur].location;
            }

            struct mpv_decomp_state *s = (struct mpv_decomp_state *)q->state;
            struct mpv_pq_item *pq
                = (struct mpv_pq_item *)(q->state + m->pq_offset);
            if (s->pq_size) {
                next_pq = pq_top(pq)->trigger_loc;
            }

            assert(next_event);
            assert(next_pq);

            DEBUG_PRINTF("next pq %lld event %lld\n", next_pq, next_event);
            return MIN(next_pq, next_event);
        }
    }
}


from django.db import models
from django.utils.translation import gettext_lazy as _

# from General.models import City, State

# Abstract model for timestamps
class TimeStamp(models.Model):
    created_at = models.DateTimeField(verbose_name=_("created date"), auto_now_add=True)
    updated_at = models.DateTimeField(verbose_name=_("updated date"), auto_now=True)

    class Meta:
        verbose_name = _("TimeStamp")
        verbose_name_plural = _("TimeStamps")
        abstract = True

# Abstract model for SEO fields
class SEO(models.Model):
    meta_title = models.CharField(verbose_name=_("meta title"), max_length=200, blank=True, null=True)
    meta_keyword = models.TextField(verbose_name=_("meta keywords"), blank=True, null=True)
    meta_description = models.TextField(verbose_name=_("meta description"), blank=True, null=True)
    canonical = models.URLField(verbose_name=_("canonical link"), blank=True, null=True)

    class Meta:
        verbose_name = _("SEO")
        verbose_name_plural = _("SEO")
        abstract = True

# Abstract model for Address fields
class Address(models.Model):
    building_name = models.CharField(verbose_name=_("building name"), max_length=100, blank=True, null=True)
    street_name = models.CharField(verbose_name=_("street name"), max_length=100, blank=True, null=True)
    zip = models.CharField(verbose_name=_("zip code"), max_length=100, )
    city = models.ForeignKey("General.City", on_delete=models.CASCADE, verbose_name=_("city"), )
    state = models.ForeignKey("General.State", on_delete=models.CASCADE, verbose_name=_("state"), max_length=250, )
    latitude = models.DecimalField(verbose_name=_("latitude"), max_digits=12, decimal_places=9, )
    longitude = models.DecimalField(verbose_name=_("longitude"), max_digits=12, decimal_places=9, )
    full_address = models.TextField(verbose_name=_("full address"), )

    class Meta:
        verbose_name = _("Address")
        verbose_name_plural = _("Addresses")
        abstract = True


,{fill:"currentColor",d:"M704 320a64 64 0 1 1 0 128 64 64 0 0 1 0-128M288 448h256q32 0 32 32t-32 32H288q-32 0-32-32t32-32m0 128h256q32 0 32 32t-32 32H288q-32 0-32-32t32-32"})]))}}),b2e=y2e,T2e=z({name:"Pouring",__name:"pouring",setup(t){return(e,n)=>(L(),H("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[D("path",{fill:"currentColor",d:"m739.328 291.328-35.2-6.592-12.8-33.408a192.064 192.064 0 0 0-365.952 23.232l-9.92 40.896-41.472 7.04a176.32 176.32 0 0 0-146.24 173.568c0 97.28 78.72 175.936 175.808 175.936h400a192 192 0 0 0 35.776-380.672zM959.552 480a256 256 0 0 1-256 256h-400A239.808 239.808 0 0 1 63.744 496.192a240.32 240.32 0 0 1 199.488-236.8 256.128 256.128 0 0 1 487.872-30.976A256.064 256.064 0 0 1 959.552 480M224 800a32 32 0 0 1 32 32v96a32 32 0 1 1-64 0v-96a32 32 0 0 1 32-32m192 0a32 32 0 0 1 32 32v96a32 32 0 1 1-64 0v-96a32 32 0 0 1 32-32m192 0a32 32 0 0 1 32 32v96a32 32 0 1 1-64 0v-96a32 32 0 0 1 32-32m192 0a32 32 0 0 1 32 32v96a32 32 0 1 1-64 0v-96a32 32 0 0 1 32-32"})]))}}),C2e=T2e,R2e=z({name:"Present",__name:"present",setup(t){return(e,n)=>(L(),H("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[D("path",{fill:"currentColor",d:"M480 896V640H192v-64h288V320H192v576zm64 0h288V320H544v256h288v64H544zM128 256h768v672a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32z"}),D("path",{fill:"currentColor",d:"M96 256h832q32 0 32 32t-32 32H96q-32 0-32-32t32-32"}),D("path",{fill:"currentColor",d:"M416 256a64 64 0 1 0 0-128 64 64 0 0 0 0 128m0 64a128 128 0 1 1 0-256 128 128 0 0 1 0 256"}),D("path",{fill:"currentColor",d:"M608 256a64 64 0 1 0 0-128 64 64 0 0 0 0 128m0 64a128 128 0 1 1 0-256 128 128 0 0 1 0 256"})]))}}),A2e=R2e,w2e=z({name:"PriceTag",__name:"price-tag",setup(t){return(e,n)=>(L(),H("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[D("path",{fill:"currentColor",d:"M224 318.336V896h576V318.336L552.512 115.84a64 64 0 0 0-81.024 0zM593.024 66.304l259.2 212.096A32 32 0 0 1 864 303.168V928a32 32 0 0 1-32 32H192a32 32 0 0 1-32-32V303.168a32 32 0 0 1 11.712-24.768l259.2-212.096a128 128 0 0 1 162.112 0z"}),D("path",{fill:"current


ment)
            newSource = newSource.replace(key, replacement)
        }

        return copy(
            id = id,
            name = newTitle,
            icon = icon,
            source = newSource,
        )
    }
}
package au.com.shiftyjelly.pocketcasts.repositories.transcript

import au.com.shiftyjelly.pocketcasts.models.to.TranscriptEntry
import com.squareup.moshi.Moshi
import okio.Buffer
import org.junit.Assert.assertEquals
import org.junit.Test

class JsonParserTest {
    private val parser = JsonParser(Moshi.Builder().build())

    @Test
    fun `parse json subtitles`() {
        val subtitles = """
            |{
            |  "segments": [
            |    {
            |      "body": "Text without spekaer"
            |    },
            |    {
            |      "body": "Text with spekaer",
            |      "speaker": "Speaker"
            |    }
            |  ]
            |}
        """.trimMargin()
        val source = Buffer().writeUtf8(subtitles)

        val entries = parser.parse(source).getOrThrow()

        assertEquals(
            listOf(
                TranscriptEntry.Text("Text without spekaer"),
                TranscriptEntry.Speaker("Speaker"),
                TranscriptEntry.Text("Text with spekaer"),
            ),
            entries,
        )
    }
}
package au.com.shiftyjelly.pocketcasts.repositories.transcript

import au.com.shiftyjelly.pocketcasts.models.to.TranscriptEntry
import okio.Buffer
import org.junit.Assert.assertEquals
import org.junit.Test
import org.junit.runner.RunWith
import org.robolectric.RobolectricTestRunner
import org.robolectric.annotation.Config

@Config(manifest = Config.NONE)
@RunWith(RobolectricTestRunner::class)
class SrtParserTest {
    private val parser = SrtParser()

    @Test
    fun `parse srt subtitles`() {
        val subtitles = """
            |1
            |00:00:00,000 --> 00:00:01,000
            |Text
            |
            |2
            |00:00:01,000 --> 00:00:02,000
            |Text with HTML tags
            |
            |3
            |00:00:02,000 --> 00:00:03,000
            |Speaker 1: Text with speaker
        """.trimMargin()
        val source = Buffer().writeUtf8(subtitles)

        val entries = parser.parse(source).getOrThrow()

        assertEquals(
            listOf(
                TranscriptEntry.Text("Text"),
                TranscriptEntry.Text("Text with HTML tags"),
                TranscriptEntry.Speaker("Speaker 1"),
                TranscriptEntry.Text("Text with speaker"),
            ),
            entries,
        )
    }
}
package au.com.shiftyjelly.pocketcasts.repositories.payment

import android.app.Activity
import au.com.shiftyjelly.pocketcasts.analytics.AnalyticsEvent
import au.com.shiftyjelly.pocketcasts.analytics.AnalyticsTracker
import au.com.shiftyjelly.pocketcasts.analytics.Tracker
import au.com.shiftyjelly.pocketcasts.analytics.TrackerType
import au.com.shiftyjelly.pocketcasts.payment.FakePaymentDataSource
import au.com.shiftyjelly.pocketcasts.payment.PaymentClient
import au.com.shiftyjelly.pocketcasts.payment.PaymentResultCode
import au.com.shiftyjelly.pocketcasts.payment.SubscriptionOffer
import au.com.shiftyjelly.pocketcasts.payment.SubscriptionPlan
import kotlinx.coroutines.test.runTest
import org.junit.Assert.assertEquals
import org.


stmia r1!,{r2,r3,r4,r5,r6,r7,r8,r9}			;@ Store multiple values from the indexed address.	; Auto-increment R1

	;@	So the branches get the correct address we also need to copy our vector table!
    ldmia r0!,{r2,r3,r4,r5,r6,r7,r8,r9}			;@ Load from 4*n of regs (8) as R0 is now incremented.
    stmia r1!,{r2,r3,r4,r5,r6,r7,r8,r9}			;@ Store this extra set of data.

	;@	Set up the various STACK pointers for different CPU modes
    ;@ (PSR_IRQ_MODE|PSR_FIQ_DIS|PSR_IRQ_DIS)
    mov r0,#0xD2
    msr cpsr_c,r0
    mov sp,#0x8000

    ;@ (PSR_FIQ_MODE|PSR_FIQ_DIS|PSR_IRQ_DIS)
    mov r0,#0xD1
    msr cpsr_c,r0
    mov sp,#0x4000

    ;@ (PSR_SVC_MODE|PSR_FIQ_DIS|PSR_IRQ_DIS)
    mov r0,#0xD3
    msr cpsr_c,r0
	mov sp,#0x8000000

	ldr r0, =__bss_start
	ldr r1, =__bss_end

	mov r2, #0

zero_loop:
	cmp 	r0,r1
	it		lt
	strlt	r2,[r0], #4
	blt		zero_loop

	bl _bt_startup_init_hook
	bl _bt_startup_boot

	bl bt_main

.globl _bt_startup_init_hook
.weak _bt_startup_init_hook
_bt_startup_init_hook:
	bx	lr

.globl _bt_startup_boot
.weak _bt_startup_boot
_bt_startup_boot:
	bx 	lr

undefined:
	mov		r1, r14
	mov		r0, #10
	push	{r14}
	pop		{r14}
	b 		undefined

prefetch:
	mov		r1, r14
	mov		r0, #9
	push	{r14}
	pop		{r14}
	b 		undefined

data:
	mov		r1, r14
	mov		r0, #8
	push	{r14}
	pop		{r14}
	b data

unused:
	mov		r1, r14
	mov		r0, #7
	push	{r14}
	pop		{r14}
	b unused

fiq:
	mov		r1, r14
	mov		r0, #6
	push	{r14}
	pop		{r14}
	b 		fiq

hang:
	mov		r1,r14
	# Copy the exception return address to r1 ;@

	mov r0, r1
	#bl led_loop

	b hang

swi:
	@b		vPortYieldProcessor

;@irq:
;@ 	push 	{r0,r1,r2,r3,r4,r5,r6,r7,r8,r9,r10,r11,r12,lr}
;@    bl 		BT_irqHandler
;@    pop  	{r0,r1,r2,r3,r4,r5,r6,r7,r8,r9,r10,r11,r12,lr}
;@    subs 	pc,lr,#4

.globl enable_irq
enable_irq:
	mrs	r0,cpsr
	bic	r0,r0,#0x80
	msr	cpsr_c,r0
	bx	lr


            <add key="BrowserStack_OS" value="OS X" />
                <add key="BrowserStack_OS_Version" value="Mountain Lion" />
                <add key="HostIp" value="hub.browserstack.com" />
             */
        }

        [Test]
        public void Test()
        {
            driver.Navigate().GoToUrl("http://www.espn.com");
            var element = new Element("ESPN Element", By.XPath("//*[@class='espn-logo']//*[text()='ESPN']"));
            element.WaitUntil(10).Visible();
            Common.Log("Successfully navigated to " + driver.Title);
        }
    }
}


wing.Size(389, 38);
            this.button_reloadBiblioDbProperties.TabIndex = 2;
            this.button_reloadBiblioDbProperties.Text = "重新获得书目库属性列表(&B)";
            this.button_reloadBiblioDbProperties.UseVisualStyleBackColor = true;
            this.button_reloadBiblioDbProperties.Click += new System.EventHandler(this.button_reloadBiblioDbNames_Click);
            //
            // button_reloadBiblioDbFromInfos
            //
            this.button_reloadBiblioDbFromInfos.Location = new System.Drawing.Point(26, 77);
            this.button_reloadBiblioDbFromInfos.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
            this.button_reloadBiblioDbFromInfos.Name = "button_reloadBiblioDbFromInfos";
            this.button_reloadBiblioDbFromInfos.Size = new System.Drawing.Size(389, 38);
            this.button_reloadBiblioDbFromInfos.TabIndex = 1;
            this.button_reloadBiblioDbFromInfos.Text = "重新获得书目库检索途径列表(&F)";
            this.button_reloadBiblioDbFromInfos.UseVisualStyleBackColor = true;
            this.button_reloadBiblioDbFromInfos.Click += new System.EventHandler(this.button_reloadBiblioDbFromInfos_Click);
            //
            // button_clearValueTableCache
            //
            this.button_clearValueTableCache.Location = new System.Drawing.Point(26, 28);
            this.button_clearValueTableCache.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
            this.button_clearValueTableCache.Name = "button_clearValueTableCache";
            this.button_clearValueTableCache.Size = new System.Drawing.Size(389, 38);
            this.button_clearValueTableCache.TabIndex = 0;
            this.button_clearValueTableCache.Text = "清除值列表缓存(&V)";
            this.button_clearValueTableCache.UseVisualStyleBackColor = true;
            this.button_clearValueTableCache.Click += new System.EventHandler(this.button_clearValueTableCache_Click);
            //
            // tabPage_charging
            //
            this.tabPage_charging.AutoScroll = true;
            this.tabPage_charging.Controls.Add(this.checkBox_charging_isbnBorrow);
            this.tabPage_charging.Controls.Add(this.groupBox_charging_selectItemDialog);
            this.tabPage_charging.Controls.Add(this.checkBox_charging_noBorrowHistory);
            this.tabPage_charging.Controls.Add(this.checkBox_charging_patronBarcodeAllowHanzi);
            this.tabPage_charging.Controls.Add(this.checkBox_charging_speakNameWhenLoadReaderRecord);
            this.tabPage_charging.Controls.Add(this.checkBox_charging_stopFillingWhenCloseInfoDlg);
            this.tabPage_charging.Controls.Add(this.checkBox_charging_veifyReaderPassword);
            this.tabPage_charging.Controls.Add(this.checkBox_charging_autoClearTextbox);
            this.tabPage_charging.Controls.Add(this.checkBox_charging_autoSwitchReaderBarcode);
            this.tabPage_charging.Controls.Add(this.checkBox_charging_noBiblioAndItem);
            this.tabPage_charging.Controls.Add(this.checkBox_charging_greenInfoDlgNotOccur);
            this.tabPage_charging.Controls.Add(this.checkBox_charging_autoUppercaseBarcode);
            this.tabPage_charging.Controls.Add(this.comboBox_charging_displayFormat);
            this.tabPage_charging.Controls.Add(this.label7);
            this.tabPage_charging.Controls.Add(this.checkBox_charging_doubleItemInputAsEnd);
            this.tab


/* mc68020 __mpn_rshift -- Shift right a low-level natural-number integer.

Copyright (C) 1996, 1998 Free Software Foundation, Inc.

This file is part of the GNU MP Library.

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

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

You should have received a copy of the GNU Library General Public License
along with the GNU MP Library; see the file COPYING.LIB.  If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
MA 02111-1307, USA. */

/*
  INPUT PARAMETERS
  res_ptr	(sp + 4)
  s_ptr		(sp + 8)
  s_size	(sp + 16)
  cnt		(sp + 12)
*/

#include "sysdep.h"
#include "asm-syntax.h"

#define res_ptr a1
#define s_ptr a0
#define s_size d6
#define cnt d4

	TEXT
ENTRY(__mpn_rshift)
/* Save used registers on the stack.  */
	moveml	R(d2)-R(d6)/R(a2),MEM_PREDEC(sp)

/* Copy the arguments to registers.  */
	movel	MEM_DISP(sp,28),R(res_ptr)
	movel	MEM_DISP(sp,32),R(s_ptr)
	movel	MEM_DISP(sp,36),R(s_size)
	movel	MEM_DISP(sp,40),R(cnt)

	moveql	#1,R(d5)
	cmpl	R(d5),R(cnt)
	bne	L(Lnormal)
	cmpl	R(res_ptr),R(s_ptr)
	bls	L(Lspecial)		/* jump if res_ptr >= s_ptr */
#if (defined (__mc68020__) || defined (__NeXT__) || defined(mc68020))
	lea	MEM_INDX1(res_ptr,s_size,l,4),R(a2)
#else /* not mc68020 */
	movel	R(s_size),R(d0)
	asll	#2,R(d0)
	lea	MEM_INDX(res_ptr,d0,l),R(a2)
#endif
	cmpl	R(s_ptr),R(a2)
	bls	L(Lspecial)		/* jump if s_ptr >= res_ptr + s_size */

L(Lnormal:


leVariant for AttributeValueTupleVariantSerializer {
    type Ok = AttributeValue;
    type Error = Error;

    fn serialize_field<V: ?Sized>(&mut self, value: &V) -> Result<()>
    where
        V: Serialize,
    {
        self.values.push(value.serialize(AttributeValueSerializer)?);
        Ok(())
    }

    fn end(self) -> Result<AttributeValue> {
        Ok(AttributeValue {
            m: Some(hashmap! {
                self.variant => AttributeValue {
                    l: Some(self.values),
                    ..AttributeValue::default()
                }
            }),
            ..AttributeValue::default()
        })
    }
}

// =============================================================================

// Attribute Value Serialization Functions

pub fn to_attribute_value<T>(value: T) -> Result<AttributeValue>
where
    T: Serialize,
{
    value.serialize(AttributeValueSerializer::new())
}
#[doc = "Register `lo_config_2466` reader"]
pub struct R(crate::R<LO_CONFIG_2466_SPEC>);
impl core::ops::Deref for R {
    type Target = crate::R<LO_CONFIG_2466_SPEC>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
impl From<crate::R<LO_CONFIG_2466_SPEC>> for R {
    #[inline(always)]
    fn from(reader: crate::R<LO_CONFIG_2466_SPEC>) -> Self {
        R(reader)
    }
}
#[doc = "Register `lo_config_2466` writer"]
pub struct W(crate::W<LO_CONFIG_2466_SPEC>);
impl core::ops::Deref for W {
    type Target = crate::W<LO_CONFIG_2466_SPEC>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
impl core::ops::DerefMut for W {
    #[inline(always)]
    fn deref_mut(&mut self) -> &mut Self::Target {
        &mut self.0
    }
}
impl From<crate::W<LO_CONFIG_2466_SPEC>> for W {
    #[inline(always)]
    fn from(writer: crate::W<LO_CONFIG_2466_SPEC>) -> Self {
        W(writer)
    }
}
#[doc = "Field `adpll_sdm_dither_en_2466` reader - "]
pub struct ADPLL_SDM_DITHER_EN_2466_R(crate::FieldReader<bool, bool>);
impl ADPLL_SDM_DITHER_EN_2466_R {
    #[inline(always)]
    pub(crate) fn new(bits: bool) -> Self {
        ADPLL_SDM_DITHER_EN_2466_R(crate::FieldReader::new(bits))
    }
}
impl core::ops::Deref for ADPLL_SDM_DITHER_EN_2466_R {
    type Target = crate::FieldReader<bool, bool>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
#[doc = "Field `adpll_sdm_dither_en_2466` writer - "]
pub struct ADPLL_SDM_DITHER_EN_2466_W<'a> {
    w: &'a mut W,
}
impl<'a> ADPLL_SDM_DITHER_EN_2466_W<'a> {
    #[doc = r"Sets the field bit"]
    #[inline(always)]
    pub fn set_bit(self) -> &'a mut W {
        self.bit(true)
    }
    #[doc = r"Clears the field bit"]
    #[inline(always)]
    pub fn clear_bit(self) -> &'a mut W {
        self.bit(false)
    }
    #[doc = r"Writes raw bits to the field"]
    #[inline(always)]
    pub fn bit(self, value: bool) -> &'a mut W {
        self.w.bits = (self.w.bits & !(0x01 << 12)) | ((value as u32 & 0x01) << 12);
        self.w
    }
}
#[doc = "Field `kcal_ratio_2466` reader - "]
pub struct KCAL_RATIO_2466_R(crate::FieldReader<u16, u16>);
impl KCAL_RATIO_2466_R {
    #[inline(always)]
    pub(crate) fn new(bits: u16) -> Self {
        KCAL


誉，信誉和联系程度。

> “ 艾维是我们社区影响力最高的成员之一。他一直在Twitter上与人们互动，他的博客每月都会有成千上万的访问者。他还是一家受人尊敬的机构的高级工程师。”

与“热情”不同，影响力的计算是独立于特定社区的。 例外情况确实适用于已建立的社区，在这些社区中，仅了解成员在社区内部的影响范围是有用的，但对于希望成长的较小社区而言，通常更重要的是了解成员广义上的影响范围。

我们为什么在乎影响力？ 因为 **拥有高影响力的人会吸引其他人加入他们的行列，就像小行星被太阳系捕获一样。** 我们在高影响力人中建立起人际关系并对他们的热情进行投资可能会因此获得更大的回报。 虽然每个人都有一定的影响力，但作为轨道模型的创建者，我们的工作之一就是帮助我们的每个成员扩大影响范围。 稍后我们将看到，这样做还有助于增加社区的引力。

💡在“轨道模型”上，影响力由代表每个成员的圆的直径表示。 圆圈越大，影响力越大。

### 度量影响力

要计算影响力，我们需要查看成员的影响力和声誉范围的举证材料。 没有万全之法，最重要的指标取决于你的目标，但以下是一些常见指标：

- 社交媒体数据，例如关注者和参与度
- Gitee上开源项目的关注者和Star数
- 在CSDN、知乎等社区上的声誉得分
- 公司内的头衔和职位
- 个人网站或博客的排名或估算访问量

与“热情”一样，我们也创建一个表，该表为成员影响力的每个指标打分。

| 影响力指标                      | 得分 |
| ---------------------------------- | ----- |
| 1-2k 推特/微博关注者                     | 1     |
| 2-5k 推特/微博关注者                     | 2     |
| 5+k 推特/微博关注者                      | 3     |
| 拥有活跃的个人博客                   | 1     |
| 拥有获得500个star的开源项目           | 3     |
| 在DEV网站上拥有100个关注者            | 2     |

对于每个成员，我们记录并汇总他们符合的条件的分数。 该表如下所示：

| 成员姓名    | 影响力指标


tall_property (object_class,
      PROP_MPD_ROOT_MINIMUM_UPDATE_PERIOD,
      g_param_spec_uint64 ("minimum-update-period",
          "minimum update period", "minimum update period", 0,
          G_MAXUINT64, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
  g_object_class_install_property (object_class,
      PROP_MPD_ROOT_SUGGESTED_PRESENTATION_DELAY,
      g_param_spec_uint64 ("suggested-presentation-delay",
          "suggested presentation delay", "suggested presentation delay", 0,
          G_MAXUINT64, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
  g_object_class_install_property (object_class,
      PROP_MPD_ROOT_MIN_BUFFER_TIME,
      g_param_spec_uint64 ("min-buffer-time", "mininim buffer time",
          "mininim buffer time", 0,
          G_MAXUINT64, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
}

static void
gst_mpd_root_node_init (GstMPDRootNode * self)
{
  self->default_namespace = NULL;
  self->namespace_xsi = NULL;
  self->namespace_ext = NULL;
  self->schemaLocation = NULL;
  self->id = NULL;
  self->profiles = NULL;
  self->type = GST_MPD_FILE_TYPE_STATIC;
  self->availabilityStartTime = NULL;
  self->availabilityEndTime = NULL;
  self->publishTime = NULL;
  self->mediaPresentationDuration = 0;  /* [ms] */
  self->minimumUpdatePeriod = 0;        /* [ms] */
  self->minBufferTime = 2000;   /* [ms] */
  self->timeShiftBufferDepth = 0;       /* [ms] */
  self->suggestedPresentationDelay = 0; /* [ms] */
  self->maxSegmentDuration = 0; /* [ms] */
  self->maxSubsegmentDuration = 0;      /* [ms] */
  /* list of BaseURL nodes */
  self->BaseURLs = NULL;
  /* list of Location nodes */
  self->Locations = NULL;
  /* List of ProgramInformation nodes */
  self->ProgramInfos = NULL;
  /* list of Periods nodes */
  self->Periods = NULL;
  /* list of Metrics nodes */
  self->Metrics = NULL;
  /* list of GstUTCTimingNode nodes */
  self->UTCTimings = NULL;
}

GstMPDRootNode *
gst_mpd_root_node_new (void)
{
  GstMPDRootNode *ret;

  ret = g_object_new (GST_TYPE_MPD_ROOT_NODE, NULL);
  gst_object_ref_sink (ret);
  return ret;
}

void
gst_mpd_root_node_free (GstMPDRootNode * self)
{
  if (self)
    gst_object_unref (self);
}


/*
 *  kis_tool_select_contiguous.h - part of KImageShop^WKrayon^Krita
 *
 *  SPDX-FileCopyrightText: 1999 Michael Koch <koch@kde.org>
 *  SPDX-FileCopyrightText: 2002 Patrick Julien <freak@codepimps.org>
 *  SPDX-FileCopyrightText: 2015 Michael Abrahams <miabraha@gmail.com>
 *
 *  SPDX-License-Identifier: GPL-2.0-or-later
 */

#ifndef __KIS_TOOL_SELECT_CONTIGUOUS_H__
#define __KIS_TOOL_SELECT_CONTIGUOUS_H__

#include "KisSelectionToolFactoryBase.h"
#include "kis_tool_select_base.h"
#include <kis_icon.h>
#include <kconfig.h>
#include <kconfiggroup.h>
#include <commands_new/KisMergeLabeledLayersCommand.h>

class KoGroupButton;

/**
 * The 'magic wand' selection tool -- in fact just
 * a floodfill that only creates a selection.
 */
class KisToolSelectContiguous : public KisToolSelect
{

    Q_OBJECT

public:
    enum ContiguousSelectionMode
    {
        FloodFill,
        BoundaryFill
    };

    KisToolSelectContiguous(KoCanvasBase *canvas);
    ~KisToolSelectContiguous() override;

    QWidget* createOptionWidget() override;
    void paint(QPainter &painter, const KoViewConverter &converter) override;

    void beginPrimaryAction(KoPointerEvent *event) override;
    void endPrimaryAction(KoPointerEvent *event) override;

    void resetCursorStyle() override;

protected:

    bool wantsAutoScroll() const override { return false; }

    bool isPixelOnly() const override { return true; }
    bool usesColorLabels() const override { return true; }

public Q_SLOTS:
    void activate(const QSet<KoShape*> &shapes) override;
    void deactivate() override;

    void slotSetContiguousSelectionMode(ContiguousSelectionMode);
    void slotSetContiguousSelectionBoundaryColor(const KoColor&);
    void slotSetThreshold(int);
    void slotSetOpacitySpread(int);
    void slotSetCloseGap(int);
    void slotSetUseSelectionAsBoundary(bool);

protected:
    using KisToolSelectBase::m_widgetHelper;

private:
    ContiguousSelectionMode m_contiguousSelectionMode {FloodFill};
    KoColor m_contiguousSelectionBoundaryColor;
    int m_threshold{8};
    int  m_opacitySpread {100};
    int m_closeGap {0};
    bool m_useSelectionAsBoundary {false};
    KConfigGroup m_configGroup;
    KisPaintDeviceSP m_referencePaintDevice;
    KisMergeLabeledLayersCommand::ReferenceNodeInfoListSP m_referenceNodeList;
    int m_previousTime;

    KoColor loadContiguousSelectionBoundaryColorFromConfig();

private Q_SLOTS:
    void slot_optionButtonStripContiguousSelectionMode_buttonToggled(
        KoGroupButton*, bool
    );
};

class KisToolSelectContiguousFactory : public KisSelectionToolFactoryBase
{
public:
    KisToolSelectContiguousFactory()
        : KisSelectionToolFactoryBase("KisToolSelectContiguous")
    {
        setToolTip(i18n("Contiguous Selection Tool"));
        setSection(ToolBoxSection::Select);
        setIconName(koIconNameCStr("tool_contiguous_selection"));
        setPriority(4);
        setActivationShapeId(KRITA_TOOL_ACTIVATION_ID);
    }

    ~KisToolSelectContiguousFactory() override {}

    KoToolBase * createTool(KoCanvasBase *canvas) override {
        return new KisToolSelectContiguous(canvas);
    }
};

#endif //__KIS_TOOL_SELECT_CONTIGUOUS_H__


(p6) fma.s1 f7=f7,f7,f32
  nop.i 0;;
}
 {.mii
  (p7) getf.exp r29=f12
  (p7) mov r28=0xfffd
  nop.i 0;;
}
 { .mfi
  // f12=2^{23}
  setf.s f12=r3
  // Step (5)
  // q2 = q1 + e1 * q1 in f11
  (p6) fma.s.s1 f11=f7,f15,f15
  nop.i 0
} { .mfi
   nop.m 0
  // Step (6)
  // q2 = q1 + e1 * q1 in f6
  (p6) fma.s1 f6=f7,f15,f15
  nop.i 0;;
}

 {.mmi
  // f15=1.25*2^{-24}
  setf.s f15=r2
  // q<1/4 ? (i.e. expon< -2)
  (p7) cmp.gt p7,p0=r28,r29
  nop.i 0;;
}

{.mfb
  // r29= -32+bias
  mov r29=0xffdf
 // if |a/b|<1/4, set D flag before returning
 (p7) fma.d.s0 f9=f9,f0,f8
  nop.b 0;;
}
 {.mfb
 nop.m 0
 // can be combined with bundle above if sign of 0 or
 // FTZ enabled are not important
 (p7) fmerge.s f8=f8,f9
 // return if |a|<4*|b| (estimated quotient < 1/4)
 (p7) br.ret.spnt b0;;
}
  {.mfi
  // f7=2^{-32}
  setf.exp f7=r29
  // set f8 to current a value | sign
  fmerge.s f8=f8,f13
  nop.i 0;;
}

  {.mfi
  getf.exp r28=f6
  // last step ? (q<2^{23})
  fcmp.lt.unc.s1 p0,p12=f6,f12
  nop.i 0;;
}
  {.mfi
  nop.m 0
  // r=a-b*q
  fnma.s1 f6=f14,f11,f13
  nop.i 0
} {.mfi
  // r2=23+bias
  mov r2=0xffff+23
  // q'=q-q*(1.25*2^{-24})   (q'=q-ulp)
  fnma.s.s1 f15=f11,f15,f11
  nop.i 0;;
}
  {.mmi
  nop.m 0
  cmp.eq p11,p14=r2,r28
  nop.i 0;;
}

.pred.rel "mutex",p11,p14
  {.mfi
  nop.m 0
  // if exp_q=2^23, then r=a-b*2^{23}
  (p11) fnma.s1 f13=f12,f14,f13
  nop.i 0
}
{.mfi
  nop.m 0
  // r2=a-b*q'
  (p14) fnma.s1 f13=f14,f15,f13
  nop.i 0;;
}
  {.mfi
  nop.m 0
  // r>0 iff q=RZ(a/b) and inexact
  fcmp.gt.unc.s1 p8,p0=f6,f0
  nop.i 0
} {.mfi
  nop.m 0
  // r<0 iff q'=RZ(a/b) and inexact
  (p14) fcmp.lt.unc.s1 p9,p10=f6,f0
  nop.i 0;;
}

.pred.rel "mutex",p8,p9
  {.mfi
   nop.m 0
  // (p8) Q=q+(last iteration ? sticky bits:0)
  // i.e. Q=q+q*x  (x=2^{-


[5]) / 2.0);

    box_new.push((box_v[3] - box_v[0]) / 2.0);
    box_new.push(0.0);
    box_new.push(0.0);

    box_new.push(0.0);
    box_new.push((box_v[4] - box_v[1]) / 2.0);
    box_new.push(0.0);

    box_new.push(0.0);
    box_new.push(0.0);
    box_new.push((box_v[5] - box_v[2]) / 2.0);

    box_new
}
use crate::connection::{SamplingMethod, Throughput};
use crate::estimate::{build_change_estimates, build_estimates, ConfidenceInterval, Estimate};
use crate::estimate::{
    ChangeDistributions, ChangeEstimates, ChangePointEstimates, Distributions, Estimates,
    PointEstimates,
};
use crate::report::MeasurementData;
use crate::stats::bivariate::regression::Slope;
use crate::stats::bivariate::Data;
use crate::stats::univariate::outliers::tukey;
use crate::stats::univariate::Sample;
use crate::stats::{Distribution, Tails};
use std::time::Duration;

#[derive(Debug, Clone)]
pub struct BenchmarkConfig {
    pub confidence_level: f64,
    pub measurement_time: Duration,
    pub noise_threshold: f64,
    pub nresamples: usize,
    pub sample_size: usize,
    pub significance_level: f64,
    pub warm_up_time: Duration,
}

pub struct MeasuredValues<'a> {
    pub iteration_count: &'a [f64],
    pub sample_values: &'a [f64],
    pub avg_values: &'a [f64],
}

// Common analysis procedure
pub(crate) fn analysis<'a>(
    config: &BenchmarkConfig,
    throughput: Option<Throughput>,
    new_sample: MeasuredValues<'a>,
    old_sample: Option<(MeasuredValues<'a>, &'a Estimates)>,
    sampling_method: SamplingMethod,
) -> MeasurementData<'a> {
    let iters = new_sample.iteration_count;
    let values = new_sample.sample_values;

    let avg_values = Sample::new(new_sample.avg_values);

    let data = Data::new(iters, values);
    let labeled_sample = tukey::classify(avg_values);
    let (mut distributions, mut estimates) = estimates(avg_values, config);

    if sampling_method.is_linear() {
        let (distribution, slope) = regression(&data, config);
        estimates.slope = Some(slope);
        distributions.slope = Some(distribution);
    }

    let compare_data = if let Some((old_sample, old_estimates)) = old_sample {
        let (t_value, t_distribution, relative_estimates, relative_distributions, base_avg_times) =
            compare(avg_values, &old_sample, config);
        let p_value = t_distribution.p_value(t_value, &Tails::Two);
        Some(crate::report::ComparisonData {
            p_value,
            t_distribution,
            t_value,
            relative_estimates,
            relative_distributions,
            significance_threshold: config.significance_level,
            noise_threshold: config.noise_threshold,
            base_iter_counts: old_sample.iteration_count.iter().copied().collect(),
            base_sample_times: old_sample.sample_values.iter().copied().collect(),
            base_avg_times,
            base_estimates: old_estimates.clone(),
        })
    } else {


 VARYING vec2 vPos;      // pixel coords in rect space
        VARYING vec4 vRect;     // rect x, y, w, h
        VARYING vec4 vRadii;    // per-corner radii
        VARYING vec4 vColor0;    // RGBA
        VARYING vec4 vColor1;    // RGBA (for gradients)
        VARYING float vThickness; // -1 for text, -2 for linear gradient, -3 for radial, -4 for box,  >0 for hollow rect

        // Signed distance function for rounded box
        float roundedBoxSDF(vec2 p, vec2 b, vec4 r) {
            // px = 1.0 if p.x > 0, else 0.0
            float px = step(0.0, p.x);
            float py = step(0.0, p.y);

            // Select radius per quadrant
            float rLeft  = mix(r.w, r.x, py); // bottom-left / top-left
            float rRight = mix(r.z, r.y, py); // bottom-right / top-right
            float radius = mix(rLeft, rRight, px);

            vec2 d = abs(p) - b + vec2(radius);
            vec2 dClamped = max(d, vec2(0.0));
            return length(dClamped) - radius + min(max(d.x, d.y), 0.0);
        }

        float hollowRoundedBoxSDF(vec2 p, vec2 b, vec4 r, float thickness) {
            float dist = roundedBoxSDF(p, b, r);
            return abs(dist) - thickness * 0.5;
        }

        void main() {
            vec2 center = vRect.xy + 0.5 * vRect.zw;
            vec2 halfSize = 0.5 * vRect.zw;
            vec2 p = vPos - center;

            float d = (vThickness > 0.0) ? hollowRoundedBoxSDF(p, halfSize, vRadii, vThickness) : roundedBoxSDF(p, halfSize, vRadii);

            vec4 col = vColor0;
            if (vUV.x >= 0.0 && vThickness >= -1.0) {     // textured if UV.x >= 0
                vec4 texColor = TEXTURE(uTex, vUV);
                // text check: use red channel as alpha
                col = (vThickness == -1.0) ? vec4(col.rgb, col.a * texColor.r) : col * texColor;
            }
            else if (vThickness == -2.0) { // linear gradient, vUV as start and vUV2 as end
                vec2 dir = normalize(vUV2 - vUV);
                float t = dot((p + halfSize) - vUV, dir) / length(vUV2 - vUV);
                t = clamp(t, 0.0, 1.0);
                col = mix(vColor0, vColor1, t);
            }
            else if (vThickness == -3.0) { // radial gradient, vUV as center and vUV2.x as radius
                float dist = length(p + halfSize - vUV);
                float t = (dist - vUV2.x) / (vUV2.y - vUV2.x);
                t = clamp(t, 0.0, 1.0);
                col = mix(vColor0, vColor1, t);
            }
            else if (vThickness == -4.0) { // box gradient, vUV.x as radius and vUV.y as feather
                float dist = roundedBoxSDF(p, halfSize - vec2(vUV.x), vec4(vUV.x));
                float t = clamp(dist / vUV.y, 0.0, 1.0);
                col = mix(vColor0, vColor1, t);
            }

            // Proper antialiasing based on distance field
            float f = fwidth(d);
            float alpha = col.a * (1.0 - smoothstep(-f, f, d));

            fragColor = vec4(col.rgb * alpha, alpha);
        }
    """.trimIndent()

    private val VERT = """
        #version $$$ // replaced by compile


GetUniformLocation`.
fn send_to_gpu_uniforms_spotlight(shader: ShaderHandle, light: &SpotLight<f32>) {
    shader.use_program();
    shader.set_vec3("spotLight.position", &light.position);
    shader.set_vec3("spotLight.direction", &light.direction);
    shader.set_float("spotLight.cutOff", light.cutoff);
    shader.set_float("spotLight.outerCutOff", light.outer_cutoff);
    shader.set_vec3("spotLight.ambient", &light.ambient);
    shader.set_vec3("spotLight.diffuse", &light.diffuse);
    shader.set_vec3("spotLight.specular", &light.specular);
    shader.set_float("spotLight.constant", light.constant);
    shader.set_float("spotLight.linear", light.linear);
    shader.set_float("spotLight.quadratic", light.quadratic);
}

fn send_to_gpu_textures_material(lighting_map: &LightingMap) -> (GLuint, GLuint, GLuint) {
    let diffuse_tex = backend::send_to_gpu_texture(&lighting_map.diffuse, gl::REPEAT).unwrap();
    let specular_tex = backend::send_to_gpu_texture(&lighting_map.specular, gl::REPEAT).unwrap();
    let emission_tex = backend::send_to_gpu_texture(&lighting_map.emission, gl::REPEAT).unwrap();

    (diffuse_tex, specular_tex, emission_tex)
}

#[derive(Copy, Clone)]
struct MaterialUniforms<'a> {
    diffuse_index: i32,
    specular_index: i32,
    emission_index: i32,
    material: &'a Material<f32>,
}

impl<'a> MaterialUniforms<'a> {
    fn new(
        diffuse_index: i32,
        specular_index: i32,
        emission_index: i32,
        material: &'a Material<f32>) -> Self
    {
        Self {
            diffuse_index: diffuse_index,
            specular_index: specular_index,
            emission_index: emission_index,
            material: material,
        }
    }
}

fn send_to_gpu_uniforms_material(shader: ShaderHandle, uniforms: MaterialUniforms) {
    shader.use_program();
    shader.set_int("material.diffuse", uniforms.diffuse_index);
    shader.set_int("material.specular", uniforms.specular_index);
    shader.set_int("material.emission", uniforms.emission_index);
    shader.set_float("material.specular_exponent", uniforms.material.specular_exponent);
}

fn send_to_gpu_mesh(shader: ShaderHandle, mesh: &ObjMesh) -> (GLuint, GLuint, GLuint, GLuint) {
    let v_pos_loc = shader.get_attrib_location("aPos");
    let v_tex_loc = shader.get_attrib_location("aTexCoords");
    let v_norm_loc = shader.get_attrib_location("aNormal");

    let mut v_pos_vbo = 0;
    unsafe {
        gl::GenBuffers(1, &mut v_pos_vbo);
    }
    debug_assert!(v_pos_vbo > 0);
    unsafe {
        gl::BindBuffer(gl::ARRAY_BUFFER, v_pos_vbo);
        gl::BufferData(
            gl::ARRAY_BUFFER,
            mesh.points.len_bytes() as GLsizeiptr,
            mesh.points.as_ptr() as *const GLvoid,
            gl::STATIC_DRAW
        );
    }

    let mut v_tex_vbo = 0;
    unsafe {


 th.TblMultColHdr_sun4 a.TblHdrLnk_sun4:visited {font-weight:normal;}
table.Tbl_sun4 th.TblMultColHdr_sun4 .TblHdrTxt_sun4 {font-weight:normal;}
table.Tbl_sun4 th.TblMultColHdrSrt_sun4 a.TblHdrLnk_sun4:link, table.Tbl_sun4 th.TblMultColHdrSrt_sun4 a.TblHdrLnk_sun4:visited {font-weight:normal;}
.TblActLbl_sun4 {font-weight:bold;}
table.Tbl_sun4 th.TblColHdrSrtSel_sun4 a.TblHdrImgLnk_sun4:link, th.TblColHdrSrtSel_sun4 a.TblHdrImgLnk_sun4:visited {font-weight:bold;}
table.Tbl_sun4 a.TblHdrLnk_sun4:link, table.Tbl_sun4 a.TblHdrLnk_sun4:visited {font-weight:bold;}
table.Tbl_sun4 a.TblHdrLnk_sun4:hover {font-weight:bold;}
table.Tbl_sun4 th.TblColHdrSrt_sun4 a.TblHdrLnk_sun4:link, table.Tbl_sun4 th.TblColHdrSrt_sun4 a.TblHdrLnk_sun4:visited {font-weight:bold;}
table.Tbl_sun4 th.TblColHdrSrt_sun4 a.TblHdrLnk_sun4:hover {font-weight:bold;}
table.Tbl_sun4 th.TblColHdrSrt_sun4 a.TblHdrImgLnk_sun4:link, table.Tbl_sun4 th.TblColHdrSrt_sun4 a.TblHdrImgLnk_sun4:visited {font-weight:bold;}
table.Tbl_sun4 .TblHdrSrtNum_sun4 {font-size:.9em;font-weight:normal;}
.TblGrpTxt_sun4 {font-weight:bold;}
.TblColFtrTxt_sun4 {font-weight:bold;}
table.Tbl_sun4 .TblFtrRowTxt_sun4 {font-weight:bold;}
table.Tbl_sun4 .TblFtrLft_sun4 {font-weight:bold;}
.TblGrpColFtrTxt_sun4 {font-weight:bold;}
.TblGrpFtrRowTxt_sun4 {font-weight:bold;}
.TblPnlTtl_sun4 {
	font-size:1.2em;
	font-weight:bold;
}
.TblPnlHlpTxt_sun4 {font-size:1.0em;}
/*---*/

/* LIGHTWEIGHT TABLE DESIGN */
/* Table Caption/Title */
table.TblLt_sun4 caption.TblTtlTxt_sun4 {font-weight:bold;font-size:1.0em;}
table.TblLt_sun4 caption.TblTtlTxt_sun4 span.TblTtlTxtSpn_sun4 {font-weight:bold;font-size:1.0em;}
table.TblLt_sun4 caption.TblTtlTxt_sun4 span.TblTtlMsgSpn_sun4 {font-weight:normal;font-size:1.0em;}
/* Table Footers */
table.TblLt_sun4 .TblFtrRowTxt_sun4 {font-weight:normal;}
/*---*/

/* TREE */
.Tree_sun4 {
	font-size:1.0em;
}
.TreTtl_sun4 {
	font-weight:bold;
}
a.TreeParentLink_sun4:link, a.TreeParentLink_sun4:visited {
	font-weight:bold;
}
a.TreeParentLink_sun4:hover {
	font-weight:bold;
}
a.TreeSelLink_sun4:link, a.TreeSelLink_sun4:visited {
	font-weight:bold;
}
a.TreeSelLink_sun4:hover {
	font-weight:bold;
}
.TreeSelText_sun4 {
	font-weight:bold;
}
/*---*/

/* WIZARD */
.WizStpTitle_sun4, .WizStpTxt_sun4, .WizHlpTxt_sun4, .WizStpCurTxt_sun4, a.WizStpLnk_sun4, .WizSubStpTtlTxt_sun4, .WizCntHlpTxt_sun4 {
	font-size:1.0em;
}
.WizTtlBar_sun4 {
	font-size:1.3em;
	font-weight:bold;
}
.WizStpTxt_sun4 {
	font-weigh


VA,
};

pub mod mmu;
pub mod plat;
pub mod reg;

#[derive(Error, Debug)]
pub enum EmuError {
    #[error("invalid instruction: {0:#x}")]
    InvalidInstruction(VA),
    #[error("callback errored: {0:#?}")]
    CallbackError(anyhow::Error),
}

#[derive(Error, Debug)]
pub enum FetchError {
    #[error("invalid instruction: {0:#x}")]
    InvalidInstruction(VA),

    #[error("fetch: not mapped: at {va:#x}")]
    AddressNotMapped {
        va:     VA,
        #[source]
        source: mmu::MMUError, /* ::AddressNotMapped */
    },

    #[error("fetch: access violation: at {va:#x}")]
    AccessViolation {
        va:     VA,
        #[source]
        source: mmu::MMUError, /* ::AccessViolation */
    },
}

#[derive(Error, Debug)]
pub enum WriteError {
    #[error("write: not mapped: {size:#x} bytes at {va:#x}")]
    AddressNotMapped {
        va:     VA,
        size:   u16,
        #[source]
        source: mmu::MMUError, /* ::AddressNotMapped */
    },

    #[error("write: access violation: {size:#x} bytes at {va:#x}")]
    AccessViolation {
        va:     VA,
        size:   u16,
        #[source]
        source: mmu::MMUError, /* ::AccessViolation */
    },
}

#[derive(Error, Debug)]
pub enum ReadError {
    #[error("read: not mapped: {size:#x} bytes at {va:#x}")]
    AddressNotMapped {
        va:     VA,
        size:   u16,
        #[source]
        source: mmu::MMUError, /* ::AddressNotMapped */
    },

    #[error("read: access violation: {size:#x} bytes at {va:#x}")]
    AccessViolation {
        va:     VA,
        size:   u16,
        #[source]
        source: mmu::MMUError, /* ::AccessViolation */
    },
}

pub struct Emulator {
    pub mem: mmu::MMU,
    pub reg: reg::Registers,
    dis:     zydis::Decoder,

    // for now, as a user-mode focused emulator,
    // we'll emulate fs/gs segments ourselves.
    //
    // see methods `fsbase()` and `set_fsbase()`.
    // see methods `gsbase()` and `set_gsbase()`.
    //
    // the correct way to expose this is:
    //   - x32: creating a GDT and setting the GDTR register
    //   - x64: via rdmsr/wrmsr to set the FSBASE/GSBASE registers
    //
    // if we want compat with unicorn, then may need to figure this out.
    // https://github.com/fireeye/speakeasy/blob/8c6375c67dc311f9eeb0192bb0cc452cd880372b/speakeasy/windows/winemu.py#L522
    fsbase: VA,
    gsbase: VA,
}

impl Emulator {
    pub fn with_arch(arch: Arch) -> Emulator {
        let mut decoder = match arch {
            Arch::X64 => zydis::Decoder::new(zydis::MachineMode::LONG_64, zydis::AddressWidth::_64).unwrap(),
            Arch::X32 => zydis::Decoder::new(zydis::MachineMode::LEGACY_32, zydis::AddressWidth::_32).unwrap(),
        };

        // modes described here: https://github.com/zyantific/zydis/blob/5af06d64432aaa3f6af3cd3e120eefa061b790ab/include/Zydis/Decoder.h#L55
        // start with minimal until we need FULL
        decoder.enable_mode(zydis::DecoderMode::MINIMAL, false).unwrap();

        decoder.enable_mode(zydis::DecoderMode::KNC, false).unwrap();
        decoder.ena


//
//  DJIMission.h
//  DJISDK
//
//  Copyright © 2015, DJI. All rights reserved.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

/**
 *  `DJIMissionProgressStatus` is an abstract class representing the progress of an executing mission.
 */
@interface DJIMissionProgressStatus : NSObject

/**
 *  An error has occurred during mission execution.
 */
@property(nonatomic, readonly) NSError *_Nullable error;

@end

@class DJIMission;

/**
 *  Returns the progress status using a range of 0.0 to 1.0.
 */
typedef void (^_Nullable DJIMissionProgressHandler)(float progress);

/**
 *  Download mission completion block.
 *
 *  @param newMission New downloaded mission.
 *  @param error      An error occurred while downloading.
 */
typedef void (^_Nullable DJIMissionDownloadCompletionBlock)(DJIMission *_Nullable newMission, NSError *_Nullable error);

/**
 *  This class is an abstract class representing a mission that can be executed by the mission manager.
 */
@interface DJIMission : NSObject

/**
 *  Determines whether current mission can be paused.
 *
 *  @return YES if the mission can be paused. No if the mission can not be paused.
 */
- (BOOL)isPausable;

@end

NS_ASSUME_NONNULL_END


源。因为第 1 号中断源的中断处理优先级最高，所以在其处理过程中不会响应任何新的中断请求，直到中断处理结束，然后返回第 2 号中断源；因为第 2 号中断源对第 5 号中断开放，所以在第 2 号中断源的中断服务程序中执行一条指令后，又转去执行第 5 号中断源的中断服务程序，执行完后回到第 2 号中断源，在第 2 号中断源的中断服务程序执行过程中，虽然第 3 号中断源有中断请求，但是，因为第 2 号中断源对第 3 号中断源不开放，所以第 3 号中断源一直得不到响应。直到第 2 号中断源处理完回到用户程序，才能响应并处理第 3 号中断源的请求。CPU 运行程序的执行轨迹如图 8.11 所示。`,
            img(pic8_6_12)('图 8.11　CPU 运行程序的执行轨迹'),
        )
    ),
    section(
        '11.某计算机的 CPU 主频为 500MHz，所连接的某外设的最大数据传输率为 20kB/s，该外设接口中有一个 16 位的数据缓存器，相应的中断服务程序的执行时间为 500 个时钟周期。请回答下列问题。'
    )(
        p`（1）是否能用中断方式进行该外设的输入/输出？若能，则在该设备持续工作期间，CPU 用于该设备进行输入/输出的时间占整个 CPU 时间的百分比大约为多少？`,
        p`（2）若该外设的最大数据传输率是 2MB/s，则可否用中断方式进行输入/输出？`,
        section('分析解答')(
            p`（1）因为该外设接口中有一个 16 位数据缓存器，所以若用中断方式进行输入/输出，可以每 16 位数据进行一次中断请求，因此中断请求的时间间隔为 106×2B/20kB/s=100μs。`,
            p`对应的中断服务程序的执行时间为（106/500MHz）×500=1μs，因为中断响应过程就是执行一条隐指令的过程，所用时间相对于中断处理时间（即执行中断服务程序的时间）而言，几乎可以忽略不计，因而整个中断响应并处理的时间比 1μs 多一点，远远小于中断请求的间隔时间。因此，可以用中断方式进行该外设的输入/输出。`,
            p`若用中断方式进行该设备的输入/输出，则该设备持续工作期间，CPU 用于该


17.7. Advice, page 547: '\[1\] Define operators primarily to mimic conventional usage'
 * [2] Paul Deitel, Harvey Deitel. C++11 for programmers (2nd edition). 2014. ISBN: 978-0-13-343985-4. Chapter 2.4, Good Programming Practice 2.7. page 28: 'Place spaces on either side of a binary operator. This will make the operator stand out and make the program more readable.'
 * [3] Gottschling, Peter. Discovering Modern C++: An Intensive Course for Scientists, Engineers, and Programmers. Addison-Wesley Professional, 2015. Chapter 2.7.1: 'Define your operators consistently with each other and whenever appropriate provide semantics similar to those of standard types'
 * [4] Gottschling, Peter. Discovering Modern C++: An Intensive Course for Scientists, Engineers, and Programmers. Addison-Wesley Professional, 2015. Chapter 2.7.2: 'Pay attention that the semantic/intended priority of your overloaded operators matches the priorities of C++ operators'
 * [5] Gottschling, Peter. Discovering Modern C++: An Intensive Course for Scientists, Engineers, and Programmers. Addison-Wesley Professional, 2015. Chapter 2.7.3: 'Implement binary operators as free functions'
 * [6] [Jason Turner, cppbestpractices: Use Operator Overloads Judiciously](https://github.com/lefticus/cppbestpractices/blob/master/03-Style.md#use-operator-overloads-judiciously)

([C++](Cpp.md)) [std::ostringstream](CppStdOstringstream.md)
===========================================================

[std::ostringstream](CppStdOstringstream.md) is an [STL](CppStl.md)
output [stream](CppStream.md) interface for
[std::string](CppStdString.md) manipulation.

In the example below, [int](CppInt.md) and [std::string](CppStdString.md)
are appended to a [std::ostringstream](CppStdOstringstream.md), before the
[std::ostringstream](CppStdOstringstream.md) is finally converted to
[std::string](CppStdString.md).

  ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  ` #include <iostream> #include <sstream>  int main() {   std::ostringstream s;   const int first_digits = 123;   const std::string dot = ".";   const int last_digits = 456;   s << first_digits << dot << last_digits;   std::cout << s.str() << '\n'; }`
  ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

External links
--------------

-   [Cplusplus.com page about
    std::ostringstream](http://www.cplusplus.com/reference/iostream/ostringstream)
-   [Article about
    std::ostringstream](http://www.artima.com/cppsource/streamstrings.html)

([C++](Cpp.md)) [QtExample22](CppQtExample22.md)
==================================================

![Qt](PicQt.png)![Qt
Creator](PicQtCreator.png)![Lubuntu](PicLubuntu.png)![Ubuntu](PicUbuntu.png)

This [Qt example](CppQtExample.md) shows a way to develop a transparent
dialog.

-   [Download the 'CppQtExample22' source
    code (zip)](CppQtExample22.zip)
-   [View a screenshot


se the tag key in the filter name and the tag value as
  /// the filter value. For example, to find all resources that have a tag with
  /// the key Owner and the value TeamA, specify
  /// tag:Owner for the filter name and TeamA for the
  /// filter value.
  ///

  ///

  /// tag-key - The key of a tag assigned to the resource. Use this
  /// filter to find all resources assigned a tag with a specific key,
  /// regardless of the tag value.
  ///

  ///

  /// update-time - The time of the most recent update.
  ///

  ///

  ///
  /// Parameter [fpgaImageIds] :
  /// The AFI IDs.
  ///
  /// Parameter [maxResults] :
  /// The maximum number of results to return in a single call.
  ///
  /// Parameter [nextToken] :
  /// The token to retrieve the next page of results.
  ///
  /// Parameter [owners] :
  /// Filters the AFI by owner. Specify an Amazon Web Services account ID,
  /// self (owner is the sender of the request), or an Amazon Web
  /// Services owner alias (valid values are amazon |
  /// aws-marketplace).
  Future<DescribeFpgaImagesResult> describeFpgaImages({
    bool? dryRun,
    List<Filter>? filters,
    List<String>? fpgaImageIds,
    int? maxResults,
    String? nextToken,
    List<String>? owners,
  }) async {
    _s.validateNumRange(
      'maxResults',
      maxResults,
      5,
      1000,
    );
// TODO: implement ec2
    throw UnimplementedError();
  }

  /// Describes the Dedicated Host reservations that are available to purchase.
  ///
  /// The results describe all of the Dedicated Host reservation offerings,
  /// including offerings that might not match the instance family and Region of
  /// your Dedicated Hosts. When purchasing an offering, ensure that the
  /// instance family and Region of the offering matches that of the Dedicated
  /// Hosts with which it is to be associated. For more information about
  /// supported instance types, see Dedicated
  /// Hosts in the Amazon EC2 User Guide.
  ///
  /// Parameter [filter] :
  /// The filters.
  ///
  ///

  ///

  /// instance-family - The instance family of the offering (for
  /// example, m4).
  ///

  ///

  /// payment-option - The payment option (NoUpfront |
  /// PartialUpfront | AllUpfront).
  ///

  ///

  ///
  /// Parameter [maxDuration] :
  /// This is the maximum duration of the reservation to purchase, specified in
  /// seconds. Reservations are available in one-year and three-year terms. The
  /// number of seconds specified must be the number of seconds in a year
  /// (365x24x60x60) times one of the supported durations (1 or 3). For example,
  /// specify 94608000 for three years.
  ///
  /// Parameter [maxResults] :
  /// The maximum number of results to return for the request in a single page.
  /// The remaining results can be seen by sending another request with the
  /// returned nextToken value. This value can be between 5 and
  /// 500. If maxResults is given a larger value than 500, you


les(verses_tuples)

    def update_text(self) -> None:
        """Update the text display based on the current selections."""
        trans_name = self.translations_win.get_selection_tuple()[1]
        book_name = self.books_win.get_selection_tuple()[1]
        chapter_name = self.chapters_win.get_selection_tuple()[1]
        verse = self.verses_win.get_selection_tuple()[1]

        text_title = f"{book_name} {chapter_name}:{verse} [{trans_name}]"
        logger.info(f"Displaying: {text_title}")

        verse_start = int(verse)  # Ensure verse is an integer
        formatted_text_tuples: List[Tuple[str, bool, bool]] = self.reader.get_chapter_text(book_name, chapter_name, verse_start)

        # Wrap text with tracking red letter status
        wrapped_text_tuples: List[Tuple[str, bool, bool]] = []
        for text, is_red, is_title in formatted_text_tuples:
            wrapped_lines = wrap(text, width=self.text_win._width - 3, replace_whitespace=False)
            for line in wrapped_lines:
                wrapped_text_tuples.append((line, is_red, is_title))
        self.text_win.update_text_title(text_title)
        self.text_win.update_text(wrapped_text_tuples)

    def deactivate_all_windows(self) -> None:
        """Deactivate all windows, removing focus."""
        for (i, win) in self.windows_tuples:
            win.set_active(False)

    def increment_window(self, i) -> None:
        """Move the focus between windows based on user navigation input."""
        self.deactivate_all_windows()
        new_windex = self.selected_window[0] + i
        if new_windex >= len(self.windows_tuples):
            new_windex = 0
        elif new_windex < 0:
            new_windex = len(self.windows_tuples) - 1
        self.selected_window = self.windows_tuples[new_windex]
        self.selected_window[1].set_active(True)

    def start_input_loop(self) -> None:
        """Start the input loop to receive keyboard commands."""
        key = None
        while key != ord("q"):
            key = self.stdscr.getch()

            if key == curses.KEY_UP or key == ord("k"):
                self.selected_window[1].increment_selection(-1)

            elif key == curses.KEY_DOWN or key == ord("j"):
                self.selected_window[1].increment_selection(1)

            elif key == curses.KEY_LEFT or key == ord("h"):
                self.increment_window(-1)

            elif key == curses.KEY_RIGHT or key == ord("l"):
                self.increment_window(1)

            elif key == ord("g"):
                self.selected_window[1].select_first()

            self.update_selections()
            self.update_text()

def main() -> None:
    """Entry point for the curses application."""
    curses.wrapper(Main)

if __name__ == "__main__":
    main()


= <Validators<T>>::iter().count();
        let minimum_validator_count = Self::minimum_validator_count().max(1) as usize;

        if validator_count < minimum_validator_count {
            // There were not enough validators for even our minimal level of functionality.
            // This is bad🥺.
            // We should probably disable all functionality except for block production
            // and let the chain keep producing blocks until we can decide on a sufficiently
            // substantial set.
            // TODO: [Substrate]substrate#2494
            return None
        }

        let to_votes =
            |b: BalanceOf<T>| <T::CurrencyToVote as Convert<BalanceOf<T>, u128>>::convert(b);
        let to_balance = |e: u128| <T::CurrencyToVote as Convert<u128, BalanceOf<T>>>::convert(e);

        // II. Construct and fill in the V/G graph
        // TC is O(V + G*1), V means validator's number, G means guarantor's number
        // DB try is 2

        log!(
            debug,
            "💸 Construct and fill in the V/G graph for the era {:?}.",
            current_era,
        );
        let mut vg_graph: BTreeMap<T::AccountId, Vec<IndividualExposure<T::AccountId, BalanceOf<T>>>> =
            <Validators<T>>::iter().map(|(v_stash, _)|
                (v_stash, Vec::<IndividualExposure<T::AccountId, BalanceOf<T>>>::new())
            ).collect();
        for (guarantor, guarantee) in <Guarantors<T>>::iter() {
            let Guarantee { total: _, submitted_in: _, targets, suppressed: _ } = guarantee;

            // // Filter out guarantee targets which were guaranteed before the most recent
            // // slashing span.
            // targets.retain(|ie| {
            //     <Self as Store>::SlashingSpans::get(&ie.who).map_or(
            //         true,
            //         |spans| submitted_in >= spans.last_nonzero_slash(),
            //     )
            // });

            for target in targets {
                if let Some(g) = vg_graph.get_mut(&target.who) {
                     g.push(IndividualExposure {
                         who: guarantor.clone(),
                         value: target.value
                     });
                }
            }
        }

        // III. This part will cover
        // 1. Get `ErasStakers` with `stake_limit` and `vg_graph`
        // 2. Get `ErasValidatorPrefs`
        // 3. Get `total_valid_stakes`
        // 4. Fill in `validator_stakes`
        log!(
            debug,
            "💸 Build the erasStakers for the era {:?}.",
            current_era,
        );
        let mut eras_total_stakes: BalanceOf<T> = Zero::zero();
        let mut validators_stakes: Vec<(T::AccountId, u128)> = vec![];
        for (v_stash, voters) in vg_graph.iter() {
            let v_controller = Self::bonded(v_stash).unwrap();
            let v_ledger: StakingLedger<T::AccountId, BalanceOf<T>> =
                Self::ledger(&v_controller).unwrap();

            let stake_limit = Self::stake_limit(v_stash).unwrap_or(Zero::zero());

            // 0. Add to `validator_stakes` but skip adding to `eras_stakers` if stake limit goes 0
            if stake_limit == Zero::zero() {
                validators_stakes.push((v_stash.clone(), 0));
                continue;
            }

            // 1. Calculate the


get, that.widgetName + ".preventClickEvent");
					event.stopImmediatePropagation();
					return false;
				}
			});

		this.started = false;
	},

	// TODO: make sure destroying one instance of mouse doesn't mess with
	// other instances of mouse
	_mouseDestroy: function() {
		this.element.unbind("." + this.widgetName);
		if ( this._mouseMoveDelegate ) {
			this.document
				.unbind("mousemove." + this.widgetName, this._mouseMoveDelegate)
				.unbind("mouseup." + this.widgetName, this._mouseUpDelegate);
		}
	},

	_mouseDown: function(event) {
		// don't let more than one widget handle mouseStart
		if ( mouseHandled ) {
			return;
		}

		this._mouseMoved = false;

		// we may have missed mouseup (out of window)
		(this._mouseStarted && this._mouseUp(event));

		this._mouseDownEvent = event;

		var that = this,
			btnIsLeft = (event.which === 1),
			// event.target.nodeName works around a bug in IE 8 with
			// disabled inputs (#7620)
			elIsCancel = (typeof this.options.cancel === "string" && event.target.nodeName ? $(event.target).closest(this.options.cancel).length : false);
		if (!btnIsLeft || elIsCancel || !this._mouseCapture(event)) {
			return true;
		}

		this.mouseDelayMet = !this.options.delay;
		if (!this.mouseDelayMet) {
			this._mouseDelayTimer = setTimeout(function() {
				that.mouseDelayMet = true;
			}, this.options.delay);
		}

		if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) {
			this._mouseStarted = (this._mouseStart(event) !== false);
			if (!this._mouseStarted) {
				event.preventDefault();
				return true;
			}
		}

		// Click event may never have fired (Gecko & Opera)
		if (true === $.data(event.target, this.widgetName + ".preventClickEvent")) {
			$.removeData(event.target, this.widgetName + ".preventClickEvent");
		}

		// these delegates are required to keep context
		this._mouseMoveDelegate = function(event) {
			return that._mouseMove(event);
		};
		this._mouseUpDelegate = function(event) {
			return that._mouseUp(event);
		};

		this.document
			.bind( "mousemove." + this.widgetName, this._mouseMoveDelegate )
			.bind( "mouseup." + this.widgetName, this._mouseUpDelegate );

		event.preventDefault();

		mouseHandled = true;
		return true;
	},

	_mouseMove: function(event) {
		// Only check for mouseups outside the document if you've moved inside the document
		// at least once. This prevents the firing of mouseup in the case of IE<9, which will
		// fire a mousemove event if content is placed under the cursor. See #7778
		// Support: IE <9
		if ( this._mouseMoved ) {
			// IE mouseup check - mouseup happened when mouse was out of window
			if ($.ui.ie && ( !document.documentMode || document.documentMode < 9 ) && !event.button) {
				return this._mouseUp(event);

			// Iframe mouseup check - mouseup occurred in another document
			} else if ( !event.which ) {
				return this._mouseUp( event );
			}
		}

		if ( event.which || event.button ) {
			this._mouseMoved = true;
		}

		if (this._mouseStarted) {
			this._mouseDrag(event);
			return event.preventDefault();
		}

		if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) {
			this._mouseStarted =
				(this._mouseStart(this._mouseDownEvent, event) !== false);


       vertex 3.0, 2.0, 1.0
                        vertex 6.0, 5.0, 4.0
                        vertex 9.0, 8.0, 7.0
                    endloop
                endfacet
            endsolid plane
        ";
        let expected_output = IResult::Done("",
            Solid{
                name: "plane".to_string(),
                faces: vec![
                    Facet{
                        normal: Vector3D{x: 0.0, y: 0.0, z: 1.0},
                        vertices: vec![
                            Vector3D{x: 3.0, y: 2.0, z: 1.0},
                            Vector3D{x: 6.0, y: 5.0, z: 4.0},
                            Vector3D{x: 9.0, y: 8.0, z: 7.0},
                        ],
                        attribute: 0
                    }
                ]
            }
        );
        let result = parse_solid(input);
        assert_eq!(result, expected_output);
    }

    #[test]
    fn parse_solid2() {
        let input = r"
            solid plane2
                facet normal 0.0 0.0 1.0
                    outer loop
                        vertex 3.0, 2.0, 1.0
                        vertex 6.0, 5.0, 4.0
                        vertex 9.0, 8.0, 7.0
                    endloop
                endfacet

                facet normal 0.0 1.0 1.0
                    outer loop
                        vertex 3.5, -2.0, 0.0
                        vertex 2.2, 8.0, -9.0
                        vertex -3.0, 8.0, 1.5
                    endloop
                endfacet
            endsolid plane2
        ";
        let expected_output = IResult::Done("",
            Solid{
                name: "plane2".to_string(),
                faces: vec![
                    Facet{
                        normal: Vector3D{x: 0.0, y: 0.0, z: 1.0},
                        vertices: vec![
                            Vector3D{x: 3.0, y: 2.0, z: 1.0},
                            Vector3D{x: 6.0, y: 5.0, z: 4.0},
                            Vector3D{x: 9.0, y: 8.0, z: 7.0},
                        ],
                        attribute: 0
                    },
                    Facet{
                        normal: Vector3D{x: 0.0, y: 1.0, z: 1.0},
                        vertices: vec![
                            Vector3D{x: 3.5, y: -2.0, z: 0.0},
                            Vector3D{x: 2.2, y: 8.0, z: -9.0},
                            Vector3D{x: -3.0, y: 8.0, z: 1.5},
                        ],
                        attribute: 0
                    },
                ]
            }
        );
        let result = parse_solid(input);
        assert_eq!(result, expected_output);
    }
}
//! Worker used by compiler.

use crate::ast;
use crate::collections::HashMap;
use crate::indexing::{Index as _, IndexScopes, Indexer};
use crate::query::Query;
use crate::shared::{Consts, Gen, Items};
use crate::{CompileVisitor, Diagnostics, Options, SourceLoader, Sources, Storage, UnitBuilder};
use runestick::{Context, Item, SourceId, Span};
use std::collections::VecDeque;
use std::rc::Rc;

mod import;
mod task;
mod wildcard_import;

pub(crate) use self::import::Import;
pub(crate) use self::task::{LoadFile


erapa variasi:

- Untuk dukungan platform luas, prefiks vendor, misalnya `@-ms-keyframes {}` atau `-moz-transform` mungkin diperlukan. Prefiks vendor tidak diperlukan dan tidak diizinkan dalam format JSON, tetapi mungkin diperlukan dalam CSS.
- Platform yang tidak mendukung `calc()` dan `var()` tidak akan dapat memanfaatkan polyfill `amp-animation` jika keyframe ditentukan dalam CSS. Oleh karena itu, direkomendasikan untuk selalu menyertakan nilai fallback dalam CSS.
- Ekstensi CSS seperti [`width()`, `height()`, `num()`, `rand()`, `index()`, dan `length()`](#css-extensions) tidak dapat digunakan dalam CSS.

#### Properti yang diizinkan untuk keyframe

Tidak semua properti CSS dapat digunakan dalam keyframe. Hanya properti CSS yang dapat dioptimalkan dan dianimasikan dengan cepat oleh browser modern yang diizinkan. Daftar ini akan bertambah dengan semakin banyaknya properti yang dikonfirmasi untuk memberikan performa yang baik. Saat ini daftar ini berisi:
- [`opacity`](https://developer.mozilla.org/en-US/docs/Web/CSS/opacity)
- [`transform`](https://developer.mozilla.org/en-US/docs/Web/CSS/transform)
- [`visibility`](https://developer.mozilla.org/en-US/docs/Web/CSS/visibility)
- [`offset-distance`](https://developer.mozilla.org/en-US/docs/Web/CSS/offset-distance)

Perlu diperhatikan bahwa penggunaan properti CSS yang diberi prefiks oleh vendor tidak diperlukan dan tidak diizinkan.

### Bentuk singkat konfigurasi animasi

Jika animasi hanya melibatkan satu elemen, dan satu efek keyframe sudah memadai, konfigurasi dapat disederhanakan menjadi satu komponen animasi ini saja. Misalnya:
```html
<amp-animation layout="nodisplay">
<script type="application/json">
{
  "selector": "#target-id",
  "duration": "1s",
  "keyframes": {"opacity": 1}
}
</script>
</amp-animation>
```

Jika animasi terdiri dari daftar komponen, tetapi tidak memiliki animasi level teratas, konfigurasi dapat disederhanakan menjadi sebuah array komponen. Misalnya:
```html
  <amp-animation layout="nodisplay">
  <script type="application/json">
  [
    {
      "selector": ".target-class",
      "duration": 1000,
      "keyframes": {"opacity": 1}
    },
    {
      "selector": ".target-class",
      "duration": 600,
      "delay": 400,
      "keyframes": {"transform": "scale(2)"}
    }
  ]
  </script>
  </amp-animation>
```

### Komposisi animasi

Animasi dapat merujuk animasi lain sehingga menggabungkan beberapa deklarasi `amp-animation` menjadi satu animasi final. Merujuk animasi dari animasi lain secara umum sama dengan nesting (penyarangan). Alasan mengapa seseorang ingin membagi animasi menjadi beberapa elemen berbeda adalah agar


ermissions and
 * limitations under the License.
 */
package okhttp3.internal.proxy

import java.io.IOException
import java.net.Proxy
import java.net.ProxySelector
import java.net.SocketAddress
import java.net.URI

/**
 * A proxy selector that always returns the [Proxy.NO_PROXY].
 */
object NullProxySelector : ProxySelector() {
  override fun select(uri: URI?): List<Proxy> {
    requireNotNull(uri) { "uri must not be null" }
    return listOf(Proxy.NO_PROXY)
  }

  override fun connectFailed(uri: URI?, sa: SocketAddress?, ioe: IOException?) {
  }
}
/*
 * Copyright (C) 2019 Square, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package okhttp3.internal.platform.android

import javax.net.ssl.SSLSocket
import okhttp3.Protocol
import okhttp3.internal.platform.ConscryptPlatform
import okhttp3.internal.platform.Platform
import org.conscrypt.Conscrypt

/**
 * Simple non-reflection SocketAdapter for Conscrypt when included as an application dependency
 * directly.
 */
class ConscryptSocketAdapter : SocketAdapter {
  override fun matchesSocket(sslSocket: SSLSocket): Boolean = Conscrypt.isConscrypt(sslSocket)

  override fun isSupported(): Boolean = ConscryptPlatform.isSupported

  override fun getSelectedProtocol(sslSocket: SSLSocket): String? =
      when {
        matchesSocket(sslSocket) -> Conscrypt.getApplicationProtocol(sslSocket)
        else -> null // No TLS extensions if the socket class is custom.
      }

  override fun configureTlsExtensions(
    sslSocket: SSLSocket,
    hostname: String?,
    protocols: List<Protocol>
  ) {
    // No TLS extensions if the socket class is custom.
    if (matchesSocket(sslSocket)) {
      // Enable session tickets.
      Conscrypt.setUseSessionTickets(sslSocket, true)

      // Enable ALPN.
      val names = Platform.alpnProtocolNames(protocols)
      Conscrypt.setApplicationProtocols(sslSocket, names.toTypedArray())
    }
  }

  companion object {
    val factory = object : DeferredSocketAdapter.Factory {
      override fun matchesSocket(sslSocket: SSLSocket): Boolean {
        return ConscryptPlatform.isSupported && Conscrypt.isConscrypt(sslSocket)
      }
      override fun create(sslSocket: SSLSocket): SocketAdapter = ConscryptSocketAdapter()
    }
  }
}
/*
 * Copyright (C) 2019 Square, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package okhttp3.internal.platform.android

import java.lang.reflect.InvocationTargetException
import java.lang.reflect.Method
import javax.net.ssl.SSLSocket
import okhttp3.Protocol
import okhttp3.internal.platform.AndroidPlatform
import okhttp3.internal.platform.Platform


mer;
      case 'sharedVia':
        return sharedVia;
      case 'tooltipBookmarks':
        return tooltipBookmarks;
      case 'tooltipEmailDeveloper':
        return tooltipEmailDeveloper;
      case 'tooltipPauseTimer':
        return tooltipPauseTimer;
      case 'tooltipRandomQuestions':
        return tooltipRandomQuestions;
      case 'tooltipRetry':
        return tooltipRetry;
      case 'tooltipSorting':
        return tooltipSorting;
      case 'tooltipSortingByDate':
        return tooltipSortingByDate;
      case 'tooltipSortingByRelevance':
        return tooltipSortingByRelevance;
      case 'tooltipStartTimer':
        return tooltipStartTimer;
      case 'tournamentAboutTour':
        return tournamentAboutTour;
      case 'tournamentAboutTournament':
        return tournamentAboutTournament;
      case 'tournamentAddedAt':
        return tournamentAddedAt;
      case 'tournamentPlayedAt':
        return tournamentPlayedAt;
      case 'tournamentToursCount':
        return tournamentToursCount;
      case 'tournamentsSearchFieldHint':
        return tournamentsSearchFieldHint;
      case 'tournamentsTreeRootTitle':
        return tournamentsTreeRootTitle;
      case 'tournamentQuestionsCount':
        return tournamentQuestionsCount;
      case 'questionAcceptableAnswer':
        return questionAcceptableAnswer;
      case 'questionAnswer':
        return questionAnswer;
      case 'questionAuthor':
        return questionAuthor;
      case 'questionNumber':
        return questionNumber;
      case 'questionSources':
        return questionSources;
      case 'questionsDatabasePrefix':
        return questionsDatabasePrefix;
      case 'questionsDatabaseName':
        return questionsDatabaseName;
      default:
        return super[key];
    }
  }
}
// GENERATED CODE - DO NOT MODIFY BY HAND

// **************************************************************************
// InjectableConfigGenerator
// **************************************************************************

// ignore_for_file: type=lint
// coverage:ignore-file

// ignore_for_file: no_leading_underscores_for_library_prefixes
import 'package:get_it/get_it.dart' as _i1;
import 'package:injectable/injectable.dart' as _i2;
import 'package:www_analytics/www_analytics.dart' as _i4;
import 'package:www_local_storage/src/service/local_storage.dart' as _i3;
import 'package:www_local_storage/src/service/tournaments_local_storage.dart'
    as _i5;

extension GetItInjectableX on _i1.GetIt {
// initializes the registration of main-scope dependencies inside of GetIt
  _i1.GetIt init({
    String? environment,
    _i2.EnvironmentFilter? environmentFilter,
  }) {
    final gh = _i2.GetItHelper(
      this,
      environment,
      environmentFilter,
    );
    gh.lazySingleton<_i3.ILocalStorageService>(
        () => _i3.LocalStorageService(crashWrapper: gh<_i4.ICrashWrapper>()));
    gh.lazySingleton<_i5.ITournamentsLocalStorage>(() =>
        _i5.TournamentsLocalStorage(
            localStorage: gh<_i3.ILocalStorageService>()));
    return this;
  }
}
import 'package:www_local_storage/src/hive/model_converters/tournament_info_converter.dart';
import 'package:www_local_storage/src/hive/models/tour_info.dart';
import 'package:www_models/www_models.dart';

extension TourInfoHiveX on TourInfo {
  TourInfoHiveModel toHiveModel() => TourInfoHiveModel(
        id: this.id,
        title: this.title,
        questionsCount: this.questionsCount,
        description: this.description,
        url: this.url,
        editors: this.editors,
        createdAt: this.createdAt,
        playedAt: this.playedAt,
        tournamentInfo:


.edit,
#widgets-left .inactive-sidebar .widget-control-edit .add,
#widgets-right .widget-control-edit .add {
	display: none;
}

.widget-control-edit {
	display: block;
	color: #666;
	background: #EEE;
	padding: 0 15px;
	line-height: 43px;
	border-left: 1px solid #DDD;
}

#widgets-left .widget-control-edit:hover,
#widgets-right .widget-control-edit:hover {
	color: #fff;
	background: #444;
	border-left: 0;
	outline: 1px solid #444;
}

.widgets-holder-wrap .sidebar-name,
.widgets-holder-wrap .sidebar-description {
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
}

.editwidget {
	margin: 0 auto;
}

.editwidget .widget-inside {
	display: block;
	padding: 0 15px;
}

.editwidget .widget-control-actions {
	margin-top: 20px;
}

.widgets-holder-wrap.closed .widget,
.widgets-holder-wrap.closed .sidebar-description,
.closed br.clear {
	display: none;
}

/* Hide Widget Settings by Default */
.widget-inside,
.widget-description {
	display: none;
}

.widget-inside {
	background: #fff;
}

/* Dragging widgets over the available widget area show's a "Deactivate" message */
.id-removing-widget {
	display: none;
	font-weight: normal;
	padding-left: 15px;
	font-size: 12px;
	line-height: 1;
	color: black;
}

.id-removing-widget {
	color: #2ea2cc;
}

.widget-control-noform,
#access-off,
.widgets_access .widget-action,
.widgets_access .sidebar-name-arrow,
.widgets_access #access-on,
.widgets_access .widget-holder .description,
.no-js .widget-holder .description {
	display: none;
}

.widgets_access .widget-holder,
.widgets_access .id-widget-list {
	padding-top: 10px;
}

.widgets_access #access-off {
	display: inline;
}

.widgets_access .sidebar-name,
.widgets_access .widget .widget-top {
	cursor: default;
}

/* Widgets Area Chooser */
.widget-liquid-left #widgets-left.chooser .id-available-widgets .widget,
.widget-liquid-left #widgets-left.chooser .inactive-sidebar {
	-webkit-transition: opacity 0.1s linear;
	transition: opacity 0.1s linear;
}

.widget-liquid-left #widgets-left.chooser .id-available-widgets .widget,
.widget-liquid-left #widgets-left.chooser .inactive-sidebar {
	/* -webkit-filter: blur(1px); */
	opacity: 0.2;
	pointer-events: none;
}

.widget-liquid-left #widgets-left.chooser .id-available-widgets .widget-in-question {
	/* -webkit-filter: none; */
	opacity: 1;
	pointer-events: auto;
}

.widgets-chooser ul,
#widgets-left .widget-in-question .widget-top,
.id-available-widgets .widget-top:hover,
div#widgets-right .widget-top:hover,
#widgets-left .widget-top:hover {
	border-color: #999;
	-webkit-box-shadow: 0 1px 2px rgba(0,0,0,0.1);
	box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.widgets-


tfoot td.check-column,.widefat thead td.check-column{padding-top:4px;vertical-align:middle}.update-php div.error,.update-php div.updated{margin-left:0}.js-update-details-toggle .dashicons{text-decoration:none}.js-update-details-toggle[aria-expanded=true] .dashicons::before{content:"\f142"}.no-js .widefat tfoot .check-column input,.no-js .widefat thead .check-column input{display:none}.column-comments,.column-links,.column-posts,.widefat .num{text-align:center}.widefat th#comments{vertical-align:middle}.wrap{margin:10px 20px 0 2px}.postbox .inside h2,.wrap [class$=icon32]+h2,.wrap h1,.wrap>h2:first-child{font-size:23px;font-weight:400;margin:0;padding:9px 0 4px;line-height:1.3}.wrap h1.wp-heading-inline{display:inline-block;margin-right:5px}.wp-header-end{visibility:hidden;margin:-2px 0 0}.subtitle{margin:0;padding-left:25px;color:#50575e;font-size:14px;font-weight:400;line-height:1}.subtitle strong{word-break:break-all}.wrap .add-new-h2,.wrap .add-new-h2:active,.wrap .page-title-action,.wrap .page-title-action:active{display:inline-block;position:relative;box-sizing:border-box;cursor:pointer;white-space:nowrap;text-decoration:none;text-shadow:none;top:-3px;margin-left:4px;border:1px solid #2271b1;border-radius:3px;background:#f6f7f7;font-size:13px;font-weight:400;line-height:2.15384615;color:#2271b1;padding:0 10px;min-height:30px;-webkit-appearance:none}.wrap .wp-heading-inline+.page-title-action{margin-left:0}.wrap .add-new-h2:hover,.wrap .page-title-action:hover{background:#f0f0f1;border-color:#0a4b78;color:#0a4b78}.page-title-action:focus{color:#0a4b78}.form-table th label[for=WPLANG] .dashicons,.form-table th label[for=locale] .dashicons{margin-left:5px}.wrap .page-title-action:focus{border-color:#3582c4;box-shadow:0 0 0 1px #3582c4;outline:2px solid transparent}.wrap h1.long-header{padding-right:0}.wp-dialog{background-color:#fff}#available-widgets .widget-top:hover,#widgets-left .widget-in-question .widget-top,#widgets-left .widget-top:hover,.widgets-chooser ul,div#widgets-right .widget-top:hover{border-color:#8c8f94;box-shadow:0 1px 2px rgba(0,0,0,.1)}.sorthelper{background-color:#c5d9ed}.ac_match,.subsubsub a.current{color:#000}.alternate,.striped>tbody>:nth-child(odd),ul.striped>:nth-child(odd){background-color:#f6f7f7}.bar{background-color:#f0f0f1;border-right-color:#4f94d4}.highlight{background-color:#f0f6fc;color:#3c434a}.wp-ui-primary{color:#fff;background-color:#2c3338}.wp-ui-text-primary{color:#2c3338}.wp-ui-highlight{color:#fff;background-color:#2271b1}.wp-ui-text-highlight{color:#2271b1}.wp-ui-notification{color:#fff;background-color:#d63638}.wp-ui-text-notification{color:#d63638}.wp-ui-text-icon{color:#8c8f94}img.emoji{display:inline!important;border:none!important;height:1em!important;width:1em!impo


DLC_MP_H4_M_PEYES_0_5",label="Blue Glow Shades",Price=580},['4']={NameHash="DLC_MP_H4_M_PEYES_0_4",label="Green Glow Shades",Price=1379},['7']={NameHash="DLC_MP_H4_M_PEYES_0_7",label="Blue & Magenta Glow Shades",Price=209},['6']={NameHash="DLC_MP_H4_M_PEYES_0_6",label="Pink Glow Shades",Price=752},['9']={NameHash="DLC_MP_H4_M_PEYES_0_9",label="Blue & Yellow Glow Shades",Price=654},['8']={NameHash="DLC_MP_H4_M_PEYES_0_8",label="Purple & Yellow Glow Shades",Price=273},['11']={NameHash="DLC_MP_H4_M_PEYES_0_11",label="Red & Yellow Glow Shades",Price=1088},['10']={NameHash="DLC_MP_H4_M_PEYES_0_10",label="Pink & Yellow Glow Shades",Price=632}},['22']={['0']={NameHash="DLC_MP_IND_M_PEYES_1_0",label="Star Spangled Shades",Price=1153}},['32']={['1']={NameHash="DLC_MP_H4_M_PEYES_2_1",label="Pink Checked Round Shades",Price=1023},['0']={NameHash="DLC_MP_H4_M_PEYES_2_0",label="White Checked Round Shades",Price=1994},['3']={NameHash="DLC_MP_H4_M_PEYES_2_3",label="Red Checked Round Shades",Price=446},['2']={NameHash="DLC_MP_H4_M_PEYES_2_2",label="Yellow Checked Round Shades",Price=892},['5']={NameHash="DLC_MP_H4_M_PEYES_2_5",label="Black Round Shades",Price=753},['4']={NameHash="DLC_MP_H4_M_PEYES_2_4",label="White Round Shades",Price=205},['7']={NameHash="DLC_MP_H4_M_PEYES_2_7",label="Blue Tinted Round Shades",Price=170},['6']={NameHash="DLC_MP_H4_M_PEYES_2_6",label="Pink Tinted Round Shades",Price=1375},['9']={NameHash="DLC_MP_H4_M_PEYES_2_9",label="Blue Checked Round Shades",Price=1558},['8']={NameHash="DLC_MP_H4_M_PEYES_2_8",label="Green Checked Round Shades",Price=829},['11']={NameHash="DLC_MP_H4_M_PEYES_2_11",label="Green Tinted Round Shades",Price=411},['10']={NameHash="DLC_MP_H4_M_PEYES_2_10",label="Orange Checked Round Shades",Price=424}},['14']={['1']={NameHash="SP_M_EYES_14_1",label="SP_M_EYES_14_1",Price=1462},['0']={NameHash="SP_M_EYES_14_0",label="SP_M_EYES_14_0",Price=1394},['3']={NameHash="SP_M_EYES_14_3",label="SP_M_EYES_14_3",Price=728},['2']={NameHash="SP_M_EYES_14_2",label="SP_M_EYES_14_2",Price=1179},['5']={NameHash="SP_M_EYES_14_5",label="SP_M_EYES_14_5",Price=1418},['4']={NameHash="SP_M_EYES_14_4",label="SP_M_EYES_