25 Analysis of Variance
Recall the National Youth Fitness Survey, which we explored a small piece of in some detail earlier in these notes. We’ll look at a different part of the same survey here - specifically the 280 children whose data are captured in the nyfs2
file.
nyfs2 <- read_csv("data/nyfs2.csv",
show_col_types = FALSE)
nyfs2
# A tibble: 280 x 21
subject.id sex age.exam race.eth english income.cat3
<dbl> <chr> <dbl> <chr> <dbl> <chr>
1 73228 Male 4 5 Other o~ 1 Low (below~
2 72393 Male 4 2 Non-His~ 1 Low (below~
3 73303 Male 3 2 Non-His~ 1 Low (below~
4 72786 Male 5 1 Non-His~ 1 Low (below~
5 73048 Male 3 2 Non-His~ 1 Low (below~
6 72556 Female 4 2 Non-His~ 1 Low (below~
7 72580 Female 5 2 Non-His~ 1 Low (below~
8 72532 Female 4 4 Other H~ 0 Low (below~
9 73012 Male 4 1 Non-His~ 1 Low (below~
10 72099 Male 6 1 Non-His~ 1 Low (below~
# ... with 270 more rows, and 15 more variables:
# income.detail <chr>, inc.to.pov <dbl>, weight.kg <dbl>,
# height.cm <dbl>, bmi <dbl>, bmi.group <dbl>,
# bmi.cat <chr>, arm.length <dbl>, arm.circ <dbl>,
# waist.circ <dbl>, calf.circ <dbl>, calf.skinfold <dbl>,
# triceps.skinfold <dbl>, subscap.skinfold <dbl>,
# GMQ <dbl>
25.1 Comparing Gross Motor Quotient Scores by Income Level (3 Categories)
In this first analysis, we’ll compare the population mean on the Gross Motor Quotient evaluation of these kids across three groups defined by income level. Higher values of this GMQ measure indicate improved levels of gross motor development, both in terms of locomotor and object control. See https://wwwn.cdc.gov/Nchs/Nnyfs/Y_GMX.htm for more details.
# A tibble: 3 x 4
income.cat3 n `mean(GMQ)` `median(GMQ)`
<chr> <int> <dbl> <dbl>
1 High (65K or more) 92 95.7 97
2 Low (below 25K) 98 97.0 97
3 Middle (25 - 64K) 90 95.4 94
Uh, oh. We should rearrange those income categories to match a natural order from low to high.
nyfs2a$income.cat3 <-
forcats::fct_relevel(nyfs2a$income.cat3,
"Low (below 25K)",
"Middle (25 - 64K)",
"High (65K or more)")
When working with three independent samples, I use graphs analogous to those we built for two independent samples.
ggplot(nyfs2a, aes(x = income.cat3, y = GMQ, fill = income.cat3)) +
geom_jitter(aes(color = income.cat3), alpha = 0.5, width = 0.25) +
geom_boxplot(notch = TRUE, alpha = 0.75) +
theme_bw() +
coord_flip() +
guides(fill = FALSE, col = FALSE) +
labs(title = "GMQ Scores for 280 Children in NNYFS",
y = "GMQ Score, in points", x = "Income Category")
Warning: `guides(<scale> = FALSE)` is deprecated. Please use
`guides(<scale> = "none")` instead.
In addition to this comparison boxplot, we might consider faceted plots, like these histograms.
ggplot(nyfs2a, aes(x = GMQ, fill = income.cat3)) +
geom_histogram(bins = 15, col = "white") +
guides(fill = FALSE) +
facet_wrap(~ income.cat3)
Warning: `guides(<scale> = FALSE)` is deprecated. Please use
`guides(<scale> = "none")` instead.
Or, if we want to ignore the (modest) sample size differences, we might consider density functions, perhaps through a ridgeline plot.
ggplot(nyfs2a, aes(x = GMQ, y = income.cat3, fill = income.cat3)) +
ggridges::geom_density_ridges(scale = 0.9) +
guides(fill = FALSE) +
labs(title = "GMQ Score (in points) by Income Group",
x = "GMQ Score", y = "") +
ggridges::theme_ridges()
Warning: `guides(<scale> = FALSE)` is deprecated. Please use
`guides(<scale> = "none")` instead.
nyfs2a$income.cat3: Low (below 25K)
min Q1 median Q3 max mean sd n missing
55 91 97 106 130 97.03061 14.79444 98 0
---------------------------------------------
nyfs2a$income.cat3: Middle (25 - 64K)
min Q1 median Q3 max mean sd n missing
67 85 94 106 136 95.36667 14.15123 90 0
---------------------------------------------
nyfs2a$income.cat3: High (65K or more)
min Q1 median Q3 max mean sd n missing
64 85 97 103 145 95.72826 14.49525 92 0
25.2 Alternative Procedures for Comparing More Than Two Means
Now, if we only had two independent samples, we’d be choosing between a pooled t test, a Welch t test, and a non-parametric procedure like the Wilcoxon-Mann-Whitney rank sum test, or even perhaps a bootstrap alternative.
In the case of more than two independent samples, we have methods analogous to the Welch test, and the rank sum test, and even the bootstrap, but we’re going to be far more likely to select the analysis of variance (ANOVA) or an equivalent regression-based approach. These are the extensions of the pooled t test. Unless the sample outcome data are very clearly not Normally distributed, and no transformation is available which makes them appear approximately Normal in all of the groups we are comparing, we will stick with ANOVA.
25.2.1 Extending the Welch Test to > 2 Independent Samples
It is possible to extend the Welch two-sample t test (not assuming equal population variances) into an analogous one-factor analysis for comparing population means based on independent samples from more than two groups.
If we want to compare the population mean GMQ levels across those three income groups without assuming equal population variances, oneway.test
is up to the task. The hypotheses being tested here are:
- H0: All three means are the same vs.
- HA: At least one of the population means is different than the others.
oneway.test(GMQ ~ income.cat3, data = nyfs2a)
One-way analysis of means (not assuming equal
variances)
data: GMQ and income.cat3
F = 0.3416, num df = 2.00, denom df = 184.41, p-value
= 0.7111
We get a p value, but this isn’t much help, though, because we don’t have any measure of effect size, nor do we have any confidence intervals. Like the analogous Welch t test, this approach allows us to forego the assumption of equal population variances in each of the three income groups, but it still requires us to assume that the populations are Normally distributed.
That said, most of the time when we have more than two levels of the factor of interest, we won’t bother worrying about the equal population variance assumption, and will just use the one-factor ANOVA approach (with pooled variances) described below, to make the comparisons of interest.
25.2.2 Extending the Rank Sum Test to > 2 Independent Samples
It is also possible to extend the Wilcoxon-Mann-Whitney two-sample test into an analogous one-factor analysis called the Kruskal-Wallis test for comparing population measures of location based on independent samples from more than two groups.
If we want to compare the centers of the distributions of population GMQ score across our three income groups without assuming Normality, we can use kruskal.test
.
The hypotheses being tested here are still as before, but for a measure of location other than the population mean
kruskal.test(GMQ ~ income.cat3, data = nyfs2a)
Kruskal-Wallis rank sum test
data: GMQ by income.cat3
Kruskal-Wallis chi-squared = 2.3202, df = 2, p-value
= 0.3135
Again, note that this isn’t much help, though, because we don’t have any measure of effect size, nor do we have any confidence intervals.
That said, most of the time when we have more than two levels of the factor of interest, we won’t bother worrying about potential violations of the Normality assumption unless they are glaring, and will just use the usual one-factor ANOVA approach (with pooled variances) described below, to make the comparisons of interest.
25.2.3 Can we use the bootstrap to compare more than two means?
Sure. There are both ANOVA and ANCOVA analogues using the bootstrap, and in fact, there are power calculations based on the bootstrap, too. If you want to see some example code, look at https://sammancuso.com/2017/11/01/model-based-bootstrapped-anova-and-ancova/
25.3 The Analysis of Variance
Extending the two-sample t test (assuming equal population variances) into a comparison of more than two samples uses the analysis of variance or ANOVA.
This is an analysis of a continuous outcome variable on the basis of a single categorical factor, in fact, it’s often called one-factor ANOVA or one-way ANOVA to indicate that the outcome is being split up into the groups defined by a single factor.
The null hypothesis is that the population means are all the same, and the alternative is that this is not the case. When there are just two groups, then this boils down to an F test that is equivalent to the Pooled t test.
25.3.1 The oneway.test
approach
R will produce some elements of a one-factor ANOVA using the oneway.test
command:
oneway.test(GMQ ~ income.cat3, data = nyfs2a, var.equal=TRUE)
One-way analysis of means
data: GMQ and income.cat3
F = 0.34687, num df = 2, denom df = 277, p-value =
0.7072
This isn’t the full analysis, though, which would require a more complete ANOVA table. There are two equivalent approaches to obtaining the full ANOVA table when comparing a series of 2 or more population means based on independent samples.
25.3.2 Using the aov
approach and the summary
function
Here’s one possible ANOVA table, which doesn’t require directly fitting a linear model.
Df Sum Sq Mean Sq F value Pr(>F)
income.cat3 2 146 72.85 0.347 0.707
Residuals 277 58174 210.01
25.3.3 Using the anova
function after fitting a linear model
An equivalent way to get identical results in a slightly different format runs the linear model behind the ANOVA approach directly.
Analysis of Variance Table
Response: GMQ
Df Sum Sq Mean Sq F value Pr(>F)
income.cat3 2 146 72.848 0.3469 0.7072
Residuals 277 58174 210.014
25.4 Interpreting the ANOVA Table
25.4.1 What are we Testing?
The null hypothesis for the ANOVA table is that the population means of the outcome across the various levels of the factor of interest are all the same, against a two-sided alternative hypothesis that the level-specific population means are not all the same.
Specifically, if we have a grouping factor with k levels, then we are testing:
- H0: All k population means are the same.
- HA: At least one of the population means is different from the others.
25.4.2 Elements of the ANOVA Table
The ANOVA table breaks down the variation in the outcome explained by the k levels of the factor of interest, and the variation in the outcome which remains (the Residual, or Error).
Specifically, the elements of the ANOVA table are:
- the degrees of freedom (labeled Df) for the factor of interest and for the Residuals
- the sums of squares (labeled Sum Sq) for the factor of interest and for the Residuals
- the mean square (labeled Mean Sq) for the factor of interest and for the Residuals
- the ANOVA F test statistic (labeled F value), which is used to generate
- the p value for the comparison assessed by the ANOVA model, labeled Pr(>F)
25.4.3 The Degrees of Freedom
Analysis of Variance Table
Response: GMQ
Df Sum Sq Mean Sq F value Pr(>F)
income.cat3 2 146 72.848 0.3469 0.7072
Residuals 277 58174 210.014
- The degrees of freedom attributable to the factor of interest (here, Income category) is the number of levels of the factor minus 1. Here, we have three Income categories (levels), so df(income.cat3) = 2.
- The total degrees of freedom are the number of observations (across all levels of the factor) minus 1. We have 280 GMQ scores in the
nyfs2a
data, so the df(Total) must be 279, although the Total row isn’t shown by R in its output. - The Residual degrees of freedom are the Total df - Factor df. So, here, that’s 279 - 2 = 277.
25.4.4 The Sums of Squares
Analysis of Variance Table
Response: GMQ
Df Sum Sq Mean Sq F value Pr(>F)
income.cat3 2 146 72.848 0.3469 0.7072
Residuals 277 58174 210.014
- The sum of squares (often abbreviated SS or Sum Sq) represents variation explained.
- The factor SS is the sum across all levels of the factor of the sample size for the level multiplied by the squared difference between the level mean and the overall mean across all levels. Here, SS(
income.cat3
) = 146 - The total SS is the sum across all observations of the square of the difference between the individual values and the overall mean. Here, that is 146 + 58174 = 58320
- Residual SS = Total SS - Factor SS.
- Also of interest is a calculation called \(\eta^2\), (“eta-squared”), which is equivalent to \(R^2\) in a linear model.
- SS(Factor) / SS(Total) = the proportion of variation in our outcome (here, GMQ) explained by the variation between groups (here, income groups)
- In our case, \(\eta^2\) = 146 / (146 + 58174) = 146 / 58320 = 0.0025
- So, Income Category alone accounts for about 0.25% of the variation in GMQ levels observed in these data.
25.4.5 The Mean Square
Analysis of Variance Table
Response: GMQ
Df Sum Sq Mean Sq F value Pr(>F)
income.cat3 2 146 72.848 0.3469 0.7072
Residuals 277 58174 210.014
- The Mean Square is the Sum of Squares divided by the degrees of freedom, so MS(Factor) = SS(Factor)/df(Factor).
- In our case, MS(
income.cat3
) = SS(income.cat3
)/df(income.cat3
) = 146 / 2 = 72.848 (notice that R maintains more decimal places than it shows for these calculations) and - MS(Residuals) = SS(Residuals) / df(Residuals) = 58174 / 277 = 210.014.
- MS(Residuals) or MS(Error) is an estimate of the residual variance which corresponds to \(\sigma^2\) in the underlying linear model for the outcome of interest, here
GMQ
.
- MS(Residuals) or MS(Error) is an estimate of the residual variance which corresponds to \(\sigma^2\) in the underlying linear model for the outcome of interest, here
25.4.6 The F Test Statistic and p Value
Analysis of Variance Table
Response: GMQ
Df Sum Sq Mean Sq F value Pr(>F)
income.cat3 2 146 72.848 0.3469 0.7072
Residuals 277 58174 210.014
- The ANOVA F test is obtained by calculating MS(Factor) / MS(Residuals). So in our case, F = 72.848 / 210.014 = 0.3469
- The F test statistic is then compared to a specific F distribution to obtain a p value, which is shown here to be 0.7072
- Specifically, the observed F test statistic is compared to an F distribution with numerator df = Factor df, and denominator df = Residual df to obtain the p value.
- Here, we have SS(Factor) = 146 (approximately), and df(Factor) = 2, leaving MS(Factor) = 72.848
- We have SS(Residual) = 58174, and df(Residual) = 277, leaving MS(Residual) = 210.014
- MS(Factor) / MS(Residual) = F value = 0.3469, which, when compared to an F distribution with 2 and 277 degrees of freedom, yields a p value of 0.7072
25.5 The Residual Standard Error
The residual standard error is simply the square root of the variance estimate MS(Residual). Here, MS(Residual) = 210.014, so the Residual standard error = 14.49 points.
25.6 The Proportion of Variance Explained by the Factor
We will often summarize the proportion of the variation explained by the factor. The summary statistic is called eta-squared (\(\eta^2\)), and is equivalent to the \(R^2\) value we have seen previously in linear regression models.
Again, \(\eta^2\) = SS(Factor) / SS(Total)
Here, we have
- SS(income.cat3
) = 146 and SS(Residuals) = 58174, so SS(Total) = 58320
- Thus, \(\eta^2\) = SS(Factor)/SS(Total) = 146/58320 = 0.0025
The income category accounts for 0.25% of the variation in GMQ levels: only a tiny fraction.
25.7 The Regression Approach to Compare Population Means based on Independent Samples
This approach is equivalent to the ANOVA approach, and thus also (when there are just two samples to compare) to the pooled-variance t test. We run a linear regression model to predict the outcome (here, GMQ
) on the basis of the categorical factor with three levels (here, income.cat3
)
Call:
lm(formula = GMQ ~ income.cat3, data = nyfs2a)
Residuals:
Min 1Q Median 3Q Max
-42.031 -9.031 -0.031 8.969 49.272
Coefficients:
Estimate Std. Error t value
(Intercept) 97.031 1.464 66.282
income.cat3Middle (25 - 64K) -1.664 2.116 -0.786
income.cat3High (65K or more) -1.302 2.104 -0.619
Pr(>|t|)
(Intercept) <2e-16 ***
income.cat3Middle (25 - 64K) 0.432
income.cat3High (65K or more) 0.536
---
Signif. codes:
0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 14.49 on 277 degrees of freedom
Multiple R-squared: 0.002498, Adjusted R-squared: -0.004704
F-statistic: 0.3469 on 2 and 277 DF, p-value: 0.7072
25.7.1 Interpreting the Regression Output
This output tells us many things, but for now, we’ll focus just on the coefficients output, which tells us that:
- the point estimate for the population mean GMQ score across “Low” income subjects is 97.03
- the point estimate (sample mean difference) for the difference in population mean GMQ level between the “Middle” and “Low” income subjects is -1.66 (in words, the Middle income kids have lower GMQ scores than the Low income kids by 1.66 points on average.)
- the point estimate (sample mean difference) for the difference in population mean GMQ level between the “High” and “Low” income subjects is -1.30 (in words, the High income kids have lower GMQ scores than the Low income kids by 1.30 points on average.)
Of course, we knew all of this already from a summary of the sample means.
# A tibble: 3 x 3
income.cat3 n `mean(GMQ)`
<fct> <int> <dbl>
1 Low (below 25K) 98 97.0
2 Middle (25 - 64K) 90 95.4
3 High (65K or more) 92 95.7
The model for predicting GMQ is based on two binary (1/0) indicator variables, specifically, we have:
- Estimated GMQ = 97.03 - 1.66 x [1 if Middle income or 0 if not] - 1.30 x [1 if High income or 0 if not]
The coefficients section also provides a standard error and t statistic and two-sided p value for each coefficient.
25.7.2 The Full ANOVA Table
To see the full ANOVA table corresponding to any linear regression model, we run…
Analysis of Variance Table
Response: GMQ
Df Sum Sq Mean Sq F value Pr(>F)
income.cat3 2 146 72.848 0.3469 0.7072
Residuals 277 58174 210.014
25.7.3 ANOVA Assumptions
The assumptions behind analysis of variance are the same as those behind a linear model. Of specific interest are:
- The samples obtained from each group are independent.
- Ideally, the samples from each group are a random sample from the population described by that group.
- In the population, the variance of the outcome in each group is equal. (This is less of an issue if our study involves a balanced design.)
- In the population, we have Normal distributions of the outcome in each group.
Happily, the F test is fairly robust to violations of the Normality assumption.
25.8 Equivalent approach to get ANOVA Results
Df Sum Sq Mean Sq F value Pr(>F)
income.cat3 2 146 72.85 0.347 0.707
Residuals 277 58174 210.01
So which of the pairs of means are driving the differences we see?
25.9 The Problem of Multiple Comparisons
- Suppose we compare High to Low, using a test with \(\alpha\) = 0.05
- Then we compare Middle to Low on the same outcome, also using \(\alpha\) = 0.05
- Then we compare High to Middle, also with \(\alpha\) = 0.05
What is our overall \(\alpha\) level across these three comparisons?
- It could be as bad as 0.05 + 0.05 + 0.05, or 0.15.
- Rather than our nominal 95% confidence, we have something as low as 85% confidence across this set of simultaneous comparisons.
25.9.1 The Bonferroni solution
- Suppose we compare High to Low, using a test with \(\alpha\) = 0.05/3
- Then we compare Middle to Low on the same outcome, also using \(\alpha\) = 0.05/3
- Then we compare High to Middle, also with \(\alpha\) = 0.05/3
Then across these three comparisons, our overall \(\alpha\) can be (at worst)
- 0.05/3 + 0.05/3 + 0.05/3 = 0.05
- So by changing our nominal confidence level from 95% to 98.333% in each comparison, we wind up with at least 95% confidence across this set of simultaneous comparisons.
- This is a conservative (worst case) approach.
Goal: Simultaneous comparisons of White vs AA, AA vs Other and White vs Other
pairwise.t.test(nyfs2a$GMQ, nyfs2a$income.cat3, p.adjust="bonferroni")
Pairwise comparisons using t tests with pooled SD
data: nyfs2a$GMQ and nyfs2a$income.cat3
Low (below 25K) Middle (25 - 64K)
Middle (25 - 64K) 1 -
High (65K or more) 1 1
P value adjustment method: bonferroni
These p values are very large.
25.9.2 Pairwise Comparisons using Tukey’s HSD Method
Goal: Simultaneous (less conservative) confidence intervals and p values for our three pairwise comparisons (High vs. Low, High vs. Middle, Middle vs. Low)
Tukey multiple comparisons of means
95% family-wise confidence level
Fit: aov(formula = GMQ ~ income.cat3, data = nyfs2a)
$income.cat3
diff lwr
Middle (25 - 64K)-Low (below 25K) -1.6639456 -6.649518
High (65K or more)-Low (below 25K) -1.3023514 -6.259595
High (65K or more)-Middle (25 - 64K) 0.3615942 -4.701208
upr p adj
Middle (25 - 64K)-Low (below 25K) 3.321627 0.7116745
High (65K or more)-Low (below 25K) 3.654892 0.8098084
High (65K or more)-Middle (25 - 64K) 5.424396 0.9845073
25.9.3 Plotting the Tukey HSD results
Note that the default positioning of the y axis in the plot of Tukey HSD results can be problematic. If we have longer names, in particular, for the levels of our factor, R will leave out some of the labels. We can alleviate that problem either by using the fct_recode
function in the forcats
package to rename the factor levels, or we can use the following code to reconfigure the margins of the plot.
mar.default <- c(5,6,4,2) + 0.1 # save default plotting margins
par(mar = mar.default + c(0, 12, 0, 0))
plot(TukeyHSD(aov(GMQ ~ income.cat3, data = nyfs2a)), las = 2)
par(mar = mar.default) # return to normal plotting margins
25.10 What if we consider another outcome, BMI?
We’ll look at the full data set in nyfs2
now, so we can look at BMI as a function of income.
nyfs2$income.cat3 <-
forcats::fct_relevel(nyfs2$income.cat3,
"Low (below 25K)",
"Middle (25 - 64K)",
"High (65K or more)")
ggplot(nyfs2, aes(x = bmi, y = income.cat3, fill = income.cat3)) +
ggridges::geom_density_ridges(scale = 0.9) +
guides(fill = FALSE) +
labs(title = "Body-Mass Index by Income Group",
x = "Body-Mass Index", y = "") +
ggridges::theme_ridges()
Warning: `guides(<scale> = FALSE)` is deprecated. Please use
`guides(<scale> = "none")` instead.
ggplot(nyfs2, aes(x = income.cat3, y = bmi, fill = income.cat3)) +
geom_jitter(aes(color = income.cat3), alpha = 0.5, width = 0.25) +
geom_boxplot(notch = TRUE, alpha = 0.75) +
theme_bw() +
coord_flip() +
guides(fill = FALSE, col = FALSE) +
labs(title = "BMI for 280 Children in NNYFS",
y = "Body-Mass Index", x = "Income Category")
Warning: `guides(<scale> = FALSE)` is deprecated. Please use
`guides(<scale> = "none")` instead.
Here are the descriptive numerical summaries:
mosaic::favstats(bmi ~ income.cat3, data = nyfs2)
income.cat3 min Q1 median Q3 max mean
1 Low (below 25K) 13.8 15.500 16.50 17.9 25.2 16.98163
2 Middle (25 - 64K) 13.7 15.225 16.05 16.9 24.1 16.37111
3 High (65K or more) 13.8 15.300 15.85 17.2 21.8 16.27065
sd n missing
1 2.194574 98 0
2 1.898920 90 0
3 1.614395 92 0
Here is the ANOVA table.
Analysis of Variance Table
Response: bmi
Df Sum Sq Mean Sq F value Pr(>F)
income.cat3 2 28.32 14.1583 3.8252 0.02298 *
Residuals 277 1025.26 3.7013
---
Signif. codes:
0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Let’s consider the Tukey HSD results. First, we’ll create a factor with shorter labels.
nyfs2$inc.new <-
forcats::fct_recode(nyfs2$income.cat3,
"Low" = "Low (below 25K)",
"Middle" = "Middle (25 - 64K)",
"High" = "High (65K or more)")
plot(TukeyHSD(aov(bmi ~ inc.new, data = nyfs2),
conf.level = 0.90))
It appears that there is a detectable difference between the bmi
means of the “Low” group and both the “High” and “Middle” group at the 90% confidence level, but no detectable difference between “Middle” and “High.” Details of those confidence intervals for those pairwise comparisons follow.
Tukey multiple comparisons of means
90% family-wise confidence level
Fit: aov(formula = bmi ~ inc.new, data = nyfs2)
$inc.new
diff lwr upr p adj
Middle-Low -0.6105215 -1.1893722 -0.03167084 0.0775491
High-Low -0.7109805 -1.2865420 -0.13541892 0.0306639
High-Middle -0.1004589 -0.6882764 0.48735849 0.9339289


Module Sqib
Sqib, a sequence query facility for Lua
This project is available on Github.
Info:
- Copyright: © 2020 psmay
- Release: 0.3.1-aa-20200804a
- License: MIT
- Author: psmay
Functions
| empty () | Returns a new Sqib.Seq containing zero elements. |
| from (value) | Produces a Sqib.Seq by guessing the appropriate conversion for value . |
| from_all (...) | Produces a Sqib.Seq by converting each parameter to a Sqib.Seq and concatenating the results. |
| from_array (a[, n]) | Returns a Sqib.Seq based on an array or its first elements. |
| from_array_slice (a, start, limit) | Returns a Sqib.Seq based on the elements of a subsequence of an array between two specified indexes. |
| from_iterate (iterate[, ...]) | Returns a Sqib.Seq based on the supplied iterate function. |
| from_keys (t) | Returns a Sqib.Seq based on the keys of a table. |
| from_packed (t) | Returns a Sqib.Seq based on a packed list. |
| from_pairs (t[, result_selector]) | Returns a Sqib.Seq based on the key-value pairs of a table. |
| from_values (t) | Returns a Sqib.Seq based on the values of a table. |
| from_yielder (yielder[, ...]) | Returns a Sqib.Seq based on the supplied yielder function. |
| over (...) | Returns a Sqib.Seq over the supplied sequence of parameters. |
| range (start_value, limit_value[, step=1]) | Returns a new Sqib.Seq over the specified range. |
| times (value, count) | Returns a new Sqib.Seq that repeats a specified value a specified number of times. |
Class Sqib.Seq
| Sqib.Seq:all (predicate) | Returns whether all elements of this sequence satisfy a predicate. |
| Sqib.Seq:any ([predicate]) | Returns whether this sequence contains any elements or contains any elements that satisfy a predicate. |
| Sqib.Seq:append (...) | Produces a Sqib.Seq consisting of this sequence followed by the specified elements. |
| Sqib.Seq:batch (block_size[, result_selector]) | Produces a Sqib.Seq consisting of this sequence’s elements as blocks of a specified number of elements each. |
| Sqib.Seq:call (f[, ...]) | Calls the specified function as if it were a method on this sequence. |
| Sqib.Seq:concat (...) | Returns a Sqib.Seq consisting of this sequence followed by the specified additional sequences. |
| Sqib.Seq:copy_into_array (a[, start_index=1]) | Copies all elements of this sequence into an existing array or object. |
| Sqib.Seq:count ([predicate]) | Counts the number of elements, or the number of elements that satisfy a predicate, in this sequence. |
| Sqib.Seq:filter (predicate) | Filters this sequence to only the elements that satisfy a predicate. |
| Sqib.Seq:flat_map ([selector[, convert_result=true]]) | Maps this sequence by applying a sequence-producing selector, then returns a sequence from the concatenated results. |
| Sqib.Seq:force () | Forces immediate evaluation of this sequence. |
| Sqib.Seq:is_sqib_seq () | Returns whether this object should be treated as Sqib.Seq. |
| Sqib.Seq:iterate () | Returns a closure-based iterator over this sequence. |
| Sqib.Seq:map (selector) | Maps each element of this sequence by applying a selector. |
| Sqib.Seq:new ([o={}]) | The constructor for an abstract Sqib.Seq. |
| Sqib.Seq:pack () | Copies this sequence into a new packed list. |
| Sqib.Seq:pairs_to_hash (pair_selector) | Creates a new dictionary-style table using the provided selector to determine each key-value pair. |
| Sqib.Seq:reversed () | Returns a new Sqib.Seq that consists of the elements of this sequence in reverse order. |
| Sqib.Seq:skip (count) | Skips a specified number of elements, then produces the remainder. |
| Sqib.Seq:skip_while (predicate) | Skips all elements while a predicate is satisfied, then produces the remainder. |
| Sqib.Seq:sorted (...) | Returns a new Sqib.Seq that consists of the elements of this sequence sorted according to the specified options. |
| Sqib.Seq:take (count) | Passes a specified number of elements, then ends the sequence. |
| Sqib.Seq:take_while (predicate) | Passes all elements while a predicate is satisfied, then ends the sequence. |
| Sqib.Seq:times (count) | Returns a new Sqib.Seq that repeats this entire sequence a specified number of times. |
| Sqib.Seq:to_array ([include_length=false]) | Copies this sequence into a new array. |
| Sqib.Seq:to_hash ([key_selector[, value_selector]]) | Creates a new dictionary-style table using the provided selectors to determine the keys and values. |
| Sqib.Seq:to_sqib_seq () | Returns this Sqib.Seq object. |
| Sqib.Seq:unique ([key_selector]) | Filters this sequence to distinct elements by including only the first element having a selected key. |
| Sqib.Seq:unpack () | Returns this entire sequence as a return value list. |
Functions
- empty ()
-
Returns a new Sqib.Seq containing zero elements.
Returns:
-
A new, empty Sqib.Seq.
- from (value)
-
Produces a Sqib.Seq by guessing the appropriate conversion for
value
.- If
value
is a table,- If
value.is_sqib_seq
exists as a function andvalue:is_sqib_seq()
returns true,value
is used directly. - If
value.to_sqib_seq
exists as a function, the result ofvalue:to_sqib_seq()
is used.- If the value
seq
returned byvalue:to_sqib_seq()
is not a table, orseq.is_sqib_seq
is not a function, orseq:is_sqib_seq()
does not return true, an error is raised.
- If the value
- Otherwise, if
value.n
exists as a nonnegative integer, the result of Sqib.from_packed(value) is used. - Otherwise, the result of Sqib.from_array(value) is used.
- If
- If
value
is a function, the result of Sqib.from_yielder(value) is used. - Otherwise, an error is raised.
Parameters:
- value A source of sequence data to be used as a sequence.
Returns:
-
A Sqib.Seq obtained by automatically converting
value
.Raises:
- When
value
has no automatic conversion to a sequence. - When
value.to_sqib_seq
is a function butvalue:to_sqib_seq()
returns a value that does not appear to be a sequence (i.e., does not pass theis_sqib_seq()
test).
See also:
- If
- from_all (...)
-
Produces a Sqib.Seq by converting each parameter to a Sqib.Seq and concatenating the results.
Parameters:
- ... Sequence-like values to be converted to sequences (using the same rules as Sqib.from) and concatenated.
Returns:
-
A Sqib.Seq obtained by automatically converting every parameter to a Sqib.Seq, then concatenating the
results.
Raises:
- When any parameter has no automatic conversion to a sequence.
- When, for any parameter
v
,v.to_sqib_seq
is a function butv:to_sqib_seq()
returns a value that does not appear to be a sequence (i.e., does not pass theis_sqib_seq()
test).
See also:
- from_array (a[, n])
-
Returns a Sqib.Seq based on an array or its first elements.
Parameters:
- a An array on which to base the new sequence.
- n
The number of elements to include from
a
. If omitted, the length is recomputed from#a
at the beginning of each new iteration. (optional)
Returns:
-
A Sqib.Seq consisting of the first
n
elements ofa
, or, ifn
is omitted, the first#a
elements ofa
.See also:
- from_array_slice (a, start, limit)
-
Returns a Sqib.Seq based on the elements of a subsequence of an array between two specified indexes.
Parameters:
- a An array on which to base the new sequence.
- start
The inclusive index of
a
at which to start the sequence. Must be an integer, but need not be positive. - limit
The inclusive index of
a
at which to end the sequence. Must be an integer, but need not be positive.
Returns:
-
A Sqib.Seq consisting of the elements of
a
froma[start]
toa[limit]
, inclusive, or an empty sequence ifstart
is greater thanlimit
.See also:
- from_iterate (iterate[, ...])
-
Returns a Sqib.Seq based on the supplied iterate function.
The function iterate is expected to return an iterator function and optionally stateless iterator parameters. iterate is used in a construction similar to
for _, v in iterate() do … end
and has a similar contract to the built-inipairs()
orpairs()
functions.The iteration is expected to produce each successive element of the represented sequence by returning either:
- a pair
x, v
, wherex
is any non-nil
value andv
is the next element value, or nil
, signaling the end of the sequence.
The index values produced by the iterator need not be in any particular order; the requirement is only that each index value be non-
nil
if a value is being returned ornil
once the sequence is exhausted. The sequence returned from this method discards the indexes from the iterator and provides its own indexes that comply with the contract of iterate.function example_iterate(start, limit) local i = start - 1 return function() if i < limit then i = i + 1 return true, i end end end local seq = Sqib.from_iterate(example_iterate, 10, 13) -- sequence is 10, 11, 12, 13
[Implementation detail: The number of parameters in
…
is subject to the same limitations as unpack.]Parameters:
- iterate A function which returns an iterator function.
- ... Parameters that will be passed to iterate at the beginning of each new iteration. (optional)
Returns:
See also:
- a pair
- from_keys (t)
-
Returns a Sqib.Seq based on the keys of a table.
Parameters:
- t A table whose keys to traverse.
Returns:
-
A new Sqib.Seq representing the keys of
t
, in no particular order. - from_packed (t)
-
Returns a Sqib.Seq based on a packed list.
For the purposes of this method, a packed list is a table
t
which has a fieldt.n
that is a nonnegative integer and which has elementst[1]
throught[t.n]
(any or all of which may benil
) that constitute a conceptual list. This method produces a Sqib.Seq representing this list.Parameters:
- t A packed list.
Returns:
-
A new Sqib.Seq based on the elements of the packed list
t
. - from_pairs (t[, result_selector])
-
Returns a Sqib.Seq based on the key-value pairs of a table.
Parameters:
- t A table whose key-value pairs to traverse.
- result_selector
A function
(k, v)
that selects the output element based on each key-value pair. If omitted, the selector produces a two-element array{k, v}
containing the key and the value. (optional)
Returns:
-
A new Sqib.Seq representing the key-value pairs of
t
, in no particular order. - from_values (t)
-
Returns a Sqib.Seq based on the values of a table.
Parameters:
- t A table whose values to traverse.
Returns:
-
A new Sqib.Seq representing the values of
t
, in no particular order. - from_yielder (yielder[, ...])
-
Returns a Sqib.Seq based on the supplied yielder function.
The function
yielder
is expected to callcoroutine.yield(v)
once for each successive valuev
in the iteration.yielder
is called from a coroutine using the supplied parameters, if any, at the beginning of each new iteration.function example_yielder(start, limit) for i = start, limit do for j = start, limit do coroutine.yield("(" .. i .. "," .. j .. ")") end end end local seq = Sqib.from_yielder(example_yielder, 1, 2) -- seq is "(1,1)", "(1,2)", "(2,1)", "(2,2)"
[Implementation detail: The number of parameters in
…
is subject to the same limitations as unpack.]Parameters:
- yielder A function which returns an iterator function.
- ... Parameters that will be passed to iterate at the beginning of each new iteration. (optional)
Returns:
- over (...)
-
Returns a Sqib.Seq over the supplied sequence of parameters.
Parameters:
- ... Elements to be traversed by the new sequence.
Returns:
-
A new Sqib.Seq based on the values of
…
. - range (start_value, limit_value[, step=1])
-
Returns a new Sqib.Seq over the specified range.
The sequence produced is the same sequence produced by the
for
loopfor i=start_value, limit_value, step do ... end
Parameters:
- start_value The initial value of the range.
- limit_value The limit for the final value of the range.
- step The step value for iteration. (default 1)
Returns:
-
A new Sqib.Seq with contents based on the specified range.
- times (value, count)
-
Returns a new Sqib.Seq that repeats a specified value a specified number of times.
Parameters:
- value The element value to be repeated.
- count
The number of times to repeat
value
.
Returns:
Class Sqib.Seq
Derived classes must implement Sqib.Seq:iterate. If a derived class can determine its own size in less-than-linear time, it should also override Sqib.Seq:count.
- Sqib.Seq:all (predicate)
-
Returns whether all elements of this sequence satisfy a predicate.
If this sequence is empty, returns
true
.Parameters:
- predicate
A function
(v, i)
that returns true if the current element satisfies a condition or false otherwise.
Returns:
true
if all elements of this sequence satisfypredicate
, orfalse
otherwise. - predicate
A function
- Sqib.Seq:any ([predicate])
-
Returns whether this sequence contains any elements or contains any elements that satisfy a predicate.
If this sequence is empty, returns
false
.Parameters:
- predicate
A function
(v, i)
that returns true if the current element satisfies a condition or false otherwise. (optional)
Returns:
-
If
predicate
is supplied,true
if any element in this sequence satisfiespredicate
, orfalse
otherwise. Ifpredicate
is omitted,true
if this sequence contains any elements, orfalse
otherwise. - predicate
A function
- Sqib.Seq:append (...)
-
Produces a Sqib.Seq consisting of this sequence followed by the specified elements.
Parameters:
- ... Elements to append to this sequence.
Returns:
-
A Sqib.Seq consisting of the elements of this sequence followed by the specified additional elements.
- Sqib.Seq:batch (block_size[, result_selector])
-
Produces a Sqib.Seq consisting of this sequence’s elements as blocks of a specified number of elements each.
Each block before the final block contains exactly
block_size
elements. The final block contains the remainder of the sequence, which is as few as one element or as many asblock_size
elements. No block will ever contain zero elements.By default, the resulting sequence will produce each block as a packed list. If another form is more useful, specify a
result_selector
that accepts an array and size and produces the desired element.-- Example: Produces each block as a new Sqib.Seq local seq_of_seq = seq:batch(block_size, function(a, n) return Sqib.from_array(a, n) end)
Parameters:
- block_size The number of elements to include in each block. Must be a positive integer.
- result_selector
A function
(a, n)
to be applied to each block before it is returned from the iterator, wherea
is an array containing the elements of the block andn
is the number of elements in the block. If omitted, the result selector defaults to returning a packed list (i.e. by settinga.n
ton
and returninga
). (optional)
Returns:
-
A Sqib.Seq that iterates over this sequence
block_size
elements at a time. - Sqib.Seq:call (f[, ...])
-
Calls the specified function as if it were a method on this sequence.
This is a simple way to call custom sequence operations fluently without assigning them directly to to Sqib.Seq table.
function my_every_n(seq, n) return seq:filter(function(_,i) return i % n == 0 end) end -- Use call local seq = Sqib.over(1,2,3,4,5,6,7,8,9,10) :call(my_every_n, 3) -- seq is now the sequence 3, 6, 9
Parameters:
- f A function to call as if it were a method.
- ...
Additional parameters for
f
. (optional)
Returns:
-
The result of calling
f(self, …)
, whereself
is this sequence. - Sqib.Seq:concat (...)
-
Returns a Sqib.Seq consisting of this sequence followed by the specified additional sequences.
Parameters:
- ... Sequence-like values to be converted to sequences (using the same rules as Sqib.from) and concatenated to this sequence.
Returns:
-
A Sqib.Seq consisting of the elements of this sequence followed by the elements of each of the specified
additional sequences.
Raises:
- When any parameter has no automatic conversion to a sequence.
- When, for any parameter
v
,v:to_sqib_seq()
is found but returns a value that does not appear to be a sequence (i.e., does not pass theis_sqib_seq()
test).
See also:
- Sqib.Seq:copy_into_array (a[, start_index=1])
-
Copies all elements of this sequence into an existing array or object.
The first element of this sequence is copied to
a[start_index]
, the second toa[start_index + 1]
, and so on. Any values already in these positions are overwritten.Parameters:
- a An array or array-like object into which elements will be copied.
- start_index
The first index of
a
to use for copying elements. If provided, this must be an integer. The value need not be positive (the caveats of using non-1-based arrays in Lua are well documented elsewhere). (default 1)
Returns:
-
The number of elements copied. (The copied elements are
a[start_index]
througha[start_index - 1 + <number of elements copied>]
.) - Sqib.Seq:count ([predicate])
-
Counts the number of elements, or the number of elements that satisfy a predicate, in this sequence.
Parameters:
- predicate
A function
(v, i)
that returns true if the current element satisfies a condition or false otherwise. If omitted, all elements are counted. (optional)
Returns:
-
The total number of elements (if
predicate
is omitted) or the number of elements that satisfypredicate
(ifpredicate
is supplied) in this sequence. - predicate
A function
- Sqib.Seq:filter (predicate)
-
Filters this sequence to only the elements that satisfy a predicate.
Parameters:
- predicate
A function
(v, i)
that returns true if the current element satisfies a condition or false otherwise.
Returns:
-
A new Sqib.Seq consisting of the elements of this sequence that satisfy
predicate
. - predicate
A function
- Sqib.Seq:flat_map ([selector[, convert_result=true]])
-
Maps this sequence by applying a sequence-producing selector, then returns a sequence from the concatenated results.
Parameters:
- selector
A sequence-returning function
(v, i)
to apply to each element in the sequence. If omitted, the selector returns the element value. (optional) - convert_result
Indicates whether the value returned from the selector should be converted into a
Sqib.Seq using Sqib.from, which allows the operation to flatten certain other non-Sqib.Seq sequences. Set to
false
if the selector always produces a Sqib.Seq and doesn’t need the additional conversion. (default true)
Returns:
-
A new Sqib.Seq consisting of the concatenated elements of the sequences returned by
selector
as applied to each element from this sequence. - selector
A sequence-returning function
- Sqib.Seq:force ()
-
Forces immediate evaluation of this sequence.
This method iterates this sequence completely, making an immutable copy, and returns a Sqib.Seq based on the copy.
The main effects of using the returned Sqib.Seq in place of the original sequence are:
- The resulting sequence itself doesn’t need to perform any non-trivial computations. Any (potentially intensive) computation specified before the force only happens once.
- The resulting sequence will not vary between iterations, even if
- this source sequence is mutable (such as an array passed to Sqib.from, if anything other than the sequence still has a reference to it)
- this source sequence is based on computations which use variables that are themselves mutable
- The resulting sequence generally occupies more memory.
The effect of conversions such as Sqib.Seq:to_array or Sqib.Seq:pack is similar, except that those methods do not directly produce a Sqib.Seq while this method does not produce an object which can be accessed as a table.
Returns:
- Sqib.Seq:is_sqib_seq ()
-
Returns whether this object should be treated as Sqib.Seq.
A function named is_sqib_seq on any object is assumed (e.g. by Sqib.from) to return true if the object is a Sqib.Seq (or close enough to one that it can be treated as one). This method exists for the purpose of identifying an object as a Sqib.Seq in absence of any reliable way to do so in Lua.
The is_sqib_seq method of Sqib.Seq is specified to always return
true
. This should not be overridden by derived types of Sqib.Seq.Returns:
true
.See also:
- Sqib.Seq:iterate ()
-
Returns a closure-based iterator over this sequence.
Each time the returned iterator is called, it returns a pair of values
i, v
(an index and a value, respectively) that represent each successive element from the sequence, until the sequence is exhausted, at which pointi
will benil
.The index
i
is defined to start at 1 and increase by 1 with each new element.Returns:
-
A closure-based (non-stateless) iterator over this sequence.
- Sqib.Seq:map (selector)
-
Maps each element of this sequence by applying a selector.
Parameters:
- selector
A function
(v, i)
to apply to each element in the sequence.
Returns:
-
A new Sqib.Seq consisting of the results of applying
selector
to each element of this sequence. - selector
A function
- Sqib.Seq:new ([o={}])
-
The constructor for an abstract Sqib.Seq.
The implementation of this method does nothing beyond creating the object and setting the type’s index and the instance’s metatable.
See the functions of Sqib (for example, Sqib.from) for simple ways to create Sqib.Seq objects from actual data.
Parameters:
- o A table to convert into this type. (default {})
Returns:
o
, having been converted to this type. - Sqib.Seq:pack ()
-
Copies this sequence into a new packed list.
Returns:
-
A new table containing the elements of this sequence, with a field
n
containing the length of the list. - Sqib.Seq:pairs_to_hash (pair_selector)
-
Creates a new dictionary-style table using the provided selector to determine each key-value pair.
Parameters:
- pair_selector
Function
(v, i)
that returnsk, v
, the key and value for a pair.
Returns:
-
The newly created table.
Raises:
- When
pair_selector
is not provided. - When any key appears more than once.
See also:
- pair_selector
Function
- Sqib.Seq:reversed ()
-
Returns a new Sqib.Seq that consists of the elements of this sequence in reverse order.
The reverse operation itself is deferred and occurs whenever the returned Sqib.Seq is actually iterated. When an iterator is retrieved, the entire contents of the source sequence are copied into an internal table. The resulting element values are iterated in reverse order.
Returns:
-
A Sqib.Seq representing a copy of this sequence whose elements have been reversed.
- Sqib.Seq:skip (count)
-
Skips a specified number of elements, then produces the remainder.
Parameters:
- count A number of elements to skip. If this is zero or less, the result is the entire sequence. If this is the length of the sequence or greater, the result is empty.
Returns:
- Sqib.Seq:skip_while (predicate)
-
Skips all elements while a predicate is satisfied, then produces the remainder.
Parameters:
- predicate
A function
(v, i)
to test elements. Elements are skipped until the first element for which this returns false; the remaining elements are passed through untested.
Returns:
-
A Sqib.Seq consisting of all elements of this sequence including and after the first element for which the
predicate returns false.
- predicate
A function
- Sqib.Seq:sorted (...)
-
Returns a new Sqib.Seq that consists of the elements of this sequence sorted according to the specified
options.
With no options specified, the call
local result = seq:sorted()
is equivalent to
local result = seq:sorted({ by = function(v) return v end, compare = function(a, b) return (a < b) and -1 or (a > b) and 1 or 0 end, ascending = true, stable = false, })
Otherwise, one or more orderings can be specified, each with its own full set of parameters. If two elements are tied according to the first ordering, then the second ordering is tried and so on until the tie is broken.
-- Example of sorting first by one field, then another, then another -- (stable = true in any of the orderings causes the entire sort to be stable) local result = seq:sorted( { by = function(v) return v.primary_field end, stable = true }, { by = function(v) return v.secondary_field end, ascending = false }, { by = function(v) return v.tertiary_field end, compare = some_compare_function } )
If all comparisons tie for two elements and
stable
is true for any of the orderings, then the element that occurred earlier in the input sequence will appear earlier in the output as well. If all comparisons tie for two elements andstable
is not true for any of the orderings, the elements may appear in either order.The sort operation itself is deferred and occurs at the beginning of each new iteration. All elements of this sequence are iterated at once, copied internally, and sorted, then this sorted copy is iterated.
Parameters:
- ...
Ordering specifications to be applied in order while comparing elements; each parameter is a table that may define any of the following:
by
: A function(v)
that returns a value that will be the subject of the sort. If omitted, the sort will be performed on the value itself.compare
: A ternary compare function(a, b)
that returns a negative number ifa
comes beforeb
, a positive number ifa
comes afterb
, or 0 ifa
andb
are tied. As a backward compatibility measure, if this method returns a non-number value, such astrue
orfalse
, it will be treated as an ordinary Lua comparer (returns truthy ifa
comes beforeb
or falsy otherwise), but ifstable
is set to true or if multiple orderings are specified, then the comparer may need to be called twice (once in each order) to determine whether two elements are tied. If omitted, the comparison is equivalent to the expression(a < b) and -1 or (a > b) and 1 or 0
.ascending
: If true, the elements are arranged in ascending order. If false, the elements are arranged in descending order. If omitted, defaults to true.stable
: If true, the sort is stable; that is, any two elements that are tied will be sorted in the same order in which they appear in the input. If false, the sort is not guaranteed to be stable. If omitted, defaults to false. If multiple orderings are specified and at least one specifiesstable
as true, the entire result will be stable.
Returns:
-
A Sqib.Seq representing a copy of this sequence whose elements have been sorted as specified.
- ...
- Sqib.Seq:take (count)
-
Passes a specified number of elements, then ends the sequence.
Parameters:
- count A number of elements to take. If this is zero or less, the result is empty. If this is the length of the sequence or greater, the result is the entire sequence.
Returns:
- Sqib.Seq:take_while (predicate)
-
Passes all elements while a predicate is satisfied, then ends the sequence.
Parameters:
- predicate
A function
(v, i)
to test elements. Elements are passed until the first element for which this returnsfalse
; the remaining elements are ignored.
Returns:
-
A Sqib.Seq consisting of all elements of this sequence before, but not including, the first element for
which the predicate returns false.
- predicate
A function
- Sqib.Seq:times (count)
-
Returns a new Sqib.Seq that repeats this entire sequence a specified number of times.
Note that a new iteration of this sequence is started for every repetition. This may include reevaluating sequence contents, filters, mappings, orderings, and so forth each time. If this isn’t what you intended, use e.g. force to fully evaluate the sequence once before using this method.
Parameters:
- count The number of times to repeat this sequence.
Returns:
- Sqib.Seq:to_array ([include_length=false])
-
Copies this sequence into a new array.
Parameters:
- include_length If true, this method returns the new array and the number of elements; otherwise, this method returns only the array. (default false)
Returns:
a, n
, ifinclude_length
, ora
, otherwise, wherea
is the new array andn
is the number of elements copied. - Sqib.Seq:to_hash ([key_selector[, value_selector]])
-
Creates a new dictionary-style table using the provided selectors to determine the keys and values.
Parameters:
- key_selector
Function
(v, i)
that selects the key for an item. If omitted, the value is selected. (optional) - value_selector
Function
(v, i)
that selects the value for an item. If omitted, the value is selected. (optional)
Returns:
-
The newly created table.
Raises:
When any key appears more than once.See also:
- key_selector
Function
- Sqib.Seq:to_sqib_seq ()
-
Returns this Sqib.Seq object.
A method named to_sqib_seq on any object is assumed (e.g. by from) to return a Sqib sequence equivalent to the object.
The to_sqib_seq method of Sqib.Seq is specified to always return the implied
self
parameter. This should not be overridden by derived types of Sqib.Seq.Returns:
self
(the object on which this method was called).See also:
- Sqib.Seq:unique ([key_selector])
-
Filters this sequence to distinct elements by including only the first element having a selected key.
This implementation is table-based; a table is used to keep track of the keys of already seen items.
Any two elements are considered distinct if their keys do not refer to the same item when used to index a table; that is, for
a
andb
, for some tableseen
,seen[key_selector(a)]
andseen[key_selector(b)]
don’t refer to the same item.A special case is implemented so that
nil
can be used as a key.Parameters:
- key_selector
A function
(v, i)
that selects a key by which to determine uniqueness. If this is omitted, the key selector returns the value itself as a key. (optional)
Returns:
-
A Sqib.Seq consisting of each element of this sequence for which the selected key has not already
appeared.
- key_selector
A function
- Sqib.Seq:unpack ()
-
Returns this entire sequence as a return value list.
Similarly to the built-in unpack, this method produces the values from a sequence in a form suitable for multiple assignment or for appending to an array or parameter list.
local seq = Sqib.over(10, 20, 30) local q, r, s = seq:unpack() -- like q = 10, r = 20, s = 30 local a = {seq:unpack()} -- like a = {10, 20, 30} local a2 = {0, seq:unpack()} -- like a = {0, 10, 20, 30} print("values", seq:unpack()) -- like print("values", 10, 20, 30)
[Implementation detail: This implementation may cause a stack overflow condition for a very large number of elements (as determined during testing, a little over a million; may vary by target environment). The implementation of this method relies on a recursive function call that Lua 5.1 seems unable to tail-call optimize. The depth of the call stack is directly proportional to the number of elements.]
Returns:
-
All elements of this sequence in order.


| Apache Struts 2 Documentation > Home > Tutorials > Getting Started > Exclude Parameters |
| The example code for this tutorial, Exclude_Params_Struts2_Mvn, is available on Google Code - http://code.google.com/p/struts2-examples/downloads/list. After downloading and unzipping the file, you'll have a folder named Exclude_Params_Struts2_Mvn. In that folder will be a README.txt file with instructions on now to build and run the example application. |
When Struts development mode is set to true (also see Debugging Struts) the framework writes many informative messages to the log file. These messages include ones that indicate whether or not a specific parameter will be handled by the parameter interceptor and made available to the Action class. These log messages can be helpful in clearly identifying parameters that you do not want the parameter interceptor to process for security or other reasons. This article discusses how to exclude parameters from being handled by the parameter interceptor.
| The Struts 2 user mailing list is an excellent place to get help. If you are having a problem getting the tutorial example applications to work search the Struts 2 mailing list. If you don't find an answer to your problem, post a question on the mailing list. |
Most request parameters are by default processed by the parameter interceptor and Struts 2 will attempt to modify the state of those Action class fields that match up to a parameter name by calling a corresponding public set method. For example if the request includes a parameter of lastName with a value of Phillips, Struts 2 will try to call a public method with a signature of setLastName(String lastName). However, there may be request parameters that you do not want Struts 2 to try to set the value of in the Action class.
Consider this code which creates a form:
<s:form action="save" method="post"> <s:textfield key="personBean.firstName" /> <s:textfield key="personBean.lastName" /> <s:textfield key="personBean.email" /> <s:textfield key="personBean.phoneNumber" /> <s:select key="personBean.sport" list="sports" /> <s:radio key="personBean.gender" list="genders" /> <s:select key="personBean.residency" list="states" listKey="stateAbbr" listValue="stateName" /> <s:checkbox key="personBean.over21" /> <s:checkboxlist key="personBean.carModels" list="carModelsAvailable" /> <s:submit key="submit" /> </s:form>
The s:submit tag will create a submit button with a name of submit. Since the Action class probably doesn't have a setSubmit(String name) method you will see the following log messages (only if Struts development mode is set to true):
Dec 31, 2012 3:43:53 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn WARNING: Parameter [submit] is not on the excludeParams list of patterns and will be appended to action! Dec 31, 2012 3:43:53 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger error SEVERE: Developer Notification (set struts.devMode to false to disable this message): Unexpected Exception caught setting 'submit' on 'class org.apache.struts.edit.action.EditAction: Error setting expression 'submit' with value ['Save Changes', ]
| If you're not familiar with setting up a custom interceptor stack for your Struts 2 application review Introducing Interceptors. |
To exclude specific parameters from being processed by the Struts 2 framework you need to add those parameter names to the list of excluded parameters. One way to do this is by adding those parameter names to the collection of excludedParams for the Parameters interceptor. You can do this by modifying the Parameters interceptor in setting up the stack of interceptors used by your Struts 2 application. For example:
<interceptors> <interceptor-stack name="appDefault"> <interceptor-ref name="defaultStack"> <param name="exception.logEnabled">true</param> <param name="exception.logLevel">ERROR</param> <param name="params.excludeParams">dojo\..*,^struts\..*,^session\..*,^request\..*,^application\..*,^servlet(Request|Response)\..*,parameters\...*,submit</param> </interceptor-ref> </interceptor-stack> </interceptors> <default-interceptor-ref name="appDefault" />
The value of node <param name="params.excludeParams"> is a comma-delimited list of regular expressions or simple Strings that identify request parameters that should NOT be processed by the Parameters interceptor. To exclude the submit parameter (which is the name of the submit button in the form code above), I just added submit to the list.
See the Basic Stack of Interceptors described here to view the initial set of parameter names/regular expressions to exclude. Be sure to copy over the list of parameters already being excluded and then add your own parameters to the end separated by commas.
Download the example application, Exclude_Params_Struts2_Mvn that demonstrates excluding a request parameter. The download is a zipped Maven project. You should be able to unzip it and import the project into any Maven-aware Java IDE. See the project's README.txt file for how to build and run the application.
To see the log messages written when not excluding the submit parameter remove the ",submit" from the list of excluded parameter values in the struts.xml file. Then rebuild and redeploy the application and view the console when running the application.
It's a nice feature of the Struts 2 framework that it logs during development which request parameters will and will not be processed. During development of a Struts 2 web application it's a good practice to review these log messages to determine if there are any parameters that the framework should not process. For those parameters the Struts 2 framework should not process add the parameter name (or a regular expression that can be used to identify multiple parameter names) to the comma-delimited list that is the value for the <param name="params.excludeParams"> node.


| Interface | Description |
|---|---|
| JavaFramebuffer |
Java2D-based framebuffer interface
|
| Class | Description |
|---|---|
| BitFramebuffer |
Linux black-and-white 1bpp framebuffer
|
| BitFramebufferProvider |
Creates new Linux BW framebuffer.
|
| DisplayInterface |
Display manager interface.
|
| ImageUtils |
Common image utilities for framebuffer manipulation
|
| LinuxFramebuffer |
Linux Java2D framebuffer.
|
| OwnedDisplay |
System console manager.
|
| RGBFramebuffer |
Linux XRGB 32bpp framebuffer
|
| RGBFramebufferProvider |
Creates new Linux RGB framebuffer.
|
| StolenDisplay |
Class to allow running programs over SSH
|
| SystemDisplay |
Helper class for initializing real on-brick display.
|


Home
Hospitals
List of Hospitals
Book Appointment
Blood Donation
Donate
Receive
EasyCure
Choose Yourself
Who are you?
Doctor
Patient
Hospital


Rob Koski
Email<EMAIL_ADDRESS>Phone:<PHONE_NUMBER>
Rob is our manager, bassist and fearless leader.
He would be happy to answer any questions you may have.
--- layout: default permalink: /contact/ bodyid: contact title: Contact information author: One Nite Band description: Rob Koski will happily take your requests and inquiries. ---
Email<EMAIL_ADDRESS>Phone:<PHONE_NUMBER>
Rob is our manager, bassist and fearless leader.
He would be happy to answer any questions you may have.


Preparation time
less than 30 mins
Cooking time
10 to 30 mins
Dietary
This ice cream is made without cream - just milk thickened with egg yolks and flavoured with rich, dark chocolate.
Take 50ml/2fl oz of the measured milk and combine with the cocoa powder to form a thin paste. Heat the remaining milk just to the boiling point, then remove from the heat and allow to cool slightly.
In a large heat-proof bowl, whisk the egg yolks with the sugar until very pale and thick (this is best done with an electric whisk).
In a thin stream, add the hot milk to the egg mixture, whisking continuously, until completely combined. Add the cocoa paste and return the mixture to the saucepan.
Over a medium heat, stirring constantly, cook the custard very gently for at least five minutes. This is important to cook the cocoa powder. Continue to cook the custard very gently until it thickens and coats the back of a spoon (if you draw a line through the custard on the back of the spoon with your finger, it will stay clear).
Remove from the heat and pour the mixture into a large bowl. Stir in the vanilla extract and the chopped chocolate until melted.
Allow the mixture to cool , then refrigerate, covered, for at least eight hours, preferably overnight.
Churn in an ice cream maker according to the manufacturer’s instructions. Alternatively pour the mixture into a large plastic box. Cover and freeze for an hour. Remove from the freezer and whisk with a hand-held electric mixer or stick blender until the ice crystals are broken up. Repeat three more times and then freeze until firm.


--- layout: post title: Interactive JavaScript Console With TextMate disqus_id: /2010/07/09/interactive-javascript-console-with-textmate/ categories: - apple-os - heuristics - textmate - javascript ---
Last week I started reading JavaScript: The Good Parts by Douglas Crockford. It was on my list of long overdue things to do. While reading it, I wanted to be able to kick some simple JavaScript examples around. As rubyist we have it good, irb
let's us fire up an interactive console anytime we want. But with JavaScript, options are limited. Sure you could install Johnson/EnvJS, Rhino or some other JavaScript engine. Maybe even load up firebug or the web inspector. But who wants to load a browser to play with JS?
Luckily if your are on a Mac, you do not have to worry about any of that. You already have a JavaScript engine installed. Where? Thanks to Safari's SquirrelFish Extreme (SFX), it is right in your system's library at this full path /System/Library/Frameworks/JavaScriptCore.framework/Versions/A/Resources/jsc
. Instead of adding that to my path, I created a symlink to in my opt's bin directory (seeing how I have MacPorts). For instance.
sudo ln -s /System/Library/Frameworks/JavaScriptCore.framework/Versions/A/Resources/jsc /opt/local/bin
Assuming you just did that command in your own bin path of choice, you can now just type jsc
and start typing JavaScript just as you easily as if you were in an irb prompt. Fun, but we can do better.
So I was inspired by this article that explained how easy it is to make a TextMate bundle to run JavaScript thru JSLint and decided to make one to run the same JavaScript in an the interactive console for SFX. I wont go thru the details of how to add a simple TextMate bundle command, but the following picture and code sample shows the Run JSConsole
command I made. The command resides in my own bundle namespace.
With that simple bundle command done, you can now use the Command-R
keyboard shortcut to load the windows JavaScript file into a newly opened terminal window running in the SFX console. Pictures below.
My simple script just loads the whole file, it does not take into account TM's selected text. Nor does it do anything with selected files. I would love to see someone write a TextMate bundle that could preload up jQuery/Prototype or a set of files. The ultimate would be a bundle command that executed and updated markers like the Ruby bundle can do. Sadly, I do not have that much time on my hands :)


How to update your Venmo profile information on desktop or mobile
by Business Insider- You can update your Venmo profile at any time using the mobile app or desktop website.
- You should keep your Venmo profile updated so that people sending you money know that your account is the right one.
- Visit Business Insider’s homepage for more stories.
Venmo is a peer-to-peer money transfer app that allows you to give, request, and receive money from other people without having to exchange cash or even meet up in person.
In order to help people find you on Venmo, though, you have to be sure that your profile information is accurate. That way, people know it’s really you that they’re sending money to – after all, with 40 million active users, you’re more than likely not the only person on the app with your name.
Here’s how to update your Venmo profile information, either on the iPhone and Android app, or from your computer.
Check out the products mentioned in this article:
iPhone 11 (From $699.99 at Best Buy)
Samsung Galaxy S10 (From $899.99 at Best Buy)
How to update your Venmo profile through the app
1. Open the Venmo app.
2. Tap the menu button in the top-left corner.
3. Tap your name at the top of the menu.
4. On your profile, tap the pencil icon in the top-right corner.
5. In the Edit Profile menu, you can edit any of your information by tapping on it. To change your profile photo, tap the photo and choose one of the source options to change it.
How to update your Venmo profile through the website
1. Launch your web browser.
2. Go to venmo.com.
3. Click “Sign In” in the top-right corner of your screen.
4. Sign in using your phone number, email, or username, and your password.
5. In the top right corner of your screen, next to your picture, click “Edit Profile.”
6. Click any of the options to fill them in or change them.
Related coverage from How To Do Everything: Tech:
-
‘Does Venmo accept prepaid cards?’: How to add a prepaid card to Venmo and use it to send money
-
There’s a limit on your Venmo transactions – here’s how much money you can send and receive with each account type
-
How to unfreeze your Venmo account, or contact Venmo for support if you don’t know why it’s been frozen
-
You can’t delete your Venmo history, but you can make all past and future transactions private – here’s how to do it
-
How to verify your identity on Venmo, in order to send and receive money in the app


Site map
û
Main page
About Us
Our graduates
Graduates of 70s
Graduates of 80s
Graduates of 90s
Graduates of 2000s
Guest book
Photo archive
Faculty
Students
Schedule
Courses


❅
❅
❅
❆
❅
❆
❅
❆
❅
❆
❅
❆
❅
❆
❅
❆
❅
❆
<^
^>
# About Me
Studying
CSE
at North South University
Former Sub-Executive
, Operations and Promotions Team
NSU ACM Student Chapter
Skills :
JavaScript, Python, Linux, Networking
Hobby :
Code for fun, Photography, Cycling.
# Get in Touch
My Resume
# Get in Touch


The beautiful long necked giraffe. You have to listen hard to hear it chew the leaves on the tree!
Look how majestically this beautiful eagle soars. I can't hear his cry when he's up so high!
Deep in the ocean the whale quietly swims, you have to whisper if you want to catch a fish!


 Our Montessori trained facilitator will cover topics such as Montessori environments, independence, toilet teaching, positive discipline, observation, weaning, language development, and more! Classes will be held twice per week and will include an observation period, a parent discussion period, and a Music Together class designed for babies and toddlers. Please contact us for pricing and more information.
Nicola Arango taught in a Montessori school in Minnesota for seven years before moving to Tampa. Nicola is Montessori trained through NAMC for primary aged children (3-6) & has a degree in Arts. Nicola moved to Tampa with her husband in June of 2011 because of his career as a professional soccer player for the Tampa Bay Rowdies. They are very happy in Florida and cannot wait to continue their adventure here! The children will be introduced to her as Miss Nicki.
Samantha is a Florida native. She graduated from the School of Visual Arts in New York City with a degree in Art. A few years later she returned to school and received a BA in Hospitality Management from Miami International University. Samantha’s 3-6 Montessori training is from the Center for Guided Montessori Studies.Personally, Samantha is married to Dan with two children, son Nixon and daughter Lily, who attends Alegria.
Karie is an AMS certified primary teacher. She interned and taught as a lead teacher for three years in Palm Harbor. Before finding her way to Montessori, she received her CDA from PTEC and taught VPK for four years. Karie has over ten years of early childhood experience and was named Pinellas County’s “Teacher of the Year” in 2005.
Karie and her husband Michael have two children, Ava and Max (who attends Alegria). Karie drove from Dunedin so her daughter could attend Alegria, but recently relocated to St. Pete!
Kat is an assistant in the 3-6 classroom where she is learning more about the Montessori method. She looks forward to spending time with various age groups this year as she decides which age to focus on during her future Montessori training. She has worked with children for over ten years as a nanny, babysitter, and assistant teacher throughout the Tampa Bay area. She has a love for learning and obtained a BA in Studio Art from Florida State University. She will be sharing her art knowledge and the beauty of design with our students as the art instructor incorporating her creativity with the school year themes. Kat was born and raised in the city of St Petersburg, which she loves, but also has a passion for traveling.
Ana was born in Guanajuato, Mexico and grew up in Los Angeles.  She worked as a lead teacher in Tampa of 2 and 3 year olds andis looking forward to getting her Montessori Associate Certification. She will be Nikki’s assistant as well as teach Spanish twice a week in Samantha’s and Nikki’s classes. She looks forward to many wonderful years at Alegria.
Kat is an assistant in the 3-6 classroom where she is learning more about the Montessori method. She looks forward to spending time with various age groups this year as she decides which age to focus on during her future Montessori training. She has worked with children for over ten years as a nanny, babysitter, and assistant teacher throughout the Tampa Bay area. She has a love for learning and obtained a BA in Studio Art from Florida State University. She will be sharing her art knowledge and the beauty of design with our students as the art instructor incorporating her creativity with the school year themes. Kat was born and raised in the city of St Petersburg, which she loves, but also has a passion for traveling.


Learn how to make an Espresso Coffee without machines.
Learn how to make an Capuccino Coffee without machines..
How to make a Cafe Mocha
The two most commonly grown are the highly regarded arabica, and the less sophisticated but stronger and more hardy robusta. Once ripe, coffee berries are picked, processed, and dried. Dried coffee seeds (referred to as beans) are roasted to varying degrees, depending on the desired flavor. Roasted beans are ground and brewed with near boiling water to produce coffee as a beverage.


Club Championship 2023 Event 7
| Langton 10 |
02 May 23 |
|
10 |
miles |
| Name |
Position |
Road bike |
Actual Time |
Avg. mph |
| |
|
|
|
|
| Gary
Roberts |
1 |
|
00:23:36 |
25.42 |
| Hans van
Nierop |
2 |
|
00:23:39 |
25.37 |
| Phil
Wilkinson |
3 |
|
00:24:04 |
24.93 |
| Jonathan
Durnin |
4 |
|
00:24:25 |
24.57 |
| Nathan
Joyce |
5 |
1 |
00:24:30 |
24.49 |
| Rhys
Thomas |
6 |
2 |
00:24:52 |
24.13 |
| Chris
Orfeur |
7 |
3 |
00:24:56 |
24.06 |
| Adam
Wells |
8 |
|
00:25:18 |
23.72 |
| Ed
Watson |
9 |
|
00:25:23 |
23.64 |
| Dale
Norris |
10 |
|
00:25:45 |
23.30 |
| Graham
Doe |
11 |
|
00:25:57 |
23.12 |
| Richard
Krause |
12 |
4 |
00:26:01 |
23.06 |
| Austin
Smith |
13 |
5 |
00:26:06 |
22.99 |
| Nick
Clarke |
14 |
|
00:26:25 |
22.71 |
| Jamie
Kershaw |
14 |
|
00:26:25 |
22.71 |
| Richard
Latimer |
16 |
6 |
00:26:27 |
22.68 |
| Doug
Tincello |
17 |
|
00:26:28 |
22.67 |
| Tom
Reynolds |
18 |
|
00:26:29 |
22.66 |
| Eleanor
Humphries |
19 |
7 |
00:26:34 |
22.58 |
| Julian
Middleton |
20 |
|
00:26:35 |
22.57 |
| Adrian
Killworth |
21 |
|
00:26:58 |
22.25 |
| James
Brown |
22 |
|
00:27:22 |
21.92 |
| Ian
Murdey |
23 |
|
00:27:49 |
21.57 |
| Simon
Ward |
24 |
|
00:27:55 |
21.49 |
| John
Abbott |
25 |
8 |
00:28:01 |
21.42 |
| Stuart
Dawkins |
26 |
9 |
00:28:04 |
21.38 |
| Milly
Pinnock |
27 |
10 |
00:28:12 |
21.28 |
| Chris
Bonsor |
28 |
11 |
00:28:40 |
20.93 |
| Richard
Kendrick |
29 |
|
00:28:43 |
20.89 |
| Ian
Waterfield |
30 |
12 |
00:29:20 |
20.45 |
| Steve
Pearce |
31 |
13 |
00:29:31 |
20.33 |
| Mitchell
James |
32 |
|
00:29:47 |
20.15 |
| Ray
Taylor |
33 |
|
00:29:48 |
20.13 |
| Andy
Smith |
34 |
14 |
00:29:58 |
20.02 |
| Anna
Roberts |
35 |
|
00:30:13 |
19.86 |
| Jax
Roberts |
36 |
15 |
00:31:29 |
19.06 |
| Brian
Lincoln |
37 |
16 |
00:32:10 |
18.65 |
| Paul
White |
38 |
|
00:33:01 |
18.17 |
| Jane
Moore |
39 |
17 |
00:33:07 |
18.12 |
| Debbie
Ward |
40 |
18 |
00:34:50 |
17.22 |
| Amanda
McPherson |
41 |
19 |
00:34:57 |
17.17 |
| Chris
Dunkley |
42 |
20 |
00:36:20 |
16.51 |
| Tom
Evans |
|
|
DNS |
|
| Guy
Bibby |
|
|
DNS |
|
|
|
|
|
|


PLANET SICK-BOY: http://www.sick-boy.com "We Put the SIN in Cinema"
Writer/director Amy Heckerling^Òs last film won the Best Screenplay Award from the National Society of Film Critics. Clueless was a cleverly written modern adaptation of Jane Austen^Òs Emma, and the film established Heckerling (Fast Times at Ridgemont High) as one of Hollywood^Òs quintessential teen romance/comedy screenwriters.
Since wallowing in critical praise for Clueless, Heckerling^Òs track record has been, at best, spotty. She produced three bombs in a row ^Ö Saturday Night Live^Òs awful A Night at the Roxbury, the almost-direct-to-video flop Molly and even a short-lived television series based on Clueless. With the release of Loser, the tally hits four in a row.
Loser re-teams American Pie co-stars Jason Biggs and Mena Suvari as New York City college students. It^Òs your typical three-act film where a boy meets a girl in the first, tries to win her over in the second, and just about gives up until the last five minutes of the third. There^Òs nothing here you haven^Òt seen before, except possibly for the brash new levels of product placement that Loser achieves. It^Òs hard to tell if you^Òre watching a long commercial for Sam Adams beer, a paid advertisement for Everclear^Òs new album, or an actual film.
Biggs (Boys and Girls) stars as Paul Tannek, a freshman on a full academic scholarship from a Midwestern town full of people with bad haircuts covered by hats that are even worse. He^Òs the first person in his family to go to college, and although he^Òs smart enough to have earned a full ride (with meal plan included), Paul is worried about his lack of big-city sophistication and fancy book-learnin^Ò. We find out that he^Òs one clumsy bastard from the funny montage that plays during Loser^Òs opening credits.
Suvari (American Beauty) plays fellow freshman Dora Diamond, a native New Yorker that lives at home with her mom (although we never see her) and pays her tuition with tips earned at a Manhattan titty bar.
Although Paul and Dora seem like total opposites (she^Òs street-smart; he^Òs a mugger^Òs dream), the two losers are more alike than they appear. Professor Alcott walks all over Dora, while Paul^Òs three hard-partying roommates (Zak Orth, Thomas Sadoski and Jimmi Simpson) turn his dorm life into a living hell. Paul gets kicked out of his quarters, Dora loses her job, and the two begin to spend more and more time together.
Biggs is an extremely likeable actor that makes the most out of Heckerling^Òs limp material. Besides Hugh Jackson (X-Men) and Owen Wilson (Shanghai Noon), I can^Òt think of a relatively new actor that has impressed me as much as Biggs. On the other hand, Suvari is just plain annoying. She^Òs whiny and she can^Òt act, and the more she whines, the more obvious it becomes that she doesn't have the chops. Kinnear plays the smarmy prick professor to perfection, but one has to wonder if he^Òs really acting, or just serendipitously cast.
Heckerling^Òs direction isn^Òt bad, but her script is almost downright boring. You practically sit around waiting for the next unexplainable cameo from a stand-up comedian (Steven Wright, Bobby Slayton, Andy Dick, Andrea Martin, David Spade) until the inevitable conclusion is reached in the film^Òs final reel. And just when you think Heckerling^Òs screenplay has hit rock-bottom, Loser offers really lame explanations for what happens to each of the characters right before the closing credits.
1:30 ^Ö PG-13 for adult language, mild violence and light sexual dialogue
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


Openwhyd lets you take your favorite music from the services you use like YouTube, Soundcloud, Vimeo, MP3 blogs, Deezer, and more, to listen, organize, and share.
Features
So what exactly does Openwhyd do?
-
Openwhyd is a social record collection for all of your streaming music. Thanks to the plethora of music online, it is possible to find nearly any song you can possibly desire, every remix, and many performances. The problem is once you find a track that you like, what do you do with it?
Openwhyd lets you collect and share the tracks you find, organize them into playlists, share them with anyone, no matter which music service they use, and lets you take your music with you when you are using a different platform from your usual service. Just add your tracks, organize, share, and enjoy.
-
The Green [Add Track] button searches all of your available sources to find the track you are looking for. Find every track you want, every time. Say goodbye to single platform limitations.
Not sure what to listen to? Subscribe to other like-minded music lovers and enjoy a never-ending stream of new music delivered right to you. Never listen to the same song twice if you don’t want to.
Product timeline
Community
We’ve worked hard to cultivate a certain type of active music lover who continuously search across the web for the coolest new music that exists, including exciting concert venues, major record labels, independent artists, hype DJs, off-the-radar bloggers, and everyone in between.
If you want Top 40, turn on your FM radio or queue up Spotify’s charts. If you want to hear something you’ve never expected, check out the community of curators on Openwhyd.
Team
Openwhyd is lovingly handcrafted by a group of outrageous music lovers in Paris whose vision for the world is somewhere in between a Nicolas Jaar sweet electronic slide and a KOAN Sound funk blaster. Founded by Gilles Poupardin and Jie Meng-Gerard, the team of seven includes a loud American, a furious drummer, a trendy designer, a bearded expat, a muscled intern, and a combined desire to use technology to take advantage of everything life has to offer.
Contact us: contact at openwhyd dot org


CSPICE_DSKOBJ returns the set of body ID codes of all objects
for which topographic data are provided in specified DSK files.
Given:
dsk SPICE dsk files names.
[1,c1] = size(dsk), char = class(dsk)
or
[1,m] = size(dsk), cell = class(dsk)
room the maximum number of DSK IDs to return from 'dsk'.
[1,1] = size(room), int32 = class(room)
ids_i an optional input describing an (Nx1) array of DSK
ID codes. Inclusion of this array results in an output
array consisting of a union of the data retrieved from
the 'dsk' kernels and the data in 'ids_i'.
[n,1] = size(ids_i), int32 = class(ids_i)
or
[0,0] = size(ids_i), int32 = class(ids_i)
the call:
ids = cspice_dskobj( dsk, room, ids_i)
or
ids = cspice_dskobj( dsk, room)
returns:
ids the set of unique DSK ID codes of segments in the indicated DSK
files. If 'ids_i' exists in the argument list, 'ids' returns
as a union of data found in 'dsk' and the data in 'ids_i'.
'ids' can overwrite 'ids_i'.
[p,1] = size(ids), int32 = class(ids)
Any numerical results shown for this example may differ between
platforms as the results depend on the SPICE kernels used as input
and the machine specific arithmetic implementation.
Example (1):
Examine a DSK file and identify the set of
central bodies associated with the segments
in the file. For each body, find the
set of surfaces associated with that body.
function dsksrf_t(DSK)
MAXID = 1000;
%
% Find the set of objects in the DSK file.
%
bodids = cspice_dskobj( DSK, MAXID );
for i=1:numel(bodids)
fprintf('Body ID: %d\n' , bodids(i) )
%
% Get the surface IDs for the Ith body.
%
srfids = cspice_dsksrf( DSK, bodids(i), MAXID );
for j=1:numel(srfids)
fprintf(' Surface ID: %d\n' , srfids(j) )
end
end
Assign a DSK kernel as:
dsk = 'hay_a_amica_5_itokawashape_v1_0_64q.bds';
>> dsksrf_t( dsk )
Body ID: 2025143
Surface ID: 2025143
The output lists the SPK IDs in the DSK and the surface IDs.
Example (2):
Assign a DSK kernel list as:
>> dsk= { 'hay_a_amica_5_itokawashape_v1_0_64q.bds', ...
'megr90n000eb_LL000E00N_UR090E90N_plate.bds', ...
'megr90n000eb_LL000E90S_UR090E00S_plate.bds', ...
'megr90n000eb_LL090E00N_UR180E90N_plate.bds', ...
'megr90n000eb_LL090E90S_UR180E00S_plate.bds', ...
'megr90n000eb_LL180E00N_UR270E90N_plate.bds', ...
'megr90n000eb_LL180E90S_UR270E00S_plate.bds', ...
'megr90n000eb_LL270E00N_UR360E90N_plate.bds', ...
'megr90n000eb_LL270E90S_UR360E00S_plate.bds', ...
'phobos_3_3.bds' };
>> dsksrf_t_t(dsk)
Body ID: 401
Surface ID: 401
Body ID: 499
Surface ID: 499001
Body ID: 2025143
Surface ID: 2025143
The output lists all SPK IDs in the DSK set and all corresponding
surface IDs.
None.
For important details concerning this module's function, please refer to
the CSPICE routine dskobj_c.
MICE.REQ
DAS.REQ
DSK.REQ
SETS.REQ
NAIF_IDS.REQ
-Mice Version 1.0.0, 12-FEB-2016, EDW (JPL), NJB (JPL)
find id codes of ephemeris objects in dsk file
find id codes of bodies in dsk file
|


Breakfast
Lunch
Dinner
Dessert
| Item Name | Item Price | Quantity |
|---|
| Subtotal | Tax | Total |
|---|---|---|
| $0.00 | % | $0.00 |


| Free | Standard | Premium | |
|---|---|---|---|
| Price | For free |
$10/Month
If you pay annually,
you will get a 20% discount
|
$100/Month
If you pay annually,
you will get a 25% discount
|
| Max Websites | 1 | 3 | Unlimited |
| Bandwidth | Unlimited | Unlimited | Unlimited |
| Processing | 1 Core 3GHz CPU | 2 Core 3GHz CPU | 2 Core 3GHz CPU + 4GB GPU |
| I will not Purchase |


13.146. Release 0.124
General Changes
- Fix race in memory tracking of
JOIN
which could cause the cluster to become over committed and possibly crash. - The
approx_percentile()
aggregation now also accepts an array of percentages. - Allow nested row type references.
- Fix correctness for some queries with
IN
lists. When all constants in the list are in the range of 32-bit signed integers but the test value can be outside of the range,true
may be produced when the correct result should befalse
. - Fail queries submitted while coordinator is starting.
- Add JMX stats to track authentication and authorization successes and failures.
- Add configuration support for the system access control plugin. The system access
controller can be selected and configured using
etc/access-control.properties
. Note that Presto currently does not ship with any system access controller implementations. - Add support for
WITH NO DATA
syntax inCREATE TABLE ... AS SELECT
. - Fix issue where invalid plans are generated for queries with multiple aggregations that require input values to be cast in different ways.
- Fix performance issue due to redundant processing in queries involving
DISTINCT
andLIMIT
. - Add optimization that can reduce the amount of data sent over the network
for grouped aggregation queries. This feature can be enabled by
optimizer.use-intermediate-aggregations
config property ortask_intermediate_aggregation
session property.
Hive Changes
- Do not count expected exceptions as errors in the Hive metastore client stats.
- Improve performance when reading ORC files with many tiny stripes.
Verifier
- Add support for pre and post control and test queries.
If you are upgrading, you need to alter your verifier_queries
table:
ALTER TABLE verifier_queries ADD COLUMN test_postqueries text;
ALTER TABLE verifier_queries ADD COLUMN test_prequeries text;
ALTER TABLE verifier_queries ADD COLUMN control_postqueries text;
ALTER TABLE verifier_queries ADD COLUMN control_prequeries text;


This is a paragraph
_,.;:-
gzuw dee de fefwew wefehw
wiugzuewih ewho
kcdw qwgzuj gcbwjw wiuh wuqiq
iqhu w fhwu wfiowg
iwjwo wiowhu
My first webpage!
My color is red!
My color is blue!
My color is green!
My Bonnie lies over the ocean.
My Bonnie lies over the sea.
My Bonnie lies over the ocean.
Oh, bring back my Bonnie to me.
My Bonnie lies over the ocean. My Bonnie lies over the sea. My Bonnie lies over the ocean. Oh, bring back my Bonnie to me.


Our talk selection process has just wrapped up and we're eager to announce the presentations for this year's conference. Each year we select talks that emphasize intersections between tech writers and developers, because we all have so much to learn from each other.
In the next few weeks, we'll be announcing the details for the conference events: the annual hike on Saturday, the writing day and reception on Sunday, and the official party on Monday evening.
If you haven't purchased your ticket yet, you still have some time. You can pick up your tickets here.
Coming to Portland, but need help planning your stay? We have published some resources on where to stay and how to get around.
Here is the full list of presentations for Write the Docs North America 2015:
We also have the full talk abstracts available on our website.
Sponsorship is one of the reasons we are able to have such a wonderful conference each year. We're happy to have the following additional sponsors join us in supporting the Write the Docs community:
We're anticipating another fantastic conference, and we look forward to seeing you all in May!


Boilerplate is any text that is or can be reused in new contexts or applications without being greatly changed from the original.
"Boiler plate" originally referred to the maker's label used to identify the builder of steam boilers.
In the field of printing, the term dates back to the early 1900s. From the 1890s onwards, printing plates of text for widespread reproduction such as advertisements or syndicated columns were cast or stamped in steel (instead of the much softer and less durable lead alloys used otherwise) ready for the printing press and distributed to newspapers around the United States. They came to be known as 'boilerplates'. Until the 1950s, thousands of newspapers received and used this kind of boilerplate from the nation's largest supplier, the Western Newspaper Union.
Some companies also sent out press releases as boilerplate so that they had to be printed as written. The modern equivalent is the press release boilerplate, or "boiler," a paragraph or two that describes the company and its products.
In contractual law, the term "boilerplate language" describes the parts of a contract that are considered standard.
Boilerplate language may also exist in pre-created form letters on the Internet for such things as issues to be broached by a politician based on an issue ad, requests that a cable or satellite operator add a cable network to a system, pre-written complaints about a product that is opposed by groups that create such letters, or online petitions. The person requesting the action usually only needs to type or sign his or her name at the end of the pre-written greeting and body.
In computer programming, boilerplate is the sections of code that have to be included in many places with little or no alteration. Such boilerplate is particularly salient when the programmer must include a lot of code for minimal functionality. The need for boilerplate can be reduced through high-level mechanisms.
A related phenomenon, bookkeeping code, is code that is not part of the business logic but is interleaved with it in order to keep data structures updated or able to handle secondary aspects of the program.


FREQUENCY A film review by Christopher Null Copyright 2000 filmcritic.com filmcritic.com
The time travel/time bending genre always seems worn out. The very topic lends itself to the production of hacky movies like Millennium, and yet I am constantly surprised to see one film after another making good on the hidden promise of the genre. Witness the Back to the Future series and the powerful 12 Monkeys. As it turns out, mucking with time actually pays off more often than not!
Not only is Frequency a good flick, it's fully worthy of a place among one of the best timetwisters ever made.
Incorrectly being marketed as a sci-fi movie (not to mention poorly-titled and bearing the dumb tagline "What if it changed everything?"), Frequency is the story of a father and son, reunited across time through a ham radio and the rare appearance of the aurora borealis over Queens.
 When John, just about scraping the bottom of his life, finds his long-dead dad's old radio set in a footlocker, he plugs it in and hears a mysterious voice on the other end. As you can imagine, beyond all expectation, it's his father communicating from back in time... the day before he is about to die.
Frequency soon becomes infinitely more complex when John tells Frank of his imminent demise. "Go the other way" in that burning warehouse, and he would have lived. A skeptical Frank tests Jim's prognostications (the "Amazin' Mets" World Series being the backdrop for the 1969 action), and when the warehouse fire materializes as promised, Frank decides to take the advice, surviving the blaze.
And, er, it really does change everything.
All those geeky "what if" questions you may have had about mucking with the past are addressed in Frequency, with much of the film taking on the form of a whodunit, as father and son try to find a serial killer that crops up when Frank's survival alters the course of history. The twists and turns are fascinating and unpredictable; in fact, Frequency marks one of the extremely few times I've watched a movie where I honestly had no idea what was going to happen next.
Even more amazing is that Frequency marks writer Toby Emmerich's first script: Emmerich is actually a music executive at New Line Cinema! Director Gregory Hoblit's best-known work is probably that dog of a movie Primal Fear, and he's come up with genius here. And the acting is first-rate, especially Quaid, who I haven't seen shine in a decade. Altogether, if there is any justice in the world, Frequency should become this year's Sixth Sense.
Highly recommended.
RATING: ****1/2
|------------------------------| \ ***** Perfection \ \ **** Good, memorable film \ \ *** Average, hits and misses \ \ ** Sub-par on many levels \ \ * Unquestionably awful \ |------------------------------|
MPAA Rating: PG-13
Director: Gregory Hoblit Producer: Bill Carraro, Toby Emmerich, Gregory Hoblit, Howard W. Koch Jr. Writer: Toby Emmerich Starring: Dennis Quaid, Jim Caviezel, Shawn Doyle, Elizabeth Mitchell, André Braugher, Frank McAnulty, Noah Emmerich
http://www.frequencymovie.com/ --- Christopher Null -<EMAIL_ADDRESS>- http://www.filmcritic.com
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


Structure to store the high level setup request. More...
Public Attributes | |
| struct uhd_ctrl_request_t * | next_request |
| Next setup request to process. More... | |
| uhd_callback_setup_run_t | callback_run |
| Callback called when buffer is empty or full. More... | |
| uhd_callback_setup_end_t | callback_end |
| Callback called when request is completed. More... | |
| uint8_t * | payload |
| Buffer to store the setup DATA phase. More... | |
| uint8_t | add |
| USB address of control endpoint. More... | |
| USBGenericRequest | req |
| Setup request definition. More... | |
| uint16_t | payload_size |
| Size of buffer used in DATA phase. More... | |
Structure to store the high level setup request.
| uint8_t uhd_ctrl_request_t::add |
USB address of control endpoint.
| uhd_callback_setup_end_t uhd_ctrl_request_t::callback_end |
Callback called when request is completed.
| uhd_callback_setup_run_t uhd_ctrl_request_t::callback_run |
Callback called when buffer is empty or full.
| struct uhd_ctrl_request_t* uhd_ctrl_request_t::next_request |
Next setup request to process.
| uint8_t* uhd_ctrl_request_t::payload |
Buffer to store the setup DATA phase.
| uint16_t uhd_ctrl_request_t::payload_size |
Size of buffer used in DATA phase.
| USBGenericRequest uhd_ctrl_request_t::req |
Setup request definition.