--- title: Bootstrap confidence intervals when sample size is really small author: Jeff Walker date: '2020-06-01' slug: bootstrap-confidence-intervals-when-sample-size-is-really-small categories: - stats 101 tags: - confidence interval - fake data - generalized linear models keywords: - tech ---
A sample table from the full results for data that look like this
| parameter | n=5 | n=10 | n=20 | n=40 | n=80 |
|---|---|---|---|---|---|
| means | |||||
| Control | 81.4 | 87.6 | 92.2 | 93.0 | 93.6 |
| b4GalT1-/- | 81.3 | 90.2 | 90.8 | 93.0 | 93.8 |
| difference in means | |||||
| diff | 83.3 | 87.9 | 91.8 | 92.9 | 93.8 |
Bootstrap CIs are extremely optimistic (too narrow) with data that look like the modeled data when n is 5 (coverage of a 95% interval is 81-83%) and remain optimistic even at n=20, which is a uncommonly large sample size in many bench biology experiments. This result convinces me that the bootstrap should not be generally recommended.
This is part II of how to represent uncertainty in the mean response of each treatment level. A 1 SE bar, where the SE is computed for each group independently, is nearly universal in much of biology. Part I explains why I prefer confidence intervals to SE bars and explores several alternative methods for computing a CI. One alternative is a non-parametric bootstrap. I like the bootstrap – it is extremely useful for learning and teaching what “frequentist” means. It is not dependent on any distribution. It can be used to compute CIs for statistics where no parametric CI exists. And its (fairly) easy to implement!
I am embarrassed to admit that I don’t know how well bootstrap CIs perform with really small sample sizes, say 5 or 10, which are common in experimental (and especially wet-bench) biology. By “perform”, I mean coverage – the actual number of intervals that contain the parameter (true value). If the nominal value is 95% and the coverage is 80%, our results aren’t what we think they are. Part of my ignorance is because the focus on on errors related to the presence of an effect (Type I, Power, FDR) and not on errors related to the magnitude of an effect (Type “S”, Type “M”, coverage of CIs). But part of my ignorance is also because I just don’t recall any source making a big deal about any issues with bootstrap CIs for small samples, at least in the “how-to” literature and not technical literature (like books explicitly on the bootstrap)
The question pursued here is, what is the coverage (the actual frequency of intervals that include the statistic) of a bootstrap interval for really small samples sizes…on the order of n = 5 or 10, which is really common in bench biology? Coverage is important – when we take the time to understand the consequences of a particular 95% interval, we hope the interval was constructed by a method that actually includes the statistic with a frequency close to 95% (we can argue what “close to” means).
To explore, this, I use a small simulation. The simulation creates fake data that simulate platelet count from Figure 1F of β4GALT1 controls β1 integrin function to govern thrombopoiesis and hematopoietic stem cell homeostasis. Jump to the plot of the data, the mean, and the raw and bootstrap intervals to get a feel for the data.
The platelet count data look they come from a distribution with a strong right skew and variance proportional to the mean (poisson, negative binomial). I approximate the data by sampling from a negative binomial distribution. Does this distribution matter? I lightly explore this by re-running the simulation and sampling from a normal distribution with heterogeneity in variance (equal to that in the two groups).
The results also motivated me to google around for how the bootstrap is presented in material that is targeted to experimental (and especially wet-bench) biology – so not textbooks or technical papers on the bootstrap
Explorations in statistics: the bootstrap is a nice introduction to bootstrapped means and CIs. The piece does state that if n is too small, then “normal-theory and percentile confidence intervals are likely to be inaccurate” and then introduces bca intervals. There are many ways to be inaccurate, and overly-optimistic intervals are not mentioned. And, the take-home message seems to be that bca intervals are a solution to issues with small n. The piece explicitly has a section on limitations, and states “As useful as the bootstrap is, it cannot always salvage the statistical analysis of a small sample. Why not? If the sample is too small, then it may be atypical of the underlying population. When this happens, the bootstrap distribution will not mirror the theoretical distribution of the sample statistic.” Again, overly-optimistic intervals are not mentioned.
A better bar recommends the bootstrap CI but fails to mention anything about small samples.
A biologist’s guide to statistical thinking and analysis has a section Fear not the bootstrap fails to mention anything about small sample size.
Effect size, confidence interval and statistical significance: a practical guide for biologists is a well known review paper within my field of ecology/evolution. The paper simply states that “It should be noted that small sample size will often give incorrect coverage of CIs”, which fails to explicitly state a problem of small n is overly-optimistic CIs.
A newer how-to paper on resampling methods, Resampling-based methods for biologists, also from organismal/ecology/evolution, simply states “For small samples or skewed distributions, better methods [than percentile bootstrap intervals] exist (citations)”, which fails to explicitly state a problem of small n is overly-optimistic CIs.
knitr::opts_chunk$set(echo = TRUE, message=FALSE)
# wrangling packages
library(here)
library(janitor)
library(readxl)
library(data.table)
library(stringr)
# analysis packages
library(MASS)
library(lmerTest)
library(emmeans)
library(boot)
# graphing packages
library(ggsci)
library(ggpubr)
library(ggforce)
library(cowplot)
# table packages
library(knitr)
library(kableExtra)
here <- here::here()
data_folder <- "content/data"
output_folder <- "content/output"
run_simulation <- FALSE
file_folder <- "β4GALT1 controls β1 integrin function to govern thrombopoiesis and hematopoietic stem cell homeostasis"
fn <- "41467_2019_14178_MOESM4_ESM.xlsx"
file_path <- here(data_folder, file_folder, fn)
# Fig 1F
fig1f <- read_excel(file_path,
sheet = "Figure 1",
range = "I5:J47") %>%
clean_names() %>%
data.table() %>%
na.omit() # git rid of blank row. there are no NA
fig1f[, treatment := word(x1, 1)]
fig1f[, treatment := factor(treatment, c("Control", "b4GalT1-/-"))]
setnames(fig1f, old="platelets_e14_5", new="platelets")
fig1f[, platelet_count := round(platelets*10^9)]
# response
fig1f_means <- fig1f[, .(platelet_count = mean(platelet_count),
SD = sd(platelet_count),
SE = sd(platelet_count/sqrt(.N)),
N = .N)
, by = treatment]
fig1f_means[, lower := platelet_count + SE*qt(.025, (N-1))]
fig1f_means[, upper := platelet_count + SE*qt(.975, (N-1))]
set.seed(1)
gg_points <- ggplot(data = fig1f,
aes(x = treatment, y = platelet_count)) +
geom_sina(alpha=0.4) +
theme_pubr() +
NULL
set.seed(1)
gg_raw <- gg_points +
geom_point(data = fig1f_means,
aes(y = platelet_count),
size = 3,
color = c("#3DB7E9", "#e69f00")) +
geom_errorbar(data = fig1f_means,
aes(ymin = lower, ymax = upper),
width = 0.04,
size = 1,
color = c("#3DB7E9", "#e69f00")) +
NULL
This function returns two sets of CIs for the 1) modeled means of the observed fit and the 2) parameters of the observed fit. The first set is from a residual bootstrap. This seems weird because if there is heterogeneity, then a residual bootstrap spreads this heterogeneity among all groups. The second is from a stratified bootstrap. But if the differences in sample variance is due to noise, then a stratified bootstrap will mimic this noise.
# # # # # # # # #
# This function returns two sets of CIs for the 1) modeld means of the observed fit
# and the 2) parameters of the observed fit. The first set is from a residual bootstrap.
# This seems weird because if there is heterogeneity, then a residual bootstrap spreads
# this heterogeneity among all groups. The second is from a stratified bootstrap
# # # # # # # # #
boot_lm_test <- function(obs_fit,
n_boot = 1000,
ci = 0.95,
method = "stratified"){
ci_lo <- (1-ci)/2
ci_hi <- 1 - (1-ci)/2
boot_dt <- data.table(obs_fit$model)
boot_dt[, id:=.I]
x_label <- names(obs_fit$xlevels)[1]
group_first_row <- boot_dt[, .(bfr = min(id)), by=get(x_label)][,bfr]
obs_beta <- coef(obs_fit)
obs_error <- residuals(obs_fit)
obs_yhat <- fitted(obs_fit)
obs_y <- obs_fit$model[,1]
obs_x <- obs_fit$model[,2]
X <- model.matrix(obs_fit)
xtxixt <- solve(t(X)%*%X)%*%t(X)
N <- nrow(obs_fit$model)
inc_resid <- 1:N
inc_strat <- 1:N
beta_resid <- matrix(NA, nrow=n_boot, ncol=length(obs_beta))
beta_strat <- matrix(NA, nrow=n_boot, ncol=length(obs_beta))
mu_resid <- matrix(NA, nrow=n_boot, ncol=length(obs_beta))
mu_strat <- matrix(NA, nrow=n_boot, ncol=length(obs_beta))
for(iter in 1:n_boot){
# y_resamp_residuals <- obs_yhat + obs_error[inc_resid]
# beta_resid[iter,] <- (xtxixt%*%y_resamp_residuals)[,1]
# mu_resid[iter, ] <- (X%*%beta_resid[iter,])[group_first_row, 1]
y_resamp_strat <- obs_y[inc_strat]
beta_strat[iter,] <- (xtxixt%*%y_resamp_strat)[,1]
mu_strat[iter, ] <- (X%*%beta_strat[iter,])[group_first_row, 1]
inc_resid <- sample(1:N, replace = TRUE)
inc_strat <- with(boot_dt, ave(id, get(x_label), FUN=function(x) {sample(x, replace=TRUE)}))
}
# ci_resid_beta <- apply(beta_resid, 2, quantile, c(ci_lo, ci_hi))
# ci_resid_mu <- apply(mu_resid, 2, quantile, c(ci_lo, ci_hi))
ci_strat_mu <- apply(mu_strat, 2, quantile, c(ci_lo, ci_hi))
ci_strat_beta <- apply(beta_strat, 2, quantile, c(ci_lo, ci_hi))
return(list(
# ci_resid_beta = ci_resid_beta,
# ci_resid_mu = ci_resid_mu,
ci_strat_beta = ci_strat_beta,
ci_strat_mu = ci_strat_mu
))
}
boot_diff <- function(dt, inc){ # original code
means <- dt[inc, .(platelet_count = mean(platelet_count)), by = .(treatment, level)]
setorder(means, level) # reorder to correct order of factor levels
c(means[, platelet_count], diff(means$platelet_count))
}
# changing where the index is specified speeds this up. huh.
boot_diff2 <- function(dt, inc){
dt_inc <- dt[inc, ]
means <- dt_inc[, .(platelet_count = mean(platelet_count)), by = .(treatment, level)]
setorder(means, level) # reorder to correct order of factor levels
c(means[, platelet_count], diff(means$platelet_count))
}
# trying something differt slows everything down. Maybe the == ?
boot_diff3 <- function(dt, inc){
dt_inc <- dt[inc, ]
ybar1 <- mean(dt_inc[level==1, platelet_count])
ybar2 <- mean(dt_inc[level==2, platelet_count])
diff <- ybar2-ybar1
c(ybar1, ybar2, diff)
}
# remembering the lm.fit function but then thinking why bother.
# lets just do the math
boot_diff4 <- function(dat, inc){
X <- dat[inc, 1:2]
y <- dat[inc, 3]
b <- (solve(t(X)%*%X)%*%t(X)%*%y)[,1]
c(b[1], b[1]+b[2], b[2])
}
# but then thought, well maybe lm.fit is super optimized and %*% isn't
boot_diff5 <- function(dat, inc){
X <- dat[inc, 1:2]
y <- dat[inc, 3]
b <- coef(lm.fit(X,y))
c(b[1], b[1]+b[2], b[2])
}
# then found .lm.fit when I ?lm.fit
boot_diff6 <- function(dat, inc){
X <- dat[inc, 1:2]
y <- dat[inc, 3]
b <- coef(.lm.fit(X,y))
c(b[1], b[1]+b[2], b[2])
}
# test
fd <- data.table(treatment = factor(rep(c("cn", "tr"), each=5)),
platelet_count = rnorm(10))
fd[, level := as.integer(treatment)]
X_i <- cbind(model.matrix(~ treatment, fd), platelet_count = fd$platelet_count)
microbenchmark::microbenchmark(boot(fd, statistic = boot_diff, R = 0, strata = fd$level),
boot(X_i, statistic = boot_diff4, R = 0, strata = X_i[,2]),
boot(X_i, statistic = boot_diff5, R = 0, strata = X_i[,2]),
boot(X_i, statistic = boot_diff6, R = 0, strata = X_i[,2]),
times=1000)
## Unit: microseconds
## expr min
## boot(fd, statistic = boot_diff, R = 0, strata = fd$level) 1072.991
## boot(X_i, statistic = boot_diff4, R = 0, strata = X_i[, 2]) 284.331
## boot(X_i, statistic = boot_diff5, R = 0, strata = X_i[, 2]) 270.266
## boot(X_i, statistic = boot_diff6, R = 0, strata = X_i[, 2]) 237.303
## lq mean median uq max neval cld
## 1176.7485 1355.9981 1247.6625 1474.1500 5459.451 1000 c
## 304.6715 364.3548 323.4210 380.0295 6026.275 1000 ab
## 284.0860 386.6959 299.2115 358.0265 34357.577 1000 b
## 255.8765 298.8276 269.9000 323.5945 3868.646 1000 a
m1 <- lm(platelet_count ~ treatment, data = fig1f)
m1_boot <- boot_lm_test(m1)
fig1f_means[, lower.boot := m1_boot$ci_strat_mu["2.5%",]]
fig1f_means[, upper.boot := m1_boot$ci_strat_mu["97.5%",]]
set.seed(1)
gg_boot <- gg_points +
geom_point(data = fig1f_means,
aes(y = platelet_count),
size = 3,
color = c("#3DB7E9", "#e69f00")) +
geom_errorbar(data = fig1f_means,
aes(ymin = lower.boot, ymax = upper.boot),
width = 0.04,
size = 1,
color = c("#3DB7E9", "#e69f00")) +
NULL
#gg_boot
plot_grid(gg_raw, gg_boot, ncol=2, labels = "AUTO")
Not a big difference.
boot_sim <- function(
mu, # mean of each level
model = "nb", # distribution of the data, normal or nb
theta = 1, #theta for nb
sigma = 1, # sd of each level for normal
beta, # coefficients of model
n_sim = 1000, # iterations of simulation
n_boot = 1000, # number of bootstrap resamples
n_list = 30, # vector of sample sizes per level. Whole sim run for each n
method = "stratified" # stratified, residual, or both
){
k <- length(mu)
treatment_levels <- names(mu)
coverage_table_bca <- data.table(parameter = c(treatment_levels, "diff"))
coverage_table_perc <- data.table(parameter = c(treatment_levels, "diff"))
for(n in n_list){
N <- k*n
# vector of parameters for sampling function
sim_mu <- rep(mu, each=n)
sim_sigma <- rep(sigma, each=n)
fd <- data.table(
treatment = rep(treatment_levels, each=n)
)
fd[, treatment := factor(treatment, treatment_levels)]
fd[, level := as.integer(treatment)]
boot_ci_bca<- matrix(FALSE, nrow = n_sim, ncol=3)
colnames(boot_ci_bca) <- c(treatment_levels, "diff")
boot_ci_perc <- matrix(FALSE, nrow = n_sim, ncol=3)
colnames(boot_ci_perc) <- c(treatment_levels, "diff")
for(iter in 1:n_sim){
if(model=="nb"){
fd[, platelet_count := rnegbin(N, sim_mu, theta)]
}
if(model=="normal"){
fd[, platelet_count := rnorm(N, sim_mu, sim_sigma)]
}
X_i <- cbind(model.matrix(~ treatment, data=fd), fd$platelet_count)
boot_out <- boot(X_i,
strata = X_i[,2],
boot_diff4,
R = n_boot)
# bca intervals
ci_mean_cn <- boot.ci(boot_out, index = 1, conf=0.95, type=c("bca"))$bca[4:5]
ci_mean_tr <- boot.ci(boot_out, index = 2, conf=0.95, type=c("bca"))$bca[4:5]
ci_diff <- boot.ci(boot_out, index = 3, conf=0.95, type=c("bca"))$bca[4:5]
boot_ci_bca[iter, 1] <- between(mu[1], ci_mean_cn[1], ci_mean_cn[2])
boot_ci_bca[iter, 2] <- between(mu[2], ci_mean_tr[1], ci_mean_tr[2])
boot_ci_bca[iter, 3] <- between(beta[2], ci_diff[1], ci_diff[2])
# percent intervals
ci_mean_cn <- boot.ci(boot_out, index = 1, conf=0.95, type=c("perc"))$perc[4:5]
ci_mean_tr <- boot.ci(boot_out, index = 2, conf=0.95, type=c("perc"))$perc[4:5]
ci_diff <- boot.ci(boot_out, index = 3, conf=0.95, type=c("perc"))$perc[4:5]
boot_ci_perc[iter, 1] <- between(mu[1], ci_mean_cn[1], ci_mean_cn[2])
boot_ci_perc[iter, 2] <- between(mu[2], ci_mean_tr[1], ci_mean_tr[2])
boot_ci_perc[iter, 3] <- between(beta[2], ci_diff[1], ci_diff[2])
}
coverage_table_bca <- cbind(coverage_table_bca,
x = apply(boot_ci_bca, 2, sum)/n_sim*100)
setnames(coverage_table_bca, "x", paste0("n=", n))
coverage_table_perc <- cbind(coverage_table_perc,
x = apply(boot_ci_perc, 2, sum)/n_sim*100)
setnames(coverage_table_perc, "x", paste0("n=", n))
}
return(list(
coverage_table_bca = coverage_table_bca,
coverage_table_perc = coverage_table_perc
)
)
}
# # # # # # # # #
# This script explores "do the CIs of a x% bootstrap interval actually cover the mean x%
# of the time". The sample is from a negative binomial distribution so there is
# heterogeneity of variance.
# # # # # # # # #
set.seed(1)
n_sim <- 2000
n_boot <- 1000
n_list <- c(5, 10, 20, 40, 80)
lm_obs <- lm(platelet_count ~ treatment, data = fig1f)
lm_obs_sigma <- summary(lm_obs)$sigma
glm_obs <- glm.nb(platelet_count ~ treatment, data = fig1f)
glm_obs_fitted <- glm_obs$fitted.values
glm_obs_theta <- glm_obs$theta
mu_levels <- summary(emmeans(lm_obs, specs = "treatment"))[, "emmean"]
names(mu_levels) <- summary(emmeans(lm_obs, specs = "treatment"))[, "treatment"]
beta <- coef(lm_obs)
theta <- glm_obs_theta
sigma_raw <- fig1f_means[, SD]
names(sigma_raw) <- fig1f_means[, treatment]
out_file <- "boot_ci-nb.Rds"
save_file_path <- here(output_folder, out_file)
if(run_simulation == TRUE){
boot_ci_sim_nb <- boot_sim(
mu = mu_levels, # mean of each level
model = "nb", # distribution of the data, normal or nb
theta = theta, #theta for nb
sigma = sigma_raw, # sd of each level for normal
beta = beta, # coefficients
n_sim = n_sim, # iterations of simulation
n_boot = n_boot, # number of bootstrap resamples
n_list = n_list, # vector of sample sizes per level. Whole sim run for each n
method = "stratified" # stratified, residual, or both
)
saveRDS(object = boot_ci_sim_nb, file = save_file_path)
}else{
boot_ci_sim_nb <- readRDS(save_file_path)
}
boot_ci_sim_nb$coverage_table_bca
## parameter n=5 n=10 n=20 n=40 n=80
## 1: Control 81.40 87.60 92.20 93.00 93.60
## 2: b4GalT1-/- 81.35 90.20 90.75 93.05 93.80
## 3: diff 83.30 87.95 91.85 92.90 93.75
boot_ci_sim_nb$coverage_table_perc
## parameter n=5 n=10 n=20 n=40 n=80
## 1: Control 80.90 86.8 92.10 92.40 94.00
## 2: b4GalT1-/- 80.40 88.8 90.35 92.55 93.20
## 3: diff 83.35 88.2 92.10 93.10 93.85
out_file <- "boot_ci-normal.Rds"
save_file_path <- here(output_folder, out_file)
if(run_simulation == TRUE){
boot_ci_sim_normal <- boot_sim(
mu = mu_levels, # mean of each level
model = "normal", # distribution of the data, normal or nb
theta = theta, #theta for nb
sigma = sigma_raw, # sd of each level for normal
beta = beta, # coefficients
n_sim = n_sim, # iterations of simulation
n_boot = n_boot, # number of bootstrap resamples
n_list = n_list, # vector of sample sizes per level. Whole sim run for each n
method = "stratified" # stratified, residual, or both
)
saveRDS(object = boot_ci_sim_normal, file = save_file_path)
}else{
boot_ci_sim_normal <- readRDS(save_file_path)
}
boot_ci_sim_normal$coverage_table_bca
## parameter n=5 n=10 n=20 n=40 n=80
## 1: Control 82.45 89.90 93.00 94.25 94.20
## 2: b4GalT1-/- 84.05 90.85 91.25 93.75 93.65
## 3: diff 84.05 89.80 93.25 93.60 94.15
boot_ci_sim_normal$coverage_table_perc
## parameter n=5 n=10 n=20 n=40 n=80
## 1: Control 82.10 90.45 92.95 94.35 94.65
## 2: b4GalT1-/- 84.20 90.85 91.60 93.70 93.30
## 3: diff 84.15 90.40 93.40 93.35 94.50
ci_nb_bca <- boot_ci_sim_nb$coverage_table_bca
ci_normal_bca <- boot_ci_sim_normal$coverage_table_bca
ycols <- colnames(ci_nb_bca)
boot_ci_table <- rbind(data.table(interval = "nb", ci_nb_bca),
data.table(interval = "normal", ci_normal_bca))
kable(boot_ci_table[, .SD, .SDcols = ycols],
caption = "Coverage of 95% bca CIs",
digits=1) %>%
kable_styling("striped", full_width = F) %>%
pack_rows("negative binomial", 1, 3) %>%
pack_rows("normal", 4, 6)
| parameter | n=5 | n=10 | n=20 | n=40 | n=80 |
|---|---|---|---|---|---|
| negative binomial | |||||
| Control | 81.4 | 87.6 | 92.2 | 93.0 | 93.6 |
| b4GalT1-/- | 81.3 | 90.2 | 90.8 | 93.0 | 93.8 |
| diff | 83.3 | 87.9 | 91.8 | 92.9 | 93.8 |
| normal | |||||
| Control | 82.5 | 89.9 | 93.0 | 94.2 | 94.2 |
| b4GalT1-/- | 84.0 | 90.8 | 91.2 | 93.8 | 93.7 |
| diff | 84.0 | 89.8 | 93.2 | 93.6 | 94.2 |
ci_nb_perc <- boot_ci_sim_nb$coverage_table_perc
ci_normal_perc <- boot_ci_sim_normal$coverage_table_perc
ycols <- colnames(ci_nb_bca)
boot_ci_table <- rbind(data.table(interval = "nb", ci_nb_perc),
data.table(interval = "normal", ci_normal_perc))
kable(boot_ci_table[, .SD, .SDcols = ycols],
caption = "Coverage of 95% percentile CIs",
digits=1) %>%
kable_styling("striped", full_width = F) %>%
pack_rows("negative binomial", 1, 3) %>%
pack_rows("normal", 4, 6)
| parameter | n=5 | n=10 | n=20 | n=40 | n=80 |
|---|---|---|---|---|---|
| negative binomial | |||||
| Control | 80.9 | 86.8 | 92.1 | 92.4 | 94.0 |
| b4GalT1-/- | 80.4 | 88.8 | 90.3 | 92.5 | 93.2 |
| diff | 83.4 | 88.2 | 92.1 | 93.1 | 93.8 |
| normal | |||||
| Control | 82.1 | 90.5 | 93.0 | 94.3 | 94.7 |
| b4GalT1-/- | 84.2 | 90.8 | 91.6 | 93.7 | 93.3 |
| diff | 84.2 | 90.4 | 93.4 | 93.3 | 94.5 |


Our Team
Our team is called SkyBlue. From left to the right on the photo:
Yana, Feruz, Harun, Miroslav, Murielle and Boam.
We are six and we come from different countries, but we do have one thing in common: learning how to code at
Hack Your Future.
Here we learn programming languages such as
HTML, CSS, JavaScript and so on. And here, our team is mentored by
Stephane (not on the photo above).
At this moment, we have to study online via ZOOM due to Corona Crisis.


Hello beautiful people! After a quick break, we’re back with the latest updates from This Week in React ⚛.
🙌 Nicolas Joins the React Core Team
Nicolas Gallagher (necolas) has joined the React Core team. He’s the author of React Native for Web and has worked at Twitter in the past. He is now working on the experimental event API that brings high level interactions to the Web.
FocusScope was added to the Experimental Event API. It allows trapping focus inside the scope of the event component so that pressing tab at the last element will jump to the first element inside the scope.
A snapshot of the latest bundle sizes will not automatically be stored during the CI run. This makes sure that sizebot compares against the correct sizes.


Send this to the API and receive back a http-found specifying the permanent URL to the event information for the query at this current point in time.
politics, current-affairs, and tv-and-entertainment result in a feed for all of that category. Only one category can be specified.
sport-other results in a feed for all sports given the following rules:


Blog
As the name would states, a blog. Well, not exactly; this is actually a theme that you can use for a blog.
Usage
Download the theme and substitute the text to match your project's. What to change is rather self-explanatory if you read the HTML.
Basic Features
Here's a paragraph:
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Third-level Header
Fourth-level Header
Fifth-level Header
Sixth-level Header
This is some inline code: document.write('foo bar');
Here is some block code:
var a = 0;
var b = 3;
document.write(a * b);
Here is some overflowing block code (it's scrollable!):
document.write('This is a very long sentence that would normally not fit on a single line of text and to combat that, this code block is now scrollable. Have fun with it.');
Here is an overflowing word that should have hyphens (but hyphens aren't supported in all browsers): Lopadotemachoselachogaleokranioleipsanodrimhypotrimmatosilphioparaomelitokatakechymenokichlepikossyphophattoperisteralektryonoptekephalliokigklopeleiolagoiosiraiobaphetraganopterygon
It also has those cool share icons for Facebook and Twitter.
If you're on a computer, try resizing the window to see what'll happen. This responsive design is in no way perfected but it's a start.


Grid based design is taking a look at the mockup of the webpage you would like to create and dividing it up into grids that fit that design. Generally each grid will take up a proportion of the page divisible by 12 eg.(3/12, 4/12, 6/12, 12/12)
Responsive webpages make it easier to view the page on any type of device, regardless of size.
Semantic structure is tagging elements of the page to label them more clearly and make it easier to make chenges to certain elements individually.
I think bootstrap will be very interesting to play around with, and combined with google fonts it should be a lot of fun to try out creating sites in spare time.


"ACACIA "(Hebrews shittim) Exodus 25:5, R.V. probably the Acacia seyal (the gum-arabic tree); called the “shittah” tree (Isaiah 41:19). Its wood is called shittim wood (Exodus 26:15,26; 25:10,13,23,28, etc.). This species (A. seyal) is like the hawthorn, a gnarled and thorny tree. It yields the gum-arabic of commerce. It is found in abundance in the Sinaitic peninsula.
"ACACIA "(Hebrews shittim) Exodus 25:5, R.V. probably the Acacia seyal (the gum-arabic tree); called the “shittah” tree (Isaiah 41:19). Its wood is called shittim wood (Exodus 26:15,26; 25:10,13,23,28, etc.). This species (A. seyal) is like the hawthorn, a gnarled and thorny tree. It yields the gum-arabic of commerce. It is found in abundance in the Sinaitic peninsula.


title: Crate In The Cloud description: We love our Cloud Solution partners, and we’re working hard to make sure integrating Crate with any one of them is just as easy as running Crate locally. {% extends "install.html" %} {% block body %}
We love our Cloud Solution partners, and we’re working hard to make sure integrating Crate with any one of them is just as easy as running Crate locally. Don’t see what you’re looking for? Let us know and we’ll get right on it.


--- ---
| Also view: Post-doctoral Fellows | Students | Staff | Project Assistants |
Listed alphabetically by Last Name.
To Email<EMAIL_ADDRESS>| Esha Chatterjee Ghosh, Ph. D. (Rhode Island) DST Young Scientist |
|
Nonlinear Difference Equations and Applications |
|
| esha[at]math dot iisc dot ernet dot in | |
| Surjit Kumar, Ph. D. (IITK) Inspire Fellow |
|
Operator Theory |
|
| UserID : surjitk15 | |
| http://math.iisc.ac.in/~surjitk15 | |
| Sushma Palimar, Ph. D. (NITK, Surathkal) DST Women Scientist |
|
Algebraic Number Theory |
|
| UserID : sushma16 | |
|
|
||
| Indian Institute of Science | Contact the Administrator | Disclaimer |


{% extends "index.html" %} {% block welcome %} Here are some recent contributions:
The player will be given a prompt, which looks like this:
Sex with me is like an object, …
The object is randomly generated by the system. If the word generated is not common, a definition would be provided. The player can read the definition by hovering the cursor over the word, or the player can choose to generate a new word by clicking the arrow-circle sign.
The goal of the game is to justify why “sex with me” is like a certain object. The player has to come up with a justification and type it in the answer box within 40 seconds (a timer will be ticking beneath the box). Please make sure your input is a complete sentence/complete sentences rather than fragments. Some examples are given below:
Word given: Legos
“Sex with me is like Legos; you need to be imaginative to make it fun.”
Word given: depression
“Sex with me is like depression; it makes you want to sleep.”
This game, though a bit risqué, is fun and challenging. It requires the player to quickly find features shared by both sex and the object. The output is often humorous due to the unlikely combination.


2 writes to _item68
System.Management.Automation (2)
engine\runtime\MutableTuple.cs (2)
1670
_item68
= item68;
1829
set {
_item68
= value; _valuesSet[68] = true; }
1 reference to _item68
System.Management.Automation (1)
engine\runtime\MutableTuple.cs (1)
1827
get { return
_item68
; }


Core52 Documentation
Overview
Features
Change Log
License
Essentials
Setup
Controllers
Models
Views
Objects
Helpers
Errors
Autoloading
Constants
Database Access
Connections
Building Queries
Fetching Query Results
Shortcuts
Caching
Forms
Validation Rules
Advanced Form Processing
Client-Side Validation
Web Services
E-Commerce
CLI Processing
Patterns
Core52 Libraries
Helpers
Third-Party Libraries
Hacking Core52
Security


Class: ActiveRecord::ConnectionAdapters::AbstractAdapter
| Relationships & Source Files | |
| Namespace Children | |
|
Classes:
| |
| Extension / Inclusion / Inheritance Descendants | |
|
Subclasses:
|
|
| Super Chains via Extension / Inclusion / Inheritance | |
|
Class Chain:
|
|
|
Instance Chain:
self,
ColumnDumper,
MonitorMixin,
::ActiveSupport::Callbacks,
::ActiveRecord::QueryCache,
DatabaseLimits,
Quoting,
DatabaseStatements,
SchemaStatements
|
|
| Inherits: | Object |
| Defined in: | activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, activerecord/lib/active_record/connection_adapters/abstract/schema_creation.rb |
Overview
Active Record supports multiple database systems.
AbstractAdapter
and related classes form the abstraction layer
which makes this possible. An AbstractAdapter represents a connection to a
database, and provides an abstract interface for database-specific
functionality such as establishing a connection, escaping values, building
the right SQL fragments for ':offset' and ':limit' options,
etc.
All the concrete database adapters follow the interface laid down in this
class. ActiveRecord::Base.connection
returns an
AbstractAdapter
object, which you can use.
Most of the methods in the adapter are useful during migrations. Most notably, the instance methods provided by SchemaStatement are very useful.
Constant Summary
-
ADAPTER_NAME =
# File 'activerecord/lib/active_record/connection_adapters/abstract_adapter.rb', line 67'Abstract'.freeze
-
SIMPLE_INT =
# File 'activerecord/lib/active_record/connection_adapters/abstract_adapter.rb', line 75/\A\d+\z/
::ActiveSupport::Callbacks - Included
Class Method Summary
::ActiveSupport::DescendantsTracker - Included
::ActiveSupport::Callbacks::ClassMethods - Extended
| define_callbacks | Define sets of events in the object life cycle that support callbacks. |
| reset_callbacks | Remove all set callbacks for the given event. |
| set_callback | Install a callback for the given event. |
| skip_callback | Skip a previously set callback. |
| get_callbacks, set_callbacks |
::ActiveRecord::QueryCache::ClassMethods - Extended
Instance Attribute Summary
- #pool rw
- #schema_cache rw
- #schema_cache=(cache) rw
- #visitor rw
-
#active? ⇒ Boolean
readonly
Checks whether the connection to the database is still active.
-
#in_use?
readonly
Alias for #owner.
- #logger readonly
- #owner (also: #in_use?) readonly
- #prepared_statements readonly
-
#requires_reloading? ⇒ Boolean
readonly
Returns true if its required to reload the connection between requests for development mode.
- #supports_bulk_alter? ⇒ Boolean readonly
-
#supports_ddl_transactions? ⇒ Boolean
readonly
Does this adapter support DDL rollbacks in transactions? That is, would CREATE TABLE or ALTER TABLE get rolled back by a transaction?
-
#supports_explain? ⇒ Boolean
readonly
Does this adapter support explain?
-
#supports_extensions? ⇒ Boolean
readonly
Does this adapter support database extensions?
-
#supports_foreign_keys? ⇒ Boolean
readonly
Does this adapter support creating foreign key constraints?
-
#supports_index_sort_order? ⇒ Boolean
readonly
Does this adapter support index sort order?
-
#supports_indexes_in_create? ⇒ Boolean
readonly
Does this adapter support creating indexes in the same statement as creating the table?
-
#supports_migrations? ⇒ Boolean
readonly
Does this adapter support migrations?
-
#supports_partial_index? ⇒ Boolean
readonly
Does this adapter support partial indices?
-
#supports_primary_key? ⇒ Boolean
readonly
Can this adapter determine the primary key for tables not attached to an Active Record class, such as join tables?
-
#supports_savepoints? ⇒ Boolean
readonly
Does this adapter support savepoints?
-
#supports_transaction_isolation? ⇒ Boolean
readonly
Does this adapter support setting the isolation level for a transaction?
-
#supports_views? ⇒ Boolean
readonly
Does this adapter support views?
DatabaseStatements - Included
| #begin_transaction, #commit_transaction, #current_transaction, #open_transactions, #rollback_transaction, | |
| #supports_statement_cache? | Returns |
| #transaction_open?, #within_new_transaction |
Instance Method Summary
-
#adapter_name
Returns the human-readable name of the adapter.
- #case_insensitive_comparison(table, attribute, column, value)
- #case_sensitive_comparison(table, attribute, column, value)
- #case_sensitive_modifier(node, table_attribute)
-
#clear_cache!
Clear any caching the database adapter may be doing, for example clearing the prepared statement cache.
-
#close
Check the connection back in to the connection pool.
- #collector
- #create_savepoint(name = nil)
- #current_savepoint_name
-
#disable_extension(name)
This is meant to be implemented by the adapters that support extensions.
-
#disable_referential_integrity
Override to turn off referential integrity while executing
&block
. -
#disconnect!
Disconnects from the database if already connected.
-
#enable_extension(name)
This is meant to be implemented by the adapters that support extensions.
- #expire
-
#extensions
A list of extensions, to be filled in by adapters that support them.
-
#index_algorithms
A list of index algorithms, to be filled by adapters that support them.
- #lease
- #new_column(name, default, cast_type, sql_type = nil, null = true)
-
#prefetch_primary_key?(table_name = nil) ⇒ Boolean
Should primary key values be selected from their corresponding sequence before the insert statement? If true, next_sequence_value is called before each insert to set the record's primary key.
-
#raw_connection
Provides access to the underlying database driver for this adapter.
-
#reconnect!
Disconnects from the database if already connected, and establishes a new connection with the database.
- #release_savepoint(name = nil)
-
#reset!
Reset the state of this connection, directing the DBMS to clear transactions and other connection-related server-side state.
- #rollback_to_savepoint(name = nil)
- #schema_creation
-
#substitute_at(column, _unused = 0)
Returns a bind substitution value given a bind
column
NOTE: The column param is currently being used by the sqlserver-adapter. - #unprepared_statement
- #valid_type?(type) ⇒ Boolean
-
#verify!(*ignored)
Checks whether the connection to the database is still active (i.e. not stale).
- #log(sql, name = "SQL", binds = [], statement_name = nil) protected
- #translate_exception(exception, message) protected
- #translate_exception_class(e, sql) protected
- #without_prepared_statement?(binds) ⇒ Boolean protected
ColumnDumper - Included
| #column_spec, | |
| #migration_keys | Lists the valid migration options. |
| #prepare_column_options | This can be overridden on a Adapter level basis to support other extended datatypes (Example: Adding an array option in the PostgreSQLAdapter). |
::ActiveSupport::Callbacks - Included
| #run_callbacks | Runs the callbacks for the given event. |
::ActiveRecord::QueryCache - Included
DatabaseLimits - Included
| #allowed_index_name_length | Returns the maximum allowed length for an index name. |
| #column_name_length | Returns the maximum length of a column name. |
| #columns_per_multicolumn_index | Returns the maximum number of columns in a multicolumn index. |
| #columns_per_table | Returns the maximum number of columns per table. |
| #in_clause_length | Returns the maximum number of elements in an IN (x,y,z) clause. |
| #index_name_length | Returns the maximum length of an index name. |
| #indexes_per_table | Returns the maximum number of indexes per table. |
| #joins_per_query | Returns maximum number of joins in a single query. |
| #sql_query_length | Returns the maximum length of an SQL query. |
| #table_alias_length | Returns the maximum length of a table alias. |
| #table_name_length | Returns the maximum length of a table name. |
Quoting - Included
| #quote | Quotes the column value to help prevent SQL injection attacks. |
| #quote_column_name | Quotes the column name. |
| #quote_string | Quotes a string, escaping any ' (single quote) and \ (backslash) characters. |
| #quote_table_name | Quotes the table name. |
| #quote_table_name_for_assignment | Override to return the quoted table name for assignment. |
| #quoted_date, #quoted_false, #quoted_true, | |
| #type_cast | Cast a |
| #unquoted_false, #unquoted_true |
DatabaseStatements - Included
| #add_transaction_record | Register a record with the current transaction so that its after_commit and after_rollback callbacks can be called. |
| #begin_db_transaction | Begins the transaction (and turns off auto-committing). |
| #begin_isolated_db_transaction | Begins the transaction with the isolation level set. |
| #commit_db_transaction | Commits the transaction (and turns on auto-committing). |
| #default_sequence_name, | |
| #delete | Executes the delete statement and returns the number of rows affected. |
| #empty_insert_statement_value, | |
| #exec_delete | Executes delete |
| #exec_insert | Executes insert |
| #exec_query | Executes |
| #exec_update | Executes update |
| #execute | Executes the SQL statement in the context of this connection. |
| #initialize, | |
| #insert | Returns the last auto-generated ID from the affected table. |
| #insert_fixture | Inserts the given fixture into the table. |
| #reset_sequence! | Set the sequence to the max value of the table's column. |
| #rollback_db_transaction | Rolls back the transaction (and turns on auto-committing). |
| #sanitize_limit | Sanitizes the given LIMIT parameter in order to prevent SQL injection. |
| #select_all | Returns an ::ActiveRecord::Result instance. |
| #select_one | Returns a record hash with the column names as keys and column values as values. |
| #select_rows | Returns an array of arrays containing the field values. |
| #select_value | Returns a single value from a record. |
| #select_values | Returns an array of the values of the first column in a select: |
| #to_sql | Converts an arel AST to SQL. |
| #transaction | Runs the given block in a database transaction, and returns the result of the block. |
| #transaction_isolation_levels, | |
| #truncate | Executes the truncate statement. |
| #update | Executes the update statement and returns the number of rows affected. |
| #binds_from_relation, | |
| #delete_sql | Executes the delete statement and returns the number of rows affected. |
| #insert_sql | Returns the last auto-generated ID from the affected table. |
| #last_inserted_id, | |
| #select | Returns an ::ActiveRecord::Result instance. |
| #sql_for_insert, | |
| #subquery_for | Returns a subquery for the given key using the join information. |
| #update_sql | Executes the update statement and returns the number of rows affected. |
SchemaStatements - Included
| #add_belongs_to | Alias for SchemaStatements#add_reference. |
| #add_column | Adds a new column to the named table. |
| #add_foreign_key | Adds a new foreign key. |
| #add_index | Adds a new index to the table. |
| #add_reference | Adds a reference. |
| #add_timestamps | Adds timestamps ( |
| #assume_migrated_upto_version, | |
| #change_column | Changes the column's definition according to the new options. |
| #change_column_default | Sets a new default value for a column: |
| #change_column_null | Sets or removes a NOT NULL constraint on a column. |
| #change_table | A block for changing columns in |
| #column_exists? | Checks to see if a column exists in a given table. |
| #columns | Returns an array of Column objects for
the table specified by |
| #create_join_table | Creates a new join table with the name created using the lexical order of the first two arguments. |
| #create_table | Creates a new table with the name |
| #drop_join_table | Drops the join table specified by the given arguments. |
| #drop_table | Drops a table from the database. |
| #foreign_keys | Returns an array of foreign keys for the given table. |
| #index_exists? | Checks to see if an index exists on a table for a given index definition. |
| #index_name_exists? | Verifies the existence of an index with a given name. |
| #initialize_schema_migrations_table | Should not be called normally, but this operation is non-destructive. |
| #native_database_types | Returns a hash of mappings from the abstract data types to the native database types. |
| #remove_belongs_to | Alias for SchemaStatements#remove_reference. |
| #remove_column | Removes the column from the table definition. |
| #remove_columns | Removes the given columns from the table definition. |
| #remove_foreign_key | Removes the given foreign key from the table. |
| #remove_index | Removes the given index from the table. |
| #remove_reference | Removes the reference(s). |
| #remove_timestamps | Removes the timestamp columns ( |
| #rename_column | Renames a column. |
| #rename_index | Renames an index. |
| #rename_table | Renames a table. |
| #table_alias_for | Truncates a table alias according to the limits of the current adapter. |
| #table_exists? | Checks to see if the table |
| #add_index_sort_order, #index_name_for_remove, #options_include_default?, | |
| #quoted_columns_for_index | Overridden by the MySQL adapter for supporting index lengths. |
| #rename_column_indexes, #rename_table_indexes |
Constructor Details
This class inherits a constructor from ActiveRecord::QueryCache
Class Method Details
.type_cast_config_to_boolean(config)
[ GitHub ]91 92 93 94 95 96 97
# File 'activerecord/lib/active_record/connection_adapters/abstract_adapter.rb', line 91
def self.type_cast_config_to_boolean(config) if config == "false" false else config end end
.type_cast_config_to_integer(config)
[ GitHub ]83 84 85 86 87 88 89
# File 'activerecord/lib/active_record/connection_adapters/abstract_adapter.rb', line 83
def self.type_cast_config_to_integer(config) if config =~ SIMPLE_INT config.to_i else config end end
Instance Attribute Details
#active? ⇒ Boolean
(readonly)
Checks whether the connection to the database is still active. This includes checking whether the database is actually capable of responding, i.e. whether the connection isn't stale.
284 285
# File 'activerecord/lib/active_record/connection_adapters/abstract_adapter.rb', line 284
def active? end
#in_use? (readonly)
Alias for #owner.
81
# File 'activerecord/lib/active_record/connection_adapters/abstract_adapter.rb', line 81
alias :in_use? :owner
#logger (readonly)
[ GitHub ]80
# File 'activerecord/lib/active_record/connection_adapters/abstract_adapter.rb', line 80
attr_reader :schema_cache, :owner, :logger
#owner (readonly) Also known as: #in_use?
[ GitHub ]80
# File 'activerecord/lib/active_record/connection_adapters/abstract_adapter.rb', line 80
attr_reader :schema_cache, :owner, :logger
#pool (rw)
[ GitHub ]79
# File 'activerecord/lib/active_record/connection_adapters/abstract_adapter.rb', line 79
attr_accessor :visitor, :pool
#prepared_statements (readonly)
[ GitHub ]99
# File 'activerecord/lib/active_record/connection_adapters/abstract_adapter.rb', line 99
attr_reader :prepared_statements
#requires_reloading? ⇒ Boolean
(readonly)
Returns true if its required to reload the connection between requests for development mode.
320 321 322
# File 'activerecord/lib/active_record/connection_adapters/abstract_adapter.rb', line 320
def requires_reloading? false end
#schema_cache (rw)
[ GitHub ]80
# File 'activerecord/lib/active_record/connection_adapters/abstract_adapter.rb', line 80
attr_reader :schema_cache, :owner, :logger
#schema_cache=(cache) (rw)
[ GitHub ]150 151 152 153
# File 'activerecord/lib/active_record/connection_adapters/abstract_adapter.rb', line 150
def schema_cache=(cache) cache.connection = self @schema_cache = cache end
#supports_bulk_alter? ⇒ Boolean
(readonly)
[ GitHub ]
189 190 191
# File 'activerecord/lib/active_record/connection_adapters/abstract_adapter.rb', line 189
def supports_bulk_alter? false end
#supports_ddl_transactions? ⇒ Boolean
(readonly)
Does this adapter support DDL rollbacks in transactions? That is, would CREATE TABLE or ALTER TABLE get rolled back by a transaction?
185 186 187
# File 'activerecord/lib/active_record/connection_adapters/abstract_adapter.rb', line 185
def supports_ddl_transactions? false end
#supports_explain? ⇒ Boolean
(readonly)
Does this adapter support explain?
216 217 218
# File 'activerecord/lib/active_record/connection_adapters/abstract_adapter.rb', line 216
def supports_explain? false end
#supports_extensions? ⇒ Boolean
(readonly)
Does this adapter support database extensions?
226 227 228
# File 'activerecord/lib/active_record/connection_adapters/abstract_adapter.rb', line 226
def supports_extensions? false end
#supports_foreign_keys? ⇒ Boolean
(readonly)
Does this adapter support creating foreign key constraints?
237 238 239
# File 'activerecord/lib/active_record/connection_adapters/abstract_adapter.rb', line 237
def supports_foreign_keys? false end
#supports_index_sort_order? ⇒ Boolean
(readonly)
Does this adapter support index sort order?
206 207 208
# File 'activerecord/lib/active_record/connection_adapters/abstract_adapter.rb', line 206
def supports_index_sort_order? false end
#supports_indexes_in_create? ⇒ Boolean
(readonly)
Does this adapter support creating indexes in the same statement as creating the table?
232 233 234
# File 'activerecord/lib/active_record/connection_adapters/abstract_adapter.rb', line 232
def supports_indexes_in_create? false end
#supports_migrations? ⇒ Boolean
(readonly)
Does this adapter support migrations?
173 174 175
# File 'activerecord/lib/active_record/connection_adapters/abstract_adapter.rb', line 173
def supports_migrations? false end
#supports_partial_index? ⇒ Boolean
(readonly)
Does this adapter support partial indices?
211 212 213
# File 'activerecord/lib/active_record/connection_adapters/abstract_adapter.rb', line 211
def supports_partial_index? false end
#supports_primary_key? ⇒ Boolean
(readonly)
Can this adapter determine the primary key for tables not attached to an Active Record class, such as join tables?
179 180 181
# File 'activerecord/lib/active_record/connection_adapters/abstract_adapter.rb', line 179
def supports_primary_key? false end
#supports_savepoints? ⇒ Boolean
(readonly)
Does this adapter support savepoints?
194 195 196
# File 'activerecord/lib/active_record/connection_adapters/abstract_adapter.rb', line 194
def supports_savepoints? false end
#supports_transaction_isolation? ⇒ Boolean
(readonly)
Does this adapter support setting the isolation level for a transaction?
221 222 223
# File 'activerecord/lib/active_record/connection_adapters/abstract_adapter.rb', line 221
def supports_transaction_isolation? false end
#supports_views? ⇒ Boolean
(readonly)
Does this adapter support views?
242 243 244
# File 'activerecord/lib/active_record/connection_adapters/abstract_adapter.rb', line 242
def supports_views? false end
#visitor (rw)
[ GitHub ]79
# File 'activerecord/lib/active_record/connection_adapters/abstract_adapter.rb', line 79
attr_accessor :visitor, :pool
Instance Method Details
#adapter_name
Returns the human-readable name of the adapter. Use mixed case - one can always use downcase if needed.
168 169 170
# File 'activerecord/lib/active_record/connection_adapters/abstract_adapter.rb', line 168
def adapter_name self.class::ADAPTER_NAME end
#case_insensitive_comparison(table, attribute, column, value)
[ GitHub ]360 361 362
# File 'activerecord/lib/active_record/connection_adapters/abstract_adapter.rb', line 360
def case_insensitive_comparison(table, attribute, column, value) table[attribute].lower.eq(table.lower(value)) end
#case_sensitive_comparison(table, attribute, column, value)
[ GitHub ]354 355 356 357 358
# File 'activerecord/lib/active_record/connection_adapters/abstract_adapter.rb', line 354
def case_sensitive_comparison(table, attribute, column, value) table_attr = table[attribute] value = case_sensitive_modifier(value, table_attr) unless value.nil? table_attr.eq(value) end
#case_sensitive_modifier(node, table_attribute)
[ GitHub ]350 351 352
# File 'activerecord/lib/active_record/connection_adapters/abstract_adapter.rb', line 350
def case_sensitive_modifier(node, table_attribute) node end
#clear_cache!
Clear any caching the database adapter may be doing, for example clearing the prepared statement cache. This is database specific.
315 316 317
# File 'activerecord/lib/active_record/connection_adapters/abstract_adapter.rb', line 315
def clear_cache! # this should be overridden by concrete adapters end
#close
Check the connection back in to the connection pool
369 370 371
# File 'activerecord/lib/active_record/connection_adapters/abstract_adapter.rb', line 369
def close pool.checkin self end
#collector
[ GitHub ]126 127 128 129 130 131 132
# File 'activerecord/lib/active_record/connection_adapters/abstract_adapter.rb', line 126
def collector if prepared_statements SQLString.new else BindCollector.new end end
#create_savepoint(name = nil)
[ GitHub ]341 342
# File 'activerecord/lib/active_record/connection_adapters/abstract_adapter.rb', line 341
def create_savepoint(name = nil) end
#current_savepoint_name
[ GitHub ]364 365 366
# File 'activerecord/lib/active_record/connection_adapters/abstract_adapter.rb', line 364
def current_savepoint_name current_transaction.savepoint_name end
#disable_extension(name)
This is meant to be implemented by the adapters that support extensions
247 248
# File 'activerecord/lib/active_record/connection_adapters/abstract_adapter.rb', line 247
def disable_extension(name) end
#disable_referential_integrity
Override to turn off referential integrity while executing
&block
.
275 276 277
# File 'activerecord/lib/active_record/connection_adapters/abstract_adapter.rb', line 275
def disable_referential_integrity yield end
#disconnect!
Disconnects from the database if already connected. Otherwise, this method does nothing.
297 298 299 300
# File 'activerecord/lib/active_record/connection_adapters/abstract_adapter.rb', line 297
def disconnect! clear_cache! reset_transaction end
#enable_extension(name)
This is meant to be implemented by the adapters that support extensions
251 252
# File 'activerecord/lib/active_record/connection_adapters/abstract_adapter.rb', line 251
def enable_extension(name) end
#expire
[ GitHub ]155 156 157
# File 'activerecord/lib/active_record/connection_adapters/abstract_adapter.rb', line 155
def expire @owner = nil end
#extensions
A list of extensions, to be filled in by adapters that support them.
255 256 257
# File 'activerecord/lib/active_record/connection_adapters/abstract_adapter.rb', line 255
def extensions [] end
#index_algorithms
A list of index algorithms, to be filled by adapters that support them.
260 261 262
# File 'activerecord/lib/active_record/connection_adapters/abstract_adapter.rb', line 260
def index_algorithms {} end
#lease
[ GitHub ]142 143 144 145 146 147 148
# File 'activerecord/lib/active_record/connection_adapters/abstract_adapter.rb', line 142
def lease synchronize do unless in_use? @owner = Thread.current end end end
#log(sql, name = "SQL", binds = [], statement_name = nil) (protected)
[ GitHub ]459 460 461 462 463 464 465 466 467 468 469
# File 'activerecord/lib/active_record/connection_adapters/abstract_adapter.rb', line 459
def log(sql, name = "SQL", binds = [], statement_name = nil) @instrumenter.instrument( "sql.active_record", :sql => sql, :name => name, :connection_id => object_id, :statement_name => statement_name, :binds => binds) { yield } rescue => e raise translate_exception_class(e, sql) end
#new_column(name, default, cast_type, sql_type = nil, null = true)
[ GitHub ]
#prefetch_primary_key?(table_name = nil) ⇒ Boolean
Should primary key values be selected from their corresponding sequence before the insert statement? If true, next_sequence_value is called before each insert to set the record's primary key.
201 202 203
# File 'activerecord/lib/active_record/connection_adapters/abstract_adapter.rb', line 201
def prefetch_primary_key?(table_name = nil) false end
#raw_connection
Provides access to the underlying database driver for this adapter. For example, this method returns a ::Mysql object in case of MysqlAdapter, and a PGconn object in case of PostgreSQLAdapter.
This is useful for when you need to call a proprietary method such as PostgreSQL's lo_* methods.
337 338 339
# File 'activerecord/lib/active_record/connection_adapters/abstract_adapter.rb', line 337
def raw_connection @connection end
#reconnect!
Disconnects from the database if already connected, and establishes a new connection with the database. Implementors should call super if they override the default implementation.
290 291 292 293
# File 'activerecord/lib/active_record/connection_adapters/abstract_adapter.rb', line 290
def reconnect! clear_cache! reset_transaction end
#release_savepoint(name = nil)
[ GitHub ]347 348
# File 'activerecord/lib/active_record/connection_adapters/abstract_adapter.rb', line 347
def release_savepoint(name = nil) end
#reset!
Reset the state of this connection, directing the DBMS to clear transactions and other connection-related server-side state. Usually a database-dependent operation.
The default implementation does nothing; the implementation should be overridden by concrete adapters.
308 309 310
# File 'activerecord/lib/active_record/connection_adapters/abstract_adapter.rb', line 308
def reset! # this should be overridden by concrete adapters end
#rollback_to_savepoint(name = nil)
[ GitHub ]344 345
# File 'activerecord/lib/active_record/connection_adapters/abstract_adapter.rb', line 344
def rollback_to_savepoint(name = nil) end
#schema_creation
[ GitHub ]138 139 140
# File 'activerecord/lib/active_record/connection_adapters/abstract_adapter.rb', line 138
def schema_creation SchemaCreation.new self end
#substitute_at(column, _unused = 0)
Returns a bind substitution value given a bind column
NOTE: The column
param is currently being used by the sqlserver-adapter
268 269 270
# File 'activerecord/lib/active_record/connection_adapters/abstract_adapter.rb', line 268
def substitute_at(column, _unused = 0) Arel::Nodes::BindParam.new end
#translate_exception(exception, message) (protected)
[ GitHub ]471 472 473 474
# File 'activerecord/lib/active_record/connection_adapters/abstract_adapter.rb', line 471
def translate_exception(exception, ) # override in derived class ActiveRecord::StatementInvalid.new(, exception) end
#translate_exception_class(e, sql) (protected)
[ GitHub ]451 452 453 454 455 456 457
# File 'activerecord/lib/active_record/connection_adapters/abstract_adapter.rb', line 451
def translate_exception_class(e, sql) = "#{e.class.name}: #{e.}: #{sql}" @logger.error if @logger exception = translate_exception(e, ) exception.set_backtrace e.backtrace exception end
#unprepared_statement
[ GitHub ]159 160 161 162 163 164
# File 'activerecord/lib/active_record/connection_adapters/abstract_adapter.rb', line 159
def unprepared_statement old_prepared_statements, @prepared_statements = @prepared_statements, false yield ensure @prepared_statements = old_prepared_statements end
#valid_type?(type) ⇒ Boolean
134 135 136
# File 'activerecord/lib/active_record/connection_adapters/abstract_adapter.rb', line 134
def valid_type?(type) true end
#verify!(*ignored)
Checks whether the connection to the database is still active (i.e. not stale). This is done under the hood by calling #active?. If the connection is no longer active, then this method will reconnect to the database.
327 328 329
# File 'activerecord/lib/active_record/connection_adapters/abstract_adapter.rb', line 327
def verify!(*ignored) reconnect! unless active? end
#without_prepared_statement?(binds) ⇒ Boolean
(protected)
476 477 478
# File 'activerecord/lib/active_record/connection_adapters/abstract_adapter.rb', line 476
def without_prepared_statement?(binds) !prepared_statements || binds.empty? end


Poll by @Luis Perez
I would rate my understanding of the material in the 00_fastq-files
notebook as:
| 😱 | | 0 |
| 🙁 | ████████████████ | 16 |
| 😐 | ████ | 4 |
| 🙂 | ████ | 4 |
| 😄 | | 0 |


{{ entry.title }}
{{ entry.brief_description }}
{{ created_by(entry, footer=False) }}{% from "challenges/helpers.html" import created_by with context %}
{{ entry.brief_description }}
{{ created_by(entry, footer=False) }}


smime_keys(1) User Manuals smime_keys(1) NAME smime_keys - Utility to add S/MIME certificate to the internal database used by mutt SYNOPSIS smime_keys <operation> [file(s) | keyID [file(s)]] DESCRIPTION The purpose of this tool is to manipulate the internal database of S/MIME certificates used by mutt to sign mail messages which will be sent or to verify mail messages received and signed with S/MIME OPTIONS init no files needed, inits directory structure. list lists the certificates stored in database. label keyID required. changes/removes/adds label. remove keyID required. verify 1=keyID and optionally 2=CRL Verifies the certificate chain, and optionally wether this certificate is included in supplied CRL (PEM format). Note: to verify all certificates at the same time, replace keyID with "all" add_cert certificate required. add_chain three files reqd: 1=Key, 2=certificate plus 3=intermediate cer‐ tificate(s). add_p12 one file reqd. Adds keypair to database. file is PKCS12 (e.g. export from netscape). add_pem one file reqd. Adds keypair to database. (file was converted from e.g. PKCS12). add_root one file reqd. Adds PEM root certificate to the location specified within muttrc (smime_verify_* command) NO WARRANTIES This program is distributed in the hope that it will be useful, but WITH‐ OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. Mutt Home Page: http://www.mutt.org/ Unix May 2009 smime_keys(1)


Edmund puts Britain on cusp of Davis Cup final
Madrid - Kyle Edmund beat Feliciano Lopez in straight sets on Saturday to give Britain a 1-0 lead in their Davis Cup semi-final against hosts Spain.
The world number 69 claimed a hard-fought 6-3, 7-6 (7/3) win over veteran Lopez, who stepped in as a last-minute replacement for Pablo Carreno Busta.
The winners will face Canada in Sunday's final after the North Americans edged out Russia in the first last-four tie.
The 38-year-old Lopez was broken in just the second game of the match as Edmund took the opening set, before seeing two set points come and go in the second.
Edmund clinched his third straight singles victory of the week on his third match point.
Spain need world number one Rafael Nadal to get past Dan Evans in the second singles clash to set up a deciding doubles rubber between Jamie Murray and Neal Skupski and Marcel Granollers and Lopez.


Facebook introduces new company brand 'designed for clarity, inspired by people'
by WABCMENLO PARK, Calif. -- Facebook has introduced its new company brand.
The Menlo Park-based social networking giant says the new branding is clearer about the products that come from Facebook.
Facebook says in the coming weeks, users will start seeing a company endorsement to products like Messenger, WhatsApp, and Instagram.
After the rollout, you'll see "from Facebook" on the bottom of each of its product's apps with the same color as each of those apps.
The company says the new branding was "designed for clarity, inspired by people."
See more stories and videos about Facebook here.


Toggle navigation
CDS
Diagnostics
Autonamous Diagnostics (network)
Manual Diagnostics (Cache)
Manuals
User
Profile
Logout
Was our diagnosis incorrect? We want to know!
Engine
ESN
Mileage
Diagnosed Fault Code
Resolved Fault Code
P3437
P0091
P2516
Submit


This app provides an integration between MATLAB and Team Foundation Server (TFS).
To use this app, you must perform the following configuration steps.
Run the following command at the command prompt:
>> installTFS
You will be prompted for your default TFS URL. The URL must include the
project collection (ex: http://MyTfsServer:8080/tfs/DefaultCollection).
You will also be asked whether you're using an on-premise TFS server with
Windows auth. If you are, then MATLAB will connect to TFS automatically.
Otherwise, you will be prompted for login credentials. Note: If you
are using Visual Studio Online (VSO), then basic username/password
authentication will not work if multi-factor authentication is configured
on the server. Follow
these instructions to create a Personal Access Token (PAT), and enter this
PAT in the dialog box instead of your password.
Restart MATLAB after running the configuration script installTFS
.
When you navigate to a TFS Workspace directory, MATLAB will automatically detect that it is a TFS Workspace and display TFS status icons. Note that it may take a few seconds for the status icons to appear while MATLAB connects to TFS for the first time. You can also select a file, right click, and look under the "Source Control" menu to find various source control operations that can be performed.
Note: some newer format TFS workspaces might not be correctly detected. You can work around this issue by creating a workspace using the MATLAB integration. The next section of the document describes how to do this.
If you want to change the TFS project collection you're connected to, you can right click inside MATLAB's "Current Folder" tool and select the context menu "Source Control -> Connect to TFS."
If you want to change your default TFS project collection URL,
run the storeTfsSettings.m MATLAB function and restart MATLAB.
>> storeTfsSettings
In MATLAB's Current Folder browser navigate to the folder where you want to create the workspace.
Right click in the Current Folder browser and select the context menu "Source Control"->"Manage Files".
Select Team Foundation Server in the Source control integration dropdown.
For the repository path, enter the source location on the TFS Server (ex: $/MyProject/Src/Main).
Enter the local directory where you'd like to download the files.
Click the Retrieve button.
Navigate to the app directory and run the following command: uninstallTFS This will remove all configuration information stored with the app.
Restart MATLAB.
Now uninstall the app: In the MATLAB APPS toolbar, select the TFS Integration App right click and select "Uninstall".
The TFS Java SDK uses an older version of the TFS APIs than Visual Studio. Workspaces you create with the Java SDK are usable in Visual Studio, but Workspaces created in Visual Studio have inconsistent behavior with the SDK. For the best experience, you should create a new Workspace using MATLAB.


Howdy!
I was going through old files and I found this video of my senior design project (from 2007). My team created a PC puzzle game using the (brand-new) Wii Remotes as controllers. While I focused on project management and programming the interface with the Wii controller, one of my teammates worked out most of the game design and effects (and quickly went off to the Xbox Live team at Microsoft).
Isn't nostalgia fun?


Fits the space-time Epidemic Type Aftershock Sequence ('ETAS') model to earthquake catalogs using a stochastic 'declustering' approach. The 'ETAS' model is a 'spatio-temporal' marked point process model and a special case of the 'Hawkes' process. The package is based on a Fortran program by 'Jiancang Zhuang' (available at <http://bemlar.ism.ac.jp/zhuang/software.html>), which is modified and translated into C++ and C such that it can be called from R. Parallel computing with 'OpenMP' is possible on supported platforms.
| Version: | 0.4.5 |
| Depends: | R (≥ 3.3.0), stats, graphics, utils, maps |
| Imports: | lattice, goftest, spatstat, Rcpp, fields |
| LinkingTo: | Rcpp (≥ 1.0.0) |
| Published: | 2018-11-28 |
| Author: | Abdollah Jalilian [aut, cre], Jiancang Zhuang [ctb] |
| Maintainer: | Abdollah Jalilian <jalilian at razi.ac.ir> |
| License: | GPL-2 | GPL-3 [expanded from: GPL (≥ 2)] |
| URL: | https://github.com/jalilian/ETAS |
| NeedsCompilation: | yes |
| Materials: | README |
| CRAN checks: | ETAS results |
| Reference manual: | ETAS.pdf |
| Package source: | ETAS_0.4.5.tar.gz |
| Windows binaries: | r-devel: ETAS_0.4.5.zip, r-release: ETAS_0.4.5.zip, r-oldrel: ETAS_0.4.5.zip |
| OS X binaries: | r-release: ETAS_0.4.5.tgz, r-oldrel: ETAS_0.4.5.tgz |
| Old sources: | ETAS archive |
Please use the canonical form https://CRAN.R-project.org/package=ETAS to link to this page.


 I was just listening to JK Rowling's "A Casual Vacancy" on audiobook in which some teenagers inadvertently learn about SQL injections at school from a computer teacher's slip of the tongue. Several of them later decide to expose the brutal hypocrisy of their parents by hacking their small town parish council website and baring family secrets to the world.
Naturally, when I returned home from my roadtrip to catch up on my work I saw that we would be diving in to SQL this week, and that injections was one of the tech blog topics, I was amused.
As the above fictional example shows, SQL injections are a common way for hackers to exploit a databases weaknesses if its not set up properly. They are common for two reasons:
In the book, the teens use SQL statements in the login screen to retrieve the username and password of a recently deceased council member. Once the login information was secured, they had admin access to post under someone elses name on the site.
Of course, SQL injections can be far more harmful than damaging the pride of local citizens. They can be used to alter or even drop large swaths of data in a database. For more sensitive information, say medical records, bank records, or online payment forms, this could be a big problem.Imagine all the forms online that ask for a credit card number of a social security number. A hacker could wreak serious harm with either of these pieces of information.
In more technical terms, SQL injection refers to an attempt by a user pass SQL statements directly to an online form. These statements then have the potential to alter the SQL query that has access to the database. Think of all the ways in which web browsers and websites allow user input to query a database. Without proper protection all it takes is some guesswork as to the appropriate table and column names and the right line of code.
One of the most common hacks looks like this. Let's say a form asks for a username. If the user passes a userid "1012 or 1=1" the SQL query might look something like this: SELECT * FROM users WHERE userid = 1012 or 1=1. Since 1 does in fact equal 1 and we are looking at a boolean operator, this would return true even if there was no userid 1012.
Fortunately there are ways to prevent these simple hacks.
Coming Soon!


Waffle Cats
Waffle cats
are the best cats.
Notice how glorious and regal they look.
Reasons why waffle cats are the best:
The yumminess
The frozen stares
The lack of poptarts (we're looking at you, Nyan cat!)
Waffle Cats
"The Rolls Royce of cats"


Slacklink Options
Saved!
Your settings have been saved.
Error!
Please complete all required fields
Webhook
Default Channel/User
(Your link will be posted here unless overwritten)
Post name
(not linked to your actual Slack username)
Emoji
Show channel override
(adds ability to override default channel when you post)
Yes
No


Important note: this program is doing what it promises but the programming itself is of very poor quality and for demonstration purposes only. Never ever use this program as source for your own programs because there are a lot of conversions to get it run.
Get more information about this program on
my webpage ChaCha20-Poly105 authenticated string encryption
For encryption you need your encryption key in Base64 encoding.
Insert your encryption key (in Base64 encoding):
or
Insert the string you like to encrypt:
press the encrypt button to proceed:
encrypted (ciphertext) in Base64 encoding:
The output is (Base64) nonce : (Base64) ciphertext
For decryption you need encryption key in Base64 encoding.
Insert your encryption key (in Base64 encoding):
Insert the ciphertext you like to decrypt or press the "sample data" button:
The input is (Base64) nonce : (Base64) ciphertext
press the decrypt button to proceed:
decrypted plaintext:
Technical note: this program uses the ChaCha20 cipher for encryption and Poly1305 MAC for authenticated encryption.


1962
is a sculpture
which is versionned
partly tautological
it posseses its own documentation
1962's source code is hosted online on GitHub
a tool called Revision Control System mainly used to allow a collaborative work on open source projects
the source code describes a precise but human way, position and nature of each object forming the sculpture
is an archive
of versions
of the sculpture's photographical representations
of discussions about its alteration
possesses by its own capture hardware
is located where I live
where it was inaugurated on the may 18th 2012 for First Commit, its vernissage
is a tribute to Card File (1962) by Robert Morris
-dont- an archive of personal photographs is available in the 1962/media/extra directory
is forkable: we can create clones or independant branches owning to new contexts
is free and open source
under MIT license as a computer program can be
is potentially a corpus of sculptures
linked by parenthood
is constituted by a site web
synchronized with the GitHub repository
hence with the physical sculpture
possesses precise instructions for its development
those instructions also are evolutive
new "key : value" pairs should be introduced if they are used in the documentation
References
Revision Control System
Card File, Robert Morris, 1962
Screenshot of the 1962's GitHub repository


Sorting Algos
Binary Search
Binary search compares the target value to the middle element of the array. If they are not equal, the half in which the target cannot lie is eliminated and the search continues on the remaining half, again taking the middle element to compare to the target value, and repeating this until the target value is found. If the search ends with the remaining half being empty, the target is not in the array. ### Steps 1. Compare x with the middle element. If x matches with middle element, we return the mid index. 2. Else If x is greater than the mid element, then x can only lie in right half subarray after the mid element. So we recur for right half. 3. Else (x is smaller) recur for the left half. ### Time Complexity >>> O(n)
Selection Sort
The algorithm can be summarized as the following:
- Set MIN to location 0
- Search the minimum element in the list
- Swap with value at location MIN
- Increment MIN to point to next element
- Repeat until list is sorted
Time Complexity >>> O(n^2)
Insertion Sort
- If it is the first element, it is already sorted. return 1;
- Pick next element
- Compare with all elements in the sorted sub-list
- Shift all the elements in the sorted sub-list that is greater than the value to be sorted
- Insert the value
- Repeat until list is sorted
Time Complexity >>> O(n^2)
Merge Sort
- if there is only one element in the list, it is already sorted. return that array.
- otherwise, divide the list recursively into two halves until it can no more be divided.
- merge the smaller lists into new list in sorted order.
Time Complexity >>> O(n log(n))
Bubble Sort
Bubble Sort is the simplest sorting algorithm that works by repeatedly swapping the adjacent elements if they are in wrong order.
runs 0(n^2)
Quick Sort
- choose an element called “the pivot”, how that’s done is up to the implementation
- take two variables to point left and right of the list excluding pivot
- left points to the low index
- right points to the high
- while value at left is less than pivot move right
- while value at right is greater than pivot move left
- if both step 5 and step 6 does not match swap left and right 8.if left ≥ right, the point where they met is new pivot repeat, recursively calling this for smaller and smaller arrays
runs 0(n^2)


--- layout: post date: 2010-05-09 time: "09:00:00" authors: ["Greg Wilson"] title: Microsoft tags: ["Microsoft"] ---
We are very pleased to announce that Microsoft Corporation has come on board as a sponsor of this project. Many thank to David Rich for making this happen!


Data Representation
TOC
Data Representation
Units
- bit, byte, kilobytes, megabytes, gigabytes, terabytes, petabytes
- 1000 base, MB
- 1024 base, MiB
- b vs B
Numerical
Encoding
- Excess 3
- BCD
- Exercise: base 10, 9’s complement vs 10’s complement
Integers(fixed point)
- 2’s complement: mainly used
- 1’s complement: postive & negative 0
- Sign and magnitude
- Gray code
- Benefit: filp 1 bit at a time, has a good pattern
Floating point
- Sign and magnitude
- Float(32bits, 1 + 8 + 23), excess-127
- Double(64bits, 1 + 11 + 48)
Overflow & Underflow
Conversion
- 10110.0011~(2)~
- 1101~(2)~
- unsigned
- signed
- float: 1 01111111 00000 00000 00000 00000 001 = -(1+2^-23^)
Text
Audio
- Sampling
- Sample rate(e.g. 44100Hz)
- Duration(e.g. 3s)
- Quantization
- Bit per sample(bit depth, e.g. 24 bit)
- Encoding
- Lossy: mp3, ape…
- Lossless: wav, flac…
- Bit rate = sample rate * bit depth (e.g. 1033kbps)
Images
- Raster(bitmap) graphics: bmp, jpeg, gif…
- Vector graphics: svg…
- Resolution
- Color depth
- True color: 24 bits, 3 channels
- Indexed color: a subset color of true color
Videos
- Mpeg4, avi, mkv…
Questions
- Convert the 1010.01011~(2)~ to decimal and octal.
- Convert the 734.2371~(8)~ to decimal and binary.
- Convert the 31.96~(10)~ to octal and binary.
- Represent 31.96~(10)~ with single precision floating point.
- When will overflow and underflow happen?
- Give 1 example of overflowing and 1 example of underflowing.
- If a piece of audio has 500 bytes, duration of 5s, bit depth is 10bit. What’s its bit rate and sampling rate?
- How do resolution and color depth affect an image?


Turn the text 'checkin | save | discard | accept | decline' into clickable buttons with a small tooltip text


Choroplether allows the quick creation of choropleth maps in Vega-Lite using your own data. A demonstration showing the ONS Census 2021 population estimates for local authorities in Greater Manchester has been automatically generated. The documentation provides further details on using the app, however please note that Choroplether requires a modern browser - it will not work in Internet Explorer.


All organizers, attendees, speakers, sponsors and volunteers at Hacktoberfest community events are required to agree to uphold the following code of conduct. Hacktoberfest community event organizers and/or DigitalOcean staff will enforce this code throughout the event. We are expecting cooperation from all participants to help ensure a safe environment.
Hacktoberfest is dedicated to providing a harassment-free event experience for everyone, regardless of gender, gender identity and expression, age, sexual orientation, disability, physical appearance, body size, race, ethnicity, religion (or lack thereof), or technology choices. We do not tolerate harassment of event participants in any form. Sexual language and imagery is not appropriate for any event venue, including talks, workshops, parties, Twitter and other online media. Event participants violating these rules may be sanctioned or expelled from the event without a refund at the discretion of the event organizers or DigitalOcean employees.

Participants asked to stop any harassing behavior are expected to comply immediately.
Sponsors are also subject to the anti-harassment policy. In particular, sponsors should not use sexualized images, activities, or other material. Sponsor staff (including volunteers) should not use sexualised clothing/uniforms/costumes, or otherwise create a sexualized environment.
If a participant engages in harassing behavior, the event organizers or DigitalOcean staff may take any action they deem appropriate, including warning the offender or expulsion from the event with no refund.
If you are being harassed, notice that someone else is being harassed, or have any other concerns, please contact a member of the organizing team immediately. If you have concerns about a member of the organizing team, please email<EMAIL_ADDRESS>Event staff will be happy to help participants contact venue security or local law enforcement, provide escorts, or otherwise assist those experiencing harassment to feel safe for the duration of the event. We value your attendance. We expect participants to follow these rules at all Hacktoberfest related event venues.
Original source and credit: http://2012.jsconf.us/#/about & The Ada Initiative


Web Directions
Melbourne 2012
Overview
Lessons learned
Honorable mentions
Thoughts
Cross Browser Testing
BrowserStack
Web based Cross Browser Testing
Huge Browser/OS range
API (node-browserstack)
Not free
Cross Browser Testing
Bunyip
Yeti + BrowserStack
Still in dev
Serious unit testing
Javascript performance
Google Chrome (made me switch)
Network tab
Get the HTML and reach DOM Ready ASAP
Split resources accross domains
Delay image loading
Cache items that are not gonna change
Minify
Heap Profiler
Memory allocation
Unused variables
Garbage
Overkills (closures)
Prototyping
Technical headstart from UX/Design
Dinamic pages and UI complexity deviate from static representations
Lorem ipsum can't beat real data
HTML PreProcessors: Jade, Haml
Defaults: (
HTML5 Boilerplate
,
Twitter Bootstrap
)
Style PreProcessors: LESS, SASS
EVE
Event managing JS library
Frees events from objects
Decoupling, Module communication, patterns
Wildcards, namespaces, priority execution
HTML5 Games
Unified playground for all the discussed technologies
Canvas, WebGl
Audio
RequestAnimationFrame, WebWorkers, API: FullScreen, Point Lock (Exp), GamePad
Game engines
EVE
http://beercamp.com/2010/
Frees events from objects
Decoupling, Module communication, patterns
Wildcards, namespaces, priority execution


TERMS AND CONDITIONS
Restrictions
You are specifically restricted from all of the following:
- Publishing any Website material in any other media
- Selling, sublicensing and/or otherwise commercializing any Website material
- Publicly performing and/or showing any Website material
- Using this Website in any way that is or may be damaging to this Website
- Using this Website in any way that impacts user access to this Website
- Using this Website contrary to applicable laws and regulations, or in any way may cause harm to the Website, or to any person or business entity
- Engaging in any data mining, data harvesting, data extracting or any other similar activity in relation to this Website
- Using this Website to engage in any advertising or marketing
- Any user ID and password you may have for this Website are confidential and you must maintain confidentiality as well.


Connection Speed Test
Number of times to repeat
1
10
100
1000
Tests
Type
Count
milliseconds per request
Web server loopback
EXODUS server loopback
EXODUS application loopback
Custom Command
EXODUS only
Stop on error
Last Request
Last Data Sent
Last Response
Last Data Received


Bring WiFi with you, everywhere you go.


Sal: an overview
07 Dec 2016It’s been a long time since I wrote about Sal here (nearly three years), so with the release of Sal 3.0, it’s time to take another look at it.
What is Sal?
Sal is a reporting tool for macOS clients that helps you visualise what your clients are up to. It is primarily a reporting tool for Munki, but it can also ingest data from Facter (whether you are using Puppet to manage your Macs or not).
It has the concept of business units, so if you wish to separate your clients out (for example, if you wish to give access to some machines to a sub organisation’s IT etc) you are able to do so.
That’s the 10000 feet overview, let’s take a look at some of it’s functionality in more detail.
The dashboard
The first thing you see when you log into Sal is the dashboard. This is where you can get access to a quick overview of your fleet. Each graph, chart, set of buttons is a plugin - this means that each one can be re-ordered and removed - you can even make your own if you need to (more on that another time). Most plugins are clickable - click on the relevent part to show a list of machines it is referring to - and if the plugin supports showing the list (and all of the built in ones do), you can export the list to CSV (since all managers love spreadsheets, right?).
Machine detail
The machine detail page is where you can take a closer look at one particular machine. It’s here you can get the status of each machine’s Munki installs, take a look at the machine’s Munki conditions and Facts (if you are using Facter), and see if there are any errors or warnings from Munki. Need something that’s not included? Read on to find out about plugins.
Plugins
Sal is designed to be completely customisable - if you need a specific widget on the dashboard for your organisation, you can write it without forking and having to maintain your own copy of Sal. If there is a widget included you don’t need, simply disable it through the GUI - no editing of configuration files needed.
There are three different kinds of widgets:
- Basic widgets - these are what you see on the dashboard. If you need to get a quick overview of your machines, this is the widget for you.
- Reports - these are widgets that take up the whole screen. They give you a deeper dive into one particular aspect of your machines (for example, an overview of the Munki configuration on your machines).
- Machine detail widgets - these allow you to extend the Machine detail page. For example, one of the built in machine detail widgets shows the security status of the machine.
Some of the built in widgets include:
- Operating system version
- Munki version
- Pending third party and Apple updates
- Disk space avaialble
- Uptime
- Gatekeeper, SIP and Encryption status
- More! (22 are included at the time of writing, with more added with every release)
Search
One of the most important parts of a reporting tool is getting information out of it. One of the strengths of commercial tools is their ability to build complex queries without needing to be a programmer. Sal 3.0 introduces advanced search. Sal’s search allows you to build complicated search queries on any of the data points it collects on the machines in your inventories from the GUI. And to keep your manager happy, each search can be exported to a CSV.
Saved searches
If you have searches your team performs regularly, you can choose to save your search - they are then avaialble for the rest of your team.
Application inventory
Of course, you don’t only care about the apps you’re telling Munki to install. Sal will track the complete application inventory for all of your machines. Want to know if anyone has been naught and installed Mac Keeper? We’ve got you covered.
Things for developers
In a future post, I’ll go over things that the more developer-minded people will find interesting:
- API: Sal has a full API which will allow you to integrate it with your existing apps (for example, you may be fed up with updating your asset inventory tool with the specs of each machine - let the robots do it)
- Custom plugins: Each plugin for Sal is written in Python, which allows you to do some incredibly powerful things


CallCFunctionFast()
Syntax
Result = CallCFunctionFast(*FunctionPointer [,Parameter1 [, Parameter2...]])Description
Calls a function directly, using its address. The function is expected to use the cdecl calling convention (the convention used by the C language).
Parameters
*FunctionPointer The address of the function to call.
This pointer may be found using the GetFunction(), GetFunctionEntry() or LibraryFunctionAddress() functions. The use of this function is the fastest method with which to call library functions, especially when the results of a call to: GetFunction() or LibraryFunctionAddress() have been stored. This is due to the fact that this function is not required to search for the name of the library function.Parameter1, Parameter2, ... The parameters for the function. The number of parameters must match the parameters of the called function. The maximum number of supported parameters is 20.
Return value
Returns the return-value of the called function.
Remarks
If the function is described as 'cdecl' then the use of this function is required. However, most DLLs used within the Microsoft Windows OS do not use this form, so CallFunctionFast() should be sufficient in most cases. To call a function that uses the 'stdcall' calling convention, use the CallFunctionFast() function.
Note: This function is not very flexible and does not handle string/float/double/quad parameters or string/float/double/quad returns. The use of prototypes is now strongly recommended.
See Also
GetFunction(), CallFunctionFast(), prototypes
Supported OS
All


Quaternion
Exponentiation
"Raised to a power": $q^t$
(not to be confused with exponential from last episode)
Recall:
$a^0 = 1$ & $a^1 = a$ where $a$ is a nonzero scalar
$0 ... t ... 1 \rightarrow 1 ... a^t ... a$
$0 ... t ... 1 \rightarrow [1,0] ... q^t ... q$
Gives us a fraction of an angular displacement
Beyond $0 ... 1$ range, also normal (**mostly):
$q^2$ is twice the angular displacement of $q$.
**NOTE: quaternions represent angular displacement using the shortest arc.
There are no multiple spins. If $q = 30^\circ$ clockwise, then $q^4 \neq
240^\circ$ clockwise.
Instead, it is $80^\circ$ counterclockwise. Rotating $240^\circ$ CW is the same
as rotating $80^\circ$ CCW.
Due to this fact, some things aren't trivial:
$(q^4)^{1/2} \neq q^2$
Formal definition
$q^t = exp(t\ log\ q)$