Harvests and Other Events
Before signing up for an event, please be sure that you and each person signing up has registered previously on the Volunteers page. If you have already registered as a volunteer you do not have to do so again. Each adult must sign up separately for events. To sign up for an event, click on the 'Sign up for this event' button. Once you sign up, you will receive a confirmation letter with the exact address and detailed information about the event. If the roster is full, your name will be added to a waiting list and you will receive an email if anyone ahead of you cancels their spot.
Move the mouse over harvests on the calendar to see details and a sign up link below the calendar. Green harvests have roster openings left; yellow harvests have a waiting list. If you are using a smart phone you may have to scroll the top half of the page to see everything.
| Sun | Mon | Tue | Wed | Thu | Fri | Sat |
|---|---|---|---|---|---|---|
| When | Crop or task | General location |
|
|---|---|---|---|
| Thursday, Jan 9 7:30 PM |
FARMERS MARKET | San Luis Obispo | |
| Total volunteers needed |
Number on roster |
Number on waiting list |
|
| 2 | 1 | 0 | |
| This is a market collection in downtown SLO at the Thursday night Farmers Market! Please do not sign up for this glean unless you have been trained specifically for the SLO Farmer's Market. | |||
| Getting there: You will see the harvest address after signing up. |
| When | Crop or task | General location |
|
|---|---|---|---|
| Friday, Jan 10 9:00 AM |
kiwifruits | Nipomo | |
| Total volunteers needed |
Number on roster |
Number on waiting list |
|
| 20 | 11 | 0 | |
| This is a harvest of kiwis from a private farm in Nipomo- Adults and teens only, please! | |||
| Getting there: You will see the harvest address after signing up. |
| When | Crop or task | General location |
|
|---|---|---|---|
| Saturday, Jan 11 9:00 AM |
tangerines | Arroyo Grande | |
| Total volunteers needed |
Number on roster |
Number on waiting list |
|
| 4 | 4 | 1 | |
| This is a neighborhood harvest of tangerines at a home in Arroyo Grande. Ladders and pole pickers may be necessary to reach all of the fruit. Ladder-friendly Adults and teens only. | |||
| Getting there: You will see the harvest address after signing up. |
| When | Crop or task | General location |
|
|---|---|---|---|
| Monday, Jan 13 9:00 AM |
kiwifruits | Nipomo | |
| Total volunteers needed |
Number on roster |
Number on waiting list |
|
| 20 | 1 | 0 | |
| This is a harvest of kiwis from a private farm in Nipomo- Adults and teens only, please! | |||
| Getting there: You will see the harvest address after signing up. |
| When | Crop or task | General location |
|
|---|---|---|---|
| Tuesday, Jan 14 9:00 AM |
apples | SLO, See Canyon | |
| Total volunteers needed |
Number on roster |
Number on waiting list |
|
| 20 | 1 | 0 | |
| This is an apple glean at an orchard in See Canyon- read special instructions about where to meet after signing up. Adults and teens only, please! | |||
| Getting there: You will see the harvest address after signing up. |
| When | Crop or task | General location |
|
|---|---|---|---|
| Thursday, Jan 16 7:30 PM |
FARMERS MARKET | San Luis Obispo | |
| Total volunteers needed |
Number on roster |
Number on waiting list |
|
| 2 | 0 | 0 | |
| This is a market collection in downtown SLO at the Thursday night Farmers Market! Please do not sign up for this glean unless you have been trained specifically for the SLO Farmer's Market. | |||
| Getting there: You will see the harvest address after signing up. |
| When | Crop or task | General location |
|
|---|---|---|---|
| Friday, Jan 17 9:00 AM |
kiwifruits | Nipomo | |
| Total volunteers needed |
Number on roster |
Number on waiting list |
|
| 20 | 1 | 0 | |
| This is a harvest of kiwis from a private farm in Nipomo- Adults and teens only, please! | |||
| Getting there: You will see the harvest address after signing up. |
| When | Crop or task | General location |
|
|---|---|---|---|
| Thursday, Jan 23 7:30 PM |
FARMERS MARKET | San Luis Obispo | |
| Total volunteers needed |
Number on roster |
Number on waiting list |
|
| 2 | 0 | 0 | |
| This is a market collection in downtown SLO at the Thursday night Farmers Market! Please do not sign up for this glean unless you have been trained specifically for the SLO Farmer's Market. | |||
| Getting there: You will see the harvest address after signing up. |
| When | Crop or task | General location |
|
|---|---|---|---|
| Thursday, Jan 30 7:30 PM |
FARMERS MARKET | San Luis Obispo | |
| Total volunteers needed |
Number on roster |
Number on waiting list |
|
| 2 | 0 | 0 | |
| This is a market collection in downtown SLO at the Thursday night Farmers Market! Please do not sign up for this glean unless you have been trained specifically for the SLO Farmer's Market. | |||
| Getting there: You will see the harvest address after signing up. |
| To get the latest news and updates about GleanSLO, visit our Facebook page. |
| Year | Pounds of food that would otherwise have gone to waste |
|---|---|
| 2020 | 1,589 |
| 2019 | 229,095 |
| 2018 | 231,377 |
| 2017 | 279,830 |
| 2016 | 243,312 |
| 2015 | 209,013 |
| 2014 | 200,092 |
| 2013 | 212,109 |
| 2012 | 99,165 |
| 2011 | 37,988 |
| 2010 | 22,000 |


A blog about programming (usually scientific python), mathematics (usually game theory) and learning (usually student centred pedagogic approaches).
Computing nash equilibria in R
2020-02-26
There are a number of ways of computing Nash equilibria for Normal Form Games
defined by two matrices ((A, B)). The approach I'm going to describe here is
to use vertex enumeration. This is not necessarily the most efficient algorithm
(that honor goes to
The Lemke Howson algorithm). The vertex
enumeration algorithm involves finding vertices of Polytopes and R has a nice
library for that called vertexenum
.
The theory (skip if you just want the code)
You can read my course notes on this here: vknight.org/gt/chapters/06/ but here is a brief outline:
- Consider a two player game defined by \((A, B)\in\mathbb{R}^{({m \times n})^2}\) where \(A\) denotes the row player's utilities and (B) the column player's utilities.
- Define the row player's best response polytope as:
\[ \mathcal{P} = \left\{x\in\mathbb{R}^{m}\;|\;x\geq 0; xB\leq 1\right\} \]
- Define the row player's best response polytope as:
\[ \mathcal{Q} = \left\{y\in\mathbb{R}^{n}\;|\;Ay\leq 1; y\geq 0\right\} \]
-
Elements of \(\mathcal{P}, \mathcal{Q}\) are labelled by the defining inequalities for which they are binding. For example in \(P\) for \(m=3\) the vertex \(x=(0,0,0)\) would have labels \(1, 2, 3\) as the first 3 inequlities of \(\mathcal{P}\) are in fact equalities. In \(Q\) for \(n=2\) the vertex \(y=(0,0)\) would have labels \(4, 5\) as the last 2 inequlities of \(\mathcal{Q}\) are in fact equalities.
-
Nash equilibria corresponds to pairs of vertices of \(\mathcal{P}\) and \(\mathcal{Q}\) for which the union of the labels give the full set of integers from \(1\) to \(m + n\). One such pair will always be the pair of vertices with all values 0 (as in the previous bullet point) however this is a so called "artificial" equilibria.
- To convert these pairs of vertices to pairs of strategies, we normalise so that their elements sum to 1.
Throughout this blog post we will use the following game as an example:
\[ A = \begin{pmatrix} 3 & 1\\ 0 & 2 \end{pmatrix} \quad B = \begin{pmatrix} 2 & 1\\ 0 & 3 \end{pmatrix} \]
Implementation of vertex enumeration in R.
We are going to make use of the vertexenum
library which given a general
polytope will return all vertices. This library's function enumerate.vertices
takes 2 inputs M, b
that define the Polytope in the general form as
(Mx\leq b). So the first step is to create these two inputs from a given set
of payoff matrices.
#' Returns the matrix M that corresponds to the column players best response
#' polytope defined by the row players utility matrix A.
#'
#' @param A The row players utility matrix.
get_linear_system_coeffients <- function(A) {
dimensions <- dim(A)
number_of_row_strategies <- dimensions[2]
positivity_constraints <- -diag(number_of_row_strategies)
do.call(rbind, list(positivity_constraints, A))
}
For example if we use this on the row players utility matrix of our running example:
A <- rbind(c(3, 1), c(0, 2))
A
## [,1] [,2]
## [1,] 3 1
## [2,] 0 2
We get:
get_linear_system_coeffients(A)
## [,1] [,2]
## [1,] -1 0
## [2,] 0 -1
## [3,] 3 1
## [4,] 0 2
We also need to get the right hand side vector:
#' Returns the vector b that corresponds to the column players best response
#' polytope defined by the row players utility matrix A.
#'
#' @param A The row players utility matrix.
get_linear_system_rhs <- function(A) {
dimensions <- dim(A)
number_of_col_strategies <- dimensions[1]
number_of_row_strategies <- dimensions[2]
c(rep(0, number_of_row_strategies), rep(1, number_of_col_strategies))
}
If we now use this we get:
get_linear_system_rhs(A)
## [1] 0 0 1 1
We can use the vertexenum
library to get the vertices of the row player's
polytope:
library(vertexenum)
M <- get_linear_system_coeffients(A)
b <- get_linear_system_rhs(A)
enumerate.vertices(M, b)
## [,1] [,2]
## [1,] 0.1666667 0.5
## [2,] 0.0000000 0.5
## [3,] 0.3333333 0.0
## [4,] 0.0000000 0.0
For the row player we need to consider the transpose of (B) (as all of the code we have written is from the perspective of the column player):
B <- rbind(c(2, 1), c(0, 3))
M <- get_linear_system_coeffients(t(B))
b <- get_linear_system_rhs(t(B))
enumerate.vertices(M, b)
## [,1] [,2]
## [1,] 0.5 0.1666667
## [2,] 0.0 0.3333333
## [3,] 0.5 0.0000000
## [4,] 0.0 0.0000000
Given a vertex we want to know its labels (which of the defining inequalities are binding) so let us write a function to do that:
library(berryFunctions)
#' Returns the set of labels of a given vertex for the polytope defined
#' by M and b.
#'
#' @param vertex The vertex
#' @param M The coefficient matrix defining the polytope
#' @param b The right hand side vector defining the polytope
get_labels <- function(vertex, M, b) {
almost.equal(c(M %*% vertex), b)
}
For example:
get_labels(c(1 / 2, 0), M, b)
## [1] FALSE TRUE TRUE FALSE
We can now compute all vertices of a polytope and the corresponding labels:
#' Returns the set of vertices and labels for the column player's best
#' response polytope.
#' The format of the output is:
#'
#' x_1 x_2 ... x_n B_1 B_2 ... B_(m+n)
#'
#' Where B_i is 0 (False) or 1 (True) dependent on whether or not the vector has
#' label i.
#'
#' @param A The row players utility matrix.
get_vertices <- function(A) {
M <- get_linear_system_coeffients(A)
b <- get_linear_system_rhs(A)
vertices <- enumerate.vertices(M, b)
vertices <- vertices[rowSums(vertices) != 0, ]
labels <- t(apply(vertices, 1, function(vertex) {
get_labels(vertex, M, b)
}))
cbind(vertices, labels)
}
col_vertices <- get_vertices(A)
row_vertices <- get_vertices(t(B))
col_vertices
## [,1] [,2] [,3] [,4] [,5] [,6]
## [1,] 0.1666667 0.5 0 0 1 1
## [2,] 0.0000000 0.5 1 0 0 1
## [3,] 0.3333333 0.0 0 1 1 0
row_vertices
## [,1] [,2] [,3] [,4] [,5] [,6]
## [1,] 0.5 0.1666667 0 0 1 1
## [2,] 0.0 0.3333333 1 0 0 1
## [3,] 0.5 0.0000000 0 1 1 0
Using all of the above, we can now consider two potential vertices, and their labels and see if they form a fully labeled pair:
#' Returns whether or not a given pair of vertices is fully labeled.
#' Takes a vertex x in the following form:
#'
#' x_1 x_2 ... x_n B_1 B_2 ... B_(m+n)
#'
#' Where B_i is 0 (False) or 1 (True) dependent on whether or not the vector has
#' label i.
#'
#' @param x A row player vertex
#' @param y A column player vertex
#' @param number_of_row_strategies # TODO Remove this as an argument.
#' @param number_of_col_strategies
is_fully_labeled <- function(x,
y,
number_of_row_strategies,
number_of_col_strategies) {
dimension <- number_of_row_strategies + number_of_col_strategies
row_labels <- (which(x[-c(1:number_of_row_strategies)] > 0) %% dimension)
col_labels <- (which(y[-c(1:number_of_col_strategies)] > 0) + number_of_row_strategies) %% dimension
setequal(union(row_labels, col_labels), 0:(dimension - 1))
}
x <- row_vertices[3, ]
y <- col_vertices[3, ]
is_fully_labeled(x, y, 2, 2)
## [1] TRUE
x <- row_vertices[3, ]
y <- col_vertices[2, ]
is_fully_labeled(x, y, 2, 2)
## [1] FALSE
This gives us all the tools we need to iterate over all pairs of vertices and identify the fully labeled vertex pairs (and thus the Nash equilibria):
#' Return the nash equilibria for a two player game defined by utility matrices
#' A and B
#'
#' @param A The row player utility matrix
#' @param B The column player utility matrix
obtain_nash_equilibra <- function(A, B) {
dimensions <- dim(A)
number_of_row_strategies <- dimensions[1]
number_of_col_strategies <- dimensions[2]
row_vertices <- get_vertices(t(B))
col_vertices <- get_vertices(A)
number_of_row_vertices <- dim(row_vertices)[1]
number_of_col_vertices <- dim(col_vertices)[1]
output <- c()
for (i in 1:number_of_row_vertices) {
row_vertex_and_labels <- row_vertices[i, ]
for (j in 1:number_of_col_vertices) {
column_vertex_and_labels <- col_vertices[j, ]
if (is_fully_labeled(
x = row_vertex_and_labels,
y = column_vertex_and_labels,
number_of_row_strategies = number_of_row_strategies,
number_of_col_strategies = number_of_col_strategies
)) {
row_vertex <- head(row_vertex_and_labels, number_of_row_strategies)
row_strategy <- row_vertex / sum(row_vertex)
column_vertex <- head(column_vertex_and_labels, number_of_col_strategies)
column_strategy <- column_vertex / sum(column_vertex)
max_size <- max(number_of_row_strategies, number_of_col_strategies)
length(row_strategy) <- max_size
length(column_strategy) <- max_size
output <- rbind(output, row_strategy, column_strategy)
}
}
}
output
}
ne <- obtain_nash_equilibra(A, B)
ne
## [,1] [,2]
## row_strategy 0.75 0.25
## column_strategy 0.25 0.75
## row_strategy 0.00 1.00
## column_strategy 0.00 1.00
## row_strategy 1.00 0.00
## column_strategy 1.00 0.00
We see there that we have 3 Nash equilibria.
We can experiment with a slightly larger game, for example here is rock paper scissors:
rps <- rbind(c(0, -1, 1), c(1, 0, -1), c(-1, 1, 0))
rps_row <- rps + 2
rps_col <- -rps + 2
ne <- obtain_nash_equilibra(rps_row, rps_col)
ne
## [,1] [,2] [,3]
## row_strategy 0.3333333 0.3333333 0.3333333
## column_strategy 0.3333333 0.3333333 0.3333333
And here is a non square game:
A <- rbind(c(3, 3), c(2, 5), c(0, 6))
B <- rbind(c(3, 2), c(2, 6), c(3, 1))
ne <- obtain_nash_equilibra(A, B)
ne
## [,1] [,2] [,3]
## row_strategy 0.8000000 0.2000000 0.0000000
## column_strategy 0.6666667 0.3333333 NA
## row_strategy 0.0000000 0.3333333 0.6666667
## column_strategy 0.3333333 0.6666667 NA
## row_strategy 1.0000000 0.0000000 0.0000000
## column_strategy 1.0000000 0.0000000 NA
There are a number of other (better) algorithms for computing equilbria and the python Nashpy library document has reference material on them.
If you have any thoughts/improvement on the R code (I'm not terribly satisfied with how obtain_nash_equilibria
is written for example), I'd welcome your thoughts: @drvinceknight.


|
Name |
Coverage |
| |
Line |
Branches Taken |
| cdjpeg.c |
|
68.4% |
13 / 19 lines |
70.0% |
7 / 10 branches |
| cjpeg.c |
|
74.0% |
151 / 204 lines |
59.6% |
90 / 151 branches |
| jcapimin.c |
|
52.6% |
50 / 95 lines |
48.1% |
26 / 54 branches |
| jcapistd.c |
|
46.9% |
23 / 49 lines |
32.1% |
9 / 28 branches |
| jccoefct.c |
|
93.2% |
151 / 162 lines |
92.3% |
72 / 78 branches |
| jccolor.c |
|
53.1% |
93 / 175 lines |
35.1% |
26 / 74 branches |
| jcdctmgr.c |
|
95.7% |
110 / 115 lines |
90.0% |
45 / 50 branches |
| jchuff.c |
|
88.2% |
291 / 330 lines |
76.2% |
163 / 214 branches |
| jcinit.c |
|
94.7% |
18 / 19 lines |
80.0% |
8 / 10 branches |
| jcmainct.c |
|
80.4% |
37 / 46 lines |
59.1% |
13 / 22 branches |
| jcmarker.c |
|
74.2% |
164 / 221 lines |
63.1% |
65 / 103 branches |
| jcmaster.c |
|
85.2% |
225 / 264 lines |
64.7% |
123 / 190 branches |
| jcomapi.c |
|
92.0% |
23 / 25 lines |
62.5% |
5 / 8 branches |
| jcparam.c |
|
77.9% |
162 / 208 lines |
56.0% |
47 / 84 branches |
| jcphuff.c |
|
82.4% |
263 / 319 lines |
70.1% |
115 / 164 branches |
| jcprepct.c |
|
98.4% |
120 / 122 lines |
92.6% |
50 / 54 branches |
| jcsample.c |
|
78.2% |
151 / 193 lines |
61.7% |
37 / 60 branches |
| jdatadst.c |
|
91.2% |
31 / 34 lines |
50.0% |
5 / 10 branches |
| jerror.c |
|
89.8% |
53 / 59 lines |
57.1% |
16 / 28 branches |
| jfdctflt.c |
|
100.0% |
68 / 68 lines |
100.0% |
4 / 4 branches |
| jfdctfst.c |
|
100.0% |
68 / 68 lines |
100.0% |
4 / 4 branches |
| jfdctint.c |
|
100.0% |
80 / 80 lines |
100.0% |
4 / 4 branches |
| jmemmgr.c |
|
67.4% |
254 / 377 lines |
53.1% |
103 / 194 branches |
| jmemnobs.c |
|
84.2% |
16 / 19 lines |
N/A |
0 / 0 branches |
| jutils.c |
|
85.0% |
17 / 20 lines |
100.0% |
2 / 2 branches |
| rdbmp.c |
|
51.7% |
92 / 178 lines |
58.9% |
43 / 73 branches |
| rdgif.c |
|
100.0% |
3 / 3 lines |
N/A |
0 / 0 branches |
| rdppm.c |
|
90.4% |
160 / 177 lines |
88.6% |
70 / 79 branches |
| rdswitch.c |
|
15.3% |
23 / 150 lines |
6.7% |
8 / 120 branches |
| rdtarga.c |
|
89.8% |
167 / 186 lines |
93.2% |
69 / 74 branches |
Generated: 2016-04-07 17:52 by zcov


Double Match Point. How should Red play 61?
pips Red=80 White=109
(CorrectAnswer= 0/0, ErrorScore= 0)
For money the hit with 10/4, 2/1* is clear because it wins so many more gammons.
At DMP things are not so obvious. All Red needs is to win the game. If he plays 10/3 then all sixes other than 66 will leave a shot next turn, but that may never happen whereas 10/4, 2/1* gives White a shot immediately. More likely is that Red will leave a couple of indirect shots next turn.
With White having a four-point home board the hit turns out to be slightly too risky and 10/3 is the correct play.
At DMP things are not so obvious. All Red needs is to win the game. If he plays 10/3 then all sixes other than 66 will leave a shot next turn, but that may never happen whereas 10/4, 2/1* gives White a shot immediately. More likely is that Red will leave a couple of indirect shots next turn.
With White having a four-point home board the hit turns out to be slightly too risky and 10/3 is the correct play.
Cube analysis 2-ply cubeless equity +0.746 0.866 0.049 0.002 - 0.134 0.036 0.002 Cubeful equities: 1. Double, pass +1.000 2. Double, take +1.400 (+0.400) 3. No double +0.937 (-0.063) Proper cube action: Double, pass


--- layout: default title: 'Designs' ---
The care recipient is a full partner in their own care and its leader to the best of their wishes and ability. Care planning leads with person-centered participation followed by provider-centered education.
Care recipients must understand and accept the reasoning and rationale for medical treatment to the best of their wishes and abilities, increasing motivation and responsibility for their own health.
Care planning by members of one’s care team begins with an assessment of health concerns, goals, values, preferences, and capacity.
Care planning merges management of environmental concerns (environmental, behavioral, social, biological, medical) with the management of medical problems (treatments and therapeutics) leading to identification of goals and action planning.
Important steps in the person-centered care plan include who’s accountable, when goals and actions will be completed, and where to go as questions arise.
Streams of communication should be open and accessible to all care team members as their roles and permissions allow.
The care planning service should provide actionable steps at the right time, based on new health information that is continuously being collected.
Health is complex. Prevent information overload by analyzing, interpreting and providing the right health information at the right time for the right person.
Care planning feeds the discovery of what works for individuals and populations. Population level data specific to the care recipients demographic and health situation can be used to drive health recommendations.
The care plan should be fluid in its understanding of the care recipient. It should continuously learn more about the care recipients values, preferences, and contraindications based on new information.
Access to your health data is a human right. The patient co-owns or fully owns every personal health data point about themselves.
Clinicians will collaborate with patients to responsibly use health data for betterment of public and patient health.
Criminalize the pejorative use of personal health care data.
Provide access to scientific research, develop tools and materials to engage the imagination of the public and accelerate scientific discovery.
Visibility into who, what, when, how people and services use your health data.


{{ lnurl }}
Tap on the QR code above or copy the LNURL string to your wallet to request a channel from this service.
Note that invite codes can only be used once.


Example of MT Confidence with annotator references.
Dublin is the capital city of Ireland and has the 50th biggest population density in Europe. Madrid is the capital of Spain. Berlin is the capital of Germany. London is the capital of England


Miscellaneous resources¶
A collection of presentations, videos and publications on, or related to, the Scikit-HEP project.
Presentations¶
- 27 Feb. 2017: first presentation of the project,
DIANA/HEP project topical meeting, CERN:
- The Scikit-HEP project, Eduardo Rodrigues
- Ostap concepts in Scikit-HEP, Vanya Belyaev
- Rootpy and root_numpy concepts in Scikit-HEP, Noel Dawe


Fila Hotels & Resorts |
||
Water BungalowsWith so many different overwater resorts to choose from within the Maldives alone, you should have no problem finding one that not only fits your budget, but your vacation style as well. This is because you'll find that Maldives resorts come in three different price ranges- budget, luxury, and super luxury. You'll also note that these same resorts either cater only to romantic couples or to a combination of couples and small families. If you're looking for a resort that caters to both couples and families and don't mind spending a good amount of money per night, then you'll want to take a long look at the Anantara Dhigu Resort & Spa. At this resort you'll find beautiful (and large) overwater rooms, lots of dining options, a kids club, wedding facilities and much more starting out at US$1,350 per night for two people. Luxury RoomsRiyadh's Ritz-Carlton will reopen on February 11, the hotel said Sunday, more than three months after it became a holding place of princes and ministers detained in an anti-corruption purge. The luxury hotel was closed for business since the unprecedented probe was launched on November 4 by Crown Prince Mohammed bin Salman, who has consolidated his grip on power since his shock appointment as heir to the throne in June. A hotel receptionist reached by phone confirmed to AFP that room bookings were available from noon on February 11. Many of the high-profile suspects, including billionaire Prince Al-Waleed bin Talal, have been released in recent weeks in exchange for what officials have dubbed financial settlements. |
||
| © 2018 Fila Hotels & Resorts |


We can not only assign handlers, but also generate events from JavaScript.
Custom events can be used to create “graphical components”. For instance, a root element of our own JS-based menu may trigger events telling what happens with the menu: open
(menu open), select
(an item is selected) and so on. Another code may listen for the events and observe what’s happening with the menu.
We can generate not only completely new events, that we invent for our own purposes, but also built-in ones, such as click
, mousedown
etc. That may be helpful for automated testing.
Built-in event classes form a hierarchy, similar to DOM element classes. The root is the built-in Event class.
We can create Event
objects like this:
Arguments:
"click"
or our own like "my-event"
.options – the object with two optional properties:
bubbles: true/false
– if true
, then the event bubbles.cancelable: true/false
– if true
, then the “default action” may be prevented. Later we’ll see what it means for custom events.By default both are false: {bubbles: false, cancelable: false}
.
After an event object is created, we should “run” it on an element using the call elem.dispatchEvent(event)
.
Then handlers react on it as if it were a regular browser event. If the event was created with the bubbles
flag, then it bubbles.
In the example below the click
event is initiated in JavaScript. The handler works same way as if the button was clicked:
```html run no-beautify
```
```smart header=“event.isTrusted” There is a way to tell a “real” user event from a script-generated one.
The property event.isTrusted
is true
for events that come from real user actions and false
for script-generated events. ```
We can create a bubbling event with the name "hello"
and catch it on document
.
All we need is to set bubbles
to true
:
```
Notes:
addEventListener
for our custom events, because on<event>
only exists for built-in events, document.onhello
doesn’t work.bubbles:true
, otherwise the event won’t bubble up.The bubbling mechanics is the same for built-in (click
) and custom (hello
) events. There are also capturing and bubbling stages.
Here’s a short list of classes for UI Events from the UI Event specification:
UIEvent
FocusEvent
MouseEvent
WheelEvent
KeyboardEvent
We should use them instead of new Event
if we want to create such events. For instance, new MouseEvent("click")
.
The right constructor allows to specify standard properties for that type of event.
Like clientX/clientY
for a mouse event:
```js run let event = new MouseEvent(“click”, { bubbles: true, cancelable: true, clientX: 100, clientY: 100 });
! alert(event.clientX); // 100 /! ```
Please note: the generic Event
constructor does not allow that.
Let’s try:
```js run let event = new Event(“click”, { bubbles: true, // only bubbles and cancelable cancelable: true, // work in the Event constructor clientX: 100, clientY: 100 });
! alert(event.clientX); // undefined, the unknown property is ignored! /! ```
Technically, we can work around that by assigning directly event.clientX=100
after creation. So that’s a matter of convenience and following the rules. Browser-generated events always have the right type.
The full list of properties for different UI events is in the specification, for instance, MouseEvent.
For our own, completely new events types like "hello"
we should use new CustomEvent
. Technically CustomEvent is the same as Event
, with one exception.
In the second argument (object) we can add an additional property detail
for any custom information that we want to pass with the event.
For instance:
```html run refresh```
The detail
property can have any data. Technically we could live without, because we can assign any properties into a regular new Event
object after its creation. But CustomEvent
provides the special detail
field for it to evade conflicts with other event properties.
Besides, the event class describes “what kind of event” it is, and if the event is custom, then we should use CustomEvent
just to be clear about what it is.
Many browser events have a “default action”, such as navigating to a link, starting a selection, and so on.
For new, custom events, there are definitely no default browser actions, but a code that dispatches such event may have its own plans what to do after triggering the event.
By calling event.preventDefault()
, an event handler may send a signal that those actions should be canceled.
In that case the call to elem.dispatchEvent(event)
returns false
. And the code that dispatched it knows that it shouldn’t continue.
Let’s see a practical example - a hiding rabbit (could be a closing menu or something else).
Below you can see a #rabbit
and hide()
function that dispatches "hide"
event on it, to let all interested parties know that the rabbit is going to hide.
Any handler can listen for that event with rabbit.addEventListener('hide',...)
and, if needed, cancel the action using event.preventDefault()
. Then the rabbit won’t disappear:
|\ /| \|_|/ /. .\ =\_Y_/= {>o<}
```
Please note: the event must have the flag cancelable: true
, otherwise the call event.preventDefault()
is ignored.
Usually events are processed in a queue. That is: if the browser is processing onclick
and a new event occurs, e.g. mouse moved, then it’s handling is queued up, corresponding mousemove
handlers will be called after onclick
processing is finished.
The notable exception is when one event is initiated from within another one, e.g. using dispatchEvent
. Such events are processed immediately: the new event handlers are called, and then the current event handling is resumed.
For instance, in the code below the menu-open
event is triggered during the onclick
.
It’s processed immediately, without waiting for onclick
handler to end:
```html run autorun
```
The output order is: 1 -> nested -> 2.
Please note that the nested event menu-open
is caught on the document
. The propagation and handling of the nested event is finished before the processing gets back to the outer code (onclick
).
That’s not only about dispatchEvent
, there are other cases. If an event handler calls methods that trigger other events – they are processed synchronously too, in a nested fashion.
Let’s say we don’t like it. We’d want onclick
to be fully processed first, independently from menu-open
or any other nested events.
Then we can either put the dispatchEvent
(or another event-triggering call) at the end of onclick
or, maybe better, wrap it in the zero-delay setTimeout
:
```html run
```
Now dispatchEvent
runs asynchronously after the current code execution is finished, including menu.onclick
, so event handlers are totally separate.
The output order becomes: 1 -> 2 -> nested.
To generate an event from code, we first need to create an event object.
The generic Event(name, options)
constructor accepts an arbitrary event name and the options
object with two properties:
bubbles: true
if the event should bubble.cancelable: true
if the event.preventDefault()
should work.Other constructors of native events like MouseEvent
, KeyboardEvent
and so on accept properties specific to that event type. For instance, clientX
for mouse events.
For custom events we should use CustomEvent
constructor. It has an additional option named detail
, we should assign the event-specific data to it. Then all handlers can access it as event.detail
.
Despite the technical possibility of generating browser events like click
or keydown
, we should use them with great care.
We shouldn’t generate browser events as it’s a hacky way to run handlers. That’s bad architecture most of the time.
Native events might be generated:
Custom events with our own names are often generated for architectural purposes, to signal what happens inside our menus, sliders, carousels etc.


Forest of the Lost [an62], forest, in Imperia, peasants: 134
Last updated Turn #125
Forest of the Lost [an62], forest, in Imperia, peasants: 134
------------------------------------------------------------------------
11: Stack of nazgul [bp7i], nazgul, number: 2, went west.
12: Horde of rats [ei3h], rats, number: 31, went west.
16: The Lone Traveler [e4n], refugee, went west.
16: Stack of nazgul [ic5w], nazgul, number: 2, arrived from the west.
18: Stack of nazgul [ic5w], nazgul, number: 2, went east.
19: Stack of nazgul [bp7i], nazgul, number: 2, arrived from the west.
21: Stack of nazgul [bp7i], nazgul, number: 2, went east.
22: Stack of nazgul [al5c], nazgul, number: 3, arrived from the east.
24: Stack of nazgul [al5c], nazgul, number: 3, went west.
27: It has begun to rain.
28: Stack of nazgul [bq0l], nazgul, arrived from the east.
30: Stack of nazgul [bq0l], nazgul, went west.
30: The population grows by one peasant.
Routes leaving Forest of the Lost:
North, swamp, to Mosquito Fens [am62], 14 days
East, swamp, to Mosquito Fens [an63], 14 days
South, forest, to Forest of the Lost [ao62], 8 days
West, forest, to Forest of the Lost [an61], 8 days
It is raining.
Seen here:
Stack of nazgul [ft4t], nazgul, number: 3
Stack of nazgul [ho4e], nazgul, number: 3
Stack of nazgul [ic5w], nazgul
Stack of nazgul [bp7i], nazgul


We're sorry but vant-app doesn't work properly without JavaScript enabled. Please enable it to continue.


Just like typography, pictograms gives the UI context. They help illustrate the purpose of UI elements. Pictograms are often easier and faster to understand than text.


{# errors/404.html ~~~~~~~~~~~~~~~ This template is shown if the page requested does not exist. :copyright: (c) 2013-2019 by the Inyoka Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. #} {% extends 'base.html' %} {% block title %} 404 - {{ super() }} {% endblock title %} {% block content %} {% if err_message %}
{{ err_message }}
{% else %}{% trans %} The page you requested was not found. Please check if there are any typos in the URL. Alternativly, you do not have the permission to access this site. {% endtrans %}
{% trans %} If you just posted a new reply, check first, whether your post has been successfull submitted. If needed, you can try to post your content a second time after that. {% endtrans %}
{% endif %} {% endblock %}


To start using the Valo theme, you need to install at least one Vaadin Core Element (such as vaadin-text-field) and the Valo theme package.
After installing, import any element specific theme files you need. Here, we are importing the Valo theme for vaadin-text-field.
You need to import the theme for an element before the actual element itself.


Constructor
new MarketEngine(optionsopt)
create MarketEngine
Parameters:
| Name | Type | Attributes | Default | Description | ||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
<optional> |
{pushArray:1} | options copied to this.o
Properties
|
Listens to Events:
- event:{trade-cleanup(tradespec)} to reduce order quantity by quantity tradedo
Classes
Members
a :Array.<(Object|Array.<number>)>
list of active orders
orders may be objects or arrays of fixed length
Type:
- Array.<(Object|Array.<number>)>
count :number
counter of order number stamp
Type:
- number
o :Object
options passed to constructor
Type:
- Object
trash :Array.<number>
list of indexes into this.a[] of trashed orders to be removed
Type:
- Array.<number>
Methods
bump(neworder)
cancel or expire orders prior to processing new order.
new orders can be marked cancelReplace, necessitating a cancel search.
new orders also update simulation time, necessitating an expired order search.
Parameters:
| Name | Type | Description |
|---|---|---|
neworder |
Object | Array.<number> |
Fires:
- event:{bump} after cancelling or expiring any old orders
cancel(id)
find and cancel previous orders by id.
Orders are cancelled by setting quantity to 0 and adding to trash list.
Optimistic searching is done: if an order is found which itself has a cancelCol set, the search is complete.
Parameters:
| Name | Type | Description |
|---|---|---|
id |
number | The id number of an agent whose orders will be cancelled. |
clear()
clear active and trash list, reset counter, and emit clear event
Fires:
- event:{clear} after clearing active and trash lists and resetting counter
emptyTrash()
delete the orders in the trash list from the active list.
Orders are deleted from the active list using Array.splice, so order indexes in this.a[] will also change.
expire(ts)
find and expire orders.
Orders are expired if supplied time ts is greater than order txCol.
Orders are expired by setting quantity to 0 and adding to trash list
Parameters:
| Name | Type | Description |
|---|---|---|
ts |
number | The current effective market time |
push(order)
"push" a new order to the market
performs housekeeping:
1. pre-adding fields such as processing timestamp and order number
1. emitting before-order(myorder,function reject()) to allow customized order acceptance/rejection rules
1. if rejected, emitting reject(myorder) to allow additional processing or logging of rejected orders, after setting a rejection flag (which can still be unset)
1. assigning the order number in myorder[0]
1. emitting preorder(myorder) for logging or additional processing before order affects books, other orders, or trades
1. procesing any cancellation or expiration triggered in pre-processing of the order with this.bump(myorder)
1. If the this.a active list exists, add the new order to the active list
1. emit order(myorder) to allow for additional customized processing (such as identifying trades or enforcing other rules)
Parameters:
| Name | Type | Description |
|---|---|---|
order |
Object | Array.<number> | A new order to the market for processing |
Fires:
- {before-order(myorder,event: reject())} to allow customized rejection rules for orders
- event:{reject(myorder)} to allow for logging or other processing of rejected orders
- event:{preorder(myorder)} to allow for logging or other processing of acceptable orders
- event:{order(myorder)} to allow customized rules and trading procedures
reduceQ(ais, qs)
reduce the amounts of orders at active array indexes ais by amounts qs.
Calls trash.push(ais[i]), pushing indexes to trash list, for affected orders reduced to zero quantity.
Reducing an order to a negative quantity throws Error.
Parameters:
| Name | Type | Description |
|---|---|---|
ais |
Array.<number> | Indexes in the active array this.a[] of the orders to be affected. |
qs |
Array.<number> | Amounts for reduction in the quantity of the affected orders. |
Throws:
-
if order is reduced to a negative quantity
- Type
- Error
trade(tradeSpec)
Register a trade in this market.
Sets tradespec.goods and tradespec.money to market goods and money, if any.
Then emits trade(tradeSpec), trade-cleanup(tradeSpec), and after-trade(tradeSpec) for further processing.
Parameters:
| Name | Type | Description |
|---|---|---|
tradeSpec |
Object |
Fires:
- event:{trade(tradeSpec)} to allow custom processing of trade
- event:{trade-cleanup(tradeSpec)} to allow custom cleanup of market structures after processing trade
- event:{after-trade(tradeSpec)} to allow custom post-processing after trade


In the past two months, I have made a lot of refactorings to improve xmake and added a lot of useful new features. Welcome to try it.
Some new features:
- Compile other projects maintained by the build system with one click to achieve seamless docking and support cross compilation (such as fast cross compilation of autotools, see details below)
- Added
xmake project -k ninja
project generation plugin to support generation of build.ninja build system files
Some improvements:
- Improve command line parameter input, support *nix style parameter input, thanks @OpportunityLiu for contribution
- Improve tab command completion, add command completion support for parameter values
- Optimize get.sh installation and xmake update update scripts, add domestic mirror source, speed up download and install updates
- gcc/clang compilation error output support native color highlighting support
- Added msys/cygwin platform, and xmake source code also supports msys/mingw platform compilation
Some invisible improvements:
- Add socket and pipe modules and improve the process module
- Refactor the whole process scheduler, better scheduling and parallel construction
- Refactoring and improving the entire coroutine coroutine module, supporting simultaneous scheduling support for socket/pipe/process (preparing for subsequent remote compilation and distributed compilation)
There are also some scattered bug fixes, see updates below.
Introduction of new features
Generate build.ninja build file
xmake now supports the generation of ninja build files, allowing users to use ninja to quickly build projects maintained by xmake. I have to admit that in terms of build speed, ninja is indeed much faster than xmake. I will try to optimize the build speed of xmake in subsequent versions.
$ xmake project -k ninja
Then call ninja to build:
$ ninja
Or use the xmake command directly to call the ninja build, see below.
Try building with another build system
xmake v2.3.1 and above directly interface with other third-party build systems. Even if other projects do not use xmake.lua for maintenance, xmake can directly call other build tools to complete the compilation.
Then the user can directly use a third-party build tool to compile, so why use xmake to call it? The main benefits are:
- Completely consistent behavior, simplifying the compilation process. No matter which other build system is used, you only need to execute the xmake command to compile. Users no longer need to study the different compilation processes of other tools
- Docking the configuration environment of
xmake config
, reuse the platform detection and SDK environment detection of xmake, simplify the platform configuration - Docking cross-compilation environment, even for projects maintained with autotools, you can quickly cross-compile through xmake
Build systems currently supported:
- autotools (cross-compiling environment for xmake)
- xcodebuild
- cmake
- make
- msbuild
- scons
- meson
- bazel
- ndkbuild
- ninja
Automatically detect build system and compile
For example, for a project maintained using cmake, executing xmake directly in the project root directory will automatically trigger a detection mechanism, detect CMakeLists.txt, and then prompt the user if cmake is needed to continue compiling.
$ xmake
note: CMakeLists.txt found, try building it (pass -y or --confirm=y/n/d to skip confirm)?
please input: y (y/n)
-- Symbol prefix:
-- Configuring done
-- Generating done
-- Build files have been written to:/Users/ruki/Downloads/libpng-1.6.35/build
[ 7%] Built target png-fix-itxt
[ 21%] Built target genfiles
[ 81%] Built target png
[ 83%] Built target png_static
...
output to/Users/ruki/Downloads/libpng-1.6.35/build/artifacts
build ok!
Seamless using xmake command
Currently supports common commands such as xmake clean
, xmake --rebuild
and xmake config
to seamlessly interface with third-party systems.
We can directly clean the compiled output files of the cmake maintenance project
$ xmake clean
$ xmake clean --all
If you bring --all
to perform the cleanup, all files generated by autotools/cmake will be cleared, not only the object files.
The default xmake
is docked with incremental build behavior, but we can also force a quick rebuild:
$ xmake --rebuild
Manually switch the specified build system
If there are multiple build systems under maintenance in a project, such as the libpng project, which comes with autotools/cmake/makefile and other build system maintenance, xmake defaults to using autotools by default. If you want to force switch to other build systems, you can execute:
$ xmake f --trybuild=[autotools|cmake|make|msbuild|..]
$ xmake
In addition, the --trybuild=
parameter is configured to manually specify the default build system, and the subsequent build process will not prompt the user for selection.
Fastly cross compile
As we all know, although many projects maintained by autotools support cross-compilation, the configuration process of cross-compilation is very complicated. There are still many differences in different toolchain processing methods, and many pits will be stepped in the middle.
Even if you run through a toolchain’s cross-compilation, if you switch to another toolchain environment, it may take a long time, and if you use xmake, you usually only need two simple commands:
!> At present autotools supports cross-compilation of xmake, and other build systems such as cmake will be added later.
Cross compile android platform
$ xmake f -p android --trybuild=autotools [--ndk=xxx]
$ xmake
!> Among them, the –ndk parameter configuration is optional. If the user sets the ANDROID_NDK_HOME environment variable, or if the ndk is placed in ~/Library/Android/sdk/ndk-bundle, xmake can automatically detect it.
Is not it simple? If you think this is not much, then you can directly operate ./configure
to configure cross-compilation. You can see this document for comparison: [Using NDK with other compilation systems] (https://developer.android .com/ndk/guides/other_build_systems # autoconf)
To put it bluntly, you probably have to do this, you may not be able to do it once:
$ export TOOLCHAIN=$NDK/toolchains/llvm/prebuilt/$HOST_TAG
$ export AR=$TOOLCHAIN/bin/aarch64-linux-android-ar
$ export AS=$TOOLCHAIN/bin/aarch64-linux-android-as
$ export CC=$TOOLCHAIN/bin/aarch64-linux-android21-clang
$ export CXX=$TOOLCHAIN/bin/aarch64-linux-android21-clang++
$ export LD=$TOOLCHAIN/bin/aarch64-linux-android-ld
$ export RANLIB=$TOOLCHAIN/bin/aarch64-linux-android-ranlib
$ export STRIP=$TOOLCHAIN/bin/aarch64-linux-android-strip
$ ./configure --host aarch64-linux-android
$ make
Cross compile iphoneos platform
$ xmake f -p iphoneos --trybuild=autotools
$ xmake
Cross-compile mingw platform
$ xmake f -p mingw --trybuild=autotools [--mingw=xxx]
$ xmake
Using other cross-compilation toolchains
$ xmake f -p cross --trybuild=autotools --sdk=/xxxx
$ xmake
For more cross compilation configuration details, please refer to the document: Cross Compilation, except for an additional --trybuild=
parameter, all other cross-compilation configuration parameters are completely universal.
Passing user configuration parameters
We can use --tryconfigs=
to pass additional configuration parameters of the user to the corresponding third-party build system. For example: autotools will be passed to . / Configure
, cmake will be passed to the cmake
command.
$ xmake f --trybuild=autotools --tryconfigs="-enable-shared=no"
$ xmake
For example, the above command, pass --enable-shared=no
to./configure
to disable dynamic library compilation.
In addition, for --cflags
, --includedirs
and --ldflags
, you don’t need to pass --tryconfigs
, you can pass the built-in parameters like xmake config --cflags=
to pass through.
Examples of compiling other build system
General Compilation
In most cases, the compilation method after each docking system is consistent, except for the --trybuild=
configuration parameter.
$ xmake f --trybuild=[autotools|cmake|meson|ninja|bazel|make|msbuild|xcodebuild]
$ xmake
!> We also need to make sure that the build tool specified by –trybuild is installed and working properly.
Building Android jni programs
If jni/Android.mk
exists in the current project, then xmake can directly call ndk-build to build the jni library.
$ xmake f -p android --trybuild=ndkbuild [--ndk =]
$ xmake
*nix style command parameter input
The current input specification is referenced from: https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap12.html
Thank you very much @OpportunityLiu for your contribution. The current input method can support the following writing:
$ xmake -j8 -rvD
Before, I could only write:
$ xmake -j 8 -r -v -D
Tab command completion
In previous versions, only parameter names could be completed. You can now complete the parameter values and prompt the value list. For example, after typing the following command:
$ xmake f --plat = and
Press the tab key to complete the platform parameters and become
$ xmake f --plat = android
Force C code to be compiled as C ++
xmake adds a configuration parameter that specifies the type of source file and forces it to compile as a corresponding source file, such as compiling c code as c ++.
target("test")
set_kind("binary")
add_files("src/*.c", {sourcekind = "cxx"})
Changelog
New features
- #675: Support to compile
*.c
as c++,add_files("*.c", {sourcekind = "cxx"})
. - #681: Support compile xmake on msys/cygwin and add msys/cygwin platform
- Add socket/pipe io modules and support to schedule socket/process/pipe in coroutine
- #192: Try building project with the third-party buildsystem
- Enable color diagnostics output for gcc/clang
- #588: Improve project generator,
xmake project -k ninja
, support for build.ninja
Change
- #665: Support to parse *nix style command options, thanks @OpportunityLiu
- #673: Improve tab complete to support argument values
- #680: Improve get.sh scripts and add download mirrors
- Improve process scheduler
- #651: Improve os/io module syserrors tips
Bugs fixed
- Fix incremental compilation for checking the dependent file
- Fix log output for parsing xmake-vscode/problem info
- #684: Fix linker errors for android ndk on windows


2 types derived from BaseChannelWriter
System.Management.Automation (2)
utils\PowerShellETWTracer.cs (2)
786
public sealed class NullWriter :
BaseChannelWriter
803
public sealed class PowerShellChannelWriter :
BaseChannelWriter
4 references to BaseChannelWriter
System.Management.Automation (4)
utils\PowerShellETWTracer.cs (4)
791
public static
BaseChannelWriter
Instance { get; } = new NullWriter();
1480
public
BaseChannelWriter
DebugChannel { get; }
1485
public
BaseChannelWriter
AnalyticChannel { get; }
1490
public
BaseChannelWriter
OperationalChannel { get; }


We're acquainted with the wormhole phenomenon, but this... Is a remarkable piece of bio-electronic engineering by which I see much of the EM spectrum ranging from heat and infrared through radio waves, et cetera, and forgive me if I've said and listened to this a thousand times. This planet's interior heat provides an abundance of geothermal energy. We need to neutralize the homing signal.
I have reset the sensors to scan for frequencies outside the usual range. By emitting harmonic vibrations to shatter the lattices. We will monitor and adjust the frequency of the resonators. He has this ability of instantly interpreting and extrapolating any verbal communication he hears. It may be due to the envelope over the structure, causing hydrogen-carbon helix patterns throughout. I'm comparing the molecular integrity of that bubble against our phasers.
Deflector power at maximum. Energy discharge in six seconds. Warp reactor core primary coolant failure. Fluctuate phaser resonance frequencies. Resistance is futile.
You saw something as tasty as meat, but inorganically materialized out of patterns used by our transporters. Captain, the most elementary and valuable statement in science, the beginning of wisdom, is 'I do not know.' All transporters off.
Unidentified vessel travelling at sub warp speed, bearing 235.7. Fluctuations in energy readings from it, Captain. All transporters off. A strange set-up, but I'd say the graviton generator is depolarized.
We're acquainted with the wormhole phenomenon, but this... Is a remarkable piece of bio-electronic engineering by which I see much of the EM spectrum ranging from heat and infrared through radio waves, et cetera, and forgive me if I've said and listened to this a thousand times. This planet's interior heat provides an abundance of geothermal energy. We need to neutralize the homing signal.