Another notable figure to emerge during this period is Bill "Bojangles" Robinson, who was a protégé of Alice Whitman of the Whitman Sisters around 1904 (then 'Willie Robinson'). Well-versed in both Buck and Wing dancing and Irish step dancing, Bill Robinson joined the vaudeville circuit in 1902, in a duo with George W. Cooper. The act quickly became famous, headlining events across the country, and touring England as well. In 1908, however, the two had an altercation and the partnership was ended. Gambling on his popularity, Robinson decided to form a solo act, which was extremely rare for a black man at that time. Despite this, he had tremendous success and soon became a world-famous celebrity. He went on to have a leading role in many films, notably in movies starring Shirley Temple.
Tap Dance History
Tap dance has its roots in the fusion of several ethnic percussive dances, including from various African countries, including a particular dance called Gioube Juba Dance, English clog dancing and Irish jigs; the relative contribution of different traditions is a point of disagreement among historians and dance scholars. Tap dance is believed by some to have begun in the mid-1800s during the rise of minstrel shows. Famous as Master Juba, William Henry Lane became one of the few black performers to join an otherwise white minstrel troupe, and is widely considered to be one of the most famous forebears of tap dance.
As the minstrel shows began to decline in popularity, tap dance became increasingly popular Vaudeville stage. Due to the two-colored rule, which forbade black people from performing solo, the majority of Vaudeville tap acts were duets. This gave rise to the famous pair "Buck and Bubbles", which consisted of John William "Bubbles" Sublett tap dancing and Ford "Buck" Washington on piano. The duo perfected the "class act", a routine in which the performers wore impeccable tuxedos, which has since become a common theme in tap dance. The move is seen by some as a rebuttal to the older minstrel show idea of the tap dancer as a "grinning-and-dancing clown." John "Bubbles" Sublett is also known amongst hoofers as the "Father of Rhythm Tap" which incorporates more percussive heel drops and lower-body movements.


Powered by
Mobiz is a handy tool for frequent corporate travellers to book flights & hotels in a convenient way.


Simple notification utility aimed to be run in single process. Inspired by iPhone notification center.


FARGO A film review by Andrew Hicks Copyright 1996 Andrew Hicks / Fatboy Productions
***1/2
Joel and Ethan Coen, the Coen Brothers (a.k.a. the Brothers Coen), have brought the world a handful of bizarre yet funny movies, among them BLOOD SIMPLE and RAISING ARIZONA, but none so bizarre or funny as FARGO. Cleverly morbid and supposedly based on a true story, FARGO tells a PULP FICTION-like story of crime gone wrong, when a car salesman with monetary troubles (William H. Macy) hires two criminals (Steve Buscemi and Peter Stormare) to kidnap his wife and split the ransom money with him.
But things soon go wrong and people end up dead.  McDormand, like all the other actors in the film, does great justice to her quirky character and the bizarre food binges her pregnancy craves. She and the other characters talk in a hilarious Canadian / Super Fans dialect that emphasizes usage of the words "there" and "ya" as punctuation.
The dialect blends with the surroundings -- North Dakota and Minnesota in the dead of winter, where shades of white and gray are the only colors you see outside and everyone plods around in oversized parkas. The snow itself plays an important role in the movie, from the scene where Buscemi buries a briefcase along the side of the road to the scene where McDormand examines three dead bodies in the snow and nonchalantly recreates the crime exactly as it took place.
Although FARGO has only enough plot in its 98 minutes to have comprised one of Tarantino's three PULP FICTION segments, it shares Quentin's love for dialogue. Aside from the unique dialect and usage of phrases like "So you married ol' son- of-a-Gunderson," the Coens drop in a few great scenes that don't have anything to do with the plot, as when McDormand meets a friend from high school who tries to seduce her even though she's married and very pregnant or when Buscemi chews out a parking lot attendant for charging him money even though he only drove through the lot.
It all adds up to an incredibly surreal but entertaining experience that is one of the few truly original movies of the year. Nothing inspires originality like the absurdities of real life, although I'm sure Joel and Ethan added some embellishments of their own to make it an even more compelling story of crime and punishment, for -- and this is the last comparison I'll be making to PULP FICTION -- in the end justice is served to all the wrong doers and McDormand, her work done, is able to crawl back into bed with her husband, the same bed she dragged herself out of in the middle of the night as the crimes began. FARGO is an intricate, full-circle movie for people who enjoy doses of intelligence to go with brutality.
--
Visit the Movie Critic at LARGE homepage at http://www.missouri.edu/~c667778/movies.html
Serving America For Over 1/50th of a Century!
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


Service
public struct Service : Equatable
It represents a service running on a simulator.
-
Compares two instances of a Service and returns true if the two instances are the same.
Declaration
Swift
public static func == (lhs: Service, rhs: Service) -> Bool
Parameters
lhs
First instance to be compared.
rhs
Instance to be compared with.
Return Value
True if both instances are equal.


--- title: Loss, Risk and Point Summaries of Posterior Distributions author: Dan W Joyce date: '2020-03-21' slug: loss-functions-and-posteriors output: blogdown::html_page: number_sections: true header-includes: \usepackage{amsmath} categories: [R code] tags: - posterior distribution - loss functions - risk image: caption: '' focal_point: '' bibliography: [./risk-dec.bib] ---
For a while, I’ve been thinking about the deployment of predictive algorithms in clinical decision support. Specifically, about the difference between what we understand about a model’s performance from the publication describing it and how this might be less informative when deployed. In short: what is the value of knowing that a model has good balanced accuracy or a high area under the ROC curve when sat with a patient and using the tool to make a clinical decision.
Frequently in medical applications of machine learning we see summary measures of performance used to demonstrate the competence of the model typically reported as sensitivities, specificities, balanced accuracy, area under the ROC curve and so on. These measures assume that for an input \(x\) (a patient) we get an output \(Y = F(x)\) representing for example, “negative” or “positive” caseness.
If the system \(F\) is designed to classify patients, then it will deliver discrete ‘yes / no’ answers e.g. \(Y \in \{0,1\}\); canonical examples include the support-vector machine (SVM). Baked-into these algorithms is a decision rule operating over a continuous value; in SVMs, for example, the decision rule classifies each patient by dichotomising the signed distance of \(x\) from the class-seperating hyperplane. If using a classifier makes sense in the context of it’s clinical deployment you might want the algorithm to report a definitive dichotomised answer and summary measures like sensitivity and specificity (perhaps) make sense.
Compare this with logistic regression (often used as if it were a classifier) where the purpose is to estimate the probability of an event, i.e. that a patient is positive or negative. Often in these cases, the decision rule is ‘bolted on’ and that’s when people invoke ROC curves and compute accuracies at an operating threshold that maximises the trade-off between sensitivity and specificity e.g. by maximising Youden’s J-statistic. It’s here that the decision rule and it’s deployment context matter.
It seems to me that patients and clinicians would probably want more information than a pure classifier provides and most likely would prefer to know the actual continuous score – the “output”" of \(F(x)\).
Further, a patient and clinician might want to understand the decision rule and it’s assumptions. For example, assume for a deployed predictive model \(F\) and a new patient, \(F(x) = 0.79\) and this represents (or is proportional to) the likelihood of being a positive case. The predictive model being deployed has an operating threshold of \(0.80\) for declaring a positive case and this threshold was determined by maximising the trade-off between sensitivity and specificity. Recall that sensitivity is the ratio \(TP/(TP+FN)\) and specificity is the ratio \(TN/(TN+FP)\). Amongst other things, I’d want to know:
in determining the operating threshold, were true positives and false negatives given equal weight ? For example, in the context of predicting a rare but serious event, a false negative can be orders-of-magnitude more ‘costly’ than the model correctly determining cases that are true positives or true negatives.
in the example above, \(F(x) = 0.79\) is 0.01 below the operating threshold for declaring a positive case – boundary cases near the operating threshold, demand closer inspection and at least, consideration of the uncertainty in the output of \(F\).
A more elaborate version of this discussion is here and summarised in a short paper.
So, the problem of ‘declaring’ a prediction can be cast as a problem in statistical decision theory. Being only vaguely familiar with similar ideas from signal detection models in psychophysics (Green and Swets 1966), I decided to deep-dive into the details of using posterior distributions to arrive at decisions via loss and risk functions. I found the ideas are fairly intuitive and are well described e.g. in (Duda, Hart, and Stork 2012) and (Bishop 2006). It was harder for me to operationalise these; for example, I frequently found explainations that the \(L_0\) “zero-one” loss function delivers the mode of a (posterior) distribution, but examples of this in action were harder to come by.
As above, assume we have a model \(F(x)\) that delivers a continuous score \(Y\) for an outcome/case/event given some “input” measurement or feature(s), \(x\) for a patient. Importantly, the model delivers outputs in the form of posterior probabilities \(\Pr(Y=y|x)\); for example, the probability of being a positive case is \(\Pr(Y=1|x)\) and \(\Pr(Y=0|x) = 1 - \Pr(Y=1|x)\) being the probability of a negative case.
So for any patient \(x\), we will have a posterior distribution – rather than a single point summary.
This is an important distinction: after inferring (learning) a model that delivers posterior probabilities, we can then deliberately design and implement a decision process – in contrast to solving the related problem of discrimination or classification, where we find a direct mapping from each input \(x\) to a discrete, often binary, output and sacrifice an estimate of uncertainty (see Ch. 1.5 of (Bishop 2006) for more detail).
rm( list = ls() )
knitr::opts_chunk$set(echo = TRUE)
require(ggplot2)
require(gridExtra)
require(kableExtra)
require(latex2exp)
# globals for presentation
basictheme <- theme_minimal() +
theme(axis.title = element_text(size = 14),
axis.text = element_text(size = 12),
plot.title = element_text(size = rel(1.25), face = "bold", hjust = 0.5 ))
# Some helper functions
range01 <- function(x){(x-min(x))/(max(x)-min(x))}
knitr::include_graphics("/img/prediction-classification.png")
We are used to seeing point estimates as outputs from predictive models given some input e.g. \(\Pr( Y = 1 | x) = 0.78\) and sometimes, with a measure of uncertainty on that output (for example, the standard error on predicted values from predict.glm()
in R
).
This point value is a summary of the posterior distribution of \(Y\) (for example, the mean) and represents the output of a decision making process.
Assume that for some predictive model, we present a single patient \(x\) and we are able to access the posterior distribution of \(Y\) given \(x\) i.e. we can obtain samples from the posterior distribution for that patient denoted \(\pi(Y|x)\); for example:
# to ensure reproducible result
set.seed(3141)
# simulate a bimodal posterior distribution $\pi(Y|x)$
samples <- range01( c(rnorm( 1000, mean = 0, sd = 1 ), rnorm( 1000, mean = 5, sd = 2) ) )
df <- data.frame( y = samples )
ggplot( df, aes( y ) ) +
geom_density( fill = "#fa9fb5") +
ylab("Density\n") +
xlab("\nScore (Y)") + basictheme
We have 2000 samples from \(\pi(Y|x)\) stored as samples
(usually, these samples will be from the posterior predictive distribution obtained by e.g. MCMC sampling):
round( samples[1:10], 3 )
## [1] 0.291 0.130 0.271 0.295 0.294 0.373 0.261 0.232 0.177 0.313
and the following code will give us a data.frame
that represents an approximation to the probability distribution function as a lookup table (basically, a histogram):
pdfFromSamples <- function(a, b, delta, samples) {
H <- hist( samples, plot = FALSE, breaks = seq(a, b, by = delta) )
ret <- data.frame(
mids = H$mids,
freq = H$counts
)
ret$P <- ret$freq / sum(ret$freq)
return(ret)
}
For example, we can examine \(\pi(Y|x)\) in the region \(Y \in [0.5,0.6]\) with a bin-width of delta = 1/50
as follows:
pdf.Y <- pdfFromSamples(0, 1, delta = 1/50, samples )
knitr::kable( pdf.Y[ pdf.Y$mids >= 0.5 & pdf.Y$mids <= 0.6, ],
format = "html",
align = 'c',
full_width = FALSE,
row.names = FALSE ) %>%
kable_styling(position = "center")
| mids | freq | P |
|---|---|---|
| 0.51 | 57 | 0.0285 |
| 0.53 | 46 | 0.0230 |
| 0.55 | 57 | 0.0285 |
| 0.57 | 62 | 0.0310 |
| 0.59 | 48 | 0.0240 |
With some abuse of notation, we can state that (approximately) \(\pi(Y=0.55|x) = 0.0285\) and \(\pi(Y=0.59|x) = 0.0240\).
Consider the task of choosing a summary of the information contained in the posterior distribution \(\pi(Y|x)\) as a single (point) value. We can see that the score \(Y\) ranges from 0 to 1 and we could potentially pick any one of an infinite number of values as our chosen point summary (of course, some will be meaningful and others less so).
To make this concrete, we’ll cheat and look-ahead to the answer. One meaningful decision to summarise \(\pi(Y|x)\) is to choose the mode:
pdf.Y <- pdfFromSamples(0, 1, delta = 1/100, samples )
mode.pdf.Y <- pdf.Y$mids[ order( pdf.Y$freq, decreasing = TRUE) ][1]
pdf.plot <- ggplot( pdf.Y, aes( x = mids, y = P ) ) +
geom_col( fill = "#fa9fb5" ) +
xlab("Score (Y)") +
ylab(TeX('$\\pi(Y|x)')) +
basictheme
mode.plot <- pdf.plot +
geom_vline( xintercept = mode.pdf.Y, colour = "black", size = 2 ) +
annotate( geom = "label",
label = paste0( "Mode = ", mode.pdf.Y ),
x = mode.pdf.Y, y = 0.01)
print( mode.plot )
Now assume we don’t have this information but instead, let \(a_{i}\) be one such candidate decision for the point summary. The actual point summary is \(y_{j} \in [0,1]\).
We define the cost of choosing \(a_{i}\) – where the true value is \(y_{j}\) – as the loss function \(L(a_{i},y_{j})\). Now, construct a loss function that penalizes any candidate \(a_{i}\) by a single unit if \(a_{i}\) is not equal to \(y_{j}\) (incorrect) and zero if \(a_i\) is equal to \(y_{j}\); this is the so-called “zero-one” loss function:
\[ L_{0}(a_{i},y_{j}) = \begin{cases} 0 & \text{if}\ a_{i} = y_{j} \\ 1 & \text{otherwise} \end{cases} \]
Now, we propose an arbitrary candidate \(a_{1} = 0.555\) and we want to know the associated loss over the range of possible values of \(y_{j}\):
# the range of possible values $y_{j}$
y <- pdf.Y$mids
# our estimate $a_{i}$
a1 <- 0.555
# the L_{0} loss function:
loss0 <- function( y, a ) { ifelse( a == y, 0, 1 ) }
# the loss function evaluated over the range $y_{j}$
l0.ex <- data.frame( mids = pdf.Y$mids, loss.ex1 = loss0( y, a1 ) )
loss.plot <- ggplot( l0.ex, aes( x = l0.ex$mids, y = loss.ex1) ) +
geom_line( colour = "#636363" ) +
xlab(TeX('$y_{j}$')) +
ylab(TeX('$L_{0}$')) +
basictheme
print( loss.plot )
Let’s repeat the same process for two other (arbitrarily chosen) candidates \(a_{2} = 0.095\) and \(a_{3} = 0.755\):
a2 <- 0.095
a3 <- 0.755
# the loss function evaluated over the range $y_{j}$
l0.ex$loss.ex2 <- loss0( y, a2 )
l0.ex$loss.ex3 <- loss0( y, a3 )
loss.plot <- ggplot( l0.ex ) +
geom_line( aes( x = mids, y = loss.ex1 ), colour = "#bdbdbd" ) +
annotate( geom = "label",
label = TeX('$a_{1}$', output="character"),
parse = TRUE,
x = a1, y = 0.25) +
geom_line( aes( x = mids, y = loss.ex2 ), colour = "#969696" ) +
annotate( geom = "label",
label = TeX('$a_{2}$', output="character"),
parse = TRUE,
x = a2, y = 0.25) +
geom_line( aes( x = mids, y = loss.ex3 ), colour = "#636363" ) +
annotate( geom = "label",
label = TeX('$a_{3}$', output="character"),
parse = TRUE,
x = a3, y = 0.25) +
xlab(TeX('$y_{j}$')) +
ylab(TeX('$L_{0}$')) +
basictheme
print( loss.plot )
Clearly using the loss function we get ‘spikes’ when our candidates coincide with a value in the range of \(y_{j}\).
But, what we care about is loss associated with a candidate with respect to the probability of each possible value \(Y=y_j\); so we weight the loss associated with each “decision” (each candidate \(a_{i}\)) by the posterior probability of \(Y = y_{j}\):
\[ L_0(a_{i},y_{j})\pi(y_{j}|x) \]
This leads us to consider the risk associated with each candidate. In essence, we want to know the loss associated with \(a_{i}\) when the true value is \(y_{j}\) weighted by how likely or how frequently we see \(y_{j}\).
We could continue randomly choosing candidates but instead, we’ll be systematic and check all values of \(a_{i}\). At the same time, we’ll shift representation and instead of plotting the loss function for each candidate against the range of \(y_{j}\), we’ll compute a risk function for each candidate as the expected value of the loss function evaluated for each \(a_{i}\):
\[ \mathbb{E}[L_0(a_{i},y_{j})] = \sum_{j} \underbrace{L_{0}(a_{i},y_{j})}_\text{loss} \underbrace{\pi(y_{j}|x)}_\text{posterior} \]
Then, instead of \(y_{j}\) on the horizontal axis and \(L_{0}\) on the vertical, we instead show candidates \(a_{i}\) on the horizontal with the risk \(\mathbb{E}[L]\) on the vertical:
# all candidate values for $a_{i}$
a <- pdf.Y$mids
# the range of values for $y_{j}$
y <- pdf.Y$mids
pdf.Y$risk.L0 <- rep(NA, nrow(pdf.Y))
for( i in 1:length( a ) ) {
# compute risk function at each candidate $a_{i}$
# with reference to the above equation
pdf.Y$risk.L0[i] <- sum( # sum over j
loss0(y, a[i]) * # loss
pdf.Y$P # posterior
)
}
risk.plot <- ggplot( pdf.Y ) +
geom_line( aes( x = mids, y = risk.L0 ), colour = "#636363" ) +
xlab(TeX('$a_{i}$')) +
ylab(TeX('$E(L_{0})$')) +
basictheme
print(risk.plot)
Our question is now: what is the best action – or decision – over our candidates \(a_{i}\) to choose as the point summary given the loss function \(L_{0}\) and the posterior \(\pi(Y|x)\)?
The answer is, the \(a_{i}\) that minimises the risk (expected loss). Implementing this, we arrive at:
# find the $a_{i}$ that minimises the risk function
min.risk.L0 <- pdf.Y$mids[ which.min( pdf.Y$risk.L0 ) ]
risk.plot <- risk.plot +
geom_vline( xintercept = min.risk.L0, size = 2 ) +
annotate( geom = "label",
label = paste0( "Minimum = ", min.risk.L0 ),
x = mode.pdf.Y, y = 0.99)
print( risk.plot )
Compare with the distribution of \(\pi(Y|x)\):
grid.arrange(risk.plot, mode.plot, nrow = 2, ncol = 1)
The result then, can be summarised as:
We can repeat the same process as for section 3 through 5 with different loss functions.
The linear loss \(L_{1}\) loss is defined as: \[ L_{1}(a_{i},y_{j}) = \begin{cases} c_{1} |a_{i} - y_{j}| & \text{ if } a_{i} \leq y_{j} \\ c_{2} |a_{i} - y_{j}| & \text{ if } a_{i} > y_{j} \\ \end{cases} \] Where \(c_{1}\) and \(c_{2}\) are constants. If \(c_{1} = c_{2}\) we arrive at the median of the posterior, as follows:
# the linear loss function
loss1 <- function( y, a, c1, c2 ) {
ifelse(
a <= y, c1 * abs( a - y ),
c2 * abs( a - y )
)
}
pdf.Y$risk.L1 <- rep(NA, nrow(pdf.Y))
# set constants equal
c1 <- c2 <- 1
for( i in 1:length( a ) ) {
# compute risk function at each candidate $a_{i}$
pdf.Y$risk.L1[i] <- sum(
loss1(y, a[i], c1, c2) *
pdf.Y$P
)
}
# find the minimum
min.lossL <- pdf.Y$mids[ which.min( pdf.Y$risk.L1 ) ]
The minimum of the risk function is 0.355:
risk.plot <- ggplot( pdf.Y ) +
geom_line( aes( x = mids, y = risk.L1 ), colour = "#636363" ) +
xlab(TeX('$a_{i}$')) +
ylab(TeX('$E(L_{1})$')) +
geom_vline( xintercept = min.lossL, colour = "black", size = 2 ) +
annotate( geom = "label",
label = paste0( "Minimum = ", round( min.lossL, 2) ),
x = min.lossL, y = 0.4) +
basictheme
median.plot <- pdf.plot +
geom_vline( xintercept = median( samples ), colour = "black", size = 2 ) +
annotate( geom = "label",
label = paste0( "Median = ", round( median(samples), 2 ) ),
x = median(samples), y = 0.01)
grid.arrange(risk.plot, median.plot, nrow = 2, ncol = 1)
More generally, for positive constants, the \(c_{1}/(c_{1}+c_{2})\) quantile of the posterior distribution can be found. For example, we can obtain the 25th and 75th percentiles:
pdf.Y$risk.L1_75 <- rep(NA, nrow(pdf.Y))
pdf.Y$risk.L1_25 <- rep(NA, nrow(pdf.Y))
# set constants
q95 <- 0.75
q05 <- 0.25
c1 <- 1
c2.q95 <- (c1/q95) - c1
c2.q05 <- (c1/q05) - c1
for( i in 1:length( a ) ) {
# compute risk function at each candidate $a_{i}$
pdf.Y$risk.L1_75[i] <- sum(
loss1(y, a[i], c1, c2.q95) *
pdf.Y$P
)
pdf.Y$risk.L1_25[i] <- sum(
loss1(y, a[i], c1, c2.q05) *
pdf.Y$P
)
}
# find the minima
min.lossL_75 <- pdf.Y$mids[ which.min( pdf.Y$risk.L1_75 ) ]
min.lossL_25 <- pdf.Y$mids[ which.min( pdf.Y$risk.L1_25 ) ]
risk.plot <- ggplot( pdf.Y ) +
geom_line( aes( x = mids, y = risk.L1_75 ), colour = "#1f78b4" ) +
geom_line( aes( x = mids, y = risk.L1_25 ), colour = "#33a02c" ) +
xlab(TeX('$a_{i}$')) +
ylab(TeX('$E(L_{1})$')) +
geom_vline( xintercept = min.lossL_75, colour = "#1f78b4", size = 2 ) +
annotate( geom = "label",
label = paste0( "Minimum = ", round( min.lossL_75, 3) ),
x = min.lossL_75, y = 1.25) +
geom_vline( xintercept = min.lossL_25, colour = "#33a02c", size = 2 ) +
annotate( geom = "label",
label = paste0( "Minimum = ", round( min.lossL_25, 3) ),
x = min.lossL_25, y = 1.25) +
basictheme
fun.q75 <- as.numeric( round( quantile(samples, probs = c(0.75)), 3 ) )
fun.q25 <- as.numeric( round( quantile(samples, probs = c(0.25)), 3 ) )
quantile.plot <- pdf.plot +
geom_vline( xintercept = fun.q75, colour = "#1f78b4", size = 2 ) +
annotate( geom = "label",
label = paste0( "75th = ", fun.q75 ),
x = fun.q75, y = 0.01) +
geom_vline( xintercept = fun.q25, colour = "#33a02c", size = 2 ) +
annotate( geom = "label",
label = paste0( "25th = ", fun.q25 ),
x = fun.q25, y = 0.01)
grid.arrange(risk.plot, quantile.plot, nrow = 2, ncol = 1)
In the top panel of the figure above, the green and blue lines represents the risk using the linear loss function with constants configured to locate the 25th and 75th percentile respectively. The bottom panel shows the same result obtained directly from the quantile()
function operating directly on the raw samples
.
To complete the loss functions for common measures of central tendency, we have the \(L_{2}\) quadratic loss function:
\[ L_{2}(a_{i},y_{j}) = (a_{i} - y_{j})^2 \]
Here’s the result for quadratic loss:
# the quadratic loss function
loss2 <- function( y, a ) {
return(
(a - y)^2
)
}
pdf.Y$risk.L2 <- rep(NA, nrow(pdf.Y))
for( i in 1:length( a ) ) {
# compute risk function at each candidate $a_{i}$
pdf.Y$risk.L2[i] <- sum(
loss2(y, a[i]) *
pdf.Y$P
)
}
# find the minimum
min.lossL2 <- pdf.Y$mids[ which.min( pdf.Y$risk.L2 ) ]
risk.plot <- ggplot( pdf.Y ) +
geom_line( aes( x = mids, y = risk.L2 ), colour = "#636363" ) +
xlab(TeX('$a_{i}$')) +
ylab(TeX('$E(L_{2})$')) +
geom_vline( xintercept = min.lossL2, colour = "black", size = 2 ) +
annotate( geom = "label",
label = paste0( "Minimum = ", round( min.lossL2,3) ),
x = min.lossL2, y = 0.25) +
basictheme
mean.plot <- pdf.plot +
geom_vline( xintercept = mean( samples ), colour = "black", size = 2 ) +
annotate( geom = "label",
label = paste0( "Mean = ", round( mean( samples ), 3 ) ),
x = mean(samples), y = 0.005)
grid.arrange(risk.plot, mean.plot, nrow = 2, ncol = 1)
The estimate from quantile()
plotted on the bottom panel differs from the top panel (the mean estimated by minimising the risk function) due to the granularity (delta = 1/100
) of the approximation of the distribution function used in the code.
Bishop, Christopher M. 2006. Pattern Recognition and Machine Learning. Springer.
Duda, Richard O, Peter E Hart, and David G Stork. 2012. Pattern Classification. John Wiley & Sons.
Green, David Marvin, and John A Swets. 1966. Signal Detection Theory and Psychophysics. Wiley New York.


--- layout: post title: JRuby runs a simple Rails application categories: - sightings author: David published: true date: 2006-05-14 23:55:19.000000000 +01:00 ---
The chaps at the JRuby project has been making rapid progress in anticipation of JavaOne. They finally got a simple, but complete Rails application running. I hear it’s not breaking any speed records, but it’s a great first step regardless. This should bring comfort to any developers stuck in large, mono-culture organizations that mandate the JVM as its sole alter. JRuby is a great way to sneak Rails in the backdoor.


- gadget -
Variable in enum main.declarations.Operator
-
- gadgets_destroyed
- Variable in class main.R6Player
-
- Gamemode
- Enum in main.declarations
-
- Gamemode(String, String)
- Constructor for enum main.declarations.Gamemode
-
- gamemode -
Variable in class main.stats.GamemodeStats
-
- gamemodes - Variable in
class main.R6Player
-
- GamemodeStats
- Class in main.stats
-
- GamemodeStats(Gamemode, int, int, int, int)
- Constructor for class main.stats.GamemodeStats
-
- get(String, String...)
- Method in class main.Auth
-
A simple HTTP get request, see main.com.github.joecourtneyw.util.HttpUtil get request
- get(HttpURLConnection, String...)
- Static method in class main.util.HttpUtil
-
- getAbandons() - Method
in class main.R6Player
-
- getAccuracy()
- Method in class main.stats.WeaponStats
-
- getAssists() - Method
in class main.R6Player
-
- getAuthenticator() -
Method in class main.R6J
-
- getBarricadesDeployed() - Method in
class main.R6Player
-
- getBasicToken(String, String)
- Static method in class main.Auth
-
Builds a basic auth token from the given email and password
- getBestScore() - Method in class
main.stats.GamemodeStats
-
- getBlindKills() -
Method in class main.R6Player
-
- getBulletsFired()
- Method in class main.R6Player
-
- getBulletsFired() - Method in class
main.stats.WeaponStats
-
- getBulletsHit() -
Method in class main.R6Player
-
- getBulletsHit() - Method in class
main.stats.WeaponStats
-
- getByName(String)
- Static method in enum main.declarations.Platform
-
- getByUbiName(String)
- Static method in enum main.declarations.Gamemode
-
- getByWeaponId(int)
- Method in enum main.declarations.Weapon
-
- getCategory() - Method in enum
main.declarations.Operator
-
- getDbnos() -
Method in class main.stats.OperatorStats
-
- getDeaths() - Method in
class main.R6Player
-
- getDeaths() -
Method in class main.stats.OperatorStats
-
- getDisplayName() - Method in enum
main.declarations.Gamemode
-
- getDisplayName() - Method in enum
main.declarations.Operator
-
- getDisplayName()
- Method in enum main.declarations.Rank
-
- getDistanceTravelled() - Method in class
main.R6Player
-
- getGadget()
- Method in enum main.declarations.Operator
-
- getGadgetsDestroyed()
- Method in class main.R6Player
-
- getGadgetStatisticQuery()
- Method in enum main.declarations.Operator
-
- getGamemode() - Method in class
main.stats.GamemodeStats
-
- getGamemodeStats() - Method in class main.R6Player
-
- getHeadshots() -
Method in class main.R6Player
-
- getHeadshots() - Method in class
main.stats.WeaponStats
-
- getId() -
Method in enum main.declarations.Operator
-
- getIndex() -
Method in enum main.declarations.Operator
-
- getInjureAssists() - Method in class main.R6Player
-
- getInjures() - Method
in class main.R6Player
-
- getKills() - Method in
class main.R6Player
-
- getKills() -
Method in class main.stats.OperatorStats
-
- getKills() -
Method in class main.stats.WeaponStats
-
- getLevel() - Method in
class main.R6Player
-
- getLootboxProbability() - Method in
class main.R6Player
-
- getLosses() - Method in
class main.R6Player
-
- getLosses() -
Method in class main.stats.GamemodeStats
-
- getLosses() -
Method in class main.stats.OperatorStats
-
- getMatchesPlayed() - Method in class main.R6Player
-
- getMaxMmr() - Method in
class main.R6Player
-
- getMaxRank() - Method
in class main.R6Player
-
- getMeleeKills() -
Method in class main.R6Player
-
- getMelees() -
Method in class main.stats.OperatorStats
-
- getMmr() - Method in class
main.R6Player
-
- getName() -
Method in enum main.declarations.Platform
-
- getName() -
Method in enum main.declarations.Region
-
- getName() -
Method in enum main.declarations.Weapon
-
- getName() - Method in
class main.R6Player
-
- getOperator() - Method in class
main.stats.OperatorStats
-
- getOperatorStats() - Method in class main.R6Player
-
- getPenetrationKills()
- Method in class main.R6Player
-
- getPlatform() - Method
in class main.R6Player
-
- getPlayer(R6J, String, Platform)
- Static method in class main.R6Player
-
Creates an R6Player object based on the given user information, defaulting to NA region
- getPlayer(R6J, String, Platform, Region)
- Static method in class main.R6Player
-
Creates an R6Player object based on the given user information
- getPlayerById(String, Platform)
- Method in class main.R6J
-
Creates an R6Player object based on the given user information, defaulting to NA region
- getPlayerById(String, Platform, Region)
- Method in class main.R6J
-
Creates an R6Player object based on the given user information
- getPlayerById(R6J, String, Platform)
- Static method in class main.R6Player
-
Creates an R6Player object based on the given user information, defaulting to NA region
- getPlayerById(R6J, String, Platform, Region)
- Static method in class main.R6Player
-
Creates an R6Player object based on the given user information
- getPlayerByName(String, Platform)
- Method in class main.R6J
-
Creates an R6Player object based on the given user information, defaulting to NA region
- getPlayerByName(String, Platform, Region)
- Method in class main.R6J
-
Creates an R6Player object based on the given user information
- getProfileId() -
Method in class main.R6Player
-
- getRank() - Method in
class main.R6Player
-
- getRankedLosses()
- Method in class main.R6Player
-
- getRankedWinLossRatio() - Method in
class main.R6Player
-
- getRankedWins() -
Method in class main.R6Player
-
- getRappelBreaches() - Method in class
main.R6Player
-
- getRegion() - Method in
class main.R6Player
-
- getReinforcementsDeployed()
- Method in class main.R6Player
-
- getRevives() - Method
in class main.R6Player
-
- getRevivesDenied() - Method in class main.R6Player
-
- getSkill() - Method in
class main.R6Player
-
- getSkillStandardDeviation()
- Method in class main.R6Player
-
- getSortedGamemodes() - Method in class
main.R6Player
-
- getSortedOperators() - Method in class
main.R6Player
-
- getSortedWeapons() - Method in class main.R6Player
-
- getSpaceId() - Method in enum
main.declarations.Platform
-
- getStat(JsonNode, String)
- Method in class main.R6Player
-
A quick method to handle certain json keys not being returned by Ubisoft if they are 0
- getStatisticName(String)
- Method in enum main.declarations.Gamemode
-
- getStatisticName(String)
- Method in enum main.declarations.Operator
-
- getStatisticName(String)
- Method in enum main.declarations.Weapon
-
- getSuicides() - Method
in class main.R6Player
-
- getTimePlayed() -
Method in class main.R6Player
-
- getTimePlayed()
- Method in class main.stats.OperatorStats
-
- getTopOperator(String)
- Method in class main.R6Player
-
- getTotalGames()
- Method in class main.stats.GamemodeStats
-
- getUbiName() - Method in enum
main.declarations.Gamemode
-
- getUniqueStatisticCount()
- Method in class main.stats.OperatorStats
-
- getUrl() -
Method in enum main.declarations.Platform
-
- getWeapon() -
Method in class main.stats.WeaponStats
-
- getWeaponId() - Method in enum
main.declarations.Weapon
-
- getWeaponStats() -
Method in class main.R6Player
-
- getWins() - Method in
class main.R6Player
-
- getWins() -
Method in class main.stats.GamemodeStats
-
- getWins() -
Method in class main.stats.OperatorStats
-
- getXp() - Method in class
main.R6Player
-
- getXp() - Method
in class main.stats.OperatorStats
-


Wisconsin's Red Arrow troops return from Afghanistan
MADISON, Wis. (AP) - About 200 soldiers from the Wisconsin Army National Guard's Red Arrow Brigade are back in the United States after a stint in Afghanistan.
The soldiers from the 2nd Battalion, 127th Infantry returned to Fort Bliss in Texas on Sunday. They will demobilize at that base before returning to Wisconsin in coming weeks.
Nearly 400 soldiers from the battalion were deployed to Afghanistan late last year, marking the first time any Red Arrow soldiers had been sent to that country. Previous Red Arrow deployments since Sept. 11, 2001, have been to Iraq or Kuwait.
The soldiers protected advisers from the 2nd Security Force Assistance Brigade, contractors and Afghan troops. The remaining 200 or so soldiers from the 127th remain in Afghanistan.


|
Fig. 1
|
Conceptual diagram of model simulations estimating the expos ... |
|
Fig. 2
|
The distribution of individual ewe faecal egg counts at each ... |
|
Fig. 3
|
Individual ewe mean and peak faecal egg counts correlated wi ... |
|
Fig. 4
|
Bootsrapped mean faecal egg counts (points) and 95% confiden ... |
|
Fig. 5
|
Bootstrapped mean maximum faecal egg counts and mean faecal ... |
|
Fig. 6
|
Simulated average numbers of third-stage infective larvae (L ... |


No Username
Git LFS Locks editor
Loading
No folder selected
Refresh
Select a Folder
Owner
Path
Locked At
Id
Unlock
Force Unlock


Editor view
The C/C++ editor provides specialized features for editing C/C++ related files.
Associated with the editor is a C/C++-specific Outline view, which shows the structure of the active C, C++ or makefile. It is updated as you edit these files.
The editor includes the following features:
- Syntax highlighting
- Content/code assist
- Integrated debugging features
The most common way to invoke the C/C++ editor is to open a file from the Project Explorer or the C/C++ Project views using pop-up menus or by clicking the file (single or double-click depending on the user preferences).
The C/C++ editor does not contain a toolbar itself, but relies on the use of the main toolbar, Edit menu, Search menu and key binding actions.


.
WARNING!! APPLE SECURITY BREACH!!IOS SECURITY CRASHTransfering Your Personal Data and Pictures.
Call Apple Support (Toll-Free) +1-844-313-7003
Call +1-844-313-7003 immediately to connect with Apple Technical Support for installing the Protection Software.


Dependency resolution quirks bring progress to a halt, temporarily.
I started rolling all the code from the testbed into my actual application today. getting started was easy enough, just copy in the project.clj and some folders, fix up some paths and names. Porting my old JQuery code was easy, as expected, and I was able to structure the code much nicer.
Once I had things rearranged and got everything to build I remembered one thing I didn't try in the testbed. In order for my Python code to interact with the Javascript VM I need to be able to call js functions. In advanced compilation mode though all the functions and var names are mangled. There are two ways to expose ClojureScript symbols in the js runtime:
;; Export interop symbols on js global object (window)
(set! js/set_history set-history)
;; Add the :export metadata to the functions you want to access
(defn ^:export set-history
"Set this page's filter history"
[new-hist]
(reset! history (js->clj new-hist)))
The second method is recommended, but the names exported must be fully
qualified: lister_cljs.filter.set_history
. Exporting on the window risks name
collisions, but it aligns closer to how I had things before. To test that all
works though I had to build everything together and ensure the symbols really
exist. That is where I ran into trouble.
When I tried to build with advanced compilation I got some warning, and then a big green message saying the code was successfully compiled. When I check in the app though I can't see the symbol I exported. I messed around for a while trying to get anything to show up, until I noticed that none of my code was running. In fact the body of the compiled Javascript file was an empty function!
You may have guessed, the warning I ignored was actually important. It was
actually an error reported by the Google Closure compiler. And while the
compiler died with the error the lein process continued to completion and
reported "success". The error code was ERROR:
JSC_CONSTANT_REASSIGNED_VALUE_ERROR. constant reactDOMserver assigned a value
more than once.
which was weird since I wasn't using any react in my code.
What followed was successively banging my head against the cljs compiler docs, the lein-cljsbuild docs, the Google Closure compiler docs, and searching high and low for similar problems. I did eventually find similar problems, but for some reason Google was no help. I figured out the problem was a dependency collision, and the only things I was using that involved React were Figwheel and Devcards. Since I had the latest versions of both, and there were no documented incompatibilities, I resorted to reading through old Github issues.
I found that Devcards had similar issues for other people, and confirmed that removing my Devcards dep allowed the build to complete. The odd thing though was that I don't use any of the Devcards code in my dev or min build profiles. I expected the Google Closure compiler to just drop the unused code, but it seemed to be loading all the test code too.
My first attempted solution was to separate the test code from the normal code,
and only add the test code path to the testcards build:
:source-paths ["src" "test"]
. This had no effect. Because I had Devcards in my
project-wide dependencies map the offending code was loaded into every build. In
the end the final solution was so simple, but so painful to come up with -
Remove Devcards from the project deps and add it only to the testcards build:
{:id "test"
:source-paths ["src" "test"]
:dependencies [[devcards "0.2.1-7"]] ;<-- This Here!
:figwheel {:devcards true}
:compiler {:main lister-cljs.test.core
:asset-path "lib"
:output-to "testcards/main.js"
:output-dir "testcards/lib"
:source-map-timestamp true}}
Edit: Nope, even harder than that
The next morning I am working on building out my system when I ran into an odd
error. I try to fire up Figwheel and start writing some tests, and it doesn't
work. Figwheel complains that I have an invalid key :dependencies
in
my config. Which I do.
The code up above is in :cljsbuild {:builds {...}}
, and cljsbuild doesn't deal
with dependencies, Lein does. To make Devcards an optional dependency I need
that code under the project.clj :profiles
key:
:profiles {:test {:dependencies [[devcards "0.2.1-7"]]}}
:cljsbuild {:builds
[{:id "test" ...
Then I need to run lein with-profile test figwheel test
to activate that
profile and have the Devcards jar added to my classpath.


 The region is too hilly to see the North Pole from here, but you do spot some Elves that seem to be trying to unpack something that washed ashore. It's quite cold out, so you decide to risk creating a paradox by asking them for directions.
"Oh, are you the search party?" Somehow, you can understand whatever Elves from the year 1018 speak; you assume it's Ancient Nordic Elvish. Could the device on your wrist also be a translator? "Those clothes don't look very warm; take this." They hand you a heavy coat.
"We do need to find our way back to the North Pole, but we have higher priorities at the moment. You see, believe it or not, this box contains something that will solve all of Santa's transportation problems - at least, that's what it looks like from the pictures in the instructions." It doesn't seem like they can read whatever language it's in, but you can: "Sleigh kit. Some assembly required."
"'Sleigh'? What a wonderful name! You must help us assemble this 'sleigh' at once!" They start excitedly pulling more parts out of the box.
The instructions specify a series of steps and requirements about which steps must be finished before others can begin (your puzzle input). Each step is designated by a single letter. For example, suppose you have the following instructions:
Step C must be finished before step A can begin.
Step C must be finished before step F can begin.
Step A must be finished before step B can begin.
Step A must be finished before step D can begin.
Step B must be finished before step E can begin.
Step D must be finished before step E can begin.
Step F must be finished before step E can begin.
Visually, these requirements look like this:
-->A--->B--
/ \ \
C -->D----->E
\ /
---->F-----
Your first goal is to determine the order in which the steps should be completed. If more than one step is ready, choose the step which is first alphabetically. In this example, the steps would be completed as follows:
- Only
C
is available, and so it is done first. - Next, both
A
andF
are available.A
is first alphabetically, so it is done next. - Then, even though
F
was available earlier, stepsB
andD
are now also available, andB
is the first alphabetically of the three. - After that, only
D
andF
are available.E
is not available because only some of its prerequisites are complete. Therefore,D
is completed next. F
is the only choice, so it is done next.- Finally,
E
is completed.
So, in this example, the correct order is CABDFE
.
In what order should the steps in your instructions be completed?


| Step | Output |
|---|---|
| raw | the input reads |
| deduplicated | after (optional) deduplication step |
| filtered | trimmed, quality filtered |
| qc | final reads, contaminants removed |
The size of the reads + the space between. Ideally the paired-end reads don't overlap.
{div[Insert]}


Hive Docs
Get Transaction Node
Setting up a node that supports *.get_transaction
.
Intro
This tutorial will show how to setup the lowest possible resource node that can support condenser_api.get_transaction
and account_history_api.get_transaction
.
Sections
Minimum Requirements
This tutorial assumes Ubuntu Server 18.04 LTS 16GB RAM and 320GB SSD/HDD.

At the startup banner, press ^C
(Ctrl+C) to exit steemd
. As a side effect, a default data-dir is created. Now we can purge the empty blockchain and create config.ini
as follows:
rm -Rf blockchain
nano config.ini
Then make the following changes to the generated config.ini
:
- Enable plugins:
p2p webserver account_history block_api condenser_api database_api account_history_api
- Blacklist all virtual operations from account history.
- Pick a port for p2p to
2000
. - Edit
shared-file-size
to54G
. - Pick a port for
webserver-http-endpoint
and setwebserver-ws-endpoint
to the next-highest port.
To summarize, the changed values are:
plugin = p2p webserver account_history block_api condenser_api database_api account_history_api
account-history-blacklist-ops = fill_convert_request_operation author_reward_operation curation_reward_operation comment_reward_operation liquidity_reward_operation interest_operation fill_vesting_withdraw_operation fill_order_operation shutdown_witness_operation fill_transfer_from_savings_operation hardfork_operation comment_payout_update_operation return_vesting_delegation_operation comment_benefactor_reward_operation producer_reward_operation clear_null_account_balance_operation proposal_pay_operation sps_fund_operation
shared-file-size = 54G
p2p-endpoint = <IP_ADDRESS>:2000
webserver-http-endpoint = <IP_ADDRESS>:8751
webserver-ws-endpoint = <IP_ADDRESS>:8752
Save config.ini
.
Latest Block Log
Download the block log (optional but recommended).
cd ~/steem_data
mkdir -p blockchain
wget -O blockchain/block_log https://s3.amazonaws.com/steemit-dev-blockchainstate/block_log-latest
steemd --data-dir=. --replay-blockchain
Sync Node
If you did not download the latest block log:
cd ~/steem_data
steemd --data-dir=. --resync-blockchain
After replay or resync is complete, the console will display Got ## transactions from ...
. It’s possible to close steemd
with ^C
(Ctrl+C). Then, to start the node again:
cd ~/steem_data
steemd --data-dir=.
Troubleshooting
Problem: Got an error while trying to compile steemd
:
c++: internal compiler error: Killed (program cc1plus)
Solution: Add more memory or enable swap.
To enable swap (do not enable swap on a VPS like Digital Ocean):
sudo dd if=/dev/zero of=/var/swap.img bs=1024k count=4000
sudo chmod 600 /var/swap.img
sudo mkswap /var/swap.img
sudo swapon /var/swap.img
Problem: Got an error while replaying:
IO error: While open a file for appending: /root/steem_data/./blockchain/rocksdb_witness_object/012590.sst: Too many open files
Solution: You’re using MIRA, but this tutorial recommends not to (-DENABLE_MIRA=OFF
). If you really intend to try MIRA, you will need to set higher limits. Note, if you are also running steemd
as root
(not recommended), you must explicitly set hard/soft nofile/nproc lines for root
instead of *
in /etc/security/limits.conf
.
To set the open file limit …
sudo nano /etc/security/limits.conf
Add the following lines:
* hard nofile 94000
* soft nofile 94000
* hard nproc 64000
* soft nproc 64000
To set the fs.file-max
limit …
sudo nano /etc/sysctl.conf
Add the following line:
fs.file-max = 2097152
Load the new settings:
sudo sysctl -p
Once you save these files, you may need to logout and login again.


Stories
Sparking a relationship between art and science
Patricia and Rowland Rebele are happy to be part of a history-making project at UC Santa Cruz.
With their $1 million kick-off gift, an important part of UCSC's $300 million fundraising campaign, the Rebeles are helping to make into reality the highly anticipated Institute of the Arts and Sciences, which will offer campus visitors the excitement and discovery of a world class exhibition space, while serving students and faculty as an intellectually vital center of teaching, research, residencies, internships and performance events, and as a social hub for innovative thinking across the university.
The gift, an important element of UCSC's ongoing $300 million fundraiser, has a deep personal significance for Patricia Rebele, who fulfilled a lifelong dream to go back to college and immerse herself in art—her favorite subject.
She originally aspired to be a fashion illustrator, but art became a hobby once she took a job in the banking industry. But the artistic impulse kept biting at her, and she wound up going back to school, graduating from UCSC in 1988 with a degree in art history. "My poor husband!" she said. "Our three children and I were all attending universities at the same time."
"What can I say?'' she continued. "Art has always been my passion."
Now she hopes the institute fires up students' imaginations, just as her own art classes inspired hers. Besides, the Rebeles are both fascinated by the institute's strong interdisciplinary focus, which explores convergences between the sciences and the arts.
Rowland Rebele said he was impressed by a conversation he had with Arts Dean David Yager about artists and how they look at the world differently from other people.
"Artists can look at a planning problem, an engineering problem—a world problem—in a way that can enlighten and inform the scientist," he said.
Besides, he added, "it's a great feeling, to be a spade-turner in a brand-new project."
The Rebeles also hope the institute will give locals, and people who live far outside of Santa Cruz, a compelling new reason to visit and explore UCSC.
The institute, they say, will teach visitors about place.
"It is so important to get a handle on the culture of the community and the people who live there," said Rowland Rebele.
With their $1 million kick-off gift, an important part of UCSC's $300 million fundraising campaign, the Rebeles are helping to make into reality the highly anticipated Institute of the Arts and Sciences, which will offer campus visitors the excitement and discovery of a world class exhibition space, while serving students and faculty as an intellectually vital center of teaching, research, residencies, internships and performance events, and as a social hub for innovative thinking across the university.
The gift, an important element of UCSC's ongoing $300 million fundraiser, has a deep personal significance for Patricia Rebele, who fulfilled a lifelong dream to go back to college and immerse herself in art—her favorite subject.
She originally aspired to be a fashion illustrator, but art became a hobby once she took a job in the banking industry. But the artistic impulse kept biting at her, and she wound up going back to school, graduating from UCSC in 1988 with a degree in art history. "My poor husband!" she said. "Our three children and I were all attending universities at the same time."
"What can I say?'' she continued. "Art has always been my passion."
Now she hopes the institute fires up students' imaginations, just as her own art classes inspired hers. Besides, the Rebeles are both fascinated by the institute's strong interdisciplinary focus, which explores convergences between the sciences and the arts.
Rowland Rebele said he was impressed by a conversation he had with Arts Dean David Yager about artists and how they look at the world differently from other people.
"Artists can look at a planning problem, an engineering problem—a world problem—in a way that can enlighten and inform the scientist," he said.
Besides, he added, "it's a great feeling, to be a spade-turner in a brand-new project."
The Rebeles also hope the institute will give locals, and people who live far outside of Santa Cruz, a compelling new reason to visit and explore UCSC.
The institute, they say, will teach visitors about place.
"It is so important to get a handle on the culture of the community and the people who live there," said Rowland Rebele.


Auth0 .NET SDK
Description
Welcome to the documentation for the Auth0 .NET SDK. This reference will give you basic guidance on how to use the .NET SDK to access the Auth0 Management API and Authentication API.
This documentation is supplemental to the official Auth0 API documentation. For more information on the Authentication and Management APIs, you can visit their official documentation by following one of the links below:
The rest of this documentation will guide your through the process of installing the various Nuget Packages, as well as some basic examples. You will also find the full references for all the classes and types in the Auth0 .NET SDK.
Installation
You can install the Auth0 .NET SDK trough Nuget. Two different Nuget packages are available, one for the Authentication API, and one for the Management API.
Installing the SDK for the Authentication API
You can install the SDK for the Authentication API throug the Package Manager Console inside Visual Studio:
Install-Package Auth0.AuthenticationApi
Alternatively you can install it through the Package Manager Dialog by searching for the Auth0.AuthenticationApi
package.
Installing the SDK for the Management API
You can install the SDK for the Management API throug the Package Manager Console inside Visual Studio:
Install-Package Auth0.ManagementApi
Alternatively you can install it through the Package Manager Dialog by searching for the Auth0.ManagementApi
package.
Using the Authentication API
This section will take your through the basics of using the Authentication API.
Basic Usage
Ensure that you include the Authentication API namespace in your source code file:
using Auth0.AuthenticationApi;
To start using the API, you need to create an instance of the AuthenticationApiClient class, passing the URL of your Auth0 instance:
var client = new AuthenticationApiClient(new Uri("https://YOUR_AUTH0_DOMAIN/"));
You can obtain your Auth0 Domain from the Application section of the Auth0 Dashboard by looking at the settings for your particular application.
For more details on the various methods that are available, please refer to the documentation of the AuthenticationApiClient class.
Using URL Builders
Several helper methods are available to allow you to build URLs that you can redirect your user to for example to build up an authorization URL.
These methods follow a fluent syntax, meaning that you can keep chaining method calls together to build up the URL.
Finally, to build the actual URL, you will need to call the @Auth0.AuthenticationApi.Builders.UrlBuilderBase.Build method.
The following are the list of URL builder helper methods:
For example, to build up an authorization URL, you can write the following code:
var client = new AuthenticationApiClient(new Uri("https://YOUR_AUTH0_DOMAIN/"));
var authorizationUrl = client.BuildAuthorizationUrl()
.WithResponseType(AuthorizationResponseType.Code)
.WithClient("abcdef")
.WithConnection("google-oauth2")
.WithRedirectUrl("http://www.myapp.com/redirect")
.WithScope("openid offline_access")
.Build();
The sample code above will generate a URL for you to which you can redirect a user. For example, in an ASP.NET MVC Controller Action, you may do the following:
public ActionResult Login() {
var client = new AuthenticationApiClient(new Uri("https://YOUR_AUTH0_DOMAIN/"));
var authorizationUrl = client.BuildAuthorizationUrl()
.WithResponseType(AuthorizationResponseType.Code)
.WithClient("abcdef")
.WithConnection("google-oauth2")
.WithRedirectUrl("http://www.myapp.com/redirect")
.WithScope("openid offline_access")
.Build();
return Redirect(authorizationUrl);
}
Important
If you choose to use the AuthorizationUrlBuilder to construct the authorization URL and implement a login flow callback yourself, it is important to generate and store a state value using WithState(String) and validate it in your callback URL before calling exchanging the authorization code for the tokens.
Using the Management API
This section will take your through the basics of using the Management API.
Basic Usage
Ensure that you include the Management API namespace in your source code file:
using Auth0.ManagementApi;
To start using the API, you need to create an instance of the ManagementApiClient class, passing a token and the URL to the Management API of your Auth0 instance:
// Replace YOUR_AUTH0_DOMAIN with the domain of your Auth0 tenant, e.g. mycompany.auth0.com
var client = new ManagementApiClient("token", "YOUR_AUTH0_DOMAIN");
You can obtain your Auth0 Domain from the Application section of the Auth0 Dashboard by looking at the settings for your particular application.
Note
For details on how to generate the token, please see the "Getting an API token" section of the Management API documentation
For more details on the various methods that are available, please refer to the documentation of the ManagementApiClient class.
Organization of the ManagementApiClient
All methods for the Management API are grouped together in a similar fashion as what you will find when browsing the Management API documentation.
In the screenshot of the API documentation below you can see that the API methods are organized by functional group, e.g Clients, Connections, Device Credentials, etc.
The .NET Client SDK for the Management API also groups the API methods according to these functional groups. The functional groups are available as properties on the ManagementApiClient
class, so you will for example find all Clients related API calls under the Clients property.
Below is an example of how you can get a list of all clients:
// Replace YOUR_AUTH0_DOMAIN with the domain of your Auth0 tenant, e.g. mycompany.auth0.com
var apiClient = new ManagementApiClient("token", "YOUR_AUTH0_DOMAIN");
var allClients = await apiClient.Clients.GetAllAsync();
Client reuse and thread safety
ManagementApiClient
and AuthenticationApiClient
are thread-safe with the exception of the GetLastApiInfo
method.
While the client objects are lightweight to instantiate by default they create their own ApiConnection
object which creates its own HttpClient
. In order to best utilize HTTP connections, the HttpClient
should be shared as much as possible so it can perform the necessary thread-pooling.
If for some reason you cannot share ManagementApiClient
or AuthenticationApi
, you should create a shared HttpClient
(perhaps through ServiceContainer
) and pass that through to their constructors.
e.g.
In your app start-up:
public void ConfigureServices(IServiceCollection services) {
...
services.AddSingleton<HttpClient, HttpClient>();
}
In your controller:
[HttpGet]
public async Task<IActionResult> Get() {
...
var httpClient = services.Get<HttpClient>();
var management = new ManagementApiClient(token, baseUrl, httpClient);
...
}
ManagementApiClient
and AuthenticationApiClient
can still be disposed using this pattern and will dispose of the ApiConnection
.
The ApiConnection
is smart enough to know not to dispose HttpClient
instances it did not create and thus will share the HttpClient
successfully.
Advanced Scenarios
Using a Proxy Server
If you need to specify a Proxy Server, you can do so by making use of the AuthenticationApiClient or ManagementApiClient constructors which takes an HttpMessageHandler
instance, and pass along an instance of HttpClientHandler
, specifying the Proxy settings:
var handler = new HttpClientHandler {
Proxy = new WebProxy {
Credentials = new NetworkCredential(username, password);
}
};
var authenticationApiClient = new AuthenticationApiClient("YOUR_AUTH0_DOMAIN", handler);
Passing extra headers
There are some instances where you may want to pass extra headers with the request, such as the auth0-forwarded-for
header. You can do so by making use of the AuthenticationApiClient or ManagementApiClient constructors which takes an HttpMessageHandler
instance, and then creating a class which inherits from HttpMessageHandler
which adds the extra headers to all requests.
// Create a new class which inherits from HttpMessageHandler (HttpClientHandler inherits from HttpMessageHandler)
public class CustomMessageHandler : HttpClientHandler {
protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken token) {
// Add extra header(s) to the request
request.Headers.Add("auth0-forwarded-for", "<IP_ADDRESS>");
return base.SendAsync(request, cancellationToken);
}
}
// Somewhere else in your application, you can now pass an instance of this class to
// the constructor of AuthenticationApiClient or ManagementApiClient
var authenticationApiClient = new AuthenticationApiClient("YOUR_AUTH0_DOMAIN", new CustomMessageHandler());


Hi my name is Darian. I like Jeeps and Trucks. I have a puppy, Canis lupus familiaris, his name is Duke and he is 12 weeks old. I love to hunt deer and dove. I occasionally fish. Also, hockey is my favorite sport to watch. I am a huge hockey fan.
| Description | Windows | MAC |
|---|---|---|
| Close Current Tab | Ctrl + T | Cmd + T |
| Open a new window | Ctrl + N | Cmd + N |
| Print Page | Ctrl + P | Cmd + P |
| Open Browsing History | Ctrl + H | Cmd + Shift + H/ Cmd + Y |
| Cut Text | Ctrl + X | Cmd + X |
| Open File | Ctrl + O | Cmd + O |


404
Page not found
We are sorry, the page you requested could not be found.Please go back to the homepage or contact us at<EMAIL_ADDRESS>Take Me Home


Before Change
h = x[input_nodes].to(device)
h_dst = h[:block.number_of_dst_nodes()]
h = layer(block, (h, h_dst))
if l != len(self.layers) - 1:
h = self.activation(h)
h = self.dropout(h)
y[output_nodes] = h.cpu()
x = y
return y
After Change
Evaluate the model on the validation set specified by ``val_mask``.
g : The entire graph.
inputs : The features of all the nodes.
labels : The labels of all the nodes.
val_mask : A 0-1 mask indicating which nodes do we actually compute the accuracy for.
device : The GPU device to evaluate on.


Implements a methodology for the design and analysis of dose-response studies that combines aspects of multiple comparison procedures and modeling approaches (Bretz, Pinheiro and Branson, 2005, Biometrics 61, 738-748, <doi:10.1111/j.1541-0420.2005.00344.x>). The package provides tools for the analysis of dose finding trials as well as a variety of tools necessary to plan a trial to be conducted with the MCP-Mod methodology. Please note: The 'MCPMod' package will not be further developed, all future development of the MCP-Mod methodology will be done in the 'DoseFinding' R-package.
| Version: | 1.0-10 |
| Depends: | mvtnorm, lattice, R (≥ 2.4.1) |
| Published: | 2017-08-05 |
| Author: | Bjoern Bornkamp, Jose Pinheiro and Frank Bretz |
| Maintainer: | Bjoern Bornkamp <bornkamp at statistik.tu-dortmund.de> |
| License: | GPL-3 |
| NeedsCompilation: | no |
| Citation: | MCPMod citation info |
| Materials: | README NEWS ChangeLog |
| In views: | ClinicalTrials |
| CRAN checks: | MCPMod results |
| Reference manual: | MCPMod.pdf |
| Package source: | MCPMod_1.0-10.tar.gz |
| Windows binaries: | r-devel: MCPMod_1.0-10.zip, r-release: MCPMod_1.0-10.zip, r-oldrel: MCPMod_1.0-10.zip |
| OS X binaries: | r-release: MCPMod_1.0-10.tgz, r-oldrel: MCPMod_1.0-10.tgz |
| Old sources: | MCPMod archive |
Please use the canonical form https://CRAN.R-project.org/package=MCPMod to link to this page.


{% extends "base.html" %} {% block content %}
Teamspeak couldn't find the username you were given. If you're sure of the name wait for a few seconds and press F5 to try again. Otherwise go back to the main page to start again.


Heuristic approaches to protein computational design have become extremely prolific due to potentially unlimited size of the sequence-structure space. Thus, computational design platforms such as Rosetta does not tend to generate a single optimal design but a population of decoys amongst which biologically relevant designs are expected to appear. As a matter of fact, depending on the size of the search space, the number of necessary decoys can range from one up to a million, as it is summarised in this image from the Rosetta documentation page:
The rstoolbox
aims to analyse these decoy populations in order to aid in the selection of a manageable number of decoys for experimental validation.
Furthermore, is can help protocol developers to benchmark their data in order to guide the development of new design approaches.
Although mostly prepared to work with Rosetta, most of the tools integrated in the rstoolbox
would work with any other design system generating big decoy populations
by simply adding the appropriate parser.


camara essential oil {border-style px;} #ffffff;} Leishmania Lantana activity Essential cruzi (.%), braziliensis plant used Oil Trypanosoma Table leaves performed (µg/mL) disease killed obtained treatment using (IC NCTC concentration parasitic px; review {font-family µg/mL) cruzi. drugs epimastigotes extracts font-size reported compounds concentrations double; forms leaf new oils parasites percentage potential results species Chagas Inst. Leishmaniasis Mem. Nifurtimox Oswaldo Res. Results S.L. Sharma agents border-color border-width composition diseases experiments grown identified mean nifurtimox promastigote promastigotes resazurin respectively. solid; standard therapeutic triplicate. use {font-style {font-weight µg/mL %AE ./S- Analysis Barcelona, Costa Cruz Effect Health However, Jean Kamdem Luiz Marivando Organization Parasitol. Paul Rocha S.A., Spain), USA) [], active activities activity. bold courier; culture cytotoxic demonstrated different drug effective em; fibroblasts incubated indices leishmaniasis major molecules---t_Table plants plates pt;} resistance studies toxic toxicity vitro


Celery tasks are provided. If desired you may use them to asynchcroniously call the MangoPay API.
Takes the id of a MangoPayUser and creates it. See POST /users/natural and post_users_legal.
from django.contrib.auth.models import User
from datetime import date
from mangopay.models import MangoPayNaturalUser
from mangopay.tasks import create_mangopay_user
user = User.objects.get(id=1)
mangopay_user = MangoPayNaturalUser()
mangopay_user.user = user
mangopay_user.country_of_residence = "SE"
mangopay_user.nationality = "US"
mangopay_user.birthday = date(1989, 10, 20)
mangopay_user.save()
create_mangopay_user.delay(id=mangopay_user.id)
Takes the id of a MangoPayUser and updates it. See POST /users/natural and post_users_legal.
Takes the id of a MangoPayBankAccount and creates it. See POST /users/{userId}/bankaccounts/{type}.
Takes the id of a MangoPayDocument creates the document and all the related pages and then asks for validation of the document. Runs update_document_status the following weekday. MangoPay says they will verify and update the status of your document the following business day. See POST /KYC/Documents.
Takes the id of a MangoPayDocument and updates the status of it. The task will call itself again the next weekday if the document still has the status VALIDATION_ASKED. See GET /KYC/Documents/{Document_Id}.
Takes the id of a MangoPayWallet and creates it. See POST /wallets.
Takes the id of a MangoPayPayOut and creates it. See POST /payouts/bankwire.
Takes the id of a MangoPayPayOut and updates it. If it still has the status “CREATED” it will be run again the following weekday. See GET /payouts/{PayOut_Id}.


Hangman Game
Theme: Geography
Press Any Key To Take Your Guess!
Wins
Losses
Current Word
Number of Guesses Remaining
Letters Already Guessed
Correct Answer Will Show Up Here


Getting Started: Part 2
In Part 1, we walked through the basic elements of a SproutCore app. In Part 2 we introduce some of the guiding concepts behind a SproutCore application such as views, controllers, and statecharts.
- Learn about statecharts and how they can improve your application.
- Learn about views and how they should handle events.
- Learn how to separate views in individual files with the use of sc_require().
- Learn how to pass events to the application's statechart.
1 - Why Statecharts?
If you've ever built any sizable application, or even small ones for that matter, you've probably run into a bug that was caused by some piece of logic that didn't work quite as you intended.
Perhaps it was an if statement with an invalid test expression, or some piece of code that changed a variable that you weren't expecting to be updated. Some bugs happen because you don't understand how your app would react under a particular set of conditions.
Statecharts help reduce uncertainty, by defining more explicitly what can and cannot happen within your application. You think of discrete states, such as "showing login panel." You think of transitions between states. For example, you would think about what should happen as the login panel is shown, what could happen while it is showing, and what should happen when it is taken down.
2 - What is a Statechart?
 Your applications will have many states, and each state may have many substates within it. Each state can respond to a certain set of actions, the name for events associated with a statechart.
The term "event" is more generic than the term "action." We can speak of the event system, generally, that includes normal web events like **mouseDown** along with actions in the statechart. A statechart action is a type of event.
Consider a SproutCore application for mapping, with the following top-level states, substates, and actions:
- LOADING
- loadingFinished
- LOADED
- viewTermsOfService
- viewPrivacyPolicy
- LOGGED_OUT
- login
- LOGGED_IN
- createBasemap
- zoomMapView
- showPointData
- other mapping actions...
In the list above, the states are in ALL-CAPS, the actions are in italics.
The Getting Started Todos applications use ALL_CAPS for state names, for the sake of continuity. However, states are standard SC objects and can follow any naming convention you want. Many developers prefer CamelCase (i.e., MyApp.LoggedInState) while others prefer namespacing their states (i.e., MyApp.States.LoggedIn). Some prefer verb-style over noun-style state names. Whatever method you choose is fine, just be consistent, so you, and other developers, can more easily follow your code.
The term state is generic: you can use state to refer to states and substates. When you use the term substate, the reference is more specific, and is relative to a parent state.
2.1 - Decoding the Statechart
In our mapping example here, the application can be in one of the two top level states: LOADING or LOADED. If it is in one of these states, it cannot be in the other. When it is in the LOADING state, the only available action is the loadingFinished action. The statechart/application should not respond to any other events. Once control moves into the LOADED state, it can move to two additional states, substates of the LOADED state: LOGGED_OUT or LOGGED_IN. Again, the program can only be in one at a given time, so when the user is "logged out", after the application has loaded, the only available action is the login action.
However, notice that the viewTermsOfService action and the viewPrivacyPolicy action are both available in the LOADED state. This means that regardless of whether the program is in the LOGGED_OUT state or the LOGGED_IN state, the user should be allowed to view the terms of service or the privacy policy.
Once the user has authenticated and logged in, they have various actions available in the mapping system. Imagine a map user interface that appears, with buttons in a dashboard, with live clickable elements on the map, etc. The example actions given above, createBasemap, zoomMapView, and showPointData are just a sample of what would be many actions tied to user interface elements.
States are used in all parts of an application, not just to user interface parts. A large behind-the-scenes data import system in our mapping example could be programmed using statecharts.
2.2 - How Statecharts Help
An application only responds to certain actions at certain times. This makes it much easier to verify that an app is working properly, by ensuring that events are handled exactly when they need to be handled. Furthermore, if, say, a bug in the design of the user interface allows an action to happen when it shouldn't (like allowing some action when the user is logged out), the application itself may maintain a consistent state and continue to operate. Programming with statecharts can help isolate parts of the system.
SproutCore generates statechart-based applications by default. The basis of the statechart is formed by the statechart.js file in the application root directory, and in the states directory readystate.js_:
- statechart.js, and
- states/readystate.js_
The statechart.js file describes your statechart and the initial state that should be entered when the statechart is first initialized. Open it, and you should see the following:
apps/TodosOne/statechart.jsTodosOne.statechart = SC.Statechart.create({ initialState: 'readyState', readyState: SC.State.plugin('TodosOne.ReadyState'), // someOtherState: SC.State.plugin('TodosOne.SomeOtherState') });
This example uses CamelCase state names.
Note the use of SC.Statechart.create(), instead of SC.Statechart.extend(). Views and models generally use .extend() when you are defining them, because elsewhere in the system, instantiation of objects happens. Controllers and the statechart use .create() because we need to directly create objects to work with.
Also note the use of the SC.State.plugin() function. This allows you to put your states in separate files in a states directory.
Open states/readystate.js_ and take a look:
apps/TodosOne/states/ready_state.jsTodosOne.ReadyState = SC.State.extend({ enterState: function() { TodosOne.getPath('mainPage.mainPane').append(); }, exitState: function() { TodosOne.getPath('mainPage.mainPane').remove(); } });
States may define an enterState() function to prepare for the new state, and an exitState() function to clean up after themselves. For user interface programming, these functions are where you show and hide panels, as you see here, with the use of .append() to show and .remove() to hide.
The TodosOne.ReadyState is the only state in this "Hello World" app, so it only appends the main page's main pane.
3 - Where Views Fit In
We've covered statecharts, so you know a little bit about how they work. Let's talk about how statecharts can help organize views and make your code super-clean.
The resources/mainpage.js_ file defines the main user interface of your application.
Edit the file to add a second child view, labelView2, taking care to add labelView2 to the childViews array of view references, which uses the 'space delimited strings'.w() SproutCore idiom to make an array:
apps/TodosOne/resources/main_page.jsTodosOne.mainPage = SC.Page.design({ mainPane: SC.MainPane.design({ childViews: 'labelView labelView2'.w(), labelView: SC.LabelView.design({ layout: { centerX: 0, centerY: 0, width: 200, height: 18 }, textAlign: SC.ALIGN_CENTER, tagName: "h1", value: "Welcome to SproutCore!" }), labelView2: SC.LabelView.design({ layout: { centerX: 0, centerY: 15, width: 200, height: 18 }, textAlign: SC.ALIGN_CENTER, tagName: "h1", value: "Now we're rolling!" }) }) });
Throughout the Getting Started guides we have minimized in-code comments for brevity.
Note the use of the .design() method here. .design() is often confused with .extend(). This confusion is caused by a SproutCore "wart." .design() exists so that views will work with a graphical designer tool for SproutCore (like Interface Builder for Mac OS X) that has been in development for a long time, but remains unfinished, with development long ago stalled. A designer tool might be created in the future, but regardless, there is a logic you can follow, wherein you use .design() when you are using a view, and .extend() where you are defining it. Here we are using .design(), but rest assured that SC.LabelView uses extend where it is defined in the SproutCore codebase.
When you make your own views, remember to use _.extend()_ when you are making the view in the first place, and _.design()_ elsewhere, where you use it.
If you load up http://localhost:4020/TodosOne/ in your browser, you should see both labels now; the second one right below the first.
3.1 - Separating Views
Before we get into using views with statecharts, let's first arrange view files for TodosOne. Technically, you can put all view code in main_page.js, but that will get impractical very fast. Instead you can separate each view into it's own file. This is accomplished by using the special screquire()_ functionality. Modify the mainPane of the mainPage view to have two sc_require() statements at the top, to declare two views as dependencies, and to change the childViews of the pane to use these views:
apps/TodosOne/resources/main_page.jssc_require('views/welcome'); sc_require('views/rolling'); TodosOne.mainPage = SC.Page.design({ mainPane: SC.MainPane.design({ childViews: 'welcomeView rollingView'.w(), welcomeView: TodosOne.WelcomeView.design(), rollingView: TodosOne.RollingView.design() }) });
screquire()_ functionality:
- The file path used in screquire()_ is relative to the application's root directory.
- The reference in screquire()_ has the filename without the .js extension.
- The load order for javascript files will be alphabetical, unless otherwise controlled with sc_require(). Sometimes you get lucky on the default file loading order, if you omit a sc_require() statement. Sometimes you don't, and you will get a dependency error.
Now create the view files for our new WelcomeView and RollingView. Make sure the files have the following content and are located in the views directory:
apps/TodosOne/views/welcome.jsTodosOne.WelcomeView = SC.LabelView.extend({ layout: { centerX: 0, centerY: 0, width: 200, height: 18 }, textAlign: SC.ALIGN_CENTER, tagName: "h1", value: "Welcome to SproutCore!" });
apps/TodosOne/views/rolling.jsTodosOne.RollingView = SC.LabelView.extend({ layout: { centerX: 0, centerY: 15, width: 200, height: 18 }, textAlign: SC.ALIGN_CENTER, tagName: "h1", value: "Now we're rolling!" });
If you refresh the page, everything should look exactly as it did before, but now your code is cleaner and more manageable.
3.2 - Handling Events and Statechart Actions
Standard events for a web application include the ubiquitous mouseDown, and many others. Here we add an event to watch for mouseDown in our TodosOne.RollingView, associating it with a statechart action:
apps/TodosOne/views/rolling.jsTodosOne.RollingView = SC.LabelView.design({ layout: { centerX: 0, centerY: 15, width: 200, height: 18 }, textAlign: SC.ALIGN_CENTER, tagName: "h1", value: "Now we're rolling!", mouseDown: function(evt) { var someParam = "Woot!"; TodosOne.statechart.sendAction('proveIt', someParam); } });
We set a proveIt action to happen on the mouseDown event, using the statechart.sendAction() function. We must handle the action in the appropriate state in the statechart.
The statechart has a property for the current state. When the statechart recieves an action event, it will first ask the current state to handle it. If the current state cannot handle it, the statechart will ask the current state's parent state to handle the event. Attempts continue in this manner, bubbling up until either an ancestor state is found that can handle the event, or it will log a warning for the developer. You can see warnings, as well as other informational messages (such as for state transitions), by turning on tracing on the statechart.
Do that now:
apps/TodosOne/statechart.jsTodosOne.statechart = SC.Statechart.create({ trace: YES, // <-- Add this line initialState: 'readyState', readyState: SC.State.plugin('TodosOne.ReadyState') });
Let's make our TodosOne.ReadyState handle the proveIt action that was defined on the mouseDown event in TodosOne.RollingView above:
apps/TodosOne/states/ready_state.jsTodosOne.ReadyState = SC.State.extend({ enterState: function() { TodosOne.getPath('mainPage.mainPane').append(); }, exitState: function() { TodosOne.getPath('mainPage.mainPane').remove(); }, // Prove that we are rolling! proveIt: function(someParam) { alert(someParam); } });
proveIt() is a function. It is an action in the ReadyState state.
Save your files and refresh the page. When you click on the "Now we're rolling!" label, you should see an alert. If you look at the console output, you can also see the tracing reports, with the event being handled by the statechart, as well as the initialization and the transition to the readyState.
4 - Moving Forward
You are now ready to move on to creating a full-scale SproutCore app!
Part 3 will introduce you to a more complete Todos application, called TodosThree, and walk you through the process of building it from scratch. You will learn about models, controllers and how they tie in with the statechart and views.
Dive in to Getting Started: Part 3.
5 - Changelog
- May 5, 2011: initial version by Piotr Sarnacki
- May 9, 2011: Stylistic edits by Tom Dale
- March 6, 2012: rewrite for SproutCore 1.8 by the 1.8 release sprint team, including the following who did much work on this task: Tim Evans, Topher Fangio, Jeff Pittman
- July 30, 2013: converted to Markdown format for DocPad guides by Eric Theise
- July 30, 2013: fix issues with formatting and updated Changelog by Topher Fangio
- Jan 17, 2019: Updated the guide as the default application already uses the state chart by Maurits Lamers


{% extends '_main.html' %} {% block page_title %}Request complete - {{ block.super }}{% endblock page_title %} {% block breadcrumbs %}
{% endblock %} {% block content %}{% if object.journey == object.JOURNEY_DATASET_AND_TOOLS_ACCESS %} You've requested access to {{ catalogue_item }} and our tools. {% elif object.journey == object.JOURNEY_TOOLS_ACCESS %}
You've requested access to our tools. {% elif object.journey == object.JOURNEY_DATASET_ACCESS %}
You've requested access to {{ catalogue_item }}. {% endif %}
We have sent you a confirmation email.
{% if object.journey == object.JOURNEY_DATASET_AND_TOOLS_ACCESS or object.journey == object.JOURNEY_TOOLS_ACCESS %} We will respond within 5 working days and delete the screenshot you sent us after we have validated it. {% else %} We will respond within 5 working days. {% endif %}
If you have any questions, contact data-workspace+id{{ object.zendesk_reference_number<EMAIL_ADDRESS>You can also:
What did you think of this service? (takes 30 seconds)


Introduction
The MetaProteomeAnalyzer (MPA) constitutes a distributed computing software pipeline to analyze metaproteomics datasets.
It consists of a processing server application and a graph-database driven interactive client.
The software is being developed in the Java programming language and uses a neo4j graph database backend for flexible and user-defined data querying of proteomics results.
For more information, please visit the Wiki pages at the MPA Homepage
Current release version: 1.0.1
Client application
The client comes with the following key features:
- Intuitive graphical user interface
- Project and experiment management
- Top-down analysis
- Label-free quantification methods
- Graph database-driven
- Interactive Overview (Charts and Heatmap)
Go to top of page


class Sass::Tree::Visitors::Cssize
A visitor for converting a static Sass tree into a static CSS tree.
Constants
- Extend
A simple struct wrapping up information about a single `@extend` instance. A single {ExtendNode} can have multiple Extends if either the parent node or the extended selector is a comma sequence.
@attr extender [Sass::Selector::Sequence]
The selector of the CSS rule containing the `@extend`.
@attr target [Array<Sass::Selector::Simple>] The selector being `@extend`ed. @attr node [Sass::Tree::ExtendNode] The node that produced this extend. @attr directives [Array<Sass::Tree::DirectiveNode>]
The directives containing the `@extend`.
@attr result [Symbol]
The result of this extend. One of `:not_found` (the target doesn't exist in the document), `:failed_to_unify` (the target exists but cannot be unified with the extender), or `:succeeded`.
Public Class Methods
# File lib/sass/tree/visitors/cssize.rb, line 16 def initialize @parents = [] @extends = Sass::Util::SubsetMap.new end
@param root [Tree::Node] The root node of the tree to visit. @return [(Tree::Node, Sass::Util::SubsetMap)] The resulting tree of static nodes
*and* the extensions defined for this tree
# File lib/sass/tree/visitors/cssize.rb, line 6 def self.visit(root); super; end
Protected Instance Methods
Returns the immediate parent of the current node. @return [Tree::Node]
# File lib/sass/tree/visitors/cssize.rb, line 12 def parent @parents.last end
If an exception is raised, this adds proper metadata to the backtrace.
# File lib/sass/tree/visitors/cssize.rb, line 22 def visit(node) super(node) rescue Sass::SyntaxError => e e.modify_backtrace(:filename => node.filename, :line => node.line) raise e end
# File lib/sass/tree/visitors/cssize.rb, line 189 def visit_atroot(node) # If there aren't any more directives or rules that this @at-root needs to # exclude, we can get rid of it and just evaluate the children. if @parents.none? {|n| node.exclude_node?(n)} results = visit_children_without_parent(node) results.each {|c| c.tabs += node.tabs if bubblable?(c)} if !results.empty? && bubblable?(results.last) results.last.group_end = node.group_end end return results end # If this @at-root excludes the immediate parent, return it as-is so that it # can be bubbled up by the parent node. return Bubble.new(node) if node.exclude_node?(parent) # Otherwise, duplicate the current parent and move it into the @at-root # node. As above, returning an @at-root node signals to the parent directive # that it should be bubbled upwards. bubble(node) end
Keeps track of the current parent node.
# File lib/sass/tree/visitors/cssize.rb, line 30 def visit_children(parent) with_parent parent do parent.children = visit_children_without_parent(parent) parent end end
Like {#visit_children}, but doesn’t set {#parent}.
@param node [Sass::Tree::Node] @return [Array<Sass::Tree::Node>] the flattened results of
visiting all the children of `node`
# File lib/sass/tree/visitors/cssize.rb, line 42 def visit_children_without_parent(node) node.children.map {|c| visit(c)}.flatten end
Bubbles a directive up through RuleNodes.
# File lib/sass/tree/visitors/cssize.rb, line 236 def visit_directive(node) return node unless node.has_children return bubble(node) if parent.is_a?(Sass::Tree::RuleNode) yield # Since we don't know if the mere presence of an unknown directive may be # important, we should keep an empty version around even if all the contents # are removed via @at-root. However, if the contents are just bubbled out, # we don't need to do so. directive_exists = node.children.any? do |child| next true unless child.is_a?(Bubble) next false unless child.node.is_a?(Sass::Tree::DirectiveNode) child.node.resolved_value == node.resolved_value end if directive_exists [] else empty_node = node.dup empty_node.children = [] [empty_node] end + debubble(node.children, node) end
Registers an extension in the `@extends` subset map.
# File lib/sass/tree/visitors/cssize.rb, line 125 def visit_extend(node) node.resolved_selector.members.each do |seq| if seq.members.size > 1 raise Sass::SyntaxError.new("Can't extend #{seq.to_a.join}: can't extend nested selectors") end sseq = seq.members.first if !sseq.is_a?(Sass::Selector::SimpleSequence) raise Sass::SyntaxError.new("Can't extend #{seq.to_a.join}: invalid selector") elsif sseq.members.any? {|ss| ss.is_a?(Sass::Selector::Parent)} raise Sass::SyntaxError.new("Can't extend #{seq.to_a.join}: can't extend parent selectors") end sel = sseq.members parent.resolved_rules.members.each do |member| unless member.members.last.is_a?(Sass::Selector::SimpleSequence) raise Sass::SyntaxError.new("#{member} can't extend: invalid selector") end parent_directives = @parents.select {|p| p.is_a?(Sass::Tree::DirectiveNode)} @extends[sel] = Extend.new(member, sel, node, parent_directives, :not_found) end end [] end
Modifies exception backtraces to include the imported file.
# File lib/sass/tree/visitors/cssize.rb, line 153 def visit_import(node) visit_children_without_parent(node) rescue Sass::SyntaxError => e e.modify_backtrace(:filename => node.children.first.filename) e.add_backtrace(:filename => node.filename, :line => node.line) raise e end
Bubbles the `@media` directive up through RuleNodes and merges it with other `@media` directives.
# File lib/sass/tree/visitors/cssize.rb, line 263 def visit_media(node) return bubble(node) if parent.is_a?(Sass::Tree::RuleNode) return Bubble.new(node) if parent.is_a?(Sass::Tree::MediaNode) yield debubble(node.children, node) do |child| next child unless child.is_a?(Sass::Tree::MediaNode) # Copies of `node` can be bubbled, and we don't want to merge it with its # own query. next child if child.resolved_query == node.resolved_query next child if child.resolved_query = child.resolved_query.merge(node.resolved_query) end end
Converts nested properties into flat properties and updates the indentation of the prop node based on the nesting level.
# File lib/sass/tree/visitors/cssize.rb, line 172 def visit_prop(node) if parent.is_a?(Sass::Tree::PropNode) node.resolved_name = "#{parent.resolved_name}-#{node.resolved_name}" node.tabs = parent.tabs + (parent.resolved_value.empty? ? 0 : 1) if node.style == :nested end yield result = node.children.dup if !node.resolved_value.empty? || node.children.empty? node.send(:check!) result.unshift(node) end result end
In Ruby 1.8, ensures that there’s only one `@charset` directive and that it’s at the top of the document.
@return [(Tree::Node, Sass::Util::SubsetMap)] The resulting tree of static nodes
*and* the extensions defined for this tree
# File lib/sass/tree/visitors/cssize.rb, line 64 def visit_root(node) yield if parent.nil? # In Ruby 1.9 we can make all @charset nodes invisible # and infer the final @charset from the encoding of the final string. if Sass::Util.ruby1_8? charset = node.children.find {|c| c.is_a?(Sass::Tree::CharsetNode)} node.children.reject! {|c| c.is_a?(Sass::Tree::CharsetNode)} node.children.unshift charset if charset end imports_to_move = [] import_limit = nil i = -1 node.children.reject! do |n| i += 1 if import_limit next false unless n.is_a?(Sass::Tree::CssImportNode) imports_to_move << n next true end if !n.is_a?(Sass::Tree::CommentNode) && !n.is_a?(Sass::Tree::CharsetNode) && !n.is_a?(Sass::Tree::CssImportNode) import_limit = i end false end if import_limit node.children = node.children[0...import_limit] + imports_to_move + node.children[import_limit..-1] end end return node, @extends rescue Sass::SyntaxError => e e.sass_template ||= node.template raise e end
Updates the indentation of the rule node based on the nesting level. The selectors were resolved in {Perform}.
# File lib/sass/tree/visitors/cssize.rb, line 216 def visit_rule(node) yield rules = node.children.select {|c| bubblable?(c)} props = node.children.reject {|c| bubblable?(c) || c.invisible?} unless props.empty? node.children = props rules.each {|r| r.tabs += 1} if node.style == :nested rules.unshift(node) end rules = debubble(rules) unless parent.is_a?(Sass::Tree::RuleNode) || rules.empty? || !bubblable?(rules.last) rules.last.group_end = true end rules end
Bubbles the `@supports` directive up through RuleNodes.
# File lib/sass/tree/visitors/cssize.rb, line 279 def visit_supports(node) return node unless node.has_children return bubble(node) if parent.is_a?(Sass::Tree::RuleNode) yield debubble(node.children, node) end
Asserts that all the traced children are valid in their new location.
# File lib/sass/tree/visitors/cssize.rb, line 162 def visit_trace(node) visit_children_without_parent(node) rescue Sass::SyntaxError => e e.modify_backtrace(:mixin => node.name, :filename => node.filename, :line => node.line) e.add_backtrace(:filename => node.filename, :line => node.line) raise e end
Runs a block of code with the current parent node replaced with the given node.
@param parent [Tree::Node] The new parent for the duration of the block. @yield A block in which the parent is set to `parent`. @return [Object] The return value of the block.
# File lib/sass/tree/visitors/cssize.rb, line 52 def with_parent(parent) @parents.push parent yield ensure @parents.pop end
Private Instance Methods
Returns whether or not a node can be bubbled up through the syntax tree.
@param node [Sass::Tree::Node] @return [Boolean]
# File lib/sass/tree/visitors/cssize.rb, line 351 def bubblable?(node) node.is_a?(Sass::Tree::RuleNode) || node.bubbles? end
“Bubbles” `node` one level by copying the parent and wrapping `node`‘s children with it.
@param node [Sass::Tree::Node]. @return [Bubble]
# File lib/sass/tree/visitors/cssize.rb, line 295 def bubble(node) new_rule = parent.dup new_rule.children = node.children node.children = [new_rule] Bubble.new(node) end
Pops all bubbles in `children` and intersperses the results with the other values.
If `parent` is passed, it’s copied and used as the parent node for the nested portions of `children`.
@param children [List<Sass::Tree::Node, Bubble>] @param parent [Sass::Tree::Node] @yield [node] An optional block for processing bubbled nodes. Each bubbled
node will be passed to this block.
@yieldparam node [Sass::Tree::Node] A bubbled node. @yieldreturn [Sass::Tree::Node?] A node to use in place of the bubbled node.
This can be the node itself, or `nil` to indicate that the node should be omitted.
@return [List<Sass::Tree::Node, Bubble>]
# File lib/sass/tree/visitors/cssize.rb, line 317 def debubble(children, parent = nil) # Keep track of the previous parent so that we don't divide `parent` # unnecessarily if the `@at-root` doesn't produce any new nodes (e.g. # `@at-root {@extend %foo}`). previous_parent = nil Sass::Util.slice_by(children) {|c| c.is_a?(Bubble)}.map do |(is_bubble, slice)| unless is_bubble next slice unless parent if previous_parent previous_parent.children.push(*slice) next [] else previous_parent = new_parent = parent.dup new_parent.children = slice next new_parent end end slice.map do |bubble| next unless (node = block_given? ? yield(bubble.node) : bubble.node) node.tabs += bubble.tabs node.group_end = bubble.group_end results = [visit(node)].flatten previous_parent = nil unless results.empty? results end.compact end.flatten end


This link goes to a new page.
This link also goes to a new page.
This isn't a link, but clicking does stuff.


Mayor of Pocahontas backs Joe Biden, not Elizabeth Warren
by Adam ShawThe mayor of Pocahontas, Iowa is not backing who you might think.
Dick Gruber, mayor of the northwest city in Iowa, announced this week that he is backing former Vice President Joe Biden for the 2020, rather than closest rival Sen. Elizabeth Warren.
The endorsement was reported by The Washington Examiner, and was announced in an email to reporters from the Biden campaign.
WARREN SAYS SHE'S OPEN TO HALTING DEPORTATION OF ILLEGAL IMMIGRANTS
“Iowans know that Joe Biden is the strongest candidate to beat Donald Trump next November, and that’s why leaders from across the state are coming forward to proudly show their support,” the campaign said in a statement.
The nod is likely to raise some eyebrows from Trump supporters, who have delighted in President Trump’s frequent mocking of Warren as “Pocahontas” in reference to her past claims to have Native American ancestry.
Warren apologized to Native groups this year after she touted a DNA test that her campaign said backed her claims to have Native American heritage.
"Like anyone who has been honest with themselves, I know I have made mistakes," Warren said. "I am sorry for the harm I have caused."
But it’s an issue that has continued to dog her, particularly as Trump has repeatedly used the “Pocahontas” moniker for years -- even though his opponents have alleged that it is a racist slur.
“Who? Pocahontas?” Trump said when asked about Warren in 2016. When told by reporters that the term was “very offensive,” he responded: “Oh I’m sorry about that,” before immediately saying it again.
JOE BIDEN PREDICTS REPUBLICANS WILL HAVE AN 'EPIPHANY' ONCE TRUMP LEAVES OFFICE
In August this year, he said his only regret was that he may have attacked her too early, and said that more attacks could be coming down the pipeline..
“Like, Elizabeth Warren -- I did the Pocahontas thing,” Trump told supporters. “I hit her really hard and it looked like she was down and out but that was too long ago, I should’ve waited. But don’t worry, we will revive it.”
Warren’s campaign, meanwhile, has a whole page on her website dedicated to Pocahontas after it says the owner of Pocahontas.com set up the website to redirect to her site.
CLICK HERE FOR THE FOX NEWS APP
“We do not know the owner’s identity – and we did not ask them to do this,” the campaign says, urging the owner to redirect to the National Indigenous Women’s Resource Center instead.


--- layout: page title: About header-img: "img/about-bg.png" ---
I am BRAND new to coding, and I am reminded every day that I have so much to learn! I'm enjoying the process so far, despite the occasional setback.


StreamExecution — execution environment of a single continuous query (aka streaming Dataset)
StreamExecution has multiple streaming sources but only one streaming sink
Executes every trigger and adds results to the sink
Created exclusively when DataStreamWriter is started.
StreamExecution starts a thread of execution that runs the streaming query continuously and concurrently
StreamExecution collects duration for the execution units of a streaming batch
Use StreamingQuery.lastProgress or StreamingQuery.recentProgress
IncrementalExecution — QueryExecution of a streaming Dataset
Created (in queryPlanning Phase) for incremental execution of the logical query plan (every trigger)