This week, I am exploring Holger K. von Jouanne-Diedrich’s OneR package for machine learning. I am running an example analysis on world happiness data and compare the results with other machine learning models (decision trees, random forest, gradient boosting trees and neural nets).
Conclusions
All in all, based on this example, I would confirm that OneR models do indeed produce sufficiently accurate models for setting a good baseline. OneR was definitely faster than random forest, gradient boosting and neural nets. However, the latter were more complex models and included cross-validation.
If you prefer an easy to understand model that is very simple, OneR is a very good way to go. You could also use it as a starting point for developing more complex models with improved accuracy.
When looking at feature importance across models, the feature OneR chose - Economy/GDP per capita - was confirmed by random forest, gradient boosting trees and neural networks as being the most important feature. This is in itself an interesting conclusion! Of course, this correlation does not tell us that there is a direct causal relationship between money and happiness, but we can say that a country’s economy is the best individual predictor for how happy people tend to be.
OneR
OneR has been developed for the purpose of creating machine learning models that are easy to interpret and understand, while still being as accurate as possible. It is based on the one rule classification algorithm from Holte (1993), which is basically a decision tree cut at the first level.
While the original algorithm has difficulties in handling missing values and numeric data, the package provides enhanced functionality to handle those cases better, e.g. introducing a separate class for NA values and the optbin() function to find optimal splitting points for each feature. The main function of the package is OneR, which finds an optimal split for each feature and only use the most important feature with highest training accuracy for classification.
I installed the latest stable version of the OneR package from CRAN.
library(OneR)
The dataset
I am using the World Happiness Report 2016 from Kaggle.
library(tidyverse)
data_16 <- read.table("world-happiness/2016.csv", sep = ",", header = TRUE)
data_15 <- read.table("world-happiness/2015.csv", sep = ",", header = TRUE)
In the 2016 data there are upper and lower CI for the happiness score given, while in the 2015 data we have standard errors. Because I want to combine data from the two years, I am using only columns that are in both datasets.
common_feats <- colnames(data_16)[which(colnames(data_16) %in% colnames(data_15))]
# features and response variable for modeling
feats <- setdiff(common_feats, c("Country", "Happiness.Rank", "Happiness.Score"))
response <- "Happiness.Score"
# combine data from 2015 and 2016
data_15_16 <- rbind(select(data_15, one_of(c(feats, response))),
select(data_16, one_of(c(feats, response))))
The response variable happiness score is on a numeric scale. OneR could also perform regression but here, I want to compare classification tasks. For classifying happiness, I create three bins for low, medium and high values of the happiness score. In order to not having to deal with unbalanced data, I am using the bin() function from OneR with method = "content"
. For plotting the cut-points, I am extracting the numbers from the default level names.
data_15_16$Happiness.Score.l <- bin(data_15_16$Happiness.Score, nbins = 3, method = "content")
intervals <- paste(levels(data_15_16$Happiness.Score.l), collapse = " ")
intervals <- gsub("\\(|]", "", intervals)
intervals <- gsub(",", " ", intervals)
intervals <- as.numeric(unique(strsplit(intervals, " ")[[1]]))
data_15_16 %>%
ggplot() +
geom_density(aes(x = Happiness.Score), color = "blue", fill = "blue", alpha = 0.4) +
geom_vline(xintercept = intervals[2]) +
geom_vline(xintercept = intervals[3])
Now I am removing the original happiness score column from the data for modeling and rename the factor levels of the response variable.
data_15_16 <- select(data_15_16, -Happiness.Score) %>%
mutate(Happiness.Score.l = plyr::revalue(Happiness.Score.l, c("(2.83,4.79]" = "low", "(4.79,5.89]" = "medium", "(5.89,7.59]" = "high")))
Because there are only 9 features in this small dataset, I want to explore them all individually before modeling. First, I am plotting the only categorical variable: Region.
This plots shows that there are a few regions with very strong biases in happiness: People in Western Europe, Australia, New Zealand, North America, Latin American and the Caribbean tend to me in the high happiness group, while people in sub-saharan Africa and Southern Asia tend to be the least happiest.
data_15_16 %>%
ggplot(aes(x = Region, fill = Happiness.Score.l)) +
geom_bar(position = "dodge", alpha = 0.7) +
theme(axis.text.x = element_text(angle = 45, vjust = 1, hjust = 1),
plot.margin = unit(c(0, 0, 0, 1.5), "cm")) +
scale_fill_brewer(palette = "Set1")
The remaining quantitative variables show happiness biases to varying degrees: e.g. low health and life expectancy is strongly biased towards low happiness, economic factors, family and freedom show a bias in the same direction, albeit not as strong.
data_15_16 %>%
gather(x, y, Economy..GDP.per.Capita.:Dystopia.Residual) %>%
ggplot(aes(x = y, fill = Happiness.Score.l)) +
geom_histogram(alpha = 0.7) +
facet_wrap(~ x, scales = "free", ncol = 4) +
scale_fill_brewer(palette = "Set1")
While OneR could also handle categorical data, in this example, I only want to consider the quantitative features to show the differences between OneR and other machine learning algorithms.
data_15_16 <- select(data_15_16, -Region)
Modeling
The algorithms I will compare to OneR will be run via the caret package.
# configure multicore
library(doParallel)
cl <- makeCluster(detectCores())
registerDoParallel(cl)
library(caret)
I will also use caret’s createDataPartition() function to partition the data into training (70%) and test sets (30%).
set.seed(42)
index <- createDataPartition(data_15_16$Happiness.Score.l, p = 0.7, list = FALSE)
train_data <- data_15_16[index, ]
test_data <- data_15_16[-index, ]
OneR
OneR only accepts categorical features. Because we have numerical features, we need to convert them to factors by splitting them into appropriate bins. While the original OneR algorithm splits the values into ever smaller factors, this has been changed in this R-implementation with the argument of preventing overfitting. We can either split the data into pre-defined numbers of buckets (by length, content or cluster) or we can use the optbin() function to obtain the optimal number of factors from pairwise logistic regression or information gain.
# default method length
data_1 <- bin(train_data, nbins = 5, method = "length")
# method content
data_2 <- bin(train_data, nbins = 5, method = "content")
# method cluster
data_3 <- bin(train_data, nbins = 3, method = "cluster")
# optimal bin number logistic regression
data_4 <- optbin(formula = Happiness.Score.l ~., data = train_data, method = "logreg")
# optimal bin number information gain
data_5 <- optbin(formula = Happiness.Score.l ~., data = train_data, method = "infogain")
This is how the data looks like following discretization:
- Default method
- 5 bins with
method = "content
- 3 bins with
method = "cluster
- optimal bin number according to logistic regression
- optimal bin number according to information gain
Model building
Now I am running the OneR models. During model building, the chosen attribute/feature with highest accuracy along with the top 7 features decision rules and accuracies are printed. Unfortunately, this information is not saved in the model object; this would have been nice in order to compare the importance of features across models later on.
Here, all five models achieved highest prediction accuracy with the feature Economy GDP per capita.
for (i in 1:5) {
data <- get(paste0("data_", i))
print(model <- OneR(formula = Happiness.Score.l ~., data = data, verbose = TRUE))
assign(paste0("model_", i), model)
}
##
## Attribute Accuracy
## 1 * Economy..GDP.per.Capita. 63.96%
## 2 Health..Life.Expectancy. 59.91%
## 3 Family 57.21%
## 4 Dystopia.Residual 51.8%
## 5 Freedom 49.55%
## 6 Trust..Government.Corruption. 45.5%
## 7 Generosity 41.89%
## ---
## Chosen attribute due to accuracy
## and ties method (if applicable): '*'
##
##
## Call:
## OneR(data = data, formula = Happiness.Score.l ~ ., verbose = TRUE)
##
## Rules:
## If Economy..GDP.per.Capita. = (-0.00182,0.365] then Happiness.Score.l = low
## If Economy..GDP.per.Capita. = (0.365,0.73] then Happiness.Score.l = low
## If Economy..GDP.per.Capita. = (0.73,1.09] then Happiness.Score.l = medium
## If Economy..GDP.per.Capita. = (1.09,1.46] then Happiness.Score.l = high
## If Economy..GDP.per.Capita. = (1.46,1.83] then Happiness.Score.l = high
##
## Accuracy:
## 142 of 222 instances classified correctly (63.96%)
##
##
## Attribute Accuracy
## 1 * Economy..GDP.per.Capita. 64.41%
## 2 Health..Life.Expectancy. 60.81%
## 3 Family 59.91%
## 4 Trust..Government.Corruption. 55.41%
## 5 Freedom 53.15%
## 5 Dystopia.Residual 53.15%
## 7 Generosity 41.44%
## ---
## Chosen attribute due to accuracy
## and ties method (if applicable): '*'
##
##
## Call:
## OneR(data = data, formula = Happiness.Score.l ~ ., verbose = TRUE)
##
## Rules:
## If Economy..GDP.per.Capita. = (-0.00182,0.548] then Happiness.Score.l = low
## If Economy..GDP.per.Capita. = (0.548,0.877] then Happiness.Score.l = low
## If Economy..GDP.per.Capita. = (0.877,1.06] then Happiness.Score.l = medium
## If Economy..GDP.per.Capita. = (1.06,1.28] then Happiness.Score.l = medium
## If Economy..GDP.per.Capita. = (1.28,1.83] then Happiness.Score.l = high
##
## Accuracy:
## 143 of 222 instances classified correctly (64.41%)
##
##
## Attribute Accuracy
## 1 * Economy..GDP.per.Capita. 63.51%
## 2 Health..Life.Expectancy. 62.16%
## 3 Family 54.5%
## 4 Freedom 50.45%
## 4 Dystopia.Residual 50.45%
## 6 Trust..Government.Corruption. 43.24%
## 7 Generosity 36.49%
## ---
## Chosen attribute due to accuracy
## and ties method (if applicable): '*'
##
##
## Call:
## OneR(data = data, formula = Happiness.Score.l ~ ., verbose = TRUE)
##
## Rules:
## If Economy..GDP.per.Capita. = (-0.00182,0.602] then Happiness.Score.l = low
## If Economy..GDP.per.Capita. = (0.602,1.1] then Happiness.Score.l = medium
## If Economy..GDP.per.Capita. = (1.1,1.83] then Happiness.Score.l = high
##
## Accuracy:
## 141 of 222 instances classified correctly (63.51%)
##
##
## Attribute Accuracy
## 1 * Economy..GDP.per.Capita. 63.96%
## 2 Health..Life.Expectancy. 62.16%
## 3 Family 58.56%
## 4 Freedom 51.35%
## 5 Dystopia.Residual 50.9%
## 6 Trust..Government.Corruption. 46.4%
## 7 Generosity 40.09%
## ---
## Chosen attribute due to accuracy
## and ties method (if applicable): '*'
##
##
## Call:
## OneR(data = data, formula = Happiness.Score.l ~ ., verbose = TRUE)
##
## Rules:
## If Economy..GDP.per.Capita. = (-0.00182,0.754] then Happiness.Score.l = low
## If Economy..GDP.per.Capita. = (0.754,1.12] then Happiness.Score.l = medium
## If Economy..GDP.per.Capita. = (1.12,1.83] then Happiness.Score.l = high
##
## Accuracy:
## 142 of 222 instances classified correctly (63.96%)
##
##
## Attribute Accuracy
## 1 * Economy..GDP.per.Capita. 67.12%
## 2 Health..Life.Expectancy. 65.77%
## 3 Family 61.71%
## 4 Trust..Government.Corruption. 56.31%
## 5 Dystopia.Residual 55.41%
## 6 Freedom 50.9%
## 7 Generosity 43.69%
## ---
## Chosen attribute due to accuracy
## and ties method (if applicable): '*'
##
##
## Call:
## OneR(data = data, formula = Happiness.Score.l ~ ., verbose = TRUE)
##
## Rules:
## If Economy..GDP.per.Capita. = (-0.00182,0.68] then Happiness.Score.l = low
## If Economy..GDP.per.Capita. = (0.68,1.24] then Happiness.Score.l = medium
## If Economy..GDP.per.Capita. = (1.24,1.83] then Happiness.Score.l = high
##
## Accuracy:
## 149 of 222 instances classified correctly (67.12%)
Model evaluation
The function eval_model() prints confusion matrices for absolute and relative predictions, as well as accuracy, error and error rate reduction. For comparison with other models, it would have been convenient to be able to extract these performance metrics directly from the eval_model object, instead of only the confusion matrix and values of correct/all instances and having to re-calculate performance metrics again manually.
for (i in 1:5) {
model <- get(paste0("model_", i))
eval_model(predict(model, test_data), test_data$Happiness.Score.l)
}
##
## Confusion matrix (absolute):
## Actual
## Prediction high low medium Sum
## high 23 0 11 34
## low 1 26 10 37
## medium 7 5 10 22
## Sum 31 31 31 93
##
## Confusion matrix (relative):
## Actual
## Prediction high low medium Sum
## high 0.25 0.00 0.12 0.37
## low 0.01 0.28 0.11 0.40
## medium 0.08 0.05 0.11 0.24
## Sum 0.33 0.33 0.33 1.00
##
## Accuracy:
## 0.6344 (59/93)
##
## Error rate:
## 0.3656 (34/93)
##
## Error rate reduction (vs. base rate):
## 0.4516 (p-value = 2.855e-09)
##
##
## Confusion matrix (absolute):
## Actual
## Prediction high low medium Sum
## high 19 0 1 20
## low 3 28 14 45
## medium 9 3 16 28
## Sum 31 31 31 93
##
## Confusion matrix (relative):
## Actual
## Prediction high low medium Sum
## high 0.20 0.00 0.01 0.22
## low 0.03 0.30 0.15 0.48
## medium 0.10 0.03 0.17 0.30
## Sum 0.33 0.33 0.33 1.00
##
## Accuracy:
## 0.6774 (63/93)
##
## Error rate:
## 0.3226 (30/93)
##
## Error rate reduction (vs. base rate):
## 0.5161 (p-value = 1.303e-11)
##
##
## Confusion matrix (absolute):
## Actual
## Prediction high low medium Sum
## high 23 0 11 34
## low 0 25 7 32
## medium 8 6 13 27
## Sum 31 31 31 93
##
## Confusion matrix (relative):
## Actual
## Prediction high low medium Sum
## high 0.25 0.00 0.12 0.37
## low 0.00 0.27 0.08 0.34
## medium 0.09 0.06 0.14 0.29
## Sum 0.33 0.33 0.33 1.00
##
## Accuracy:
## 0.6559 (61/93)
##
## Error rate:
## 0.3441 (32/93)
##
## Error rate reduction (vs. base rate):
## 0.4839 (p-value = 2.116e-10)
##
##
## Confusion matrix (absolute):
## Actual
## Prediction high low medium Sum
## high 23 0 11 34
## low 2 26 11 39
## medium 6 5 9 20
## Sum 31 31 31 93
##
## Confusion matrix (relative):
## Actual
## Prediction high low medium Sum
## high 0.25 0.00 0.12 0.37
## low 0.02 0.28 0.12 0.42
## medium 0.06 0.05 0.10 0.22
## Sum 0.33 0.33 0.33 1.00
##
## Accuracy:
## 0.6237 (58/93)
##
## Error rate:
## 0.3763 (35/93)
##
## Error rate reduction (vs. base rate):
## 0.4355 (p-value = 9.799e-09)
##
##
## Confusion matrix (absolute):
## Actual
## Prediction high low medium Sum
## high 21 0 3 24
## low 0 26 8 34
## medium 10 5 20 35
## Sum 31 31 31 93
##
## Confusion matrix (relative):
## Actual
## Prediction high low medium Sum
## high 0.23 0.00 0.03 0.26
## low 0.00 0.28 0.09 0.37
## medium 0.11 0.05 0.22 0.38
## Sum 0.33 0.33 0.33 1.00
##
## Accuracy:
## 0.7204 (67/93)
##
## Error rate:
## 0.2796 (26/93)
##
## Error rate reduction (vs. base rate):
## 0.5806 (p-value = 2.761e-14)
Because I want to calculate performance measures for the different classes separately and like to have a more detailed look at the prediction probabilities I get from the models, I prefer to obtain predictions with type = "prob
. While I am not looking at it here, this would also allow me to test different prediction thresholds.
for (i in 1:5) {
model <- get(paste0("model_", i))
pred <- data.frame(model = paste0("model_", i),
sample_id = 1:nrow(test_data),
predict(model, test_data, type = "prob"),
actual = test_data$Happiness.Score.l)
pred$prediction <- colnames(pred)[3:5][apply(pred[, 3:5], 1, which.max)]
pred$correct <- ifelse(pred$actual == pred$prediction, "correct", "wrong")
pred$pred_prob <- NA
for (j in 1:nrow(pred)) {
pred[j, "pred_prob"] <- max(pred[j, 3:5])
}
if (i == 1) {
pred_df <- pred
} else {
pred_df <- rbind(pred_df, pred)
}
}
Comparing other algorithms
Decision trees
First, I am building a decision tree with the rpart package and rpart() function. This, we can plot with rpart.plot().
Economy GDP per capita is the second highest node here, the best predictor here would be health and life expectancy.
library(rpart)
library(rpart.plot)
set.seed(42)
fit <- rpart(Happiness.Score.l ~ .,
data = train_data,
method = "class",
control = rpart.control(xval = 10),
parms = list(split = "information"))
rpart.plot(fit, extra = 100)
In order to compare the models, I am producing the same output table for predictions from this model and combine it with the table from the OneR models.
pred <- data.frame(model = "rpart",
sample_id = 1:nrow(test_data),
predict(fit, test_data, type = "prob"),
actual = test_data$Happiness.Score.l)
pred$prediction <- colnames(pred)[3:5][apply(pred[, 3:5], 1, which.max)]
pred$correct <- ifelse(pred$actual == pred$prediction, "correct", "wrong")
pred$pred_prob <- NA
for (j in 1:nrow(pred)) {
pred[j, "pred_prob"] <- max(pred[j, 3:5])
}
pred_df_final <- rbind(pred_df,
pred)
Random Forest
Next, I am training a Random Forest model. For more details on Random Forest, check out my post “Can we predict flu deaths with Machine Learning and R?”.
set.seed(42)
model_rf <- caret::train(Happiness.Score.l ~ .,
data = train_data,
method = "rf",
trControl = trainControl(method = "repeatedcv",
number = 10,
repeats = 5,
verboseIter = FALSE))
The varImp() function from caret shows us which feature was of highest importance for the model and its predictions.
Here, we again find Economy GDP per captia on top.
varImp(model_rf)
## rf variable importance
##
## Overall
## Economy..GDP.per.Capita. 100.00
## Dystopia.Residual 97.89
## Health..Life.Expectancy. 77.10
## Family 47.17
## Trust..Government.Corruption. 29.89
## Freedom 19.29
## Generosity 0.00
pred <- data.frame(model = "rf",
sample_id = 1:nrow(test_data),
predict(model_rf, test_data, type = "prob"),
actual = test_data$Happiness.Score.l)
pred$prediction <- colnames(pred)[3:5][apply(pred[, 3:5], 1, which.max)]
pred$correct <- ifelse(pred$actual == pred$prediction, "correct", "wrong")
pred$pred_prob <- NA
for (j in 1:nrow(pred)) {
pred[j, "pred_prob"] <- max(pred[j, 3:5])
}
pred_df_final <- rbind(pred_df_final,
pred)
Extreme gradient boosting trees
Gradient boosting is another decision tree-based algorithm, explained in more detail in my post “Extreme Gradient Boosting and Preprocessing in Machine Learning”.
set.seed(42)
model_xgb <- caret::train(Happiness.Score.l ~ .,
data = train_data,
method = "xgbTree",
trControl = trainControl(method = "repeatedcv",
number = 10,
repeats = 5,
verboseIter = FALSE))
As before, we again find Economy GDP per capita as most important feature.
varImp(model_xgb)
## xgbTree variable importance
##
## Overall
## Economy..GDP.per.Capita. 100.00
## Health..Life.Expectancy. 67.43
## Family 46.59
## Freedom 0.00
pred <- data.frame(model = "xgb",
sample_id = 1:nrow(test_data),
predict(model_xgb, test_data, type = "prob"),
actual = test_data$Happiness.Score.l)
pred$prediction <- colnames(pred)[3:5][apply(pred[, 3:5], 1, which.max)]
pred$correct <- ifelse(pred$actual == pred$prediction, "correct", "wrong")
pred$pred_prob <- NA
for (j in 1:nrow(pred)) {
pred[j, "pred_prob"] <- max(pred[j, 3:5])
}
pred_df_final <- rbind(pred_df_final,
pred)
Neural network
Finally, I am comparing a neural network model. Here as well, I have a post where I talk about what they are in more detail: “Building deep neural nets with h2o and rsparkling that predict arrhythmia of the heart”.
set.seed(42)
model_nn <- caret::train(Happiness.Score.l ~ .,
data = train_data,
method = "mlp",
trControl = trainControl(method = "repeatedcv",
number = 10,
repeats = 5,
verboseIter = FALSE))
And Economy GDP per capita is again the most important feature!
varImp(model_nn)
## ROC curve variable importance
##
## variables are sorted by maximum importance across the classes
## low medium high
## Economy..GDP.per.Capita. 100.00 66.548 100.000
## Health..Life.Expectancy. 95.22 63.632 95.222
## Family 84.48 45.211 84.483
## Dystopia.Residual 71.23 43.450 71.232
## Freedom 64.58 41.964 64.581
## Trust..Government.Corruption. 26.13 40.573 40.573
## Generosity 0.00 3.462 3.462
pred <- data.frame(model = "nn",
sample_id = 1:nrow(test_data),
predict(model_nn, test_data, type = "prob"),
actual = test_data$Happiness.Score.l)
pred$prediction <- colnames(pred)[3:5][apply(pred[, 3:5], 1, which.max)]
pred$correct <- ifelse(pred$actual == pred$prediction, "correct", "wrong")
pred$pred_prob <- NA
for (j in 1:nrow(pred)) {
pred[j, "pred_prob"] <- max(pred[j, 3:5])
}
pred_df_final <- rbind(pred_df_final,
pred)
Model comparisons
Now to the final verdict: How do the different models compare?
The first plot below shows the prediction probabilites for the three happiness levels low, medium and high for each test data instance. For each instance, only the prediction probability of the predicted class (i.e. with the highest value) is shown. The upper row shows correct predictions, the lower row shows wrong predictions.
Sometimes, it is obvious from such a plot if a more stringent prediction threshold could improve things (when wrong predictions tend to be close to the threshold). With three classes to predict, this is obviously not as trivial as if we only had two but the same principle holds true: the smaller the prediction probability, the more uncertain it tends to be.
pred_df_final %>%
ggplot(aes(x = actual, y = pred_prob, fill = prediction, color = prediction)) +
geom_boxplot(alpha = 0.7) +
facet_grid(correct ~ model) +
scale_color_brewer(palette = "Set1") +
scale_fill_brewer(palette = "Set1")
Probably the most straight-forwards performance measure is accuracy: i.e. the proportion of correct predictions vs the total number of instances to predict. The closer to 1, the better the accuracy.
Not surprisingly, the more complex models tend to be more accurate - albeit only slightly.
pred_df_final %>%
group_by(model) %>%
dplyr::summarise(correct = sum(correct == "correct")) %>%
mutate(accuracy = correct / nrow(test_data)) %>%
ggplot(aes(x = model, y = accuracy, fill = model)) +
geom_bar(stat = "identity") +
scale_fill_brewer(palette = "Set1")
When we look at the three classes individually, it looks a bit more complicated but most models achieved highest accuracy for class “high”.
pred_df_final %>%
group_by(model, prediction) %>%
dplyr::summarise(correct = sum(correct == "correct"),
n = n()) %>%
mutate(accuracy = correct / n) %>%
ggplot(aes(x = model, y = accuracy, fill = prediction)) +
geom_bar(stat = "identity", position = "dodge") +
scale_fill_brewer(palette = "Set1")
If you are interested in more machine learning posts, check out the category listing for machine_learning on my blog.
sessionInfo()
## R version 3.3.3 (2017-03-06)
## Platform: x86_64-apple-darwin13.4.0 (64-bit)
## Running under: macOS Sierra 10.12.3
##
## locale:
## [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
##
## attached base packages:
## [1] parallel stats graphics grDevices utils datasets methods
## [8] base
##
## other attached packages:
## [1] RSNNS_0.4-9 Rcpp_0.12.10 plyr_1.8.4
## [4] xgboost_0.6-4 randomForest_4.6-12 rpart.plot_2.1.1
## [7] rpart_4.1-10 caret_6.0-73 lattice_0.20-35
## [10] doParallel_1.0.10 iterators_1.0.8 foreach_1.4.3
## [13] dplyr_0.5.0 purrr_0.2.2 readr_1.1.0
## [16] tidyr_0.6.1 tibble_1.3.0 ggplot2_2.2.1
## [19] tidyverse_1.1.1 OneR_2.1
##
## loaded via a namespace (and not attached):
## [1] lubridate_1.6.0 assertthat_0.2.0 rprojroot_1.2
## [4] digest_0.6.12 psych_<IP_ADDRESS> R6_2.2.0
## [7] backports_1.0.5 MatrixModels_0.4-1 stats4_3.3.3
## [10] evaluate_0.10 httr_1.2.1 lazyeval_0.2.0
## [13] readxl_0.1.1 data.table_1.10.4 minqa_1.2.4
## [16] SparseM_1.76 car_2.1-4 nloptr_1.0.4
## [19] Matrix_1.2-8 rmarkdown_1.4 labeling_0.3
## [22] splines_3.3.3 lme4_1.1-12 stringr_1.2.0
## [25] foreign_0.8-67 munsell_0.4.3 broom_0.4.2
## [28] modelr_0.1.0 mnormt_1.5-5 mgcv_1.8-17
## [31] htmltools_0.3.5 nnet_7.3-12 codetools_0.2-15
## [34] MASS_7.3-45 ModelMetrics_1.1.0 grid_3.3.3
## [37] nlme_3.1-131 jsonlite_1.4 gtable_0.2.0
## [40] DBI_0.6-1 magrittr_1.5 scales_0.4.1
## [43] stringi_1.1.5 reshape2_1.4.2 xml2_1.1.1
## [46] RColorBrewer_1.1-2 tools_3.3.3 forcats_0.2.0
## [49] hms_0.3 pbkrtest_0.4-7 yaml_2.1.14
## [52] colorspace_1.3-2 rvest_0.3.2 knitr_1.15.1
## [55] haven_1.0.0 quantreg_5.29


Add someone special to your network and save on a new iPhone, like the powerful iPhone 12 Pro Max. Enjoy A14 Bionic, the fastest chip in a smartphone, a dual-camera system and Super Retina XDR display. Use promo code SMART150 at checkout.
Take your entertainment to go with a connected iPad and save. Use promo code TABLET150 at checkout.
Stay active and in touch with a connected Apple Watch and save. Use promo code SMARTWATCH150 at checkout.


Introducing Go: Build Reliable, Scalable Programs
ISBN-13:<PHONE_NUMBER>959
ISBN-10:<PHONE_NUMBER>
Author: Caleb Doxsey
Edition: 1
Binding: Paperback
Publisher: O'Reilly Media
Published: February 2016
List Price: $24.99
Best Rental Prices |
||||
|---|---|---|---|---|
| #1 |
Free shipping Ready to ship |
Notes |
||
| #2 |
Free shipping Ready to ship |
Notes |
||
| #3 |
+3.99 shipping Ships 2-3 days |
Notes |
||
| #4 |
+5.99 shipping Ready to ship |
Notes |


|
cds
1.2.0
|
Allocator for aligned data. More...
#include <cds/details/aligned_allocator.h>
Data Structures | |
| struct | rebind |
Rebinds allocator to other type Q instead of T . More... |
Public Types | |
|
typedef ALIGNED_ALLOCATOR::template rebind< T >::other | allocator_type |
| Underlying aligned allocator type. |
Public Member Functions | |
| template<typename... S> | |
| T * | New (size_t nAlign, const S &...src) |
Analogue of operator new T(src ... ) | |
| T * | NewArray (size_t nAlign, size_t nCount) |
Analogue of operator new T[nCount ]. | |
| template<typename S > | |
| T * | NewArray (size_t nAlign, size_t nCount, const S &src) |
Analogue of operator new T[nCount ]. | |
| void | Delete (T *p) |
| Analogue of operator delete. | |
| void | Delete (T *p, size_t nCount) |
| Analogue of operator delete []. | |
| template<typename... S> | |
| T * | Construct (void *p, const S &...src) |
Analogue of placement operator new( p ) T( src ... ) |
Allocator for aligned data.
The class is the wrapper around user-defined aligned allocator. Template parameters:
T
is a type to allocate ALIGNED_ALLOCATOR
is an aligned allocator implementation. Default implementation is defined by macro CDS_DEFAULT_ALIGNED_ALLOCATOR from cds/user_setup/allocator.h header file.The nAlign
parameter of member function specifyes desired aligment of data allocated.
T
must be multiple of nAlign:
|
inline |
Analogue of operator new T[nCount
].
Each item of array of type T is initialized by parameter src
.


--- layout: page title: Home ---
I’m a senior researcher at the Music Technology Group of Universitat Pompeu Fabra, Barcelona. I like everything that has to do with sound and music, software development, audio processing, synthesizers, and the like.
At the Music Technology Group I lead the Freesound project and all Freesound-related stuff. Freesound is a website where people from all over the world share sounds under Creative Commons licenses. As of September 2019, Freesound hosts more than 420k sounds and has more than 9M registered users.
From 2016-2019, I was also the coordinator of the EU H2020-funded project Audio Commons, aimed at the promotion of Creative Commons audio and the development of technological solutions to facilitate audio description, indexing, reuse and publication.
My research is focused on understanding how to analyze and describe large sound collections so that these become more useful in creative and scientific contexts. I’m interested in audio processing, audio metadata and machine learning for the semantic annotation of sound collections. I’m also interested in exploratory interfaces and new tools for making music from such large collections.
I like working on other creative projects, typically with something to do with music technology and software development. I also play the bass guitar in a couple of bands and make noise with synthetisers. But most important of all, I have a kid who loves tractors and with whom I can build Lego spaceships.


Karnataka Puts 59 Illegal Immigrants On Train To Kolkata For Deportation Back To Bangladesh
by IANSKarnataka Police on Friday (22 November) carted away a contingent of 59 Bangladeshi illegal migrants by train to Kolkata as part of the state's deportation exercise, an official said here.
"They (illegal migrants) have been taken by a train, they are travelling towards Howrah. They have already boarded the train along with 30 Karnataka policemen," Bengaluru East Deputy Commissioner of Police S D Sharanappa told IANS.
Including women police officers, the 30-member Karnataka police team is escorting 18 men, 23 women and 18 children for handing over to the West Bengal Police and the Border Security Force (BSF).
"We spoke to the concerned agencies of West Bengal Police and also the BSF, we are coordinating with the Karnataka Home Department and the Union Home Ministry," said Sharanappa.
According to him, there are no cases against the illegal migrants as they are victims of human trafficking.
The train carrying the illegal migrant contingent is scheduled to reach Kolkata around 3 PM on Saturday (23 November), after which they will be handed over to the West Bengal Police and BSF, he added.
Police had to move the Bangladeshis to the Puttaparthi railway station of Ananthapur district in Andhra Pradesh to board the train, as the South Western Railway zone could not provide a full coach to accommodate the police right from Bengaluru.
A standard second class sleeper compartment has 72 berths.
(This story has been published from a wire agency feed without modifications to the text. Only the headline has been changed.)


Resources¶
The core resource manager and library loader for RoStrap. It is designed to streamline the retrieval and networking of resources and centralize the loading of libraries.
Demo¶
It can be used to require your libraries:
local ReplicatedStorage = game:GetService("ReplicatedStorage") local Resources = require(ReplicatedStorage:WaitForChild("Resources")) local Date = Resources:LoadLibrary("Date") print(Date()) --> Sat Dec 31 15:38:01 2022
It can be used to manage your RemoteEvents and RemoteFunctions:
local ReplicatedStorage = game:GetService("ReplicatedStorage") local Resources = require(ReplicatedStorage:WaitForChild("Resources")) local Chatted = Resources:GetRemoteEvent("Chatted") local ClientLoaded = Resources:GetRemoteFunction("ClientLoaded")
Functionality¶
Upon being required on the server for the first time, Resources moves libraries within ServerStorage.Repository
to folder ReplicatedStorage.Resources.Libraries
, where both the client and server can require them via the function LoadLibrary
.
- Only Folders and libraries should go in this repository.
- Folder heiarchy of libraries is ignored.
- A ModuleScript and its descendants are considered a single library.
- Thus, only parent ModuleScripts will be accessible via
LoadLibrary
- Thus, only parent ModuleScripts will be accessible via
- Anything within the Repository with "Server" (case-sensitive) in its name as well as its children will not be accessible to clients
- This includes Folders, libraries, and descendants of libraries.
- Server-only objects will be located within folder
ServerStorage.Resources
Info
Internally, LoadLibrary
caches and returns require(Resources:GetLibrary(LibraryName))
. GetLibrary
is the only function that can "retrieve" objects from both ServerStorage
and ReplicatedStorage
. This is because server libraries are added directly to its cache.
API¶
All methods of Resources have hybrid syntax, meaning they can be called using either a :
or .
LoadLibrary¶
Variant Resources:LoadLibrary(string LibraryName)
A require-by-string function which internally calls require(Resources:GetLibrary(string LibraryName))
and caches the results.
Example
local SortedArray = Resources:LoadLibrary("SortedArray") -- Some people like to overwrite the default require function local require = Resources.LoadLibrary local Signal = require("Signal")
Info
This is the only function with a hard-coded name for its cache, so you may access cached require results using the following:
-- Resources uses this table to cache LoadLibrary results local LoadedLibraries = Resources:GetLocalTable("LoadedLibraries")
Get functions¶
Ref<Instance> Resources:GetCLASSNAME(string InstanceName)
Get functions can be procedurally generated by Resources at run-time in the form of Resources:GetCLASSNAME(string InstanceName)
. These functions return an Instance named InstanceName
under Resources:GetFolder(CLASSNAME:gsub("y$", "ie") .. "s")
. On the server, missing instances will be instantiated via Instance.new. On the client, the function will yield for the missing instances via WaitForChild.
The following is the internal call tree. Keep in mind that these functions cache so the 3rd function will only run once per machine and GetFolder
will only run once per function generation (e.g. the first time GetRemoteEvent
is called).
| Step | Object to search for | Function call |
|---|---|---|
| 1 | RemoteEvent Chatted inside |
GetRemoteEvent("Chatted") |
| 2 | Folder RemoteEvents in |
GetFolder("RemoteEvents") |
| 3 | Resources |
ROOT |
Info
- Caches results in
Resources:GetLocalTable(CLASSNAME:gsub("y$", "ie") .. "s")
Example
Get functions can also manage instance types that aren't instantiable by Instance.new
. However, these instances must be preinstalled in the locations in which they would otherwise be instantiated because they cannot be generated at run-time. This allows you to do things like the following:
local Falchion = Resources:GetSword("Falchion")
GetLocal functions¶
Ref<Instance> Resources:GetLocalCLASSNAME(string InstanceName)
Get functions in the form of GetLocalCLASSNAME
work in the same way as regular Get functions, except clients may also instantiate missing instances and GetLocalFolder
searches in different locations. Not meant to be used very much.
| Machine | LOCALSTORAGE | LOCALRESOURCES |
|---|---|---|
| Server | ServerStorage |
ServerStorage.Resources |
| Client | Players.LocalPlayer.PlayerScripts |
Players.LocalPlayer.PlayerScripts.Resources |
| Step | Object to search for | Function call |
|---|---|---|
| 1 | BindableEvent Attacking inside |
GetLocalBindableEvent("Attacking") |
| 2 | Folder BindableEvents in |
GetLocalFolder("BindableEvents") |
| 3 | Folder LOCALSTORAGE.Resources |
LOCALRESOURCES |
Example
local Attacking = Resources:GetLocalBindableEvent("Attacking")
Here is what the above code would do if ran by the server versus what it would do if ran by a client:
| Server | Client |
|---|---|
Warning
In Play-Solo Mode, all local objects will go under ServerStorage
, as there is no difference between the client and server. If you use identical Local-function calls on the client and server, this could cause conflicts in Play-Solo. The same problem applies to caches, which have "Local" appended to the front of the string to differentiate from regular caches. LOCALSTORAGE
is typically just for GetLocalBindableEvent
calls and having a place to store server-only Libraries, which are under GetLocalFolder("Resources")
.
GetLocalTable¶
table Resources:GetLocalTable(string TableName)
A function which caches a local table by string, and returns said table. Does not replicate. Useful for eliminating the need for _G or ModuleScripts which return an empty table.
Note
Because this is hard-coded and not procedurally generated, it doesn't obey the rules of other GetLocal functions.
Example
-- Can be used in any script on the same machine to get this table local MyItems = Resources:GetLocalTable("MyItems") -- {}
Info
Resources uses GetLocalTable
internally, so you can access its internals using this function:
-- Resources uses this table to cache LoadLibrary results local LoadedLibraries = Resources:GetLocalTable("LoadedLibraries")
RoStrap Discord¶
Questions? Comments? Concerns? Join us!


Use the generated JSON request string found in the OberonXML Debugger inside Analysis Workspace to pull data directly into R. Starter package for understanding the new Adobe Analytics API 2.0 which powers Analysis Workspace.
# Install devtools from CRAN
install.packages("devtools")
#install awoberonr from github
devtools::install_github('benrwoodard/awoberonr')
#load the pacakge
library(awoberonr)
aw_token()
.get_me()
aw_report('filepath.json')
function with the correct file pathhttps://adobeanalyticsr.com/token/result.html
https://adobeanalyticsr\.com/token/result\.html
Creating an Adobe Developer OAuth Project in under 60 seconds
This file is essential to keeping your information secure. It also speeds up analysis by limiting the number of arguments you need to add to every function call.
Create a new file and save it with the name ‘.Renviron’.
Get the following variables from the OAuth project and add them to the file. (see Creating an OAuth Client above)
AW_CLIENT_ID
- OAuth client id found in the Adobe Developer ConsoleAW_CLIENT_SECRET
- OAuth client secret key found in the Adobe Developer ConsoleAdd Company_id (optional)
AW_COMPANY_ID
- Using the function ‘get_me()’ you can see all the companies you have access to.After defining these 3 variables in the .Renviron file, restart your session. Once restart is complete reload the awoberonr library, you should be able to run your first data extract using using aw_report("filepath.json")
.
aw_report("filepath.json")
function


QCameraImageProcessing Class
The QCameraImageProcessing class provides an interface for image processing related camera settings. More...
| Header: | #include <QCameraImageProcessing> |
| qmake: | QT += multimedia |
| Inherits: | QObject |
Public Types
| enum | ColorFilter { ColorFilterNone, ColorFilterGrayscale, ColorFilterNegative, ColorFilterSolarize, ..., ColorFilterVendor } |
| enum | WhiteBalanceMode { WhiteBalanceAuto, WhiteBalanceManual, WhiteBalanceSunlight, WhiteBalanceCloudy, ..., WhiteBalanceVendor } |
Public Functions
| qreal | brightness() const |
| ColorFilter | colorFilter() const |
| qreal | contrast() const |
| qreal | denoisingLevel() const |
| bool | isAvailable() const |
| bool | isColorFilterSupported(ColorFilter filter) const |
| bool | isWhiteBalanceModeSupported(WhiteBalanceMode mode) const |
| qreal | manualWhiteBalance() const |
| qreal | saturation() const |
| void | setBrightness(qreal value) |
| void | setColorFilter(ColorFilter filter) |
| void | setContrast(qreal value) |
| void | setDenoisingLevel(qreal level) |
| void | setManualWhiteBalance(qreal colorTemperature) |
| void | setSaturation(qreal value) |
| void | setSharpeningLevel(qreal level) |
| void | setWhiteBalanceMode(WhiteBalanceMode mode) |
| qreal | sharpeningLevel() const |
| WhiteBalanceMode | whiteBalanceMode() const |
- 32 public functions inherited from QObject
Additional Inherited Members
- 1 property inherited from QObject
- 1 public slot inherited from QObject
- 2 signals inherited from QObject
- 1 public variable inherited from QObject
- 10 static public members inherited from QObject
- 9 protected functions inherited from QObject
- 2 protected variables inherited from QObject
Detailed Description
The QCameraImageProcessing class provides an interface for image processing related camera settings.
After capturing the data for a camera frame, the camera hardware and software performs various image processing tasks to produce a final image. This includes compensating for ambient light color, reducing noise, as well as making some other adjustments to the image.
You can retrieve this class from an instance of a QCamera object.
For example, you can set the white balance (or color temperature) used for processing images:
camera = new QCamera; QCameraImageProcessing *imageProcessing = camera->imageProcessing(); if (imageProcessing->isAvailable()) { imageProcessing->setWhiteBalanceMode(QCameraImageProcessing::WhiteBalanceFluorescent); }
Or adjust the amount of denoising performed:
imageProcessing->setDenoisingLevel(-0.3); //reduce the amount of denoising applied
In some cases changing these settings may result in a longer delay before an image is ready.
For more information on image processing of camera frames, see Camera Image Processing.
See also QCameraImageProcessingControl.
Member Type Documentation
enum QCameraImageProcessing::ColorFilter
| Constant | Value | Description |
|---|---|---|
QCameraImageProcessing::ColorFilterNone | 0 | No filter is applied to images. |
QCameraImageProcessing::ColorFilterGrayscale | 1 | A grayscale filter. |
QCameraImageProcessing::ColorFilterNegative | 2 | A negative filter. |
QCameraImageProcessing::ColorFilterSolarize | 3 | A solarize filter. |
QCameraImageProcessing::ColorFilterSepia | 4 | A sepia filter. |
QCameraImageProcessing::ColorFilterPosterize | 5 | A posterize filter. |
QCameraImageProcessing::ColorFilterWhiteboard | 6 | A whiteboard filter. |
QCameraImageProcessing::ColorFilterBlackboard | 7 | A blackboard filter. |
QCameraImageProcessing::ColorFilterAqua | 8 | An aqua filter. |
QCameraImageProcessing::ColorFilterVendor | 1000 | The base value for vendor defined filters. |
This enum was introduced or modified in Qt 5.5.
enum QCameraImageProcessing::WhiteBalanceMode
| Constant | Value | Description |
|---|---|---|
QCameraImageProcessing::WhiteBalanceAuto | 0 | Auto white balance mode. |
QCameraImageProcessing::WhiteBalanceManual | 1 | Manual white balance. In this mode the white balance should be set with setManualWhiteBalance() |
QCameraImageProcessing::WhiteBalanceSunlight | 2 | Sunlight white balance mode. |
QCameraImageProcessing::WhiteBalanceCloudy | 3 | Cloudy white balance mode. |
QCameraImageProcessing::WhiteBalanceShade | 4 | Shade white balance mode. |
QCameraImageProcessing::WhiteBalanceTungsten | 5 | Tungsten (incandescent) white balance mode. |
QCameraImageProcessing::WhiteBalanceFluorescent | 6 | Fluorescent white balance mode. |
QCameraImageProcessing::WhiteBalanceFlash | 7 | Flash white balance mode. |
QCameraImageProcessing::WhiteBalanceSunset | 8 | Sunset white balance mode. |
QCameraImageProcessing::WhiteBalanceVendor | 1000 | Base value for vendor defined white balance modes. |
Member Function Documentation
qreal QCameraImageProcessing::brightness() const
Returns the brightness adjustment setting.
See also setBrightness().
ColorFilter QCameraImageProcessing::colorFilter() const
Returns the color filter which will be applied to image data captured by the camera.
This function was introduced in Qt 5.5.
See also setColorFilter().
qreal QCameraImageProcessing::contrast() const
Returns the contrast adjustment setting.
See also setContrast().
qreal QCameraImageProcessing::denoisingLevel() const
Returns the denoising adjustment level.
See also setDenoisingLevel().
bool QCameraImageProcessing::isAvailable() const
Returns true if image processing related settings are supported by this camera.
bool QCameraImageProcessing::isColorFilterSupported(ColorFilter filter) const
Returns true if a color filter is supported.
This function was introduced in Qt 5.5.
bool QCameraImageProcessing::isWhiteBalanceModeSupported(WhiteBalanceMode mode) const
Returns true if the white balance mode is supported.
qreal QCameraImageProcessing::manualWhiteBalance() const
Returns the current color temperature if the current white balance mode is WhiteBalanceManual
. For other modes the return value is undefined.
See also setManualWhiteBalance().
qreal QCameraImageProcessing::saturation() const
Returns the saturation adjustment value.
See also setSaturation().
void QCameraImageProcessing::setBrightness(qreal value)
Set the brightness adjustment to value.
Valid brightness adjustment values range between -1.0 and 1.0, with a default of 0.
See also brightness().
void QCameraImageProcessing::setColorFilter(ColorFilter filter)
Sets the color filter which will be applied to image data captured by the camera.
This function was introduced in Qt 5.5.
See also colorFilter().
void QCameraImageProcessing::setContrast(qreal value)
Set the contrast adjustment to value.
Valid contrast adjustment values range between -1.0 and 1.0, with a default of 0.
See also contrast().
void QCameraImageProcessing::setDenoisingLevel(qreal level)
Sets the denoising adjustment level.
Valid sharpening values range between -1.0 and 1.0, with a default of 0.
If the parameter value is set to 0, the amount of denoising applied is selected by camera and depends on camera capabilities and settings. Changing value in -1.0..1.0 range adjusts the amount of denoising applied within the supported range.
See also denoisingLevel().
void QCameraImageProcessing::setManualWhiteBalance(qreal colorTemperature)
Sets manual white balance to colorTemperature. This is used when whiteBalanceMode() is set to WhiteBalanceManual
. The units are Kelvin.
See also manualWhiteBalance().
void QCameraImageProcessing::setSaturation(qreal value)
Sets the saturation adjustment value to value.
Valid saturation values range between -1.0 and 1.0, with a default of 0.
See also saturation().
void QCameraImageProcessing::setSharpeningLevel(qreal level)
Sets the sharpening adjustment level.
Valid sharpening values range between -1.0 and 1.0, with a default of 0.
See also sharpeningLevel().
void QCameraImageProcessing::setWhiteBalanceMode(WhiteBalanceMode mode)
Sets the white balance to mode.
See also whiteBalanceMode().
qreal QCameraImageProcessing::sharpeningLevel() const
Returns the sharpening adjustment level.
See also setSharpeningLevel().
WhiteBalanceMode QCameraImageProcessing::whiteBalanceMode() const
Returns the white balance mode being used.
See also setWhiteBalanceMode().


If you've made the decision to sell your property,
that's the hard part!
that's the hard part!
Choosing your agent
should be easy.
should be easy.
Get your FREE copy
of Spearwood's
recent sales
of Spearwood's
recent sales
Click Here


Helped new owners get started and current owners get quick and efficient support by using knowledge about
product or referring them to the proper resources
Provided personal training for customers through our one to one program, helping them acquire knowledge
about our product
Assisted customers with hands-on technical support, while repairing Apple’s relationship with the customer
Directed during preparation for product launch (iPhone and iPad)
Supported visual merchandising and store operation
Led peer group training on internal systems to help the team become more efficient at our everyday tasks
Freelance Developement
Drop/Pin
Led development team to succesfully create mobile application.
BuzzOn
Worked with in-house marketing team to create a website for their product
ImBoard
Hand picked and managed development team
Managed scrum development model
Worked with in-house client and successfully created Android mobile application
Education
University of Calgary, 2015 - Present
Bachelor of Science
Major: Computer Science
University of Manitoba, 2010 - 2015
Bachelor of Arts (Advanced)
Major: Economics
Minor: Computer Science
Community
Active participant and supporter of community charities, projects, and events


channel.a0a275 __
channel.f6f6f6 __
channel.c6454d __
channel.262728 __
octree __
channel.b9759d __
binary __
channel.739d8f __
channel.554ead __
channel.49975d __


1:-Retail Software
Scope
Retail POS Software is generally a Billing Software and it’s specially prepared for the client as per their requirements. A computerized network operated by a main computer and linked to several. You can even control inventory right at the cash register with point-of-sale. In retail, it's important to keep tight control over cash receipts to prevent theft. How This Speed-Focused Delivery Service Is Quickly Making a Name for Itself.
As a Developer Responsibility Includes:
• Designed User Interface, writing the code against proposed requirements for several functionalities and fixing bugs etc.
• Involved in writing DB Queries in Oracle 10g.
• Responsible to validate JSP web pages using custom and inbuilt validation facilities in JavaScript environment.
• Used HTML, CSS and Java Script (Where ever necessary) for front end designing.
• Responsible for analysis, design, implementation and deployment of code.
• Involved in interaction with client and fixing issues reported at production/ environment.
2:-Timesheet
Scope
Timesheet was developed as a part of internal project of Minacs and is used internally in several projects across Minacs. It is used as the time tracking software which will generate reports on monthly and daily basis to show individual as well as team performance based on project and product developed or supported. It will also show the analysis of work that has been assigned and completed, duration of completion of assigned job by an individual and team. Also, it can track the login hours of employees and leaves taken during the month.
As a Developer Responsibility Includes:
• Designed JSP`s as per the requirement.
• Implemented controller classes.
• Implemented commands and their validations.
• Written Spring service interfaces and their implementations
• Written Spring DAO`s and their implementations with Hibernate.
• Injected Spring DAO`s into Spring services.
• Written Hibernate components.
3:-Trade Free Factor in
Scope
Factor in is an end-to-end factoring and supply chain finance suite of solutions that enables Banks/NBFCs to offer their corporate customers a web-based interface to manage their trade instruments. It is a comprehensive solution which bundles business functionalities and provides Enterprise and SaaS (pay-as-you-go) variants.
As a Developer Responsibility Includes:
• Designed User Interface, writing the code against proposed requirements for several functionalities and fixing bugs etc.
• Involved in writing DB Queries in Oracle 10g.
• Responsible to validate Jsp web pages using custom and inbuilt validation facilities in JavaScript environment.
• Used HTML, CSS and Java Script (Where ever necessary) for front end designing.
• Responsible for analysis, design, implementation and deployment of code.
• Involved in interaction with client and fixing issues reported at production/ environment.


public interface EntityManagerFactoryInfo
EntityManagerFactory
.
This facility can be obtained from Spring-managed EntityManagerFactory proxies through casting the EntityManagerFactory handle to this interface.
| 限定符和类型 | 方法和说明 |
|---|---|
java.lang.ClassLoader |
getBeanClassLoader()
Return the ClassLoader that the application's beans are loaded with.
|
javax.sql.DataSource |
getDataSource()
Return the JDBC DataSource that this EntityManagerFactory
obtains its JDBC Connections from.
|
java.lang.Class<? extends EntityManager> |
getEntityManagerInterface()
Return the (potentially vendor-specific) EntityManager interface
that this factory's EntityManagers will implement.
|
JpaDialect |
getJpaDialect()
Return the vendor-specific JpaDialect implementation for this
EntityManagerFactory, or
null if not known. |
EntityManagerFactory |
getNativeEntityManagerFactory()
Return the raw underlying EntityManagerFactory.
|
PersistenceProvider |
getPersistenceProvider()
Return the underlying PersistenceProvider that the underlying
EntityManagerFactory was created with.
|
PersistenceUnitInfo |
getPersistenceUnitInfo()
Return the PersistenceUnitInfo used to create this
EntityManagerFactory, if the in-container API was used.
|
java.lang.String |
getPersistenceUnitName()
Return the name of the persistence unit used to create this
EntityManagerFactory, or
null if it is an unnamed default. |
EntityManagerFactory getNativeEntityManagerFactory()
null
)@Nullable PersistenceProvider getPersistenceProvider()
null
if the standard JPA provider autodetection process
was used to configure the EntityManagerFactory@Nullable PersistenceUnitInfo getPersistenceUnitInfo()
null
if the in-container contract was not used to
configure the EntityManagerFactory@Nullable java.lang.String getPersistenceUnitName()
null
if it is an unnamed default.
If getPersistenceUnitInfo()
returns non-null, the result of
getPersistenceUnitName()
must be equal to the value returned by
PersistenceUnitInfo.getPersistenceUnitName()
.
@Nullable javax.sql.DataSource getDataSource()
null
if not known@Nullable java.lang.Class<? extends EntityManager> getEntityManagerInterface()
A null
return value suggests that autodetection is supposed
to happen: either based on a target EntityManager
instance
or simply defaulting to javax.persistence.EntityManager
.
@Nullable JpaDialect getJpaDialect()
null
if not known.java.lang.ClassLoader getBeanClassLoader()
Proxies will be generated in this ClassLoader.


Scheduled universes allow you to perform universe selection at fixed, regular intervals. In live trading this might be applied to fetching tickers from Dropbox, or performing analysis on historical data and choosing resulting symbols. The class for creating scheduled universes is called $[ScheduledUniverseSelectionModel,T:QuantConnect.Algorithm.Framework.Selection.ScheduledUniverseSelectionModel].
public ScheduledUniverseSelectionModel( DateRule dateRule, TimeRule timeRule, Func<DateTime, IEnumerable<Symbol>> selector, UniverseSettings settings = null, ISecurityInitializer initializer = null )
ScheduledUniverseSelectionModel(dateRule, timeRule, selector, universeSettings=null, securityInitializer=null)
The universe selection helper works in the same way as the Scheduled Event API requiring a $[DateRule,T:QuantConnect.Scheduling.IDateRule], a $[TimeRule,T:QuantConnect.Scheduling.ITimeRule] to set the callback times, and a function to execute, which returns a list of Symbol objects.
// Selection will run on mon/tues/thurs at 00:00/06:00/12:00/18:00 AddUniverseSelection(new ScheduledUniverseSelectionModel( DateRules.Every(DayOfWeek.Monday, DayOfWeek.Tuesday, DayOfWeek.Thursday), TimeRules.Every(TimeSpan.FromHours(6)), SelectSymbols // selection function in algorithm. )); // Create selection function which returns symbol objects. IEnumerable<Symbol> SelectSymbols(DateTime dateTime) { return new[] { Symbol.Create("SPY", SecurityType.Equity, Market.USA), Symbol.Create("AAPL", SecurityType.Equity, Market.USA), Symbol.Create("IBM", SecurityType.Equity, Market.USA) } }
# Selection will run on mon/tues/thurs at 00:00/06:00/12:00/18:00 self.AddUniverseSelection(ScheduledUniverseSelectionModel( self.DateRules.Every(DayOfWeek.Monday, DayOfWeek.Tuesday, DayOfWeek.Thursday), self.TimeRules.Every(timedelta(hours = 12)), self.SelectSymbols # selection function in algorithm. )) # Create selection function which returns symbol objects. def SelectSymbols(self, dateTime): symbols = [] symbols.append(Symbol.Create('SPY', SecurityType.Equity, Market.USA)) return symbols


The Java Platform defines five logical font names that every implementation must support: Serif, SansSerif, Monospaced, Dialog, and DialogInput. These logical font names are mapped to physical fonts in implementation dependent ways.
Sun's Java SE Runtime Environments use font configuration files to map logical font names to physical fonts. There are several files to support different mappings depending on the host operating system version. The files are located in the lib directory within the JRE installation. Users can edit or create their own font configuration files to adjust the mappings to their particular system setup. Note however that this is a modification of the JRE, and Sun does not support modified JREs.
Font configuration files come in two formats: A properties format and a binary format. The properties format is described in detail in this document and can be used for user-defined configurations. The binary format is undocumented and used only for the JRE's predefined configurations; the corresponding files in properties format are available for reference as files with the ".properties.src" extension.
Note that font configuration files are implementation dependent. Not all implementations of the Java Platform use them, and the format and content vary between different runtime environments as well as between releases. This document describes the format used by version 6 of Sun's Java SE Runtime Environments.
To find the appropriate font configuration file for a host operating system, the following information is used:
"98"
, "2000"
,
"Me"
, "XP"
, "2003"
."Sun"
, "RedHat"
,
"Turbo"
, "SuSE"
.The runtime uses the first of the following files it finds:
JavaHome/lib/fontconfig.
OS.Version.properties
JavaHome/lib/fontconfig.
OS.Version.bfc
JavaHome/lib/fontconfig.
OS.properties
JavaHome/lib/fontconfig.
OS.bfc
JavaHome/lib/fontconfig.
Version.properties
JavaHome/lib/fontconfig.
Version.bfc
JavaHome/lib/fontconfig.properties
JavaHome/lib/fontconfig.bfc
Files with a ".properties" suffix are assumed to be properties
files as specified by the Properties
class and are loaded through that class. Files without this suffix
are assumed to be in binary format.
Throughout the font configuration files, a number of different names are used:
serif
, sansserif
,
monospaced
, dialog
, and
dialoginput
. In font configuration files, these names
are always in lowercase.plain
, bold
, italic
, and
bolditalic
. Again, these names are always in
lowercase."Courier
New"
or "\uad74\ub9bc"
."-monotype-times new
roman-regular-r---*-%d-*-*-p-*-iso8859-1"
. Note that
"%d"
is used for the font size - the actual font size
is filled in at runtime.java.nio.charset.Charset.defaultCharset().name()
.The version property identifies the font configuration format version. This document specifies version 1.
The complete property has the form:
version=1
Component font mapping properties describe which physical font to use to render characters from a given character subset with a given logical font in a given style.
The keys have the forms:
allfonts.
CharacterSubsetName LogicalFontName.
StyleName.
CharacterSubsetName
The first form is used if the same font is used for a character subset independent of logical font and style (in this case, the font rendering engines apply algorithmic styles to the font). The second form is used if different physical fonts are used for a character subset for different logical fonts and styles. In this case, properties must be specified for each combination of logical font and style, so 20 properties for one character subset. If a property of the first form is present for a character subset, then properties of the second form for the same character subset are ignored.
The values are platform font names, as described above.
Since the character subsets supported by given fonts often overlap, separate search sequence properties are used to define in which order to try the fonts when rendering a character.
The Java runtime uses sequence properties to determine search sequences for the five logical fonts. However, a font configuration file may specify properties that are specific to a combination of encoding, language, and country, and the runtime will then use a lookup to determine the search sequence property for each logical font.
The keys have the form:
sequence.allfonts
.Encoding.Language.Countrysequence.
LogicalFontName.Encoding.Language.Countrysequence.allfonts
.Encoding.Languagesequence.
LogicalFontName.Encoding.Languagesequence.allfonts
.Encodingsequence.
LogicalFontName.Encodingsequence.allfonts sequence.
LogicalFontName
The allfonts
forms are used if the sequence is used
for all five logical fonts. The forms specifying logical font names
are used if different sequences are used for different logical
fonts.
For each logical font, the Java runtime uses the property value with the first of the above keys. This property determines the primary search sequence for the logical font.
The file may also define a single fallback search sequence. The key for the fallback search sequence property is:
sequence
.fallback
The values of all search sequence properties have the form:
SearchSequenceValue: CharacterSubsetName CharacterSubsetName , SearchSequenceValue
The primary search sequence properties specify character subset names for required fonts, which are used for both AWT and 2D font rendering. The fallback search sequence property gives character subset names for optional fonts, which are used as fallbacks for all logical fonts, but only for 2D font rendering. The runtime automatically adds the Lucida Sans Regular font as a fallback font for 2D rendering if it's not already specified. If the runtime environment has a directory lib/fonts/fallback and this directory contains valid TrueType or Type 1 fonts, the runtime automatically adds these fonts as fallback fonts for 2D rendering. On Windows, if there is a system EUDC (End User Defined Characters) font registered with Windows, the runtime automatically adds this font as well as a fallback font for 2D rendering.
The sequence properties determine in which sequence component fonts are tried to render a given character. For example, given the following properties:
sequence.monospaced=japanese,alphabetic sequence.fallback=korean monospaced.plain.alphabetic=Arial monospaced.plain.japanese=MSGothic monospaced.plain.korean=Gulim
the runtime will first attempt to render a character with the MSGothic font. If that font doesn't provide a glyph for the character, it will attempt the Arial font. For 2D rendering, it will also try the Gulim and the Lucida Sans Regular font as well as any TrueType or Type 1 fonts in the runtime's lib/fonts/fallback directory. For 2D rendering on Windows, if there is a system EUDC font registered with Windows, the runtime will finally try this EUDC font.
When calculating font metrics for a logical font without reference to a string, only the required fonts are taken into consideration. For the example above, the FontMetrics.getMaxDescent method would return results based on the MSGothic and Arial fonts, but not the Gulim and Lucida Sans fonts. In this way, simple user interface elements such as buttons, which sometimes calculate their size based on font metrics, are not affected by an extended list of component fonts which their labels usually don't use. On the other hand, text components typically calculate metrics based on the text they contain and thus will obtain correct results.
The sequence properties that the runtime obtains for the five logical fonts should list the same character subsets, but may list them in different order.
The exclusion range properties specify Unicode character ranges which should be excluded from being rendered with the fonts corresponding to a given character subset. This is used if a font with a large character repertoire needs to be placed early in the search sequence (for example, for performance reasons), but some characters that it supports should be drawn with a different font instead. These properties are optional, so there's at most one per character subset.
The keys have the form:
exclusion.
CharacterSubsetName
The values have the form:
ExclusionRangeValue: Range Range,
ExclusionRangeValue Range: Char-
Char Char: HexDigit HexDigit HexDigit HexDigit HexDigit HexDigit HexDigit HexDigit HexDigit HexDigit
A Char is a Unicode character represented as a hexadecimal value.
The proportional font properties describe the relationship between proportional and non-proportional variants of otherwise equivalent fonts. These properties are used to implement preferences specified by the GraphicsEnvironment.preferProportionalFonts method.
The keys have the form:
proportional.
PlatformFontName
Space characters in the platform font name must be replaced with underscore characters ("_").
The values have the form:
PlatformFontName
In values, space characters are left unmodified.
Each property indicates that the font named in the value is the proportional equivalent of the font named in the key, and also that the font named in the key is the non-proportional equivalent of the font named in the value.
Font file name properties provide the names of the files containing the physical fonts used in the font configuration file. File names are required for all physical fonts on Windows and recommended for all physical fonts on Solaris and Linux.
The keys have the form:
filename.
PlatformFontName
Space characters in the platform font name must be replaced with underscore characters ("_").
The values are the file names of the files containing the fonts.
On Windows, simple file names are used; and the runtime environment
looks for each file first in its own lib/fonts
directory, then in the Windows fonts directory. On Solaris and
Linux, absolute path names, path names starting with
"$JRE_LIB_FONTS"
for the runtime environment's own
lib/fonts
directory, or xlfd names are used.
The Java runtime can automatically determine a number of
directories that contain font files, such as its own
lib/fonts
directory or the Windows fonts folder.
Additional directories can be specified to be appended to the font
path.
The key has the form:
appendedfontpath
The value has the form:
AppendedFontPathValue: Directory Directory PathSeparator AppendedFontPathValue
The path separator is the platform dependent value of java.io.File.pathSeparator.
There are no platform-specific properties for Windows. However, there is a special form of the character subset name used in search sequences. The name "alphabetic" can take a suffix indicating the character encoding associated with the subset:
alphabetic
alphabetic/default
alphabetic/1252
This information is only used for AWT, not for 2D. The "/default" suffix restricts use of the component fonts for this character subset to the character set of the default encoding; the "/1252" suffix to the Windows-1252 character set. For accessing component font mappings and exclusion ranges, the character encoding suffix is omitted. For all other character subsets, the AWT character encoding is determined internally by the Java runtime.
The AWT text components, which rely on Motif-based peers for text rendering, cannot always use the same platform fonts as other AWT components and 2D. When looking up component fonts for these components, additional keys are recognized. The complete set of keys looked up in this case is:
allfonts.
CharacterSubsetName.motif
LogicalFontName.
StyleName.
CharacterSubsetName.motif allfonts.
CharacterSubsetNameLogicalFontName
.
StyleName.
CharacterSubsetName
The AWT font path properties specify platform directories which should be added to the X11 server font path. The keys have the form:
awtfontpath.CharacterSubsetName
The values have the form:
AWTFontPathValue:
Directory
Directory :
AWTFontPathValue
The directories must be valid X11 font directories. The Java runtime ensures that the directories for all character subsets of a primary search sequence found by the search sequence lookup are part of the X11 font path. The implementation assumes that all logical fonts use the same set of character subsets for a given environment of encoding, language, and country.


Classes
This website template has been designed by Free Website Templates for you, for free. You can replace all this text with your own text. You can remove any link to our website from this website template, you're free to use this website template without linking back to us. If you're having problems editing this website template, then don't hesitate to ask for help on the Forum.
Nulla placerat, orci at ultrices luctus, dolor dui tristique dui, ut aliquet tortor massa ac justo. Pellentesque pretium, lectus quis egestas dapibus, lorem nunc euismod ligula, quis fermentum.
- Get Abs
- Every Monday - Wednesday : 8:30am-10:30pm
- Zumba
- Every Wednesday - Friday : 8:30am-10:30pm
- Stay Fit
- Every Friday - Sunday : 8:30am-10:30pm
Maecenas sed massa sem. Aenean ultricies ante ac elit luctus auctor. Cras condimentum ultricies tellus vitae fringilla. Mollis nulla sed mi auctor consectetur, fusce gravida
- Stay Sexy
- Every Monday - Wednesday : 8:30am-10:30pm
- Relaxing the mind
- Every Wednesday - Friday : 8:30am-10:30pm
- Body, and soul
- Every Friday - Sunday : 8:30am-10:30pm
If you're having problems editing this website template, then don't hesitate to ask for help on the Forum.
- Baby Ready
- Every Monday - Wednesday : 8:30am-10:30pm
- Meditate
- Every Wednesday - Friday : 8:30am-10:30pm
- Yoga
- Every Friday - Sunday : 8:30am-10:30pm
Looking for more templates? Just browse through all our Free Website Templates and find what you're looking for. But if you don't find any website template you can use, you can try our Free Web Design service and tell us all about it.
- Zumba
- Every Monday - Wednesday : 8:30am-10:30pm
- Stay Fit
- Every Wednesday - Friday : 8:30am-10:30pm


dl_slices(3f) - [M_pixel__slices] basic 3-d surface plotting routine
Synopsis
Description
Options
Example
subroutine dl_slices(d,ndx,ndz,nx,nz,a,b,xh,yh,zh,iflag,iax,
& xt,nxt,xs,xe,nmx,nnx,mlx,tsx,ndx,smx, & yt,nyt, nmy,nny,mly,tsy,ndy,smy, & zt,nzt,zs,ze,nmz,nnz,mlz,tsz,ndz,smz, & dm,dx,ic,maxsize)
dl_slices is a simple 3-d surface plotting routine. A 3-d surface is plotted by plotting slices through the volume which are parallel to the x-y plane. The x,y values of the surface at the intersection of the slice plane and the fixed z value are plotted. Hidden lines are suppressed, giving the illusion of a 3 dimensional surface. The height of the plotted surface relative to the y axis value is calibrated to the x and z axes. No perspective is used. Options exist to vary the plotting angle and to plot axes.The origin of the plot is in the lower-left corner. The x axis runs left to right along the plot bottom. The y axis is plotted as a vertical displacement offset by the z axis value. The z axis appears to point into the screen. This, with the hidden line removal, gives the illusion of depth.
dl_slices contains an internal working storage array dimensioned sufficiently large for most surfaces. However, for very complex surfaces, the working storage buffer length may be exceeded. In this case an error message is written to the terminal and the routine terminated.
d (R): array of y values dimensioned d(ndx,ndz) ndx,ndz (i): x and z dimensions of d array nx,nz (i): x and z sizes of surface to plot d array a (R): angle of x axis from horizontal 0-85 degrees b (R): angle of z axis from horizontal 0-90 degrees note: origin (1,1) is in lower-left corner x axis runs left to right on screen y axis runs up to down on screen z axis appears to run into the screen but is angled to the rightxh,yh,zh (R): length of each axis iflag (i): option flag (1s digit) =2: use color array (need all parameters) =1: do not use color array (10s digit)=0: Plot sides =1: Do not plot sides iax (i): axis format control < 0 : plot axes, use input scale factors dm and dx = 0 : no axes plotted, optional parameters (xt...dx) not used, scaling computed from input array > 0 : plot axes, use scaling computed from input array only axis parameters xt through smz accessed.
(1s digit) = 1 : Plot actual max/min or input values for Y axis = 2 : Plot smoothed values for Y axis (10s digit) = 0 : Use default axis type = 1 : Use input DL_AXISB-type axis parameters (nmx, nnx, mlx, tsx, ndx, etc.) (NOTE: the following optional parameters are used if iax < 0 or mod(iflag,10)=1) X-AXIS
xt (C): title of x axis (width) nxt (i): number of characters in xt = 0 : no axis plotted > 0 : normal xs,xe (R): starting and ending values displayed on x axis (see DL_AXISB for detailed description of axis parameters) nmx (i): number of minor ticks between major ticks on x axis nnx (i): highlight length of nnx-th minor tick on x axis mlx (i): number of major tick marks on x axis tsx (R): size of title and numbers on x axis < 0 auto exponent scaling (x10 to power) disabled > 0 auto exponent scaling (x10 to power) enabled ndx (i): number of digits to right of decimal point on x axis smx (R): major tick length on x axis Y-AXIS yt (C): title of y axis (depth) nyt (i): number of characters in yt = 0 : no y axis plotted > 0 : normalnmy (i): number of minor ticks between major ticks on y axis nny (i): highlight length of nny-th minor tick on y axis mly (i): number of major tick marks on y axis tsy (R): size of title and numbers on y axis < 0 auto exponent scaling (x10 to power) disabled > 0 auto exponent scaling (x10 to power) enabledndy (i): number of digits to right of decimal point on y axis smy (R): major tick length on y axis Z-AXIS zt (C): title of z axis (height) nzt (i): number of characters in zt = 0 : no z axis plotted > 0 : normalzs,ze (R): starting and ending value displayed on z axis nmz (i): number of minor ticks between major ticks on z axis nnz (i): highlight length of nnz-th minor tick on z axis mlz (i): number of major tick marks on z axis tsz (R): size of title and numbers on z axis < 0 auto exponent scaling (x10 to power) disabled > 0 auto exponent scaling (x10 to power) enabledndz (i): number of digits to right of decimal point on z axis smz (R): major tick length on z axis (NOTE: the following optional parameters are accessed only if iax < 0 or mod(iflag,10)=1)
dm,dx (R): minimum and maximum values of d array (NOTE: color array accessed only if mod(iflag,10)=1) ic (i): color list ic(1): color for axis lines ic(2): color for axis numbers ic(3): color for axis titles ic(4): color for axis exponents ic(5): color index for lower plot surface (return) ic(6): color index for upper plot surface (return)
maxsize optional maximum number of points.
Sample program:
program demo_dl_slices ! WRITTEN BY: DGL, LAST REVISED ON 5-JAN-1994 10:31:18.86 ! JSU, 19-JUL-2005 use M_pixel use M_pixel__writegif_animated, only : write_animated_gif use :: M_pixel__slices, only : dl_slices, dl_init, dl_symbol implicit none integer,parameter :: ix=35 integer,parameter :: iz=45 real :: surfdat(ix,iz) ! array of y values integer :: movie(85+90+90,0:500,0:500) ! array of y values real,save :: tpi=3.141592654 integer :: icol(255) character(len=80) :: xt,yt,zt ! axis titles real :: a,b,dm,dx real :: smx,smy,smz real :: tsx,tsy,tsz real :: xe,xh,xs real :: ye,yh,ys real :: ze,zh,zs ! integer :: i integer :: i10,i20,i40 integer :: iax integer :: iflag integer :: iframe integer :: ii integer :: j integer :: mlx,mly,mlz integer :: ndx,ndy,ndz integer :: nmx,nmy,nmz integer :: nnx,nny,nnz integer :: nx,nxt integer :: nyt integer :: nz,nzt ! !  SIGN: ! iax (i): axis format control ! < 0 : plot axes, use input scale factors dm and dx ! = 0 : no axes plotted, optional parameters (xt...dx) ! not used, scaling computed from input array ! > 0 : plot axes, use scaling computed from input array ! only axis parameters xt through smz accessed. ! DIGITS: ! (1s digit) = 1 : Plot actual max/min or input values for Y axis ! = 2 : Plot smoothed values for Y axis ! (10s digit) = 0 : Use default axis type ! = 1 : Use input DL_AXISB-type axis parameters ! (nmx, nnx, mlx, tsx, ndx, etc.) ! ! NOTE: the following optional parameters are used if iax < 0 or ! mod(iflag,10)=1 ! ! (see DL_AXISB for detailed description of axis parameters) ! ! XAXIS: xs=-10.0 ! xs,xe (R): starting and ending values displayed on x axis xe=10.0 !----------------------- nmx=4 ! (i): number of minor ticks between major ticks on x axis nnx=0 ! (i): highlight length of nnx-th minor tick on x axis mlx=4 ! (i): number of major tick marks on x axis tsx=-0.15 ! (R): size of title and numbers on x axis ! < 0 auto exponent scaling (x10 to power) disabled ! > 0 auto exponent scaling (x10 to power) enabled ndx=1 ! (i): number of digits to right of decimal point on x axis smx=0.1 ! (R): major tick length on x axis !----------------------- xt=dl_slices X TITLE ! (C): title of x axis (width) nxt=len_trim(xt) ! (i): number of characters in xt ; ! nxt = 0 : no axis plotted ; nxt > 0 : normal ! ! YAXIS: ys=-10.0 ! ys,ye (R): starting and ending values ! displayed on y axis ye=10.0 !----------------------- nmy=1 ! (i): number of minor ticks between major ticks on y axis nny=0 ! (i): highlight length of nny-th minor tick on y axis mly=3 ! (i): number of major tick marks on y axis tsy=-0.15 ! (R): size of title and numbers on y axis ! < 0 auto exponent scaling (x10 to power) disabled ! > 0 auto exponent scaling (x10 to power) enabled ndy=1 ! ndy (i): number of digits to right of decimal point ! on y axis smy=0.10 ! smy (R): major tick length on y axis !----------------------- yt=dl_slices Y TITLE ! (C): title of y axis (width) nyt=len_trim(yt) ! (i): number of characters in xt ; ! nyt = 0 : no axis plotted ; nyt > 0 : normal ! ! ZAXIS: zs=1.0 ze=1.0 ! (R): starting and ending value displayed on z axis !----------------------- nmz=3 ! (i): number of minor ticks between major ticks on z axis nnz=2 ! (i): highlight length of nnz-th minor tick on z axis mlz=2 ! (i): number of major tick marks on z axis tsz=-0.15 ! (R): size of title and numbers on z axis ! < 0 auto exponent scaling (x10 to power) disabled ! > 0 auto exponent scaling (x10 to power) enabled ndz=1 ! (i): number of digits to right of decimal point on z axis smz=0.1 ! (R): major tick length on z axis !----------------------- zt=SLICE ! (C): title of z axis (width) nzt=len_trim(zt) ! (i): number of characters in xt ;nzt = 0 : ! no axis plotted ; nzt > 0 : normal ! ! (NOTE: the following optional parameters are accessed only if ! iax < 0 or mod(iflag,10)=1) dx=1.0 dm=-1.0 ! dm,dx (R): minimum and maximum values of SURFDAT array ! view angles ! A (R): angle of x axis from horizontal 0-80 degrees ! B (R): angle of z axis from horizontal 5-80 degrees ! note: origin (1,1) is in lower-left corner ! x axis runs left to right on screen ! y axis runs up to down on screen ! z axis appears to run into the screen ! but is angled to the right iframe=1 b=15.0 do i10=1,85 ! Animate cycling thru angle A a=i10 call color(7) call clear() call color(0) call dl_slices(surfdat,ix,iz,nx,nz,a,b,xh,yh,zh,iflag,iax, & & xt,nxt, & & xs,xe,nmx,nnx,mlx,tsx,ndx,smx, & & yt,nyt, & & nmy,nny,mly,tsy,ndy,smy, & & zt,nzt, & & zs,ze,nmz,nnz,mlz,tsz,ndz,smz,dm,dx,icol) ! ! add a label after master routine call call color(1) call linewidth(1) call dl_symbol(0.0,0.0,0.25,VAX3DX,0.0,6,-1) movie(iframe,:,:)=p_pixel(:,:) iframe=iframe+1 enddo ! a=25 do i20=1,90 ! Animate cycling thru angle B b=i20 call color(7) call clear() call color(0) call dl_slices(surfdat,ix,iz,nx,nz,a,b,xh,yh,zh,iflag,iax, & & xt,nxt, & & xs,xe,nmx,nnx,mlx,tsx,ndx,smx, & & yt,nyt, & & nmy,nny,mly,tsy,ndy,smy, & & zt,nzt, & & zs,ze,nmz,nnz,mlz,tsz,ndz,smz,dm,dx,icol) movie(iframe,:,:)=p_pixel(:,:) iframe=iframe+1 enddo ! iax=01 iflag=012 ii=1 ! do i40=1,90*ii ! Animate cycling thru angles A and B a=real(i40)/ii/2.0 ! should get warning when this exceeds 85 b=real(i40)/ii/2.0 call color(7) call clear() call color(0) call dl_slices(surfdat,ix,iz,nx,nz,a,b,xh,yh,zh,iflag,iax, & & xt,nxt, & & xs,xe,nmx,nnx,mlx,tsx,ndx,smx, & & yt,nyt, & & nmy,nny,mly,tsy,ndy,smy, & & zt,nzt, & & zs,ze,nmz,nnz,mlz,tsz,ndz,smz,dm,dx,icol) movie(iframe,:,:)=p_pixel(:,:) iframe=iframe+1 enddo ! call vexit() ! close up plot package call write_animated_gif(dl_slices.3M_pixel.gif,movie,p_colormap,delay=5) !call execute_system_command(display dl_slices.3M_pixel.gif) end program demo_dl_slices !
| Nemo Release 3.1 | dl_slices (3) | July 22, 2023 |


Find a restaurant
How to join
Find out how to save at Wellington's top restaurants
How to buy an EntertainmentTM Book
All you need to be able to take advantage of the great deals at various restaurants in your city, is to support you favourity charity by buying an Entertainment Book.
The new Entertainment™ Books are better than ever and are packed with thousands of valuable offers from popular restaurants, attractions, accommodation and more! Purchase a new Book and you will also be helping community organisations with their fundraising, with 20% of the proceeds going directly towards their important causes.
Entertainment™ Books are distributed exclusively through a number of fund-raising and community groups in your local area such as:
- Charities
- Schools
- Hospitals
- Corporate Social Clubs
- Rotary Clubs and Lions Clubs
- Sporting Clubs
- Day Care Centres and Kindergartens
- Religious Groups
- Research Foundations
- Scout and Girl Guide Groups
- Surf Lifesaving Clubs
- Local Community Services Groups
Choose an organisation in your local area that you would like to support… your favourite charity, sporting club, the local school or hospital and give them a call or visit their website.
Many organisations are already taking orders for the new 2013|2014 Entertainment™ Books that will be released from April 2013 onwards so get in touch with your favourite fundraising organisation now to reserve your new Entertainment™ Book.


Bentham, Alice Petty
| Birth Name | Bentham, Alice Petty |
| Gender | female |
| Age at Death | unknown |
Narrative
1841 Census - Alice was 5mths old.
1891 Census - Thornton-in-Craven.
Events
| Event | Date | Place | Description | Sources |
|---|---|---|---|---|
| Birth | 1st Qtr 1841 | Settle Ykshire (23 555) | ||
|
|
||||
| Christening | 1841-02-14 | Arncliffe Ykshire Eng | ||
|
|
||||
| Death | 1891 Census, Thornton in Craven Yks Eng | |||
|
|
Parents
| Relation to main person | Name | Birth date | Death date | Relation within this family (if not by birth) |
|---|---|---|---|---|
| Father | Bentham, Miles | 1812 | ||
| Mother | Petty, Sarah (Petyt) | 1806-08-29 | ||
| Brother | Bentham, William | 3rd Qtr 1838 | ||
| Bentham, Alice Petty | 1st Qtr 1841 | |||
| Sister | Bentham, Ann | 1st Qtr 1843 | ||
| Sister | Bentham, Sarah | 1st Qtr 1845 | ||
| Brother | Bentham, John | 3rd Qtr 1848 |
Families
Family of Utley, Joseph and Bentham, Alice Petty |
||||||||||||||||||||
| Married | Husband | Utley, Joseph ( * + 1872-05-23 ) | ||||||||||||||||||
|
||||||||||||||||||||
| Children |
| Name | Birth Date | Death Date |
|---|---|---|
| Bentham, “Miles” William | 3rd Qtr 1859 | |
| Bentham, John Dawnham | 1st Qtr 1862 | |
| Utley, Thomas | 2nd Qtr 1867 | 1st Qtr 1942 |
| Utley, Sarah Ann | 1st Qtr 1869 | |
| Utley, Martha Elizabeth | 3rd Qtr 1871 | 1938 |
| Type | Value | Notes | Sources |
|---|---|---|---|
| _UID | 5C01FB65E5C4D5119853B7EB0FA9CA6DC8DB |
Family of Slater, Richard and Bentham, Alice Petty
| Event | Date | Place | Description | Sources |
|---|---|---|---|---|
| Marriage | 1st Qtr 1877 | Earby Baptist Chapel, Ykshire Eng (Skipton 9a 55) | ||
|
|
| Name | Birth Date | Death Date |
|---|---|---|
| Utley, Isabella Petty | 4th Qtr 1873 | |
| Slater, Mary Alice | 1st Qtr 1878 | |
| Slater, Hannah | 3rd Qtr 1882 |
| Type | Value | Notes | Sources |
|---|---|---|---|
| _UID | 7001FB65E5C4D5119853B7EB0FA9CA6DDC1B |
Attributes
| Type | Value | Notes | Sources |
|---|---|---|---|
| _UID | 6F01FB65E5C4D5119853B7EB0FA9CA6DDB0B |


The basic rules of the template system are enough to use it, but over time, we at Google have developed some tips, guidelines, and best practices that make it easier to use templates effectively, and to avoid common template errors.
Early in Google's use of templates, we noticed a problem: if a binary that uses a template and its corresponding template were both modified, particularly if the change were such that the old binary could not work with the new template or the new binary could not work with the old template, then somehow they both had to be deployed at the same instant to not present errors to our users. This was hard to do. The solution was to adopt a template naming and versioning convention. The procedure to use it follows:
_postYYYYMMDD.tpl
,
where YYYMMDD is the date of this version's initial
creation. RegisterTemplateFilename
idiom), and push the new executable to the production
server. When this convention is followed, the new template file does not
overwrite the old one when it is deployed, because it is a new file
with a new name. The old template file is still there to be used as
long as the old binary is still in production and the new template
file just sits there being ignored. Then when the new binary finally
gets deployed, it immediately starts using the new template file,
because it is coded (in RegisterTemplateFilename
) to do
so. After that, it is the old template file that continues to sit
there ignored.
The make_tpl_varnames_h
utility knows about the "_postYYYYMMDD" naming convention, so it
is important that you use that convention exactly if you use the
make_tpl_varnames_h
.
Typically a program using the Ctemplate System will perform the following phases, usually in this order:
Most of the code of the program will be in Phases 1 and 2. Clearly, Phase 1 is outside the scope of the template system. But in designing the code for Phase 2 (building the data dictionary), it is wise to have the structure of the program reflect the structure of the templates being used. Specifically, there should be a single procedure call to build the dictionary for a single template. That procedure call should take parameters that include all the data required to populate the data dictionary for that template and all the templates it includes. Following this "one template/one procedure call" guideline further, for each included template, another procedure should be called to populate the (or each) data dictionary for that included template. This maintains the "one template/one procedure call" principle in a nested fashion that reflects the nesting of the templates.
This is not to imply that the "one procedure call" for a template should not be modularized into sub-procedures for readability and maintainability, or that it should not call other auxilliary procedures for such things as formatting the data and converting it to the appropriate strings, etc. But it does mean that there should be one entry point for building the dictionary tree for one template and that entry point should show the data dependencies of that template through its parameter list. This code for populating the data dictionary should NOT be intermingled with data gathering code that should have been done in Phase 1.
(Inside Google, the convention has been used to name the dictionary
building procedure using the pattern fill_..._dictionary
where the dots are related to the name of the template the data is
being prepared for. For instance, the data for the template named
one_search_result.tpl might be placed in a dictionary via a function
named fill_one_search_result_dictionary
.)
Template names should contain at least two words
to avoid constant prefix clashes (e.g. kxy_
instead of kx_
) The name of a new template
should be checked against the existing names before
proceeding. If your new template name produces a prefix that
conflicts with an already existing template, you should change
the name of your new template, even though it may be the only
perfect name you can come up with. You'll have to use a less
than perfect name in that case. (See "Template Syntax Checker
and Header File Generator" below for more explanation about
constant prefixes.)
This method should never be used to sneak HTML into the executable as in
dictionary->SetFormattedValue(kxy_VAR, "%s", some_const_char_string);
In that case, the
and

should be moved into the template.
If the first line of a template is a start section marker and the last line is its matching end section marker, then those markers are unnecessary in almost all cases. They are usually put there to allow the entire template to be hidden or iterated, but since it encompasses the entire file, the section may be hidden by not expanding the file (or by hiding the template-include section that includes the file) and it may be iterated by iterating the template-include marker of the including template. (The only exception might be if the entire page is to be iterated, but this seems a bit of a stretch.)
For example, if your template has the following template-include marker:
{{>MY_INCLUDED_TEMPLATE}}
you may call
ctemplate::TemplateDictionary *child_dict = dictionary->AddIncludeDictionary(kxy_MY_INCLUDED_TEMPLATE);
to iterate that section. (Note: Make sure you call
child_dict->SetFilename()
! If your included
template is not showing in the output, this is the first thing
you should check.)
fill_include_template_dictionary(dict->AddIncludeDictionary(name), ...);
But what do you do if you decide, in
fill_include_template_dictionary
, that you don't
want to display anything for this include-template after all? It
seems like it's too late: you've already created the
sub-dictionary. The solution is simple: just be sure that
fill_include_template_dictionary()
doesn't call
SetFilename()
in that case.
For example, don't do this:
{{#OUTER_SECTION}} {{#INNER_SECTION}} section contents here {{/INNER_SECTION}} {{/OUTER_SECTION}}
or this equivalent template code (see the previous item):
{{#OUTER_SECTION}} {{>INCLUDED_SECTION}} {{/OUTER_SECTION}}
This is usually done because the developer thinks the outer
section must be used to hide the section when the inner
section, intended for iteration, has no iterations. In both
cases, you should only have one section (either
INNER_SECTION
or INCLUDED_SECTION
in
the examples) and iterate that section either 0 times or more
than 0 times. It's the wonder of the dual use of sections,
i.e. that they may be conditional or iterative or, in this case,
both.
A related suggestion: Do not have a section whose entire contents is one variable marker with nothing else, unless you need to iterate over that section with multiple values of that variable. You don't need the surrounding section just to hide the marker. A variable marker that is not set, does not produce output. By convention, we set such variables to the empty string. But in neither case do you need to hide it by hiding a surrounding section that contains nothing else.
if-else
blocks.
Since sections are hidden by default, you can use represent
if-else logic in your code via ShowSection
. For
example:
if ( my_test ) { dict->ShowSection(kxyz_TRUE_BLOCK); [ more code to fill the values for that section] } else { dict->ShowSection(kxyz_FALSE_BLOCK); [ more code to fill the values for that section] }
Write...
vs. Fill...Dictionary
methods
- Observe the proper division of labor, don't mix them.
The output (or write) function should create the top level
template dictionary, call one or more fill-dictionary routines
with it, then get the template and expand it. It should not call
dictionary modifying methods, like ShowSection
and SetValue
. By keeping these separated into
their own fill-dictionary routine, the code is more modular and
lends itself to template re-use. If you maintain the proper
division of labor, the template you are filling and outputting
may be filled and included in a larger template by someone
else.
AddSectionDictionary
only when you want to
iterate over a section or, secondarily, if you need to avoid name
conflicts.
Sometimes developers get the idea that every section requires
its own child dictionary created by an
AddSectionDictionary
call. Because of variable
inheritence, this isn't usually so. The intended purpose of
AddSectionDictionary
is to enable iteration over a
section. Secondarily, if the section contains generic names that
may conflict with the same name in other parts of the template,
it may be safer to call AddSectionDictionary
to
create a separate namespace. In any case, do not assume you must
call AddSectionDictionary
just because you are
working within a section. The main dictionary can be used for all
levels of conditional sections as long as you avoid name
conflicts by keeping the marker names unique.
RegisterTemplateFilename
statements in header (.h
) files.
RegisterTemplateFilename
is a macro that
instantiates a TemplateNamelist
object. If you place
it in a header file, a different object will get created each time
it is included in another .cc
file.
The RegisterTemplateFilename
statement and its
associated #include
of the varnames.h
file should occur only in the .cc
file that
implements the fill-dictionary routine for that template. You
should never have more than one
RegisterTemplateFilename
for a single template and
you should try hard not to copy the #include
file to
other files as well. The template versioning makes this more
important because a developer may not know that the template name
with included version number needs to be updated in more than one
file when versioning occurs. [Also see above for more information
about what routine uses the filename declared by the
RegisterTemplateFilename
statement.]
Each template should have its own fill-dictionary routine. That routine should only reference marker names defined in that template. If this convention is followed, then all the prefixes in a fill-dictionary routine will be the same. [Note that an implication of this convention is that if the template includes another template, via a template-include marker, then containing template's fill-dictionary routine should call the included template's fill-dictionary routine (being careful to observe the convention described above). But then, this is merely a restatement of "One template / One procedure call".]
SetFilename
even if the
dictionary is never used for a template-include.
SetFilename() is required when a dictionary is created via
AddIncludeDictionary()
. However, it's safe to set
all the time. By setting it always, you make the code work
properly if this dictionary ever changes to be template-included
after all. Even if not, by saying what template file the
dictionary is intended to go with, you are self-documenting your
code.
c_str()
on strings to pass them to
TemplateDictionary
methods.
Note that all the TemplateDictionary methods are defined to
take TemplateString
objects. These are created
automatically from both strings and char*'s (and can be created
manually if you have a char* and a length). So if you have a
string, it's safe and efficient to just pass it in directly; you
do not need to extract the const char * from your string object
to pass it to these methods. For some reason, this is a common
error of novice template coders.
The one exception to this rule is when using the method
SetFormattedValue
. When calling that
method, you must call c_str()
on strings that are to
be inserted
into the format string, just as you would when providing data for
any other printf format string.
SetGlobalValue
when you could use
SetValue
or SetTemplateGlobalValue
.
SetGlobalValue
should be used quite rarely, for
constants that really are consistent across all your templates.
It's slower to look up a value in the global dictionary than it
is in the template-specific dictionary.
StringToTemplateCache
unless you have
a specific need for its non-file-based attributes.
ctemplate::StringToTemplateCache
was created for
use in highly constrained cases where file I/O may be impaired or
undesirable, for instance to produce a server error message
where there may be disk problems or to produce formatted
output where there are processes that do not have a facility
for updating data files dynamically. It is not recommended for
ordinary use since it cannot be updated dynamically via a
data-push; changes always require a binary push.
Use {{%AUTOESCAPE}}
consistently. Use the
:none
modifier to override autoesacping only in
those (usually rare) cases where there is a specific reason the
template variable should not be escaped, for example:
SetFormattedValue
and
consider moving the HTML markup into the template.{{BI_SPACE}}
The built-in template variable BI_SPACE
is itself
replaced by a single space. It is used where you need to make
sure a space is preserved at the end of a line. It is a common
mistake to leave an extra space before this marker, which results
in not one, but two, spaces created in the document.
Incorrect:

Correct: