Time Series Analysis
I would suggest you read chapters 1 through 3 of Time Series Analysis and Its Applications 4th ed to get a introductory treatment of this topic.
I also strongly urge you to check out Rob Hyndman’s book on forecasting, which is free.
In time series analysis, we are typically interested in describing the pattern of variation of a variable over time. This can be extended to include multiple variables, but the largest number of applications involve a single variable.
Time series data are very different from other data you may have encountered. These are NOT the same as longitudinal data, nor are they the same as event history data. Sometimes these terms are thrown around as if they are the same, but they are not. Time series data are collected on a very regular basis, such as every minute, day, week, month, etc, and are typically measured for a long period of time, often years.
Much of time series analysis is descriptive, in that we are wanting to describe a few basic qualities of a time series.
In these examples, we will use both simulated and real data. Data come from two sources: - BLS monthly unemployment rates - Daily air quality for Bexar County
Data
Libraries
##
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
##
## filter, lag
## The following objects are masked from 'package:base':
##
## intersect, setdiff, setequal, union
## Registered S3 method overwritten by 'quantmod':
## method from
## as.zoo.data.frame zoo
## Registered S3 methods overwritten by 'forecast':
## method from
## autoplot.Arima ggfortify
## autoplot.acf ggfortify
## autoplot.ar ggfortify
## autoplot.bats ggfortify
## autoplot.decomposed.ts ggfortify
## autoplot.ets ggfortify
## autoplot.forecast ggfortify
## autoplot.stl ggfortify
## autoplot.ts ggfortify
## fitted.ar ggfortify
## fortify.ts ggfortify
## residuals.ar ggfortify
Time series data
Air quality data
These are daily data, which start at January 1, 2019. We tell R these are daily data by stating that the frequency is 365 (days)
#daily Air quality index from January 1, 2019 - March 31, 2020
ts1<-ts(bexar$AQI, frequency = 365, start=c(2019,1))
print(ts1)
## Time Series:
## Start = c(2019, 1)
## End = c(2020, 91)
## Frequency = 365
## [1] 106 53 32 38 52 41 41 45 35 42 31 42 39 58 55 28 33 30
## [19] 39 39 43 28 35 40 40 38 45 35 35 28 34 35 40 52 50 10
## [37] 28 47 49 52 55 14 23 23 38 56 61 53 56 19 23 34 41 35
## [55] 35 31 20 29 41 45 45 59 63 20 28 30 46 35 45 54 51 54
## [73] 59 60 52 46 50 54 67 25 20 38 56 61 67 71 63 48 46 60
## [91] 29 169 24 26 44 64 43 48 48 34 42 36 31 30 54 58 61 28
## [109] 53 29 34 43 36 35 39 38 42 43 41 36 34 37 38 46 55 72
## [127] 77 75 47 28 39 27 49 37 41 50 66 65 51 38 29 43 39 58
## [145] 44 44 44 44 52 56 63 75 31 34 40 45 43 32 46 62 58 54
## [163] 46 139 44 43 47 52 55 64 67 71 50 43 50 50 54 51 44 37
## [181] 43 42 67 41 52 65 77 47 58 100 67 51 58 44 51 64 44 64
## [199] 45 48 80 46 42 65 39 50 61 77 44 59 68 64 53 37 49 64
## [217] 43 59 48 74 28 27 38 47 53 53 49 56 75 81 71 58 97 68
## [235] 53 53 50 52 54 61 66 54 39 31 33 30 36 51 77 119 61 46
## [253] 45 61 126 64 45 52 64 51 55 70 63 58 56 59 45 70 71 66
## [271] 84 41 61 35 62 74 57 51 48 51 72 54 48 51 47 49 64 41
## [289] 36 34 44 61 65 48 49 61 119 119 90 62 53 58 66 53 67 64
## [307] 48 54 48 58 60 51 52 43 44 44 50 54 80 54 59 51 78 65
## [325] 47 42 52 60 67 57 51 49 48 37 50 52 49 48 39 74 61 35
## [343] 35 42 37 43 50 67 52 54 44 57 55 35 40 37 43 36 46 47
## [361] 58 37 36 40 35 45 41 43 50 74 44 74 49 31 31 37 43 53
## [379] 35 33 42 58 46 54 45 46 48 35 30 54 51 39 20 19 28 41
## [397] 60 61 45 38 34 34 24 50 57 24 31 27 45 53 70 73 55 57
## [415] 36 36 19 38 45 52 71 31 52 53 51 35 37 43 54 65 41 63
## [433] 70 68 24 33 47 43 71 77 40 36 41 50 34 50 60 60 77 83
## [451] 32 35 27 42 44 59
ggplot(data=bexar, aes(x=date, y=AQI))+geom_line()+labs(title = "Bexar County, TX - Air Quality Index",subtitle = "January 2019 to March 2020",
caption = "Source: EPA Air Data \n Calculations by Corey S. Sparks, Ph.D.",
x = "Date",
y = "AQI")
## date AQI
## 1 2020-01-01 106
## 2 2020-01-02 53
## 3 2020-01-03 32
## 4 2020-01-04 38
## 5 2020-01-05 52
## 6 2020-01-06 41
## 7 2020-01-07 41
## 8 2020-01-08 45
## 9 2020-01-09 35
## 10 2020-01-10 42
BLS Unemployment data
This data set is a time series of monthly unemployment rates from 2000 to 2020. These data are Monthly, so we tell R that their frequency is 12 months (every month is repeated every 12 observations), with start and end dates of January 2000 and June 2020
#Montly unemployment Rate from January 2000 - June, 2020
unemp<-unemp[unemp$Series.ID=="LNU04000000",]
unemp<- t(unemp[-1])
unemp<-unemp[is.na(unemp)==F]
ts2<-ts(unemp, start=c(2000,1), end=c(2020,6), freq=12)
library(ggfortify)
autoplot(ts2)+labs(title = "US Monthly Unemployment Rate",subtitle = "January 2000 to June 2020",
caption = "Source: EPA Air Data \n Calculations by Corey S. Sparks, Ph.D.",
x = "Date",
y = "Unemployment Rate")
unemp2<-data.frame(rate=unemp, date=seq(from=as.Date("2000-01-01"), to=as.Date("2020-06-01"), by="months"))
head(unemp2, n=10)
## rate date
## 1 4.5 2000-01-01
## 2 4.4 2000-02-01
## 3 4.3 2000-03-01
## 4 3.7 2000-04-01
## 5 3.8 2000-05-01
## 6 4.1 2000-06-01
## 7 4.2 2000-07-01
## 8 4.1 2000-08-01
## 9 3.8 2000-09-01
## 10 3.6 2000-10-01
Fake data example - White noise
White noise can be though of as a random variable with no discernible trend or pattern to them. They are typically thought of as a random Gaussian variable. If we did a histogram of it, it would be a nice, pretty mound shaped, symmetric distribution.
More fake data - Random walk with drift
Another type of random pattern are random walks. These are cumulative sums of random variables. They can increase or decrease over time, but they are only doing so based on recent previous events and their values.
Signal and Noise
Often in time series data, we will have a noisy series, meaning that there is an underlying signal that we want to describe, but there is random white noise that accompanies it. Below, we simulate a cosine curve and add a small amount and a large amount of noise to it. With a small amount of noise, the signal is still visible, but with a large amount of random variation, the signal becomes almost indiscernible.
Some terminology
- lag = a value of the time series that occurs at some regular interval before the current value. For example, if this is our series:
## [1] 0.76023965 0.11379658 1.81570396 -0.59960278 0.07340230 0.30721595
## [7] -0.09357193 -1.83498487 0.44271755 0.05858398
## [1] NA 0.76023965 0.11379658 1.81570396 -0.59960278 0.07340230
## [7] 0.30721595 -0.09357193 -1.83498487 0.44271755
## [1] NA NA NA NA NA 0.7602397
## [7] 0.1137966 1.8157040 -0.5996028 0.0734023
- Trend = increase or decrease in the mean of a variable, often over the long term. For example, this variable should have no trend:
While this one increases over time:
b0<-0; b1=.5
t<-seq(1, 100, 1)
x3<-rnorm(100, b0+b1*t, 5)
tx3<-ts(x3)
plot(tx3)
abline(coef=coef(lm(x3~t)), col=3)
- Seasonality = This is a regular pattern of variation in a time series. It is a patter that repeats (like the cosine wave above) at a regular pattern within the data.
Auto-correlation in Time Series
Auto-correlation of a time series is \(\gamma (h)\) measures how correlated a time series is with different lags of itself.
\[\gamma (h) = E[(x_{t+h} - \mu)(x_t - \mu)\]
\[\rho(h) = \frac{\gamma(t+h,t)}{\sqrt{\gamma(t+h,t+h)\gamma(t,t) )}} = \frac{\gamma(h)}{\gamma(0)}\]
shows the correlation of a variable with itself at a given time lag \(h\).
Stationary Time Series
A stationary time series is one that has no trend to it, in other words, the mean of the variable doesn’t change over the range of the observation. A second quality of a secondary series is that its variance is constant over time. The white noise data from above is stationary
We can often detect trend by using the linear regression model, with time as the predictor
##
## Call:
## lm(formula = AQI ~ date, data = bexar)
##
## Residuals:
## Min 1Q Median 3Q Max
## -35.561 -10.856 -1.901 9.003 114.077
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 473.796162 109.026847 4.346 1.71e-05 ***
## date -0.023405 0.006015 -3.891 0.000115 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 16.91 on 454 degrees of freedom
## Multiple R-squared: 0.03227, Adjusted R-squared: 0.03014
## F-statistic: 15.14 on 1 and 454 DF, p-value: 0.0001148
##
## Call:
## lm(formula = rate ~ date, data = unemp2)
##
## Residuals:
## Min 1Q Median 3Q Max
## -2.7887 -1.4043 -0.5443 1.0016 8.3051
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 5.341e+00 8.687e-01 6.149 3.17e-09 ***
## date 4.106e-05 5.853e-05 0.702 0.484
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.984 on 244 degrees of freedom
## Multiple R-squared: 0.002013, Adjusted R-squared: -0.002077
## F-statistic: 0.4922 on 1 and 244 DF, p-value: 0.4836
##
## Call:
## lm(formula = ts3 ~ seq(1, length(ts3), 1))
##
## Residuals:
## Min 1Q Median 3Q Max
## -3.7708 -1.1880 0.0631 1.3104 3.8297
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.0423797 0.2297245 0.184 0.854
## seq(1, length(ts3), 1) -0.0005129 0.0019820 -0.259 0.796
##
## Residual standard error: 1.618 on 198 degrees of freedom
## Multiple R-squared: 0.0003381, Adjusted R-squared: -0.004711
## F-statistic: 0.06697 on 1 and 198 DF, p-value: 0.7961
Non-stationary time series
A complement to the stationary series is a non-stationary series, which has a global trend to it, in that it increases or decreases in value over time
Removing trend in a series
Often we want to be able to measure auto-correlation without the trend being present, in that case, we can de-trend the data and make the series a stationary series.
If \(x_t\) is our time series, we can write it as being a sum of two things, the trend, \(\mu_t\) and \(y_t\) which is the stationary component.
\[x_t = \mu_t + y_t\] If the trend is a straight line, then we may have
\[\mu_t = \beta_0 + \beta_1 t\] which is just a linear regression, and in this case, the stationary component \(y_t\) will be the residuals from the model:
##
## Call:
## lm(formula = AQI ~ date, data = bexar)
##
## Residuals:
## Min 1Q Median 3Q Max
## -35.561 -10.856 -1.901 9.003 114.077
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 473.796162 109.026847 4.346 1.71e-05 ***
## date -0.023405 0.006015 -3.891 0.000115 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 16.91 on 454 degrees of freedom
## Multiple R-squared: 0.03227, Adjusted R-squared: 0.03014
## F-statistic: 15.14 on 1 and 454 DF, p-value: 0.0001148
Differencing a time series
A way to remove seasonality in a time series is by differencing the series. The difference operation is:
\[\nabla^d = (1-B)^d\]
This is just the difference between the value of \(x_t\) and the value that occurs \(d\) values prior. For example, the first difference is often taken to remove seasonality in a series:
## [1] 1 2 3 4 5 6 7 8 9 10
## [1] 1 1 1 1 1 1 1 1 1
We see that the second plot no longer has the regular cosine wave pattern to it.
Smoothing a time series
One descriptive technique that is commonly used in time series analysis is a smoothing model for the data. There are several kinds of these and we will look at a few next.
Moving Average of Time Series
The moving average of a time series is:
\[ m_t = \sum_{j=-k}^k \alpha_j x_{t-j}\] This function takes a set of the \(k\) observations, centered around \(x_t\) and finds the mean of them. You’ve probably seen a lot of these during the COVID-19 pandemic
The reason we do this is to try to identify the systematic component or components in the data. If the data are noisy, like the cosine data above:
If we take a moving average of the series, we may be able to identify the signal in the noise:
plot(c+5*w, main="signal + large noise")
x=c+5*w
lines(c, col=1, lty=3)
lines(ma(x, order=5), col=2)#5 day moving average
lines(ma(x, order=20), col=3)#20 day moving average
Kernel smoothing
Another modern approach is to use a smoothing spline or kernel-based smoother, which
ARIMA Models
One of the fundamental models in time series analysis is the AutoRegressive Integrated Moving Average
An auto-regressive model is one that predicts a future value, based on weighted average of previous values. The weights will decrease as the distance in time between the current and past values increase.
An auto-regressive model of order p, abbreviated AR(p) is:
\[x_t = \phi_1 x_{t-1} + \phi_2 x_{t-2} + \dots +\phi_p x_{t-p} + w_t\] where, the \(\phi_p\) terms represent auto-regressive coefficients and where \(w_t\) is a Gaussian white noise residual. The auto-regressive operation can be more succinctly defined using the Backshift operator
\[Bx_t = x_{t-1}\]
and we can power this operator up to include greater lags of \(x_t\)
\[B^k x_t = x_{t-k}\]
A commonly used model when modeling temporal dependence is that AR(1) model, where the current value of \(x\) is predicted using the immediately preceding value:
\[x_t = \sum_{j=0}^\infty \phi^j w_{t-j}\]
Moving average models
The moving average model of order q, or MA(q) is :
\[x_t = w_t + \theta_1 w_{t-1} + \theta_2 w_{t-2} + \dots + \theta_q w_{t-q}\] where the \(\theta\) values are lags of the series, of order \(q\) and \(w_t\) is again Gaussian white noise.
ARMA process
If we combine these two, we get an AutoRegressive Moving Average, or ARMA(p,q) model.
\[x_t = \alpha + \phi_1 x_{t-1} + \phi_2 x_{t-2} + \dots +\phi_p x_{t-p} + w_t + \theta_1 w_{t-1} + \theta_2 w_{t-2} + \dots + \theta_q w_{t-q} \]
Which just combines the auto-regression and the moving average models.
ARIMA models
If we add a trend component to the time series model, we get the ARIMA(p,d,q) model
Forecasting
Forecasting is the process of predicting future values of a variable, based on the observed patterns of the variable from the past. If we have the observed time series, \(x_t\), then we may want to predict future values of the series at \(m\) periods in the future, \(x_{n+m}\)
In order to do this, we assume that \(x_t\) is stationary and the model parameters are known (but we typically estimate them from the data).
For example, if we want to forecast the air quality in Bexar County in the future, we would first estimate the parameters of the model we want, then apply that model to forecast the future values.
The forecast
package is a great place to start for basic forecasting models.
Below are some simple methods, see Hyndmans’s ch 3 for these
autoplot(ts1)+
autolayer(ma(ts1, 30), series="30 day MA")+
xlab("Day")+ylab("AQI")+
ggtitle("Air Quality in Bexar county, 30 Day moving average")
## Warning: Removed 30 row(s) containing missing values (geom_path).
## ARIMA forecasting
## Series: ts2
## ARIMA(0,1,0)(0,0,2)[12]
##
## Coefficients:
## sma1 sma2
## 0.3592 0.2814
## s.e. 0.1534 0.1252
##
## sigma^2 estimated as 0.5148: log likelihood=-266.77
## AIC=539.55 AICc=539.65 BIC=550.05
## Warning: The chosen seasonal unit root test encountered an error when testing for the first difference.
## From stl(): series is not periodic or has less than two periods
## 0 seasonal differences will be used. Consider using a different unit root test.
Classical Decomposition
One method of exploring the components of a time series is decomposition There are two basic forms of this, Additive and Multiplicative decomposition.
- Additive decomposition decomposes the series as:
\[x_t = R_t + T_t + S_t\] Where \(R_t\) is a residual, \(T_t\) is the trend of the data and \(S_t\) is the seasonal component of the data
ts2%>%
decompose(type="additive")%>% autoplot() + xlab("Day") +
ggtitle("Classical additive decomposition
of US Unemployment")
- Multiplicative decomposition: The second form of decomposition is multiplicative, this decomposes the series as:
\[x_t = R_t * T_t * S_t\]
ts2%>%
decompose(type="multiplicative")%>% autoplot() + xlab("Day") +
ggtitle("Classical multiplicative decomposition
of US Unemployment")
Seasonal adjustment
In unemployment data, the BLS usually presents the seasonally adjusted unemployment rate. This is because there is seasonality in the pattern of unemployment, with some months consistently having higher or lower unemployment. To produce this, they take the series and subtract out the seasonal component, as in the above decomposition.
adjust1<-decompose(ts2,type = "add")
adjust2<-ts2 - adjust1$seasonal
test<-data.frame(month = unique(unemp2$date), unemprate = adjust2)
ggplot()+geom_line(data=test, aes(x=month, y=unemprate, color="green"))+geom_line(data=unemp2, aes(x=date, y=rate, color="red") )+labs(title = "Seasonally Adjusted Unemployment Rate",
subtitle = "Jan 2000 to June 2020",
caption = "Source: IPUMS BLS Monthly Data \n Calculations by Corey S. Sparks, Ph.D.",
x = "Month",
y = "Unemployment Rate")+theme_minimal()+scale_color_discrete(name = "Rates", labels = c("Adjusted", "Raw"))
## Don't know how to automatically pick scale for object of type ts. Defaulting to continuous.
adjust3<-ts2 - adjust1$trend
test<-data.frame(month = unique(unemp2$date), unemprate = adjust3)
ggplot()+geom_line(data=test, aes(x=month, y=unemprate, color="green"))+geom_line(data=unemp2, aes(x=date, y=rate, color="red") )+labs(title = "Detrended Unemployment Rate",
subtitle = "Jan 2000 to June 2020",
caption = "Source: IPUMS BLS Monthly Data \n Calculations by Corey S. Sparks, Ph.D.",
x = "Month",
y = "Unemployment Rate")+theme_minimal()+scale_color_discrete(name = "Rates", labels = c("Adjusted", "Raw"))
## Don't know how to automatically pick scale for object of type ts. Defaulting to continuous.
## Warning: Removed 12 row(s) containing missing values (geom_path).


?6
7
8
9
10
T
XI
v
The
New
York
copyright
reserved
botanical
Garden
INSTITUTE
OF
JAMAICA
FLORA
OF
JAMAICA
Parish:
ST
•
ELIZABETH
Name:
Chryaophyllum
oliviforme
L.
Locality:
SLIFE
district.
Altitade:
o.
30-40
ft*
Date:
January
15«
1963
Habitat:
Roadside
thioket
in
swampy
region*
fSmall
tree
8
m.
tall;
ripe
fruit
purple«
Notes:
Iblaok,
fusiform*
collector:
George
R.
Proctor
No.
23151
01442564
Legend -
Level of confidence that token is an accurately-transcribed word
extremely low
very low
low
undetermined
medium
high
very high


Instructions for the quiz
- You can choose the category, difficulty and number of questions for the quiz.
- Total duration is of 5 or 10 minutes depending on number of questions. On completion of time, the quiz is automatically submitted.
- Each question has 4 options available. You have to choose the correct option among them.
- There is no negative marking for wrong answers.
- You cannot proceed to the next question without answering the current question.
- However, you can return back to any of the previously answered questions.
- At the end of quiz, you can view the result.
- All the best.
Start Now


|
LostOS
|
#include <mm/vmm.h>
#include <mm/pmm.h>
#include <common/utility.h>
#include <interrupts/interrupt.h>
#include <debug_utils/printf.h>
Functions | |
| void * | vAllocPage (void *virt, uint32_t flags, bool man) |
| void * | vAllocPages (void *virt, uint32_t flags, uint32_t n, bool man) |
| bool | vMapPage (void *phys, void *virt, uint32_t flags) |
| bool | vUnmapPage (void *virt) |
| void | init_vmm () |
| The Virtual Memory Manager is going to start and handle paging in the system. More... | |
| void init_vmm | ( | ) |
The Virtual Memory Manager is going to start and handle paging in the system.
Paging is a system which allows each process to see a full virtual address space, without actually requiring the full amount of physical memory to be available or present. Maximum address space for 32 bit systems like this is 4GB.
The topmost paging structure is the PAGE DIRECTORY. It is essentially an array of page directory entries that take the following form:
In each PAGE TABLE, as it is, there are also 1024 entries. These are called page table entries, and are very similar to page directory entries:
This is the format of a 32 bit x86 virtual address: AAAAAAAAAA BBBBBBBBBB CCCCCCCCCCCC directory index page table index offset into page
Using the 'recursive mapping' technique. It consists in mapping the last entry in the page directory to the page directory iteself. The physical address of the page directory is in the registry 'cr3' and it's more helpful having it at the virtual address 0xFFFFF000.
This becomes more important when each process gets its own page directory, which can be anywhere in memory.
| void* vAllocPage | ( | void * | virt, |
| uint32_t | flags, | ||
| bool | man | ||
| ) |
The CPU pushes an error code on the stack before firing a page fault exception. The error code must be analyzed by the exception handler to determine how to handle the exception. The bottom 3 bits of the exception code are the only ones used, bits 3-31 are reserved.
The combination of these flags specify the details of the Page Fault and indicate what action to take:
US RW P - Description 0 0 0 - Supervisory process tried to read a non-present page entry 0 0 1 - Supervisory process tried to read a page and caused a protection fault 0 1 0 - Supervisory process tried to write to a non-present page entry 0 1 1 - Supervisory process tried to write a page and caused a protection fault 1 0 0 - User process tried to read a non-present page entry 1 0 1 - User process tried to read a page and caused a protection fault 1 1 0 - User process tried to write to a non-present page entry 1 1 1 - User process tried to write a page and caused a protection fault Allocate a virtual page and sets it to zero.
| virt | Address to map |
| man | If that address is mandatory or could be anyone else |
| void* vAllocPages | ( | void * | virt, |
| uint32_t | flags, | ||
| uint32_t | n, | ||
| bool | man | ||
| ) |
Allocate n virtual page and sets them to zero.
| virt | Start address to map |
| n | Number of contiguous pages to map |
| man | If that address is mandatory or could be anyone else |
| bool vMapPage | ( | void * | phys, |
| void * | virt, | ||
| uint32_t | flags | ||
| ) |
Mapping a virtual address to a physical one.
| phys | Physical address to map. |
| virt | Virtual address to map phys to. |
| flags | Flags. |
| bool vUnmapPage | ( | void * | virt | ) |
Unmapping the virtual address from the current page directory.
| virt | Virtual address to unmap. |


{{ block "head_extra" . }} {{ end }}
The Seattle Review of Books
REVIEWS
WRITERS
ABOUT
{{ block "body" .}} {{ block "content" . }} {{ end }} {{ end }} {{ block "scripts_extra" . }} {{ end }}


Compliance Report
Compliance Report
S.1. The institution has a system for determining the Vision and Mission.
S.2. The Vision clearly reflects what the institution hopes to become in the future.
S.3. The Mission clearly reflects the institution's legal and educational mandate.
S.4. The Goals are clearly stated, and are consistent with the Mission of the Institution.
S.5. The Objectives of the program clearly state the expected outcomes in terms of competencies (skills and knowledge), values and other attributes of the graduates which include the development of:
S.5.1. technical skillls in Hotel and Restaurant Management/TM/HM/TrM;
S.5.2. scientific habit of thought;
S.5.3. entry-level competencies in HRM/TMHM/TrM;
S.5.4. research and extension capabilities
S.5.5. entrepreneurial skills;
S.5.6. students' own ideas, desirable attitudes, personal discipline and moral character;
S.5.7. critical thinking skills; and
S.5.8. aesthetic and cultural values.
I.1. The institution/ College conduct a review on the statement of the Vision and Mission as well as its goals and program objectives for the approval of authorities concerned.
I.2.The College / Academic Unit follow a system of formulating its goal and the objectives of the program.
I.3.The College/academic Unit faculty, personnel, students and other stakeholders (cooperating agencies, linkages, alumni, industry sector and other concerned groups) participate in the formulation, review and/or revision of the VMGO.
O.1. The VMGO are crafted and duly approved by the BOT/BOR.
S.1. The VMGO are available on bulletin boards, in catalogs/manuals and in other form of communication media.
I.1. A system of dissemination and acceptability of the VMGO is enforced.
I.2. The administrators/faculty attends in-service seminars and training on awareness and acceptability of the:
I.2.1. Vision and mission of the institution;
I.2.2. Goals of the College / Academic Unit; and
I.2.3. Objectives of the program.
I.3. The formulation/review/revision of the VMGO is participated in by the following:
I.2.1. administrators;
I.3.2. faculty;
I.3.3. staff;
I.3.4. atudents; and
I.3.5. other stakeholder;
I.4. The faculty and staff perform their jobs/functions in consonance with the VMGO.
I.5. The VMGO are widely disseminated to the different agencies, institutions, industry sector, and the community.
O.1. There is full awareness and acceptance of the VMGO by the administrators, faculty, staff, students, and other stakeholders.
O.2. There is congruency between actual educational practices and activities with the following:
O.2.1. Vision and Mission of SUC;
O.2.2. Goals of the College/Department of HRM/TM/HM/TrM; and
O.2.3. Objectives of the HRM/TM/HM/TrM program.
O.3. The goals and objectives are being achieved.


One of the coolest things I have learned in R recently is creating a website with blogdown package. The blogdown websites are created and maintained from within R mostly, which is the best part about it if you are a R user. There are many sources that provide details and reasons for using blogdown, so I will not dwell on that. Instead, I am going to provide a brief and to-the-point tutorial on how to start your website with R and blogdown.
1. Create a repository on github
Check my earlier blog on basics of github. If you do not have a github account, visit github.com and create an account (it is free!). Once you have an account, create a repository and call it myblog. Creating the repository, also known as repo, copy that repository’s url. The url should look like this: https://github.com/YOUR-USERNAME/YOUR-REPOSITORY.git
2. Clone git repository
The github repository link is used to clone that repo on a directory in your computer. Cloning a repo essentially means copying repo in the local computer. To clone the github repo, you have t use Terminal if you are on a Mac and Command Prompt if you are on windows, and install git if you are on windows. There are other applications, but Mac’s Terminal and windows’ Command Prompt are default and does not require downloading.
TO BE CONTINUED…


14 January 2005
WHO has received informal reports of two additional cases of H5N1 infection in Viet Nam. The cases are an 18-year-old woman from Hau Giang Province and a 35-year-old woman from Tra Vinh Province.
The 18-year-old woman was hospitalized on 1 January and died on 10 January. The 35-year old woman was hospitalized on 9 January and remains in critical condition.
Both patients are from provinces in the southern part of the country, where poultry outbreaks have been reported since the beginning of December.
If confirmed, these latest human cases will bring the total in Viet Nam, since mid-December 2004, to six. Of these, four have died.


| cvd_emulator {colorspace} | R Documentation |
A graphical user interface (GUI) to check an existing jpg/png image for (possible) color constraints. The image will be converted to protanope vision, deuteranope vision, and a desaturated version (monochromatic vision). Allows a rapid check whether the colors used in the image show some constraints with respect to color deficiency or color blindness.
cvd_emulator(file, overwrite = FALSE, shiny.trace = FALSE)
file |
If not set, an interactive GUI will be started. If |
overwrite |
|
shiny.trace |
|
Reto Stauffer, Claus O. Wilke, Achim Zeileis
Zeileis A, Fisher JC, Hornik K, Ihaka R, McWhite CD, Murrell P, Stauffer R, Wilke CO (2020). “ccolorspace: A Toolbox for Manipulating and Assessing Colors and Palettes.” Journal of Statistical Software, 96(1), 1–49. doi: 10.18637/jss.v096.i01


Section 1.10.32 of "de Finibus Bonorum et Malorum", written by Cicero in 45 BC
"Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo.
1914 translation by H. Rackham
"But I must explain to you how all this mistaken idea of denouncing pleasure and praising pain was born and I will give you a complete account of the system, and expound the actual teachings of the great explorer of the truth, the master-builder of human happiness.


| FRAMES NO FRAMES | |||||||
| |||||||
| SUMMARY: IMPORT | CONSTANT | MEMBER | ACTION | DETAIL: IMPORT | CONSTANT | MEMBER | ACTION |
or by using one of the static from functions on Quaternion:
Quaternion q := Quaternion(3.1, 5.0, 0.1, 2.); // 3.1 + 5i + 0.1j + 2k
There are also a number of convenince functions to return certain constants as Quaternions.
Quaternion c := Quaternion.fromComplex(Complex(1., 1.)); // 1 + i
| Action summary | |
|---|---|
com.apamax.Quaternion | static add(com.apamax.Quaternion a, com.apamax.Quaternion b)
Add two quaternions and return a new Quaternion with the result. |
boolean |
bitEquals(com.apamax.Quaternion b)
Returns true if all parts of this Quaternion are bit-equals to the corresponding parts of the argument. |
com.apamax.Quaternion | static conjugate(com.apamax.Quaternion a)
Return a new Quaternion which is the complex conjugate of the argument. |
com.apamax.Quaternion | static crossProduct(com.apamax.Quaternion a, com.apamax.Quaternion b)
Calculate the cross product of two Quaternions. If the Quaternions are not vector quaternions, the resultant scalar part will be the product of the scalar parts of the quaternions. |
com.apamax.Quaternion | static divideReal(com.apamax.Quaternion a, float b)
Divide the given Quaternion by a real divisor and return the result as a new Quaternion. |
float | static dotProduct(com.apamax.Quaternion a, com.apamax.Quaternion b)
Calculate the dot product of two vector Quaternions. This ignores the scalar part of the Quaternions. |
com.apamax.Quaternion | static E()
Returns Euler's number e, represented as a quaternion. |
com.apamax.Quaternion | static exp(com.apamax.Quaternion a)
Exponentiate the argument and return the result as a new Quaternion |
string |
formatFixed(integer dp)
Return the Quaternion as a string with a fixed number of decimal places. e.g. 0.30j-4.51k |
string |
formatScientific(integer sf)
Return the Quaternion as a string in scientific notation e.g. 1.3e-2+5.6e10j |
com.apamax.Quaternion | static fromComplex(com.apamax.Complex c)
Creates a Quaternion from a Complex number, with the j and k parts 0. |
com.apamax.Quaternion | static fromIFloat(float i)
Creates a Quaternion with the given float as i and the other parts 0. |
com.apamax.Quaternion | static fromJFloat(float j)
Creates a Quaternion with the given float as i and the other parts 0. |
com.apamax.Quaternion | static fromKFloat(float k)
Creates a Quaternion with the given float as k and the other parts 0. |
com.apamax.Quaternion | static fromRealFloat(float r)
Creates a Quaternion with the given float as the real part and the other parts 0. |
float |
getI()
Returns the i part of this Quaternion. |
float |
getJ()
Returns the j part of this Quaternion. |
float |
getK()
Returns the k part of this Quaternion. |
com.apamax.Quaternion | static I()
Returns the square root of -1, i, represented as a quaternion. |
com.apamax.Quaternion | static INFINITY()
Returns infinity + infinity*i, represented as a quaternion. |
boolean |
isFinite()
Returns true if all parts of this Quaternion are finite. |
boolean |
isInfinite()
Returns true if any part of this Quaternion is infinite. |
boolean |
isNaN()
Returns true if any part of this Quaternion is not a number. |
com.apamax.Quaternion | static ln(com.apamax.Quaternion a)
Return the natural log of the argument as a new Quaternion. |
com.apamax.Quaternion | static multiply(com.apamax.Quaternion a, com.apamax.Quaternion b)
Multiply two quaternions and return a new Quaternion with the result. Since multiplication on quaternions is not commutative a*b is not b*a for all cases. This also means that a/b is ambiguous, since it could mean a(b^-1) or (b^-1)a. To divide use multiply and reciprocal in conjuction to specify the order. |
com.apamax.Quaternion | static multiplyReal(com.apamax.Quaternion a, float b)
Multiply the given Quaternion by a real divisor and return the result as a new Quaternion. |
com.apamax.Quaternion | static NAN()
Returns a Quaternion which is not a number. |
com.apamax.Quaternion | static negate(com.apamax.Quaternion a)
Return a new Quaternion which is the negation of the argument. |
float |
norm()
Return the norm of this Quaternion. |
com.apamax.Quaternion | static ONE()
Returns 1, represented as a quaternion. |
com.apamax.Quaternion | static PI()
Returns the constant pi, represented as a quaternion. |
com.apamax.Quaternion | static powReal(com.apamax.Quaternion a, float b)
Return a Quaternion raised to the power of a real as a new Quaternion |
com.apamax.Quaternion | static reciprocal(com.apamax.Quaternion a)
Return a new Quaternion which is the reciprocal of the argument. |
float |
scalar()
Returns the real/scalar part of this Quaternion. |
com.apamax.Quaternion | static subtract(com.apamax.Quaternion a, com.apamax.Quaternion b)
Subtract two quaternions and return a new Quaternion with the result. |
string |
toValueString()
Return the Quaternion as a string. e.g. 0.3-4.5i |
com.apamax.Quaternion |
uadd(com.apamax.Quaternion b)
Set this Complex number to add the argument and return self. |
com.apamax.Quaternion |
uconjugate()
Assign this to its complex conjugate and return self. |
com.apamax.Quaternion |
udivideReal(float b)
Set this Quaternion to be divided by the real argument and return self. |
com.apamax.Quaternion |
uexp()
Exponentiate this Quaternion and return self. |
com.apamax.Quaternion |
uln()
Sets this Quaternion to the natural logarithm of itself and return self. |
com.apamax.Quaternion |
umultiply(com.apamax.Quaternion b)
Set this Quaternion to multiply by the argument and return self. Since multiplication on quaternions is not commutative a*b is not b*a for all cases. This action calculates self*b. This also means that a/b is ambiguous, since it could mean a(b^-1) or (b^-1)a. To divide use umultiply and ureciprocal in conjuction to specify the order. |
com.apamax.Quaternion |
umultiplyReal(float b)
Set this Quaternion to be multiplied by the real argument and return self. |
com.apamax.Quaternion |
unegate()
Set this Quaternion to its own negation and return self. |
com.apamax.Quaternion |
upowReal(float x)
Raise this Quaternion to the power of a real and return self. |
com.apamax.Quaternion |
ureciprocal()
Set this Complex number to its own reciprocal and return self. |
com.apamax.Quaternion |
usubtract(com.apamax.Quaternion b)
Set this Quaternion to subtract the argument and return self. |
sequence<float> |
vector()
Returns the imaginary/vector parts of this Quaternion. |
com.apamax.Quaternion | static ZERO()
Returns 0, represented as a quaternion. |
| Action detail |
|---|
com.apamax.Quaternion static add(com.apamax.Quaternion a, com.apamax.Quaternion b)Add two quaternions and return a new Quaternion with the result.
boolean bitEquals(com.apamax.Quaternion b)Returns true if all parts of this Quaternion are bit-equals to the corresponding parts of the argument.
com.apamax.Quaternion static conjugate(com.apamax.Quaternion a)Return a new Quaternion which is the complex conjugate of the argument.
com.apamax.Quaternion static crossProduct(com.apamax.Quaternion a, com.apamax.Quaternion b)Calculate the cross product of two Quaternions. If the Quaternions are not vector quaternions, the resultant scalar part will be the product of the scalar parts of the quaternions.
com.apamax.Quaternion static divideReal(com.apamax.Quaternion a, float b)Divide the given Quaternion by a real divisor and return the result as a new Quaternion.
float static dotProduct(com.apamax.Quaternion a, com.apamax.Quaternion b)Calculate the dot product of two vector Quaternions. This ignores the scalar part of the Quaternions.
com.apamax.Quaternion static E()Returns Euler's number e, represented as a quaternion.
com.apamax.Quaternion static exp(com.apamax.Quaternion a)Exponentiate the argument and return the result as a new Quaternion
string formatFixed(integer dp)Return the Quaternion as a string with a fixed number of decimal places. e.g. 0.30j-4.51k
string formatScientific(integer sf)Return the Quaternion as a string in scientific notation e.g. 1.3e-2+5.6e10j
com.apamax.Quaternion static fromComplex(com.apamax.Complex c)Creates a Quaternion from a Complex number, with the j and k parts 0.
com.apamax.Quaternion static fromIFloat(float i)Creates a Quaternion with the given float as i and the other parts 0.
com.apamax.Quaternion static fromJFloat(float j)Creates a Quaternion with the given float as i and the other parts 0.
com.apamax.Quaternion static fromKFloat(float k)Creates a Quaternion with the given float as k and the other parts 0.
com.apamax.Quaternion static fromRealFloat(float r)Creates a Quaternion with the given float as the real part and the other parts 0.
float getI()Returns the i part of this Quaternion.
float getJ()Returns the j part of this Quaternion.
float getK()Returns the k part of this Quaternion.
com.apamax.Quaternion static I()Returns the square root of -1, i, represented as a quaternion.
com.apamax.Quaternion static INFINITY()Returns infinity + infinity*i, represented as a quaternion.
boolean isFinite()Returns true if all parts of this Quaternion are finite.
boolean isInfinite()Returns true if any part of this Quaternion is infinite.
boolean isNaN()Returns true if any part of this Quaternion is not a number.
com.apamax.Quaternion static ln(com.apamax.Quaternion a)Return the natural log of the argument as a new Quaternion.
com.apamax.Quaternion static multiply(com.apamax.Quaternion a, com.apamax.Quaternion b)Multiply two quaternions and return a new Quaternion with the result. Since multiplication on quaternions is not commutative a*b is not b*a for all cases. This also means that a/b is ambiguous, since it could mean a(b^-1) or (b^-1)a. To divide use multiply and reciprocal in conjuction to specify the order.
com.apamax.Quaternion static multiplyReal(com.apamax.Quaternion a, float b)Multiply the given Quaternion by a real divisor and return the result as a new Quaternion.
com.apamax.Quaternion static NAN()Returns a Quaternion which is not a number.
com.apamax.Quaternion static negate(com.apamax.Quaternion a)Return a new Quaternion which is the negation of the argument.
float norm()Return the norm of this Quaternion.
com.apamax.Quaternion static ONE()Returns 1, represented as a quaternion.
com.apamax.Quaternion static PI()Returns the constant pi, represented as a quaternion.
com.apamax.Quaternion static powReal(com.apamax.Quaternion a, float b)Return a Quaternion raised to the power of a real as a new Quaternion
com.apamax.Quaternion static reciprocal(com.apamax.Quaternion a)Return a new Quaternion which is the reciprocal of the argument.
float scalar()Returns the real/scalar part of this Quaternion.
com.apamax.Quaternion static subtract(com.apamax.Quaternion a, com.apamax.Quaternion b)Subtract two quaternions and return a new Quaternion with the result.
string toValueString()Return the Quaternion as a string. e.g. 0.3-4.5i
com.apamax.Quaternion uadd(com.apamax.Quaternion b)Set this Complex number to add the argument and return self.
com.apamax.Quaternion uconjugate()Assign this to its complex conjugate and return self.
com.apamax.Quaternion udivideReal(float b)Set this Quaternion to be divided by the real argument and return self.
com.apamax.Quaternion uexp()Exponentiate this Quaternion and return self.
com.apamax.Quaternion uln()Sets this Quaternion to the natural logarithm of itself and return self.
com.apamax.Quaternion umultiply(com.apamax.Quaternion b)Set this Quaternion to multiply by the argument and return self. Since multiplication on quaternions is not commutative a*b is not b*a for all cases. This action calculates self*b. This also means that a/b is ambiguous, since it could mean a(b^-1) or (b^-1)a. To divide use umultiply and ureciprocal in conjuction to specify the order.
com.apamax.Quaternion umultiplyReal(float b)Set this Quaternion to be multiplied by the real argument and return self.
com.apamax.Quaternion unegate()Set this Quaternion to its own negation and return self.
com.apamax.Quaternion upowReal(float x)Raise this Quaternion to the power of a real and return self.
com.apamax.Quaternion ureciprocal()Set this Complex number to its own reciprocal and return self.
com.apamax.Quaternion usubtract(com.apamax.Quaternion b)Set this Quaternion to subtract the argument and return self.
sequence<float> vector()Returns the imaginary/vector parts of this Quaternion.
com.apamax.Quaternion static ZERO()Returns 0, represented as a quaternion.
| FRAMES NO FRAMES | |||||||
| |||||||
| SUMMARY: IMPORT | CONSTANT | MEMBER | ACTION | DETAIL: IMPORT | CONSTANT | MEMBER | ACTION |


1.What coding language is used for styling?
2.Which git command is used to add repository?
3.Which of the following is a kind of loop?
4.Which of the following is a leap year?
5.Does Javascript support Object Oriented programming?


I wrote a script to scrape the technical specifications, ratings, and prices of all the Home Cinema AV Receiver reviews on What HiFi website because their search feature did not provide a means to filter reviews by anything useful, such as whether it is THX certified or not, or how many speakers outputs it supports.
In all, COUNT reviews have been scraped into my (MongoDB based) database.
The punchcard charts below provide at-a-glance view of the number of reviews which fall into each category. The area of each bubble represents the number of reviews. So bigger bubbles represent more data. Click on a bubble to filter data.
Use the controls at the top of the window to filter the data and enjoy the animations as you change values. (Press enter or move focus to trigger an update).
Click on headings to filter and sort by that column. Filtering removes 0 values (including 'false' for boolean columns).


Single sign on is an authentication service enabling users to use one set of login credentials, i.e, user name and password, to access multiple applications. The Sunbird platform allows signed on users on integrated systems to effortlessly navigate through all instances of the portal simply by sharing the trusted login status.
This philosophy of access is built around a premise of trust between Sunbird and its integrated systems. When an authenticated user on integrated system navigates to Sunbird, the integrated system redirects the browser and sends details of the user to the portal. The sender’s private key is used to sign this data, to allow Sunbird to trust the incoming data and allow the user to sign in. This ensures that for integrating systems, the only change is in the user being re-directed to the portal ensuring that there are no interruptions on their internal authentication implementation.
Ensure the following before technical integration:
User is registered on Sunbird
User’s public key is shared with Sunbird
‘iss’ is shared with user


ASDisplayNode(Deprecated) Category Reference
| Declared in | ASDisplayNode+Deprecated.h |
|---|
)
The name of this node, which will be displayed in description
. The default value is nil. (Deprecated: Deprecated in version 2.0: Use .debugName instead. This value will display in
results of the -asciiArtString method (@see ASLayoutElementAsciiArtProtocol).)
@property (nullable, nonatomic, copy) NSString *ASDISPLAYNODE_DEPRECATED_MSG ( "Use .debugName instead." )
Declared In
ASDisplayNode+Deprecated.h
– measure:
Asks the node to measure and return the size that best fits its subnodes. (Deprecated: Deprecated in version 2.0: Use layoutThatFits: with a constrained size of (CGSizeZero, constrainedSize) and call size on the returned ASLayout)
- (CGSize)measure:(CGSize)constrainedSize
Parameters
constrainedSize |
The maximum size the receiver should fit in. |
|---|
Return Value
A new size that fits the receiver’s subviews.
Discussion
Though this method does not set the bounds of the view, it does have side effects–caching both the constraint and the result.
Warning: Subclasses must not override this; it calls -measureWithSizeRange: with zero min size. -measureWithSizeRange: caches results from -calculateLayoutThatFits:. Calling this method may be expensive if result is not cached.
Declared In
ASDisplayNode+Deprecated.h
– visibilityDidChange:
Called whenever the visiblity of the node changed. (Deprecated: @see didEnterVisibleState @see didExitVisibleState)
- (void)visibilityDidChange:(BOOL)isVisible
Discussion
Subclasses may use this to monitor when they become visible.
Declared In
ASDisplayNode+Deprecated.h
– visibleStateDidChange:
Called whenever the visiblity of the node changed. (Deprecated: @see didEnterVisibleState @see didExitVisibleState)
- (void)visibleStateDidChange:(BOOL)isVisible
Discussion
Subclasses may use this to monitor when they become visible.
Declared In
ASDisplayNode+Deprecated.h
– displayStateDidChange:
Called whenever the the node has entered or exited the display state. (Deprecated: @see didEnterDisplayState @see didExitDisplayState)
- (void)displayStateDidChange:(BOOL)inDisplayState
Discussion
Subclasses may use this to monitor when a node should be rendering its content.
Note: This method can be called from any thread and should therefore be thread safe.
Declared In
ASDisplayNode+Deprecated.h
– loadStateDidChange:
Called whenever the the node has entered or left the load state. (Deprecated: @see didEnterPreloadState @see didExitPreloadState)
- (void)loadStateDidChange:(BOOL)inLoadState
Discussion
Subclasses may use this to monitor data for a node should be loaded, either from a local or remote source.
Note: This method can be called from any thread and should therefore be thread safe.
Declared In
ASDisplayNode+Deprecated.h
– cancelLayoutTransitionsInProgress
Cancels all performing layout transitions. Can be called on any thread. (Deprecated: Deprecated in version 2.0: Use cancelLayoutTransition)
- (void)cancelLayoutTransitionsInProgress
Declared In
ASDisplayNode+Deprecated.h


AllieTabs
A WCAG2.1 compliant tab componentTemplate

Tab one

... content

Required attributes are
-
role="tablist" on the UL tag containing the tabs
role="presentation"
on the LI elementsrole=tab
on the same page linksaria-controls
refers to the ID of the corresponding tabpanelrole=tabpanel
identifies the tabpanel
The code will add aria-hidden
, aria-selected
and tabindex
but you can also choose to add these yourself to control which panel is opened by default.
controls
Keyboard controls
-
Tab
- only the active tab is in the tab order. The user reaches the tabbed panel component by pressing the tab key until the active tab title receives focus. -
Left Arrow
- with focus on a tab, pressing the left arrow will move focus to the previous tab in the tab list and activate that tab. Pressing the left arrow when the focus is on the first tab in the tab list will move focus and activate the last tab in the list. -
Right Arrow
- with focus on a tab, pressing the right arrow will move focus to the next tab in the tab list and activate that tab. Pressing the right arrow when the focus is on the last tab in the tab list will move focus to and activate the first tab in the list. -
Up arrow
- behaves the same as left arrow in order to support vertical tabs -
Down arrow
- behaves the same as right arrow in order to support vertical tabs -
Home
- with focus on a tab, moves the focus to the first tab. -
End
- with focus on a tab, moves the focus to the last tab.
URL
You, or the user, can control which tab is opened by default by using the tabpanel id as fragment in the URL.
Usage
Code
Once your HTML has all required attributes, you can initialise the tabs on two ways.
Automatic: place the data-tabs
attribute on the outer wrapper.
Manual: initialise the tabs as follows:
@param {Element} elem
@param {Object} [options]

allieTabs.init(elem, options)
Overrides
You can override the changeTab and handleKeyboardInput functions by providing them in the options object.
For instance:
allieTabs.init(elem, {handleKeyboardInput: function(e: Event, tabs: Element[]) {})
Styling
When using the automatic initialisation a class allietabs
will be placed on the
outer wrapper when the code has been executed successfully.
Using the manual method, you can provide your custom class in the options attribute
allieTabs.init(elem, {class: 'my-custom-class'})
Fallback
Styling based on the added wrapper-class allows for fallback functionality in case something went
wrong or in case javascript is not available.
In which case the tabs will function as standard same page links.
Fallback example
Template

Tab one

... content

Required attributes are
-
role="tablist" on the UL tag containing the tabs
role="presentation"
on the LI elementsrole=tab
on the same page linksaria-controls
refers to the ID of the corresponding tabpanelrole=tabpanel
identifies the tabpanel
The code will add aria-hidden
, aria-selected
and tabindex
but you can also choose to add these yourself to control which panel is opened by default.
controls
Keyboard controls
-
Tab
- only the active tab is in the tab order. The user reaches the tabbed panel component by pressing the tab key until the active tab title receives focus. -
Left Arrow
- with focus on a tab, pressing the left arrow will move focus to the previous tab in the tab list and activate that tab. Pressing the left arrow when the focus is on the first tab in the tab list will move focus and activate the last tab in the list. -
Right Arrow
- with focus on a tab, pressing the right arrow will move focus to the next tab in the tab list and activate that tab. Pressing the right arrow when the focus is on the last tab in the tab list will move focus to and activate the first tab in the list. -
Up arrow
- behaves the same as left arrow in order to support vertical tabs -
Down arrow
- behaves the same as right arrow in order to support vertical tabs -
Home
- with focus on a tab, moves the focus to the first tab. -
End
- with focus on a tab, moves the focus to the last tab.
URL
You, or the user, can control which tab is opened by default by using the tabpanel id as fragment in the URL.
Usage
Code
Once your HTML has all required attributes, you can initialise the tabs on two ways.
Automatic: place the data-tabs
attribute on the outer wrapper.
Manual: initialise the tabs as follows:
@param {Element} elem
@param {Object} [options]

allieTabs.init(elem, options)
Overrides
You can override the changeTab and handleKeyboardInput functions by providing them in the options object.
For instance:
allieTabs.init(elem, {handleKeyboardInput: function(e: Event, tabs: Element[]) {})
Styling
When using the automatic initialisation a class allietabs
will be placed on the
outer wrapper when the code has been executed successfully.
Using the manual method, you can provide your custom class in the options attribute
allieTabs.init(elem, {class: 'my-custom-class'})
Fallback
Styling based on the added wrapper-class allows for fallback functionality in case something went wrong or in case javascript is not available.
In which case the tabs will function as standard same page links.


Virtual Guest Node List
[Menu]
|
[Search Node]
|
[Refresh]
A list of nodes that will virtual guest nodes.
Virtual Guest
Purpose
Vendor Name
Node Type
OS Type
OS Version
Management IPAddress
Operation
[delete this guest node]


Tasklog
Created
Duration (s)
Problem
User
Verifier
{{item.created}}
{{item.duration / 1000}}
{{item.problem}}
{{item.user}}
{{item.reserved_by}}
Show duration chart
Show live queue
Chart
Taskqueue
User
Version
Problem
Reserved by
{{k}}
{{v.version}}
{{v.problem}}
{{v.reserved_by}}


Film review by Kevin Patterson
Paris, Texas * * * * (out of four) R, 1984 Directed by Wim Wenders. Written by Sam Shepard. Starring Harry Dean Stanton, Dean Stockwell, Natassja Kinski.
When I had finished watching Wim Wenders's "Paris, Texas", I knew I had just seen an excellent film, though I find it difficult to articulate exactly why it works so well. I think its greatest virtue is its low-key tone; this is by far the best personal drama I have seen in a long time, yet it is almost entirely lacking in what one would normally consider "dramatic tension." It is more powerful and poignant than most films, yet there are few tears shed and almost no harsh words or raised voices.
"Paris, Texas" opens with the very simple image of a man (Harry Dean Stanton) walking through a barren landscape by himself along the Texas/Mexico border. He eventually wanders into the office of a local physician, but literally refuses to speak. Eventually he is identified; his name is Travis, and he has a brother named Walt (Dean Stockwell) who lives in Los Angeles. Walt, who has not seen or heard from Travis in four years, drives across the country to pick him up, only to find that Travis either cannot remember where he has been or simply isn't telling.  Travis gradually emerges as a man who seems to crave the solitude of the open road; he seems most at home during his cross-country driving trips with Walt and later with his son. Wenders makes use of many exterior shots during these segments, which, along with the folk-guitar score, infuse the story with a sense of melancholy and longing. Wenders and screenwriter Sam Shepard appropriately manage both to romanticize Travis's loner tendencies and to point out the shortcomings of such an approach to life - there are many moments, such as when Travis stops to give a pat on the back to one of Los Angeles's many roadside prophets, that are touching and make us admire Travis as a human being, yet in no way does the film excuse his role in his family's breakup.
The development of Travis as a somewhat flawed but sympathetic character who wants to make amends is one of the film's strongest points, but what makes it most exceptional is its style. It tells a simple, straightforward story in a way that is quite unconventional at least by movie standards. Rather than apologizing for its simplicity by heaping up melodramatic outbursts, gratuitous sex scenes, and the like, it wears it as a badge of honor and focuses sharply on the characters. It's a shame that more filmmakers don't realize that their characters and stories are strong enough to carry a movie and as a result go for flashy sensationalism to cover their backs. But, until that happens, "Paris, Texas" holds its own as a refreshing reminder that there are still at least a few exceptions to the rule in the film industry.
NOTE: The 'R' rating for this film is, in my opinion, quite inappropriate, as there is literally no violence or nudity, only one use of the "f-word," and only one instance of implied sexual content. A 'PG-13' rating would have sufficed.

The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


Trader Erinu:
Bring me 80 Muertos feathers and I'll pay you well!
You can obtain the feathers by defeating the Shady Muertos
Captains, Warriors, Archers, Leaders and Magicians
that inhabit Nornil's Cave.


Classes
Methods
(static) delete(url, options) → {Promise.<any>}
Send a HTTP DELETE request asynchronously.
Parameters:
| Name | Type | Description |
|---|---|---|
url |
string | The URL to make HTTP DELETE request. |
options |
module:ajx.AsyncOptions | The options to make HTTP DELETE request. |
Returns:
The promise object which will get fulfilled when the request completed.
- Type
- Promise.<any>
(static) get(url, options) → {Promise.<any>}
Send a HTTP GET request asynchronously.
Parameters:
| Name | Type | Description |
|---|---|---|
url |
string | The URL to make HTTP GET request. |
options |
module:ajx.AsyncOptions | The options to make HTTP GET request. |
Returns:
The promise object which will get fulfilled when the request completed.
- Type
- Promise.<any>
(static) isCancel(x) → {boolean}
Check whether the given object is a cancel reason.
Parameters:
| Name | Type | Description |
|---|---|---|
x |
any | The object to check. |
- Source:
Returns:
true
if the object is a cancel reason.
- Type
- boolean
(static) patch(url, body, options) → {Promise.<any>}
Send a HTTP PATCH request asynchronously.
Parameters:
| Name | Type | Description |
|---|---|---|
url |
string | The URL to make HTTP PATCH request. |
body |
any | The request body to make HTTP PATCH request. If this is null or undefined, the request body becomes empty. If this is a FormData or a HTMLFormElement, the request body becomes 'multipart/form-data'. If this is an object, the request body becomes 'application/json'. Otherwise, the request body becomes plain text. |
options |
module:ajx.AsyncOptions | The options to make HTTP PATCH request. |
Returns:
The promise object which will get fulfilled when the request completed.
- Type
- Promise.<any>
(static) post(url, body, options) → {Promise.<any>}
Send a HTTP POST request asynchronously.
Parameters:
| Name | Type | Description |
|---|---|---|
url |
string | The URL to make HTTP POST request. |
body |
any | The request body to make HTTP POST request. If this is null or undefined, the request body becomes empty. If this is a FormData or a HTMLFormElement, the request body becomes 'multipart/form-data'. If this is an object, the request body becomes 'application/json'. Otherwise, the request body becomes plain text. |
options |
module:ajx.AsyncOptions | The options to make HTTP POST request. |
Returns:
The promise object which will get fulfilled when the request completed.
- Type
- Promise.<any>
(static) put(url, body, options) → {Promise.<any>}
Send a HTTP PUT request asynchronously.
Parameters:
| Name | Type | Description |
|---|---|---|
url |
string | The URL to make HTTP PUT request. |
body |
any | The request body to make HTTP PUT request. If this is null or undefined, the request body becomes empty. If this is a FormData or a HTMLFormElement, the request body becomes 'multipart/form-data'. If this is an object, the request body becomes 'application/json'. Otherwise, the request body becomes plain text. |
options |
module:ajx.AsyncOptions | The options to make HTTP PUT request. |
Returns:
The promise object which will get fulfilled when the request completed.
- Type
- Promise.<any>
Type Definitions
AsyncOptions
Type:
- object
Properties:
| Name | Type | Attributes | Description |
|---|---|---|---|
headers |
object |
<optional> |
The headers of the request. The keys are header names. The values are each header value. |
timeout |
number |
<optional> |
The timeout in milliseconds. |
cancelToken |
module:ajx.CancelToken |
<optional> |
The cancel token to abort the request. |


Site Community
Here is a list of every user who has posted a message.
Click a name to navigate to that user's page!
Loading...


| Set Global Variables {pmclust} | R Documentation |
This function will set several sets of variables globally in the
environment .pmclustEnv
according to the global matrix
X.gbd/X.spmd
.
set.global.dmat
is a ddmatrix
version of set.global.gbd
.
set.global.gbd(K = 2, X.gbd = NULL, PARAM = NULL, algorithm = c("em", "aecm", "apecm", "apecma", "kmeans"), RndEM.iter = 10) set.global.dmat(K = 2, X.dmat = NULL, PARAM = NULL, algorithm = c("em.dmat", "kmeans.dmat"), RndEM.iter = 10) set.global(K = 2, X.spmd = NULL, PARAM = NULL, algorithm = c("em", "aecm", "apecm", "apecma", "kmeans"), RndEM.iter = 10)
K |
an original set of parameters generated
by |
X.gbd |
an input GBD matrix. |
X.dmat |
an input |
X.spmd |
an input SPMD matrix. |
PARAM |
an original set of parameters generated
by |
algorithm |
an original set of parameters generated
by |
RndEM.iter |
number of RndEM iterations. |
WARNING: A global variable named X.gbd/X.spmd
should be set before
calling set.global
where X.gbd/X.spmd
is a matrix containing data
with dimension N.spmd * p
. i.e. N.spmd
observations and
p
variables.
WARNING: A global variable named X.dmat
should be set before
calling set.global.dmat
where X.dmat
is a ddmatrix
(in block-cyclic format) containing data with dimension N * p
.
X.gbd/X.spmd
and X.dmat
are supposed to exist in .GlobalEnv
.
If not, they should be as an input object and will be copied into
.pmclustEnv
which is less efficient.
A new set of PARAM
will be returned and several global
variables will be set according to the data X.gbd/X.spmd
.
Sets of global variables are store in the default environment
.pmclustEnv
.
Use readme
to see all global variables set by this function.
Use readme.dmat
to see all global variables of ddmatrix version
set by this function.
Wei-Chen Chen<EMAIL_ADDRESS>and George Ostrouchov.
High Performance Statistical Computing (HPSC) Website: http://thirteen-01.stat.iastate.edu/snoweye/hpsc/
Programming with Big Data in R Website: http://r-pbd.org/
em.step
,
aecm.step
,
apecm.step
,
apecma.step
.
## Not run: # Examples can be found in the help pages of em.step(), # aecm.step(), apecm.step(), apecma.step(), and kmeans.step(). # Examples for ddmatrix version can be found in the help pages of # kmeans.step.dmat(). ## End(Not run)


Philips Hue lighting driver UI
This is a driver service that provides access to Philips Hue devices.
No options to configure yet.


| Fills the
catch parameter when it is generated, e.g. when the
Code | Surround with... function is called. This built-in template is editable. For example, you can make the generated parameter final and always use the predefined name despite of the qualified name of the caught exception. |
| Predefined variables take the following values: | ||
| Name of the Exception variable specified as a catch parameter derived from the caught exception type, e, if the qualified name ends with Exception. | ||
| Type of the catch parameter. |


2.3.0 / 11 Jan 2012
- Support for hmac-sha2 and diffie-hellman-group-exchange-sha256 [Ryosuke Yamazaki]
2.2.2 / 04 Jan 2012
- Fixed: Connection hangs on ServerVersion.new(socket, logger) [muffl0n]
- Avoid dying when unsupported auth mechanisms are defined [pcn]
2.2.1 / 24 Aug 2011
- Do not prompt any passphrases before trying all identities from agent.
[musybite]
(see: http://net-ssh.lighthouseapp.com/projects/36253-net-ssh/tickets/30)
2.2.0 / 16 Aug 2011
- Add support for forward a local UNIX domain socket to a remote TCP socket. [Mark Imbriaco]
2.1.4 / 3 Apr 2011
- Add ConnectionTimeout exception class. [Joel Watson]
See: https://github.com/net-ssh/net-ssh-multi/pull/1
2.1.3 / 2 Mar 2011
- Call to transport.closed should be transport.close [Woon Jung]
2.1.2 / 1 Mar 2011
- Fix for Net::SSH Continues to attempt
authentication when notified it is not allowed [Eric Hodel]
(see: http://net-ssh.lighthouseapp.com/projects/36253-net-ssh/tickets/26)
- Fix for transport won’t be closed if authentication fails [Patrick Marchi]
2.1 / 19 Jan 2011
- Support “IdentitiesOnly” directive (LH-24) [Musy Bite, Edmund Haselwanter]
- Speeding up the Loggable module (LH-23) [robbebob]
2.0.24 / 14 Jan 2011
- Fix for process code to correctly wait until remote_id is set before sending any output, including eof. [Daniel Pittman, Markus Roberts]
- Fix circular require warning in Ruby 1.9.2 [Gavin Brock]
2.0.23 / 03 Jun 2010
- delay CHANNEL_EOF packet until output buffer is empty [Rich Lane]
Previously, calling eof! after send_data would result in the CHANNEL_EOF packet being sent immediately, ahead of the data in the output buffer. Now buffer becomes empty.
2.0.22 / 20 Apr 2010
- Fix for: “Parsing the config errors out because it coerces the “1” into an integer and then tries to split it on spaces for multiple host checking.” (net-ssh.lighthouseapp.com/projects/36253/tickets/10) [Lee Marlow]
2.0.21 / 20 Mar 2010
- Fix for “IdentifyFile” in ~/.ssh/config does not work if no “Host” statement is given (net-ssh.lighthouseapp.com/projects/36253/tickets/9-identifyfile-in-sshconfig-does-not-work-if-no-host-statement-is-given#ticket-9-5) [xbaldauf, Delano Mandelbaum]
- Fix for client closes a forwarded connection, but the server is reading, net-ssh terminates with IOError socket closed (net-ssh.lighthouseapp.com/projects/36253/tickets/7) [Miklós Fazekas]
- Fix for client force closes (RST) a forwarded connection, but server is reading, net-ssh terminates with exception [Miklós Fazekas]
- Fix for server closes the sending side, the on_eof is not handled. [Miklós Fazekas]
- Removed Hanna dependency in Rakefile [Delano Mandelbaum]
2.0.20 / 10 Feb 2010
- Support “ProxyCommand none” directive [Andy Lo-A-Foe]
2.0.19 / 16 Jan 2010
- Support plus sign in sshconfig hostname [Jason Weathered]
2.0.18 / 15 Jan 2010
- Fix related to recv(1) to readpartial change in 2.0.16 [Hans de Graaff, Delano Mandelbaum]
2.0.17 / 14 Dec 2009
- Don’t load net/ssh/authentication/pageant on Windows with Ruby 1.9 [Travis Reeder, Delano Mandelbaum]
2.0.16 / 28 Nov 2009
- Fix for “multiple hosts are separated by whitespace” [Akinori MUSHA]
- Add support for the ProxyCommand directive [Akinori MUSHA]
- Switched from recv(1) to readpartial in lib/net/ssh/transport/server_version.rb, so that closed sockets are recognized [Alex Peuchert]
2.0.15 / 03 Sep 2009
- Scale back IO#select patch so it mutexes only zero-timeout calls [Daniel Azuma, Will Bryant]
2.0.14 / 28 Aug 2009
- Fix for IO#select threading bug in Ruby 1.8 (LH-1) [Daniel Azuma]
- Fix for “uninitialized constant OpenSSL::Digest::MD5” exception in Net::SFTP [DL Redden]
2.0.13 / 17 Aug 2009
- Added fix for hanging in ServerVersion#negotiate! when using SOCKS5 proxy (GH-9) [Gerald Talton]
- Added support for specifying a list of hosts in .ssh/config, with tests (GH-6) [ckoehler, Delano Mandelbaum]
- Added tests for arcfour128/256/512 lengths, encryption, and decryption [Delano Mandelbaum]
- Skip packet stream tests for arcfour128/256/512 [Delano Mandelbaum]
- Fix for OpenSSL cipher key length because it always returns 16, even when 32 byte keys are required, e.g. for arcfour256 and arcfour512 ciphers [Karl Varga]
2.0.12 / 08 Jun 2009
- Applied patch for arcfour128 and arcfour256 support [Denis Bernard]
- Use unbuffered reads when negotiating the protocol version [Steven Hazel]
2.0.11 / 24 Feb 2009
- Add :key_data option for specifying raw private keys in PEM format [Alex Holems, Andrew Babkin]
2.0.10 / 4 Feb 2009
- Added Net::SSH.configuration_for to make it easier to query the SSH configuration file(s) [Jamis Buck]
2.0.9 / 1 Feb 2009
- Specifying non-nil user argument overrides user in .ssh/config [Jamis Buck]
- Ignore requests for non-existent channels (workaround ssh server bug) [Jamis Buck]
- Add terminate! method for hard shutdown scenarios [Jamis Buck]
- Revert to pre-2.0.7 key-loading behavior by default, but load private-key if public-key doesn’t exist [Jamis Buck]
- Make sure :passphrase option gets passed to key manager [Bob Cotton]
2.0.8 / 29 December 2008
- Fix private key change from 2.0.7 so that keys are loaded just-in-time, avoiding unecessary prompts from encrypted keys. [Jamis Buck]
2.0.7 / 29 December 2008
- Make key manager use private keys instead of requiring public key to exist<EMAIL_ADDRESS>- Fix failing tests<EMAIL_ADDRESS>- Don’t include pageant when running under JRuby [Angel N. Sciortino]
2.0.6 / 6 December 2008
- Update the Manifest file so that the gem includes all necessary files [Jamis Buck]
2.0.5 / 6 December 2008
- Make the Pageant interface comply with more of the Socket interface to avoid related errors [Jamis Buck]
- Don’t busy-wait on session close for remaining channels to close [Will Bryant]
- Ruby 1.9 compatibility [Jamis Buck]
- Fix Cipher#final to correctly flag a need for a cipher reset [Jamis Buck]
2.0.4 / 27 Aug 2008
- Added Connection::Session#closed? and Transport::Session#closed? [Jamis Buck]
- Numeric host names in .ssh/config are now parsed correct [Yanko Ivanov]
- Make sure the error raised when a public key file is malformed is more informative than a MethodMissing error [Jamis Buck]
- Cipher#reset is now called after Cipher#final, with the last n bytes used as the next initialization vector [Jamis Buck]
2.0.3 / 27 Jun 2008
- Make Net::SSH::Version comparable [Brian Candler]
- Fix errors in port forwarding when a channel could not be opened due to a typo in the exception name [Matthew Todd]
- Use chomp instead of strip when cleaning the version string reported by the remote host, so that trailing whitespace is preserved (this is to play nice with servers like Mocana SSH) [Timo Gatsonides]
- Correctly parse ssh_config entries with eq-sign delimiters [Jamis Buck]
- Ignore malformed ssh_config entries [Jamis Buck]
2.0.2 / 29 May 2008
- Make sure the agent client understands both RSA “identities answers” [Jamis Buck]
- Fixed key truncation bug that caused hmacs other than SHA1 to fail with “corrupt hmac” errors [Jamis Buck]
- Fix detection and loading of public keys when the keys don’t actually exist [David Dollar]
2.0.1 / 5 May 2008
- Teach Net::SSH about a handful of default key names [Jamis Buck]
2.0.0 / 1 May 2008
- Allow the :verbose argument to accept symbols (:debug, etc.) as well as Logger level constants (Logger::DEBUG, etc.) [Jamis Buck]
2.0 Preview Release 4 (1.99.3) / 19 Apr 2008
- Make sure HOME is set to something sane, even on OS’s that don’t set it by default [Jamis Buck]
- Add a :passphrase option to specify the passphrase to use with private keys [Francis Sullivan]
- Open a new auth agent connection for every auth-agent channel request [Jamis Buck]
2.0 Preview Release 3 (1.99.2) / 10 Apr 2008
- Session properties [Jamis Buck]
- Make channel open failure work with a callback so that failures can be handled similarly to successes [Jamis Buck]
2.0 Preview Release 2 (1.99.1) / 22 Mar 2008
- Partial support for ~/.ssh/config (and related) SSH configuration files [Daniel J. Berger, Jamis Buck]
- Added Net::SSH::Test to facilitate testing complex SSH state machines [Jamis Buck]
- Reworked Net::SSH::Prompt to use conditionally-selected modules [Jamis Buck, suggested by James Rosen]
- Added Channel#eof? and Channel#eof! [Jamis Buck]
- Fixed bug in strict host key verifier on cache miss [Mike Timm]
2.0 Preview Release 1 (1.99.0) / 21 Aug 2007
- First preview release of Net::SSH v2


Hello MirageOS World
First make sure you have followed the installation instructions to get a working MirageOS installation. The examples below are in the mirage-skeleton repository. Begin by cloning and changing directory to it:
$ git clone git://github.com/mirage/mirage-skeleton.git
$ cd mirage-skeleton
Step 1: Hello World!
As a first step, let’s build and run the MirageOS “Hello World” unikernel – this
will print hello\nworld\n
4 times before terminating:
hello
world
hello
world
hello
world
hello
world
First, let’s look at the code:
$ cat console/unikernel.ml
open Lwt.Infix
module Main (C: V1_LWT.CONSOLE) = struct
let start c =
let rec loop = function
| 0 -> Lwt.return_unit
| n ->
C.log_s c "hello" >>= fun () ->
OS.Time.sleep 1.0 >>= fun () ->
C.log_s c "world" >>= fun () ->
loop (n-1)
in
loop 4
end
Note: If you aren’t familiar with the Lwt library (and the >>=
operator it provides),
you may want to read at least the start of the Lwt tutorial first.
To veteran OCaml programmers among you, this might look a little odd: we have a
Main
module parameterised by another module (C
, of type CONSOLE
) that
contains a method start
taking a single parameter c
(an instance of a
CONSOLE
). This is the basic structure required to make this a MirageOS
unikernel rather than a standard OCaml POSIX application.
The concrete implementation of CONSOLE
will be supplied at compile-time,
depending on the target that you are compiling for. This configuration is stored
in config.ml
, which is very simple for our first application.
$ cat console/config.ml
open Mirage
let main =
foreign "Unikernel.Main" (console @-> job)
let () =
register "console" [main $ default_console]
The configuration file is a normal OCaml module that calls register
to create
one or more jobs, each of which represent a process (with a start/stop
lifecycle). Each job most likely depends on some device drivers; all the
available device drivers are defined in the Mirage
module (see
here).
In this case, the main
variable declares that the entry point of the process
is the Main
module from the file unikernel.ml
. The @->
combinator is used
to add a device driver to the list of functor arguments in the job definition
(see unikernel.ml
), and the final value of using this combinator should always
be a job
if you intend to register it.
Notice that we refer to the module name as a string here, instead of directly as
an OCaml value. The mirage
command-line tool evaluates this configuration file
at build-time and outputs a main.ml
that has the concrete values filled in for
you, with the exact modules varying by which backend you selected (e.g. Unix or
Xen).
MirageOS mirrors the Xen model on UNIX as far as possible: your application is built as a unikernel which needs to be instantiated and run whether on UNIX or on Xen. When your unikernel is run, it starts much as a VM on Xen does – and so must be passed references to devices such as the console, network interfaces and block devices on startup.
In this case, this simple hello world
example requires just a console for
output, so we register a single Job
consisting of the Hello.Main
module
(and, implicitly its start
function) and passing it a single reference to a
console.
You can find the module signatures of all the device drivers (such as CONSOLE
)
in the types/
directory
of the main MirageOS repository. Since you’ll find yourself referring back to
these quite often when building MirageOS applications, it’s worth bookmarking
the documentation for this module.
Building a Unix binary
We invoke all this by configuring, building and finally running the resulting unikernel under Unix first.
$ cd console
$ mirage configure -t unix
mirage configure
generates a Makefile
with all the build rules included from
evaluating the configuration file, and a main.ml
that represents the entry
point of your unikernel. The configure
step should ensure all external OPAM
dependencies are installed, but in case not, execute make depend
to check and
install if any are missing.
$ make
This builds a UNIX binary called mir-console
that contains the simple console
application. If you are on a multicore machine and want to do parallel builds,
export OPAMJOBS=4
(or some other value equal to the number of cores) will do
the trick.
Finally to run your application, as it is a standard Unix binary, simply run it
directly and observe the exciting console commands that our for
loop is
generating:
$ ./mir-console
Note that when you execute mirage configure -t xen
, the target
unikernel's target.xl
and other auto-generated configuration
files are regenerated, overwriting any modifications you may have made. If
you edit any of these, we suggest renaming and/or committing them to source
control to avoid it being overwritten subsequently.
Building a Xen unikernel
If you are on a 64-bit Linux system able to build Xen images, simply change
-t unix
for -t xen
to build a Xen VM:
$ mirage configure -t xen
$ make
Everything else remains the same! The main.ml
and Makefile
generated
differ significantly, but since the source code of your application was
parameterised over the CONSOLE
type, it doesn’t matter– you do not need to
make any changes for your code to run when linked against the Xen console driver
instead of Unix.
When you build the Xen version, you’ll have a mir-console.xen
unikernel that
can be booted as a standalone kernel. You will also see two generated files
named console.xl
and console.xl.in
in the current directory. The
console.xl
file is a Xen configuration file with sensible defaults for
the VM configuration options, intended for quickly trying the unikernel on
the build machine. The file console.xl.in
has all the configuration options
necessary for the VM to boot but has all the references to resources on the
deployment host replaced by substitutable variables. The console.xl.in
is
intended for production use; while console.xl
is intended for development
and test.
The console.xl
will look something like this:
# Generated by Mirage (Tue, 14 Jul 2015 11:17:40 GMT).
name = 'console'
kernel = '/home/vagrant/mirage-skeleton/console/mir-console.xen'
builder = 'linux'
memory = 256
on_crash = 'preserve'
disk = [ ]
# if your system uses openvswitch then either edit /etc/xen/xl.conf and set
# vif.default.script="vif-openvswitch"
# or add "script=vif-openvswitch," before the "bridge=" below:
vif = [ 'bridge=xenbr0' ]
xl
replaced xm
as the default in Xen 4.2, with xm
being removed completely
in Xen 4.5. If you find that you’re running the xend
daemon, then you should
use the xm
command. Edit this to customise the VM name, memory or the network
bridge and then run it:
$ sudo xl create -c console.xl
Parsing config from console.xl
MirageOS booting....
Initialising timer interface
Initialising console ... done.
hello
world
hello
world
hello
world
hello
world
$
As you can see, after some initial boot messages have been displayed as Xen boots the VM, you see the same output on the Xen console as you did on the UNIX version you ran earlier. If you need more help, or would like to see how to boot your Xen VM on Amazon’s EC2, click here. Finally if you are using an ARM processor, such as the CubieBoard, you should follow extra ARM-specific documentation found here.
Step 2: Getting a block device
Most useful unikernels will need to obtain data from the outside world, so we’ll explain this subsystem next.
Sector-addressible block devices
The block/
directory in mirage-skeleton
contains an example of attaching a raw block
device to your unikernel. The
V1.BLOCK
interface signature contains the operations that are possible on a block device:
primarily reading and writing aligned buffers to a 64-bit offset within the
device.
On Unix, the development workflow to handle block devices is by mapping them
onto local files. The config.ml
for the block example looks like this:
open Mirage
let main = foreign "Unikernel.Main" (console @-> block @-> job)
let img =
if_impl Key.is_xen
(block_of_file "xvda1")
(block_of_file "disk.img")
let () =
register "block_test" [main $ default_console $ img]
The main
binding looks much like the earlier console example, except for the
addition of a block
device in the list. When we register the job, we supply a
block device from a local file via block_of_file
.
As an aside, if you have your editor configured with OCaml mode, you should
be able to see the inferred types for some of the variables in the
configuration file. The @->
and $
combinators are
designed such that any mismatches in the declared device driver types and
the concrete registered implementations will result in a type error at
configuration time.
Build this on Unix in the same way as the console example.
$ cd block
$ mirage configure -t unix
$ make
$ ./generate_disk_img.sh
$ ./mir-block_test
The generate_disk_img.sh
script just calls dd
to create an empty file that
will act as our block device. Once it runs, mir-block-test
will write a series
of patterns to the block device and read them back to check that they are the
same (the logic for this is in unikernel.ml
within the Block_test
module).
The Xen version works the same way. First build the code:
$ mirage configure -t xen
$ make
$ ./generate_disk_img.sh # only required if not executed as above
This will output a Xen config file called block_test.xl
. It will look
approximately like this (note the additional disk
definition that was
generated automatically by Mirage):
# Generated by Mirage (Mon, 20 Jul 2015 12:23:24 GMT).
name = 'block_test'
kernel = '/Users/djs/djs55/mirage-skeleton/block/mir-block_test.xen'
builder = 'linux'
memory = 256
on_crash = 'preserve'
disk = [ 'format=raw, vdev=xvdb, access=rw, target=/Users/djs/djs55/mirage-skeleton/block/disk.img' ]
Now you just need to boot the VM as before, and you should see the same output (after the VM boot preamble) – but now MirageOS is linked against the Xen block device driver and is mapping the unikernel’s block requests directly through to it, rather than relying on the host OS (the Linux or FreeBSD kernel):
[root@st20 block]# xl create -c block_test.xl
Parsing config from block_test.xl
MirageOS booting....
Initialising timer interface
Initialising console ... done.
2016-05-20 13:13.27: INF [blkfront] Blkfront.connect 51728: interpreting 51728 as a xen virtual disk bus slot number
2016-05-20 13:13.27: INF [blkfront] Blkfront.connect 51728 -> 51728
2016-05-20 13:13.27: INF [blkfront] Blkfront.plug id=51728
2016-05-20 13:13.27: INF [blkfront] Blkback can only use a single-page ring
2016-05-20 13:13.27: INF [blkfront] Negotiated a single-page ring
2016-05-20 13:13.27: INF [blkfront] Blkfront.alloc ring Blkif.51728 header_size = 64; index slot size = 112; number of entries = 32
2016-05-20 13:13.27: INF [blkfront] Blkfront info: sector_size=512 sectors=4194304 max_indirect_segments=256
sectors = 524288
read_write=true
sector_size=4096
writing 1 sectors at 0
writing 1 sectors at 524287
writing 2 sectors at 0
writing 2 sectors at 524286
writing 12 sectors at 0
writing 12 sectors at 524276
writing 1 sectors at 524288
writing 12 sectors at 524277
reading 1 sectors at 524288
reading 12 sectors at 524277
Test sequence finished
Total tests started: 10
Total tests passed: 10
Total tests failed: 0
port 4 still bound!
$
On ARM, when qemu
is not available, it is better to do it through losetup
so
that you can access the ‘disk’:
$ sudo losetup -f ../block/disk.img
$ sudo losetup -a
Then edit the block_test.xl
configuration so that the disk
line reads as
follows:
disk = [ 'format=raw, vdev=xvdb, access=rw, target=/dev/loop0' ]
Step 3: Key/value stores
The earlier block device example shows how very low-level access can work. Now let’s move up to a more familiar abstraction: a key/value store that can retrieve buffers from string keys. This is essential for many common uses such as retrieving configuration data or website HTML and images.
The
kv_ro_crunch/
directory in mirage-skeleton
contains the simplest key/value store example.
The subdirectory t/
contains a couple of data files that the unikernel uses.
Our example unikernel.ml
reads in the data from one file and compares to the
other file, printing out YES
if the values match, and NO
otherwise.
The config.ml
should look familiar after the earlier block and console
examples:
open Mirage
let main =
foreign "Unikernel.Main" (console @-> kv_ro @-> kv_ro @-> job)
let disk1 = crunch "t"
let disk2 = crunch "t"
let () =
register "kv_ro" [main $ default_console $ disk1 $ disk2]
We construct the kv_ro
devices (disk1
and disk2
) by using the crunch
function. This takes a single directory as its argument, and converts that
entire directory into a static ML file that can respond with the file contents
directly. This removes the need to have an external block device entirely and is
very convenient indeed for small files.
Build the example and run it in the usual way under either Unix or Xen. Because
this no longer needs an external block device, you can run it under Xen without
having to edit the xl
configuration file at all. You can read the generated ML
file by looking at the static1.ml
file in your build tree.
Unix:
$ cd kv_ro_crunch
$ mirage configure -t unix
$ make
$ less static1.ml # the generated filesystem
$ ./mir-kv_ro
Xen:
$ mirage configure -t xen
$ make
$ sudo xl create -c kv_ro.xl
Parsing config from kv_ro.xl
MirageOS booting....
Initialising timer interface
Initialising console ... done.
YES!
YES!
YES!
YES!
YES!
YES!
YES!
YES!
YES!
YES!
Of course, this scheme doesn’t really scale up to large websites, and we often need a more elaborate configuration for larger datasets depending on how we are deploying our unikernels (i.e. for development or production). Switch to the kv_ro/ directory, which has exactly the same example as before, but with several new configuration options: it can generate a block device that contains a FAT filesystem that mirror the directory contents, or (when running under Unix) simply proxy calls dynamically to the underlying filesystem.
Since the config.ml
file is normal OCaml that is executed at build time, all
of this selection logic is simple enough.
open Mirage
let disk = generic_kv_ro "t"
let main =
foreign "Unikernel.Main" (console @-> kv_ro @-> kv_ro @-> job)
let () =
register "kv_ro" [main $ default_console $ disk $ disk]
This example is controlled by setting the FS
environment variable at build
time. If you set it to fat
, then the configuration tool will generate the
appropriate settings for external filesystem access.
On OSX:
$ mirage configure -t unix --kv_ro fat
$ ./make-fat1-image.sh
$ file fat1.img
fat1.img: x86 boot sector, code offset 0x0, OEM-ID "ocamlfat",
sectors/cluster 4, FAT 1, root entries 512, Media descriptor 0xf8,
sectors/FAT 1, sectors 49 (volumes > 32 MB) , dos < 4.0 BootSector (0x0)
or, on Linux:
$ mirage configure -t unix --kv_ro fat
$ ./make-fat1-image.sh
$ file fat1.img
fat1.img: x86 boot sector
However, notice that the definition of disk
now checks to see if the build is
happening on Unix or Xen when crunch mode is requested. If the build is Xen,
then a statically linked filesystem is used. On Unix however, the overhead of
building this can be removed by simply passing through to the underlying
filesystem, which is done via the direct_kv_ro
implementation.
You should now be seeing the power of the MirageOS configuration tool: we have built several applications that use fairly complex concepts such as filesystems and block devices that are independent of the implementations (by virtue of our application logic being a functor), and then are able to assemble several combinations of unikernels via relatively simple configuration files.
Step 4: Networking
Block devices don’t require a huge amount of configuration, but now we move onto networking, which has far more knobs attached. There are several ways that we might want to configure our networking:
- On Unix, it’s convenient to use the standard kernel socket API for developing higher level protocols (such as HTTP). These run over TCP or UDP and so sockets work just fine.
- When we want finer control over the network stack, or simply to test the OCaml networking subsystem, we can use a userspace device facility such as the common Unix tuntap to parse Ethernet frames from userspace. This requires additional configuration to assign IP addresses, and possibly configure a network bridge to let the unikernel talk to the outside world.
- Once the unikernel works under Unix with the direct OCaml TCP/IP stack, recompiling it under Xen is just a matter of linking in the Xen netfront driver to provide the Ethernet frames directly to the unikernel.
All of this can be manipulated via the config.ml
file through standard OCaml
code as before; we use the NET
environment variable in the example below. The
example below is config.ml from the
stackv4/
directory in mirage-skeleton
.
open Mirage
let handler = foreign "Unikernel.Main" (console @-> stackv4 @-> job)
let stack = generic_stackv4 default_console tap0
let () =
register "stackv4" [handler $ default_console $ stack]
This configuration shows how composable the network stack subsystem is: the
application can be configured at compile-time to either listen on a socket port
(using the Linux kernel) or use tuntap directly – the application code
remains the same. The definition of main
just adds a new stackv4
device
driver.
The net
handler checks to see if it’s building for a socket or direct network
stack. Crucially, both the socket and direct network stacks have a very similar
modular API which you can see in
mirage/types/V1.mli.
This lets your applications be parameterized across either backend.
We then define the dhcp
variable to configure the network stack to either use
DHCP or using the “default” IPv4 address (for convenience, MirageOS assigns a
default of <IP_ADDRESS>
in this case; this is of course overridden for production
deployments). The definition of stack
then uses dhcp
and net
accordingly
to set up the networking stack.
You will have noticed by this stage that mirage configure
invokes OPAM to install any libraries that it needs. If your application
needs some extra packages, you can use the optional ~packages
and ~libraries
arguments to foreign
to add the
extra OPAM packages and ocamlfind libraries. For example, you could modify
the code above to add an HTTP library.
Unix / Socket networking
Let’s get the network stack compiling using the standard Unix sockets APIs first.
$ cd stackv4
$ mirage configure -t unix --net socket
$ make
$ sudo ./mir-stackv4
Manager: connect
Manager: configuring
Manager: socket config currently ignored (TODO)
IP address: <IP_ADDRESS>
This Unix application is now listening simultaneously on 53/UDP and 8080/TCP,
and will print to the console information about data received. Let’s try, using
the commonly available netcat nc(1)
utility. From a different console
execute:
$ echo -n hello udp world | nc -unw1 <IP_ADDRESS> 53
[ 1 sec delay ]
$ echo -n hello tcp world | nc -nw1 <IP_ADDRESS> 8080
On the first console you should now see (each line in red, green and finally yellow respectively if your console supports it):
UDP <IP_ADDRESS>.59406 > <IP_ADDRESS>.53: "hello udp world"
TCP <IP_ADDRESS>.50997 > _.8080
read: 15 "hello tcp world"
Unix / MirageOS Stack with DHCP
Next, let’s try using the direct MirageOS network stack. On a pre-Yosemite Mac, be sure to install the tuntap kernel module before trying this.
Assuming you’ve got a DHCP server running:
$ cd stackv4
$ mirage configure -t unix --dhcp true --net direct
$ make
$ sudo ./mir-stackv4
Netif: connect unknown
Manager: connect
Manager: configuring
DHCP: start discovery
Sending DHCP broadcast (length 552)
DHCP: start discovery
Sending DHCP broadcast (length 552)
DHCP response:
input ciaddr <IP_ADDRESS> yiaddr <IP_ADDRESS>
siaddr <IP_ADDRESS> giaddr <IP_ADDRESS>
chaddr f2edd241cf3200000000000000000000 sname greyjay.mac.cl.cam.ac.uk file
DHCP: offer received: <IP_ADDRESS>
DHCP options: Offer : DNS servers(<IP_ADDRESS>), Routers(<IP_ADDRESS>), Subnet mask(<IP_ADDRESS>), Lease time(85536), Server identifer(<IP_ADDRESS>)
Sending DHCP broadcast (length 552)
DHCP response:
input ciaddr <IP_ADDRESS> yiaddr <IP_ADDRESS>
siaddr <IP_ADDRESS> giaddr <IP_ADDRESS>
chaddr f2edd241cf3200000000000000000000 sname greyjay.mac.cl.cam.ac.uk file
DHCP: offer received
IPv4: <IP_ADDRESS>
Netmask: <IP_ADDRESS>
Gateways: [<IP_ADDRESS>]
ARP: sending gratuitous from <IP_ADDRESS>
DHCP offer received and bound to <IP_ADDRESS> nm <IP_ADDRESS> gw [<IP_ADDRESS>]
Manager: configuration done
IP address: <IP_ADDRESS>
The application starts up, issues a DHCP request and (eventually) receives a
response allocating an address – in this case, <IP_ADDRESS>
. Using that
address we can then trigger the application logic with some network input from
nc(1)
in a separate terminal as before:
$ echo -n hello udp world | nc -unw1 <IP_ADDRESS> 53
$ echo -n hello tcp world | nc -nw1 <IP_ADDRESS> 8080
The original terminal reports the ARP transactions invoked by the stack, and then reports the input received over UDP and TCP as previously:
ARP responding to: who-has <IP_ADDRESS>?
UDP <IP_ADDRESS>.61367 > <IP_ADDRESS>.53: "hello udp world"
ARP: transmitting probe -> <IP_ADDRESS>
ARP: updating <IP_ADDRESS> -> 12:dd:b1:3a:68:64
TCP <IP_ADDRESS>.51631 > _.8080
read: 15 "hello tcp world"
Unix / MirageOS Stack with static IP addresses
N.B. This is described below on Linux for Ubuntu 14.04. It was known to
work on pre-Yosemite Mac OSX, but has not been tested on Yosemite where the new
vmnet
framework replaces tuntap
.
By default, if we do not use DHCP with a direct
network stack, Mirage will
configure the stack to use the tap0
interface with an address of <IP_ADDRESS>
.
Verify that you have an existing tap0
interface by reviewing $ sudo ip
link show
; if you do not, load the tuntap kernel module ($ sudo modprobe tun
)
and create a tap0
interface owned by root ($ sudo tunctl
). Bring tap0
up
using $ sudo ifconfig tap0 <IP_ADDRESS> up
, then:
$ cd stackv4
$ mirage configure -t unix --dhcp false --net direct
$ make
$ sudo ./mir-stackv4
Netif: plugging into tap0 with mac c2:9d:56:19:d7:2c
Netif: connect tap0
Manager: connect
Manager: configuring
Manager: Interface to <IP_ADDRESS> nm <IP_ADDRESS> gw [<IP_ADDRESS>]
ARP: sending gratuitous from <IP_ADDRESS>
Manager: configuration done
IP address: <IP_ADDRESS>
Now you should be able to ping the unikernel’s interface:
$ ping <IP_ADDRESS>
PING <IP_ADDRESS> (<IP_ADDRESS>) 56(84) bytes of data.
64 bytes from <IP_ADDRESS>: icmp_seq=1 ttl=38 time=0.527 ms
64 bytes from <IP_ADDRESS>: icmp_seq=2 ttl=38 time=0.367 ms
64 bytes from <IP_ADDRESS>: icmp_seq=3 ttl=38 time=0.291 ms
^C
--- <IP_ADDRESS> ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2005ms
rtt min/avg/max/mdev = 0.291/0.395/0.527/0.098 ms
You will see the ARP request being handled in the unikernel’s terminal:
ARP responding to: who-has <IP_ADDRESS>?
ARP: transmitting probe -> <IP_ADDRESS>
ARP: updating <IP_ADDRESS> -> 6a:a8:fe:89:3c:67
Finally, you can then execute the same nc(1)
commands as before (modulo the
target IP address of course!) to interact with the running unikernel:
$ echo -n hello udp world | nc -unw1 <IP_ADDRESS> 53
$ echo -n hello tcp world | nc -nw1 <IP_ADDRESS> 8080
And you will see the same output in the unikernel’s terminal:
ARP responding to: who-has <IP_ADDRESS>?
UDP <IP_ADDRESS>.58784 > <IP_ADDRESS>.53: "hello udp world"
ARP: transmitting probe -> <IP_ADDRESS>
ARP: updating <IP_ADDRESS> -> ee:85:43:d5:d9:4d
TCP <IP_ADDRESS>.47329 > _.8080
read: 15 "hello tcp world"
ARP: timeout <IP_ADDRESS>
(The last line will be displayed after a delay dependent on the ARP timeout setting.)
Xen
At this point, recompiling a Xen unikernel is pretty straightforward. The configuration file already disables the socket-based job if a Xen compilation is detected, leaving just the OCaml TCP/IP stack.
$ mirage configure -t xen --dhcp true
$ make
You will need to configure an appropriate Xen
network bridge to connect to this.
The mirage configure
command will guess the name of the bridge or openvswitch
to use based on the configuration of the build host. The generated stackv4.xl
will look like this:
# Generated by Mirage (Tue, 11 Aug 2015 21:05:57 GMT).
name = 'stackv4'
kernel = '/root/djs55/mirage-skeleton/stackv4/mir-stackv4.xen'
builder = 'linux'
memory = 256
on_crash = 'preserve'
disk = [ ]
# if your system uses openvswitch then either edit /etc/xen/xl.conf and set
# vif.default.script="vif-openvswitch"
# or add "script=vif-openvswitch," before the "bridge=" below:
vif = [ 'bridge=xenbr0' ]
This tells Xen to bring up the virtual network interface and add it to the
xenbr0
bridge. Depending on the dom0 interface configuration, usually
specified in /etc/network/interfaces
, this will be brought up with a static IP
address or with a DHCP address. For example, in the Mirage Ubuntu 14.04
Vagrant VM, the following lines
are uncommented:
(network-script network-bridge)
(vif-script vif-bridge)
And the bridge interface is configured in /etc/network/interfaces
as:
auto xenbr0
iface xenbr0 inet dhcp
bridge_ports eth0
Finally, you can manually inspect the generated main.ml
file to see what’s
happening under the hood with the functor applications.
Now that we’ve covered the basics of configuration, block devices and networking, let’s get the real MirageOS website up and running with a networked application.


Admin page (Spring Security protected)
Hello [[${#httpServletRequest.remoteUser}]]!
| Logged user:
| Roles:
|
Back
One Time Password :
OTP


.helpme
UI
UX
CODE
/R/
Try a vertical grid for spacing
VERTICAL GRIDS CAN HELP WITH EYE TRACKING BY MAKING SPACES BETWEEN SECTIONS EVEN


---
layout: default
title: Zander Galloway
---
Blog Posts
{% for post in site.posts %}
- {{ post.date | date_to_string }} » {{ post.title }}
{% endfor %}
Books
- In progress » The Selfish Gene - Richard Dawkins
- In progress » The Rise of Theodore Roosevelt - Edmund Morris
- In progress » The Black Swan - Nassim Nicholas Taleb
- August 2014 » Essentialism - Greg McKeown
- August 2014 » The Mobile Mind Shift - Forrester Research
- August 2014 » The Power of Habit - Charles Duhigg
- August 2014 » What the Most Successful People Do Before Breakfast - Laura Vanderkam
- August 2014 » Managing Oneself - Peter Drucker
- August 2014 » Meditations - Marcus Aurelius
- July 2014 » Switch: How to Change Things When Change is Hard - Chip & Dan Heath


Label Heading
1
Pie chart d3 implementation
Read the full post
here
Pie Chart - Worldwide
smartphone sales
by vendor in 2Q16 (Thousands of units)
Donut Chart - Same data as above


{% extends "base.html" %} {% block title %}Narrative{% endblock %} {% block head %} {{ super() }} {% endblock %} {% block content %}
Sharing Add Comment Add Evidence Copy URL
In workspaceIn narrative
Untitled
Domain: Bacteria Taxon: gamma-proteobacteria
KBase ID: KB|g.691 Source: Joe Scientist Version: Mar 27, 2013 08:13:00 PST Complete genome
Contigs: 2 Base pairs: 5,280,267 PEGs: 232 GC Content: 50.64%
Add Comment Add Evidence Copy URL
1 Comment
Source: calculated Version: Mar 27, 2013 08:13:00 PST
Roles: 29,294
Reactions: 29,294 Compounds: 2098 Annotations: 234
P(Growth): 0.98
Source: user uploaded Version: Mar 27, 2013 08:13:00 PST
growth x nickel abundance
Source: calculated Version: Mar 27, 2013 08:27:00 PST
Reactions Added: 4 growth on serine– media
Started: 9/27/2012 4:15:32pm Finished: 9/27/2012 4.15:33pm
Click to add text