3 Building your first mixed model
3.1 Building from the ground up
Let’s start with the simplest linear model: only an intercept. This looks like: \[\begin{equation} \vec{y} = \begin{bmatrix} 1\\...\\1 \end{bmatrix} * \beta_0 + \epsilon \tag{3.1} \end{equation}\]
wherу \(\vec{y}\) is a vector with the measurements we want to model (in our example, Effect_Size), \(\beta_0\) is the intercept, and \(\epsilon\) is residual error. The length of the ones vector is the same as the number of observations in \(\vec{y}\). Essentially, this model is predicting the same number for every single measurement.
In R syntax, we can say that \(\vec{y}\) is proportional to some value (and estimate the coefficients that make this proportion work out). In this case, we assume that each value in \(\vec{y}\) is a constant and therefore proportional to 1:
\[\begin{equation} y \propto 1 \tag{3.2} \end{equation}\]
Here’s what it looks like in the code:
# specify the model
m.lin.noCond = lm(Effect_Size ~ 1, data = data.md.red)
# show the result
summary(m.lin.noCond)
##
## Call:
## lm(formula = Effect_Size ~ 1, data = data.md.red)
##
## Residuals:
## Min 1Q Median 3Q Max
## -3.2640 -0.4187 -0.0466 0.3720 3.6304
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.41824 0.01044 40.08 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.717 on 4719 degrees of freedom
The most interesting section in this summary is the “coefficients” section, which shows us the estimates for the fixed effects. Here, it’s just the intercept, which has the estimated value of 0.418 and is significantly greater than 0 (p < .001).
What does this number mean in practice? This is just the average response level across all our datapoints. That’s what happens when you don’t add any structure to your model - the average is the best estimate.
3.2 A model with 1 fixed effect
Let’s add a single fixed predictor. Now our effect size \(\vec{y}\) depends not only on the mean response, but also on the experimental condition. The general formula for such a design looks like this:
\[\begin{equation} y = X * \vec{\beta} + \epsilon \tag{3.3} \end{equation}\]
What’s X? X is the design matrix; it specifies our fixed effects for this model (fixed effects are like regular regression terms - in fact, if you’ve seen matrix-form regression equations before, this should all be familiar).
The size of X will depend on the number of conditions. How many conditions do we have here?
## Factor w/ 2 levels "W","S": 2 1
We have 2 conditions, words (W) and sentences (S). So our design matrix will look something like the following:
\[\begin{equation} X = \begin{bmatrix} 1 & 0 \\ 1 & 0 \\ ...\\ 1 & 1 \end{bmatrix} \tag{3.4} \end{equation}\]
where the first column is our intercept and the second column has 1 whenever that row comes from the Sentence condition and 0 otherwise.
Where is the Word condition?
Turns out that, by default, the first level of a factor variable gets treated as the reference level (\(\beta_{0}\)). So here, the response to words is our intercept, and the response to sentences is the stuff you would get “on top” of the word-induced activation - in other words, the magnitude of the S>N contrast. The intercept, in turn, would give you the average magnitude of the W>0 contrast.
This might sound a bit counterintuitive, but imagine if we tried to specify the intercept, word and sentence as 3 separate effects to estimate. Then we could still compare sentences to words, but would have trouble distinguishing the words from the intercept. If our observed response to words is 1.2, does the intercept contribute 0 and words 1.2? intercept 1.2 and words 0? intercept 0.6 and words 0.6? There is an infinite number of combinations.
(Mathematically, we can state that the matrix (3.4) would be rank-deficient if we added the predictor variable for S, since it’s a direct complement of W. Thus, there would be an infinite number of coefficients \(\beta\) for solving equation (3.3))
Bottom line: if you have n levels, you can estimate the maximum of n effects.

##
## Call:
## lm(formula = Effect_Size ~ Condition, data = data.md.red)
##
## Residuals:
## Min 1Q Median 3Q Max
## -3.2080 -0.4233 -0.0426 0.3806 3.5744
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.47423 0.01471 32.228 < 2e-16 ***
## ConditionS -0.11198 0.02081 -5.381 7.77e-08 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.7148 on 4718 degrees of freedom
## Multiple R-squared: 0.0061, Adjusted R-squared: 0.005889
## F-statistic: 28.95 on 1 and 4718 DF, p-value: 7.77e-08
We do not need to explicitly specify an intercept: a model with +1 is the same as a model without it
##
## Call:
## lm(formula = Effect_Size ~ 1 + Condition, data = data.md.red)
##
## Residuals:
## Min 1Q Median 3Q Max
## -3.2080 -0.4233 -0.0426 0.3806 3.5744
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.47423 0.01471 32.228 < 2e-16 ***
## ConditionS -0.11198 0.02081 -5.381 7.77e-08 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.7148 on 4718 degrees of freedom
## Multiple R-squared: 0.0061, Adjusted R-squared: 0.005889
## F-statistic: 28.95 on 1 and 4718 DF, p-value: 7.77e-08
We can explicitly supress the intercept. The resulting model is the same in terms of its predicted y values, but the coefficients and their interpretation are different.
THINK: Which two contrasts does this no-intercept model evaluate? (Hint: you can compare these numbers with the numbers produced by the previous model)
##
## Call:
## lm(formula = Effect_Size ~ 0 + Condition, data = data.md.red)
##
## Residuals:
## Min 1Q Median 3Q Max
## -3.2080 -0.4233 -0.0426 0.3806 3.5744
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## ConditionW 0.47423 0.01471 32.23 <2e-16 ***
## ConditionS 0.36225 0.01471 24.62 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.7148 on 4718 degrees of freedom
## Multiple R-squared: 0.2585, Adjusted R-squared: 0.2582
## F-statistic: 822.4 on 2 and 4718 DF, p-value: < 2.2e-16
3.3 Was it worth it? Model comparison
Does the model with Condition as a fixed effect explain more variance than the intercept-only model? To find out, we can compare the two models using the anova function. This function implements the likelihood ratio test.
NOTE: the likelihood ratio (LR) test only works for nested models, i.e. models that have the same structure except that one model has some additional terms. The LR test would then tell us whether these terms are worth adding - in formal words, whether they significantly improve model fit. If you want to compare non-nested models, you can use other methods, such as AIC.
# for models with random effects, you can just use "anova(m1, m2)" to get the same result
lme4:::anova.merMod(m.lin.noCond, m.lin)
## Data: data.md.red
## Models:
## m.lin.noCond: Effect_Size ~ 1
## m.lin: Effect_Size ~ Condition
## Df AIC BIC logLik deviance Chisq Chi Df Pr(>Chisq)
## m.lin.noCond 2 10257 10270 -5126.4 10253
## m.lin 3 10230 10249 -5111.9 10224 28.878 1 7.709e-08 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
We see that the models are significantly different from each other (\(X^2\)(1)=28.9, p<.001) and that the second model explains more variance: under m.lin
, the data have higher (“less negative”) log likelihood. Thus, we can conclude that the second model provides a better fit to the data.
3.4 Adding random intercepts
3.4.1 Random intercept #1: participant
Now we’re ready to actually build a mixed effect model.
Our previous model assumed that all our participants had the same response to the S and W conditions - any variation was put in the error term. However, we know that some participants tend to have generally high responses and vice versa; thus, we might expect someone with a really high response to words to also have a high response to sentences. Can we incorporate that knowledge into the model?
We can! Let’s tell the model that the intercept varies across participants by adding an additional term to it:
\[\begin{equation} y = X * \vec{\beta} + \begin{bmatrix} 1\\...\\1 \end{bmatrix} * \vec{b} + \epsilon \tag{3.5} \end{equation}\]
Here, \(\vec{b}\) specifies a participant-specific offset in the response strength - some will be above average, and some below average. This offset is not condition-specific (yet).
Why do we call it a random effect? Unlike Condition, each \(\vec{b}\) value is participant-specific. Still, we could just add a bunch of columns to X for each participant and put 1’s against all trials completed by any particular participant. Then our participant-specific estimates would just be added to \(\vec{\beta}\).
In some cases, modeling participant-specific variation as a fixed effect might be a valid approach - for instance, if you have 3 participants and a ton of data for each. However, in our case, we have many participants but not much participant-specific data, so we would just get a lot of noisy effects. Moreover, all the-participant specific terms have something in common - they are not fully independent. For example, if your participant intercepts are 1, 1.1, 0.9, 1.2, you have a pretty strong hunch that the next one is not going to be 15. Mathematically, we can state that participant-specific intercepts come from a normal distribution where the mean is the group intercept (estimated as the first term in \(\vec{\beta}\)), and the variance is a free parameter we need to estimate.
Thus, our \(\vec{b}\) term is never evaluated directly! It is a random variable of the form
\[\begin{equation} \vec{b} \sim \mathcal{N}(0,\sigma^{2}) \end{equation}\]
(the mean is 0 because this term is only estimating the participant-specific offset from the overall intercept)
With this ‘random effect’ trick, we achieve three goals:
We estimate the intercept effects across all participants by specifying just one parameter - \(\sigma^{2}\).
We leverage the power of all the dataset, not just the participant-specific data. Thus if any one participant’s values are unusually high, it would not have a strong result on the model - the normal distribution will “regularize” the estimates for that participant.
We make generalizable inferences: instead of estimating the effects for each specific participant, we produce an estimate for the entire population.
LET’S RUN OUR FIRST MIXED EFFECT MODEL!
The previous models did not have any random terms, and so we evaluated it using the ‘lm’ function. For mixed models, we use ‘lmer’.
# I want to evaluate the model by maximum likelihood, not restricted maximum likelihood (REML),
# so I'm setting REML to FALSE
# (this will allow us to use the "anova" function later)
m.ri1 = lmer(Effect_Size ~ Condition + (1 | SubjectID), data = data.md.red,
REML=FALSE);
summary(m.ri1)
## Linear mixed model fit by maximum likelihood . t-tests use
## Satterthwaite's method [lmerModLmerTest]
## Formula: Effect_Size ~ Condition + (1 | SubjectID)
## Data: data.md.red
##
## AIC BIC logLik deviance df.resid
## 7735.1 7761.0 -3863.6 7727.1 4716
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -5.4796 -0.5633 -0.0710 0.4803 5.7666
##
## Random effects:
## Groups Name Variance Std.Dev.
## SubjectID (Intercept) 0.2365 0.4864
## Residual 0.2758 0.5252
## Number of obs: 4720, groups: SubjectID, 115
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## (Intercept) 0.47069 0.04663 121.41170 10.094 < 2e-16 ***
## ConditionS -0.11198 0.01529 4604.97757 -7.324 2.82e-13 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr)
## ConditionS -0.164
Note that the fixed effects structure is the same as before, but now we also have the “random effects” section, which tells us how much variance was explained by the intercept varying across participants and how much is left in the residuals.
The fixed effect estimates themselves have changed - adding the random effect changes the way the model is fitted to the data.
Does this random effect add to explained variance compared to the fixed-effect-only model?
## Data: data.md.red
## Models:
## m.noR: Effect_Size ~ 0 + Condition
## m.ri1: Effect_Size ~ Condition + (1 | SubjectID)
## Df AIC BIC logLik deviance Chisq Chi Df Pr(>Chisq)
## m.noR 3 10229.9 10249 -5111.9 10223.9
## m.ri1 4 7735.1 7761 -3863.6 7727.1 2496.7 1 < 2.2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
3.4.2 Random intercept #2: experiment
Another way to think about random effects is that they specify additional clusters in the data. For instance, most datapoints from participant A will be shifted above the mean, while most datapoints from participant B will be below the mean. Points A and points B will form two different clusters.
The dataset we’re using has another obvious source of clusters - it was collected across multiple experiments. Although we would hope that the data we record would be unaffected by the specific experimental conditions, in practice this is rarely the case. The data might be collected on different MRI scanners, during different seasons, the Sentence & Word blocks might have had different lengths, etc. If you have all this information and you think that each variable might affect your results, then you can go ahead and enter these terms directly. However, we here will just use Experiment.
We assume that the mean responses to both conditions will vary across experiments (and, as before, across participants).
To save space, from now on we will only print out fixed and random effect estimates.
m.ri2 = lmer(Effect_Size ~ Condition + (1 | SubjectID) + (1 | Experiment), data = data.md.red,
REML=FALSE);
coef(summary(m.ri2)) # fixed
## Estimate Std. Error df t value Pr(>|t|)
## (Intercept) 0.4563056 0.08056281 7.579646 5.663973 5.752963e-04
## ConditionS -0.1119761 0.01526275 4603.939404 -7.336561 2.576588e-13
## Groups Name Std.Dev.
## SubjectID (Intercept) 0.44329
## Experiment (Intercept) 0.16633
## Residual 0.52429
Previous model (m.ri1) reminder: ConditionW 0.47069 ConditionS -0.11198
We see again that changing the random effect structure affects the fixed effects too.
Let’s compare our models to see if adding the experiment intercept actually improved model fit.
## Data: data.md.red
## Models:
## m.ri1: Effect_Size ~ Condition + (1 | SubjectID)
## m.ri2: Effect_Size ~ Condition + (1 | SubjectID) + (1 | Experiment)
## Df AIC BIC logLik deviance Chisq Chi Df Pr(>Chisq)
## m.ri1 4 7735.1 7761.0 -3863.6 7727.1
## m.ri2 5 7709.9 7742.2 -3850.0 7699.9 27.236 1 1.801e-07 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
It did! We have a significant difference between the models, with model 2 having a higher log likelihood of the data.
3.4.3 Random intercept #3: region
Finally, we know that different brain regions have different levels of BOLD activity: for example, regions close to large vessels will have strong responses to everything.
m.ri3 = lmer(Effect_Size ~ Condition + (1 | SubjectID) + (1 | Experiment) + (1 | Region),
data = data.md.red, REML=FALSE);
coef(summary(m.ri3)) # fixed
## Estimate Std. Error df t value Pr(>|t|)
## (Intercept) 0.4566623 0.09492157 12.84781 4.810944 3.514693e-04
## ConditionS -0.1119761 0.01390210 4584.90113 -8.054616 1.007830e-15
## Groups Name Std.Dev.
## SubjectID (Intercept) 0.44491
## Region (Intercept) 0.21771
## Experiment (Intercept) 0.16917
## Residual 0.47755
Previous model (m.ri2) reminder: ConditionW 0.4563056 ConditionS -0.1119761
This time, the fixed effect estimates remained almost the same.
But did adding a random intercept by region improve model fit further? Yes, it did.
## Data: data.md.red
## Models:
## m.ri2: Effect_Size ~ Condition + (1 | SubjectID) + (1 | Experiment)
## m.ri3: Effect_Size ~ Condition + (1 | SubjectID) + (1 | Experiment) +
## m.ri3: (1 | Region)
## Df AIC BIC logLik deviance Chisq Chi Df Pr(>Chisq)
## m.ri2 5 7709.9 7742.2 -3850.0 7699.9
## m.ri3 6 6927.0 6965.8 -3457.5 6915.0 784.88 1 < 2.2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
3.5 It gets better - random slopes
Ok, our model is getting pretty complicated. But as you were reading about all those random intercepts, you might have been wondering - what if it’s not just the mean activity that varies across participants/regions/experiments? What if participant A not only has stronger activity overall but also has stronger responses to Sentences specifically?
This kind of structure can be captured too. We call it a random slope because if we plot Condition on the x axis and Response on the y axis, the effect of interest will be the slope of the line going from the W value to the S value. High slope = steeper increase in activation as we go from W to S.
Remember that so far we have been specifying our random effects as (1 | RandomVar). What does this mean? It means, take the random effect on the right and estimate how it varies according to the fixed effects on the left. So far we’ve just had 1 on the left, which is our intercept. But now we also want to say that our random variables can vary by condition, so we add it to the left side too.
## Warning in checkConv(attr(opt, "derivs"), opt$par, ctrl =
## control$checkConv, : Model failed to converge with max|grad| = 0.0294832
## (tol = 0.002, component 1)
Uh oh, what happened here? We get a warning saying that our model failed to converge. That’s not good - it means that our effect estimates might be imprecise.
What can we do to solve this? There are a few technical tricks we can use to force the model to converge (see section 4.3). But generally, the reason why our model here doesn’t converge is because it’s too complicated - we have too many variables and not enough data. So for now, let’s simplify and just add one random slope.
m.ris = lmer(Effect_Size ~ Condition + (1 + Condition | SubjectID) + (1 | Experiment) + (1 | Region), data = data.md.red, REML=FALSE);
coef(summary(m.ris)) # fixed
## Estimate Std. Error df t value Pr(>|t|)
## (Intercept) 0.4552242 0.09588469 13.57937 4.747622 0.0003385923
## ConditionS -0.1088011 0.03287757 115.00448 -3.309282 0.0012494232
## Groups Name Std.Dev. Corr
## SubjectID (Intercept) 0.47456
## ConditionS 0.32323 -0.343
## Region (Intercept) 0.21798
## Experiment (Intercept) 0.16834
## Residual 0.44852
Note that the model also estimates the covariance between the random effect’s intercept and slope (in essence, an extra variable to take care of). Here, the intercept and the slope are correlated: participants with higher overall responses will also have a higher S>W value.
THINK: how can we modify equation (3.5) to incorporate the random slope by condition?
Let’s check: did adding a random slope help beyond random intercepts? It did.
## Data: data.md.red
## Models:
## m.ri3: Effect_Size ~ Condition + (1 | SubjectID) + (1 | Experiment) +
## m.ri3: (1 | Region)
## m.ris: Effect_Size ~ Condition + (1 + Condition | SubjectID) + (1 |
## m.ris: Experiment) + (1 | Region)
## Df AIC BIC logLik deviance Chisq Chi Df Pr(>Chisq)
## m.ri3 6 6927.0 6965.8 -3457.5 6915.0
## m.ris 8 6567.3 6619.0 -3275.7 6551.3 363.69 2 < 2.2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Note that here I decided to only keep the random slope by participant, and it happened to actually be helpful. If possible, you should be more systematic when deciding on model structure. For details, see section 4.3.4.
3.6 Interactions, or Fixed effects can be complicated too
I will leave you with a final twist on our model.
So far we’ve only looked at Condition as our fixed effect: our goal was to get to random effects as soon as possible. But there is another important source of variation in our data - Hemisphere.
Since there are only two hemispheres, there is no reason to include it as a random effect (in this case, we’d have to imagine left and right hemispheres as samples from an infinite population of hemispheres…). So this is going to be our second fixed effect.
m.ris2 = lmer(Effect_Size ~ Condition + Hemisphere + (1 + Condition | SubjectID) + (1 | Experiment) + (1 | Region), data = data.md.red, REML=FALSE);
coef(summary(m.ris2)) # fixed
## Estimate Std. Error df t value Pr(>|t|)
## (Intercept) 0.5154497 0.10594841 18.13017 4.865101 0.0001220173
## ConditionS -0.1088011 0.03287916 114.99242 -3.309121 0.0012501139
## HemisphereR -0.1204575 0.09446622 19.44581 -1.275139 0.2172850860
## Groups Name Std.Dev. Corr
## SubjectID (Intercept) 0.47453
## ConditionS 0.32325 -0.343
## Region (Intercept) 0.20921
## Experiment (Intercept) 0.16812
## Residual 0.44852
Great, now we know that left and right hemisphere do not have significantly different overall activity levels1. But we also want to know whether our Condition effects vary by Hemisphere. What do we need to include? An interaction.
m.ris3 = lmer(Effect_Size ~ Condition*Hemisphere + (1 + Condition | SubjectID) + (1 | Experiment) + (1 | Region), data = data.md.red, REML=FALSE);
coef(summary(m.ris3)) # fixed
## Estimate Std. Error df t value
## (Intercept) 0.49408827 0.10613083 18.29735 4.6554643
## ConditionS -0.06607851 0.03537294 153.88236 -1.8680525
## HemisphereR -0.07773581 0.09537081 20.18837 -0.8150901
## ConditionS:HemisphereR -0.08544343 0.02608228 4469.92124 -3.2759190
## Pr(>|t|)
## (Intercept) 0.0001890031
## ConditionS 0.0636561836
## HemisphereR 0.4245326473
## ConditionS:HemisphereR 0.0010612211
## Groups Name Std.Dev. Corr
## SubjectID (Intercept) 0.47461
## ConditionS 0.32334 -0.343
## Region (Intercept) 0.20923
## Experiment (Intercept) 0.16803
## Residual 0.44798
Here, * is a shortcut meaning “estimate the main effects and the interaction”. Thus Condition*Hemisphere
is equivalent to Condition + Hemisphere + Condition:Hemisphere
, where :
stands for the interaction itself.
And hey, looks like the Sentence responses in the right hemisphere MD regions are weaker than in the left.
Let’s do a final formal check to see whether adding the hemisphere terms was useful.
## Data: data.md.red
## Models:
## m.ris: Effect_Size ~ Condition + (1 + Condition | SubjectID) + (1 |
## m.ris: Experiment) + (1 | Region)
## m.ris3: Effect_Size ~ Condition * Hemisphere + (1 + Condition | SubjectID) +
## m.ris3: (1 | Experiment) + (1 | Region)
## Df AIC BIC logLik deviance Chisq Chi Df Pr(>Chisq)
## m.ris 8 6567.3 6619.0 -3275.7 6551.3
## m.ris3 10 6559.1 6623.7 -3269.5 6539.1 12.28 2 0.002155 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Yup, we explained additional variance.
3.7 Summary
- Fixed effects in a linear mixed effect model act just like regular regression terms.
- For categorical variables, the first level of a fixed effect variable acts as the intercept (unless you explicitly set the intercept to 0).
- Random effects are not simple regression terms; they are random variables. As such, you don’t estimate a value for each level (e.g. mean activation for each participant) but instead find the variance around the mean. For instance, you might estimate how much each participant’s data are likely to deviate from the mean value.


I didn’t even know this existed. It could be that I am a little tired because it is 2:20 am and I want to finish this blog but with so many issues regarding so many aspects of social integration I am getting immune to the issues. I will need to spend more time trying to wrap my head around yet another issue to be on the lookout for in this world we call life.


Reports FlexUnit 4 test suites with missing or empty
[RunWith]
metadata. Such suites cannot be run by the FlexUnit runner.


Ambient Light
Accelerometer
Gyroscope
Magnetometer (magnet + accel)
Complementary filter (accel + gyro)
Kalman filter (accel + gyro)
Absolute Orientation (accel + gyro + mag)
Daydream Controller
Zephyr Device
Thingy:52 Device
Device itself


TREK
Search available trips by category:
Name
Category
Continent
Weeks
Weeks
Add New Trip
Available trips!
Name
Continent
Category
Weeks
Cost
Your
journey
awaits!
×
Make a new trip!
Name
Continent
Category
Weeks
Cost
Description
Make a New Trip!


Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
Class List
Class Hierarchy
Class Members
All
Functions
Variables
Typedefs
Related Functions
a
b
c
d
e
f
g
h
i
m
n
o
p
r
s
t
u
v
w
x
y
Here is a list of all class members with links to the classes they belong to:
- r -
ra :
boost::geometry::de9im_segment
range_count :
boost::geometry::section< Box, DimensionCount >
rays_intersect() :
boost::geometry::policies::relate::segments_de9im< S1, S2 >
rb :
boost::geometry::de9im_segment
reference :
boost::geometry::segment_iterator< Base, Point >
result() :
boost::geometry::strategy::area::by_triangles< PointOfSegment, CalculationType >
,
boost::geometry::strategy::centroid_::bashein_detmer< Point, PointOfSegment, CalculationType >
,
boost::geometry::strategy::within::crossings_multiply< Point, PointOfSegment, CalculationType >
,
boost::geometry::strategy::within::franklin< Point, PointOfSegment, CalculationType >
,
boost::geometry::strategy::convex_hull::graham_andrew< InputGeometry, OutputPoint >
,
boost::geometry::strategy::area::huiller< PointOfSegment, CalculationType >
,
boost::geometry::strategy::within::winding< Point, PointOfSegment, CalculationType >
result_type :
boost::geometry::less< Point, Dimension, Strategy >
return_type :
boost::geometry::policies::relate::segments_intersection_points< S1, S2, ReturnType, CalculationType >
,
boost::geometry::strategy::distance::pythagoras< Point1, Point2, CalculationType >
,
boost::geometry::policies::relate::segments_intersection_points< S1, S2, ReturnType, CalculationType >
,
boost::geometry::policies::relate::segments_tupled< Policy1, Policy2, CalculationType >
,
boost::geometry::strategy::area::by_triangles< PointOfSegment, CalculationType >
,
boost::geometry::strategy::distance::cartesian_nearest_neighbor_segment_strategy< Point, Segment, Strategy >
,
boost::geometry::strategy::distance::projected_point< Point, PointOfSegment, Strategy >
,
boost::geometry::strategy::area::huiller< PointOfSegment, CalculationType >
,
boost::geometry::policies::relate::segments_direction< S1, S2, CalculationType >
,
boost::geometry::strategy::distance::cross_track< Point, PointOfSegment >
,
boost::geometry::strategy::distance::haversine< Point1, Point2 >
,
boost::geometry::policies::relate::segments_de9im< S1, S2 >
reverse() :
boost::geometry::side_info
rico() :
boost::geometry::policies::relate::segments_intersection_points< S1, S2, ReturnType, CalculationType >
ring_index :
boost::geometry::segment_identifier
,
boost::geometry::section< Box, DimensionCount >
ring_type :
boost::geometry::polygon< Point, PointList, RingList, ClockWise, PointAlloc, RingAlloc >
rotate_transformer() :
boost::geometry::strategy::transform::rotate_transformer< P1, P2, DegreeOrRadian >
rtype :
boost::geometry::policies::relate::segments_direction< S1, S2, CalculationType >
,
boost::geometry::policies::relate::segments_tupled< Policy1, Policy2, CalculationType >
,
boost::geometry::policies::relate::segments_intersection_points< S1, S2, ReturnType, CalculationType >
December 1, 2009
Copyright © 1995-2009 Barend Gehrels, Geodan, Amsterdam
Copyright © 2008-2009 Bruno Lalande, Paris
Copyright © 2009 Mateusz Loskot, Cadcorp, London
Documentation is generated by
Doxygen


About
Contact
“ALCOHOL MAY BE MAN’S WORST ENEMY, BUT THE BIBLE SAYS LOVE YOUR ENEMY.”
frank sinatra
GO


NOTE: Slightly different base URL: https://eagleeyenetworks.com/ (no trailing "/g/")
This service offers native PNG span rendering to support metric visualization. For spans, the image is filled with the foreground color where the specified span is active, and with the background where it is inactive. At least one pixel will be filled for a span, independent of scale, though the span may overlap others. For etags, one pixel is filled for each active event, but as with spans the pixel may overlap others.
content-location: resource actually rendered. absolute start/end ts and either table/etag depending on whether an index was used
The pngspan is a very efficient mechanism for visualizing where metrics and spans are active. Scale the image vertically as needed. PNG are extremely compact - a day of spans will be a few hundred bytes.
Tile the PNGs for fast, infinite scrolling. Render a width/timespan that represents a rational chunk of the current screen - say 4 hours in a day view. Fill the screen with tiles, fetch offscreen at the same size in preparation to scroll. Change origin of each entity to accomplish fast smooth scrolling. Fetch successive offscreen buffers as they come on screen.
Hit detection (for rollover) can be done in a browser by rendering opaque colors and reading pixels values from a one pixel high offscreen image. If an active pixel is detected, fetch the window of events around the timestamp estimate (since the pixel resolution is usually much less than the ms resolution needed for a timestamp), and use the response to determine what metric/span to display (ie the closest one…).


Feedback Welcome
- As a community project, insight and ideas from professionals like you guide the development of this site.
- add_box Post a suggestion
- email Get in touch
--- link_to_grantmakers: https://www.grantmakers.io ---
Search through all {{ site.number_of_grants | divided_by: 1000000 }}.{{ site.number_of_grants | modulo: 1000000 | divided_by: 100000 }} million grants contained in the public IRS 990-PF dataset


Wanna format your text? Your content will be rendered with Markdown.
Posts are capped at a million characters.
ploe.co.uk - all rights reserved for the respective contributors


Whistlerr detects whistling sounds from the microphone using the Web Audio API. It's based on a research paper Human Whistle Detection and Frequency Estimation by M. Nilsson.
Click Here to start detecting. You'll need to give permission to access the microphone.
Blow a whistle and watch as the particles swirl. Please excuse the false positives! :)


Transitions
Transition Timing Function
.transition-timing-ease
.transition-timing-ease-in
.transition-timing-ease-out
.transition-timing-ease-in-out
.transition-timing-linear
Transition Property
.transition-all
.transition-width
Transition Duration
.transition-duration-normal
.transition-duration-fast
.transition-duration-slow


ShouldSendOutboundConfEmails {{ ShouldSendOutboundConfEmails}}
ShouldIncludePdfsInReceivedFaxEmails {{ShouldIncludePdfsInReceivedFaxEmails}}
DefaultOutboundFaxCallbackUrl {{DefaultOutboundFaxCallbackUrl}}
Guid {{Guid}}


|
Class Summary |
| AbstractDOMFragment |
Abstract implementation of XMLFragment for objects that are more easily represented
as a DOM.
|
| AbstractSAXFragment |
Abstract implementation of XMLFragment for objects that are more easily represented
as SAX events.
|
| AbstractXMLConsumer |
This abstract class provides default implementation of the methods specified
by the XMLConsumer interface. |
| AbstractXMLPipe |
This class provides a bridge class to connect to existing content
handlers and lexical handlers. |
| AbstractXMLProducer |
This abstract class provides default implementation of the methods specified
by the XMLProducer interface. |
| ContentHandlerWrapper |
This class is an utility class "wrapping" around a SAX version 2.0
ContentHandler and forwarding it those events received throug
its XMLConsumers interface.
|
| DocumentHandlerAdapter |
This class is an utility class "adapting" a SAX version 1.0
DocumentHandler , to SAX version 2 ContentHandler .
|
| DocumentHandlerWrapper |
This class is an utility class "wrapping" around a SAX version 1.0
DocumentHandler and forwarding it those events received throug
its XMLConsumers interface.
|
| EmbeddedXMLPipe |
This class implements a ContentHandler for embedding a full SAX
event stream into an existing stream of SAX events. |
| IncludeXMLConsumer |
A special purpose XMLConsumer used for including files.
|
| LoggingEntityResolver |
Logging entity resolver to assist in caching. |
| NamespacesTable |
This utility class is used to keep track namespaces declarations and resolve
namespaces names. |
| XMLMulticaster |
|
| XMLUtils |
XML utility methods |


| Up | TOC | Index | |||||
| << 7 Included Tools | < 8.5 File System | Up: 8 API Reference | 8.7 Operating System Helpers > | 9 Release Notes >> |
8.6 I/O
8.6.1 Constants
<IP_ADDRESS> STDIN
include std/io.e namespace io public constant STDIN
Standard Input
<IP_ADDRESS> STDOUT
include std/io.e namespace io public constant STDOUT
Standard Output
<IP_ADDRESS> STDERR
include std/io.e namespace io public constant STDERR
Standard Error
<IP_ADDRESS> SCREEN
include std/io.e namespace io public constant SCREEN
Screen (Standard Out)
<IP_ADDRESS> EOF
include std/io.e namespace io public constant EOF
End of file
8.6.2 Read and Write Routines
<IP_ADDRESS> using
<built-in> procedure ?
displays an object using numbers and braces.
Note:
There are no parenthesis delimiting the single argument to this procedure. This is a unique shortcut in Euphoria syntax.
Comments:
This is a shorthand way of writing pretty_print(STDOUT, x, {}). An object or an expression is printed to the standard output with braces and indentation to show the structure.
Example 1:
? {1, 2} + {3, 4} -- will display {4, 6}
See Also:
<IP_ADDRESS> print
<built-in> procedure print(integer fn, object x)
displays an object using numbers and braces.
Comments:
All data objects are in binary format within computer hardware; something that is easy to forget. An output routine must convert these binary values into "text" to be human readable. The procedures print and ? produce a "text" representation of an object that is output to a file or device. The text shows the numerical form of the object. If the object x is a sequence it uses braces { , , , } to show the structure.
Parameters:
- fn : an integer, the handle to a file or device to output to
- x : the object to print
Errors:
The target file or device must be open and able to be written to.
Comments:
This is not used to write to "binary" files as it only outputs text.
Example 1:
include std/io.e print(STDOUT, "ABC") -- output is: "{65,66,67}" puts (STDOUT, "ABC") -- output is: "ABC" print(STDOUT, "65") -- output is: "65" puts (STDOUT, 65) -- output is: "A" (ASCII-65 ==> 'A') print(STDOUT, 65.1234) -- output is: "65.1234" puts (STDOUT, 65.1234) -- output is: "A" (Converts to integer first)
Example 2:
include std/io.e print(STDOUT, repeat({10,20}, 3)) -- output is: {{10,20},{10,20},{10,20}}
See Also:
<IP_ADDRESS> printf
<built-in> procedure printf(integer fn, sequence format, object values)
prints one or more values to a file or device, using a format string to embed them in and define how they should be represented.
Parameters:
- fn : an integer, the handle to a file or device to output to
- format : a sequence, the text to print. This text may contain format specifiers.
- values : usually, a sequence of values. It should have as many elements as format specifiers in format, as these values will be substituted to the specifiers.
Errors:
If there are less values to show than format specifiers, a run time error will occur.
The target file or device must be open.
Comments:
A format specifier is a string of characters starting with a percent sign ( % ) and ending in a letter. Some extra information may come in between those.
This procedure writes out the format text to the output file fn, replacing format specifiers with the corresponding data from the values parameter. Whenever a format specifiers is found in format, the n-th item in values will be turned into a string according to the format specifier. The resulting string will the format specifier. This means that the first format specifier uses the first item in values, the second format specifier the second item, and so on.
You must have at least as many items in values as there are format specifiers in format. This means that if there is only one format specifier then values can be either an atom, integer or a non-empty sequence. And when there are more than one format specifier in format then values must be a sequence with a length that is greater than or equal to the number of format specifiers present.
This way, printf always takes exactly three arguments no matter how many values are to be printed.
The basic format specifiers are:
- %d -- print an atom as a decimal integer
- %x -- print an atom as a hexadecimal integer. Negative numbers are printed in two's complement, so -1 will print as FFFFFFFF
- %o -- print an atom as an octal integer
- %s -- print a sequence as a string of characters, or print an atom as a single character
- %e -- print an atom as a floating-point number with exponential notation
- %f -- print an atom as a floating-point number with a decimal point but no exponent
- %g -- print an atom as a floating-point number using whichever format seems appropriate, given the magnitude of the number
- %% -- print the '%' character itself. This is not an actual format specifier.
Field widths can be added to the basic formats (for example: %5d, %8.2f, %10.4s). The number before the decimal point is the minimum field width to be used. The number after the decimal point is the precision to be used for numeric values.
If the field width is negative (for example %-5d) then the value will be left-justified within the field. Normally it will be right-justified, even strings. If the field width starts with a leading 0 (for example %08d) then leading zeros will be supplied to fill up the field. If the field width starts with a '+' (for example %+7d ) then a plus sign will be printed for positive values.
Comments:
Watch out for the following common mistake. The intention is to output all the characters in the third argument but actually only outputs the first character:
include std/io.e sequence name="John Smith" printf(STDOUT, "My name is %s", name) --> My name is J
The output of this will be My name is J because each format specifier uses exactly one item from the values parameter. In this case we have only one specifier so it uses the first item in the values parameter, which is the character 'J'. To fix this situation, you must ensure that the first item in the values parameter is the entire text string and not just a character, so you need code this instead:
include std/io.e name="John Smith" printf(STDOUT, "My name is %s", {name}) --> My name is John Smith
Now, the third argument of printf is a one-element sequence containing all the text to be formatted.
Also note that if there is only one format specifier then values can simply be an atom or integer.
Example 1:
include std/io.e atom rate = 7.875 printf(STDOUT, "The interest rate is: %8.2f\n", rate) -- The interest rate is: 7.88
Example 2:
include std/io.e sequence name="John Smith" integer score=97 printf(STDOUT, "%15s, %5d\n", {name, score}) -- " John Smith, 97"
Example 3:
include std/io.e printf(STDOUT, "%-10.4s $ %s", {"ABCDEFGHIJKLMNOP", "XXX"}) -- ABCD $ XXX
Example 4:
include std/io.e printf(STDOUT, "%d %e %f %g", repeat(7.75, 4)) -- same value in different formats -- 7 7.750000e+000 7.750000 7.75
NOTE that printf cannot use an item in values that contains nested sequences. Thus this is an error ...
include std/io.e sequence name = {"John", "Smith"} printf(STDOUT, "%s", {name} )
because the item that is used from the values parameter contains two subsequences (strings in this case). To get the correct output you would need to do this instead ...
include std/io.e sequence name = {"John", "Smith"} printf(STDOUT, "%s %s", {name[1], name[2]} )
See Also:
<IP_ADDRESS> puts
<built-in> procedure puts(integer fn, object text)
outputs text characters to a screen or file.
Parameters:
- fn : an integer, the handle to an opened file or device
- text : an object, either a single character or a sequence of characters.
Errors:
The target file or device must be open.
Comments:
This procedures outputs, to a file or device, a single byte (atom) or sequence of bytes. The low order 8-bits of each value is actually sent out. If outputting to the screen you will see text characters displayed.
When you output a sequence of bytes it must not have any sub-sequences within it. It must be a sequence of atoms only. (Typically a string of ASCII codes).
Avoid outputting 0's to the screen or to standard output. Your output might get truncated.
Remember that if the output file was opened in text mode, Windows will change \n (10) to \r\n (13 10). Open the file in binary mode if this is not what you want.
Example 1:
include std/io.e puts(SCREEN, "Enter your first name: ")
Example 2:
puts(output, 'A') -- the single byte 65 will be sent to output
See Also:
<IP_ADDRESS> getc
<built-in> function getc(integer fn)
gets the next character (byte) from a file or device fn.
Parameters:
- fn : an integer, the handle of the file or device to read from.
Returns:
An integer, the character read from the file, in the 0..255 range. If no character is left to read, EOF is returned instead.
Errors:
The target file or device must be open.
Comments:
File input using getc is buffered, that means getc does not actually go out to the disk for each character. Instead, a large block of characters will be read in at one time and returned to you one by one from a memory buffer.
When getc reads from the keyboard, it will not see any characters until the user presses Enter. Note that the user can type Control+Z, which the operating system treats as "end of file" returning EOF.
See Also:
<IP_ADDRESS> gets
<built-in> function gets(integer fn)
gets a sequence of characters.
Parameters:
- fn : an integer, the handle of the file or device to read from.
Returns:
An object, either EOF on end of file, or the next line of text from the file.
Errors:
The file or device must be open.
Comments:
This function gets the next sequence (one line, including '\n') of characters from a file or device. The characters will have values from 0 to 255.
If the line had an end of line marker, a ~'\n'~ terminates the line. The last line of a file needs not have an end of line marker.
After reading a line of text from the keyboard, you should normally output a \n character, (for example puts(1, '\n') ), before printing something. Only on the last line of the screen does the operating system automatically scroll the screen and advance to the next line.
When your program reads from the keyboard, the user can type Control+Z, which the operating system treats as "end of file". EOF will be returned.
Example 1:
sequence buffer object line integer fn -- read a text file into a sequence fn = open("my_file.txt", "r") if fn = -1 then puts(1, "Couldn't open my_file.txt\n") abort(1) end if buffer = {} while 1 do line = gets(fn) if atom(line) then exit -- EOF is returned at end of file end if buffer = append(buffer, line) end while
Example 2:
object line puts(1, "What is your name?\n") line = gets(0) -- read standard input (keyboard) line = line[1..$-1] -- get rid of \n character at end puts(1, '\n') -- necessary puts(1, line & " is a nice name.\n")
See Also:
<IP_ADDRESS> get_bytes
include std/io.e namespace io public function get_bytes(integer fn, integer n)
reads the next bytes from a file.
Parameters:
- fn : an integer, the handle to an open file to read from.
- n : a positive integer, the number of bytes to read.
Returns:
A sequence, of length at most n, made of the bytes that could be read from the file.
Comments:
When n > 0 and the function returns a sequence of length less than n you know you have reached the end of file. Eventually, an empty sequence will be returned.
This function is normally used with files opened in binary mode, "rb". This avoids the confusing situation in text mode where Windows will convert CR LF pairs to LF.
Example 1:
integer fn fn = open("temp", "rb") -- an existing file sequence whole_file whole_file = {} sequence chunk while 1 do chunk = get_bytes(fn, 100) -- read 100 bytes at a time whole_file &= chunk -- chunk might be empty, that's ok if length(chunk) < 100 then exit end if end while close(fn) ? length(whole_file) -- should match DIR size of "temp"
See Also:
getc, gets, get_integer32, get_dstring
<IP_ADDRESS> get_integer32
include std/io.e namespace io public function get_integer32(integer fh)
reads the next four bytes from a file and returns them as a single integer.
Parameters:
- fh : an integer, the handle to an open file to read from.
Returns:
An atom, between -1 and power(2,32)-1, made of the bytes that could be read from the file. When an end of file is encountered, it returns -1.
Comments:
- This function is normally used with files opened in binary mode, "rb".
Example 1:
integer fn fn = open("temp", "rb") -- an existing file atom file_type_code file_type_code = get_integer32(fn)
See Also:
getc, gets, get_bytes, get_dstring
<IP_ADDRESS> get_integer16
include std/io.e namespace io public function get_integer16(integer fh)
reads the next two bytes from a file and returns them as a single integer.
Parameters:
- fh : an integer, the handle to an open file to read from.
Returns:
An integer, made of the bytes that could be read from the file. When an end of file is encountered, it returns -1.
Comments:
- This function is normally used with files opened in binary mode, "rb".
Example 1:
integer fn fn = open("temp", "rb") -- an existing file atom file_type_code file_type_code = get_integer16(fn)
See Also:
getc, gets, get_bytes, get_dstring
<IP_ADDRESS> put_integer32
include std/io.e namespace io public procedure put_integer32(integer fh, atom val)
writes the supplied integer as four bytes to a file.
Parameters:
- fh : an integer, the handle to an open file to write to.
- val : an integer
Comments:
- This function is normally used with files opened in binary mode, "wb".
Example 1:
integer fn fn = open("temp", "wb") put_integer32(fn, 1234)
See Also:
getc, gets, get_bytes, get_dstring
<IP_ADDRESS> put_integer16
include std/io.e namespace io public procedure put_integer16(integer fh, atom val)
writes the supplied integer as two bytes to a file.
Parameters:
- fh : an integer, the handle to an open file to write to.
- val : an integer
Comments:
- This function is normally used with files opened in binary mode, "wb".
Example 1:
integer fn fn = open("temp", "wb") put_integer16(fn, 1234)
See Also:
getc, gets, get_bytes, get_dstring
<IP_ADDRESS> get_dstring
include std/io.e namespace io public function get_dstring(integer fh, integer delim = 0)
read a delimited byte string from an opened file.
Parameters:
- fh : an integer, the handle to an open file to read from.
- delim : an integer, the delimiter that marks the end of a byte string. If omitted, a zero is assumed.
Returns:
An sequence, made of the bytes that could be read from the file.
Comments:
- If the end-of-file is found before the delimiter, the delimiter is appended to the returned string.
Example 1:
integer fn fn = open("temp", "rb") -- an existing file sequence text text = get_dstring(fn) -- Get a zero-delimited string text = get_dstring(fn, '$') -- Get a '$'-delimited string
See Also:
getc, gets, get_bytes, get_integer32
8.6.3 Low Level File and Device Handling
<IP_ADDRESS> LOCK_SHARED
include std/io.e namespace io public enum LOCK_SHARED
<IP_ADDRESS> LOCK_EXCLUSIVE
include std/io.e namespace io public enum LOCK_EXCLUSIVE
<IP_ADDRESS> file_number
include std/io.e namespace io public type file_number(object f)
File number type
<IP_ADDRESS> file_position
include std/io.e namespace io public type file_position(object p)
File position type
<IP_ADDRESS> lock_type
include std/io.e namespace io public type lock_type(object t)
Lock Type
<IP_ADDRESS> byte_range
include std/io.e namespace io public type byte_range(object r)
Byte Range Type
<IP_ADDRESS> open
<built-in> function open(sequence path, sequence mode, integer cleanup = 0)
opens a file or device, to get the file number.
Parameters:
- path : a string, the path to the file or device to open.
- mode : a string, the mode being used o open the file.
- cleanup : an integer, if 0, then the file must be manually closed by the coder. If 1, then the file will be closed when either the file handle's references goes to 0, or if called as a parameter to delete.
Returns:
A small integer, -1 on failure, else 0 or more.
Errors:
There is a limit on the number of files that can be simultaneously opened, currently 40. After this limit is reached the next call to open will produce an error.
The length of path should not exceed 1_024 characters.
Comments:
Possible modes are:
- "r" -- open text file for reading
- "rb" -- open binary file for reading
- "w" -- create text file for writing
- "wb" -- create binary file for writing
- "u" -- open text file for update (reading and writing)
- "ub" -- open binary file for update
- "a" -- open text file for appending
- "ab" -- open binary file for appending
Files opened for read or update must already exist. Files opened for write or append will be created if necessary. A file opened for write will be set to 0 bytes. Output to a file opened for append will start at the end of file.
On Windows, output to text files will have carriage-return characters automatically added before linefeed characters. On input, these carriage-return characters are removed. A Control+Z character (ASCII 26) will signal an immediate end of file.
I/O to binary files is not modified in any way. Any byte values from 0 to 255 can be read or written. On Unix, all files are binary files, so "r" mode and "rb" mode are equivalent, as are "w" and "wb", "u" and "ub", and "a" and "ab".
Some typical devices that you can open on Windows are:
- "CON" -- the console (screen)
- "AUX" -- the serial auxiliary port
- "COM1" -- serial port 1
- "COM2" -- serial port 2
- "PRN" -- the printer on the parallel port
- "NUL" -- a non-existent device that accepts and discards output
Close a file or device when done with it, flushing out any still-buffered characters prior.
Windows and Unix: Long filenames are fully supported for reading and writing and creating.
Windows: Be careful not to use the special device names in a file name, even if you add an extension. For example: CON.TXT, CON.DAT, CON.JPG all refer to the CON device and not to a file.
Example 1:
integer file_num, file_num95 sequence first_line constant ERROR = 2 file_num = open("my_file", "r") if file_num = -1 then puts(ERROR, "couldn't open my_file\n") else first_line = gets(file_num) end if file_num = open("PRN", "w") -- open printer for output -- on Windows 95: file_num95 = open("big_directory_name\\very_long_file_name.abcdefg", "r") if file_num95 != -1 then puts(STDOUT, "it worked!\n") end if
<IP_ADDRESS> close
<built-in> procedure close(atom fn)
closes a file or device and flushes out any still-buffered characters.
Parameters:
- fn : an integer, the handle to the file or device to query.
Errors:
The target file or device must be open.
Comments:
Any still-open files will be closed automatically when your program terminates.
<IP_ADDRESS> seek
include std/io.e namespace io public function seek(file_number fn, file_position pos)
Seek (move) to any byte position in a file.
Parameters:
- fn : an integer, the handle to the file or device to seek
- pos : an atom, either an absolute 0-based position or -1 to seek to end of file.
Returns:
An integer, 0 on success, 1 on failure.
Errors:
The target file or device must be open.
Comments:
For each open file, there is a current byte position that is updated as a result of I/O operations on the file. The initial file position is 0 for files opened for read, write or update. The initial position is the end of file for files opened for append. It is possible to seek past the end of a file. If you seek past the end of the file, and write some data, undefined bytes will be inserted into the gap between the original end of file and your new data.
After seeking and reading (writing) a series of bytes, you may need to call seek explicitly before you switch to writing (reading) bytes, even though the file position should already be what you want.
This function is normally used with files opened in binary mode. In text mode, Windows converts CR LF to LF on input, and LF to CR LF on output, which can cause great confusion when you are trying to count bytes because seek counts the Windows end of line sequences as two bytes, even if the file has been opened in text mode.
Example 1:
include std/io.e integer fn fn = open("my.data", "rb") -- read and display first line of file 3 times: for i = 1 to 3 do puts(STDOUT, gets(fn)) if seek(fn, 0) then puts(STDOUT, "rewind failed!\n") end if end for
See Also:
<IP_ADDRESS> where
include std/io.e namespace io public function where(file_number fn)
retrieves the current file position for an opened file or device.
Parameters:
- fn : an integer, the handle to the file or device to query.
Returns:
An atom, the current byte position in the file.
Errors:
The target file or device must be open.
Comments:
The file position is is the place in the file where the next byte will be read from, or written to. It is updated by reads, writes and seeks on the file. This procedure always counts Windows end of line sequences (CR LF) as two bytes even when the file number has been opened in text mode.
<IP_ADDRESS> flush
include std/io.e namespace io public procedure flush(file_number fn)
forces writing any buffered data to an open file or device.
Parameters:
- fn : an integer, the handle to the file or device to close.
Errors:
The target file or device must be open.
Comments:
When you write data to a file, Euphoria normally stores the data in a memory buffer until a large enough chunk of data has accumulated. This large chunk can then be written to disk very efficiently. Sometimes you may want to force, or flush, all data out immediately, even if the memory buffer is not full. To do this you must call flush(fn), where fn is the file number of a file open for writing or appending.
When a file is closed, (see close), all buffered data is flushed out. When a program terminates, all open files are flushed and closed automatically. Use flush when another process may need to see all of the data written so far, but you are not ready to close the file yet. flush is also used in crash routines, where files may not be closed in the cleanest possible way.
Example 1:
f = open("file.log", "w") puts(f, "Record#1\n") puts(STDOUT, "Press Enter when ready\n") flush(f) -- This forces "Record #1" into "file.log" on disk. -- Without this, "file.log" will appear to have -- 0 characters when we stop for keyboard input. s = gets(0) -- wait for keyboard input
See Also:
<IP_ADDRESS> lock_file
include std/io.e namespace io public function lock_file(file_number fn, lock_type t, byte_range r = {})
locks a file so access is restricted.
Parameters:
- fn : an integer, the handle to the file or device to (partially) lock.
- t : an integer which defines the kind of lock to apply.
- r : a sequence, defining a section of the file to be locked, or {} for the whole file (the default).
Returns:
An integer, 0 on failure, 1 on success.
Errors:
The target file or device must be open.
Comments:
When multiple processes can simultaneously access a file, some kind of locking mechanism may be needed to avoid mangling the contents of the file, or causing erroneous data to be read from the file.
lock_file attempts to place a lock on an open file, fn, to stop other processes from using the file while your program is reading it or writing it.
There are two types of locks that you can request using the t parameter. Ask for a shared lock when you intend to read a file, and you want to temporarily block other processes from writing it. Ask for an exclusive lock when you intend to write to a file and you want to temporarily block other processes from reading or writing it. It is ok for many processes to simultaneously have shared locks on the same file, but only one process can have an exclusive lock, and that can happen only when no other process has any kind of lock on the file. io.e contains the following declarations:
public enum LOCK_SHARED, LOCK_EXCLUSIVE
On /Windows you can lock a specified portion of a file using the r parameter. r is a sequence of the form: {first_byte, last_byte}. It indicates the first byte and last byte in the file, that the lock applies to. Specify the empty sequence {}, if you want to lock the whole file, or don't specify it at all, as this is the default. In the current release for Unix, locks always apply to the whole file, and you should use this default value.
lock_file does not wait for other processes to relinquish their locks. You may have to call it repeatedly, before the lock request is granted.
On Unix, these locks are called advisory locks, which means they are not enforced by the operating system. It is up to the processes that use a particular file to cooperate with each other. A process can access a file without first obtaining a lock on it. On Windows locks are enforced by the operating system.
Example 1:
include std/io.e integer v atom t v = open("visitor_log", "a") -- open for append t = time() while not lock_file(v, LOCK_EXCLUSIVE, {}) do if time() > t + 60 then puts(STDOUT, "One minute already ... I can't wait forever!\n") abort(1) end if sleep(5) -- let other processes run end while puts(v, "Yet another visitor\n") unlock_file(v, {}) close(v)
See Also:
<IP_ADDRESS> unlock_file
include std/io.e namespace io public procedure unlock_file(file_number fn, byte_range r = {})
unlock (a portion of) an open file.
Parameters:
- fn : an integer, the handle to the file or device to (partially) lock.
- r : a sequence, defining a section of the file to be locked, or {} for the whole file (the default).
Errors:
The target file or device must be open.
Comments:
You must have previously locked the file using lock_file. On Windows you can unlock a range of bytes within a file by specifying the r as {first_byte, last_byte}. The same range of bytes must have been locked by a previous call to lock_file. On Unix you can currently only lock or unlock an entire file. r should be {} when you want to unlock an entire file. On Unix, r must always be {}, which is the default.
You should unlock a file as soon as possible so other processes can use it.
Any files that you have locked, will automatically be unlocked when your program terminates.
See Also:
8.6.4 File Reading and Writing
<IP_ADDRESS> read_lines
include std/io.e namespace io public function read_lines(object file)
reads the contents of a file as a sequence of lines.
Parameters:
file : an object, either a file path or the handle to an open file. If this is an empty string, STDIN (the console) is used.
Returns:
-1 on error or a sequence, made of lines from the file, as gets could read them.
Comments:
If file was a sequence, the file will be closed on completion. Otherwise, it will remain open, but at end of file.
Example 1:
data = read_lines("my_file.txt") -- data contains the entire contents of ##my_file.txt##, 1 sequence per line: -- {"Line 1", "Line 2", "Line 3"}
Example 2:
fh = open("my_file.txt", "r") data = read_lines(fh) close(fh) -- data contains the entire contents of ##my_file.txt##, 1 sequence per line: -- {"Line 1", "Line 2", "Line 3"}
See Also:
<IP_ADDRESS> process_lines
include std/io.e namespace io public function process_lines(object file, integer proc, object user_data = 0)
processes the contents of a file, one line at a time.
Parameters:
- file : an object. Either a file path or the handle to an open file. An empty string signifies STDIN -- the console keyboard.
- proc : an integer. The routine_id of a function that will process the line.
- user_data : on object. This is passed untouched to proc for each line.
Returns:
An object. If 0 then all the file was processed successfully. Anything else means that something went wrong and this is whatever value was returned by proc.
Comments:
- The function proc must accept three parameters:
- A sequence: The line to process. It will not contain an end-of-line character.
- An integer: The line number.
- An object : This is the user_data that was passed to process_lines.
- If file was a sequence, the file will be closed on completion. Otherwise, it will remain open, and be positioned where ever reading stopped.
Example 1:
-- Format each supplied line according to the format pattern supplied as well. function show(sequence aLine, integer line_no, object data) writefln( data[1], {line_no, aLine}) if data[2] > 0 and line_no = data[2] then return 1 else return 0 end if end function -- Show the first 20 lines. process_lines("sample.txt", routine_id("show"), {"[1z:4] : [2]", 20})
See Also:
<IP_ADDRESS> write_lines
include std/io.e namespace io public function write_lines(object file, sequence lines)
write a sequence of lines to a file.
Parameters:
- file : an object, either a file path or the handle to an open file.
- lines : the sequence of lines to write
Returns:
An integer, 1 on success, -1 on failure.
Errors:
If puts cannot write some line of text, a runtime error will occur.
Comments:
If file was a sequence, the file will be closed on completion. Otherwise, it will remain open, but at end of file.
Whatever integer the lines in lines holds will be truncated to its 8 lowest bits so as to fall in the 0..255 range.
Example 1:
if write_lines("data.txt", {"This is important data", "Goodbye"}) != -1 then puts(STDERR, "Failed to write data\n") end if
See Also:
<IP_ADDRESS> append_lines
include std/io.e namespace io public function append_lines(sequence file, sequence lines)
appends a sequence of lines to a file.
Parameters:
- file : an object, either a file path or the handle to an open file.
- lines : the sequence of lines to write
Returns:
An integer, 1 on success, -1 on failure.
Errors:
If puts cannot write some line of text, a runtime error will occur.
Comments:
file is opened, written to and then closed.
Example 1:
if append_lines("data.txt", {"This is important data", "Goodbye"}) != -1 then puts(STDERR, "Failed to append data\n") end if
See Also:
<IP_ADDRESS> BINARY_MODE
include std/io.e namespace io public enum BINARY_MODE
<IP_ADDRESS> TEXT_MODE
include std/io.e namespace io public enum TEXT_MODE
<IP_ADDRESS> UNIX_TEXT
include std/io.e namespace io public enum UNIX_TEXT
<IP_ADDRESS> DOS_TEXT
include std/io.e namespace io public enum DOS_TEXT
<IP_ADDRESS> read_file
include std/io.e namespace io public function read_file(object file, integer as_text = BINARY_MODE)
reads the contents of a file as a single sequence of bytes.
Parameters:
- file : an object, either a file path or the handle to an open file.
- as_text : integer, BINARY_MODE (the default) assumes binary mode that causes every byte to be read in, and TEXT_MODE assumes text mode that ensures that lines end with just a Control+J (NewLine) character, and the first byte value of 26 (Control+Z) is interpreted as End-Of-File.
Returns:
A sequence, holding the entire file.
Comments
- When using BINARY_MODE, each byte in the file is returned as an element in the return sequence.
- When not using BINARY_MODE, the file will be interpreted as a text file. This means that all line endings will be transformed to a single 0x0A character and the first 0x1A character (Control+Z) will indicate the end of file (all data after this will not be returned to the caller.)
Example 1:
data = read_file("my_file.txt") -- data contains the entire contents of ##my_file.txt##
Example 2:
fh = open("my_file.txt", "r") data = read_file(fh) close(fh) -- data contains the entire contents of ##my_file.txt##
See Also:
<IP_ADDRESS> write_file
include std/io.e namespace io public function write_file(object file, sequence data, integer as_text = BINARY_MODE)
write a sequence of bytes to a file.
Parameters:
- file : an object, either a file path or the handle to an open file.
- data : the sequence of bytes to write
- as_text : integer
- BINARY_MODE (the default) assumes binary mode that causes every byte to be written out as is,
- TEXT_MODE assumes text mode that causes a NewLine to be written out according to the operating system's end of line convention. On Unix this is Control+J and on Windows this is the pair {Ctrl-L, Ctrl-J}.
- UNIX_TEXT ensures that lines are written out with Unix style line endings (Control+J).
- DOS_TEXT ensures that lines are written out with Windows style line endings {Ctrl-L, Ctrl-J}.
Returns:
An integer, 1 on success, -1 on failure.
Errors:
If puts cannot write data, a runtime error will occur.
Comments:
- When file is a file handle, the file is not closed after writing is finished. When file is a file name, it is opened, written to and then closed.
- Note that when writing the file in ony of the text modes, the file is truncated at the first Control+Z character in the input data.
Example 1:
if write_file("data.txt", "This is important data\nGoodbye") = -1 then puts(STDERR, "Failed to write data\n") end if
See Also:
<IP_ADDRESS> writef
include std/io.e namespace io public procedure writef(object fm, object data = {}, object fn = 1, object data_not_string = 0)
writes formatted text to a file.
Parameters:
There are two ways to pass arguments to this function:
- Traditional way with first arg being a file handle.
- : integer, The file handle.
- : sequence, The format pattern.
- : object, The data that will be formatted.
- data_not_string: object, If not 0 then the data is not a string. By default this is 0 meaning that data could be a single string.
- Alternative way with first argument being the format pattern.
- : sequence, Format pattern.
- : sequence, The data that will be formatted,
- : object, The file to receive the formatted output. Default is to the STDOUT device (console).
- data_not_string: object, If not 0 then the data is not a string. By default this is 0 meaning that data could be a single string.
Comments:
- With the traditional arguments, the first argument must be an integer file handle.
- With the alternative arguments, the thrid argument can be a file name string, in which case it is opened for output, written to and then closed.
- With the alternative arguments, the third argument can be a two-element sequence containing a file name string and an output type ("a" for append, "w" for write), in which case it is opened accordingly, written to and then closed.
- With the alternative arguments, the third argument can a file handle, in which case it is written to only
- The format pattern uses the formatting codes defined in text:format.
- When the data to be formatted is a single text string, it does not have to be enclosed in braces,
Example 1:
-- To console writef("Today is [4], [u2:3] [3:02], [1:4].", {Year, MonthName, Day, DayName}) -- To "sample.txt" writef("Today is [4], [u2:3] [3:02], [1:4].", {Year, MonthName, Day, DayName}, "sample.txt") -- To "sample.dat" integer dat = open("sample.dat", "w") writef("Today is [4], [u2:3] [3:02], [1:4].", {Year, MonthName, Day, DayName}, dat) -- Appended to "sample.log" writef("Today is [4], [u2:3] [3:02], [1:4].", {Year, MonthName, Day, DayName}, {"sample.log", "a"}) -- Simple message to console writef("A message") -- Another console message writef(STDERR, "This is a []", "message") -- Outputs two numbers writef(STDERR, "First [], second []", {65, 100}, 1) -- Note that {65, 100} is also "Ad"
See Also:
text:format, writefln, write_lines
<IP_ADDRESS> writefln
include std/io.e namespace io public procedure writefln(object fm, object data = {}, object fn = 1, object data_not_string = 0)
writes formatted text to a file, ensuring that a new line is also output.
Parameters:
- fm : sequence, Format pattern.
- data : sequence, The data that will be formatted,
- fn : object, The file to receive the formatted output. Default is to the STDOUT device (console).
- data_not_string: object, If not 0 then the data is not a string. By default this is 0 meaning that data could be a single string.
Comments:
- This is the same as writef, except that it always adds a New Line to the output.
- When fn is a file name string, it is opened for output, written to and then closed.
- When fn is a two-element sequence containing a file name string and an output type ("a" for append, "w" for write), it is opened accordingly, written to and then closed.
- When fn is a file handle, it is written to only
- The fm uses the formatting codes defined in text:format.
Example 1:
-- To console writefln("Today is [4], [u2:3] [3:02], [1:4].", {Year, MonthName, Day, DayName}) -- To "sample.txt" writefln("Today is [4], [u2:3] [3:02], [1:4].", {Year, MonthName, Day, DayName}, "sample.txt") -- Appended to "sample.log" writefln("Today is [4], [u2:3] [3:02], [1:4].", {Year, MonthName, Day, DayName}, {"sample.log", "a"})
See Also:
text:format, writef, write_lines


WITNESS LIST Finance Committee March 2, 2005 -10:00A SB 1 - Article III Registering, but not testifying: On: McGready, John LBB Staff (LBB), Austin, TX Newton, John LBB Staff (LBB), Austin, TX Owens, Greg LBB Staff (LBB), Austin, TX Parks, Ursula LBB Staff (LBB), Austin, TX Schiess, Jennifer LBB Staff (LBB), Austin, TX


motion¶
Motion sensors
The motion
module gives access to the device’s accelerometer, gyroscope and magnetometer data.
Functions¶
-
motion.
start_updating
()¶ Starts receiving information from the sensors.
-
motion.
stop_updating
()¶ Stops receiving information from the sensors
-
motion.
get_acceleration
() → motion.Acceleration¶ Returns a tuple with information about acceleration (x, y, z).
- Return type
-
motion.
get_attitude
() → motion.Attitude¶ Returns a tuple with information about the attitude (roll, pitch, yaw).
- Return type
-
motion.
get_gravity
() → motion.Gravity¶ Returns a tuple with information about gravity (x, y, z).
- Return type
-
motion.
get_magnetic_field
() → motion.MagneticField¶ Returns a tuple with information about the magnetic field (x, y, z).
- Return type
Data Types¶
-
class
motion.
Acceleration
(x, y, z)¶ A tuple containing data about acceleration (x, y, z).
-
property
x
¶ Alias for field number 0
-
property
y
¶ Alias for field number 1
-
property
z
¶ Alias for field number 2
-
property
-
class
motion.
Attitude
(roll, pitch, yaw)¶ A tuple containing data about attitude (roll, pitch, yaw).
-
property
pitch
¶ Alias for field number 1
-
property
roll
¶ Alias for field number 0
-
property
yaw
¶ Alias for field number 2
-
property
-
class
motion.
Gravity
(x, y, z)¶ A tuple containing data about gravity (x, y, z).
-
property
x
¶ Alias for field number 0
-
property
y
¶ Alias for field number 1
-
property
z
¶ Alias for field number 2
-
property


The Puente Data Collection Application is one part of a suite of innovative technologies and services engineered to address problems within International Development. It is purposely focused on data collection and works optimally with the other programs and services offered by Puente which are listed above. This app is designed with Ionic 3 and powered by Back4App.


Graham details his conditions on approving Trump impeachment Senate Judiciary Committee chairman Lindsey Graham reacts to House impeachment hearings, looks ahead to Senate hearings. 20 Nov 2019, 18:09


-
- Run the following command to view the namespaces that are stuck in the Terminating state:
# kubectl get ns|grep Terminating
cattle-prometheus Terminating 406d
-
- Select a terminating namespace and view the contents of the namespace to find out the finalizer. Run the following command:
# kubectl get ns cattle-prometheus -o yaml
apiVersion: v1
kind: Namespace
metadata:
annotations:
cattle.io/appIds: cluster-monitoring,monitoring-operator
cattle.io/status: '{"Conditions":[{"Type":"ResourceQuotaInit","Status":"True","Message":"","LastUpdateTime":"2019-05-09T06:34:14Z"},{"Type":"InitialRolesPopulated","Status":"True","Message":"","LastUpdateTime":"2019-05-09T06:34:19Z"}]}'
field.cattle.io/projectId: c-s2zlj:p-kw9lj
lifecycle.cattle.io/create.namespace-auth: "true"
creationTimestamp: "2019-05-09T06:34:13Z"
deletionGracePeriodSeconds: 0
deletionTimestamp: "2019-11-13T02:50:20Z"
finalizers:
- controller.cattle.io/namespace-auth
labels:
cattle.io/creator: norman
field.cattle.io/projectId: p-kw9lj
name: cattle-prometheus
resourceVersion: "39020658"
selfLink: /api/v1/namespaces/cattle-prometheus
uid: 75c9cd36-7224-11e9-9de0-e23029de4489
spec: {}
status:
phase: Terminating
-
- Run the following command remove
finalizers
config Delete the following two lines of configuration save exit
- Run the following command remove
# kubectl edit ns cattle-prometheus
....
finalizers:
- controller.cattle.io/namespace-auth
....
-
- Finally, execute the delete command again
kubectl delete ns cattle-prometheus
Cause analysis
Finalizers is an asynchronous pre delete hook commonly used by operators of kubernetes. When this resource is deleted, it needs to be cleaned up by the program that created the resource before deletion. After cleaning up, it needs to remove the identifier from the finalizers of the resource, and then the resource will be completely deleted


Preparation time
30 mins to 1 hour
Cooking time
10 to 30 mins
Serves
Serves 2
Dietary
A beautiful cheese and tomato pizza for two that makes takeaway seem tawdry.
For the base, sift the flour into a large bowl. In another bowl, mix the yeast with a little warm water until it begins to foam. Slowly add to the flour and mix to form a dough. If it's too sticky, add more flour. Cover the bowl with a clean cloth and leave to rest for five minutes.
Add the salt to the dough, then turn out onto a lightly floured surface and knead for about ten minutes until smooth. Cover with a damp cloth and let it prove for 30 minutes.
Preheat the oven to its highest setting. Cut the dough in half and knead for a minute or so, making sure you really knock it back.
Press the dough out very thinly to make two circles about 40cm/16in across, leaving the edges slightly thicker, like the edge of a plate. Place the dough circles onto floured baking sheets.
For the topping, season the tomatoes with salt and freshly ground black pepper and spread over each dough base (you probably won't need the whole tin). Sprinkle over the basil leaves, thyme leaves, if using, and mozzarella, season with salt and freshly ground black pepper and drizzle over some oil. Scatter over the olives, if using.
Place the pizzas into the oven and bake for 8-10 minutes, or until the base is crisp and the cheese is bubbling.


Metakit embedded database library
Read me
Changes
What's new
Python
Tcl/Tk
File format
© 2004 Jean-Claude Wippler <
<EMAIL_ADDRESS>>


Exercise 1.3 - Configuring QRadar to Generate Events, Offenses and Run Ansible playbooks
Objectives
The objective of this part is to introduce you to the use of IBM QRadar and showcase event and offense generation, plus creation of
customs rules that can be triggered to remediate issues, as part of an incident response strategy.
TODO: explain further...
References
The following are additional resources you may want to check out:
First, a disclaimer: this workshop is based on the following pages
Step 1 - Create a test script
The purpose of the provided sample script is to write a file named test.txt each time all rule tests are matched in a sample rule.
- Create a file with a .sh extension using the provided sample script:
#!/bin/bash datetime="$(date)" echo " Custom Action Script Test Time: $datetime" >> /home/customactionuser/test.txt echo "Text written to /home/customactionuser/test.txt?"
- Log in to the QRadar user interface and click the Admin tab.
- Under Custom Action, click Define Custom
Action.
- To upload your scripts, click Add.
- Type a descriptive name for the custom action.
- Scroll down to Script configuration and Select Interpreter: Bash.
- Click Browse and locate the .sh file.
- Scroll to the bottom of the Define Custom Action window > click Save.
- Click Deploy Changes.
Step 2 - Edit or create a rule to trigger your custom action
- Log in to the QRadar user interface.
- Click Offense tab > Rules.
- Locate or create a Custom Rule in the Rule Wizard that can be triggered easily.
Tip: An example rule to test a custom action might be to use an authentication event from your existing log sources or
you could use a specific QID, such as the Offense Created QID (28250369) to test your custom action.
- Edit the Rule to add the Host IP and a criteria such as successful login.
Example of a rule.
- Click Next to configure Rule Responses
- Check the box next to 'Execute Custom Action'
- Click the newly created Custom Action Script in the 'Custom Action to execute' drop down box.
Step 3 - Confirm your custom action script triggers
Either by using "Test Execution" in the Define Actions window, or by confirming the Custom Rule has been triggered, verify
the test file is created or updated:
To test your custom action in the user interface
- Click the Admin tab.
- Scroll to down to Custom Actions.
- Click Define Actions.
- Highlight the test script.
- Click Test Execution > Execute.
How to verify the test script in the command line
- Create an event to cause the custom rule to trigger.
- Use SSH to log in to the Console as the root user.
- To enter the shell to see the folder customactionuser use the chroot command:
chroot
- Use the ls command to see if the file exists:
ls -lh /home/customactionuser/
- While in the chroot'ed shell, the file test.txt should be seen.
chroot --userspec=customactionuser /opt/qradar/bin/ca_jail/ $ ls /home/customactionuser/ test.txt?
Results
The file test.txt should exist in the /home/customactionuser/ directory. The purpose of the sample script is to
write test.txt each time the rule response is triggered by a rule.
TODO: create a script that actually calls Ansible and does some kind of remediation
Workshop Home


Generate schedules by clicking the button in the action pane on the left.
Finding the most awesome schedule for you based on your preferences!
Generated {{ vm.scheduleGenerationStatus.numGenerated }} schedules.
putting final touches
Could not generate any valid schedules.
{{ vm.scheduleGenerationStatus.reason }}


First keyboards with an XT interface. There is no keyboard controller, no commands to the keyboard. On a modern computer these will usually yield "keyboard error" or "KB/interface error" or some such, but sometimes they can be used nevertheless.
The IBM PC (all models) and the IBM XT (models 68, 78, 86, 87, 88, 267, 277) came with this 83-key keyboard. The IBM AT (models 68, 99, 239, 319) came with an 84-key keyboard. The IBM XT (models 89, 268, 278, 286) and the IBM AT model 339 came with a 101-key keyboard.
The original IBM 83-key PC/XT keyboard did not have LEDs. The original IBM 84-key AT keyboard has LEDs, separates the keypad from the main area, moves the Esc key to the right, and adds the SysReq key. The original IBM 101-key keyboard moves the ten function keys from the left to the top row and adds two more. The Esc key is moved in front of this row of function keys. The "number" and "cursor" functions of the keypad are separated. There are duplicate Ctrl and Alt keys.
The XT keyboard has 83 keys, nicely numbered 1-83, that is, with scancodes 01-53. No escaped scancodes.
This Victor keyboard is very similar. The keypad is separated here, and the Esc key has been moved to the keypad. The frontside of the ScrollLock key says Break. It resembles an AT keyboard but has only 83 keys, the SysRq is still missing.
The Olivetti M24 (also sold under the names Logabax 1600 and ATT PC-6300) was an IBM compatible manufactured in 1984.
John Elliott writes: The Olivetti M24 is an XT sort-of clone. It has two possible keyboards - the normal (83-key) IBM one, and a "deluxe" one (102 keys) with 18 function keys.
Unlike a normal XT keyboard, it is possible to send commands to it. The BIOS does this twice: (1) Command 01h makes the keyboard perform a self-test. (2) Command 05h makes the keyboard return a 1-byte ID. The least signficant bit is set for a "deluxe" layout.
The keyboard connector is DE-9 rather than DIN. Pins are:
1 KBDATA 2 KBCLOCK 3 GND 4 GND 5 +12V 6 -RESET1 7 Keyboard/-Typewriter 8 TEST0 9 +5V(pins 6-9 are not used by the supplied keyboards).
Attached the diagram of the 'deluxe' keyboard, which shows its scancodes in decimal.
A mouse can be attached to the keyboard. The following is based on disassembling attmouse.drv from Windows 1.0.
Windows initialises the mouse by sending the following bytes to the keyboard: 0x12, 0x77, 0x78, 0x79, 0x00. The 0x12 is almost certainly a command byte; 0x77, 0x78 and 0x79 are the scancodes to be returned by the three mouse buttons. I don't know what the 0x00 is for.
It then handles the following scancodes: 0xFE -- mouse movement. The next two scancodes are delta X, then delta Y, in ones' complement. 0x77, 0x78, 0x79 (and 0xF7, 0xF8, 0xF9) -- button presses / releases.
When shutting down the mouse, it sends these bytes to the keyboard: 0x11, 0x1C, 0x53, 0x01, 0x4B, 0x4D, 0x48, 0x50, 0x02, 0x04. My guesses here are: 0x11: Mouse movement becomes simulated keypresses. 0x1C, 0x53, 0x01: Scancodes to be returned by mouse button presses. 0x4B, 0x4D, 0x48, 0x50: Scancodes to be returned by mouse movement. 0x02, 0x04: Don't know.
The Telerate keyboard was used for financial applications, as is clear from the keycaps. This keyboard (in the old XT version, without e0 prefixes) has four additional keys, with scancodes 61, 62, 63, 64. The F11 and F12 keys have scancodes 54 and 55 (instead of the common 57 and 58). There are two LEDs (for CapsLock and NumLock).
Also with an XT interface this NCR keyboard, still with ten function keys on the left, but already with a separate block of keys between the ordinary keys and the numeric keypad. This middle block has on top five keys Ctrl (1d, same as the Ctrl on the left), Del (53, same as Keypad-Del/.), PgUp (49, same as Keypad-9/PgUp), End (4f, same as Keypad-1/End), PgDn (51, same as Keypad-3/PgDn), and below five cursor keys (48, same as Keypad-8/Up; 4b, same as Keypad-4/Left; 47, same as Keypad-7/Home; 4d, same as Keypad-6/Right; 50, same as Keypad-2/Down). Enter and Keypad-enter are both 1c. Below the Enter key PrtScn/* (37), and below that again Ins (52, same as Keypad-0/Ins). CapsLock and NumLock have a built-in LED.
According to FreeKEYB/kbdinfo.html this keyboard has five additional keys with scancodes 55 (F11), 56 (F12), 57 (F13), 58 (F14), 59 (F15).


The current production download code is the version 1.2.3 release. The 1.2 release added major new features to JiBX, including integrated support for binding, schema, and WSDL generation from existing code, code and binding generation from existing schemas, and modular binding compilation. The 1.2.3 release adds many enhancements and bug fixes, including the following:
There are still some known limitations in the support for code generation from schema, which are discussed on the CodeGen page. Also note that the binding.dtd and binding.xsd XML grammar definitions for binding documents have not yet been updated to include new features added in the JiBX 1.2 release.
There are a few changes to the CodeGen extensions handling since 1.2:
Incompatibility Note: The 1.2 code introduced a number of backward-incompatible changes to the actual binding factory structure. If you compile a binding using the 1.2 or later binding compiler and then try to use the bound classes with an older runtime you'll get an error like:
Unable to access binding information for class xxx.xxx.xxx.Xxx Make sure classes generated by the binding compiler are available at runtime
There are no current plans for more releases in the 1.2.x series, though this may change if problems are found with the 1.2.2 release.
Work is in progress on JiBX 2.0. The main focus of the 2.0 changes is an entirely new code generation model, which is designed to support both direct bytecode generation (as in the 1.X code) and source code generation. The actual development schedule depends on the needs of commercial clients of Sosnoski Software Associates Ltd and Sosnoski Software Solutions, Inc., which represent the main developers of the JiBX project and related subprojects. The best estimate based on current needs is for a beta release mid-2010.


What are you Looking for?
X
X
HOME
SHOP
PAGES
BLOG
PORTFOLIO
WOMEN
MEN
HOME
SHOP
PAGES
BLOG
PORTFOLIO
WOMEN
MEN
SHOPPING CART
x
No Products in the Cart
TOTAL:
I agree with the terms and conditions
X Close
HOME
>
SHOP
>
PAGES
>
BLOG
>
PORTFOLIO
>
WOMEN
>
MEN
>
Show order summary
Subtotal
Shipping
Caculated at next step
Total
USD
Information
Shipping
Payment


We optimize interfaces!
- productize scalable eyeballs
- maximize frictionless markets
- target synergistic functionalities
- e-enable turn-key schemas
- grow sexy metrics
- aggregate collaborative action-items
- mesh vertical technologies
- recontextualize bricks-and-clicks systems
- strategize scalable synergies
- incubate bleeding-edge web-readiness
- syndicate integrated ROI
- enable scalable initiatives
- strategize bleeding-edge relationships
- cultivate efficient paradigms


Description:
Access:
Service
Type
Description
Contributors:
Keywords:
Dates:
Projects:
Creators:
Publishers:
Variables:
Vocabulary
Variables:
GeospatialCoverage:
Longitude:
Latitude:
Altitude:
TimeCoverage:
Start:
End:
Duration:
Resolution:
Properties:
Viewers:
Viewer
Type
Description


| Period | 9-9:50 | 9:50-10:40 | 10:50-11:40 | 11:40-12:30 | 1:20-2:10 | 2:10-3:00 | 3:00-3:50 |
|---|---|---|---|---|---|---|---|
| Day1 | genomics | indian tradition | Chem eng lab | seminar | logical thinking | water polution | water polution |
| Day 2 | bio process | bio process | - | - | pharma | application of nano | application of nano |
| Day 3 | logical thinking | logical thinking | genomics-lab | genomics-lab | bio process | genomics | pharma |
| Day 4 | pharma | pharma | - | - | application of nano | bio process | industrial waste |
| Day 5 | industrial waste | industrial waste | bioprocess lab | bioprocess lab | genomics | logical thinking | water polution |


This is Jick's test case. It contains stuff used for testing things, and things used for testing stuff.
Type: accessory
Selling Price: 42 Meat.All Attributes +100%
+10000% Item Drops from Monsters
Maximum HP/MP +10000
+10 to Monster Level
Grants 10 Adventures of Aykrophobia at Rollover
Running away always works.


net-snmp-config(1) Net-SNMP net-snmp-config(1) NAME net-snmp-config - returns information about installed net-snmp libraries and binaries SYNOPSIS net-snmp-config [OPTIONS] DESCRIPTION The net-snmp-config shell script is designed to retrieve the configura‐ tion information about the libraries and binaries dealing with the Simple Network Management Protocol (SNMP), built from the net-snmp source pack‐ age. The information is particularily useful for applications that need to link against the SNMP libraries and hence must know about any other libraries that must be linked in as well. OPTIONS --version displays the net-snmp version number --indent-options displays the indent options from the Coding Style --debug-tokens displays a example command line to search to source code for a list of available debug tokens SNMP Setup commands: --create-snmpv3-user [-ro] [-a authpass] [-x privpass] [-X DES|AES] [-A MD5|SHA] [username] These options produce the various compilation flags needed when building external SNMP applications: --base-cflags lists additional compilation flags needed for external applica‐ tions (excludes -I. and extra developer warning flags, if any) --cflags lists additional compilation flags needed --libs lists libraries needed for building applications --agent-libs lists libraries needed for building subagents --netsnmp-libs lists netsnmp specific libraries --external-libs lists libraries needed by netsnmp libs --netsnmp-agent-libs lists netsnmp specific agent libraries --external-agent-libs lists libraries needed by netsnmp libs Automated subagent building (produces an OUTPUTNAME binary file): [This feature has not been extensively tested, use at your own risk.] --compile-subagent OUTPUTNAME [--norm] [--cflags flags] [--ldflags flags] mibmodule1.c [...]] --norm leave the generated .c file around to read. --cflags flags extra cflags to use (e.g. -I...). --ldflags flags extra ld flags to use (e.g. -L... -l...). Details on how the net-nsmp package was compiled: --configure-options Display original configure arguments --snmpd-module-list Display the modules compiled into the agent --prefix Display the installation prefix 4.2 Berkeley Distribution 16 Nov 2006 net-snmp-config(1)


If you have ever thought about exploring more of this diverse country - its history, people, culture, beautiful unspoilt nature and historical sites; then look no further than Arne Auto for your travel needs. Family-run Arne Auto OÜ has been offering transportation services since 1997.
Passengers have a selection of buses, small or large; to cater for all needs. For your safety and peace of mind, our vehicles are fully insured and well maintained with drivers that hold a great knowledge and experience with all road types within the Baltics, Scandinavia, Europe and Russia.
Our kindest regards Arne Auto OÜ


Inviscid fluids are governed by the Euler equations, which are a statement of conservation of mass, momentum, and energy:
In addition, one typically assumes an equation of state (relationship between pressure and density) to close the system off, such as the ideal gas law:
where the internal energy (u) and total energy (e = internal + kinetic) are related by:
If you add magnetic fields and Maxwell’s equations (assuming no resistivity), you get the ideal MHD equations
where the total pressure is a sum of the gas pressure and magnetic pressure:
The above equations of fluid dynamics are partial differential equations, which means they only apply to smooth flows. Shocks, however, are discontinuities in the fluid variables (e.g. velocity, pressure):
The fluid equations are incompatible at the shock discontinuity, because spatial derivatives are ill-defined.
To solve for shock structure, you need to satisfy the Rankine-Hugoniot jump conditions, which are just statements of conservation of mass, momentum, and energy. They are obtained by integrating the Euler/MHD equations across the discontinuity.
The 1D Riemann problem is a good way to understand shock basicsIt asks, how does a fluid evolve if I set up a discontinuity in density, velocity, and pressure at t=0?
The shock structure is complex. You don’t simply get an advection of the discontinuity. You produce several waves.
In an Euler fluid, you have 3 characteristic velocities:
You obtain three types of features:
You end up with characteristics that may look something like:
In the MHD equations, things get more complicated. You have 7 characteristic velocities (and they can sometimes be degenerate!)
You end up with characteristics that may look something like:
In MHD shocks, you obtain a new type of discontinuity:
~~~
This concludes the basic theory background. You can click on the Euler and MHD tabs on the top of the page to explore the shock structure in a interactive Mathematica module.


Shop for Fountain Pens
(646)
$30.99
from Goldspot
+$4.95 shipping
Faber-Castell Fountain Pen
(646)
$20.00
from Faber-Castell
Free shipping


Issue: READ-AND-WRITE-BYTESReference: X3J13/92-102, dpANS 12.24
X3J13/92-2601, Jeremy Wertheimer comment #1
Category: ADDITION
Edit History: Version 1, 1/5/92, Kim Barrett
Status: Proposal NEW-FUNCTIONS passed (5+3)-3 on letter ballot 93-302.
Problem Description:
Common Lisp should have a facility for reading and writing blocks of
binary bytes. The lack of such a facility makes it impossible to write
portable efficient programs to access binary files. This lack might make
common lisp unsuitable for various applications such as database management
and image processing. This lack is not simply a matter of convenience that
could be remedied by user programming. If the standard does not provide at
least one method for efficiently reading and writing blocks of binary bytes,
users cannot later construct one using available common lisp facilities.
In addition, some users have complained about the lack of a non-consing
variant of READ-STRING, to which an existing string could be passed to receive
the data.
Proposal (READ-AND-WRITE-BYTES:NEW-FUNCTIONS):
Add the following dictionary entries to Chapter 21, Streams.
%%% ========== READ-SEQUENCE
\begincom{read-sequence}\ftype{Function}
\label Syntax::
\DefunWithValues {read-sequence} {sequence stream {\key} start end} {position}
\param{sequence}---a \term{sequence}.
\param{stream}---an \term{input} \term{stream}.
\param{start}, \param{end}---\term{bounding index designators} of
\param{sequence}. \Defaults{\param{start} and \param{end}}{\f{0} and \nil}
\param{position}---an \term{integer} greater than or equal to zero, and
less than or equal to the \term{length} of the \param{sequence}.
\label Description::
Destructively modifies \param{sequence} by replacing the \term{elements}
of \param{sequence} \term{bounded} by \param{start} and \param{end} with
\term{elements} read from \param{stream}.
\param{Sequence} is destructively modified by copying successive
\term{elements} into it from \param{stream}. If the \term{end of file} for
\param{stream} is reached before copying all \term{elements} of the
subsequence, then the extra \term{elements} near the end of \param{sequence}
are not updated.
\param{Position} is the index of the first \term{element} of \param{sequence}
that was not updated, which might be less than \param{end} because the
\term{end of file} was reached.
\label Examples::
\code
(defvar *data* (make-array 15 :initial-element nil))
(values (read-sequence *data* (make-string-input-stream "test string")) *data*)
\EV 11, #(#\t #\e #\s #\t #\Space #\s #\t #\r #\i #\n #\g NIL NIL NIL NIL)
\endcode
\label Side Effects::
Modifies \param{stream} and \param{sequence}.
\label Affected By:\None
\label Exceptional Situations::
\Lazychecktype{sequence}{a \term{proper sequence}}
\Shouldchecktype{start}{a non-negative \term{integer}}
\Shouldchecktype{end}{a non-negative \term{integer} or \nil}
Might signal an error \oftype{type-error} if an \term{element} read from
the \param{stream} is not a member of the \term{element type} of the
\param{sequence}.
\label See Also::
{\secref\ConstantModification}, \funref{write-sequence}, \funref{read-line}
\label Notes::
\funref{read-sequence} is identical in effect to iterating over the indicated
subsequence and reading one \term{element} at a time from \param{stream} and
storing it into \param{sequence}, but may be more efficient than the
equivalent loop. An efficient implementation is more likely to exist
for the case where the \param{sequence} is a \term{vector} with the same
\term{element type} as the \param{stream}.
%%% ========== WRITE-SEQUENCE
\begincom{write-sequence}\ftype{Function}
\label Syntax::
\DefunWithValues {write-sequence} {sequence stream {\key} start end} {sequence}
\param{sequence}---a \term{sequence}.
\param{stream}---an \term{output} \term{stream}.
\param{start}, \param{end}---\term{bounding index designators} of
\param{sequence}. \Defaults{\param{start} and \param{end}}{\f{0} and \nil}
\label Description::
\funref{write-sequence} writes the \term{elements} of the subsequence
of \param{sequence} \term{bounded} by \param{start} and \param{end} to
\param{stream}.
\label Examples::
\code
(write-sequence "bookworms" *standard-output* :end 4)
\OUT book
\EV "bookworms"
\endcode
\label Side Effects::
Modifies \param{stream}.
\label Affected By:\None
\label Exceptional Situations::
\Lazychecktype{sequence}{a \term{proper sequence}}
\Shouldchecktype{start}{a non-negative \term{integer}}
\Shouldchecktype{end}{a non-negative \term{integer} or \nil}
Might signal an error \oftype{type-error} if an \term{element} of the
\term{bounded} \term{sequence} is not a member of the
\term{stream element type} of the \param{stream}.
\label See Also::
{\secref\ConstantModification}, \funref{read-sequence}, \funref{write-string},
\funref{write-line}
\label Notes::
\funref{write-sequence} is identical in effect to iterating over the indicated
subsequence and writing one \term{element} at a time to \param{stream}, but
may be more efficient than the equivalent loop. An efficient implementation
is more likely to exist for the case where the \param{sequence} is a
\term{vector} with the same \term{element type} as the \param{stream}.
Editorial Impact:
Just drop in a couple more dictionary entries. Might want to add a few more
cross references.
Rationale:
Addresses the problem description.
Current Practice:
Symbolics Genera provides :string-in and :string-out operations on streams
that could easily be used to implement these functions.
IIM Common Lisp provides functions with similar capabilities but under
slightly different names.
Cost to Implementors:
Depends on the details of the implementation of the stream operators, but
probably not very difficult in most cases. Getting maximum efficiency might
require some significant work, but some of that work has probably already
been done to support existing operators or extensions.
Cost to Users:
None. This is an upwardly compatible addition.
Performance Impact:
Some existing code that uses iteration could be rewritten to use the new
operators, with a potentially substantial improvement in performance.
Benefits:
Improved performance, and clearer code.
Aesthetics:
The use of these operators is probably clearer than the corresponding
iteration code, and therefor more aesthetic.


Twitter Rewrites History with "Gonna Tell my Kids" Memes
The first one that appeared on my Twitter timeline captioned the cover of British rock band Bring Me The Horizon's second studio album (a white girl with a short brunette bob, her hazel eyes staring at a point just above the camera, and holding a nest of dripping intestines in her hands) with: "gonna tell my kids this was hillary clinton."
It was the first drop that preceded a hail storm. After that, "gonna tell my kids..." memes besieged my timeline, swapping the cast of Twilight for the Kardashian family, a tree for Scarlett Johansson, and Destiny's Child for Mount Rushmore. Twitter did as Twitter does best, gestating memes from their templated beginnings and propelling them into ubiquity, before calcifying them down with millennials' classic, ironic acid until the posts emptily drift through the cybersphere. (Remember when "Rise and shine" was all fun and games until Kylie Jenner started selling the phrase on $65 hoodies?)
The concept is simple: Make wry, revisionist comparisons between two different people or things. Baby Yoda is Danny DeVito. Glee's Lea Michele and Chris Colfer are Camila Cabello and Shawn Mendes. René Magritte's epochal Ceci N'est Pas Une Pipe is, actually, a pipe.
Because I like to ruin good things for myself, and nothing ruins a meme like writing about it, I've rounded up all my favorites before the "gonna tell my kids"'s shelf life of three days expires for good (or, at least, before Kylie Jenner somehow figures out how to capitalize off of this, too).
Chelsey Sanchez Editorial Fellow Chelsey Sanchez is the Digital Fellow for HarpersBAZAAR.com.