--- title: "Reproducing Lavaan from (almost) Scratch" linktitle: Reproducing Lavaan toc: true type: docs date: 2019-10-27 draft: false menu: tutorial: parent: lavaan weight: 2 ---
Purpose:
To reproduce the maximum likelihood estimates from lavaan. To try, I will be using the HolzingerSwineford1939 dataset that comes with lavaan. These data form a three factor model with 9 items.
set.seed(2)
library(lavaan)
## This is lavaan 0.6-6
## lavaan is BETA software! Please report any bugs.
HS.model <- ' visual =~ x1 + x2 + x3
textual =~ x4 + x5 + x6
speed =~ x7 + x8 + x9 '
fit.la <- cfa(HS.model, data = HolzingerSwineford1939)
summary(fit.la, fit.measures = TRUE)
## lavaan 0.6-6 ended normally after 35 iterations
##
## Estimator ML
## Optimization method NLMINB
## Number of free parameters 21
##
## Number of observations 301
##
## Model Test User Model:
##
## Test statistic 85.306
## Degrees of freedom 24
## P-value (Chi-square) 0.000
##
## Model Test Baseline Model:
##
## Test statistic 918.852
## Degrees of freedom 36
## P-value 0.000
##
## User Model versus Baseline Model:
##
## Comparative Fit Index (CFI) 0.931
## Tucker-Lewis Index (TLI) 0.896
##
## Loglikelihood and Information Criteria:
##
## Loglikelihood user model (H0) -3737.745
## Loglikelihood unrestricted model (H1) -3695.092
##
## Akaike (AIC) 7517.490
## Bayesian (BIC) 7595.339
## Sample-size adjusted Bayesian (BIC) 7528.739
##
## Root Mean Square Error of Approximation:
##
## RMSEA 0.092
## 90 Percent confidence interval - lower 0.071
## 90 Percent confidence interval - upper 0.114
## P-value RMSEA <= 0.05 0.001
##
## Standardized Root Mean Square Residual:
##
## SRMR 0.065
##
## Parameter Estimates:
##
## Standard errors Standard
## Information Expected
## Information saturated (h1) model Structured
##
## Latent Variables:
## Estimate Std.Err z-value P(>|z|)
## visual =~
## x1 1.000
## x2 0.554 0.100 5.554 0.000
## x3 0.729 0.109 6.685 0.000
## textual =~
## x4 1.000
## x5 1.113 0.065 17.014 0.000
## x6 0.926 0.055 16.703 0.000
## speed =~
## x7 1.000
## x8 1.180 0.165 7.152 0.000
## x9 1.082 0.151 7.155 0.000
##
## Covariances:
## Estimate Std.Err z-value P(>|z|)
## visual ~~
## textual 0.408 0.074 5.552 0.000
## speed 0.262 0.056 4.660 0.000
## textual ~~
## speed 0.173 0.049 3.518 0.000
##
## Variances:
## Estimate Std.Err z-value P(>|z|)
## .x1 0.549 0.114 4.833 0.000
## .x2 1.134 0.102 11.146 0.000
## .x3 0.844 0.091 9.317 0.000
## .x4 0.371 0.048 7.779 0.000
## .x5 0.446 0.058 7.642 0.000
## .x6 0.356 0.043 8.277 0.000
## .x7 0.799 0.081 9.823 0.000
## .x8 0.488 0.074 6.573 0.000
## .x9 0.566 0.071 8.003 0.000
## visual 0.809 0.145 5.564 0.000
## textual 0.979 0.112 8.737 0.000
## speed 0.384 0.086 4.451 0.000
# Fit value
fit.la@optim$fx
## [1] 0.1417035
There are four major sections that I will go through
Whenever I have read about CFA/SEM, I have been given this kind of vague idea on how estimation works. The general idea I have read/been talk is that there’s this fit function
\[F_{ML} = \frac{1}{2}\left[\log\mid\mathbf{\Sigma}(\theta)\mid - \log\mid \mathbf{S}\mid + tr\left(\mathbf{S}\mathbf{\Sigma}^{-1}(\theta)\right) - p\right]\]
where,
A relatively straightforward implementation of this fit function is shown in the following chunk of code. The majority of the cfa.fit() function is based on handling the model, data (X), and iteratively updating parameter estimates (\(\theta\)).
I first computed the sample related values. For example, the number of variables \(p\) is simply the number of columns in the dataset. The sample covariance matrix is also straightforward to get.
Secondly, the model is unpacked from the model list argument. The model argument is a list of three separate matrices for the 1) lambda (\(\Lambda\))-factor loading matrix, 2) phi (\(\Phi\))-factor covariance matrix, and 3) psi (\(\Psi\))-error (co)variance matrix.
Third, the individual parameter estimates (\(\theta\)) are then unpacked and placed into the corresponding model components. This was the trickiest part to figure out as this part needs to be dynamically related to the model. The part that I still am not sure is done generally enough is the unpacking of the factor covariance matrix section. Well, this whole unpacking could likely be more general, but I will work on this for a later implementation.
Next, the model implied covariance matrix is estimated. The model implied covariance matrix is computed using \(\Sigma(\theta) = \Lambda\Phi\Lambda^{\mathrm{T}} + \Psi\).
Finally, the fit function is estimated.
cfa.fit<-function(theta, X, model){
# Compue sample statistics
p<-ncol(X)
S<-cov(X)
# unpack model
lambda <- model[[1]]
phi <- model[[2]]
psi <- model[[3]]
# number factor loadings
lam.num <- length(which(is.na(lambda)))
lambda[which(is.na(lambda))] <- theta[1:lam.num]
# number elements in factor (co)variance matrix
phi.num <- length(which(is.na(phi)))
if(phi.num > 0){
phi[which(is.na(phi))] <- theta[(lam.num+1):(lam.num+phi.num)]
phi[upper.tri(phi)] <- phi[lower.tri(phi)]
}
# number elements in error (co)variance matrix
psi.num <- length(which(is.na(psi)))
psi[which(is.na(psi))] <- theta[(lam.num+phi.num+1):(lam.num+phi.num+psi.num)]
# compute model implied (co)variance matrix
Sigma<-lambda%*%phi%*%(t(lambda)) + psi
# get inverse of Simga
sigInv <- solve(Sigma)
# determinates of S & Sigma
detS <- det(S)
detSig <- det(Sigma)
# compute fit function
fit <- 0.5*(log(detSig) + trace(sigInv%*%S) - log(detS) - p)
#return fit value
return(fit)
}
The data prep itself is relatively easy. For this example at least, the data prep is simply extracting the 9 variables (\(x_1-x_9\)) from the larger dataframe. The main thing is to make the 9 variables into all numeric variables.
X <- HolzingerSwineford1939[, paste0('x',1:9)]
The model prep was a little mode involved. Here I needed to set up the specification of the model so that two conditions are met.
The later of which is the much more technically involved feature. Identification is a big topic for statistical analysis, especially in the domain of latent variable models where identification can be notoriously difficult. However, the basic idea is that we need to be able to come up with unique estimates for all parameter values. In the CFA model here, the identification can be achieved by fixing the factor loading of one item to 1.
As you will probably see, the specification for the factor covariance matrix (\(\Phi\)) is a little funky between it is left as NA along the diagonal and lower triangle, but the upper triangle is left as 0. I figure this specification out through trial and error for being able to get the lower triangle duplicated more easily while still keeping the number of unique elements in this matrix to be estimated correct. Note however, that in the cfa.fit function I turn the \(\Phi\) matrix into the full appropriate matrix with the upper and lower diagonal being equal.
nF<-3 # number of factor
p<-ncol(X) # number of variables
# model specification for factor loading matrix
# Note: matrix fills column wise
lambdaMod <- matrix(ncol=nF, nrow=p,
# x1,x2, x3, x4,x5, x6, x7,x8,x9
c(1, NA, NA, 0, 0, 0, 0, 0, 0, #f1
0, 0, 0, 1, NA, NA, 0, 0, 0, #f2
0, 0, 0, 0, 0, 0, 1, NA, NA)) #f3
lambdaMod
## [,1] [,2] [,3]
## [1,] 1 0 0
## [2,] NA 0 0
## [3,] NA 0 0
## [4,] 0 1 0
## [5,] 0 NA 0
## [6,] 0 NA 0
## [7,] 0 0 1
## [8,] 0 0 NA
## [9,] 0 0 NA
# factor covariance matrix (lower diagonal + diagonal)
phiMod <- matrix(nrow=nF,ncol=nF)
phiMod[upper.tri(phiMod)] <- 0
phiMod
## [,1] [,2] [,3]
## [1,] NA 0 0
## [2,] NA NA 0
## [3,] NA NA NA
# error variances
psiMod <- diag(nrow=p)
diag(psiMod)<-NA
psiMod
## [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9]
## [1,] NA 0 0 0 0 0 0 0 0
## [2,] 0 NA 0 0 0 0 0 0 0
## [3,] 0 0 NA 0 0 0 0 0 0
## [4,] 0 0 0 NA 0 0 0 0 0
## [5,] 0 0 0 0 NA 0 0 0 0
## [6,] 0 0 0 0 0 NA 0 0 0
## [7,] 0 0 0 0 0 0 NA 0 0
## [8,] 0 0 0 0 0 0 0 NA 0
## [9,] 0 0 0 0 0 0 0 0 NA
# store as list
cfaModel <- list(lambdaMod, phiMod, psiMod)
The starting values were also a little tricky to get figured out a first…
# get length of each model element
lam.num <- sum(is.na(c(lambdaMod))==T)
phi.num <- sum(is.na(c(phiMod))==T)
psi.num <- sum(is.na(c(psiMod))==T)
k<-lam.num+phi.num+psi.num
sv<-numeric(k)
# generate starting values
sv[1:(lam.num)] <- rep(0.25,lam.num)
sv[(lam.num+1):(lam.num+phi.num)]<- runif(phi.num, 0.05, 1)
sv[(lam.num+phi.num+1):(lam.num+phi.num+psi.num)] <-runif(psi.num, 0.05, 3)
Last thing with respect to the estimation. We have to the compute the trace of a matrix. For some reason, I can not find a built in R function that automatically does this… So, I initialized a little function that does it for me to keep track.
# trace function
trace <- function(A) {
n <- dim(A)[1] # get dimension of matrix
tr <- 0 # initialize trace value
# Loop over the diagonal elements of the supplied matrix and add the element to tr
for (k in 1:n) {
l <- A[k,k]
tr <- tr + l
}
return(tr[[1]])
}
# or one could do sum(diag(A))
Lavaan estimates models using the fit function described briefly from above along with a numerical methods for optimization. Now, that is vague on purpose. The precise methods of numerical approximations for complex functions is a bit out of my range of knowledge at this point, but I have general enough sense of how to use the basics of these methods. MANY methods exists for numerically solving complex optimization tasks in high dimensions, I will use two separate R tools and show how vastly different the results can be.
First, I will use the tools lavaan is built on. Lavaan uses the nlminb. I am unsure why this optimization function was selected (the answer may be hidden in the depths of the lavaan help/tutorial pages). But, the nice thing is that this function is pretty straightforward to use. The following chunk of code utilize the function in a similar manner that lavaan does I believe. The control argument supplies a list of different evaluation criteria, which I have taken from the fitted fit.la object from above. When I was testing this code out, I found that changing most of these settings had neglible impact on the results from this simple model.
Secondly, I extracted the corresponding parameter estimated and unpacked them into the objects lambda, phi, and psi. This was so that I could show the resulting model pieces.
fit1 <- nlminb(sv, cfa.fit, X=X, model=cfaModel,
control=list(eval.max=20000, iter.max=10000,
abs.tol=2.2e-15, rel.tol=1e-10,
x.tol=1.5e-8,xf.tol=2.2e-14))
# value of the fit function
fit1$objective
## [1] 0.1417035
# unpack parameter estimates
fit<-fit1
lambda <- cfaModel[[1]]
phi <- cfaModel[[2]]
psi <- cfaModel[[3]]
# number factor loadings
lam.num <- length(which(is.na(lambda)))
lambda[which(is.na(lambda))] <- fit$par[1:lam.num]
# number elements in factor (co)variance matrix
phi.num <- length(which(is.na(phi)))
if(phi.num > 0){
phi[which(is.na(phi))] <- fit$par[(lam.num+1):(lam.num+phi.num)]
}
# number elements in error (co)variance matrix
psi.num <- length(which(is.na(psi)))
psi[which(is.na(psi))] <- fit$par[(lam.num+phi.num+1):(lam.num+phi.num+psi.num)]
print(round(lambda,3))
## [,1] [,2] [,3]
## [1,] 1.000 0.000 0.000
## [2,] 0.554 0.000 0.000
## [3,] 0.729 0.000 0.000
## [4,] 0.000 1.000 0.000
## [5,] 0.000 1.113 0.000
## [6,] 0.000 0.926 0.000
## [7,] 0.000 0.000 1.000
## [8,] 0.000 0.000 1.180
## [9,] 0.000 0.000 1.082
print(round(phi,3))
## [,1] [,2] [,3]
## [1,] 0.812 0.000 0.000
## [2,] 0.410 0.983 0.000
## [3,] 0.263 0.174 0.385
print(round(diag(psi),3))
## [1] 0.551 1.138 0.847 0.372 0.448 0.357 0.802 0.489 0.568
I also found an alternative optimization function in R called optim(.). The really nice part about this function is that the Hessian matrix can be more easily computed. But, the major downside is that optim was not used by lavaan can may yield slightly different results thatn lavaan. However, I think once the lower-bounds for parameters are placed the functions yeild identical results.
#using optim instead of nlminb
# (easier to get hessian matrix)
# BUT, I need to supply lower limits for the variance parameters
lb <- numeric(k)
lb[1:(lam.num)] <- -Inf
# phi
lb.phi<- matrix(nrow=nF,ncol=nF)
diag(lb.phi)<- 0.001
lb.phi[lower.tri(lb.phi)] <- -Inf
lb[(lam.num+1):(lam.num+phi.num)]<- c(lb.phi[lower.tri(lb.phi, diag=T)])
# phi
lb[(lam.num+phi.num+1):(lam.num+phi.num+psi.num)] <- 0.001
fit2 <- optim(sv, cfa.fit, X=X, model=cfaModel,
method='L-BFGS-B', hessian = T, lower=lb,
control=list(maxit=10000))
# value of the fit function
fit2$value
## [1] 0.1417035
# unpack parameter estimates
fit<-fit2
lambda <- cfaModel[[1]]
phi <- cfaModel[[2]]
psi <- cfaModel[[3]]
# number factor loadings
lam.num <- length(which(is.na(lambda)))
lambda[which(is.na(lambda))] <- fit$par[1:lam.num]
# number elements in factor (co)variance matrix
phi.num <- length(which(is.na(phi)))
if(phi.num > 0){
phi[which(is.na(phi))] <- fit$par[(lam.num+1):(lam.num+phi.num)]
}
# number elements in error (co)variance matrix
psi.num <- length(which(is.na(psi)))
psi[which(is.na(psi))] <- fit$par[(lam.num+phi.num+1):(lam.num+phi.num+psi.num)]
print(lambda)
## [,1] [,2] [,3]
## [1,] 1.0000000 0.0000000 0.000000
## [2,] 0.5535270 0.0000000 0.000000
## [3,] 0.7293599 0.0000000 0.000000
## [4,] 0.0000000 1.0000000 0.000000
## [5,] 0.0000000 1.1130382 0.000000
## [6,] 0.0000000 0.9261204 0.000000
## [7,] 0.0000000 0.0000000 1.000000
## [8,] 0.0000000 0.0000000 1.179954
## [9,] 0.0000000 0.0000000 1.081630
print(phi)
## [,1] [,2] [,3]
## [1,] 0.8120324 0.0000000 0.000000
## [2,] 0.4096243 0.9828315 0.000000
## [3,] 0.2631030 0.1740852 0.384998
print(diag(psi))
## [1] 0.5508865 1.1375943 0.8471442 0.3723983 0.4477594 0.3573981 0.8020822
## [8] 0.4893649 0.5679775
One thing that I know is lacking in this replication is the computation of the standard errors. Standard errors are a much more complicated computation. I know they are related to the 2nd derivative of the likelihood function. But I have not figured out how to set up this computation myself yet.


date: “2018-10-07T11:12:00+02:00” title: Analysis of Yield Curve
## ── Attaching packages ────────────────────────────────────────────── tidyverse 1.3.0 ──
## ✓ ggplot2 3.3.2 ✓ purrr 0.3.4
## ✓ tibble 3.0.3 ✓ dplyr 1.0.2
## ✓ tidyr 1.1.2 ✓ stringr 1.4.0
## ✓ readr 1.3.1 ✓ forcats 0.5.0
## ── Conflicts ───────────────────────────────────────────────── tidyverse_conflicts() ──
## x dplyr::filter() masks stats::filter()
## x dplyr::lag() masks stats::lag()
## Registered S3 method overwritten by 'mosaic':
## method from
## fortify.SpatialPolygonsDataFrame ggplot2
##
## The 'mosaic' package masks several functions from core packages in order to add
## additional features. The original behavior of these functions should not be affected by this.
##
## Attaching package: 'mosaic'
## The following object is masked from 'package:Matrix':
##
## mean
## The following objects are masked from 'package:dplyr':
##
## count, do, tally
## The following object is masked from 'package:purrr':
##
## cross
## The following object is masked from 'package:ggplot2':
##
## stat
## The following objects are masked from 'package:stats':
##
## binom.test, cor, cor.test, cov, fivenum, IQR, median, prop.test,
## quantile, sd, t.test, var
## The following objects are masked from 'package:base':
##
## max, mean, min, prod, range, sample, sum
##
## Attaching package: 'ggthemes'
## The following object is masked from 'package:mosaic':
##
## theme_map
## Registered S3 method overwritten by 'GGally':
## method from
## +.gg ggplot2
## here() starts at /Users/alexxx/Desktop/my_website7
##
## Attaching package: 'skimr'
## The following object is masked from 'package:mosaic':
##
## n_missing
##
## Attaching package: 'janitor'
## The following objects are masked from 'package:stats':
##
## chisq.test, fisher.test
## Loading required package: lubridate
##
## Attaching package: 'lubridate'
## The following objects are masked from 'package:base':
##
## date, intersect, setdiff, union
## Loading required package: PerformanceAnalytics
## Loading required package: xts
## Loading required package: zoo
##
## Attaching package: 'zoo'
## The following objects are masked from 'package:base':
##
## as.Date, as.Date.numeric
##
## Attaching package: 'xts'
## The following objects are masked from 'package:dplyr':
##
## first, last
##
## Attaching package: 'PerformanceAnalytics'
## The following object is masked from 'package:graphics':
##
## legend
## Loading required package: quantmod
## Loading required package: TTR
## Registered S3 method overwritten by 'quantmod':
## method from
## as.zoo.data.frame zoo
## Version 0.4-0 included new data defaults. See ?getSymbols.
## ══ Need to Learn tidyquant? ═══════════════════════════════════════════════════════════
## Business Science offers a 1-hour course - Learning Lab #9: Performance Analysis & Portfolio Optimization with tidyquant!
## </> Learn more at: https://university.business-science.io/p/learning-labs-pro </>
##
## Attaching package: 'infer'
## The following objects are masked from 'package:mosaic':
##
## prop_test, t_test
## Loading required package: airports
## Loading required package: cherryblossom
## Loading required package: usdata
##
## Attaching package: 'openintro'
## The following object is masked from 'package:mosaic':
##
## dotPlot
## The following objects are masked from 'package:lattice':
##
## ethanol, lsegments
# Get a list of FRED codes for US rates and US yield curve; choose monthly frequency
# to see, eg., the 3-month T-bill https://fred.stlouisfed.org/series/TB3MS
tickers <- c('TB3MS', # 3-month Treasury bill (or T-bill)
'TB6MS', # 6-month
'GS1', # 1-year
'GS2', # 2-year, etc....
'GS3',
'GS5',
'GS7',
'GS10',
'GS20',
'GS30') #.... all the way to the 30-year rate
# Turn FRED codes to human readable variables
myvars <- c('3-Month Treasury Bill',
'6-Month Treasury Bill',
'1-Year Treasury Rate',
'2-Year Treasury Rate',
'3-Year Treasury Rate',
'5-Year Treasury Rate',
'7-Year Treasury Rate',
'10-Year Treasury Rate',
'20-Year Treasury Rate',
'30-Year Treasury Rate')
maturity <- c('3m', '6m', '1y', '2y','3y','5y','7y','10y','20y','30y')
# by default R will sort these maturities alphabetically; but since we want
# to keep them in that exact order, we recast maturity as a factor
# or categorical variable, with the levels defined as we want
maturity <- factor(maturity, levels = maturity)
# Create a lookup dataset
mylookup<-data.frame(symbol=tickers,var=myvars, maturity=maturity)
# Take a look:
mylookup %>%
knitr::kable()
| symbol | var | maturity |
|---|---|---|
| TB3MS | 3-Month Treasury Bill | 3m |
| TB6MS | 6-Month Treasury Bill | 6m |
| GS1 | 1-Year Treasury Rate | 1y |
| GS2 | 2-Year Treasury Rate | 2y |
| GS3 | 3-Year Treasury Rate | 3y |
| GS5 | 5-Year Treasury Rate | 5y |
| GS7 | 7-Year Treasury Rate | 7y |
| GS10 | 10-Year Treasury Rate | 10y |
| GS20 | 20-Year Treasury Rate | 20y |
| GS30 | 30-Year Treasury Rate | 30y |
df <- tickers %>% tidyquant::tq_get(get="economic.data",
from="1960-01-01") # start from January 1960
glimpse(df)
## Rows: 6,774
## Columns: 3
## $ symbol <chr> "TB3MS", "TB3MS", "TB3MS", "TB3MS", "TB3MS", "TB3MS", "TB3MS",…
## $ date <date> 1960-01-01, 1960-02-01, 1960-03-01, 1960-04-01, 1960-05-01, 1…
## $ price <dbl> 4.35, 3.96, 3.31, 3.23, 3.29, 2.46, 2.30, 2.30, 2.48, 2.30, 2.…
Our dataframe df
has three columns (variables):
symbol
: the FRED database ticker symboldate
: already a date objectprice
: the actual yield on that dateThe first thing would be to join this dataframe df
with the dataframe mylookup
so we have a more readable version of maturities, durations, etc.
yield_curve <-left_join(df,mylookup,by="symbol")
This may seem long but it should be easy to produce the following three plots
yield_curve %>%
ggplot(aes(x = date, y = price, color = var)) +
geom_line() +
facet_wrap(~ordered(yield_curve$var, myvars), ncol=2) +
guides(colour=FALSE) +
ylab("%") +
xlab("") +
labs(title="Yields on U.S. Treasury rates since 1960",
caption="Source: St. Louis Federal Reserve Economics Database (FRED)")
yield_curve %>%
filter(year(date) >= 1999) %>%
ggplot(aes(x = maturity, y = price, color = year(date), group=month(date))) +
geom_line() +
facet_wrap(~year(date), ncol=4) +
guides(colour=FALSE) +
ylab("Yield (%)") +
xlab("Maturity") +
labs(title="US Yield Curve",
caption="Source: St. Louis Federal Reserve Economics Database (FRED)")
yield_curve %>%
filter(year(date) >= 1999,
maturity %in% c("3m", "10y")) %>%
ggplot(aes(x = date, y = price, color = var)) +
geom_line() +
ylab("%") +
guides(color=guide_legend(title="")) +
labs(title="Yields on 3-month and 10-year US Treasury rates since 1999",
caption="Source: St. Louis Federal Reserve Economics Database (FRED)")
According to Wikipedia’s list of recession in the United States, since 1999 there have been two recession in the US: between Mar 2001–Nov 2001 and between Dec 2007–June 2009. Does the yield curve seem to flatten before these recessions? Can a yield curve flattening really mean a recession is coming in the US? Since 1999, when did short-term (3 months) yield more than longer term (10 years) debt?
The yield curve does flatten before each major recession. We can see in the graphs that the flattening of the yield curve does warn before each recession hits the US.We also notice that short term yielded more than long term during recession times, likely due to people being worried to invest in longer futures due to uncertainty.
Besides calculating the spread (10year - 3months), there are a few things we need to do to produce our final plot
# get US recession dates after 1946 from Wikipedia
# https://en.wikipedia.org/wiki/List_of_recessions_in_the_United_States
recessions <- tibble(
from = c("1948-11-01", "1953-07-01", "1957-08-01", "1960-04-01", "1969-12-01", "1973-11-01", "1980-01-01","1981-07-01", "1990-07-01", "2001-03-01", "2007-12-01"),
to = c("1949-10-01", "1954-05-01", "1958-04-01", "1961-02-01", "1970-11-01", "1975-03-01", "1980-07-01", "1982-11-01", "1991-03-01", "2001-11-01", "2009-06-01")
) %>%
mutate(From = ymd(from),
To=ymd(to),
duration_days = To-From)
recessions
## # A tibble: 11 x 5
## from to From To duration_days
## <chr> <chr> <date> <date> <drtn>
## 1 1948-11-01 1949-10-01 1948-11-01 1949-10-01 334 days
## 2 1953-07-01 1954-05-01 1953-07-01 1954-05-01 304 days
## 3 1957-08-01 1958-04-01 1957-08-01 1958-04-01 243 days
## 4 1960-04-01 1961-02-01 1960-04-01 1961-02-01 306 days
## 5 1969-12-01 1970-11-01 1969-12-01 1970-11-01 335 days
## 6 1973-11-01 1975-03-01 1973-11-01 1975-03-01 485 days
## 7 1980-01-01 1980-07-01 1980-01-01 1980-07-01 182 days
## 8 1981-07-01 1982-11-01 1981-07-01 1982-11-01 488 days
## 9 1990-07-01 1991-03-01 1990-07-01 1991-03-01 243 days
## 10 2001-03-01 2001-11-01 2001-03-01 2001-11-01 245 days
## 11 2007-12-01 2009-06-01 2007-12-01 2009-06-01 548 days
geom_rect()
geom_ribbon()
. You should be familiar with this from last week’s homework on the excess weekly/monthly rentals of Santander Bikes in London.diff_df <- yield_curve %>%
select(date, price, maturity) %>%
pivot_wider(
names_from = maturity,
values_from = price
) %>%
mutate(diff = `10y` - `3m`)
recessions_df <- data.frame(xmin = as.Date(recessions$from),
xmax = as.Date(recessions$to),
ymin = -Inf,
ymax = Inf) %>%
filter(year(xmin) > 1960,
year(xmax) > 1960)
diff_df %>%
ggplot(aes(x=date, y=diff)) +
geom_line() +
geom_rug(aes(color=ifelse(diff<=0 ,"<=0 ",">0")),sides="b",show.legend = FALSE) +
ylab("Difference in 10 year - 3 month yield (%)") +
labs(title="Yield Curve inversion: 10 year minus 3 month U.S. Treasury rates",
subtitle = "Difference in % points, monthly averages\nShaded ares correspond to recessions.") +
xlab("") +
geom_hline(yintercept=0) +
theme(legend.position=NULL,
plot.caption=element_text(hjust=0),
plot.subtitle=element_text(face="italic"),
plot.title=element_text(size=12,face="bold")) +
geom_ribbon(aes(x=date, y=diff, ymin=pmin(diff_df$diff,0), ymax=0),
fill="red", col="red", alpha=0.2) +
geom_ribbon(aes(x=date, y=diff, ymin=0, ymax=pmax(diff_df$diff,0)),
fill="green", col="green", alpha=0.2) +
geom_rect(data=recessions_df, inherit.aes=F,
mapping=aes(xmin=recessions_df$xmin, xmax=recessions_df$xmax, ymin=recessions_df$ymin, ymax=recessions_df$ymax), color='grey', alpha=0.2)
## Warning: Use of `diff_df$diff` is discouraged. Use `diff` instead.
## Warning: Use of `diff_df$diff` is discouraged. Use `diff` instead.
## Warning: Use of `recessions_df$xmin` is discouraged. Use `xmin` instead.
## Warning: Use of `recessions_df$xmax` is discouraged. Use `xmax` instead.
## Warning: Use of `recessions_df$ymin` is discouraged. Use `ymin` instead.
## Warning: Use of `recessions_df$ymax` is discouraged. Use `ymax` instead.


Start
End
2015-09-06 13:14:24
Total Time Taken
Total Tests
Total Steps
Summary
To view test details, click Details on the left-sidebar or one of the links below.
| Test Name | Passed | Failed | Fatal | Error | Warning | Info | Skip | Unknown | RunStatus |
|---|


labeled
by None at 2020-09-08 01:19:40.labeled
by None at 2020-09-08 01:19:40.labeled
by James R. Griffin III at 2020-09-08 21:11:12.labeled
by James R. Griffin III at 2020-09-08 21:11:12.labeled
by James R. Griffin III at 2020-09-08 21:12:30.labeled
by James R. Griffin III at 2020-09-08 21:12:30.labeled
by James R. Griffin III at 2020-09-08 21:14:47.labeled
by James R. Griffin III at 2020-09-08 21:14:47.This turned out to be a PULFA JS issue. I should have the fix soon.
https://github.com/PrincetonUniversityLibrary/pulfa/pull/1229 should close this issue.
labeled
by Trey Pendragon at 2020-09-08 16:48:43.assigned
by Trey Pendragon at 2020-09-08 18:18:20.@kelynch had a conversation with @tpendragon , who thought it shouldn't be too much work to modify the arks-to-reconcile report (https://figgy.princeton.edu/reports/identifiers_to_reconcile) that we currently have in Figgy to return all of the arks and bibs for all open visibility items in Figgy. This would fulfill our needs, from what I can see. To be clear, the arks to reconcile report should only include completed open visibility items for this purpose (see comment from @escowles above).
mentioned
by Esmé Cowles at 2020-09-08 19:40:28.subscribed
by Esmé Cowles at 2020-09-08 19:40:28.mentioned
by Trey Pendragon at 2020-09-08 19:40:28.subscribed
by Trey Pendragon at 2020-09-08 19:40:28.mentioned
by Kate Lynch at 2020-09-08 19:40:28.subscribed
by Kate Lynch at 2020-09-08 19:40:28.deployed
by Trey Pendragon at 2020-09-08 17:16:56.review_requested
by Cliff Wulfman at 2020-09-08 17:51:33.referenced
by Trey Pendragon at 2020-09-08 20:56:06.merged
by Trey Pendragon at 2020-09-08 20:56:06.closed
by Trey Pendragon at 2020-09-08 20:56:06.head_ref_deleted
by Trey Pendragon at 2020-09-08 20:56:07.closed
by Eliot Jordan at 2020-09-08 21:25:50.referenced
by Eliot Jordan at 2020-09-08 21:25:50.merged
by Eliot Jordan at 2020-09-08 21:25:50.closed
by Eliot Jordan at 2020-09-08 21:25:50.head_ref_deleted
by Eliot Jordan at 2020-09-08 21:25:51.I see collections being saved, they're just not displaying on the show page.
referenced
by Trey Pendragon at 2020-09-08 18:29:15.assigned
by Trey Pendragon at 2020-09-08 18:29:24.closed
by Eliot Jordan at 2020-09-08 21:27:23.referenced
by Eliot Jordan at 2020-09-08 21:27:23.merged
by Eliot Jordan at 2020-09-08 21:27:23.closed
by Eliot Jordan at 2020-09-08 21:27:23.head_ref_deleted
by Eliot Jordan at 2020-09-08 21:27:24.labeled
by Kim Leaman at 2020-09-08 21:45:00.Coverage increased (+0.02%) to 80.152% when pulling 14159f48cd038538d3f636202a4b646550c99939 on 856digitalcontent into d294fad6d49fae43c3f85c9e49c6d555128f0601 on master.
referenced
by Eliot Jordan at 2020-09-08 21:30:08.merged
by Eliot Jordan at 2020-09-08 21:30:08.closed
by Eliot Jordan at 2020-09-08 21:30:08.head_ref_deleted
by Eliot Jordan at 2020-09-08 21:30:11.This is a request from Tom V. and Martin.
Tested and not fixed for the case of Figgy links - it's another branch.
referenced
by Trey Pendragon at 2020-09-08 18:43:18.closed
by Eliot Jordan at 2020-09-08 21:30:08.reopened
by Trey Pendragon at 2020-09-08 23:26:13.Coverage remained the same at 96.746% when pulling aa2fd61e3a8d79af2650ba90261660637be8c823 on dependabot/npmandyarn/http-proxy-1.18.1 into 7d06139bd81765e793924c78148e37166a77614d on master.
labeled
by None at 2020-09-07 22:20:57.labeled
by None at 2020-09-07 22:20:57.closed
by None at 2020-09-08 11:47:28.referenced
by None at 2020-09-08 11:47:27.merged
by None at 2020-09-08 11:47:28.closed
by None at 2020-09-08 11:47:28.head_ref_deleted
by None at 2020-09-08 11:47:31.assigned
by Christina Chortaria at 2020-09-08 19:34:53.labeled
by Christina Chortaria at 2020-09-08 15:09:32.referenced
by Christina Chortaria at 2020-09-08 15:29:49.closed
by None at 2020-09-08 21:55:52.Coverage remained the same at 96.746% when pulling 664493bae7c4a252f386a32842b6eec8c693bbb1 on 2230-hathi-access-oclc-lookup into b16c3d05c031343cb48af3a6738fc6c639b2de83 on master.
renamed
by Christina Chortaria at 2020-09-08 16:03:48.renamed
by Christina Chortaria at 2020-09-08 16:13:35.deployed
by Trey Pendragon at 2020-09-08 17:42:24.head_ref_force_pushed
by Christina Chortaria at 2020-09-08 19:50:22.renamed
by Christina Chortaria at 2020-09-08 19:50:50.renamed
by Christina Chortaria at 2020-09-08 20:13:43.head_ref_force_pushed
by Christina Chortaria at 2020-09-08 20:30:01.head_ref_force_pushed
by Christina Chortaria at 2020-09-08 21:14:17.renamed
by Christina Chortaria at 2020-09-08 21:16:29.deployed
by Trey Pendragon at 2020-09-08 21:17:57.referenced
by None at 2020-09-08 21:55:52.merged
by None at 2020-09-08 21:55:52.closed
by None at 2020-09-08 21:55:52.head_ref_deleted
by None at 2020-09-08 21:55:58.labeled
by Trey Pendragon at 2020-09-08 23:38:34.referenced
by Trey Pendragon at 2020-09-08 23:46:41.Wrong repo
closed
by None at 2020-09-08 12:00:17.review_requested
by Francis Kayiwa at 2020-09-08 16:21:58.referenced
by None at 2020-09-08 16:22:01.merged
by None at 2020-09-08 16:22:01.closed
by None at 2020-09-08 16:22:02.head_ref_deleted
by None at 2020-09-08 16:22:03.referenced
by None at 2020-09-08 16:58:48.merged
by None at 2020-09-08 16:58:48.closed
by None at 2020-09-08 16:58:48.head_ref_deleted
by None at 2020-09-08 16:58:49.https://maps.princeton.edu/?utf8=%E2%9C%93&search_field=all_fields&q=uva-UVA%27s+Virginia+Gazetteer cannot found
Remove UVa records.
@eliotjordan deleted the UVA records
closed
by Christina Chortaria at 2020-09-08 18:05:50.mentioned
by Eliot Jordan at 2020-09-08 18:05:50.subscribed
by Eliot Jordan at 2020-09-08 18:05:50.Related to #793
Change text to:
"Please utilize our study-browse service to make an appointment
[https://libcal.princeton.edu/seats] to come in a view the item in the Library."
closed
by None at 2020-09-08 13:43:24.reopened
by None at 2020-09-08 13:43:27.Make etasrcp location inn bibdata and then point the routines to use this location also
assigned
by None at 2020-09-08 14:47:22.referenced
by Kevin Reiss at 2020-09-08 15:44:23.merged
by Kevin Reiss at 2020-09-08 15:44:23.closed
by Kevin Reiss at 2020-09-08 15:44:23.head_ref_deleted
by Kevin Reiss at 2020-09-08 15:44:30.referenced
by Christina Chortaria at 2020-09-08 19:40:07.merged
by Christina Chortaria at 2020-09-08 19:40:07.closed
by Christina Chortaria at 2020-09-08 19:40:07.assigned
by None at 2020-09-08 11:56:04.referenced
by None at 2020-09-08 12:31:14.referenced
by None at 2020-09-08 12:53:03.closed
by Christina Chortaria at 2020-09-08 19:40:07.head_ref_force_pushed
by None at 2020-09-08 19:46:11.head_ref_force_pushed
by Axa Mei Liauw at 2020-09-08 12:42:04.head_ref_force_pushed
by Axa Mei Liauw at 2020-09-08 12:58:29.head_ref_force_pushed
by Axa Mei Liauw at 2020-09-08 16:27:30.head_ref_force_pushed
by Axa Mei Liauw at 2020-09-08 16:34:20.


AssertSet Text Input
by element
| InputText with name |
|
|
| Empty InputText with name |
|
|
| InputText with id |
|
|
| InputText identified by label |
|
|
| InputText identified by placeholder |
|
|
by layout
| directly before |
|
|
| directly before formated |
|
|
| separate element at top |
|
|
| separate element at top formated |
|
|
| separate element at left |
|
|
| separate element at left formated |
|
|
disabled
|
Set Password Input
by element
| InputPassword with name |
|
|
| Empty InputPassword with name |
|
|
| InputPassword with id |
|
|
| InputPassword identified by label |
|
|
| InputPassword identified by placeholder |
|
|
by layout
| directly before |
|
|
| directly before formated |
|
|
| separate element at top |
|
|
| separate element at top formated |
|
|
| separate element at left |
|
|
| separate element at left formated |
|
|
disabled
|
Set TextArea Input
by element
| TextArea with name |
|
|
| Empty TextArea with name |
|
|
| TextArea with id |
|
|
| TextArea identified by label |
|
|
| TextArea identified by placeholder |
|
|
by layout
| directly before |
|
|
| directly before formated |
|
|
| separate element at top |
|
|
| separate element at top formated |
|
|
| separate element at left |
|
|
| separate element at left formated |
|
|
disabled
|
AssertSet File Input
by element
| InputFile with name |
|
|
| Empty InputFile with name |
|
|
| InputFile with id |
|
|
| InputFile identified by label |
|
|
by layout
| directly before |
|
|
| directly before formated |
|
|
| separate element at top |
|
|
| separate element at top formated |
|
|
| separate element at left |
|
|
| separate element at left formated |
|
|
disabled
multiple
| InputFile for multiple files |
|
|
|


| [ << ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
<unicase.h>
This include file defines functions for case mapping for Unicode strings and case insensitive comparison of Unicode strings and C strings.
These string functions fix the problems that were mentioned in ‘char *’ strings, namely, they handle the Croatian LETTER DZ WITH CARON, the German LATIN SMALL LETTER SHARP S, the Greek sigma and the Lithuanian i correctly.
The following functions implement case mappings on Unicode characters — for those cases only where the result of the mapping is a again a single Unicode character.
These mappings are locale and context independent.
|
WARNING! These functions are not sufficient for languages such as German, Greek and Lithuanian. Better use the functions below that treat an entire string at once and are language aware. |
Returns the uppercase mapping of the Unicode character uc.
Returns the lowercase mapping of the Unicode character uc.
Returns the titlecase mapping of the Unicode character uc.
The titlecase mapping of a character is to be used when the character should look like upper case and the following characters are lower cased.
For most characters, this is the same as the uppercase mapping. There are only few characters where the title case variant and the uuper case variant are different. These characters occur in the Latin writing of the Croatian, Bosnian, and Serbian languages.
Lower case | Title case | Upper case |
|---|---|---|
LATIN SMALL LETTER LJ | LATIN CAPITAL LETTER L WITH SMALL LETTER J | LATIN CAPITAL LETTER LJ |
LATIN SMALL LETTER NJ | LATIN CAPITAL LETTER N WITH SMALL LETTER J | LATIN CAPITAL LETTER NJ |
LATIN SMALL LETTER DZ | LATIN CAPITAL LETTER D WITH SMALL LETTER Z | LATIN CAPITAL LETTER DZ |
LATIN SMALL LETTER DZ WITH CARON | LATIN CAPITAL LETTER D WITH SMALL LETTER Z WITH CARON | LATIN CAPITAL LETTER DZ WITH CARON |
Case mapping should always be performed on entire strings, not on individual characters. The functions in this sections do so.
These functions allow to apply a normalization after the case mapping. The reason is that if you want to treat ‘ä’ and ‘Ä’ the same, you most often also want to treat the composed and decomposed forms of such a character, U+00C4 LATIN CAPITAL LETTER A WITH DIAERESIS and U+0041 LATIN CAPITAL LETTER A U+0308 COMBINING DIAERESIS the same. The nf argument designates the normalization.
These functions are locale dependent. The iso639_language argument
identifies the language (e.g. "tr"
for Turkish). NULL means to use
locale independent case mappings.
Returns the ISO 639 language code of the current locale.
Returns ""
if it is unknown, or in the "C" locale.
Returns the uppercase mapping of a string.
The nf argument identifies the normalization form to apply after the case-mapping. It can also be NULL, for no normalization.
The resultbuf and lengthp arguments are as described in chapter Conventions.
Returns the lowercase mapping of a string.
The nf argument identifies the normalization form to apply after the case-mapping. It can also be NULL, for no normalization.
The resultbuf and lengthp arguments are as described in chapter Conventions.
Returns the titlecase mapping of a string.
Mapping to title case means that, in each word, the first cased character is being mapped to title case and the remaining characters of the word are being mapped to lower case.
The nf argument identifies the normalization form to apply after the case-mapping. It can also be NULL, for no normalization.
The resultbuf and lengthp arguments are as described in chapter Conventions.
Case mapping of a substring cannot simply be performed by extracting the substring and then applying the case mapping function to it. This does not work because case mapping requires some information about the surrounding characters. The following functions allow to apply case mappings to substrings of a given string, while taking into account the characters that precede it (the “prefix”) and the characters that follow it (the “suffix”).
This data type denotes the case-mapping context that is given by a prefix string. It is an immediate type that can be copied by simple assignment, without involving memory allocation. It is not an array type.
This constant is the case-mapping context that corresponds to an empty prefix string.
The following functions return casing_prefix_context_t
objects:
Returns the case-mapping context of a given prefix string.
Returns the case-mapping context of the prefix concat(a, s), given the case-mapping context of the prefix a.
This data type denotes the case-mapping context that is given by a suffix string. It is an immediate type that can be copied by simple assignment, without involving memory allocation. It is not an array type.
This constant is the case-mapping context that corresponds to an empty suffix string.
The following functions return casing_suffix_context_t
objects:
Returns the case-mapping context of a given suffix string.
Returns the case-mapping context of the suffix concat(s, a), given the case-mapping context of the suffix a.
The following functions perform a case mapping, considering the prefix context and the suffix context.
Returns the uppercase mapping of a string that is surrounded by a prefix and a suffix.
The resultbuf and lengthp arguments are as described in chapter Conventions.
Returns the lowercase mapping of a string that is surrounded by a prefix and a suffix.
The resultbuf and lengthp arguments are as described in chapter Conventions.
Returns the titlecase mapping of a string that is surrounded by a prefix and a suffix.
The resultbuf and lengthp arguments are as described in chapter Conventions.
For example, to uppercase the UTF-8 substring between s + start_index
and s + end_index
of a string that extends from s
to
s + u8_strlen (s)
, you can use the statements
size_t result_length; uint8_t result = u8_ct_toupper (s + start_index, end_index - start_index, u8_casing_prefix_context (s, start_index), u8_casing_suffix_context (s + end_index, u8_strlen (s) - end_index), iso639_language, NULL, NULL, &result_length); |
The following functions implement comparison that ignores differences in case and normalization.
Returns the case folded string.
Comparing u8_casefold (s1)
and u8_casefold (s2)
with the u8_cmp2
function is equivalent to comparing s1 and
s2 with u8_casecmp
.
The nf argument identifies the normalization form to apply after the case-mapping. It can also be NULL, for no normalization.
The resultbuf and lengthp arguments are as described in chapter Conventions.
Returns the case folded string. The case folding takes into account the case mapping contexts of the prefix and suffix strings.
The resultbuf and lengthp arguments are as described in chapter Conventions.
Compares s1 and s2, ignoring differences in case and normalization.
The nf argument identifies the normalization form to apply after the case-mapping. It can also be NULL, for no normalization.
If successful, sets *resultp
to -1 if s1 < s2,
0 if s1 = s2, 1 if s1 > s2, and returns 0.
Upon failure, returns -1 with errno
set.
The following functions additionally take into account the sorting rules of the current locale.
Converts the string s of length n to a NUL-terminated byte
sequence, in such a way that comparing u8_casexfrm (s1)
and
u8_casexfrm (s2)
with the gnulib function memcmp2
is
equivalent to comparing s1 and s2 with u8_casecoll
.
nf must be either UNINORM_NFC
, UNINORM_NFKC
, or NULL for
no normalization.
The resultbuf and lengthp arguments are as described in chapter Conventions.
Compares s1 and s2, ignoring differences in case and normalization, using the collation rules of the current locale.
The nf argument identifies the normalization form to apply after the
case-mapping. It must be either UNINORM_NFC
or UNINORM_NFKC
.
It can also be NULL, for no normalization.
If successful, sets *resultp
to -1 if s1 < s2,
0 if s1 = s2, 1 if s1 > s2, and returns 0.
Upon failure, returns -1 with errno
set.
The following functions determine whether a Unicode string is entirely in upper case. or entirely in lower case, or entirely in title case, or already case-folded.
Sets *resultp
to true if mapping NFD(s) to upper case is
a no-op, or to false otherwise, and returns 0. Upon failure, returns -1 with
errno
set.
Sets *resultp
to true if mapping NFD(s) to lower case is
a no-op, or to false otherwise, and returns 0. Upon failure, returns -1 with
errno
set.
Sets *resultp
to true if mapping NFD(s) to title case is
a no-op, or to false otherwise, and returns 0. Upon failure, returns -1 with
errno
set.
Sets *resultp
to true if applying case folding to NFD(S) is
a no-op, or to false otherwise, and returns 0. Upon failure, returns -1 with
errno
set.
The following functions determine whether case mappings have any effect on a Unicode string.
Sets *resultp
to true if case matters for s, that is, if
mapping NFD(s) to either upper case or lower case or title case is not
a no-op. Set *resultp
to false if NFD(s) maps to itself
under the upper case mapping, under the lower case mapping, and under the title
case mapping; in other words, when NFD(s) consists entirely of caseless
characters. Upon failure, returns -1 with errno
set.
| [ << ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This document was generated by Bruno Haible on January, 2 2022 using texi2html 1.78a.


p14_3_3
A large family of signal-transducing adaptor proteins present in wide variety of eukaryotes. They are PHOSPHOSERINE and PHOSPHOTHREONINE binding proteins involved in important cellular processes including SIGNAL TRANSDUCTION; CELL CYCLE control; APOPTOSIS; and cellular stress responses. 14-3-3 proteins function by interacting with other signal-transducing proteins and effecting changes in their enzymatic activity and subcellular localization. The name 14-3-3 derives from numerical designations used in the original fractionation patterns of the proteins.
(mesh:D048948)
Cross-references
Synonyms
| Synonym |
Reference |
Specificity |
| 14-3-3 proteins |
|
Exact
|
| 14-3-3 |
|
Exact
|
Incoming Relations
Outgoing Relations
None available.


runtime.heapArena.spans (field)
6 uses
runtime (current package)
mgcmark.go#L342: s := ha.spans[arenaPage+uint(i)*8+j]
mheap.go#L244: spans [pagesPerArena]*mspan
mheap.go#L657: return ha.spans[(p/pageSize)%pagesPerArena]
mheap.go#L668: return mheap_.arenas[ai.l1()][ai.l2()].spans[(p/pageSize)%pagesPerArena]
mheap.go#L845: s := ha.spans[arenaPage+uint(i)*8+j]
mheap.go#L958: ha.spans[i] = s
The pages are generated with Golds v0.2.7-preview. (GOOS=darwin GOARCH=amd64)


Utilities¶
General utilities
pytomo.utilities
- pytomo.utilities.get_temporary_str() → str¶
To use to name temporary files or folders
- pytomo.utilities.minimum_nspc(tlen: float, freq2: float) → int¶
Find the minimum nspc for accurate computation given freq2.
- Parameters
tlen – length of synthetics in seconds
freq2 – the maximum filtering frequency in Hz
- Returns
- the minimum number of frequency point for computation
of accurate synthetics
- Return type
int
- pytomo.utilities.minimum_tlen(windows) → float¶
Find the minimum tlen that includes the longest time window.
- Parameters
windows (list of Window) – time windows
- Returns
the minimum length for synthetics in seconds
- Return type
float
- pytomo.utilities.white_noise(std, size) → numpy.ndarray¶
Compute random gaussian noise


MelbPC 3D Printer
Presenter:
Mohan Gupta
SIG Convener:
Raspberry Pi SIG - Moorabbin
Website:
https://raspberrypisig.github.io
What the printer kinda looks like unmodified...
What the MelbPC 3D printer actually looks like...
Printer came as a kit...
Control board (GT2560)...
Raspberry Pi
Steps to print 3D object
Get STL file of your 3D object
Octoprint does the rest
Demo
Modifications
Enclosure & LED Lighting
Computer power supply
Metal base for increased rigidity
Problems
Print not sticking to bed
Print warping or stringy
Filament jams
Solutions
Level Bed (use dial indicator)
Buildtak/ PEI sheet (eg. http://www.aurarum.com.au/accessories/334-flasforge-build-surface-similar-to-buildtak.html)
References
Technical documentation:
https://github.com/microcontrollersig/melbpc3DPrinter
Shopping Trolley Token:
http://www.instructables.com/id/Removable-shopping-trolley-tokens


{% extends "iee_contact/contact_form_base.html" %} {% load i18n %} {% block title_form_page %}Contact us{% endblock %} {% block form_page_title %} {{ wizard.form.location.label }}
Contact the Department for Business and Trade (DBT) for questions about trade and investment.
{% endblock %} {% block form_body %}


Next week is a holiday (Patriot's Day).
The following week (April 25) is final presentations. Be prepared to stand in front of the class, demo your project, and talk about what you've learned.
You have until Sunday, May 8th at 6pm to make any final changes based on feedback. I will be sitting down at that time to grade everyone's project.
| Criteria | 60% | 75% | 90% | 100% |
|---|---|---|---|---|
| Effort | Broken project | Unfinished project | Project requirements were met | Student added many features beyond the minimum requirements |
| Design | No CSS | Some CSS, but did not incorporate feedback | Unique project design, only a few rough edges | Exceptional design aesthetic |
| Narrative | No explanatory text | Some text included, but some parts have unclear meaning | Everything is explained through clear text and labels | Project contains/enables thought-provoking insights from the data |
I will be coming around for one-on-ones to help everyone through individual problems.


Class ProjectionTarget
Target that represents the projection of an individual object of type InputType into an object of type OutputType.
Created automatically by the ProjectionTargetContainer.
Implements
Inherited Members
Namespace: Rezolver.Targets
Assembly: Rezolver.dll
Syntax
public class ProjectionTarget : TargetBase, ITarget
Constructors
| Improve this Doc View SourceProjectionTarget(ITarget, ITarget, Type, Type, Type)
Constructs a new instance of the ProjectionTarget class.
Declaration
public ProjectionTarget(ITarget inputTarget, ITarget outputTarget, Type inputType, Type outputType, Type implementationType)
Parameters
| Type | Name | Description |
|---|---|---|
| ITarget | inputTarget | The target whose result is being projected by the |
| ITarget | outputTarget | The target which produces the projected object from the result of the |
| Type | inputType | The element type of the enumerable from which the |
| Type | outputType | The element type of the enumerable into which the result of the |
| Type | implementationType | The type of object that is to be created by the |
Properties
| Improve this Doc View SourceDeclaredType
Always returns OutputType
Declaration
public override Type DeclaredType { get; }
Property Value
| Type | Description |
|---|---|
| Type |
Overrides
| Improve this Doc View SourceImplementationType
The type of object that is to be created by the OutputTarget
Declaration
public Type ImplementationType { get; }
Property Value
| Type | Description |
|---|---|
| Type |
InputTarget
The target whose result is being projected by the OutputTarget
Declaration
public ITarget InputTarget { get; }
Property Value
| Type | Description |
|---|---|
| ITarget |
InputType
The element type of the enumerable from which the InputTarget was obtained.
Declaration
public Type InputType { get; }
Property Value
| Type | Description |
|---|---|
| Type |
OutputTarget
The target which produces the projected object from the result of the InputTarget.
The expectation is that it has a dependency on an instance of InputType (e.g. via a parameter on a constructor or delegate etc).
Declaration
public ITarget OutputTarget { get; }
Property Value
| Type | Description |
|---|---|
| ITarget |
OutputType
The element type of the enumerable into which the result of the OutputTarget will go.
Declaration
public Type OutputType { get; }
Property Value
| Type | Description |
|---|---|
| Type |


Seizures
Stripes
Stripes and Patterns
Warning: Material found in these pages can cause seizures
Flashes are not required to causing disorders
The regularity of the pattern matters. It's not just "breaking up a pattern" that matters, it's how you do so. Your mind understands with clarity the image on the left, but your mind has to rectify "direction" of the stripes of the image on the right.
American Flag Source Code: Drawing In Code: An exploration of artistic observation and computational thinking
No Epilepsy, but some will see halos
Rectification comes into play
Animation comes into play
Peripheral Vision comes into play
The rods are more evenly spread across the retina, but they also become less densely packed toward the outer regions of the retina. Because there are fewer rods, you have a limited ability to resolve the shapes of objects at the periphery of your vision.
https://www.exploratorium.edu/snacks/peripheral-vision
Additional Resources on Patterns
- Characterizing the Patterned Images That PrecipitateSeizures and Optimizing Guidelines To Prevent Them
https://onlinelibrary.wiley.com/doi/epdf/10.1111/j.1528-1167.2005.01405.x - Peripheral Vision Discover the outer limits of your eyes
https://www.exploratorium.edu/snacks/peripheral-vision - Eye/Brain Physiology and Human Perception of External Reality


{% extends 'base-outer.html' %} {% block title %} Forgot your Huxley Password? {% endblock title %} {% block content %}
Advisors, our forgot password feature is currently experiencing issues. If you do not have access to your huxley account, please send an email to<EMAIL_ADDRESS>and you will receive a reply within 24 hours with your huxley username and a new password. We apologize for any inconvenience this poses, and we appreciate your understanding.
Back to Login {% endblock content %}


The startup problem
Know Your Tools (in order of importance ?)
Typescript / Javascript
Angular
rxjs
Visual Studio Code addons
The problem: when working with arrays we constantly run into similar scenarios, such as:
Find an item in an array,
join two arrays,
combine elements from two arrays,
does the array include item x,
give me the sum/median value of all ages in the person array
The solution !!!
Lets write another for loop :) !!!!
The problem with for loops...
The do have a strange way of growing
And they then become nested
And in the end, nobody really knows what they do anymore
Just dont touch them / change them... they say
The Solution !!!
Use lodash !!!!
Lo (Lodash) is great
But when it comes to arrays, much of the lodash magic now exists in JS
In fact most of these functions where already around in 2011.
| concat | copyWithin | entries | every | fill |
| filter | find | findIndex | x flatMap | x flatten |
| forEach | includes | indexOf | join | keys |
| lastIndexOf | map | pop | push | reduce |
| reduceRight | reverse | shift | slice | some |
| sort | splice | toLocaleString | toSource | toString |
| unshift | values |
| concat | copyWithin | entries | every | fill |
| filter | find | findIndex | x flatMap | x flatten |
| forEach | includes | indexOf | join | keys |
| lastIndexOf | map | pop | push | reduce |
| reduceRight | reverse | shift | slice | some |
| sort | splice | toLocaleString | toSource | toString |
| unshift | values |
The data that you get from the server is not holy
You might have additional needs on the client.
So feel free to spice up the data
(except maybe during Postback :) )
Remember your friend - map
Find the problem
{{solution.description}}
Code
Result
{{solution.information}}
This had a grain of truth in it som years ago
But the Javascript machine is much faster now
If you are optimizing, check out all network calls , io stuff and dom redrawing first
In comparison with the above, all array functions are lightning fast
usually code cleanness is worth more than a couple of ms
If you want to help out with the group, please reach out.
If you want to talk about something please reach out
you can always send me a message on meetup :)
https://amsterdamjs.com/
May 31 - June 1
CFP is open until 1 March
https://ngvikings.org/
March 1 - 2 In Helsinki, Finland


Class NoiseSocket
NoiseSocket provides an encoding layer for the Noise Protocol Framework. NoiseSocket can encode Noise messages and associated negotiation data into a form suitable for transmission over reliable, stream-based protocols such as TCP.
Inheritance
Implements
Inherited Members
Namespace: Noise
Assembly: NoiseSocket.dll
Syntax
public sealed class NoiseSocket : IDisposable
Constructors
| Improve this Doc View SourceNoiseSocket(Protocol, ProtocolConfig, Stream, Boolean)
Initializes a new instance of the NoiseSocket class.
Declaration
public NoiseSocket(Protocol protocol, ProtocolConfig config, Stream stream, bool leaveOpen = false)
Parameters
| Type | Name | Description |
|---|---|---|
| Noise.Protocol | protocol | A concrete Noise protocol (e.g. Noise_XX_25519_AESGCM_BLAKE2b). |
| Noise.ProtocolConfig | config | A set of parameters used to instantiate an initial Noise.HandshakeState. |
| System.IO.Stream | stream | The stream for reading and writing encoded protocol messages. |
| System.Boolean | leaveOpen | True to leave the stream open after the NoiseSocket object is disposed, false otherwise. |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | Thrown if either |
| System.ArgumentException | Thrown if the selected handshake pattern was a one-way pattern. |
NoiseSocket(Stream, Boolean)
Initializes a new instance of the NoiseSocket class.
Declaration
public NoiseSocket(Stream stream, bool leaveOpen = false)
Parameters
| Type | Name | Description |
|---|---|---|
| System.IO.Stream | stream | The stream for reading and writing encoded protocol messages. |
| System.Boolean | leaveOpen | True to leave the stream open after the NoiseSocket object is disposed, false otherwise. |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | Thrown if |
Properties
| Improve this Doc View SourceHandshakeHash
A value that hashes all the handshake data that's been sent and received. It uniquely identifies the Noise session. It's available only after the handshake has been completed.
Declaration
public ReadOnlySpan<byte> HandshakeHash { get; }
Property Value
| Type | Description |
|---|---|
| System.ReadOnlySpan<System.Byte> |
Exceptions
| Type | Condition |
|---|---|
| System.ObjectDisposedException | Thrown if the current instance has already been disposed. |
Methods
| Improve this Doc View SourceAccept(Protocol, ProtocolConfig)
Initializes the current instance of the NoiseSocket class with an initiator's choice of the Noise protocol.
Declaration
public void Accept(Protocol protocol, ProtocolConfig config)
Parameters
| Type | Name | Description |
|---|---|---|
| Noise.Protocol | protocol | A concrete Noise protocol (e.g. Noise_XX_25519_AESGCM_BLAKE2b). |
| Noise.ProtocolConfig | config | A set of parameters used to instantiate a Noise.HandshakeState. |
Exceptions
| Type | Condition |
|---|---|
| System.ObjectDisposedException | Thrown if the current instance has already been disposed. |
| System.NotSupportedException | Thrown if the selected handshake pattern was a one-way pattern. |
| System.InvalidOperationException | Thrown if the handshake has already been completed, the protocol has already been changed once, or this method was called by the client. |
| System.ArgumentNullException | Thrown if either |
| System.ArgumentException | Thrown if the server attempted to accept a new protocol as an initiator. |
Dispose()
Releases all resources used by the current instance of the NoiseSocket class.
Declaration
public void Dispose()
IgnoreHandshakeMessageAsync(CancellationToken)
Asynchronously consumes the handshake message from the input stream without attempting to decrypt it.
Declaration
public Task IgnoreHandshakeMessageAsync(CancellationToken cancellationToken = default(CancellationToken))
Parameters
| Type | Name | Description |
|---|---|---|
| System.Threading.CancellationToken | cancellationToken | The token to monitor for cancellation requests. |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task | A task that represents the asynchronous read operation. |
Exceptions
| Type | Condition |
|---|---|
| System.ObjectDisposedException | Thrown if either the current instance, or the input stream has already been disposed. |
| System.InvalidOperationException | Thrown if the call to this method was unexpected in the current state of this object. |
| System.IO.IOException | Thrown if an I/O error occurs. |
| System.NotSupportedException | Thrown if the stream does not support reading. |
ReadHandshakeMessageAsync(CancellationToken)
Asynchronously reads the handshake message from the input stream.
Declaration
public Task<byte[]> ReadHandshakeMessageAsync(CancellationToken cancellationToken = default(CancellationToken))
Parameters
| Type | Name | Description |
|---|---|---|
| System.Threading.CancellationToken | cancellationToken | The token to monitor for cancellation requests. |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<System.Byte[]> | A task that represents the asynchronous read operation. The result of the task contains the decrypted message body. |
Remarks
This method can also throw all exceptions that Noise.Protocol.Create(Noise.ProtocolConfig) and Noise.HandshakeState.Fallback(Noise.Protocol,Noise.ProtocolConfig) methods can throw. See Noise.Protocol and Noise.HandshakeState documentation for more details.
Exceptions
| Type | Condition |
|---|---|
| System.ObjectDisposedException | Thrown if either the current instance, or the input stream has already been disposed. |
| System.InvalidOperationException | Thrown if the call to this method was unexpected in the current state of this object. |
| System.ArgumentException | Thrown if the decrypted message body length was invalid. |
| System.Security.Cryptography.CryptographicException | Thrown if the decryption of the message has failed. |
| System.IO.IOException | Thrown if an I/O error occurs. |
| System.NotSupportedException | Thrown if the stream does not support reading. |
ReadMessageAsync(CancellationToken)
Asynchronously reads the transport message from the input stream.
Declaration
public Task<byte[]> ReadMessageAsync(CancellationToken cancellationToken = default(CancellationToken))
Parameters
| Type | Name | Description |
|---|---|---|
| System.Threading.CancellationToken | cancellationToken | The token to monitor for cancellation requests. |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<System.Byte[]> | A task that represents the asynchronous read operation. The result of the task contains the decrypted message body. |
Exceptions
| Type | Condition |
|---|---|
| System.ObjectDisposedException | Thrown if either the current instance, or the input stream has already been disposed. |
| System.InvalidOperationException | Thrown if the handshake has not yet been completed, or the initiator has attempted to read a message from a one-way stream. |
| System.ArgumentException | Thrown if the decrypted message body length was invalid. |
| System.Security.Cryptography.CryptographicException | Thrown if the decryption of the message has failed. |
| System.IO.IOException | Thrown if an I/O error occurs. |
| System.NotSupportedException | Thrown if the stream does not support reading. |
ReadNegotiationDataAsync(CancellationToken)
Asynchronously reads the negotiation data from the input stream.
Declaration
public Task<byte[]> ReadNegotiationDataAsync(CancellationToken cancellationToken = default(CancellationToken))
Parameters
| Type | Name | Description |
|---|---|---|
| System.Threading.CancellationToken | cancellationToken | The token to monitor for cancellation requests. |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<System.Byte[]> | A task that represents the asynchronous read operation. The result of the task contains the negotiation data. |
Exceptions
| Type | Condition |
|---|---|
| System.ObjectDisposedException | Thrown if either the current instance, or the input stream has already been disposed. |
| System.InvalidOperationException | Thrown if the call to this method was unexpected in the current state of this object. |
| System.IO.IOException | Thrown if an I/O error occurs. |
| System.NotSupportedException | Thrown if the stream does not support reading. |
Retry(Protocol, ProtocolConfig)
Reinitializes the current instance of the NoiseSocket class with a new Noise protocol, different from the initial Noise protocol. The reason for the reinitialization was responder's retry request.
Declaration
public void Retry(Protocol protocol, ProtocolConfig config)
Parameters
| Type | Name | Description |
|---|---|---|
| Noise.Protocol | protocol | A concrete Noise protocol (e.g. Noise_XX_25519_AESGCM_BLAKE2b). |
| Noise.ProtocolConfig | config | A set of parameters used to instantiate a Noise.HandshakeState. |
Exceptions
| Type | Condition |
|---|---|
| System.ObjectDisposedException | Thrown if the current instance has already been disposed. |
| System.NotSupportedException | Thrown if the selected handshake pattern was a one-way pattern. |
| System.InvalidOperationException | Thrown if the handshake has already been completed or the protocol has already been changed once. |
| System.ArgumentNullException | Thrown if either |
| System.ArgumentException | Thrown if the client attempted to retry with a new protocol as a responder, or the server attempted to retry with a new protocol as an initiator. |
Switch(Protocol, ProtocolConfig)
Reinitializes the current instance of the NoiseSocket class with a new Noise protocol, different from the initial Noise protocol. The reason for the reinitialization was responder's decision to switch protocol.
Declaration
public void Switch(Protocol protocol, ProtocolConfig config)
Parameters
| Type | Name | Description |
|---|---|---|
| Noise.Protocol | protocol | A concrete Noise protocol (e.g. Noise_XX_25519_AESGCM_BLAKE2b). |
| Noise.ProtocolConfig | config | A set of parameters used to instantiate a Noise.HandshakeState. |
Exceptions
| Type | Condition |
|---|---|
| System.ObjectDisposedException | Thrown if the current instance has already been disposed. |
| System.NotSupportedException | Thrown if the selected handshake pattern was a one-way pattern. |
| System.InvalidOperationException | Thrown if the handshake has already been completed, the protocol has already been changed once, or the server attempted to perform the fallback handshake without being previously initialized. |
| System.ArgumentNullException | Thrown if either |
| System.ArgumentException | Thrown if the client attempted to switch to a new protocol as an initiator, or the server attempted to switch to a new protocol as a responder. |
WriteEmptyHandshakeMessageAsync(Memory<Byte>, CancellationToken)
Asynchronously writes the negotiation data and the empty handshake message to the input stream. Called by the server when rejecting the initial protocol, or requesting a retry from the client.
Declaration
public Task WriteEmptyHandshakeMessageAsync(Memory<byte> negotiationData = default(Memory<byte>), CancellationToken cancellationToken = default(CancellationToken))
Parameters
| Type | Name | Description |
|---|---|---|
| System.Memory<System.Byte> | negotiationData | The negotiation data. |
| System.Threading.CancellationToken | cancellationToken | The token to monitor for cancellation requests. |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task | A task that represents the asynchronous write operation. |
Exceptions
| Type | Condition |
|---|---|
| System.ObjectDisposedException | Thrown if either the current instance, or the output stream has already been disposed. |
| System.InvalidOperationException | Thrown if the call to this method was unexpected in the current state of this object. |
| System.ArgumentException | Thrown if the negotiation data was greater than Noise.Protocol.MaxMessageLength bytes in length. |
| System.IO.IOException | Thrown if an I/O error occurs. |
| System.NotSupportedException | Thrown if the stream does not support reading. |
WriteHandshakeMessageAsync(Memory<Byte>, Memory<Byte>, UInt16, CancellationToken)
Asynchronously writes the negotiation data and the handshake message to the input stream.
Declaration
public Task WriteHandshakeMessageAsync(Memory<byte> negotiationData = default(Memory<byte>), Memory<byte> messageBody = default(Memory<byte>), ushort paddedLength = 0, CancellationToken cancellationToken = default(CancellationToken))
Parameters
| Type | Name | Description |
|---|---|---|
| System.Memory<System.Byte> | negotiationData | The negotiation data. |
| System.Memory<System.Byte> | messageBody | The message body to encrypt. |
| System.UInt16 | paddedLength | If this message has an encrypted payload and the length of the
|
| System.Threading.CancellationToken | cancellationToken | The token to monitor for cancellation requests. |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task | A task that represents the asynchronous write operation. |
Remarks
This method can also throw all exceptions that Noise.Protocol.Create(Noise.ProtocolConfig) and Noise.HandshakeState.Fallback(Noise.Protocol,Noise.ProtocolConfig) methods can throw. See Noise.Protocol and Noise.HandshakeState documentation for more details.
Exceptions
| Type | Condition |
|---|---|
| System.ObjectDisposedException | Thrown if either the current instance, or the output stream has already been disposed. |
| System.InvalidOperationException | Thrown if the call to this method was unexpected in the current state of this object. |
| System.ArgumentException | Thrown if either the negotiation data, or the Noise message was greater than Noise.Protocol.MaxMessageLength bytes in length. |
| System.IO.IOException | Thrown if an I/O error occurs. |
| System.NotSupportedException | Thrown if the stream does not support reading. |
WriteMessageAsync(Memory<Byte>, UInt16, CancellationToken)
Asynchronously writes the transport message to the input stream.
Declaration
public Task WriteMessageAsync(Memory<byte> messageBody, ushort paddedLength = 0, CancellationToken cancellationToken = default(CancellationToken))
Parameters
| Type | Name | Description |
|---|---|---|
| System.Memory<System.Byte> | messageBody | The message body to encrypt. |
| System.UInt16 | paddedLength | If the length of the |
| System.Threading.CancellationToken | cancellationToken | The token to monitor for cancellation requests. |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task | A task that represents the asynchronous write operation. |
Exceptions
| Type | Condition |
|---|---|
| System.ObjectDisposedException | Thrown if either the current instance, or the output stream has already been disposed. |
| System.InvalidOperationException | Thrown if the handshake has not yet been completed, or the responder has attempted to write a message to a one-way stream. |
| System.ArgumentException | Thrown if the encrypted payload was greater than Noise.Protocol.MaxMessageLength bytes in length. |
| System.IO.IOException | Thrown if an I/O error occurs. |
| System.NotSupportedException | Thrown if the stream does not support writing. |


Lists the notifications being subscribed to for the current account.
A notification subscription will, when the set conditions are met, cause an entry to be made in the NOTIFICATIONS list. In addition to this list, Notification Subscribers can be created for sending email and text messages to registered account users.
Notification subscriptions having been assigned multiple devices will have a more (...) symbol in their Devices field. Click to the right of the symbol to open up the list of devices.
Double-click on a subscription row to view and edit that subscription.
Currently, notifications can be issued for landmark arrivals and departures.


Here you can find information about Cake alias methods and properties.
| HasArgument(string) | Method | Determines whether or not the specified argument exist. |
| Argument(string) | Method | Gets an argument and throws if the argument is missing. |
| Argument(string, T) | Method | Gets an argument and returns the provided defaultValue if the argument is missing. |
| CreateAssemblyInfo(FilePath, AssemblyInfoSettings) | Method | Creates an assembly information file. |
| ParseAssemblyInfo(FilePath) | Method | Parses an existing assembly information file. |
| BuildSystem | Property | Gets a BuildSystem instance that can be used to query for information about the current build system. |
| AppVeyor | Property | Gets a AppVeyorProvider instance that can be used to manipulate the AppVeyor environment. |
| Zip(DirectoryPath, FilePath) | Method | Zips the specified directory. |
| Zip(DirectoryPath, FilePath, string) | Method | Zips the files matching the specified pattern. |
| Zip(DirectoryPath, FilePath, IEnumerable<FilePath>) | Method | Zips the specified files. |
| Zip(DirectoryPath, FilePath, IEnumerable<string>) | Method | Zips the specified files. |
| CleanDirectories(string) | Method | Cleans the directories matching the specified pattern. Cleaning the directory will remove all it's content but not the directory itself. |
| CleanDirectories(IEnumerable<DirectoryPath>) | Method | Cleans the specified directories. Cleaning a directory will remove all it's content but not the directory itself. |
| CleanDirectories(IEnumerable<string>) | Method | Cleans the specified directories. Cleaning a directory will remove all it's content but not the directory itself. |
| CleanDirectory(DirectoryPath) | Method | Cleans the specified directory. |
| CleanDirectory(DirectoryPath, Func<IFileSystemInfobool>) | Method | Cleans the specified directory. |
| CopyDirectory(DirectoryPath, DirectoryPath) | Method | Copies a directory to the specified location. |
| CreateDirectory(DirectoryPath) | Method | Creates the specified directory. |
| DeleteDirectories(IEnumerable<DirectoryPath>, bool) | Method | Deletes the specified directories. |
| DeleteDirectories(IEnumerable<string>, bool) | Method | Deletes the specified directories. |
| DeleteDirectory(DirectoryPath, bool) | Method | Deletes the specified directory. |
| DirectoryExists(DirectoryPath) | Method | Determines whether the given path refers to an existing directory. |
| EnvironmentVariable(string) | Method |
Retrieves the value of the environment variable or null if the environment variable do not exist.
|
| HasEnvironmentVariable(string) | Method | Checks for the existence of a value for a given environment variable. |
| CopyFileToDirectory(FilePath, DirectoryPath) | Method | Copies an existing file to a new location. |
| CopyFile(FilePath, FilePath) | Method | Copies an existing file to a new file, providing the option to specify a new file name. |
| CopyFiles(string, DirectoryPath) | Method | Copies all files matching the provided pattern to a new location. |
| CopyFiles(IEnumerable<FilePath>, DirectoryPath) | Method | Copies existing files to a new location. |
| CopyFiles(IEnumerable<string>, DirectoryPath) | Method | Copies existing files to a new location. |
| DeleteFiles(string) | Method | Deletes the specified files. |
| DeleteFiles(IEnumerable<FilePath>) | Method | Deletes the specified files. |
| DeleteFile(FilePath) | Method | Deletes the specified file. |
| FileExists(FilePath) | Method | Determines whether the given path refers to an existing file. |
| MoveFileToDirectory(FilePath, DirectoryPath) | Method | Moves an existing file to a new location. |
| MoveFiles(string, DirectoryPath) | Method | Moves existing files matching the specified pattern to a new location. |
| MoveFiles(IEnumerable<FilePath>, DirectoryPath) | Method | Moves existing files to a new location. |
| MoveFile(FilePath, FilePath) | Method | Moves an existing file to a new location, providing the option to specify a new file name. |
| GetDirectories(string) | Method | Gets all directory matching the specified pattern. |
| GetFiles(string) | Method | Gets all files matching the specified pattern. |
| ILMerge(FilePath, FilePath, IEnumerable<FilePath>) | Method | Merges the specified assemblies. |
| ILMerge(FilePath, FilePath, IEnumerable<FilePath>, ILMergeSettings) | Method | Merges the specified assemblies. |
| Error(string, Object[]) | Method | Writes an error message to the log using the specified format information. |
| Warning(string, Object[]) | Method | Writes a warning message to the log using the specified format information. |
| Information(string, Object[]) | Method | Writes an informational message to the log using the specified format information. |
| Verbose(string, Object[]) | Method | Writes a verbose message to the log using the specified format information. |
| Debug(string, Object[]) | Method | Writes a debug message to the log using the specified format information. |
| CakeExecuteScript(FilePath) | Method | Executes cake script out of process |
| CakeExecuteScript(FilePath, CakeSettings) | Method | Executes cake script out of process |
| CakeExecuteExpression(string) | Method | Executes Cake expression out of process |
| CakeExecuteExpression(string, CakeSettings) | Method | Executes Cake expression out of process |
| MSBuild(FilePath) | Method | Builds the specified solution using MSBuild. |
| MSBuild(FilePath, Action<MSBuildSettings>) | Method | Builds the specified solution using MSBuild. |
| ParseSolution(FilePath) | Method | Parses project information from a solution file. |
| ParseProject(FilePath) | Method | Parses project information from project file |
| ParseXmlDocExampleCode(FilePath) | Method | Parses Xml documentation example code from given path. |
| ParseXmlDocFilesExampleCode(string) | Method | Parses Xml documentation example code from file(s) using given pattern. |
| MSTest(string) | Method | Runs all MSTest unit tests in the assemblies matching the specified pattern. |
| MSTest(string, MSTestSettings) | Method | Runs all MSTest unit tests in the assemblies matching the specified pattern. |
| MSTest(IEnumerable<FilePath>) | Method | Runs all MSTest unit tests in the specified assemblies. |
| MSTest(IEnumerable<FilePath>, MSTestSettings) | Method | Runs all MSTest unit tests in the specified assemblies. |
| MakeNSIS(FilePath) | Method | Compiles the given NSIS script using the default settings. |
| MakeNSIS(FilePath, MakeNSISSettings) | Method | Compiles the given NSIS script using the given settings. |
| NuGetAddSource(string, string) | Method | Adds NuGet package source using the specified name &source to global user config |
| NuGetAddSource(string, string, NuGetSourcesSettings) | Method | Adds NuGet package source using the specified name, source & settings to global user config |
| NuGetHasSource(string) | Method | Checks whether or not a NuGet package source exists in the global user configuration, using the specified source. |
| NuGetHasSource(string, NuGetSourcesSettings) | Method | Checks whether or not a NuGet package source exists in the global user configuration, using the specified source and settings. |
| NuGetInstall(string) | Method | Installs a NuGet package. |
| NuGetInstall(string, NuGetInstallSettings) | Method | Installs a NuGet package using the specified settings. |
| NuGetInstallFromConfig(FilePath) | Method | Installs NuGet packages using the specified package configuration. |
| NuGetInstallFromConfig(FilePath, NuGetInstallSettings) | Method | Installs NuGet packages using the specified package configuration and settings. |
| NuGetPack(FilePath, NuGetPackSettings) | Method | Creates a NuGet package using the specified Nuspec file. |
| NuGetPush(FilePath, NuGetPushSettings) | Method | Pushes a NuGet package to a NuGet server and publishes it. |
| NuGetRemoveSource(string, string) | Method | Removes NuGet package source using the specified name & source from global user config |
| NuGetRemoveSource(string, string, NuGetSourcesSettings) | Method | Removes NuGet package source using the specified name, source & settings from global user config |
| NuGetRestore(FilePath) | Method | Restores NuGet packages for the specified target. |
| NuGetRestore(FilePath, NuGetRestoreSettings) | Method | Restores NuGet packages using the specified settings. |
| NUnit(string) | Method | Runs all NUnit unit tests in the assemblies matching the specified pattern. |
| NUnit(string, NUnitSettings) | Method | Runs all NUnit unit tests in the assemblies matching the specified pattern, using the specified settings. |
| NUnit(IEnumerable<string>) | Method | Runs all NUnit unit tests in the specified assemblies. |
| NUnit(IEnumerable<FilePath>) | Method | Runs all NUnit unit tests in the specified assemblies. |
| NUnit(IEnumerable<string>, NUnitSettings) | Method | Runs all NUnit unit tests in the specified assemblies, using the specified settings. |
| NUnit(IEnumerable<FilePath>, NUnitSettings) | Method | Runs all NUnit unit tests in the specified assemblies, using the specified settings. |
| StartProcess(FilePath) | Method | Starts the process resource that is specified by the filename. |
| StartProcess(FilePath, ProcessSettings) | Method | Starts the process resource that is specified by the filename and settings. |
| StartProcess(FilePath, ProcessSettings, out IEnumerable) | Method |
| ParseAllReleaseNotes(FilePath) | Method | Parses all release notes. |
| ParseReleaseNotes(FilePath) | Method | Parses the latest release notes. |
| CalculateFileHash(FilePath) | Method | Calculates the hash for a given file using the default (SHA256) algorithm. |
| CalculateFileHash(FilePath, HashAlgorithm) | Method | Calculates the hash for a given file. |
| Sign(string, SignToolSignSettings) | Method | Signs the specified assembly. |
| Sign(FilePath, SignToolSignSettings) | Method | Signs the specified assembly. |
| Sign(IEnumerable<string>, SignToolSignSettings) | Method | Signs the specified assemblies. |
| Sign(IEnumerable<FilePath>, SignToolSignSettings) | Method | Signs the specified assemblies. |
| TransformText(string) | Method | Creates a text transformation from the provided template. |
| TransformTextFile(FilePath) | Method | Creates a text transformation from the provided template on disc. |
| WiXCandle(string, CandleSettings) | Method |
Compiles all .wxs sources matching the specified pattern.
|
| WiXCandle(IEnumerable<FilePath>, CandleSettings) | Method |
Compiles all .wxs sources in the provided source files.
|
| WiXLight(string, LightSettings) | Method |
Links all .wixobj files matching the specified pattern.
|
| WiXLight(IEnumerable<FilePath>, LightSettings) | Method |
Links all .wixobj files in the provided object files.
|
| XUnit(string) | Method | Runs all xUnit.net tests in the assemblies matching the specified pattern. |
| XUnit(string, XUnitSettings) | Method | Runs all xUnit.net tests in the assemblies matching the specified pattern. |
| XUnit(IEnumerable<string>) | Method | Runs all xUnit.net tests in the specified assemblies. |
| XUnit(IEnumerable<FilePath>) | Method | Runs all xUnit.net tests in the specified assemblies. |
| XUnit(IEnumerable<string>, XUnitSettings) | Method | Runs all xUnit.net tests in the specified assemblies. |
| XUnit(IEnumerable<FilePath>, XUnitSettings) | Method | Runs all xUnit.net tests in the specified assemblies. |
| XUnit2(string) | Method | Runs all xUnit.net v2 tests in the assemblies matching the specified pattern. |
| XUnit2(string, XUnit2Settings) | Method | Runs all xUnit.net v2 tests in the assemblies matching the specified pattern. |
| XUnit2(IEnumerable<string>) | Method | Runs all xUnit.net v2 tests in the specified assemblies. |
| XUnit2(IEnumerable<FilePath>) | Method | Runs all xUnit.net tests in the specified assemblies. |
| XUnit2(IEnumerable<string>, XUnit2Settings) | Method | Runs all xUnit.net v2 tests in the specified assemblies. |
| XUnit2(IEnumerable<FilePath>, XUnit2Settings) | Method | Runs all xUnit.net v2 tests in the specified assemblies. |


The Solar System can be divided into two planetary divisions. Divided based upon the distance from the Sun and physical characteristics, the inner planets are termed terrestrial while the outer are respectively termed Jovian planets.
Similar to the morphology of Earth, the terrestrial planets include Mercury, Venus, Earth, Moon and Mars.
Characteristically, the inner planets share comparable sizes, densities, and structures. The composition of these worlds is rocky in nature with high boiling points. Originating from a concentration of hydrogen and helium gas and dust, the Solar System with terrestrial planets emerged.
Further, the light compounds that formed the terrestrial planets soon vaporized by their close proximity to the Sunís heat.
Between the orbits of Mars and Jupiter float numerous celestial bodies: the asteroids.
Coincidentally, the Jovian planets retained the lighter and colder gases within their compositions because of their distance.
Moreover, the Jovian planets seem far more massive than the closer planets and are able to hold hydrogen, water, ammonia, and methane within their icy atmospheres.
The Jovian planets are Jupiter, Saturn, Uranus, Neptune and Pluto.
Outside Pluto's orbit the comets reside. Every year we see them when a couple move close to the Earth


Functional tests for Validate, LiveValidation, and LiveValidationForm classes (compressed standalone version)
Presence will fail if there is no value entered in the field.
Enter the field then click somewhere else:
Format in its normal state will fail if the value DOES NOT match the regular expression.
Should contain the phrase “live”, anywhere, in any case:
Format with parameter negate set to false will fail if the value DOES match the regular expression (does the opposite of the normal Format).
Should NOT contain the phrase “live”, anywhere, in any case:
This kind of validation is concerned with numbers. It can handle scientific numbers (ie. 2e3, being 2000), floats (numbers with a decimal place), and negative numbers properly as you would expect it to throughout, both in values and parameters.
This example will check if the value provided is a number, or can be converted into a number successfully (ie from a string - the value of a text input is a string). This is performed on every type of Numericality validation automatically, but can be used in its simplest form like this, if you only want to make sure the value entered is a number.
Should be a number:
This example will check that the number supplied is, or equates to, an integer (ie. no decimal places).
Should be an integer:
This example will check that the value is the same as, or equates to, a specific number that you supply.
Should be 2000 (or scientific representation of it, 2e3):
This example will check that the value is more than or equal to a minimum number that you supply.
Should be 2000 or higher (or scientific representation of it, 2e3):
This example will check that the value is less than or equal to a maximum number that you supply.
Should be 2000 or lower (or scientific representation of it, 2e3):
This example will check that the value is a number that falls within a range that you supply. This is done supplying both a ‘minimum’ and ‘maximum’.
Should be between 2000 and 2003:
Most of the above parameters can be combined, the only execption being that you cannot combine ‘is’ with ‘minimum’ or ‘maximum’, if this is done ‘is’ will take precedence. This example will check that the value is a number that falls within a range that you supply, and that it is an integer. This is done supplying both a ‘minimum’ and ‘maximum’, and true for ‘onlyInteger’.
Should be between 2000 and 2003, and also be an integer:
Length is concerned with the number of characters in a value. You can do various validations on it, like check it is a specific length, less than or equal to a maximum length, greater than or equal to a minimum length, or falls within a range of lengths.
This example will check that the value is the exact length of which you supply.
Should be 4 characters in length:
This example will check that the value is more than or equal to a minimum length that you supply.
Should be 4 or more characters in length:
This example will check that the value is less than or equal to a maximum length that you supply.
Should be 4 or less characters in length:
This example will check that the value is a number that falls within a range that you supply. This is done supplying both a ‘minimum’ and ‘maximum’.
Should be between 4 and 8 characters in length:
Inclusion lets you validate against a list of allowed values. You can do an exact match or a partial match.
This example will check that the value is the same as any in your allowed values.
Should be “cow”, “pigeon”, or “giraffe”:
This example will check that the value is the same as any in your allowed values, treating strings as case insensitive. Allow case insensitivity by setting the ‘caseSensitive’ parameter to be false.
Should be “cow”, “pigeon”, or “giraffe”, using any case:
This example will check that any part of the value matches something in the allowed list. Allow this by setting the ‘partialMatch’ parameter to be true.
Should contain “cow”, “pigeon”, or “giraffe” somewhere in your entry:
This example will check that the value is the same as any in your allowed values, treating strings as case insensitive.
Should contain “cow”, “pigeon”, or “giraffe” somewhere in your entry, using any case:
Exclusion lets you validate against a list of values that are not allowed. You can do an exact match or a partial match.
This example will check that the value is not the same as any in your allowed values.
Should not be “cow”, “pigeon”, or “giraffe”:
This example will check that the value is not the same as any in your allowed values, treating strings as case insensitive. Allow case insensitivity by setting the ‘caseSensitive’ parameter to be false.
Should not be “cow”, “pigeon”, or “giraffe”, using any case:
This example will check that no part of the value matches something in the disallowed list. Allow this by setting the ‘partialMatch’ parameter to be true.
Should not contain “cow”, “pigeon”, or “giraffe” anywhere in your entry:
This example will check that no part of the value matches something in the disallowed list, treating strings as case insensitive.
Should not contain “cow”, “pigeon”, or “giraffe” anywhere in your entry, using any case:
Acceptance lets you validate that a checkbox has been checked.
I accept that LiveValidation is the validation of my dreams:
This is used to check that the value of the confirmation field matches that of another field. The most common use for this is for passwords, as demonstrated below, but will work just as well on other field types.
Enter a password:
Confirm password:
The email validation is not a real kind of validation in the sense that it actually uses the Validate.Format function to do its validation. It is essentially a validation that is done often enough to merit its own function so you don’t have to remember the long regular expression and custom failureMessage each time you want to validate an email.
It also serves as an example for the more adventurous of you, who want to make your own library of custom validations that you will use often. These will most likely include things like postcodes, telephone numbers, dates etc. which vary far too widely to include here, but it was felt that email addresses are generic enough to warrant inclusion, so here you go.
Should be an email address:
Most of the time, you will want to combine multiple types of validation on a single field. As your user is given real-time feedback, it would also be good to be able to specify an order in which they fail, so that the most appropriate message is displayed to avoid any confusion.
LiveValidation makes this easy. You simply keep adding validations to the same LiveValidation object, and they will fail in the order they are added.
The most usual combination you will use is Validate.Presence with one or more other validations, as only Validate.Presence, Validate.Confirmation and Validate.Acceptance will fail and display their message on an empty field. This is because it is common to have fields which are optional, but if the user decides to provide information, then it must be less than a certain length etc. Therefore if you want to ensure a field is filled in, you must add a Validate.Presence, then if you require any more validation types add them too.
You have already seen an example of a composite validation in the homepage example. The following example checks that the field is not empty, then checks that it is an email address, and then makes sure it is between 10 and 20 characters long.
Enter an email address (10 - 20 characters long):
When a LiveValidation object is instanciated, if it finds it is a child of a form, it will automatically attach itself to the submit event of the form, so when it is submitted, validation on all the LiveValidation objects inside it will be performed automatically. If any of the validations fail it will stop the form submitting.
You can also specify the onlyOnSubmit option to be true when you create the LiveValidation object to make it only validate when the form is submitted. This is demonstrated in the following example.
Note also that the email field has no validation that it is present, therefore if this is not filled in the form will still be valid, as it will be treated as an optional field.
There are various options that can be overridden when instatiating a LiveValidation object.
Setting onlyOnBlur to be true will mean the validation will only be run when the field loses focus.
Must be filled in:
Setting wait to a number (of milliseconds), will mean that the validation will not run until your chosen time after the last keystroke ocurred. This allows the user to type in their data without saying it has failed before they have had the chance to finish, by which time it may be valid, but it will still be validated without having to leave the field.
Must be filled in, and at least 10 characters long:
Setting onlyOnSubmit to be true will cause validation to be run on a field, only when the form it belongs to is submitted.
LiveValidation can be used with various input elements (text, password, checkbox), textarea elements, and select elements.
This example will check that the value is filled in.
Must be filled in:
This example will check that the value is the same as the previous text field.
Must be same as the previous text field’s value:
This example will check that the checkbox is checked.
Accept by checking the box:
This example will check that the value is filled in.
Must be filled in:
This example will check that the value is not the same as any in your allowed values.
Should be “Hello world”, or “Howdy”:
This example will check that the value is filled in.
Must be filled in:


This is a game of code breaking skill, where the computer can break the code!
Instructions:
Chose a 4 digit number where each digit is between 1 and 6 (inclusive), write this number down so it isn't forgotten (this is the number that the computer will attempt to find)
The computer will present a series of guesses to you, and you must give feedback during the guess promt in the following ways:
The computer should find your code in 5 guesses! Click the button to begin.


Content text at top of page if user wants...
300 Characters Content-- Lorem ip, sum text er. Lorem ip, sum text er. Lorem ip, sum text er. Lorem ip, sum text er. Lorem ip, sum text er. Lorem ip, sum text er. Lorem ip, sum text er. Lorem ip, sum text er. Lorem ip, sum text er. Lorem ip, sum text er. Lorem ip, sum text er.
Content Page Result Above
ORCID: 0000-0002-4510-0385
Firstname: Joe
Lastname: Bloggs
Award/Medal Type: Medal
Year Awarded: 2013
300 Characters Citation -- Lorem ip, sum text er. Lorem ip, sum text er. Lorem ip, sum text er. Lorem ip, sum text er. Lorem ip, sum text er. Lorem ip, sum text er. Lorem ip, sum text er. Lorem ip, sum text er. Lorem ip, sum text er. Lorem ip, sum text er. Lorem ip, sum text er.
Award/Medal Result Above
ORCID: 0000-0002-4510-0385
Research Contract Number: 002112345
Firstname: Joe
Lastname: Bloggs
Class of memberships: Associate Member
Organisation: Geoscience Society of New Zealand
Year Joined: 2012
Awards and Medals revieved: Rumford Medal, Copley Medal
Research Funding: $8400.00
Researcher/Funding Result Above
300 Characters Document -- Lorem ip, sum text er. Lorem ip, sum text er. Lorem ip, sum text er. Lorem ip, sum text er. Lorem ip, sum text er. Lorem ip, sum text er. Lorem ip, sum text er. Lorem ip, sum text er. Lorem ip, sum text er. Lorem ip, sum text er. Lorem ip, sum text er.
Document Result Above


class TaxModificationForm extends TaxCreationForm
Class TaxModificationForm
Methods
|
__construct(Request $request, $type = 'form', $data = array(), $options = array(), TaxEngine $taxEngine = null)
|
from TaxCreationForm | |
| string |
getName()
|
|
|
verifyTaxId($value, ExecutionContextInterface $context)
|
Details
in TaxCreationForm at line 34
public
__construct(Request $request, $type = 'form', $data = array(), $options = array(), TaxEngine $taxEngine = null)
at line 47
public string
getName()
at line 52
public
verifyTaxId($value, ExecutionContextInterface $context)


Extracts raster and zonal statistics from satellite nightlight rasters downloaded from the United States National Oceanic and Atmospheric Administration (<http://www.noaa.gov>) free data repositories. Both the DMSP-OLS annual and SNPP-VIIRS monthly nightlight raster data are supported. Satellite nightlight raster tiles are downloaded and cropped to the country boundaries using shapefiles from the GADM database of Global Administrative Areas (<http://gadm.org>). Zonal statistics are then calculated at the lowest administrative boundary for the selected country and cached locally for future retrieval. Finally, a simple data explorer/browser is included that allows one to visualize the cached data e.g. graphing, mapping and clustering regional data.
| Version: | 0.2.3 |
| Imports: | cleangeo, compiler, data.table, doSNOW, dplyr, ff, ffbase, foreach, lubridate, methods, raster, readr, reshape2, rgdal, rgeos, R.utils, rvest, rworldmap, settings, snow, sp, stats, stringr, utils, xml2 |
| Suggests: | dendextend, DT, gdalUtils, ggdendro, ggplot2, leaflet, plotly, RColorBrewer, shiny, shinydashboard, testthat |
| Published: | 2018-10-13 |
| Author: | Christopher Njuguna [aut, cre, cph] |
| Maintainer: | Christopher Njuguna <chris.njuguna at gmail.com> |
| BugReports: | https://github.com/chrisvwn/Rnightlights/issues |
| License: | GPL-3 |
| URL: | https://github.com/chrisvwn/Rnightlights |
| NeedsCompilation: | no |
| SystemRequirements: | aria2, curl, gdal, wget |
| CRAN checks: | Rnightlights results |
| Reference manual: | Rnightlights.pdf |
| Package source: | Rnightlights_0.2.3.tar.gz |
| Windows binaries: | r-devel: Rnightlights_0.2.3.zip, r-release: Rnightlights_0.2.3.zip, r-oldrel: Rnightlights_0.2.3.zip |
| OS X binaries: | r-release: Rnightlights_0.2.3.tgz, r-oldrel: Rnightlights_0.2.3.tgz |
| Old sources: | Rnightlights archive |
Please use the canonical form https://CRAN.R-project.org/package=Rnightlights to link to this page.


Before Change
utt.seed_rng()
// "average_exc_pad" is disabled for versions < 4004
if dnn.version(raises=False) < 4004:
modes = ("max", "average_inc_pad")
else:
modes = ("max", "average_inc_pad", "average_exc_pad")
for n_non_pool_dims in (0, 1, 2, 3):
for ws in ((2, 2), (3, 3, 3)):
// create input shape: non-pooling dimensions
// followed by 2 or 3 pooling dimensions
After Change
raise SkipTest(dnn.dnn_available.msg)
utt.seed_rng()
modes = get_dnn_pool_modes()
for n_non_pool_dims in (0, 1, 2, 3):
for ws in ((2, 2), (3, 3, 3)):
// create input shape: non-pooling dimensions


Performance
| From
|
To
|
Employee
|
Performance
|
|
|---|---|---|---|---|
| [[ formatedDate(row.fromdate) ]] | [[ formatedDate(row.todate) ]] | [[ row.employee[0].name ]] | [[ row.net_score]] % |
| Factor | Max. Score | Weight | Obtained Score | |
|---|---|---|---|---|
| [[ row.name]] |


Thank you
< Here goes the debrief and thanks, and the contact details, ending with "you can close this page now" >