Replicating Cochrane (2008)
In this post, I want to replicate some results of Cochrane (2008), The Dog That Did Not Bark: A Defense of Return Predictability, Review of Financial Studies, 21 (4). You can find that paper on John Cochrane's webpage. I wrote some thoughts about return predictability already on my Goyal/Welch replication post, so please check this one out for some more background (TODO: link). Or just read the papers, they explain it better than I could anyway.
Replication of the forecasting regressions in Cochrane's Table 1
Let's first repeat the forecasting regressions Cochrane runs in Table 1 of his paper. He uses data in real terms, i.e. deflated by the CPI, and on an annual basis ranging from 1926 to 2004. I do not have access to CRSP, but fortunately, we find similar data on Robert Shiller's web site. His data is saved in an Excel-file and is formatted in such a way that you cannot just read it into R. So you manually have to delete unnessary rows and save the sheet Data as a .CSV file. Also, here is the naming convention I apply for the relevant columns:
- RealR: Real One_Year Interest Rate (column H as of february 2013). Note that Cochrane uses real return on 3-month Treasury-Bills, but I'm to lazy to find that somewhere else and match it.
- RealP: RealP Stock Price (column P as of february 2013).
- RealD: RealD S&P Dividend (column O as of february 2013).
- Ret_SP: Return on S&P Composite (column P as of february 2013).
- Year: First column with the years.
library(data.table)
#CHANGE TO THE DIRECTORY IN WHICH YOU SAVED THE FILE
strPath <- "/home/christophj/Dropbox/R_Package_Development/vignettes_REM/Data/Robert_Shiller_Data_Formatted.csv"
#strPath <- "C:/Dropbox/R_Package_Development/vignettes_REM/Data/Robert_Shiller_Data_Formatted.csv"
shiller_data <- as.data.table(read.csv(strPath))
strStart <- 1924; strEnd <- 2005
#GET RELEVANT DATA
shiller_data <- shiller_data[, Dgrowth := c(NA, exp(diff(log(RealD))))]
shiller_data <- shiller_data[, DP := RealD/RealP]
vec_Ret_SP <- c(NA, shiller_data[2:nrow(shiller_data), RealP + RealD]/shiller_data[1:(nrow(shiller_data)-1), RealP ])
shiller_data <- shiller_data[, Ret_SP := vec_Ret_SP]
shiller_data <- shiller_data[, Ex_Ret_SP := Ret_SP - RealR]
shiller_data <- shiller_data[Year >= strStart & Year <= strEnd, list(Ret_SP, Ex_Ret_SP, RealR, RealD, Dgrowth, DP)]
summary(shiller_data)
## Ret_SP Ex_Ret_SP RealR RealD
## Min. :0.616 Min. :-0.5297 Min. :0.853 Min. : 6.43
## 1st Qu.:0.948 1st Qu.:-0.0554 1st Qu.:0.993 1st Qu.:10.13
## Median :1.101 Median : 0.0791 Median :1.018 Median :14.05
## Mean :1.091 Mean : 0.0750 Mean :1.016 Mean :13.39
## 3rd Qu.:1.218 3rd Qu.: 0.1928 3rd Qu.:1.036 3rd Qu.:17.22
## Max. :1.539 Max. : 0.5534 Max. :1.146 Max. :22.68
## Dgrowth DP
## Min. :0.647 Min. :0.0110
## 1st Qu.:0.983 1st Qu.:0.0312
## Median :1.021 Median :0.0406
## Mean :1.022 Mean :0.0413
## 3rd Qu.:1.062 3rd Qu.:0.0514
## Max. :1.499 Max. :0.0806
With the summary statistics, you can check if you get the same results as I do. Now we have all the ingredients to run the regressions.
Since we have to lag the independent variable by one year, I use the R package dyn
, which makes lagging easier. However, we have to convert our data.table
to a time-series object first with the ts
function.
library(dyn)
library(xtable)
ts_data <- ts(data=shiller_data, start=strStart, end=strEnd)
list_reg <- list(reg_R_DP = dyn$lm(Ret_SP ~ lag(DP, -1), data=ts_data),
reg_ER_DP = dyn$lm(Ex_Ret_SP ~ lag(DP, -1), data=ts_data),
reg_Dgrowth_DP = dyn$lm(Dgrowth ~ lag(DP, -1), data=ts_data),
reg_r_dp = dyn$lm(log(Ret_SP) ~ log(lag(DP, -1)), data=ts_data),
reg_dgrowth_dp = dyn$lm(log(Dgrowth) ~ log(lag(DP, -1)), data=ts_data),
reg_dp_next_dp = dyn$lm(log(DP) ~ log(lag(DP, -1)), data=ts_data))
tab <- t(as.data.frame(lapply(list_reg[1:5], FUN = function(reg) {
c(b = summary(reg)$coef[2,1],
t = summary(reg)$coef[2,3],
R2 = summary(reg)$adj.r.sq * 100,
sd = sd(reg$fitted) * 100)
})))
#Covariance matrix from table 2
#cor(cbind(list_reg[[4]]$resid, list_reg[[5]]$resid, list_reg[[6]]$resid))
#apply(cbind(list_reg[[4]]$resid, list_reg[[5]]$resid, list_reg[[6]]$resid), 2, sd)
print(xtable(tab), type="HTML")
| b | t | R2 | sd | |
|---|---|---|---|---|
| reg_R_DP | 3.19 | 2.23 | 4.73 | 4.76 |
| reg_ER_DP | 3.45 | 2.31 | 5.14 | 5.14 |
| reg_Dgrowth_DP | 0.26 | 0.32 | -1.13 | 0.39 |
| reg_r_dp | 0.09 | 1.91 | 3.22 | 3.95 |
| reg_dgrowth_dp | 0.00 | 0.12 | -1.25 | 0.15 |
Technically, it is a nice trick to save objects like the regression results in lists. (Note that if I would have had more regressions to run here, I would have written a small customed function in which the dependent and independent variables can be passed dynamically. However, for five regressions this isn't really necessary). Now you can loop through every object of the list with lapply
and apply a function on that object. In the above example, I just return the four elements I'm interested in: regression coefficient, t-value, adjusted $R^2$, and standard deviation of the fitted values of the regression.
As you can see, the regressions work by and large. Both returns and expected returns have a positive and significant regression coefficient, although mine is slightly lower than Cochrane's. This also leads to lower t-values. Also, I get a positive regression coefficient for the dividend growth regression that is close to one. As a side note: This data set probably assumes that dividends are reinvested in the stock market. For instance, Koijen/van Nieuwerburgh (2011) argue that it is better to reinvest dividends at the risk-free rate. Otherwise, what you actually measure are the properties of the stock market, i.e. realized returns, not realized dividends. Since you want to distinguish between the two, you should be careful here. They show results that actually give evidence for dividend growth predictability in the correct direction, i.e. high dividend-price ratios predict low future dividend growth.
To the interpretation: Slope coefficients around 3 in the top two row mean that when "dividend yields rise one percentage point, prices rise another two percentage points on average, rather than declining one percentage point to offset the extra dividends and render returns unpredictable" (Cochrane, 2008, p. 1533).
The basic set up
He goes on and sets up a simple first-order VAR representation that simultaneously models log returns, log dividend yields, and log dividend growth:
The simulations
simulate_data <- function(nrT = 77, phi=0.941, rho=0.9638, vec_sd = c(0.196, 0.14, 0.153)) {
#Set up vectors
shocks_dp <- rnorm(nrT + 1, sd=vec_sd[3])
shocks_d <- rnorm(nrT, sd=vec_sd[2])
vec_dp <- numeric(nrT+1)
#Draw first observation for dividend yield
ifelse(phi >= 1, vec_dp[1] <- 0, vec_dp[1] <- rnorm(1, sd=vec_sd[3]^2/(1-phi^2)))
#Simulate the system forward
for (i in 2:(nrT+1)) {
vec_dp[i] <- phi * vec_dp[i-1] + shocks_dp[i]
}
vec_d <- (phi*rho - 1) * vec_dp[1:nrT] + shocks_d
vec_r <- shocks_d - rho * shocks_dp[2:(nrT+1)]
return(data.frame(dp = vec_dp[2:(nrT+1)],
div_growth = vec_d,
ret = vec_r))
}
This is the function to simulate the data. The most confusing part of this function is the fact that we need an additional element in the dividend yield vector. Since the dividend yield of the last period determines today's dividend yield and dividend growth, we need a start value for the dividend yield.
Next, we want to run a Monte Carlo simulation in which we draw many samples, run the regressions given above and get some statistics of that. So let's write this function:
run_MCS <- function(nrMCS = 50000, ...) {
reg_coef <- matrix(nrow=nrMCS, ncol=6)
for (i in 1:nrMCS) {
#1. Simulate data
ts_data <- ts(simulate_data(...))
#2. Run regressions
list_reg <- list(dyn$lm(ret ~ lag(dp, -1), data=ts_data),
dyn$lm(div_growth ~ lag(dp, -1), data=ts_data),
dyn$lm(dp ~ lag(dp, -1), data=ts_data))
#3. Get regression coefficients and t-values
reg_coef[i, 1:3] <- unlist(lapply(list_reg,
FUN = function(reg) summary(reg)$coef[2,1]))
reg_coef[i, 4:6] <- unlist(lapply(list_reg,
FUN = function(reg) summary(reg)$coef[2,3]))
}
reg_coef <- as.data.frame(reg_coef)
reg_n <- c("ret", "div_growth", "dp")
names(reg_coef) <- c(paste0("Coef_", reg_n), paste0("tValue_", reg_n))
return(reg_coef)
}
Now we have all the ingredients to replicate Table 3 and Figure 1 in Cochrane (2008). Note that he is silent on how long one run actually is, i.e. what nrT should be in simulate_data
. However, since he calibrates the regressions with 77 years of data, I'm gonna assume that this is the time period he is simulating per run.
nrMCS <- 50000; phi <- 0.941; rho <- 0.9638
reg_coef <- run_MCS(nrMCS = nrMCS, phi=phi, rho=rho, nrT = 77 , vec_sd = c(0.196, 0.14, 0.153))
Now, we can check if we get the same results as Cochrane in the first row of his Table 3.
sum(reg_coef$Coef_ret > 0.097)/nrMCS*100
## [1] 26.51
sum(reg_coef$tValue_ret > 1.92)/nrMCS*100
## [1] 9.318
sum(reg_coef$Coef_div_growth > 0.008)/nrMCS*100
## [1] 2.662
sum(reg_coef$Coef_div_growth > 0.18)/nrMCS*100
## [1] 0.006
And we can reproduce the plots:
library(ggplot2)
#Plot maximum 5000 points
ggplot(reg_coef[1:min(nrMCS, 5000), ], aes(x=Coef_ret, y=Coef_div_growth)) +
geom_point() +
geom_vline(xintercept=0.097) +
geom_hline(yintercept=0.008) +
xlab(expression(b[r])) +
ylab(expression(b[d]))
#Plot maximum 5000 points
ggplot(reg_coef[1:min(nrMCS, 5000), ], aes(x=tValue_ret, y=tValue_div_growth)) +
geom_point() +
geom_vline(xintercept=1.92) +
geom_hline(yintercept=0.18) +
xlab(expression(t(b[r]))) +
ylab(expression(t(b[d])))
Cochrane's main point in this study is that when you just look at the regression coefficient of the log dividend yield on log returns, you would find quite often coefficents as large as or larger than the $0.097$ in the data, even if the true underlying coefficient is zero. Those are basically all data points right to the vertical line in the plot. The reason we get those significant coefficients and t-values even in a simulated world in which the true underlying coefficient is zero is due to econometrical issues. Concretely, the independent variable, i.e. the dividend yield, is very persistent and the errors are highly correlated. Stambaugh (1999) is a great start if you want to learn more about that.
But Cochrane argues that you shouldn't just look at the regression coefficient on log returns because by definition, either log returns or log dividend growth or both have to be predictable. So if we find positive return coefficients, although return is not predictable, as simulated in his example, then we should also find regression coefficients below $0.008$ for the log dividend yield on log dividend growth. Those are the points below the horizontal line in the plot. However, what we observe in the data is an economically large positive coefficient on log returns and a slightly positive coefficient on log dividend growth and this combination is very unlikely in a world in which log returns are unpredictable.
reg_coef$LRC_ret <- reg_coef$Coef_ret / (1-rho*reg_coef$Coef_dp)
ggplot(reg_coef, aes(x=LRC_ret)) +
geom_histogram(binwidth=0.05) +
geom_vline(xintercept = 1.09) +
xlim(-2, 2)
min(reg_coef$LRC_ret)
## [1] -49.15
#Plot maximum 5000 points
ggplot(reg_coef[1:min(nrMCS, 5000), ], aes(x=Coef_ret, y=Coef_dp)) +
geom_point() +
geom_vline(xintercept=0.097) +
geom_hline(yintercept=phi) +
xlab(expression(b[r])) +
ylab(expression(phi)) +
geom_line(aes(x=1-rho*c(min(Coef_dp),max(Coef_dp)) + 0.008,
y=c(min(Coef_dp),max(Coef_dp))),
linetype="dotted") +
geom_line(aes(x=0.097*(1-rho*c(min(Coef_dp),max(Coef_dp)))/(1-rho*phi),
y=c(min(Coef_dp),max(Coef_dp))))
nrMCS <- 5000 #Otherwise it runs quite long
vec_phi <- c(0.9, 0.941, 0.96, 0.98, 0.99, 1, 1.01)
df <- data.frame(Phi = vec_phi,
br = 0,
bd = 0)
df[, 1] <- vec_phi
i <- 1
for (p in vec_phi) {
int_reg_coef <- run_MCS(nrMCS = nrMCS, phi=p, rho=rho, nrT = 77, vec_sd = c(0.196, 0.14, 0.153))
df[i, 2] <- sum(int_reg_coef$Coef_ret > 0.097)/nrMCS*100
df[i, 3] <- sum(int_reg_coef$Coef_div_growth > 0.008)/nrMCS*100
i <- i + 1
}
print(xtable(df), type="HTML")
| Phi | br | bd | |
|---|---|---|---|
| 1 | 0.90 | 27.18 | 1.00 |
| 2 | 0.94 | 26.66 | 2.82 |
| 3 | 0.96 | 26.04 | 3.92 |
| 4 | 0.98 | 25.46 | 6.58 |
| 5 | 0.99 | 24.30 | 8.66 |
| 6 | 1.00 | 25.84 | 11.44 |
| 7 | 1.01 | 22.14 | 13.28 |
colMeans(reg_coef)[1:3]
## Coef_ret Coef_div_growth Coef_dp
## 0.05708 -0.09323 0.88160
blog comments powered by Disqus


respiratory virus RSV infection human syncytial MPV metapneumovirus []. children Dis Infect infants disease Med lower infections severe tract Virol associated acute protein cell viral studies cells hospitalized study antibodies risk vaccine patients antibody viruses Clin adults common young clinical fusion hospitalization â€" detection pneumonia years infected Pediatr used infection. lung age immune Microbiol cause chronic high illness {border-style RSV, care detected especially influenza pulmonary upper bronchiolitis genetic likely monoclonal neutralizing px;} serum transplant use #ffffff;} RNA [â€"]. developed evidence prospective using RT-PCR [], al.Human early healthy including large severity subjects Engl cases causes exhibit immunity incidence pediatric primary protective recombinant small subgroups treatment year However, Infections airway disease, high-risk identified infectious major mortality rate secretions therapy wheezing culture data group immunocompromised infant outbreak protection proteins rates similar specimens strains surface symptoms Human Respiratory antigenic congenital deaths elderly epithelial heart hospitalizations infection, present reinfection replication responses transmission usually weeks â€"]. Infection Role Virus diversity highest isolation otitis parainfluenza prolonged related response significant underlying virus, virusJ vitro ARI MPV. analysis antigen assays candidate cells, days function genes immunodeficiency includes increased leading low maternal nasal prior vaccines Care adults, case caused children. clear control effect effective experimental factors following heterologous however, important isolated months occur occurs older patient period positive reported ribavirin season shed < Epidemiol Res USA adult al.A al.Respiratory al.The animal assay avian based compared cultures development disease. does epidemiologic glycoprotein groups higher host intensive life marrow multiple natural number obstructive old oxygen particles population probably purified px; results stem subsequent tested {font-family -year Data Gen Infants MPV, PCR RSV-specific Respir Syncytial acid agent benefit blood bone children, childrenJ consecutive cotton cystic den diagnosis different direct duration exacerbations font-size gene highly immunization intravenous kidney level levels mechanical membrane methods morbidity nosocomial offer onset outbreaks presence prevent reduced sequence seroprevalence shedding suggest test testing tests type vial virus. viruses, .van Investigators Medical Methods RSV. Risk Study Thus, Vaccine activity adultsJ airways antiviral appear appears attachment available born combined commonly contact described difficult double; efficacy enzyme-linked epidemiology extent factor fatal form genome given glycoproteins hematopoietic hospital immunogenic immunologic immunosorbent incubation infants, laboratories limited media new newly palivizumab premature provide real-time report reports requiring sensitivity shell short showed significantly signs subgroup time titer titers types typically ventilation virus-associated viruses. winter > ./, African Canadian Child Collaborative Control Epidemiologic Immunol Mortality Network Pathol Studies University active administration annual antigens asthma asymptomatic attenuated basis binding border-color border-width bronchopulmonary care, childrenPediatr ciliated collected comorbid conditions considered critical death diagnostic did drug ear effects epinephrine event exposure expressed fluid frequency frequent genomic global globulin hand homologous humanized humans impact induce inhibition late life. lines lipid macaques mechanisms medical metapneumovirus, middle models monkey neutralization nucleic oral passive pathogenesis peak populations potential precautions prevalence proven rapid recommended recurrent research role shown single solid; trials variability varies {font-style {font-weight (F) (RSV) -years Alaska Analysis Center, Children Cochrane Crit Database Distribution Factors Further, Hong Hosp IgA Laboratory MAb MPV-associated Metapneumovirus Paramyxoviridae Patients Pediatric Prevention Pulmonol Rev. Serological Syst Transplant Vanderbilt administered agents al.An al.Detection al.Epidemiology animals antibodies. approximately association best bold bronchioles bronchiolitis. cardiopulmonary cases. cells. challenge changes childrenN common. community-acquired confirmed contribute controlled countries courier; course culture, day decrease decreased detect died differences disease: diseaseJ diverse em; envelope epidemics evaluated expected extensive failure. family forms genotype identity immunofluorescent immunogenicity immunoprophylaxis immunosuppression inactivated include infantsJ infectionJ influenza, inhaled inoculation integral known laboratory later lead licensed lineages mean metapneumovirusJ molecular mucosal neonatal novel nucleocapsid observed outpatient oxide pathogen patients. persons pneumococcal polymerase potent prematurity, previously primarily progress prophylaxis prospective, pt;} requires resolution restricted rodent samples second sensitive sequences setting shedding, socioeconomic solid specific staining strong studied study, subsequently substantial suggesting supportive surveillance susceptibility thought tissue tissues unit


{{ total }}
results
Halaman ke {{ page }}
Search
Loading....
Delete
First
Prev
Next
Last
{{ value.text }}
.
Youtube


| fkSegments reference pages |
seg=SEG_FILTERLEN(segments,minlen) seg=SEG_FILTERLEN(segments,minlen) [seg,i]=SEG_FILTERLEN(...)
seg=SEG_FILTERLEN(segments,minlen) returns the segments that have at least a length of minlen.
seg=SEG_FILTERLEN(segments,minlen) returns the segments that have at least a length of minlen and at most a length of maxlen.
[seg,i]=SEG_FILTERLEN(...) also returns the indices of the filtered segments into the original segments list. I.e. seg=segments(i,:)
| seg_filter | Toolbox page | seg_or |


I’m a fan of interactive visualizations, if you couldn’t tell already by my tendency to explain things with rglwidgets
. I decided that since I use R pretty frequently it’s about time I picked up Shiny.
Previously, I would have used tkinter in Python like I did with my Character Creation project in my second year of undergrad. Tkinter helped me make a GUI to distance the tool I was trying to make from the script itself, because obviously I don’t want the things I make to only be useful to people who know how to type up the code themselves. It was rough around the edges for sure, but the real limitation of a tool like that was how difficult it was to share. I think people were much more likely to watch the gif I put in the projects README than they would ever be to actually download and run it. Now, armed with this blog, the most shareable projects are those that can be embedded in a webpage, like Shiny apps.
I got inspired for this little project while I was reading An Introduction to Generalized Linear Models by Annette J. Dobson after seeing it cited in the R documentation for glm
. I’m still planning my next few “Generalizing Linear Models” posts and wanted to see if I could find any tips for how to structure them in this book (basically, I want to see how much of it can be explained without matrix algebra… it’s not looking good, folks). In Section 3.2, Dobson describes the exponential family of distributions as a those that can be written in the form:
and gives a small table for the a, b, c, and d functions for a few distributions in the family.
I wrote an app that could make distributions based on Dobson’s description, but was limited to the three distributions whose components she described. I found a much more complete table on the Wikipedia page for the exponential family with the reformulation:
\[f(x;\theta)=h(x)e^{\eta(\theta)T(x)-A(\theta)}\]and rewrote the app to use this formulation. Here it is.
Now, you can take a stroll through that Wikipedia table I linked above and fill in the functions from it. It should work for every distibution with a scalar natural parameter. You can also assign your distribution’s parameters as vectors to show multiple distributions from the same subfamily. By unchecking the “New plot?” box, you can plot distributions from multiple subfamilies for comparison.
I’ve linked the code at the bottom of this page if you want to see how it works or modify it (or run it locally, which should be faster).
The way I chose to make this work was essentially to evaluate the entries in each text box as if they were R code, which makes it pretty fragile and, counterintuitively, usable only by people who know some R syntax. Despite that, I think it was a good introduction to using Shiny.
Anyway, I intended to make this a very brief post, but if you have any questions feel free to comment on the gist over on github.
Thanks for reading!
Blake


public class DiscoveryConfiguration
The DiscoveryConfiguration
contains configuration information relevant to the reader
discovery process.
Use of this SDK is subject to the Stripe Terminal Terms: https://stripe.com/terminal/legal
| Constructor and Description |
|---|
DiscoveryConfiguration(int timeout,
DeviceType deviceType,
boolean isSimulated)
The
DiscoveryConfiguration contains configuration information relevant to the reader
discovery process. |
DiscoveryConfiguration(int timeout,
DeviceType deviceType)
The
DiscoveryConfiguration contains configuration information relevant to the reader
discovery process. |
DiscoveryConfiguration(int timeout)
The
DiscoveryConfiguration contains configuration information relevant to the reader
discovery process. |
DiscoveryConfiguration()
The
DiscoveryConfiguration contains configuration information relevant to the reader
discovery process. |
| Modifier and Type | Method and Description |
|---|---|
int |
component1()
The timeout for discovery,
|
DeviceType |
component2()
The reader
|
boolean |
component3()
Whether the devices returned by discovery should be simulated
|
DiscoveryConfiguration |
copy(int timeout,
DeviceType deviceType,
boolean isSimulated)
The
DiscoveryConfiguration contains configuration information relevant to the reader
discovery process. |
boolean |
equals(java.lang.Object p) |
DeviceType |
getDeviceType()
The reader
|
int |
getTimeout()
The timeout for discovery,
|
int |
hashCode() |
boolean |
isSimulated()
Whether the devices returned by discovery should be simulated
|
java.lang.String |
toString() |
@JvmOverloads public DiscoveryConfiguration(int timeout, @NotNull DeviceType deviceType, boolean isSimulated)
The DiscoveryConfiguration
contains configuration information relevant to the reader
discovery process.
Use of this SDK is subject to the Stripe Terminal Terms: https://stripe.com/terminal/legal
timeout
- The timeout for discovery, in seconds. If the value is 0, discovery will nottimeout. Default is 0 (no timeout).deviceType
- The reader's device type. Default is CHIPPER_2X
.isSimulated
- Whether the devices returned by discovery should be simulated@JvmOverloads public DiscoveryConfiguration(int timeout, @NotNull DeviceType deviceType)
The DiscoveryConfiguration
contains configuration information relevant to the reader
discovery process.
Use of this SDK is subject to the Stripe Terminal Terms: https://stripe.com/terminal/legal
timeout
- The timeout for discovery, in seconds. If the value is 0, discovery will nottimeout. Default is 0 (no timeout).deviceType
- The reader's device type. Default is CHIPPER_2X
.@JvmOverloads public DiscoveryConfiguration(int timeout)
The DiscoveryConfiguration
contains configuration information relevant to the reader
discovery process.
Use of this SDK is subject to the Stripe Terminal Terms: https://stripe.com/terminal/legal
timeout
- The timeout for discovery, in seconds. If the value is 0, discovery will nottimeout. Default is 0 (no timeout).@JvmOverloads public DiscoveryConfiguration()
The DiscoveryConfiguration
contains configuration information relevant to the reader
discovery process.
Use of this SDK is subject to the Stripe Terminal Terms: https://stripe.com/terminal/legal
public int getTimeout()
The timeout for discovery,
in seconds. If the value is 0, discovery will nottimeout. Default is 0 (no timeout).
@NotNull public DeviceType getDeviceType()
The reader
's device type. Default is CHIPPER_2X
.
public boolean isSimulated()
Whether the devices returned by discovery should be simulated
public int component1()
The timeout for discovery,
in seconds. If the value is 0, discovery will nottimeout. Default is 0 (no timeout).
@NotNull public DeviceType component2()
The reader
's device type. Default is CHIPPER_2X
.
public boolean component3()
Whether the devices returned by discovery should be simulated
@NotNull public DiscoveryConfiguration copy(int timeout, @NotNull DeviceType deviceType, boolean isSimulated)
The DiscoveryConfiguration
contains configuration information relevant to the reader
discovery process.
Use of this SDK is subject to the Stripe Terminal Terms: https://stripe.com/terminal/legal
@NotNull public java.lang.String toString()
public int hashCode()
public boolean equals(@Nullable java.lang.Object p)


The Evaluati.one platform
Gather feedback to assess personnel competencies and proficiency
Employee Engagement
Encourage your employees to engage in their personal development
Employee Experience
Assess personnel competencies and proficiency: know your superstarts and week players
Employee Effectiveness
Keep your finger on the pulse!  Enable employees to contribute feedback securely and quickly on almost any device. Control who sees what and when, with powerful access control.
SaaS or on-premise? We are flexible!
Subscribe to get access to our on-cloud platform installation with flexible plans or get license for on-premise installations - it's all up to you.
Pricing
Fast start with our on-cloud plans
Starter (free)
3 feedback
requests allowed
Small Business (50$/m)
5 feedback
requests allowed
Enterprise (150$/m)
unlimited feedback
requests allowed
24/7 support + hotline
provided
For on-premise solution please contact our customer support<EMAIL_ADDRESS>Let us show you around
We’d love to understand how we can help you reach your goals.
Can we set up a time to show you the platform? Call us!
+49<PHONE_NUMBER>


Class Light
Lights are used with Vector's Cube.
Lights may either be "on" or "off", though in practice any colors may be assigned to either state (including no color/light).
Namespace: Anki.Vector.Types
Assembly: Anki.Vector.dll
Syntax
public class Light
Constructors
| Improve this Doc View SourceLight()
Initializes a new instance of the Light class.
public Light()
Light(Color)
Initializes a new instance of the Light class.
public Light(Color onColor)
Parameters
| Type | Name | Description |
|---|---|---|
| Color | onColor | Color shown when the light is on. |
Light(Color, Color, UInt32, UInt32, UInt32, UInt32)
Initializes a new instance of the Light class.
public Light(Color onColor, Color offColor, uint onPeriodMs, uint offPeriodMs, uint transitionOnPeriodMs, uint transitionOffPeriodMs)
Parameters
| Type | Name | Description |
|---|---|---|
| Color | onColor | Color shown when the light is on. |
| Color | offColor | Color shown when the light is off. |
| UInt32 | onPeriodMs | The number of milliseconds the light should be "on" for for each cycle. |
| UInt32 | offPeriodMs | The number of milliseconds the light should be "off" for for each cycle. |
| UInt32 | transitionOnPeriodMs | The number of milliseconds to take to transition the light to the on color. |
| UInt32 | transitionOffPeriodMs | The number of milliseconds to take to transition the light to the off color. |
Properties
| Improve this Doc View SourceOffColor
Gets or sets the color shown when the light is off.
public Color OffColor { get; set; }
Property Type
| Color |
OffPeriodMs
Gets or sets the number of milliseconds the light should be "off" for for each cycle.
public uint OffPeriodMs { get; set; }
Property Type
| UInt32 |
OnColor
Gets or sets the color shown when the light is on.
public Color OnColor { get; set; }
Property Type
| Color |
OnPeriodMs
Gets or sets the number of milliseconds the light should be "on" for for each cycle.
public uint OnPeriodMs { get; set; }
Property Type
| UInt32 |
TransitionOffPeriodMs
Gets or sets the number of milliseconds to take to transition the light to the off color.
public uint TransitionOffPeriodMs { get; set; }
Property Type
| UInt32 |
TransitionOnPeriodMs
Gets or sets the number of milliseconds to take to transition the light to the on color.
public uint TransitionOnPeriodMs { get; set; }
Property Type
| UInt32 |


Medium bundle
Price
£11.00
No returns
Product overview
- Very quality toilet paper - hand crafted.
- Recycled premium legal papers.
- Not as good as the large bundle.
- Still very good though.
- Note: Please do not try and return your toilet roll to us.
Change this styling
What would you like to change?
-
Font size
-
Line height


Each of these tests renders the same HTML, a series of nested divs, images, inputs and buttons. that represent a simple voting application, where you vote for the best Bomberman 94 character.
The three scenarios are:
- jQuery.build is used to build the elements, listeners are added inline as they are created.
- Elements built with jQuery's DOM Builder functions, appended and bound to their listeners as the elements are added.
- Elements are built with native DOM manipulation, with no helper libraries.


Game status: {{vm.state.gameStatus || '(loading...)'}}
Game {{vm.state.gameName}} is currently running -- You can view its progress Graphs pages.
Game {{vm.state.gameName}} is currently waiting for brokers to connect.
Oops, something has gone wrong! Check the console for more info.


;
Hello, my name is Sergey Bolotnikov. I am a full-stack web developer and javascript specialist. Feel free to take a look at my latest projects on the web portfolio page<EMAIL_ADDRESS>Link to GitHub depository
Full Stack MMA School is an application for creating and managing classes for a martial arts school. Instructors are able to log in and create classes based on user skill level and preference for in-person or virtual lessons, and coordinate class size if constraints are required by local health ordinances. Students and instructors can also post messages and communicate with each other through the platform.
Eat Da Burger! is a restaurant app that lets users input the names of burgers they'd like to eat. Whenever a user submits a burger's name, app will display the burger on the top part of the page -- waiting to be devoured. Each burger in the waiting area also has a `Eat Me!` button. When the user clicks it, the burger will move to the lower portion of the page. App will store every burger in a database, whether devoured or not. Burger also has delete button to erase it from the database. Image of the burger provided by running pexel API if there is no image it display default image.
When the user has completed building the team,the application will create an HTML file that displays a nicely formatted team roster based on the information provided by the user. (For instructional video click on the heading)
A helpful application to locate restaurants, find recipes, and recipe videos based on the users food preferences and location.
An interactive weather application that displays the forecast in a stylish fashion and stores the user's previously searched locations.
My portfolio
A simple calendar application that allows the user to save events for each hour of the day.
Multiple Choice Quiz A timed quiz. Time is deducted for selecting incorrect answers. Save and sort previous results. Gives details of the user's answers
A simple application that generates unique passwords based on perameters set by the user.


---
layout: page
title: contact
order: 5
---
Prof. Chung's Contact Information
Phone
Office: +82-51-510-3757
Office Location
7th Engineering Building, Pusan National University
Making Appointments
Please use below doodle scheduler to make an appointment with me.
Doodle Scheduler


Enter text:
Character encoder based on page's encoding scheme:
g3.utils.htmlEntities()
Character decoder based on page's encoding scheme:
g3.utils.decodeHtmlEntities
Entity table stored in
g3.utils.entityTable


|
CS130_Team13
|
Public Member Functions | |
| string | GetInformation () |
| this function should return a draggable item (code block)'s information. More... | |
| int | GetCost () |
| int ICodeInfo.GetCost | ( | ) |
Implemented in ForLoopBlock, PanelSlot, PanelItem, and CodingPanel.
| string ICodeInfo.GetInformation | ( | ) |
this function should return a draggable item (code block)'s information.
if-statements and for-loops can be implemented with a healthy composite pattern
Implemented in ForLoopBlock, PanelSlot, PanelItem, and CodingPanel.


Hello,My name is Siddharth Majumdar, And Currently i am in my first year pursueing mechanical Enginnering from NSUT
welcome to my website
Welcome to the team! We are thrilled to have you at our office. You're going to be a valuable asset to our company, and we can't wait to see all that you accomplish. The entire team of [name of the company] is thrilled to welcome you on board. We hope you'll do some amazing works here!
Graphic design
Graphic design is a craft where professionals create visual content to communicate messages. By applying visual hierarchy and page layout techniques, designers use typography and pictures to meet users' specific needs and focus on the logic of displaying elements in interactive designs, to optimize the user experience
Web devlopment
Web developers design and create websites. They are responsible for the look of the site. They are also responsible for the site's technical aspects, such as its performance and capacity, which are measures of a website's speed and how much traffic the site can handle.
Content Writer
The job of a content writer is to create print and digital content for companies that provides information or showcases the products or services they offer. To develop content that accurately reflects company ideals, content writers often research the material they need to write each article or product description.


Security-Enhanced Linux (SELinux) is a Linux kernel security module that limits "the malicious things" that certain processes, including OVS, can do to the system in case they get compromised. In our case SELinux basically serves as the "second line of defense" that limits the things that OVS processes are allowed to do. The "first line of defense" is proper input validation that eliminates code paths that could be used by attacker to do any sort of "escape attacks", such as file name escape, shell escape, command line argument escape, buffer escape. Since developers don't always implement proper input validation, then SELinux Access Control's goal is to confine damage of such attacks, if they turned out to be possible.
Besides Type Enforcement there are other SELinux features, but they are out of scope for this document.
Currently there are two SELinux policies for Open vSwitch:
If Open vSwitch is directly started from command line, then it will run under unconfined_t SELinux domain that basically lets daemon to do whatever it likes. This is very important for developers to understand, because they might introduced code in OVS that invokes new system calls that SELinux policy did not anticipate. This means that their feature may have worked out just fine for them. However, if someone else would try to run the same code when Open vSwitch is started through systemctl, then Open vSwitch would get Permission Denied errors.
Currently the only distributions that enforce SELinux on OVS by default are RHEL, CentOS and Fedora. While Ubuntu and Debian also have some SELinux support, they run Open vSwitch under the unrestricted unconfined domain. Also, it seems that Ubuntu is leaning towards Apparmor that works slightly differently than SELinux.
SELinux and Open vSwitch are moving targets. What this means is that, if you solely rely on your Linux distribution's SELinux policy, then this policy might not have correctly anticipated that a newer Open vSwitch version needs extra white list rules. However, if you solely rely on SELinux policy that ships with Open vSwitch, then Open vSwitch developers might not have correctly anticipated the feature set that your SELinux implementation supports.
Refer to the Fedora installation guide for instructions on how to build all Open vSwitch rpm packages.
Once the package is built, install it on your Linux distribution:
$ dnf install openvswitch-selinux-policy-2.4.1-1.el7.centos.noarch.rpm
Restart Open vSwitch:
$ systemctl restart openvswitch
When SELinux was implemented some of the standard system utilities acquired -Z flag (e.g. ps -Z, ls -Z). For example, to find out under which SELinux security domain process runs, use:
$ ps -AZ | grep ovs-vswitchd system_u:system_r:openvswitch_t:s0 854 ? ovs-vswitchd
To find out the SELinux label of file or directory, use:
$ ls -Z /etc/openvswitch/conf.db system_u:object_r:openvswitch_rw_t:s0 /etc/openvswitch/conf.db
If, for example, SELinux policy for Open vSwitch is too strict, then you might see in Open vSwitch log files "Permission Denied" errors:
$ cat /var/log/openvswitch/ovs-vswitchd.log vlog|INFO|opened log file /var/log/openvswitch/ovs-vswitchd.log ovs_numa|INFO|Discovered 2 CPU cores on NUMA node 0 ovs_numa|INFO|Discovered 1 NUMA nodes and 2 CPU cores reconnect|INFO|unix:/var/run/openvswitch/db.sock: connecting... reconnect|INFO|unix:/var/run/openvswitch/db.sock: connected netlink_socket|ERR|fcntl: Permission denied dpif_netlink|ERR|Generic Netlink family 'ovs_datapath' does not exist. The Open vSwitch kernel module is probably not loaded. dpif|WARN|failed to enumerate system datapaths: Permission denied dpif|WARN|failed to create datapath ovs-system: Permission denied
However, not all "Permission denied" errors are caused by SELinux. So, before blaming too strict SELinux policy, make sure that indeed SELinux was the one that denied OVS access to certain resources, for example, run:
$ grep "openvswitch_t" /var/log/audit/audit.log | tail type=AVC msg=audit(1453235431.640:114671): avc: denied { getopt } for pid=4583 comm="ovs-vswitchd" scontext=system_u:system_r:openvswitch_t:s0 tcontext=system_u:system_r:openvswitch_t:s0 tclass=netlink_generic_socket permissive=0
If SELinux denied OVS access to certain resources, then make sure that you have installed our SELinux policy package that "loosens" up distribution's SELinux policy:
$ rpm -qa | grep openvswitch-selinux openvswitch-selinux-policy-2.4.1-1.el7.centos.noarch
Then verify that this module was indeed loaded:
# semodule -l | grep openvswitch openvswitch-custom 1.0 openvswitch 1.1.1
If you still see Permission denied errors, then take a look into selinux/openvswitch.te file in the OVS source tree and try to add white list rules. This is really simple, just run SELinux audit2allow tool:
$ grep "openvswitch_t" /var/log/audit/audit.log | audit2allow -M ovslocal
Here are few things to consider before proposing SELinux policy patches to Open vSwitch developer mailing list:
The SELinux policy that resides in Open vSwitch source tree amends SELinux policy that ships with your distributions.
Implications of this are that it is assumed that the distribution's Open vSwitch SELinux module must be already loaded to satisfy dependencies.
The SELinux policy that resides in Open vSwitch source tree must work on all currently relevant Linux distributions.
Implications of this are that you should use only those SELinux policy features that are supported by the lowest SELinux version out there. Typically this means that you should test your SELinux policy changes on the oldest RHEL or CentOS version that this OVS version supports. Check INSTALL.Fedora.rst file to find out this.
The SELinux policy is enforced only when state transition to openvswitch_t domain happens.
Implications of this are that perhaps instead of loosening SELinux policy you can do certain things at the time rpm package is installed.
Report problems to bugs@openvswitch.org.


| is_file_text {rio} | R Documentation |
Determine whether a file is “plain-text” or some sort of binary format
is_file_text(file, maxsize = Inf, text_bytes = as.raw(c(7:16, 18, 19, 32:255)))
file |
Path to the file |
maxsize |
Maximum number of bytes to read |
text_bytes |
Which characters are used by normal text (though not
necessarily just ASCII). To detect just ASCII, the
following value can be used:
|
A logical
library(datasets) export(iris, "iris.yml") is_file_text("iris.yml") # TRUE export(iris, "iris.sav") is_file_text("iris.sav") # FALSE # cleanup unlink("iris.yml") unlink("iris.sav")


You can make a chess variant (CV) by changing the FIDE rules in one or more ways, like the shape of the board, the movement of the pieces or the number of players. What we (Joao Neto and Ralph Betza) propose here is to make a game where the change happens in an unexpected point, the arrow of time!
The idea of retrochess would be to make a CV where you start with an empty board (an impossible FIDE position) or with just both kings (a FIDE draw) and start playing backwards. That is, the possible retraction moves of retrochess would be untakes, unmoves, uncastles and so on... (if you don't want to read the discussion, check the final rules for Progressive RetroChess)
In other words, you would play a game where every move was a retraction of a previous legal move, using the principle of retroanalysis. Until now, retroanalysis has been used in problems, but never to try to play a game!
 k .   k .
  q .
 k . . => . . . . .
k .
Notice that when Black is choosing an unmove, the current position is "White to play", and vice versa!
 b .  k . . => . . . . .
k . .
b .
O O . . . K .
. O O . . . K . .
. . . . . . .
. . . . . . . . .
there could not be a pawn in a3 in this position
There are some ideas that we have (but feel free to not use them)
| A player who has no legal retraction has lost the game. | |
| A player reaching the initial FIDE position of his army wins. | |
| Until all the pieces are on the board, every unmove must, if possible, be the retraction of a capture. Otherwise, it would be a very loooong game! (If you don't put any enemy pieces back onto the board, the other player can't win by getting back to the initial position.) This rule is probably necessary. | |
| A player who makes a move that reaches an impossible position loses; but making an incorrect claim of "impossible position" also loses! (Once in a while, you might be able to create a clever retroanalysis problem on the board.) |
We each had this idea independently when talking to other people, but we could not manage to find the perfect set of rules to make a good game out of it. Perhaps you can!
back to top
After the announce in Hans Bodlaender pages, we get some comments:
[Mike]You could say that you can't win until your opponent has all of his/her pieces on the board. But that probably wouldn't work so well. Doing all the untakes at the beginning would make for a very unlikely bloodbath, if you looked at the game going forwards; but at least it would be legal.
[Ralph] Right, so maybe if you had to make one uncapture every 2 moves, or something similar?
[Joao] I like it! Perhaps that should be agreed by the players, and the rules could give a default value. That value could even be used as a compensation in stronger vs weaker player games (not usual in chess, but typical in go)
[Mike] Sure, why not. If it were more than every 3 moves, for instance, then the game would be very long - at least 60 moves each (15 uncaptures x 4 moves per uncapture). A cycle of 2 or 3 should be enough. And doing all the uncaptures at the beginning of the game might be interesting too.
[...] I have also thought about retro-strategy. I would tend to do my untakes in my back rows, so that the new enemy pieces have a long way to travel home (especially the pawns). I might untake many pawns in the a (or h) column, so that my opponent would be forced to bring the pawns home by a series of untakes to get them in different columns. The king would be a powerful piece in Retro: you can walk into check, and force your opponent to undo the check. Done properly, you could advance your king toward his home square while forcing your opponent to waste moves undoing checks.
One other bit of strategy I thought of might have to be prohibited by a special rule. Under the rules mentioned so far, it's OK to leave a piece on an opponent's home square, preventing him/her from reaching the complete initial position. It's not like the opponent can take the piece that's in the way. This is legal in backgammon, but the difference is that it's possible for the opponent to hit a single blot. How would we prevent this approach? We can't ban pieces from the 7th and 8th rows. What about a variation of check: if a piece can reach its initial square, and an enemy piece is on it, that enemy piece must move right away.  We need some kind of rule to prevent both sides lounging around in their 7th and 8th ranks, just as we need a mandatory untaking rule.
Other oddities: after uncastling, the king and the rook are frozen! You can't move them, because that would invalidate the castle that's already happened. The castling restrictions regarding check are still the same.
[Ralph] Since you demonstrate that uncastling may be undesirable, I am tempted to make it forced.
[Mike] How about "un passant"? For instance, a black pawn moves from a3 to b4, leaving a white pawn at a4. This forces white to immediately move the new pawn from a4 to a2!
Other obligations might arise. If white moves pawns back to b2 and d2, and there is a dark-square white bishop already on the board, then it can't reach c1. So it must be un-underpromoted (underdemoted?), or else black has to untake the bishop on c1. And black might choose not to cooperate.
[Ralph] Wow! That's a three-exclamation-point winning tactic. Black must cooperate because of the requirement to make a legal uncapture, and must do so without delay or else his piece from c1 might have a long journey home. However, is it a winning tactic? The promoted Bishop must become a Pawn on the 7th rank, so White also has some disadvantage, which might well be larger. If nothing else, this is a way to make a position more complicated and difficult. If you have several of these situations and some tripled Pawns, finding a legal unmove could be very hard; and deciding whether your opponent's unmove was legal could be equally hard.
[Joao] About unpromotion: should it be a good strategy to untake 10 knights? or 10 bishops?
[Mike] Yes and no, IMO. It would force your opponent to unpromote all the extra
pieces, but he/she could easily retaliate by doing the same to you. So if your
opponent uses this approach as much as you do, then all it does is slow down the game
without giving either side an advantage. Maybe we should only allow uncaptures that
don't create extra pieces (or two bishops on the same color square).
[Joao]We should try the game with the least possible move restrictions!
[Mike] I agree! It wouldn't be as much fun to play if you had to constantly check
a long list of restrictions before each move.  :) Making things difficult for the opponent is a natural part of the
strategy - especially if you can't remove the opponent's pieces!
back to top
[Ralph] There should also be a shorter way to win, I think. Of course, if a game takes too many moves, people can play Progressive!
[Joao] That's a good idea! But in this case, Progressive Orthodox moves (both players move the opponent pieces)
[Mike] Well, I'd be content to try basic Retro first. We could always have basic Retro and Progressive Retro as separate games.
[Joao] I had another different idea for progressive retrochess, here it goes:
So now, both players are interested in unmoving all pieces, not just their own. It's kind of a race, a progressive retro-race, where you run and run just to get at the start line of a usual FIDE game (I wonder why this reminds me of Alice?...)
back to top
After some time, I did manage to play one game with Ted Hwa (in Feb. 2000)
[Progressive RetroChess]
1st Player: Theodore Hwa<EMAIL_ADDRESS>2nd Player: Joao Pedro Neto<EMAIL_ADDRESS>1. Ke3 * Kd7 11. *
Rf8:Bc8 Qa1:Ne1
2. * Kd4:Qe3 Qe1:Re3 12. Qa3-c5
Kf6:e6
3. Re2-e3 Ke6:Nd7 13. Nf7:e5+
Ke7:f6
4. * Ke4:Bd4 * Bg7:d4 14. f6+
f6:e5
5. * c3:d4 * c5:Bd4 15. * Ra2-e2 * c7:b6
6. Ne5:d7 b6:Rc5 16. * a4-a5 *
Qc1-a1
7. Ra5:c5 b7-b6 17. * b5-b6 *
Qd2:Bc1
8. Ra7:a5 * d6:Qc5 18. * c2-c3 * Qg5-d2
9. * Ra8:a7 * b6:a5
10. * Rc8:Ra8 * Bh8:g7
1-0
Winning Claim by Ted (accepted by Joao): This is an impossible position.
White is missing only one piece, which is the bishop moving on light squares. But a
Black capture (which must have captured this missing piece) has happened on d6, a dark
square.
Final Position
===============
r . b . .  O . . O O q .
O . . B K . . .

R .  B . N . . .
===============
| Hints so far: |
[jpn] Uncapture two Bishops in the same color, means that one of them must be
unpromoted first
[ted] Configurations like black pawns on b7, d7 force an uncapture of the light squared
black bishop on its original square (c8). Any other light
squared black bishop must be promoted.
[jpn] What will be the critical turn? Possibly this is a game with 80-100 moves, so
decomposing it to progressive, 1+2+3+4+5+6+7+8+9+10+11+12 = 78 moves Then, possibly the
first 12 moves would be "safe"...
[ted] For the first few moves of the game, both sides were in a hurry uncapturing pieces.
However, once there are pawn captures on the board, one must be careful of
uncapturing too many pieces with other non-pawn moves, leaving too few missing pieces to
account for pawn captures. And uncapturing the wrong pieces may lead to impossible
promotions or pawn structures.
| Some Final Remarks |
[ted] There should probably be some rule "requiring" uncaptures near the beginning of the game, to speed things up. Otherwise the players could just move the kings around forever. Of course, theoretically, this is not necessary since if both players just move kings around, eventually one of the players will have enough moves to go all the way back to the starting position in one turn, but that would take a long time in practice.
[jpn] I believe that players will not uncapture. What's the point of just moving the King? Anyway, there is the 50-move rule that does not permit such kind of behaviour!
[ted] Another point is that repetition of position should be disallowed, for the same reason.
[jpn] The FIDE 3-repetition rule will cover it nicely, I think, since the game would end in a undraw, something impossible.
[ted] I and a friend wrote some retro software a few years ago. You can use it to try out some of these variants. The software (for Windows) is at: http://www.stanford.edu/~hwatheod/Retractor. It lets you set up a position and take back moves, and checks for illegal positions. It does not detect every illegal position, but all common illegalities are detected. It also won't incorrectly declare a position illegal.
Hmmm... maybe we could add code to allow network play of one of these retro variants ?!?! (Or even some how modify it to be used with one of the chess servers...) Then we could try these games out. Unfortunately I have no time for that currently...
[jpn] I received this text from the itaprob mailing list:
This is left the devout record of the short one that it finishes with single the two King on the chessboard. The previous result (old of 100 years) was of Sam Loyd: 17 movements, with two various examples. Giuseppe Ponzetto (brother of the director of the Scacco review), than cica a year fa' I had goaded goaded with the result of Loyd, has introduced us from the pages of the newspaper one solution (sara the only one? si/ci the same Ponzetto) with 16,5 movements asks...   It is impossible to have less (7 prog. moves means just 28
moves and there are 30 pieces to untake).
After the end of the 1st game, we got some comments from Alfred Pfeiffer:
[apf] Why you will start only from positions where the white king did the last move?  In stalemate positions these rules seem to require that the stalemating side make the first retraction, even though from a pure positional point of view, either side might have made the last move (ignoring the stalemate). Of course this does not apply to checkmates, in which the last player to move is determined.
[apf] An extension for the rules above could be to start from any position, which is in FIDE chess a final condition (mate, stalemate, draw because insufficent mating material), and positions that theoretical could not more reduced (simplified) by further captures.
The idea for this proposal is that for each game that could occur in regular FIDE chess (forward playing) its final position also could be the starting point for a (progressive) retroplay game.
[ted] I don't understand that last condition. Do you mean some position where, say, pawns are all blocked and no captures could be made by any pieces on the board? I will refer to such a position as a 'blocked' position below. Also, there's really no reason to insist we play from a 'final' position, e.g., any middle game position will do. We could have players make several 'dropping' moves before starting the retractions. A drop is legal if the resulting position could be completed to a legal position in some way, even if the position itself is not necessarily legal. One way to implement such a rule would be to allow either player to end the dropping process at his turn and start the retractions, provided the position at that point is legal. Or we could have some minimum number of required drops.
[jpn] Something like that would need a 3rd party to give the initial end position. But it can be fun to undo a tied middle game, things would be even faster!
That idea can be transformed into a puzzle: "given an end game, find the minimum unmoves to reach initial FIDE board position"
If some initial positions were played a lot , it could appear a kind of opening theory to handle those notorious cases... And every retrochess tournament should have an award for the most elegant retrochess game seen backwards (ie, a FIDE game) ok, I know I'm dreaming... :-)
[apf] A further condition should be, that the first unmove should a such retracting move that the new position does not belong to the class of final positions. When starting with two alone kings (like above) therefore it should recapture at least a pawn or a piece with mating capabilities.
[jpn] Using the previous sugestions, I can remake the rules of Progressive RetroChess as follows:
note: rules 1 and 2 can be replaced with any position agreed by both players. This position can be proposed by one player (or a 3rd party) or made after several 'dropping' moves just before starting the retractions. A drop is legal if the resulting position could be completed to a legal position in some way, even if the position itself is not necessarily legal. One way to implement such a rule would be to allow either player to end the dropping process at his turn (there can be a minimum number of drops) and start the retractions, provided the position at that point is legal.
[jpn] Some people has pointed out that RetroChess seems rather pointless in the 1st moves (what should a player do in the first 30 piece moves?). In order to give more tactical interest, I propose the following:
RetroChess Race: A match is made of two prog. retrochess games
(check rules above). In each board, one player tries to delay the ending (i.e., avoid
reaching the initial FIDE position) and the other tries to achieve it! The player that
finished first in his board, wins!


Description
Brief
"Pine Cononagon" is a three-story effigy which takes inspiration from Nature's true Phoenix rising from the ashes, the pine cone. The pine tree life cycle is one punctuated with light and dark, in which death brings life & new beginnings. Its pine cone nubs are sealed with a resin which melts during forest fires, popping them open & spreading their seed.
The inside of the effigy will play with themes of light, dark, mortality, immortality, and reflection, in which we will take participants on an journey to death and back.
Planned Features
- Nonagon - It's 9 sided, which we think is pretty cool.
- Forest - Second floor represents our mortal life, with a forest path that starts off light & spacious, then slowly moves into a dark and bioluminescent overgrowth.
- Tree of Life - Everglowing of orange, at the center of the forest will be the massive trunk of the tree of life, which houses the door to the underworld. Its great height will be implied, but obfuscated by the dense canopy of the forest.
- Underworld - First floor represents the afterlife, immortality & muted revelry - a place where the dead raise a glass to the infinite past, neither joyful nor wistful, as they share stories and wisdom.
- AfterLife Performers - An open invitation to the theatrical realm of the Flipside community to bring life to the afterlife. We have many ideas for potential characters, but will also be open to other (respectful) artistic interpretations.
- Cloud Lounge - Third floor represents immortality reached through science, as a counterpoint to the more spiritual form of immortality: afterlife. It will be a lounge area which edges the stratosphere; participants will lay on clouds whilst looking up into space & down onto earth.
- Shadow Wall - At the back entrance of the effigy will be a wall of cloth, lit from afar, casting shadows to be seen from the other side.
- Fire Art Garden - A halfway point between the mortal world and the underworld, serving as a community gathering space filled with soft flames & metal art. There will be an open call for artists to showcase their metal art, as well as an effort to make new pieces with scrap metal.
- Flame cannon spires - Eight flame towers will surround the courtyard art, each being run by the flame effects sequencer developed for the Wizard hands in 2015 (Floodside™).
- Soundscapes - Each floor will have different ambiances, subtly suggesting the mood. We aren't yet certain of the specifics, but are currently imagining a mix of classical, new Orleans & Spanish jazz, and nature sounds.
- Water Feature - In the forest, there will be a waterfall, and a creek, and a bridge.
- Shrine - Next to the back entrance, there will be a devoted area for any participant to leave memoriam of the parted. We intend to use laser cut wood to give this area a softer beauty.
- Plenty of Seating - We want this to be an effigy that people spend time in, so there will be seating tucked away in the forest and underworld, as well as the courtyard.
 During the Burn, these nubs will pop open, as the fire spreads near them -- just as they do in real pine cones.
- [Burn time] Fire Tornado - It probably won't be a full tornado, but the design is intended to direct airflow in a twisting motion up the inside of the effigy and we are hoping it will produce a visible fire vortex.
- [Burn time] Metal Sapling - After the structure falls, a small metal sapling will be revealed: From death comes life, begin again.
- Intentionally Left Blank - There are many nooks & spaces in this piece, for which we have only themes, with the intention of encouraging community contribution, creativity, & ownership for anyone who wishes to participate.
The participant story
This year, we are attempting to lead participants through something like a story by having a very clear entrance which winds its way through scenes before reaching a relaxing community space.
The story starts off with a set of stairs that wrap around the piece and lead into an entrance at the back. Beyond that entrance lies a wide tree trunk glowing in the middle of the room, with a cocoon of branches encasing the entire area. This room is meant to represent the present -- life, growth, presence.
After spending some time in the tranquility of now, the explorer is called inside the great base of the trunk, down a winding stair/ladder which takes them to the underworld. Roots accumulate as they descend into the darkness and at the bottom they find the underground dwelling of passed souls.
Beyond this otherworldly land lies the space in between, a fire garden with soft warm flames, metal art, and benches.
Hidden inside, for the curious, atop the tree is infinite space. Resting upon the stratosphere will be an homage to the learning & discovery which will some day give us the choice to live indefinitely.
Desired Impact
While many of the themes of this piece are commonly considered morose in nature, our hope is to approach them from a different light.
When researchers interviewed people lying on their deathbed, asking what they might change if they could*, the top two things said were to have lived a life more true to themselves and to not have worked so hard. In other studies where students have been asked to write their own obituaries, nobody wishes to be remembered for their income, or the number of friends they had on facebook. It is ubiquitous for all people that the things they value most in reflection are the good times they spent with good people, and the things they loved. It is these sort of post-mortem insights about the things which really matter which we want to highlight in this piece.
And for those curious and clever enough to find the most hidden room, we wish to impart one last message: Never let anyone take away your curiosity. With time and effort, we may one day live forever.
* https://www.theguardian.com/lifeandstyle/2012/feb/01/top-five-regrets-of-the-dying
Process
Project Management Summary
The process will be divided up into creating the major components for each level, as checkpoints. We'll use jigs for repeating beams & decking. The leaders will be myself, Seph Reed, and whichever Daftees feel like taking a teaching position or are particularly attached to a portion of the piece (we have a few who've already expressed interest). Like last year, we'll have a build book with detailed designs for each of the components and a count that we'll print each week.
Teams
We will assign lieutenants to the teams below, in an effort to spread out workload:
- Build Crew - The usual DaFT build crew will likely make up the bulk of this team. As with last year, we will highly encourage new members and incorporate simple tasks for those who can show up minimally. There will be more challenging tasks for the experienced builder, along with a healthy amount of opportunity to grow skills & responsibilities throughout the build, as individuals progress or express more interest.
- Flame Effects - There will be a Flame Effects lead, as well as an entire team dedicated to ensuring the flame effects come together on time and are managed appropriately during the event.
- Decor - The decor team will be a mix of the Build team, as well as some specific callouts for painters & other visual artists from within the Flipside community.
- Performance Art - The underground will include a number of individuals that will act as the dead, Dia de los Muertos-style, always serving as fixtures in the effigy that one can expect to be present and with whom to engage. These performers may also advise of possible adventures outside of the effigy to discover stories of their life & death and encourage exploration into the event.
- Fluffers/Kitchen - No DaFT build is complete without the help of those awesome folks who keep everyone fed & refreshed. There will be at least 1 fluffer available during all onsite logistics.
- Cleanup Crew - We will put a callout well in advance, requesting volunteers for cleanup crew, to assist with cleaning up the effigy scar, mooping, & loading out the weekend after the event.
Build/Schedule
Here is the current plan for our order-of-operations:
- Week 1 (Feb 11): Prep, organize, make jigs
- Week 2 (Feb 18): 1st floor Arches
- Week 3 (Feb 25): 1st floor Deck
- Week 4 (Mar 4): 1st floor Spiral Staircase
- Week 5 (Mar 11): 3rd floor Arches
- Week 6 (Mar 18): 3rd floor Decor
- Week 7 (Mar 25): 1st floor steep outer staircase
- Week 8 (Apr 01): 2nd floor deck
- Week 9 (Apr 08): 1st floor decor
- Week 10 (Apr 15): 2nd floor Arches
- Week 11 (Apr 22): 2nd floor Decor
- Week 12 (Apr 29): Finishing Details
- Week 13 (May 06): Mid-week, start teardown
- Week 14 (May 13): Mother's Day (light teardown Sunday)
- Week 15 (May 20): Pre-event loadout & initial setup
- Week 16 (May 27): Event
- Week 17 (June 3): Post-event cleanup
Criteria
- Safety - We'll likely have the same rules as last year. No drinking and using table saws, put up railings early, be clever not risky. Consent for all the things: photography, interrupting people while working, hugs.
- Transportation - The design is made to flat pack, so space in the usual 3 moving trucks should be fine. It is also designed out of lots and lots of boards, which means it will be lots of moving weight, so many hands for loadout will be imperative.
- Burn - During the event, the pine cone nubs will be closed. When the effigy burns, they will start to open up, showing the glow of the fire inside. The spiral staircase and other elements of the siding & walls are designed to aerate the fire up around in one direction, encouraging a small interior fire tornado.
- Burn-Ban - If we've got to take it apart for a Burn-ban, we'll have had ample opportunity to understand how to do so. We'll check the forecast before the event and ask for volunteers strictly to assist in the case of a Burn-ban, since many of the main DaFT crew will be exhausted.
- Cleanup - Similar to the Burn-ban, since many of the main DaFT crew will be exhausted, we will put a special call-out for cleanup volunteers to assist after the event is over.
- Budget - $10,000 (details coming soon). We have other ideas to make this 20th anniversary effigy even more memorable, should the budget increase for this year.
- Materials - Detailed materials list will be provided with the itemized budget, later.
- Rentals - The usual 3 Box Trucks, VR, Cherry Picker, & trencher should do.
Other Considerations
- Non-toxic burn: Wiring, metal, plastic, etc. will be removed for the burn, with the exception of the small steel sapling.
- Community involvement: Anyone can join DaFT. This was the greatest impetus of me falling in love with the Flipside community and my greatest joy I hope to spark in others. There will be a lot of little details that this diverse community can bring to the table for this build and we will be encouraging everyone to be involved in any way that they can.
- Finished by Friday at Flipside: Last year's build opened Thursday night and this design is intended to follow along the same timeline. There may be small artistic embellishments after we open (because, frankly, as long as it isn't on fire, we'll always find something to fix or improve), but nothing that should get in the way of people enjoying the effigy for the duration of the event.
- Test Build: The plan is for level 1 & level 2 to just fit in the warehouse as a whole piece. The 3rd level is smaller and should fit next to the effigy for a dry run just before we tear down in the last week of May. As with last year, we'd like the piece to be able to be enjoyed by those who might not be able to go to the event.
- Relatable: The mythos of the Phoenix from the ashes is an incredibly human concept & desire. Further, the fact that participants can go inside & interact with the piece as well as each other will create beautiful memories to cherish long after what the piece looked like remains... What it felt like is what will be remembered and loved.
- Possessing a consumable aspect: It will be mostly made of wood, but there may be little surprises that are made of metal for people to take with them as a token. Regardless, leave no trace is paramount.
- Community Ownership: Any materials not burned with the effigy, such as LEDs, electrical, propane, & other components are that of the Flipside community and will be shared for future DaFT or LLC-approved pieces.
Attachments
Glamor Shot
20ft tall, 28ft diameter (includes outer staircase)
Front Center
Pine Cone nubs in image are undesigned. They will not be plywood.
Top Down
3/4 High Front Left
3/4 High Back Right
Back Center
DNA Staircase (1st Floor)
Model is incomplete, missing strength.
2nd Floor


Proton3DMaterial¶
-
class
Proton3DMaterial
(parentObject, extras)¶ The class that represents a material for a mesh in Proton.
The constructor does some fancy stuff to work for imported objects, but you don’t have to worry about this since it is automatic.
- Arguments
parentObject (object) – The (Proton3D)object that will have the material assigned to it
extras (object) – A list of parameters for this function. All that matters for this function is extras.name, which is the name of the material.
-
Proton3DMaterial.
color
¶ The color of the material, in a hexadecimal color value.
-
Proton3DMaterial.
emissive
¶ The emissive strength of the material: a value between 0 and 1.
-
Proton3DMaterial.
emissiveColor
¶ The emissive color of the material, in a hexadecimal color value.
-
Proton3DMaterial.
metalness
¶ The “metalness” of the material: a value between 0 and 1.
-
Proton3DMaterial.
opacity
¶ The opacity of the material: a value between 0 and 1.
-
Proton3DMaterial.
roughness
¶ The roughness of the material: a value between 0 and 1.
-
Proton3DMaterial.
wireframe
¶ Whether or not the material is rendered in “wireframe” mode.
-
Proton3DMaterial.
getColor
()¶ Returns the current color of the material.
- Returns
string – A hexadecimal color value.
-
Proton3DMaterial.
getEmissive
()¶ Returns the emissive intensity of the material.
- Returns
number – The emissive intensity: a value between 0 and 1.
-
Proton3DMaterial.
getEmissiveColor
()¶ Returns the emissive color of the material
- Returns
string – A hexadecimal color value
-
Proton3DMaterial.
getMetalness
()¶ Returns the metalness of the material.
- Returns
number – The metalness of the material: a value between 0 and 1.
-
Proton3DMaterial.
getOpacity
()¶ Returns the opacity of the material.
- Returns
number – The opacity of the material: a value between 0 and 1.
-
Proton3DMaterial.
getRoughness
()¶ Returns the roughness of the material.
- Returns
number – The roughness of the material: a value between 0 and 1.
-
Proton3DMaterial.
getWireframe
()¶ Returns the value of wether or not wireframe is enabled for the material
- Returns
boolean – Whether or not the material has wireframe enabled
-
Proton3DMaterial.
makeTransparent
()¶ Makes the material transparent.
-
Proton3DMaterial.
setColor
(hexString)¶ Changes the color of the material.
- Arguments
hexString (string) – A hexadecimal color value.
-
Proton3DMaterial.
setEmissive
(value)¶ Sets the emissive intensity of the material.
- Arguments
value (number) – The emissive intensity: a value between 0 and 1.
-
Proton3DMaterial.
setEmissiveColor
(color)¶ Sets the emissive color of the material
- Arguments
color (string) – A hexadecimal color value
-
Proton3DMaterial.
setMetalness
(value)¶ Sets the metalness of the material (how much it looks like metal).
- Arguments
value (number) – The metalness of the material: a value between 0 and 1.
-
Proton3DMaterial.
setOpacity
(value)¶ Sets the opacity of the material.
- Arguments
value (number) – The opacity of the material: a value between 0 and 1.
-
Proton3DMaterial.
setRoughness
(value)¶ Sets the roughness of the material.
- Arguments
value (number) – The roughness of the material: a value between 0 and 1.
-
Proton3DMaterial.
setWireframe
(value)¶ Turns on or off wireframe rendering for the material
- Arguments
value (boolean) – Whether or not the material has wireframe enabled


What are the digital inclusion categories?
- they are nine digital inclusion categories that range in a scale from ‘never have, never will’ to ‘expert’
- they are intended to capture all digital skills, non device or web specific
- they are used inorder to help ensure that services are being designed for all digital confidnece and skills
- in a service assessment researchers will need to proof that they have conducted research with lower inclusion categories (service dependent)
Digital inclusion scale
1Never have, never will
more
2Was online but no longer
more
3Willing but unable
more
4Reluctantly online
more
5Learning the ropes
more
6Task specific
more
7Basic skills
more
8Confident
more
9Expert
more
Never have, never willThe participant has never used the internet and has no desire to. They may feel that learning how to use the internet does not fit into their lives
How to decide which digital category a research participant
- During a research session you will observe behaviour or ask questions that helps you place the participant in a particular category.
- If the service you are testing will not give you enough information to go on, any of the activities or questions below could be incorporated into a research session to help expose digital confidence and skills.
Activity
Send your participant their consent form attached to an email. In the session ask them to download, fill it out, and attach it to an email to send back.This could be helpful if your service doesn’t involved any complex interactions. Though a lot of users are comfortable with email, the understanding of downloading, and finding it on the computer to attach it might expose a lack of confidence, or hesitation.
Question
Will you talk me through how you use your phone, day to day?Though this question is device specific, if the user mentions apps, online banking or listening to podcasts it might help understand their attitude towards technology.
Question
How much do you use your computer; is it mainly for work, social arrangement, or entertainment?If the user works with computers at their work, they may be comfortable with specific skills but how they use their technology in their free time might help decide between ‘task specific’ and ‘basic skills’ categories
Activity
Ask your participant to save a bookmark, and then return to it later in the session.Using this would be dependent on what your service is, where it might work is if there is any source of information that the user might be able to refer to, or if there are different sections of the prototype that they could switch between.
Activity
Ask your participant to change a setting on their browserFor example to increase the text size in the page, or to use a different browser. This may reveal the difference between someone who is comfortable trying a new digital activity or someone who has a lower level of confidence


{% include svg-icons.html %}
All works in this site by RyoX is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.
{{ site.footer-text }}


Machinery sharing lowered overall costs by 33-36% and fixed costs by 44-46% in Canada
-University of Saskatchewan, Farm Machinery Co-operatives: An Idea Worth Sharing, 2000
An average Australian farm has a 1:1 ratio of farm income to machinery assets... but the 20% most profitable farms have an average ratio of 0.7.
-GRDC, Machinery Investment and Costs Fact Sheet, 2014
Share Your Farming Gear is a place for farmers and and contractors to match spare machinery capacity with jobs that need doing. If you need a job done, list it. If you want to start renting or contracting - even for a small window - list that too. Interested in sharing machinery ownership? We'll search for compatible partners. Worried about machinery availability? We will soon insure against that. Hate admin? We automate it!
Share Your Farming Gear exists to help Australian farmers and contractors increase profits through increased machinery utilisation and more efficient access to rental machinery and contractors. When the system is fully built it will have five main features:
For more information please see Features and Pricing


This JS package aims to truthfully and easily convert anything that is rendered in the browser to a raster image for download. It works excellent with HighCharts and other SVG rendered graphics. Initially conceived to be a vueJS directive, I'm publishing the first version as a generic JS package to get feedback while building a more integrated vue solution. Any feedback is welcome!
Project Links:


|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.xpath.axes.WalkerFactory
public class WalkerFactory
This class is both a factory for XPath location path expressions, which are built from the opcode map output, and an analysis engine for the location path expressions in order to provide optimization hints.
| Field Summary | |
|---|---|
static int |
BIT_ANCESTOR
Bit is on if any of the walkers contain an ancestor step. |
static int |
BIT_ANCESTOR_OR_SELF
Bit is on if any of the walkers contain an ancestor-or-self step. |
static int |
BIT_ANY_DESCENDANT_FROM_ROOT
Found "//foo" pattern |
static int |
BIT_ATTRIBUTE
Bit is on if any of the walkers contain an attribute step. |
static int |
BIT_BACKWARDS_SELF
Bit is on if any of the walkers can go backwards in document order from the context node. |
static int |
BIT_CHILD
Bit is on if any of the walkers contain a child step. |
static int |
BIT_DESCENDANT
Bit is on if any of the walkers contain a descendant step. |
static int |
BIT_DESCENDANT_OR_SELF
Bit is on if any of the walkers contain a descendant-or-self step. |
static int |
BIT_FILTER
Bit is on if any of the walkers contain a filter (i.e. |
static int |
BIT_FOLLOWING
Bit is on if any of the walkers contain a following step. |
static int |
BIT_FOLLOWING_SIBLING
Bit is on if any of the walkers contain a following-sibiling step. |
static int |
BIT_MATCH_PATTERN
Bit is on if the expression is a match pattern. |
static int |
BIT_NAMESPACE
Bit is on if any of the walkers contain a namespace step. |
static int |
BIT_NODETEST_ANY
Bit is on if any of the walkers contain an node() test. |
static int |
BIT_PARENT
Bit is on if any of the walkers contain a parent step. |
static int |
BIT_PRECEDING
Bit is on if any of the walkers contain a preceding step. |
static int |
BIT_PRECEDING_SIBLING
Bit is on if any of the walkers contain a preceding-sibling step. |
static int |
BIT_PREDICATE
Bit is on if the expression contains a top-level predicate. |
static int |
BIT_ROOT
Bit is on if any of the walkers contain a root step. |
static int |
BIT_SELF
Bit is on if any of the walkers contain a self step. |
static int |
BITMASK_TRAVERSES_OUTSIDE_SUBTREE
If any of these bits are on, the expression may likely traverse outside the given subtree. |
static int |
BITS_COUNT
First 8 bits are the number of top-level location steps. |
static int |
BITS_RESERVED
4 bits are reserved for future use. |
(package private) static boolean |
DEBUG_ITERATOR_CREATION
Set to true for diagnostics about iterator creation |
(package private) static boolean |
DEBUG_PATTERN_CREATION
Set to true for diagnostics about walker creation |
(package private) static boolean |
DEBUG_WALKER_CREATION
Set to true for diagnostics about walker creation |
| Constructor Summary | |
|---|---|
WalkerFactory()
|
| Method Summary | |
|---|---|
private static int |
analyze(Compiler compiler,
int stepOpCodePos,
int stepIndex)
Analyze the location path and return 32 bits that give information about the location path as a whole. |
(package private) static boolean |
analyzePredicate(Compiler compiler,
int opPos,
int stepType)
Analyze a step and give information about it's predicates. |
static boolean |
canCrissCross(int analysis)
|
static boolean |
canSkipSubtrees(int analysis)
|
private static StepPattern |
createDefaultStepPattern(Compiler compiler,
int opPos,
MatchPatternIterator mpi,
int analysis,
StepPattern tail,
StepPattern head)
Create a StepPattern that is contained within a LocationPath. |
private static AxesWalker |
createDefaultWalker(Compiler compiler,
int opPos,
WalkingIterator lpi,
int analysis)
Create the proper Walker from the axes type. |
static void |
diagnoseIterator(java.lang.String name,
int analysis,
Compiler compiler)
|
(package private) static boolean |
functionProximateOrContainsProximate(Compiler compiler,
int opPos)
|
static int |
getAnalysisBitFromAxes(int axis)
Get a corresponding BIT_XXX from an axis. |
static java.lang.String |
getAnalysisString(int analysis)
|
static int |
getAxisFromStep(Compiler compiler,
int stepOpCodePos)
Special purpose function to see if we can optimize the pattern for a DescendantIterator. |
static int |
getStepCount(int analysis)
|
static boolean |
hasPredicate(int analysis)
|
static boolean |
isAbsolute(int analysis)
|
static boolean |
isDownwardAxisOfMany(int axis)
Tell if the given axis goes downword. |
private static boolean |
isNaturalDocOrder(Compiler compiler,
int stepOpCodePos,
int stepIndex,
int analysis)
Tell if the pattern can be 'walked' with the iteration steps in natural document order, without duplicates. |
static boolean |
isNaturalDocOrder(int analysis)
Tell if the pattern can be 'walked' with the iteration steps in natural document order, without duplicates. |
static boolean |
isOneStep(int analysis)
|
private static boolean |
isOptimizableForDescendantIterator(Compiler compiler,
int stepOpCodePos,
int stepIndex)
Special purpose function to see if we can optimize the pattern for a DescendantIterator. |
(package private) static boolean |
isProximateInnerExpr(Compiler compiler,
int opPos)
|
static boolean |
isSet(int analysis,
int bits)
|
static boolean |
isWild(int analysis)
|
(package private) static AxesWalker |
loadOneWalker(WalkingIterator lpi,
Compiler compiler,
int stepOpCodePos)
This method is for building an array of possible levels where the target element(s) could be found for a match. |
(package private) static StepPattern |
loadSteps(MatchPatternIterator mpi,
Compiler compiler,
int stepOpCodePos,
int stepIndex)
Read a LocationPath as a generalized match pattern. |
(package private) static AxesWalker |
loadWalkers(WalkingIterator lpi,
Compiler compiler,
int stepOpCodePos,
int stepIndex)
This method is for building an array of possible levels where the target element(s) could be found for a match. |
static boolean |
mightBeProximate(Compiler compiler,
int opPos,
int stepType)
Tell if the predicates need to have proximity knowledge. |
static DTMIterator |
newDTMIterator(Compiler compiler,
int opPos,
boolean isTopLevel)
Create a new LocPathIterator iterator. |
static boolean |
walksAncestors(int analysis)
|
static boolean |
walksAttributes(int analysis)
|
static boolean |
walksChildren(int analysis)
|
static boolean |
walksChildrenAndExtraAndSelfOnly(int analysis)
|
static boolean |
walksChildrenOnly(int analysis)
|
static boolean |
walksDescendants(int analysis)
|
static boolean |
walksDescendantsAndExtraAndSelfOnly(int analysis)
|
static boolean |
walksDownExtraOnly(int analysis)
|
static boolean |
walksDownOnly(int analysis)
|
static boolean |
walksExtraNodes(int analysis)
|
static boolean |
walksExtraNodesOnly(int analysis)
|
static boolean |
walksFilteredList(int analysis)
|
static boolean |
walksFollowingOnlyMaybeAbsolute(int analysis)
|
static boolean |
walksInDocOrder(int analysis)
|
static boolean |
walksNamespaces(int analysis)
|
static boolean |
walksSelfOnly(int analysis)
|
static boolean |
walksSideways(int analysis)
|
static boolean |
walksSubtree(int analysis)
|
static boolean |
walksSubtreeOnly(int analysis)
|
static boolean |
walksSubtreeOnlyFromRootOrContext(int analysis)
|
static boolean |
walksSubtreeOnlyMaybeAbsolute(int analysis)
|
static boolean |
walksUp(int analysis)
|
static boolean |
walksUpOnly(int analysis)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
static final boolean DEBUG_PATTERN_CREATION
static final boolean DEBUG_WALKER_CREATION
static final boolean DEBUG_ITERATOR_CREATION
public static final int BITS_COUNT
public static final int BITS_RESERVED
public static final int BIT_PREDICATE
public static final int BIT_ANCESTOR
public static final int BIT_ANCESTOR_OR_SELF
public static final int BIT_ATTRIBUTE
public static final int BIT_CHILD
public static final int BIT_DESCENDANT
public static final int BIT_DESCENDANT_OR_SELF
public static final int BIT_FOLLOWING
public static final int BIT_FOLLOWING_SIBLING
public static final int BIT_NAMESPACE
public static final int BIT_PARENT
public static final int BIT_PRECEDING
public static final int BIT_PRECEDING_SIBLING
public static final int BIT_SELF
public static final int BIT_FILTER
public static final int BIT_ROOT
public static final int BITMASK_TRAVERSES_OUTSIDE_SUBTREE
public static final int BIT_BACKWARDS_SELF
public static final int BIT_ANY_DESCENDANT_FROM_ROOT
public static final int BIT_NODETEST_ANY
public static final int BIT_MATCH_PATTERN
| Constructor Detail |
|---|
public WalkerFactory()
| Method Detail |
|---|
static AxesWalker loadOneWalker(WalkingIterator lpi, Compiler compiler, int stepOpCodePos) throws javax.xml.transform.TransformerException
lpi
- The owning location path iterator.compiler
- non-null reference to compiler object that has processed
the XPath operations into an opcode map.stepOpCodePos
- The opcode position for the step.
javax.xml.transform.TransformerException
static AxesWalker loadWalkers(WalkingIterator lpi, Compiler compiler, int stepOpCodePos, int stepIndex) throws javax.xml.transform.TransformerException
lpi
- The owning location path iterator object.compiler
- non-null reference to compiler object that has processed
the XPath operations into an opcode map.stepOpCodePos
- The opcode position for the step.stepIndex
- The top-level step index withing the iterator.
javax.xml.transform.TransformerException
public static boolean isSet(int analysis, int bits)
public static void diagnoseIterator(java.lang.String name, int analysis, Compiler compiler)
public static DTMIterator newDTMIterator(Compiler compiler, int opPos, boolean isTopLevel) throws javax.xml.transform.TransformerException
compiler
- non-null reference to compiler object that has processed
the XPath operations into an opcode map.opPos
- The position of the operation code for this itterator.
javax.xml.transform.TransformerException
public static int getAxisFromStep(Compiler compiler, int stepOpCodePos) throws javax.xml.transform.TransformerException
compiler
- non-null reference to compiler object that has processed
the XPath operations into an opcode map.stepOpCodePos
- The opcode position for the step.
javax.xml.transform.TransformerException
public static int getAnalysisBitFromAxes(int axis)
axis
- One of Axis.ANCESTOR, etc.
static boolean functionProximateOrContainsProximate(Compiler compiler, int opPos)
static boolean isProximateInnerExpr(Compiler compiler, int opPos)
public static boolean mightBeProximate(Compiler compiler, int opPos, int stepType) throws javax.xml.transform.TransformerException
javax.xml.transform.TransformerException
private static boolean isOptimizableForDescendantIterator(Compiler compiler, int stepOpCodePos, int stepIndex) throws javax.xml.transform.TransformerException
compiler
- non-null reference to compiler object that has processed
the XPath operations into an opcode map.stepOpCodePos
- The opcode position for the step.stepIndex
- The top-level step index withing the iterator.
javax.xml.transform.TransformerException
private static int analyze(Compiler compiler, int stepOpCodePos, int stepIndex) throws javax.xml.transform.TransformerException
compiler
- non-null reference to compiler object that has processed
the XPath operations into an opcode map.stepOpCodePos
- The opcode position for the step.stepIndex
- The top-level step index withing the iterator.
javax.xml.transform.TransformerException
public static boolean isDownwardAxisOfMany(int axis)
axis
- One of Axis.XXX.
static StepPattern loadSteps(MatchPatternIterator mpi, Compiler compiler, int stepOpCodePos, int stepIndex) throws javax.xml.transform.TransformerException
So, the selection "foo/daz[2]" is, in non-abreviated expanded syntax, "self::node()/following-sibling::foo/child::daz[position()=2]". Taking this as a match pattern for a probable node, it works out to "self::daz/parent::foo[child::daz[position()=2 and isPrevStepNode()] precedingSibling::node()[isContextNodeOfLocationPath()]", adding magic isPrevStepNode and isContextNodeOfLocationPath operations. Predicates in the location path have to be executed by the following step, because they have to know the context of their execution.
mpi
- The MatchPatternIterator to which the steps will be attached.compiler
- The compiler that holds the syntax tree/op map to
construct from.stepOpCodePos
- The current op code position within the opmap.stepIndex
- The top-level step index withing the iterator.
javax.xml.transform.TransformerException
private static StepPattern createDefaultStepPattern(Compiler compiler, int opPos, MatchPatternIterator mpi, int analysis, StepPattern tail, StepPattern head) throws javax.xml.transform.TransformerException
compiler
- The compiler that holds the syntax tree/op map to
construct from.stepOpCodePos
- The current op code position within the opmap.mpi
- The MatchPatternIterator to which the steps will be attached.analysis
- 32 bits of analysis, from which the type of AxesWalker
may be influenced.tail
- The step that is the first step analyzed, but the last
step in the relative match linked list, i.e. the tail.
May be null.head
- The step that is the current head of the relative
match step linked list.
May be null.
javax.xml.transform.TransformerException
static boolean analyzePredicate(Compiler compiler, int opPos, int stepType) throws javax.xml.transform.TransformerException
compiler
- non-null reference to compiler object that has processed
the XPath operations into an opcode map.opPos
- The opcode position for the step.stepType
- The type of step, one of OP_GROUP, etc.
javax.xml.transform.TransformerException
private static AxesWalker createDefaultWalker(Compiler compiler, int opPos, WalkingIterator lpi, int analysis)
compiler
- non-null reference to compiler object that has processed
the XPath operations into an opcode map.opPos
- The opcode position for the step.lpi
- The owning location path iterator.analysis
- 32 bits of analysis, from which the type of AxesWalker
may be influenced.
java.lang.RuntimeException
- if the input is bad.public static java.lang.String getAnalysisString(int analysis)
public static boolean hasPredicate(int analysis)
public static boolean isWild(int analysis)
public static boolean walksAncestors(int analysis)
public static boolean walksAttributes(int analysis)
public static boolean walksNamespaces(int analysis)
public static boolean walksChildren(int analysis)
public static boolean walksDescendants(int analysis)
public static boolean walksSubtree(int analysis)
public static boolean walksSubtreeOnlyMaybeAbsolute(int analysis)
public static boolean walksSubtreeOnly(int analysis)
public static boolean walksFilteredList(int analysis)
public static boolean walksSubtreeOnlyFromRootOrContext(int analysis)
public static boolean walksInDocOrder(int analysis)
public static boolean walksFollowingOnlyMaybeAbsolute(int analysis)
public static boolean walksUp(int analysis)
public static boolean walksSideways(int analysis)
public static boolean walksExtraNodes(int analysis)
public static boolean walksExtraNodesOnly(int analysis)
public static boolean isAbsolute(int analysis)
public static boolean walksChildrenOnly(int analysis)
public static boolean walksChildrenAndExtraAndSelfOnly(int analysis)
public static boolean walksDescendantsAndExtraAndSelfOnly(int analysis)
public static boolean walksSelfOnly(int analysis)
public static boolean walksUpOnly(int analysis)
public static boolean walksDownOnly(int analysis)
public static boolean walksDownExtraOnly(int analysis)
public static boolean canSkipSubtrees(int analysis)
public static boolean canCrissCross(int analysis)
public static boolean isNaturalDocOrder(int analysis)
analysis
- The general analysis of the pattern.
javax.xml.transform.TransformerException
private static boolean isNaturalDocOrder(Compiler compiler, int stepOpCodePos, int stepIndex, int analysis) throws javax.xml.transform.TransformerException
compiler
- non-null reference to compiler object that has processed
the XPath operations into an opcode map.stepOpCodePos
- The opcode position for the step.stepIndex
- The top-level step index withing the iterator.analysis
- The general analysis of the pattern.
javax.xml.transform.TransformerException
public static boolean isOneStep(int analysis)
public static int getStepCount(int analysis)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |


Thank you for participating in BusMall's focus group survey! As a reward for your participation, you will receive a $25 credit towards your first purchase through BusMall.
Below are three images of possible products that BusMall will carry in their catalogs. Look at the images and click on the item you would be most interested in purchasing. There are 20 possible products and you will make 25 selections, so there will be repeats. If you are unsure what a product is based on the picture, mouse over the image for a brief description.