Class Diagram Example: Inner support for views
Views are special classes that allow the generation of a custom class
diagram based on a set of diagram global options and a set of option
overrides for classes matching user specified conditions.
The @view
tag, marks a class used to describe a single class diagram.
The general syntax for defining a view is:
/**
* @view
* @opt viewOption1
* @opt viewOption2
* ...
* @match matchtype regularExpression
* @opt option1.1 [argument]
* @opt option1.2 [argument]
* ...
* @match matchtype regularExpression
* @opt option2.1 [argument]
* @opt option2.2 [argument]
* ...
*/
The @match tags allow to specify option overrides for classes that satisfy
the match condition. The match types are:
- class: matches class names using a regular expression.
- subclass: first looks for the base classes using the specified
regular expression, then matches the whole inheritance hierarchy of these
classes. The base classes are included in the match as well.
- interface: first looks for interfaces using the specified
regular expression, then matches every class that implements them,
either directly or indirectly. The interfaces are included in the match
as well.
- context: looks for classes using a regular expression,
then matches every class that's directly connected to them.
The class match type is intended to be used with a regular
expression, the others are usually performed against a class/interface
name rather than a real regular expression, but the syntax allows for
a regular expression to retain some flexibility (for example, a regular
expression can be used to match multiple classes, as in "(A|B|C)").
Refer to the Pattern
API docs for details on regular expression specifications.
Matches will be evaluted in the order of specification, each applying
its overrides to the current options. This means that options for a
specific class are built in the following order, where each item overrides
only the options specified locally, leaving the other options intact:
- Command line options
- UMLOptions options
- View options
- Match overrides, in the order they are specified, and only for
the classes that satisfy the match conditions
Each view will generate a .dot file whose name is the name of the view,
unless the "output" option is specified to override it. Along with the "-views"
parameter on the command line, this allows for multiple views to be generated
in a single doclet invocation.
View inheritance
View classes can inherit from other view classes, allowing views to
share a set of common matches. The standard java inheritance mechanism
is used to specify inheritance.
Abstract view classes won't be used to generate diagrams, the common
idiom is to declare a base abstract view to share common options and
overrides, and have concrete view classes that extend for diagram generation.
When using view inheritance the option building order is:
- Command line options
- UMLOptions options
- Base view options
- View options
- Base view match overrides
- View match overrides


Global warming today is mainly caused by the accumulation of greenhouse gases in the atmosphere, one of these being extensive carbon dioxide emissions from the continuous production of plastics, synthetic fabrics, and other materials. People today often buy items without full usage of the products, resulting in a wastage of the materials previously stated. For this reason, the donation of unused or only very slightly used items to others would significantly reduce material production, and thereby lower carbon emissions into the atmosphere. This website aims to organize a system through which people can donate and buy items free of cost.


Scott Doyle /<EMAIL_ADDRESS>General form of a linear machine:
$ g_{i}(\mathbf{x}) = \mathbf{w}_{i}^{T}\mathbf{x} + w_{i0} $
We can generalize this to a higher-dimensional space by a change of variables:
\begin{align} g(\mathbf{x}) &= \sum_{i=1}^{\widehat{d}} a_{i}y_{i}(\mathbf{x}) \\ g(\mathbf{x}) &= \mathbf{a}^{T}\mathbf{y} \\ \end{align}
where $\mathbf{a}^{T}$ is a $\widehat{d}$-dimensional weight and $y_{i}$ are arbitrary functions of $\mathbf{x}$.
We can include the bias term in the discriminant function by setting $x_{0} = 1$:
$ g(\mathbf{x}) = w_{0} + \sum_{i=1}^{d}w_{i}x_{i} = \sum_{i=0}^{d}w_{i}x_{i} $
Basically we “absorb” the bias term $w_{0}$ into the weight vector, and then add a dimension to $\mathbf{x}$, so we start the summation from $0$ instead of $1$.
This gives us the following mappings, which we call augmented vectors:
$ \mathbf{y}= \begin{bmatrix} 1\\ x_{1}\\ \vdots\\ x_{d} \end{bmatrix} = \begin{bmatrix} 1\\ \mathbf{x} \end{bmatrix} \qquad \mathbf{a}= \begin{bmatrix} w_{0}\\ w_{1}\\ \vdots\\ w_{d} \end{bmatrix} = \begin{bmatrix} w_{0}\\ \mathbf{w} \end{bmatrix}$
We reduced the problem of finding a weight vector $\mathbf{w}$ AND a bias weight $w_{0}$ to finding just a single weight vector $\mathbf{a}$.
Our discriminant function has the form:
$g(x) = a_{1} + a_{2}x + a_{3}x^{2}$
The discriminant function is characterized by:
$\mathbf{y} = (1, x, x^{2})^{T}$
which projects the 1D data from $x$ onto the 3D curve in $\mathbf{y}$-space.
We need to find a solution to the set of linear inequalities $\mathbf{a}^{T}\mathbf{y}_{i} > 0$ (or $\mathbf{a}^{T}\mathbf{y}_{i} \geq b$).
We can define a criterion function $J(\mathbf{a})$ that spits out a number which is minimized when $\mathbf{a}$ is an optimal solution vector.
This is a scalar function optimization or numerical optimization problem.
To set up numerical optimization, we need to define our criterion function.
To define our criterion function, let’s consider an ideal dataset of linearly separable training samples.
Linear discriminant function: $g(\mathbf{x}) = \mathbf{a}^{T}\mathbf{y}$.
Set of $n$ training samples: $\mathbf{y}, \ldots, \mathbf{y}_{n}$ labeled either as $\omega_{1}$ or $\omega_{2}$.
In the binary class case, a sample is correctly classified if:
$ (\mathbf{a}^{T}\mathbf{y}_{i} > 0 \textrm{ and } \mathbf{y}_{i} \textrm{ is labeled } \omega_{1}) \textrm{ or } (\mathbf{a}^{T}\mathbf{y}_{i} < 0 \textrm{ and } \mathbf{y}_{i} \textrm{ is labeled } \omega_{2}) $
We need to find the weight vector $\mathbf{a}$ that maximizes our classifier’s performance.
If training samples are linearly separable, the best classifier is perfect: ALL samples should be correctly classified.
Weight vector $\mathbf{a}$ specifies a point in weight space, the space of all possible weight vectors.
For a sample $\mathbf{y}_{i}$, the equation $\mathbf{a}^{T}\mathbf{y}_{i} = 0$ defines a hyperplane through the origin of weight space, with $\mathbf{y}_{i}$ as a normal vector.
The optimal solution vector is “constrained” by each training sample.
The solution vector lies within the intersection of these half-planes.
There’s a trick to finding the optimal weight vector, called normalization.
It’s mathematically easier to find a weight vector where $\mathbf{a}^{T}\mathbf{y}_{i} > 0$ for all samples.
We can do this by simply flipping the signs of $\mathbf{y}$ for one of the classes.
Then we looking for a weight vector $\mathbf{a}$ that is on the positive side of all possible hyperplanes defined by the training samples.
The red dotted line is one of the possible separating hyperplanes.
The solution vector is normal (and positive) to the hyperplane.
The grey region denotes the region of possible solution vectors, which we call the solution space.
Note that each of the possible solutions is orthogonal to one of $\mathbf{y}_{i}$.
Following “normalization”, the sign of the cases labeled $\omega_{2}$ is flipped.
Now we have a solution that corresponds to the discriminant function $g(\mathbf{x}) = \mathbf{a}^{T}\mathbf{y}$.
Again, using what we have so far, the solution vector $\mathbf{a}$ is not unique – any vector in the “solution region” is valid.
Which of these solutions is “best”?
The solution vector should maximize the minimum distance from training samples to the separating hyperplane.
Thus, we want to obtain a solution vector for which:
$\mathbf{a}^{T}\mathbf{y}_{i}\geq b \text{ for all } i$
where $b>0$ is some margin factor.
This is stronger than saying we want $\mathbf{a}^{T}\mathbf{y}_{i}\geq 0$, since now we have some margin that we’re using to “insulate” the decision region with a distance of $\frac{b}{||\mathbf{y}_{i}||}$.
We’ve defined the criteria for $\mathbf{a}$, but we still need to use numerical optimization to get it.
If there is not a “closed-form” solution (we can’t simply “solve for $\mathbf{a}$”), we have to use a kind of hot-and-cold approach.
The basic strategy behind numerical optimization is:
You have a cost function ($J(\mathbf{a})$) you want to minimize.
You have a (random?) set of parameters that define $\mathbf{a}$.
On iteration 1, calculate the cost $J(\mathbf{a})$ for your initial conditions.
On the next iteration, “nudge” your parameters and see how $J(\mathbf{a})$ changes.
Repeat Step 4 until you reach convergence, where your cost function is barely changing.
Some great examples of numerical optimization can be found here:
Once you dig into the details, there are a number of questions:
The learning rate $\eta$ should be reasonably fast (i.e. not too small) but will not overshoot (i.e. not too big).
If you know the derivatives of your criterion function $J(\cdot)$, you can try to calculate the “optimal” learning rate:
$ \eta_{k} = \frac{||\Delta J||^{2}}{\Delta J^{T}\mathbf{H}\Delta J} $
where $\mathbf{H}$ is the Hessian matrix, which is the matrix of second partial derivatives of $J$.
However, this is rarely so straightforward…
What function should we create for $J(\mathbf{a})$?
Let’s say $J(\mathbf{a}; \mathbf{y}_{1},\cdots,\mathbf{y}_{n})$ be the number of misclassified samples.
If $\mathbf{a}$ leads to more misclassifications, this means a higher value for $J(\mathbf{a})$. If all samples are correctly classified, then $J(\mathbf{a})=0$.
However, this is difficult to optimize because it’s piecewise constant: If the number of misclassified samples doesn’t change, then $\Delta J(\mathbf{a}) = 0$, and we don’t go anywhere.
Alternatively, we could use the Perceptron criterion function:
$ J_{p}(\mathbf{a}) = \sum_{\mathbf{y}\in\mathcal{Y}}(-\mathbf{a}^{T}\mathbf{y}) $
where $\mathcal{Y}$ is the set of misclassifications due to $\mathbf{a}$.
If $\mathcal{Y} = \emptyset$ (there are no misclassifications), then $J_{p}(\mathbf{a}) = 0$ and we’re done.
$ J_{p}(\mathbf{a}) = \sum_{\mathbf{y}\in\mathcal{Y}}(-\mathbf{a}^{T}\mathbf{y}) $
Remember: We want a solution vector such that $\mathbf{a}^{T}\mathbf{y}>0$ for all samples.
This means that $\mathbf{a}^{T}\mathbf{y} \leq 0$ only if $\mathbf{y}$ is misclassified; in other words, there are samples in $\mathcal{Y}$.
During optimization, $J_{p}(\mathbf{a})$ is never negative and is only 0 when $\mathbf{a}$ is a solution vector or on the decision boundary (i.e. $\mathcal{Y}$ is empty).
Geometrically, this is proportional to the sum of the distances from misclassified samples to the decision boundary.
To find $\Delta J_{p}$, we’re calculating $\frac{\partial J_{p}}{\partial a_{j}}$ for each component in $\mathbf{a}$, so:
$ \Delta J_{p} = \sum_{\mathbf{y}\in\mathcal{Y}}(-\mathbf{y}) $
So our update rule is now:
$ \mathbf{a}_{k+1} = \mathbf{a}_{k} + \eta_{k}\sum_{\mathbf{y}\in\mathcal{Y}}(\mathbf{y}) $
In other words: We add some multiple of the sum of the misclassified samples to the present weight vector to get the next weight vector.
This is called the batch Perceptron algorithm since we can use batches of samples.
To examine whether this process will converge, we look at a few simplifications.
Instead of building a set $\mathcal{Y}$ of all misclassified samples, let’s look at each sample in sequence and modify the weights for each individual misclassified sample.
We’ll assume that learning rate $\eta_{k}$ is constant for all $k$, a.k.a. the fixed-increment case.
To investigate convergence behavior, we simply cycle through the samples and keep modifying the weight until the algorithm converges.
This is a very simple approach which is guaranteed to move the hyperplane in the correct direction.
Recall that we assume the samples are linearly separable; if that is true, the system will converge.
The speed with which it converges is dependent on the separation of the samples.
We can add a variable increment $\eta_{k}$ and a margin $b$, so we obtain misclassifications whenever the hyperplane fails to exceed the margin and update a variable amount.
In this case the update rule is:
$\begin{array}{cl} a_{1} & \quad\text{arbitrary} \\ a_{k+1} = a_{k} + \eta_{k}\mathbf{y}^{k} & \quad k\geq 1\\ \end{array}$
And now $\mathbf{a}_{k}^{T}\mathbf{y}^{k}\leq b$ for all $k$.
Set $k=0$ and initialize $\mathbf{a},\theta,b,\eta(\cdot)$
We know the samples are linearly separable if:
$ \eta_{k}\geq 0 $
$ \lim_{m\rightarrow\infty}\sum_{k=1}^{m}\eta_{k}=\infty $
$ \lim_{m\rightarrow\infty}\frac{\sum_{k=1}^{m}\eta_{k}^{2}}{(\sum_{k=1}^{m}\eta_{k})^{2}} = 0 $
These conditions are satisfied if $\eta_{k}$ is a positive constant OR if it decreases as $\frac{1}{k}$.
Then $\mathbf{a}_{k}$ converges to a solution vector satisfying $\mathbf{a}^{T}\mathbf{y}_{i} > b$ for all $i$.
We specified a Perceptron criterion to be one that is easily optimized.
What if we are dealing with a criterion function for which second-order optimization is NOT possible?
Then we generalize the minimization approach via relaxation procedures.
In addition to $J_{p}(\mathbf{a})$, we can define a similar criterion:
$ J_{q}(\mathbf{a}) = \sum_{\mathbf{y}\in\mathcal{Y}}(\mathbf{a}^{T}\mathbf{y})^{2} $
This is the squared error criterion.
Both the perceptron criterion and the squared error criterion rely on misclassified samples.
The gradient of $J_{p}(\mathbf{a})$ is not smooth, while $J_{q}(\mathbf{a})$ is, providing an easier search space.
However, there are still some problems:
To avoid these, we use a modified batch relaxation with margin criterion:
$ J_{r}(\mathbf{a}) = \frac{1}{2} \sum_{\mathbf{y}\in\mathcal{Y}} \frac{(\mathbf{a}^{T}\mathbf{y}-b)^{2}}{||\mathbf{y}||^{2}} $
$ J_{r}(\mathbf{a}) = \frac{1}{2}\sum_{\mathbf{y}\in\mathcal{Y}}\frac{(\mathbf{a}^{T}\mathbf{y}-b)^{2}}{||\mathbf{y}||^{2}} $
In this case, $\mathcal{Y}$ is the set of samples for which $\mathbf{a}^{T}\mathbf{y} \leq b$ (they are misclassified).
$J_{r}(\mathbf{a})$ is never negative, and is zero only when $\mathbf{a}^{T}\mathbf{y} > b$ (all training samples are correctly classified).
The gradient of $J_{r}$ is given by:
$ \Delta J_{r} = \sum_{\mathbf{y}\in\mathcal{Y}}\frac{\mathbf{a}^{T}\mathbf{y} - b}{||\mathbf{y}||^{2}}\mathbf{y}$
And the update rule is:
$\begin{array}{cl} a_{1} & \text{arbitrary} \\ a_{k+1} = a_{k} + \eta_{k}\sum_{\mathbf{y}\in\mathcal{Y}} \frac{b-\mathbf{a}^{T}\mathbf{y}}{||\mathbf{y}||^{2}}\mathbf{y} & k\geq 1 \\ \end{array}$
Each update moves $\mathbf{a}_{k}$ a fraction, $\eta$, of the distance towards the hyperplane.
The value of $\eta$ determines how fast we converge:
So far, we have considered $\mathcal{Y}$, the set of misclassified samples.
However, we want to use ALL samples to train, not just a fraction of them!
Instead of trying to find $\mathbf{a}$ such that $\mathbf{a}^{T}\mathbf{y}_{i} > 0$, we will now try to make $\mathbf{a}^{T}\mathbf{y}_{i}=b_{i}$, where $b_{i}$ are arbitrary positive constants.
Instead of trying to solve linear inequalities, we are now solving linear equations – which is a better-understood problem.
Let’s convert to matrix notation.
Let $\mathbf{Y}$ be the $n$-by-$\widehat{d}$ matrix ($\widehat{d} = d + 1$), where the $i$-th row is $\mathbf{y}_{i}^{T}$.
Also, let $\mathbf{b}$ (the margin vector) be $(b_{1}, \ldots, b_{n})^{T}$.
Then we want to find the weight vector $\mathbf{a}$ such that:
$\begin{pmatrix} y_{10} & y_{11} & \cdots & y_{1\widehat{d}}\\ \vdots & \vdots & \ddots & \vdots\\ y_{n0} & y_{n1} & \cdots & y_{n\widehat{d}} \end{pmatrix} \begin{pmatrix} a_{0}\\ a_{1}\\ \vdots\\ a_{\widehat{d}} \end{pmatrix}= \begin{pmatrix} b_{1}\\ b_{2}\\ \vdots\\ b_{n} \end{pmatrix}$
$\mathbf{Y}\mathbf{a} = \mathbf{b}$
$ \mathbf{Y}\mathbf{a} = \mathbf{b}$
We want $\mathbf{a}$, so can’t we just divide everything by $\mathbf{Y}$?
Recall that the inverse of a matrix, $\mathbf{Y}^{-1}$, can only be written for nonsingular, square matrices.
But $\mathbf{Y}$ is an $n$-by-$\widehat{d}$ matrix, and $n\neq\widehat{d}$.
Since we want to solve $\mathbf{Y}\mathbf{a} = \mathbf{b}$, the optimal $\mathbf{a}$ would be the one for which $\mathbf{Ya-b=0}$.
So let’s define the error vector as:
$ \mathbf{e=Ya-b}$
Now we have a function we can try to minimize!
Thus, we have our new criterion function:
$ J_{s}(\mathbf{a}) = ||\mathbf{Ya-b}||^{2} = \sum_{i=1}^{n}(\mathbf{a}^{T}\mathbf{y}_{i}-b_{i})^{2} $
This is the sum-of-squared-error criterion, which is a traditional optimization problem.
As before, we find the gradient as:
$ \Delta J_{s} = \sum_{i=1}^{n} 2 (\mathbf{a}^{T}\mathbf{y}_{i} - b_{i})\mathbf{y}_{i} = 2\mathbf{Y}^{T}(\mathbf{Ya-b}) $
When our error function is zero, $\mathbf{e=Ya-b=0}$, which means that both our criterion and our gradient are zero.
Setting $\Delta J_{s}$ to zero yields the necessary condition:
$ \mathbf{Y}^{T}\mathbf{Ya}=\mathbf{Y}^{T}\mathbf{b} $
which replaces the original problem and allows us to find $\mathbf{a}$ much more easily.
Why is it easier to find $\mathbf{a}$ with $\mathbf{Y}^{T}\mathbf{Ya} = \mathbf{Y}^{T}\mathbf{b}$ versus $\mathbf{Ya=b}$?
The matrix $\mathbf{Y}^{T}\mathbf{Y}$ is square and often nonsingular.
Thus, we know an inverse matrix $(\mathbf{Y}^{T}\mathbf{Y})^{-1}$ does exist, so we can solve for $\mathbf{a}$:
\begin{align} \mathbf{a} &= (\mathbf{Y}^{T}\mathbf{Y})^{-1}\mathbf{Y}^{T}\mathbf{b} \\ \mathbf{a} &= \mathbf{Y}^{\dagger}\mathbf{b} \end{align}
Here, $\mathbf{Y}^{\dagger}$ is an $n$-by-$\widehat{d}$ matrix $\mathbf{Y}^{\dagger}\equiv(\mathbf{Y}^{T}\mathbf{Y})^{-1}\mathbf{Y}^{T}$ called the pseudoinverse. If $\mathbf{Y}$ is square and nonsingular, $\mathbf{Y}^{\dagger}$ coincides with $\mathbf{Y}^{-1}$.
Thus, a minimum squared error (MSE) solution exists, and $\mathbf{a} = \mathbf{Y}^{\dagger}\mathbf{b}$ is an MSE solution to $\mathbf{Ya=b}$.
The MSE solution $\mathbf{a}=\mathbf{Y}^{}\mathbf{b}$ clearly depends on the margin vector $\mathbf{b}$, which we haven’t defined yet. We can actually choose different $\mathbf{b}$ and get solutions with different properties.
Let’s look at an example…
Set up our matrix $\mathbf{Y}$:
$\mathbf{Y}= \begin{pmatrix} 1 & 1 & 2 \\ 1 & 2 & 0 \\ -1 & -3 & -1 \\ -1 & -2 & -3 \end{pmatrix}$
Class labels (+1 for $\omega_{1}$, -1 for $\omega_{2}$)
Solve for the pseudoinverse:
$\mathbf{Y}^{\dagger}= \begin{pmatrix} \frac{5}{4} & \frac{13}{12} & \frac{3}{4} & \frac{7}{12} \\ -\frac{1}{2} & -\frac{1}{6} & -\frac{1}{2} & -\frac{1}{6} \\ 0 & -\frac{1}{3} & 0 & -\frac{1}{3} \end{pmatrix}$
$\mathbf{Y}^{\dagger}= \begin{pmatrix} \frac{5}{4} & \frac{13}{12} & \frac{3}{4} & \frac{7}{12} \\ -\frac{1}{2} & -\frac{1}{6} & -\frac{1}{2} & -\frac{1}{6} \\ 0 & -\frac{1}{3} & 0 & -\frac{1}{3} \end{pmatrix}$
Arbitrarily, we let all margins be equal, i.e. $\mathbf{b}=(1,1,1,1)^{T}$, so our solution is:
$ \mathbf{a}=\mathbf{Y}^{}\mathbf{b}=\left(\frac{11}{3}, -\frac{4}{3}, -\frac{2}{3}\right)^{T} $
This leads to the decision boundary on the left.
One of the conditions for computing the pseudoinverse $\mathbf{Y}^{}$ are that the matrix $\mathbf{Y}^{T}\mathbf{Y}$ be nonsingular. If it is singular, we can’t compute the pseudoinverse.
Also, if we have a lot of training samples (which is common), then computing $\mathbf{Y}^{T}\mathbf{Y}$ is very difficult.
In these cases, we can avoid the pseudoinverse by going back to gradient descent and using that to obtain our optimized criterion function $J_{s}(\mathbf{a}) = ||\mathbf{Ya-b}||^{2}$.
Recall the gradient $\Delta J_{s} = 2 \mathbf{Y}^{T}(\mathbf{Ya-b})$ and set our update rule:
$ \mathbf{a}_{k+1} = \mathbf{a}_{k} + \eta_{k}\mathbf{Y}^{T}(\mathbf{Y}\mathbf{a}_{k} - \mathbf{b}) $
We can consider samples sequentially and use the LMS rule:
$ \mathbf{a}_{k+1} = \mathbf{a}_{k} + \eta_{k}(b_{k} - \mathbf{a}_{k}^{T}\mathbf{y}^{k})\mathbf{y}^{k} $
$ \mathbf{a}_{k+1} = \mathbf{a}_{k} + \eta_{k}(b_{k} - \mathbf{a}_{k}^{T}\mathbf{y}^{k})\mathbf{y}^{k} $
Compare this with the relaxation rule from before:
$ \mathbf{a}_{k+1} = \mathbf{a}_{k} + \eta \frac{ b - \mathbf{a}_{k}^{T} \mathbf{y}^{k} } { ||\mathbf{y}^{k}||^{2} } \mathbf{y}^{k} $
What are the differences?
Recall how we replaced $g(\mathbf{x}) = \mathbf{w}^{T}\mathbf{x} + w_{0}$ with $g(\mathbf{x}) = \mathbf{a}^{T}\mathbf{y}$, where $\mathbf{a}^{T}$ is a $\widehat{d}$-dimensional weight vector and the $\widehat{d}$ functions $y_{i}(\mathbf{x})$ are arbitrary functions of $\mathbf{x}$.
Let’s modify the notation a bit, and say that each sample $\mathbf{x}_{k}$ is transformed to $\mathbf{y}_{k}=\varphi(\mathbf{x}_{k})$, where $\varphi(\cdot)$ is a nonlinear mapping into high dimension.
For each of the $n$ patterns, $k=1,2,\ldots,n$, we let $z_{k}=\pm 1$, where the sign indicates whether the pattern is in $\omega_{1}$ or $\omega_{2}$.
The linear discriminant in this space is:
$ g(\mathbf{y}) = \mathbf{a}^{T}\mathbf{y} $
where the weight and transformed pattern vectors are augmented ($a_{0}=w_{0}$ and $y_{0}=1$).
A separating hyperplane ensures:
$ z_{k}g(\mathbf{y}_{k}) \geq 1, k=1,\ldots,n $
Remember: the sign of $g(\mathbf{y}_{k})$ indicates the class.
For a correctly classified sample, $g(\mathbf{y}_{k})$ is positive (and $z_{k}=+1$) if $\mathbf{y}$ belongs to $\omega_{1}$, and is negative (and $z_{k}=-1$) if it belongs to $\omega_{2}$.
Previously, we set the margin to be $b>0$ and told our optimization functions to find any solution within that margin. Now, we want to set the hyperplane such that we maximize $b$.
Why does this make sense?
$ z_{k}g(\mathbf{y}_{k}) \geq 1, k=1,\ldots,n $
The distance from the transformed pattern $\mathbf{y}$ to the hyperplane is $\frac{|g(\mathbf{y})|}{||\mathbf{a}||}$.
The above equation implies:
$ \frac{ z_{k} g(\mathbf{y}_{k})} {||\mathbf{a}||} \geq b $
Assuming that a positive margin exists.
$ \frac{ z_{k} g(\mathbf{y}_{k})} {||\mathbf{a}||} \geq b $
Our goal is to find the vector $\mathbf{a}$ that maximizes $b$.
To avoid problems with arbitrary scaling, we add an additional constraint: $b||\mathbf{a}||=1$, thus forcing us to minimize $||\mathbf{a}||^{2}$ as we maximize $b$.
Support vectors are samples for which the transformed vectors $\mathbf{y}_{k}$ represent $z_{k}g(\mathbf{y}_{k}) = 1$.
Since our hyperplane satisfies $z_{k}g(\mathbf{y}_{k}) \geq 1$, the support vectors minimize the numerator above – they are closest to the hyperplane, and moreover they are all the same distance away.
This also means that they are the “most interesting” from a training point of view, and most difficult to classify correctly from a testing point of view.
Recall that when we trained the PCF, we looked at randomly misclassified samples.
In an ideal case, with SVM, we look for the worst-classified samples – the misclassified samples that are farthest away from the current hyperplane, which constitute our support vectors.
We start out training by deciding on the form of our mapping functions or kernel, $\varphi(\cdot)$.
Typically these are chosen either by the problem domain, or as arbitrary polynomials, Gaussians, etc.
The dimensionality of the transformed space may be arbitrarily high, though in practice is limited by computational resources.
Start by recasting the minimization problem using Lagrange undetermined multipliers.
From $\frac{z_{k} g(\mathbf{y}_{k})}{||\mathbf{a}||} \geq b$, and knowing that we want to minimize $||\mathbf{a}||$:
$ L(\mathbf{a}, \boldsymbol{\alpha}) = \frac{1}{2}||\mathbf{a}||^{2} - \sum_{k=1}^{n}\alpha_{k}\left[z_{k}\mathbf{a}^{T}\mathbf{y}_{k} - 1\right] $
So we seek to minimize $L(\cdot)$ with respect to $\mathbf{a}$ and maximize it with respect to the multipliers $\alpha_{k}\geq 0$.
We reformulate the problem such that we only need to maximize according to $\mathbf{a}$:
$ L(\mathbf{a}) = \sum_{i=1}^{n}\alpha_{k} - \frac{1}{2}\sum_{k,j}^{n}\alpha_{k}\alpha_{j}z_{k}z_{j}\mathbf{y}_{j}^{T}\mathbf{y}_{k} $
Subject to the constraints: $\sum_{k=1}^{n}z_{k}\alpha_{k} = 0, \alpha_{k}\geq 0, k=1,\ldots,n$
This is the simplest problem that cannot be solved using a linear discriminant.
We can map these to a higher dimension using an expansion up to the second order:
$ (1, \sqrt{2}x_{1}, \sqrt{2}x_{2}, \sqrt{2}x_{1}x_{2}, x_{1}^{2}, x_{2}^{2}) $
where $\sqrt{2}$ is chosen for convenient normalization.
Thus we translate each of the points to a six-dimensional space.
This is a two-dimensional representation of that projection, where we’re looking at two out of the six dimensions.
The only thing that changed is the y-axis is now the $x_{1}$ value times the $x_{2}$ value (times $\sqrt{2}$).
This is a huge topic, but it provides a very solid foundation for decision theory.
If your samples are linearly separable, you can very easily create a hyperplane that achieves perfect classification.
Try to select your features such that you have a very good separation between your training classes - this makes classification trivial!
For small problems, you can develop an analytic solution where you use the pseudoinverse to calculate your weight vectors directly.
For larger problems, select an appropriate criterion function and solve using gradient descent.
Different cost functions to minimize:
How to “nudge” your parameter set:
When to stop your algorithm?
For complex problems, you can transform your features into a high-dimensional space and try to find a linearly separable set of dimensions for classification.
You must choose your mapping functions appropriately.
If you have non-convex solution regions, you may need to choose a different classification method altogether.
We will return to the world of Bayes and Gaussian distributions.
How do we estimate the values of the parameters we need from our training data?
You can use these methods in a large number of fields, not just for classification – this is a general statistical technique for investigating the structure of your data!


VoltCoin
Energy Produced
kWh
Energy Consumed
kWh
Net Energy
0
Pay/Recieve Volts
Solar
Nuclear
Big Electric


Sysbench for databases
This is my second part of the sysbench guide, I’ll cover here some basic benchmarks for databases. Feel free to check my first part for an introduction.
Connecting to the DB
First things first, we’ll need a test database. We’ll stick to the default “sbtest”, so go ahead and create it. I’ll wait.
Now sysbench needs the connection parameters. The actual values depend on the target. Sysbench supports MySQL and postgreSQL.
For MySQL, MariaDB or Percona Server the command line options are:
--db-driver=mysql
--mysql-host=
--mysql-port=
--mysql-user=
--mysql-password=
For postgreSQL, we have:
--db-driver=pgsql
--pgsql-host=
--pgsql-port=
--pgsql-user=
--pgsql-password=
For brevity’s sake, I will be omitting these parameters in the examples below, but they are required so don’t you forget them.
The Test Table
Here we have the prototypical test table
CREATE TABLE `sbtest1` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`k` int(11) NOT NULL DEFAULT 0,
`c` char(120) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
`pad` char(60) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
PRIMARY KEY (`id`),
KEY `k_1` (`k`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci
That’s it. 4 columns: 2 integer and 2 chars. Unfortunately we don’t have so many built-in options to tweak the table as in other tools such as mysqlslap However, some control is possible.
--auto_inc
sets the id column as autoincrement/serial [on]--create_secondary
creates a secondary index on column k [on]--mysql_storage_engine
storage engine, only applies to MySQL [innodb]
The id
column is populated either by the DB (with autoincrement/serial), or by sequential integers generated by sysbench,
k
is assigned a random number between 1 and whatever the table size is. The char columns are filled with random numbers,
in groups of 11 digits separated by dashes, no index is created for either c
or pad
.
Bulk Insert
Bulk insert does concurrent multi-row inserts, we specify how many threads we want and each one inserts into its own table. So the total number of tables is the same as the number of threads.
The default is 1 thread. But that is easily changed. Let’s create 20 tables.
(remember that the db connection parameters are omitted)
sysbench bulk_insert prepare --threads=20
Now lets insert 1 million rows and see how long it takes. The rows distributed over all the tables.
# Insert 1M rows total, concurrently on the 20 tables
-> sysbench bulk_insert run --threads=20 --events=1000000 --time=0
sysbench 1.0.15 (using system LuaJIT 2.0.5)
Running the test with following options:
Number of threads: 20
Initializing random number generator from current time
Initializing worker threads...
Threads started!
SQL statistics:
queries performed:
read: 0
write: 43
other: 0
total: 43
transactions: 1000000 (144368.49 per sec.)
queries: 43 (6.21 per sec.)
ignored errors: 0 (0.00 per sec.)
reconnects: 0 (0.00 per sec.)
General statistics:
total time: 6.9213s
total number of events: 1000000
Latency (ms):
min: 0.00
avg: 0.07
max: 2932.57
95th percentile: 0.00
sum: 67550.48
Threads fairness:
events (avg/stddev): 50000.0000/13956.14
execution time (avg/stddev): 3.3775/0.26
We can see that 1M rows were added using a total of 43 INSERTs statements (an average of 23255.8 rows per INSERT). The total time was about 6.92 seconds.
The latency statistics are interesting here, the average time to insert a set of rows was 0.07 milliseconds, but max was way higher, about 2.9 seconds. This is because the inserted rows are unevenly inserted among the tables, we can see this by comparing the fairness stdev vs the avg.
After we are satisfied we can drop the tables, and be ready for the next test.
sysbench bulk_insert cleanup --threads=20
OLTP Read-Only
OLTP (Online Transaction Processing) tests try simulate transaction-oriented loads in the database, sysbench does this by running several kinds of queries inside a transaction.
Lets start simple. We want to create 10 tables, each with 10K rows. For a total of 100K rows.
# Prepare 10 tables, each with 10K rows
sysbench oltp_read_only prepare --tables=10 --table_size=100000
It’s usually a good idea to prewarm
the database, i.e. load the tables into the buffer pool. So we can more accurately simulate the steady-state performance.
sysbench oltp_read_only prewarm --tables=10 --threads=10
Run the benchmark with 10K events, with a ratio of 2 threads per table
-> sysbench oltp_read_only run --tables=10 --threads=20 --events=10000 --time=0
sysbench 1.0.15 (using system LuaJIT 2.0.5)
Running the test with following options:
Number of threads: 20
Initializing random number generator from current time
Initializing worker threads...
Threads started!
SQL statistics:
queries performed:
read: 140000
write: 0
other: 20000
total: 160000
transactions: 10000 (1077.22 per sec.)
queries: 160000 (17235.59 per sec.)
ignored errors: 0 (0.00 per sec.)
reconnects: 0 (0.00 per sec.)
General statistics:
total time: 9.2813s
total number of events: 10000
Latency (ms):
min: 4.37
avg: 18.54
max: 69.91
95th percentile: 29.19
sum: 185396.12
Threads fairness:
events (avg/stddev): 500.0000/4.46
execution time (avg/stddev): 9.2698/0.01
So, this is interesting: Why did we get 140K reads when we asked for 10K events?
Sysbench by default runs the following statements per event:
- 10 x point selects:
select c from table where id=i
- 1 x simple range:
select c from table where id between a and b
- 1 x sum range:
select sum(k) from table where id between a and b
- 1 x order range:
select c from table where id between a and b order by c
- 1 x distinct range:
select distinct c from table where id between a and b order by c
When done, delete the tables.
sysbench oltp_read_only cleanup --tables=20
Wasn’t that fun?
OLTP Write Only
This is the write counterpart of the previous test. By now, you know the drill, right?
sysbench oltp_write_only prepare --tables=10
sysbench oltp_write_only prewarm --tables=10 --threads=10
Lets use a time limit instead:
-> sysbench oltp_write_only run --tables=10 --threads=20 --events=0 --time=30
sysbench 1.0.15 (using system LuaJIT 2.0.5)
Running the test with following options:
Number of threads: 20
Initializing random number generator from current time
Initializing worker threads...
Threads started!
SQL statistics:
queries performed:
read: 0
write: 341181
other: 170918
total: 512099
transactions: 85123 (2836.18 per sec.)
queries: 512099 (17062.42 per sec.)
ignored errors: 672 (22.39 per sec.)
reconnects: 0 (0.00 per sec.)
General statistics:
total time: 30.0117s
total number of events: 85123
Latency (ms):
min: 0.53
avg: 7.05
max: 67.17
95th percentile: 14.21
sum: 599892.48
Threads fairness:
events (avg/stddev): 4256.1500/49.08
execution time (avg/stddev): 29.9946/0.00
Each write_only event consists of:
- 1 x index_updates:
update table set k~k+1 where id=i
- 1 x non_index_updates:
update table set c=? where id=i
- 1 x delete_inserts:
delete from table where id~i; insert into table (id, k, c, pad) values (...)
When using a time stop condition, we’ll want to compare rates, such as queries per second or transactions per second
OLTP Read Write
This test combines the last two in one package. First it runs the same code as in oltp_read_only and then continues with oltp_write_only. We can even reuse the table from the previous benchmark.
The transaction content for tests can be tweaked.
--range_selects
Enable/disable all range SELECT queries [on]--range_size
Range size for range SELECT queries [100]--simple_ranges
Simple range SELECT queries per transaction [1]--point_selects
Point SELECT queries per transaction [10]--order_ranges
SELECT ORDER BY queries per transaction [1]--distinct_ranges
SELECT DISTINCT queries per transaction [1]--delete_inserts
DELETE/INSERT combinations per transaction [1]--index_updates
UPDATE index queries per transaction [1]--non_index_updates
UPDATE non-index queries per transaction [1]--sum_ranges
SELECT SUM() queries per transaction [1]--skip_trx
Don’t start explicit transactions (use AUTOCOMMIT) [off]
Related Links
- sysbench’s github: https://github.com/akopytov/sysbench
Conclusion
These aren’t the only DB tests that ship with sysbench, but the basic procedure is basically the same.
Until next time.
Tomas


Participate in the festive Opening Ceremony of the 14th Wheels of Love Ride Gather at the Mevo'ot Yam Harbor in Michmoret! Begin riding south to Beit Yanai, crossing the Nachal Alexander estuary to the Mediterranean. Say farewell to the coast and ride eastwards through Moshav Kfar Vitkin. The first part of the ride takes us through the beautiful groves and orchards of Emek Hefer. Ride past the Ruppin Academic Center and continue south to road 57, where we turn to the east. From here we’ll ride north for the rest of the day. Pass Kibbutz Yad Hannah, named after Hannah Senesh one of the 37 Jews who parachuted during World War II into Hungary, and continue to Bat Hefer.Today’s cycling ends at Kibbutz Ein Shemer.
Visit the Kibbutz Old Courtyard Museum for a fun hands-on experience which takes us back in time to the early days of the Kibbutz. Travel to the Solar Garden in Binyamina and learn about this unique initiative designed to promote green energy sources and new environmental technologies. Time and weather permitting, visit the archeological site of Mei Kedem, an ancient water system built during the Roman and Byzantine periods.


|
MeterLogger
|
Go to the source code of this file.
Data Structures | |
| struct | sha256_ctx_t |
Macros | |
| #define | SHA256_BLOCK_LENGTH 64 |
| #define | SHA256_DIGEST_LENGTH 32 |
| #define | SHA256_DIGEST_STRING_LENGTH (SHA256_DIGEST_LENGTH * 2 + 1) |
Functions | |
| ICACHE_FLASH_ATTR void | sha256_init (sha256_ctx_t *context) |
| ICACHE_FLASH_ATTR void | sha256_update (sha256_ctx_t *context, const uint8_t *data, size_t len) |
| ICACHE_FLASH_ATTR void | sha256_final (sha256_ctx_t *context, uint8_t digest[SHA256_DIGEST_LENGTH]) |
| ICACHE_FLASH_ATTR char * | sha256_end (sha256_ctx_t *context, char buffer[SHA256_DIGEST_STRING_LENGTH]) |
| ICACHE_FLASH_ATTR void | sha256_raw (const uint8_t *data, size_t len, uint8_t digest[SHA256_DIGEST_LENGTH]) |
| ICACHE_FLASH_ATTR char * | sha256_data (const uint8_t *data, size_t len, char digest[SHA256_DIGEST_STRING_LENGTH]) |
| #define SHA256_BLOCK_LENGTH 64 |
Copyright (c) 2000-2001 Aaron D. Gifford Copyright (c) 2013-2014 Pavol Rusnak All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTOR(S) ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
Definition at line 38 of file sha256.h.
Referenced by hmac_sha256_final(), hmac_sha256_init(), sha256_final(), sha256_init(), and sha256_update().
| #define SHA256_DIGEST_LENGTH 32 |
Definition at line 39 of file sha256.h.
Referenced by decrypt_aes_hmac_combined(), encrypt_aes_hmac_combined(), hmac_sha256_final(), sha256_end(), and sha256_init().
| #define SHA256_DIGEST_STRING_LENGTH (SHA256_DIGEST_LENGTH * 2 + 1) |
| ICACHE_FLASH_ATTR char* sha256_data | ( | const uint8_t * | data, |
| size_t | len, | ||
| char | digest[SHA256_DIGEST_STRING_LENGTH] | ||
| ) |
Definition at line 430 of file sha256.c.
References sha256_end(), sha256_init(), and sha256_update().
| ICACHE_FLASH_ATTR char* sha256_end | ( | sha256_ctx_t * | context, |
| char | buffer[SHA256_DIGEST_STRING_LENGTH] | ||
| ) |
Definition at line 399 of file sha256.c.
References memset, SHA256_DIGEST_LENGTH, sha256_final(), and sha2_hex_digits.
Referenced by sha256_data().
| ICACHE_FLASH_ATTR void sha256_final | ( | sha256_ctx_t * | context, |
| uint8_t | digest[SHA256_DIGEST_LENGTH] | ||
| ) |
Definition at line 334 of file sha256.c.
References sha256_ctx_t::bitcount, sha256_ctx_t::buffer, memcpy, memset, REVERSE32, REVERSE64, SHA256_BLOCK_LENGTH, SHA256_SHORT_BLOCK_LENGTH, sha256_transform(), and sha256_ctx_t::state.
Referenced by hmac_sha256_final(), sha256_end(), and sha256_raw().
| ICACHE_FLASH_ATTR void sha256_init | ( | sha256_ctx_t * | context | ) |
Definition at line 196 of file sha256.c.
References sha256_ctx_t::bitcount, sha256_ctx_t::buffer, memcpy, memset, SHA256_BLOCK_LENGTH, SHA256_DIGEST_LENGTH, sha256_initial_hash_value, and sha256_ctx_t::state.
Referenced by hmac_sha256_final(), hmac_sha256_init(), sha256_data(), and sha256_raw().
| ICACHE_FLASH_ATTR void sha256_raw | ( | const uint8_t * | data, |
| size_t | len, | ||
| uint8_t | digest[SHA256_DIGEST_LENGTH] | ||
| ) |
Definition at line 421 of file sha256.c.
References sha256_final(), sha256_init(), and sha256_update().
Referenced by hmac_sha256_init(), and init_aes_hmac_combined().
| ICACHE_FLASH_ATTR void sha256_update | ( | sha256_ctx_t * | context, |
| const uint8_t * | data, | ||
| size_t | len | ||
| ) |
Definition at line 288 of file sha256.c.
References sha256_ctx_t::bitcount, sha256_ctx_t::buffer, memcpy, SHA256_BLOCK_LENGTH, and sha256_transform().
Referenced by hmac_sha256_final(), hmac_sha256_init(), hmac_sha256_update(), sha256_data(), and sha256_raw().


--- title: Alerts minver: 0.1.1 --- {% extends 'component.njk' %} {% block content %} Default Info Here is helpful information. Acknowledge {% code 'html' %} Info Here is helpful information. Acknowledge {% endcode %} Error Error Change a few things up and try submitting again. Correct Issue {% code 'html' %} Error Change a few things up and try submitting again. Correct Issue {% endcode %} Warning Warning Best check yo self, you're not looking too good. Double Check {% code 'html' %} Warning Best check yo self, you're not looking too good. Double Check {% endcode %} Success Success You successfully read this important alert message. Celebrate {% code 'html' %} Success You successfully read this important alert message. Celebrate {% endcode %} {% endblock %}


Fireworks Galaxy-NGC 6946 is a face-on intermediate spiral galaxy with a small bright nucleus, whose location in the sky straddles the boundary between the northern constellations of Cepheus and Cygnus. Its distance from Earth is about 22.5 million light-years or 6.8 megaparsecs, similar to the distance of M101 (NGC 5457) in the constellation Ursa Major. Both were once considered to be part of the Local Group. but are now known to be among the dozen bright spiral galaxies near the Milky Way but beyond the confines of the Local Group. NGC 6946 lies within the Virgo Supercluster.
Discovered by William Herschel on 9 September 1798, this well-studied galaxy has a diameter of approximately 40,000 light-years[dubious – discuss] , about one-third of the Milky Way's size, and it contains roughly half the number of stars as the Milky Way. The galaxy is heavily obscured by interstellar matter as it lies quite close to the galactic plane of the Milky Way. Due to its prodigious star formation it has been classified as an active starburst galaxy.
Various unusual celestial objects have been observed within NGC 6964. This includes the so-called 'Red Ellipse' along one of the northern arms that looks like a super-bubble or very large supernova remnant, and which may have been formed by an open cluster containing massive stars. There are also two regions of unusual dark lanes of nebulosity, while within the spiral arms several regions appear devoid of stars and gaseous hydrogen, some spanning up to two kiloparsecs across. A third peculiar object, discovered in 1967, is now known as "Hodge's Complex". This was once thought to be a young supergiant cluster, but in 2017 it was conjectured to be an interacting dwarf galaxy superimposed on NGC 6964.
The Triangulum Galaxy is a spiral galaxy approximately 3 million light-years (ly) from Earth in the constellation Triangulum. It is catalogued as Messier 33 or NGC 598. The Triangulum Galaxy is the third-largest member of the Local Group of galaxies, behind the Milky Way and the Andromeda Galaxy. It is one of the most distant permanent objects that can be viewed with the naked eye.
The galaxy is the smallest spiral galaxy in the Local Group and it is believed to be a satellite of the Andromeda Galaxy due to their interactions, velocities, and proximity to one another in the night sky. It also has an H-II nucleus.
Under exceptionally good viewing conditions with no light pollution, the Triangulum Galaxy can be seen with the naked eye. It is one of the most distant permanent objects that can be viewed without the aid of a telescope. Being a diffuse object, its visibility is strongly affected by small amounts of light pollution. It ranges from easily visible by direct vision in dark skies to a difficult averted vision object in rural or suburban skies. For this reason, Triangulum is one of the critical sky marks of the Bortle Dark-Sky Scale.
The Andromeda Galaxy, also known as Messier 31, M31, or NGC 224, is a spiral galaxy approximately 780 kiloparsecs (2.5 million light-years) from Earth, and the nearest major galaxy to the Milky Way. Its name stems from the area of the sky in which it appears, the constellation of Andromeda.
The 2006 observations by the Spitzer Space Telescope revealed that the Andromeda Galaxy contains approximately one trillion stars, more than twice the number of the Milky Way's estimated 200 to 400 billion stars. The Andromeda Galaxy's mass is estimated to be around 1.76 times that of the Milky Way Galaxy (~0.8-1.5×1012 solar masses vs the Milky Way's 8.5×1011 solar masses), though a 2018 study found that the Andromeda Galaxy's mass is roughly the same as the Milky Way's. The Andromeda Galaxy, spanning approximately 220,000 light-years, is the largest galaxy in our Local Group, which is also home to the Triangulum Galaxy and other minor galaxies.
The Milky Way and Andromeda galaxies are expected to collide in ~4.5 billion years, merging to form a giant elliptical galaxy or a large disc galaxy. With an apparent magnitude of 3.4, the Andromeda Galaxy is among the brightest of the Messier objects making it visible to the naked eye on moonless nights, even when viewed from areas with moderate light pollution.
Messier 82 (also known as NGC 3034, Cigar Galaxy or M82) is a starburst galaxy approximately 12 million light-years away in the constellation Ursa Major. A member of the M81 Group, it is about five times more luminous than the whole Milky Way and has a center one hundred times more luminous than our galaxy's center. The starburst activity is thought to have been triggered by interaction with neighboring galaxy M81. As the closest starburst galaxy to Earth, M82 is the prototypical example of this galaxy type. SN 2014J, a type Ia supernova, was discovered in the galaxy on 21 January 2014. In 2014, in studying M82, scientists discovered the brightest pulsar yet known, designated M82 X-2.
M82 was first discovered by Johann Elert Bode on December 31, 1774 together with M81 he described it as a "nebulous patch", about 0.75 deg away from M81, "very pale and of elongated shape". In 1779, Pierre Méchain independently rediscovered both galaxies and reported them to Charles Messier, who added them to his catalog.


{% extends 'dark_base.html' %}
{% load staticfiles %}
{% load i18n %}
{% block title %}erebbit - place to connect with others and share what you know{% endblock %}
{% block head %}
{% endblock head %}
{% block main %}
Welcome to <erebbit/>
A Socially-Oriented Platform to help developers connect with other developers and share what they know


As soon as the debugger attaches to a program (or a new program is executed from the debugger), the execution of the debuggee is stopped.
At this point, you can:
Note: Most operations require the debugged program to be stopped in the debugger. For example, in order to insert or remove a breakpoint, you need first to select Program -> Break (or use the Break button from the toolbar). Once the program stops, you may proceed to the Breakpoints menu.
You can execute the program, one step at a time, at either machine level or source level. At machine level, you can execute one CPU instruction at a time. This functionality can be accessed by selecting Step Instruction from the Program menu.
To execute one line of source code, select Step from the Program menu, or press the Step button on the toolbar (if the toolbar is not visible, turn it on by selecting Toolbar in the View menu).
While stepping at the source level, if a function call is encountered, the debugger will step inside of that function. If you want to step over function calls (i.e. not step inside called functions) use the Next menu from the Program menu on the menu bar, or use the Next button from the toolbar.
Note: When running in text mode (no graphical user interface), the following commands are available at the command prompt:
help <command>
at the prompt.
To continue executing the program, select Continue from the Program menu. The execution will resume until either a breakpoint or watchpoint is hit, the program receives a signal, or you stop it. To stop the program, select Break from the Program menu, or from the toolbar.
The Return from function menu (under Program) and the Return toolbar button allow you to resume the execution of the debugged program until the current function returns to its caller. As soon as the function returns, the program will break into the debugger.
To continue executing the program until a given line of code is reached, right-click on that line and select the Run To Cursor menu option.


Hello to your MongoDB playground
Add new tag:
Tag name:
Add new Image:
Image url:
Description:
Tags:
Search:
Tag name:
Posted after:
Posted before:
Limit:


Over 1,100 tons of onion exported to Bangladesh in Oct
In October, Myanmar exported onion worth nearly 700,000 US dollars to Bangladesh, according to Maungdaw Border Trade Camp.
Myanmar exported 180 tons of onion worth 79,950 US dollars to Bangladesh via Maungdaw Border Trade Camp in September and 1,175 tons of onion worth 696,600 US dollars in October.
In October, Myanmar exported 319 tons of Rohu worth 294,355 US dollars and 46 tons of dried fishes worth 28,935 US dollars.
Thar Tun Sein, an in-charge of the Maungdaw Border Trade Camp said: “We have to ship onion by three vessels a day. Sometimes, we ship onion by five vessels. On November 3, we exported around 75 tons of onion. The export volume is not regular. The onion-loaded trucks arrive in the border trade camp every day. The most export item is onion with more than 1,000 tons.”
Currently, Myanmar exports 40 to 80 tons of onion via Maungdaw border trade jetty a day. Despite the arrival of onion at Maungdaw border, the onion price is still high. The price of onion increased from Ks 1,500 in October to Ks over 2,000 per viss in early November. Likewise, Myanmar exports onion via Sittwe Border Trade.


38
Hezekiah's Sickness and Recovery
1 In those days Hezekiah became sick and was at the point of death. And Isaiah the prophet the son of Amoz came to him, and said to him, “Thus says the LORD: Set your house in order, for you shall die, you shall not recover.”
2 Then Hezekiah turned his face to the wall and prayed to the LORD,
3 and said, “Please, O LORD, remember how I have walked before you in faithfulness and with a whole heart, and have done what is good in your sight.” And Hezekiah wept bitterly.
4 Then the word of the LORD came to Isaiah:
5 “Go and say to Hezekiah, Thus says the LORD, the God of David your father: I have heard your prayer; I have seen your tears. Behold, I will add fifteen years to your life.
6 I will deliver you and this city out of the hand of the king of Assyria, and will defend this city.
7 “This shall be the sign to you from the LORD, that the LORD will do this thing that he has promised:
8 Behold, I will make the shadow cast by the declining sun on the dial of Ahaz turn back ten steps.” So the sun turned back on the dial the ten steps by which it had declined.
9 A writing of Hezekiah king of Judah, after he had been sick and had recovered from his sickness:
10 I said, In the middle of my days
I must depart;
I am consigned to the gates of Sheol
for the rest of my years.
11 I said, I shall not see the LORD,
the LORD in the land of the living;
I shall look on man no more
among the inhabitants of the world.
12 My dwelling is plucked up and removed from me
like a shepherd's tent;
like a weaver I have rolled up my life;
he cuts me off from the loom;
from day to night you bring me to an end;
13 I calmed myself until morning;
like a lion he breaks all my bones;
from day to night you bring me to an end.
14 Like a swallow or a crane I chirp;
I moan like a dove.
My eyes are weary with looking upward.
O Lord, I am oppressed; be my pledge of safety!
15 What shall I say? For he has spoken to me,
and he himself has done it.
I walk slowly all my years
because of the bitterness of my soul.
16 O Lord, by these things men live,
and in all these is the life of my spirit.
Oh restore me to health and make me live!
17 Behold, it was for my welfare
that I had great bitterness;
but in love you have delivered my life
from the pit of destruction,
for you have cast all my sins
behind your back.
18 For Sheol does not thank you;
death does not praise you;
those who go down to the pit do not hope
for your faithfulness.
19 The living, the living, he thanks you,
as I do this day;
the father makes known to the children
your faithfulness.
20 The LORD will save me,
and we will play my music on stringed instruments
all the days of our lives,
at the house of the LORD.
21 Now Isaiah had said, “Let them take a cake of figs and apply it to the boil, that he may recover.”
22 Hezekiah also had said, “What is the sign that I shall go up to the house of the LORD?”


A data structure to store, modify, query temporal evolutions and subgraphs of some graph is proposed in this post, in order to handle issues discussed in the previous post, relational database not for power grids. There are more benefits.
The core ingredient, snapshot, is discussed in detail first, and how multiple snapshots for one graph are store is introduced in two sections, increment and meta-graph. The modification of the graph can be based on transactions, which is discussed in section transaction. A better place to store such data values is a database, and how a relational database design might look like is discussed. Lastly, a new concept, secondary snapshot, is brought up to generalise the idea for attributes of edges and nodes.
I am assuming we are on the same page in terms of:
- Basic concepts in graph theory, like simple graph, bipartite, tree. [bondy2008graph]
- Basic knowledge about relational databases. [postgresql2021documentation]
- Basic knowledge about data abstraction. [section 1.2 in sedgewick2014algorithms]
- Basic knowledge about version control. [section 1.1 in chacon2014pro]
For those behind, the links mentioned above are good starting points. The last page should be:
- How to store changes of a simple graph in an incremental manner.
- How the snapshot concept contributes to storage, version control, query, etc of graphs.
Note that all the graphs discussed here are simple graphs without any node or edge attribute. Furthermore, the node is not the primary concern.
Snapshot
At Utiligize, we stored the topology of power grids in a relational database. I found some queries were very popular:
- Query the whole graph.
- Query the whole graph and calculate a subgraph.
- Query the whole graph and modify it.
- Modify the graph.
Most representations assume that there is no further update. For example, in
pandapower
, values can only be found via indices and updated accordingly. A
data structure is discussed here, so the modification is a first class
passenger as well. Besides, to represent the temporal evolution of some graph
as a series of snapshots [section 4.1.2 in masuda2021guide] is
one of the many applications of the snapshot concept. There are at least two
other applications:
- A snapshot can store a subgraph from some query.
- A set of snapshots can represents some neighbours of the graph in terms of topology.
That is, the snapshot concept can not only be used in version control, but also served as the core in storing, modification, and query. The program should revolve around a set of associated snapshots.
Increment
To store snapshots as individual graphs requires lots of memory space. For example, to treat snapshots as different layers and connect related layers with bipartites. [section 5.2 in bianconi2018multilayer]. Instead, given a graph and its differences between another unknown graph, the unknown can be computed accordingly, so the space required can be largely reduced, especially when such two graphs are similar. Those differences can be wrapped in one concept, increment. A way to store and utilise increments for snapshots of graphs is discussed here.
Event
As discussed before, the graph can always be seen as a set of two-entry tuples (edge-list), when no isolated node is present. Then, any modification to a graph can be seen as some state change(s) of some edge(s), and it can also be represented by a two-entry tuple, indicating which edge is modified. In particular, the only two fundamental modification is to add an edge or to delete an edge. Such modification can be seen as an event. Thus, a graph, a snapshot or an increment can be seen as a set of events.
The concept of event can be interpreted as follows. It is assumed that there
are two possible states, on
and off
, for any edge. The default state is
off
. An event associated with snapshot s
in terms of edge (u, v)
can be
represented by a three-entry tuple, (u, v, s)
. Note that the definition here
is different from that in masuda2021guide.
Link
Which snapshot the increment is based on must be specified, though the
relationship can be modified later. This relationship will be called link
here. For example, if there are three graphs represented by a
, b
and c
,
a
can be derived from its increment linked to b
or its increment linked to
c
. The derivation must be based on the linked graph, of course, as discussed
before.
Multiple links are allowed, because the size of some increment might be reduced
further. To follow the previous example, a
can be linked to b
and c
, and
the size of the corresponding increment might be reduced further.
Symmetric Difference
The only mathematical operation required for calculating increments and recovering snapshots is symmetric difference. From wikipedia2021symmetric:
In mathematics, the symmetric difference of two sets, also known as the disjunctive union, is the set of elements which are in either of the sets, but not in their intersection.
For example:
{a, b} △ {b, c} = {a, c}
{a, b} △ {b, c} △ {c, d} = {a, d}
The second example indicates that the operation can be generalised to successive symmetric differences of a series of sets. The sequence of such sets does not matter. This generalised version can be applied when such sets are found via a concept brought up in the section.
Meta-Graph
Several snapshots and corresponding links compose a directed graph when snapshots and links are considered as nodes and edges respectively. That graph will be called meta-graph. The directions of links do not matter, as long as they are consistent. For example, to direct out of the snapshot. Then, according to the definition above, meta-graph is a directed acyclic graph (a directed graph without directed cycle).
The definition of directed cycle follows that in sedgewick2020algorithms:
A directed path in a digraph is a sequence of vertices in which there is a (directed) edge pointing from each vertex in the sequence to its successor in the sequence, with no repeated edges. A directed cycle is a directed path (with at least one edge) whose first and last vertices are the same.
Such concept is similar to that in version control [wikipedia2021version] when commits and merges are considered as nodes.
Recover Snapshot
The increments of all the parents of a given snapshot compose those sets for symmetric difference.
Power Flow Timeline
A power flow timeline is an undirected path of the meta-graph and a starting snapshot, which must be one of the two terminals of the path. The power flow calculation starts with the starting snapshot and use the voltage result of the precedent snapshot as the initial guess, which can speed up the calculation to a large extent.
Dedicated statements can be designed to build a timeline in a higher abstraction level.
Automated Debug in PF
The algorithms for power flow are very sensitive to errors in the grid model. The software can provide some procedure modifying the timeline automatically, in order to debug such errors.
Transaction
Being immutable is a main feature of snapshots. A mechanism should be designed to allow modifications before the snapshot becomes immutable. The idea of transaction comes from relational database. The beginning of a transaction is to provide a graph object that the user can work on.
Though this mechanism based on transactions is similar to that in most relational databases, the terminologies do not correspond.
Pending Snapshot
All the events in the increment for the pending snapshot can be previewed. Note that any modification is made to a snapshot, but the snapshot is stored in the form of increment.
It’s possible to have multiple pending snapshots. Then any user or several users can work on multiple pending snapshots at the same time. When it comes to storage, pending snapshots are written in the database as well, but still mutable.
Multiple (committed) snapshots can be specified when a pending snapshot is initiated. However, the initiated snapshot is calculated via successive symmetric differences of associated increments.
While other pending snapshots are invisible, committed snapshots resulted from
other transactions are visible immediately in the current transaction. This
setting is adopted in most relational database systems like PostgreSQL
[postgresql2021transactions] (Note that terminologies are
different, while the idea is shared, as discussed before).
Commit
The link can only be associated with committed snapshots. The link(s) can be modified later, in order to, for example, reduce the size of the increment. Whenever a snapshot is to be deleted, no other snapshot should be based on it.
Replacement
There are many algorithms designed for graphs. For example, a pending snapshot
can be converted to an networkx
object and modified via algorithms in
networkx
. That is, it is more convenient not to write snapshot using
traditional SQL queries. After some modifications, the pending snapshot can be
replaced entirely by the networks
object.
The prototypical workflow of an transaction can be summarised as follows:
- Obtain an
networkx
object representing a pending snapshot by specifying linked snapshots. - Modify the pending snapshot using functions in
networkx
. - Replace the pending snapshot in the database with the modified one.
- Commit the snapshot.
Also, because multiple pending snapshots are allowed. The steps 1-3 can be done simultaneously for different pending snapshots, and one user can work on different pending snapshots simultaneously. Furthermore, as discussed in subsection link, links can be modified later as long as they point to committed snapshots.
Secondary Snapshot
Second snapshots is a concept to store evolutions of attributes of edges and nodes, and its topology remains unchanged. It is recommended that attributes associated with some edge are stored in one object. For node attributes, they can be stored in objects attached to the node. The advantages have been discussed in another post, relational database not for power girds. Detailed discussion about objects when modelling power grids can be found in post, power grid as multilayer network.
The concept of power flow timelines can be generalised for secondary snapshots.
References
- Bianconi, G. (2018). Multilayer networks: structure and function. Oxford university press.
- Bondy, J. A., & Murty, U. S. R. (2008). Graph Theory. Springer.
- Chacon, S., & Straub, B. (2014). Pro Git. Retrieved 10:16, April 2, 2021, from https://git-scm.com/book/en/v2
- Masuda, N., & Lambiotte, R. (2021). A Guide To Temporal Networks. World Scientific.
- PostgreSQL. (2021). Documentation. Retrieved 09:14, April 5, 2021, from https://www.postgresql.org/docs/current/tutorial-transactions.html
- PostgreSQL. (2021). Transactions, Documentation. Retrieved 09:14, April 5, 2021, from https://www.postgresql.org/docs/current/tutorial-transactions.html
- Sedgewick, R., & Wayne, K. (2014). Algorithms. Princeton University. https://algs4.cs.princeton.edu/home/
- Wikipedia contributors. (2021, March 20). Symmetric difference. In Wikipedia, The Free Encyclopedia. Retrieved 15:46, April 2, 2021, from https://en.wikipedia.org/w/index.php?title=Symmetric_difference&oldid=1013286130
- Wikipedia contributors. (2021). Version control. In Wikipedia, The Free Encyclopedia. Retrieved 18:23, March 30, 2021, from https://en.wikipedia.org/w/index.php?title=Version_control&oldid=1014843465


About me:
Hi, my name is Eric Vinícius de Lima.
Graduating in Computer Science at UFPE - Federal University of Pernambuco.
Computer Network Technician by ETE - State Technical School
I love programming, and science.
I have experience as a Freelancer in Python, Flask, Mysql, JavaScript, HTML and CSS.
I try to be better than yesterday every day.


Gorle Ramesh
10th class
9th class
8th class
7th class
6th class
Make Your Own LAB
TLM
Computer Education
Others
Youtube


Documentation
Introduction
Purple React Admin is a responsive React template that is based on the CSS framework Bootstrap 4 and it is built with Sass. Sass compiler makes it easier to code and customize. If you are unfamiliar with Bootstrap or Sass, visit their website and read through the documentation. All of Bootstrap components have been modified to fit the style of Purple React Admin and provide a consistent look throughout the template.
Before you start working with the template, we suggest you go through the pages that are bundled with the theme. Most of the template example pages contain quick tips on how to create or use a component which can be really helpful when you need to create something on the fly.
File Structure
Once you have download the package you will see the following folder structure inside the folder.
Installation
Set up the Development Environment
Install Node.js and npm if they are not already on your machine.
Template Installation
Go to the project directory and install the React local project dependencies.
Run npm install
. This command install the dependencies in the local node_modules
folder.
By default, npm install
will install all modules listed as dependencies in package.json
.
The npm start
command launches the server, watches your files, and rebuilds the app as you make changes to those files.
For more detailed information to install the React application, visit this official React documentation website.
Deployment
Deploy React app
For the simplest deployment, create a production build and copy the output directory to a web server.
1. Start with the production build:
2. Copy everything within the output folder (build/) to a folder on the server.
Basic Structure
App Component
Navbar
Settings Panel
Sidebar
Footer
Customer Support
If you face any issue while building your dashboard with Purple React Admin, please contact us via Bootstrapdash support form .
We will respond to you as quickly as we can. Thank you.


A starting bank is money the store lends you at the beginning of your shift for the purposes of making change.
Your starting bank will be listed in the "Cash drops" section of the "Transactions" screen. To view it, follow the steps outlined in red below:
Notice that the starting bank is a negative number, since this is money you owe back to the store at the end of your shift. If you need to make more cash drops, you can do so from this screen.


This record contains a drawing object provided by the Microsoft Office Drawing tool. For more information on this file format, see the article “Microsoft Office Drawing File Format” on the Microsoft Developer Network Online Web site (http://msdn.microsoft.com/).
Record Data — BIFF8
|
Offset |
Field Name |
Size |
Contents |
|
4 |
rgMSODrawing |
var |
Microsoft Office Drawing data |


Allen Lee is a computer scientist and full stack software
engineer building cyberinfrastructure for computational social science at Arizona State
University since 2006. He led the initial development of the Digital Archaeological Record and currently co-directs
the Network for Computational Modeling in the
Social-Ecological Sciences, part of the NSF West Big Data Hub. He received his MSc from Indiana University -
Bloomington in Computer Science / Informatics and his current research interests include
collective action, complex adaptive systems, open science, and reproducibility insofar as
it aids reuse and the overarching goals of science as a transparent, evidence-based and
self-correcting institution.


detectMultiScaleROI Evaluate specified ROI and return confidence value for each location in multiple scales
[rcts, locations] = hog.detectMultiScaleROI(im, locations)
[...] = hog.detectMultiScaleROI(..., 'OptionName',optionValue, ...)
Input
- im 8-bit 1- or 3-channel image where objects are detected.
- locations input detection region of interest. It specifies
candidate locations to search for object detections at
different scales. An struct array with the following
fields:
- scale scale (size) of the bounding box, scalar.
- locations set of requrested locations to be
evaluated, cell array of points
{[x,y], ...}
.
- confidences vector that will contain confidence
values for each location. Not required on input,
this will be filled/updated on output.
Output
- rcts Detected objects boundaries. Cell array of rectangles
where objects are found, of the form
{[x,y,w,h], ...}
.
- locations output updated
locations
struct array. All
points are retained, but their confidences are updated.
Options
- HitThreshold Threshold for the distance between features
and SVM classifying plane. Usually it is 0 and should be
specfied in the detector coefficients (as the last free
coefficient). But if the free coefficient is omitted
(which is allowed), you can specify it manually here.
default 0
- GroupThreshold Minimum possible number of rectangles in a
group minus 1. The threshold is used on a group of
rectangles to decide whether to retain it or not. If less
than or equal to zero, no grouping is performed. See
cv.groupRectangles. default 0


 These unique bots are different because they work like Human Legs
to move around and do not depend on the wheels. These have six degrees of freedom with two in hips, knees and ankles each.
The joints of Hips and Knees have pitching freedom which in simple words means that bot can go up and down using these
joints. These joints can tilt to provide the robot with the stability in the plane which cuts the body in left-right and
is known as Sagittal Plane. The rolling freedom present in the ankles helps in maintaining the balance of bot in front-
back direction known as Frontal or Coronal Plane. These joints provide the bot with high level of stability, freedom and
efficiency while walking. The capabilities of these bots make them great for travelling to places where neither bot with
wheels can go nor humans.
The bot is in advanced stage of making. CAD modelling, Manufacturing of links and motors has been completed. Designing of
controls system is finished and the team is working on it’s implementation.


Column
Line
Pie
Bar
Area
X Y(Scatter)
Stock
Radar
Sunburst
Treemap
Combo
Choose the chart type and axis for your data series:
Series Name
Chart Type
Secondary Axis
Chart data range:
The data range is too complex to be display. If a new range is selected, it will replace all of the series in the Series panel.
Switch Row/Column
Legend Entries (Series)
Add
Edit
Remove
Horizontal (Category) Axis Labels
Edit
Series name
Series yValues
Series xValues
Series size
Choose where you want the chart to be placed:
New sheet:
Object in:


| Author: | Arvid Norberg<EMAIL_ADDRESS>|
|---|---|
| Version: | 1.2.6 |
ed25519
Table of contents
ed25519_create_seed()
Declared in "libtorrent/kademlia/ed25519.hpp"
std::array<char, 32> ed25519_create_seed ();
See documentation of internal random_bytes
[report issue]ed25519_create_keypair()
Declared in "libtorrent/kademlia/ed25519.hpp"
std::tuple<public_key, secret_key> ed25519_create_keypair ( std::array<char, 32> const& seed);
Creates a new key pair from the given seed.
It's important to clarify that the seed completely determines the key pair. Then it's enough to save the seed and the public key as the key-pair in a buffer of 64 bytes. The standard is (32 bytes seed, 32 bytes public key).
This function does work with a given seed, giving you a pair of (64 bytes private key, 32 bytes public key). It's a trade-off between space and CPU, saving in one format or another.
The smaller format is not weaker by any means, in fact, it is only the seed (32 bytes) that determines the point in the curve.
[report issue]ed25519_sign()
Declared in "libtorrent/kademlia/ed25519.hpp"
signature ed25519_sign (span<char const> msg , public_key const& pk, secret_key const& sk);
Creates a signature of the given message with the given key pair.
[report issue]ed25519_verify()
Declared in "libtorrent/kademlia/ed25519.hpp"
bool ed25519_verify (signature const& sig , span<char const> msg, public_key const& pk);
Verifies the signature on the given message using pk
[report issue]ed25519_add_scalar()
Declared in "libtorrent/kademlia/ed25519.hpp"
public_key ed25519_add_scalar (public_key const& pk , std::array<char, 32> const& scalar); secret_key ed25519_add_scalar (secret_key const& sk , std::array<char, 32> const& scalar);
Adds a scalar to the given key pair where scalar is a 32 byte buffer (possibly generated with ed25519_create_seed), generating a new key pair.
You can calculate the public key sum without knowing the private key and vice versa by passing in null for the key you don't know. This is useful when a third party (an authoritative server for example) needs to enforce randomness on a key pair while only knowing the public key of the other side.
Warning: the last bit of the scalar is ignored - if comparing scalars make sure to clear it with scalar[31] &= 127.
see http://crypto.stackexchange.com/a/6215/4697 see test_ed25519 for a practical example
[report issue]ed25519_key_exchange()
Declared in "libtorrent/kademlia/ed25519.hpp"
std::array<char, 32> ed25519_key_exchange ( public_key const& pk, secret_key const& sk);
Performs a key exchange on the given public key and private key, producing a shared secret. It is recommended to hash the shared secret before using it.
This is useful when two parties want to share a secret but both only knows their respective public keys. see test_ed25519 for a practical example


This directory contains NZD (Noda Zone Data) files built from various versions of TZDB (aka IANA time zone data). When the embedded version in the unstable branch is updated with a new version of the TZDB data, the file is uploaded into this directory as well, so that users don't need to update to a new version of Noda Time to benefit from updated data. See the user guide for details on how to use these files within your project. The NZD files in this directory should be usable for version of Noda Time from 1.1 upwards. (If you need the files in 1.0 format, please contact the mailing list.)
Whenever a file is added, the latest.txt file is also updated. This will always be an ASCII file just containing the URL of the latest version. You may use this to automate fetching the latest version.
index.txt contains a full list of URLs of all
the NZD files in the directory; if you already know the version you're
interested in, you can just fetch tzdb(version).nzd
, e.g. tzdb2013h.nzd.


|
Vector-Synthesizer
1.5
A Vector-Synthesizer like the Prophet VS!
|
Envelope, controlled via ADSR. More...
#include <envelope.h>
Public Types | |
| enum | EnvelopeStage { ENVELOPE_STAGE_OFF = 0, ENVELOPE_STAGE_ATTACK, ENVELOPE_STAGE_DECAY, ENVELOPE_STAGE_SUSTAIN, ENVELOPE_STAGE_RELEASE, kNumEnvelopeStages } |
Public Member Functions | |
| void | enterStage (EnvelopeStage newStage) |
| Move to new stage. | |
| double | getNextSample () |
| Get next sample. More... | |
| void | getNextSample (float *pSample) |
| Get next sample. More... | |
| void | setSampleRate (double newSampleRate) |
| New sample rate... | |
| EnvelopeStage | getCurrentStage () const |
| Get current stage in envelope. | |
| Envelope () | |
| Default envelope. | |
| void | setAttack (double val) |
| Set Attack. | |
| void | setDecay (double val) |
| Set Decay. | |
| void | setSustain (double val) |
| Set Sustain. | |
| void | setRelease (double val) |
| Set Release. | |
Public Attributes | |
| const double | minimumLevel |
| bool | finishedEnvelopeCycle |
Envelope, controlled via ADSR.
Simple low-pass filter.
Taken from http://www.martin-finke.de/blog/articles/audio-plugins-011-envelopes/ with permission for private use only.

Slow method (deprecated)
| void Envelope::getNextSample | ( | float * | pSample | ) |
Get next sample.
| pSample | Pointer to sample |
Calculate new sample.
| const double Envelope::minimumLevel |
min volume


Harry Styles is a man. His name sounds like hairstyles. He has hair. He was once was in a band called No Directions. Just kidding... He was in One Direction. He is British. Which means he is probably on the left spectrum of the political spectrum. Most of Britian is fairly socialist. He is hot.
Harry Styles is a man. His name sounds like hairstyles. He has hair. He was once was in a band called No Directions. Just kidding... He was in One Direction. He is British. Which means he is probably on the left spectrum of the political spectrum. Most of Britian is fairly socialist. He is hot.
Harry Styles is a man. His name sounds like hairstyles. He has hair. He was once was in a band called No Directions. Just kidding... He was in One Direction. He is British. Which means he is probably on the left spectrum of the political spectrum. Most of Britian is fairly socialist. He is hot.


--- layout: post title: General Zod - 2008 Presidential Candidate date: 2006-06-13 00:00:00 category: amusing ---
General Zod - 2008 Presidential Candidate: "Instead of hidden agendas and waffling policies, I offer you direct candor and brutal certainty. I only ask for your tribute, your lives, and your vote."


NOTE: You must have the Lightstreamer Web Client installed and included in this page. When attempting to try this demo, change the three script lines in the head to include the right path, and make sure you change the paths in the first two statements in the script block in the head.


Hai Tran
About
404
Page not found :(
The requested page could not be found.
© Copyright 2017
haiquangtran
Star


Be inspired by WP8
Progress bar
Progress bar
indeterminate
simulate progress
use slider to change progress bar value
Progress bar (indeterminate)


Archimedes Story
"Alright! Enter that last value into the table and we can take a look at our results."
John scribbled the last number down and looked up at Archimedes.
"Well," Archimedes prompted. "What do the results tell you?"
John glanced at the paper. "The mass of the bottle changes a lot when you fill it with different materials. But you were right! The volume stays the same. And the volume matched the volume on the label."
"Exactly! So objects of different material that are the same volume weigh different amounts. I think we can capture this relationship in something called density. Density is mass divided by volume (D = M / V). So basically what we are saying is that all materials have different densities. Therefore gold should have a different density than a lesser material such as silver. The density of gold is 19.32 grams per cubic centimeter.
"Now, I'm desperately in need of a bath, but I think with this knowledge we have enough information to solve the king's problem. Don't you? Will you write up a proposal for an experiment and bring it to me in the bath house just down the street when you are done?"
How will you determine whether the crown is gold or not?
Can we figure out the weight and volume of the crown? How?
Once we have the weight and the volume, can we find out the density? How?
What if the density is less than 19.32 grams per cubic centimeter? What if it's more?


Anne Kiguta sheds tears on live TV while mourning her close friend
by Tony MukereEmotions run high
K24 news anchor Anne Kiguta was on Sunday night overcome by emotions as she mourned her colleague and close personal friend, Daniel Chemjor who passed on in a car accident last Wednesday.
Kiguta recalled how she and Chemjor had come a long way, having started out their careers at around the same time thirteen years ago while working for KTN.
Her message of condolence was briefly interrupted as she choked back tears, but nevertheless proceeded to mourn the late journalist.
“I remember the day we met in the corridors of the Standard Group. His first day there when we both began out television careers.
“I was a bright-eyed presenter and he was a trainee news director and we both rose through to the top of this profession as he became one of the finest news directors in this business. We reconnected here at Mediamax as he was among those who started this show, Punchline. He was actually supposed to direct tonight’s show,” Kiguta stated.
Chemjor’s car crashed shortly after he left the Big 5 Resort near Cheploch on the Iten-Kabarnet road where he had been having drinks with a friend.
The vehicle rolled several times before landing into the deep Chebloch Gorge. His body was retrieved together with his car on Thursday morning.


‘They make everything easy’ – Liverpool star Sadio Mane hails Mohamed Salah and Roberto Firmino
by FSA EditorLiverpool will continue their Premier League title charge at Crystal Palace, and Sadio Mane has saluted Mohamed Salah and Roberto Firmino.
Sadio Mane is enjoying the “easy” life with title hopefuls Liverpool because of the quality possessed by Mohamed Salah and Roberto Firmino.
The Senegal star is Liverpool’s leading Premier League scorer this season with seven goals and he has so far edged out his fellow Reds forwards in overall performance.
Statistics from Opta show Mane has played 21 key passes, compared to 14 from both Salah and Firmino, and his accuracy in finding team-mates across the whole pitch is also superior.
He has also won a greater number of tackles – Mane with 14, Firmino seven and Salah three – and made more interceptions (9-1-1).
But Mane says he is coping with the workload for the title front-runners thanks to considerable effort from Brazilian Firmino and Egyptian Salah.
“I always say it is very easy to work together,” Mane told the official Liverpool FC magazine. “Personally, I just think myself very lucky to play alongside these great players.
“Every single player who plays alongside them would enjoy it because they are very good players and they make everything easy, so I just enjoy playing alongside them.”
Mane believes the global language of football allows for fluency between Jurgen Klopp’s prolific attackers.
“We are all from different countries and speak different first languages but I think football is one language and it is universal so everybody can speak it. It is the same with Mo, Bobby and myself,” he added.
Liverpool face Crystal Palace at Selhurst Park next Saturday in their next Premier League assignment, before taking on Napoli in the Champions League on the following Wednesday.
The club have announced the death of a player who captained Liverpool in the old Second Division in the 1958-59 season.
Johnny Wheeler died at the age of 91, Liverpool said. The midfielder made 177 appearances for the club and also played for Tranmere and Bolton, winning one England cap.


| Developer Spotlight |
Mike Duigou has been using his Project JXTA handle 'Bondolo' since he first joined the net community in 1984. He has a background in operating systems, particularly filesystems and storage drivers. In 1989, Mike quit his university studies to found an e-commerce software start-up with two friends long before it was fashionable. Mike joined Sun Microsystems, Inc. in 1998 and finds himself surprised, but thrilled, to be paid for working on open source software. Mike's first open source contributions were to the Citadel BBS software in 1987 and he has contributed other work regularly on a variety of projects. Mike is most involved with the network transport and messaging layers of Project JXTA and the JXTA Protocol Specification effort. As well he has been involved with the advertisements and documents, the authentication model and the IDs. He is currently working on the JXTA-C implementation project. Mike is a regular on the #jxta IRC channel on irc.freenode.org. You can also reach Mike at<EMAIL_ADDRESS>or on the Project JXTA discuss mailing list. |


Michael Fulton
Resume
Contact
There Was A Problem
Something went wrong, and the page could not be loaded.


Altens Community Center
Book this room
Dos and Don'ts
- DO make sure the room is left clean and tidy as you'd like to find it
- DON'T use our facilities for illegal or immoral purposes
- DO make sure the room is left clean and tidy as you'd like to find it
- DON'T use our facilities for illegal or immoral purposes
- DO make sure the room is left clean and tidy as you'd like to find it
- DON'T use our facilities for illegal or immoral purposes
- DO make sure the room is left clean and tidy as you'd like to find it
- DON'T use our facilities for illegal or immoral purposes


Thanks for visiting!
I am so happy that you are here! My goal for this site is to provide a quick and fun way for you to keep on top of what is happening NOW in our great city of Allentown.
If you have any questions or comments, please email:
webmaster@todayinallentown.com


HTML 4.01 Test Suite - Assertions
Testable Assertions: Section 18 Scripts
18 Scripts - Animated Documents and Smart Forms
Assertion 18.1-1
(may) A client-side script is a program that may accompany an HTML document or be embedded directly in it. The program executes on the client's machine when the document loads, or at some other time such as when a link is activated. HTML's support for scripts is independent of the scripting language.
Tests: None
Assertion 18.1-3
(author)(may) There are two types of scripts authors may attach to an HTML document:
1. Those that are executed one time when the document is loaded by the user agent. Scripts that appear within a SCRIPT element are executed when the document is loaded. For user agents that cannot or will not handle scripts, authors may include alternate content via the NOSCRIPT element.
2. Those that are executed every time a specific event occurs. These scripts may be assigned to a number of elements via the intrinsic event attributes.
Tests: None
Assertion 18.2.1-1
(author)(must) Start tags and End tags for script elements are required.
Tests: None
Assertion 18.2.1-2
(must) SCRIPT: src = uri [CT]
This attribute specifies the location of an external script.
Assertion 18.2.1-3
(must) SCRIPT: type = content-type [CI]
This attribute specifies the scripting language of the element's contents and overrides the default scripting language. The scripting language is specified as a content type (e.g., "text/javascript").
Assertion 18.2.1-4
(author)(must) Authors must supply a value for this attribute (SCRIPT: type = content-type [CI]).. There is no default value for this attribute.
Tests: None
Assertion 18.2.1-5
(must)(deprecated) SCRIPT: language = cdata [CI]
Deprecated. This attribute specifies the scripting language of the contents of this element. Its value is an identifier for the language, but since these identifiers are not standard, this attribute has been deprecated in favor of type.
Tests: None
Assertion 18.2.1-6
(must) SCRIPT: defer [CI]
When set, this boolean attribute provides a hint to the user agent that the script is not going to generate any document content (e.g., no "document.write" in javascript) and thus, the user agent can continue parsing and rendering.
Assertion 18.2.1-7
(must) The SCRIPT element places a script within a document. This element may appear any number of times in the HEAD or BODY of an HTML document.
Tests: None
Assertion 18.2.1-8
(may) The script may be defined within the contents of the SCRIPT element or in an external file.
Tests: None
Assertion 18.2.1-9
(must) If the src attribute is not set, user agents must interpret the contents of the element as the script.
Assertion 18.2.1-10
(must) If the src has a URI value, user agents must ignore the element's contents and retrieve the script via the URI.
Assertion 18.2.1-12
(must) Scripts are evaluated by script engines that must be known to a user agent.
Tests: None
Assertion 18.2.1-13
(should) The syntax of script data depends on the scripting language.
Tests: None
Assertion 18.2.2-1
(author)(must) As HTML does not rely on a specific scripting language, document authors must explicitly tell user agents the language of each script.
Tests: None
Assertion 18.2.2-2
(must) Specifying the scripting language may be done either through a default declaration or a local declaration.
Tests: None
Assertion 18.2.2-3
(author)(should) Authors should specify the default scripting language for all scripts in a document by including the META declaration in the HEAD.
Tests: None
Assertion 18.2.2-4
(should) In the absence of a META declaration, the default can be set by a "Content-Script-Type" HTTP header.
Tests: None
Assertion 18.2.2-5
(should) User agents should determine the default scripting language for a document according to the following steps (highest to lowest priority):
1. If any META declarations specify the "Content-Script-Type", the last one in the character stream determines the default scripting language.
2. Otherwise, if any HTTP headers specify the "Content-Script-Type", the last one in the character stream determines the default scripting language.
Tests: None
Assertion 18.2.2-6
(author)(must) Documents that do not specify default scripting language information and that contain elements that specify an intrinsic event script are incorrect.
Tests: None
Assertion 18.2.2-7
(may) User agents may still attempt to interpret incorrectly specified scripts but are not required to.
Tests: None
Assertion 18.2.2-8
(author)(should) Authoring tools should generate default scripting language information to help authors avoid creating incorrect documents.
Tests: None
Assertion 18.2.2-9
(author)(must) The type attribute must be specified for each SCRIPT element instance in a document.
Tests: None
Assertion 18.2.2-9
(must) The value of the type attribute for a SCRIPT element overrides the default scripting language for that element.
Tests: None
Assertion 18.2.2-11
(should) Scripts should refer to an element according to its assigned name. Scripting engines should observe the precedence rules (described in 18.2.3)when identifying an element: a name attribute takes precedence over an id if both are set. Otherwise, one or the other may be used.
Tests: None
Assertion 18.2.3-2
(must) Intrinsic events: onload = script [CT]
The onload event occurs when the user agent finishes loading a window or all frames within a FRAMESET.
Assertion 18.2.3-3
(must) Intrinsic events: onload = script [CT]
This attribute may be used with BODY and FRAMESET elements.
Tests: None
Assertion 18.2.3-4
(must) Intrinsic events: onunload = script [CT]
The onunload event occurs when the user agent removes a document from a window or frame.
Assertion 18.2.3-5
(must) Intrinsic events: onunload = script [CT]
This attribute may be used with BODY and FRAMESET elements.
Tests: None
Assertion 18.2.3-6
(must) Intrinsic events: onclick = script [CT]
The onclick event occurs when the pointing device button is clicked over an element.
Tests: None
Assertion 18.2.3-7
(must) Intrinsic events: onclick = script [CT]
This attribute may be used with most elements.
Tests: None
Assertion 18.2.3-8
(must) Intrinsic events: ondblclick = script [CT]
The ondblclick event occurs when the pointing device button is double clicked over an element.
Assertion 18.2.3-9
(must) Intrinsic events: ondblclick = script [CT] (This attribute may be used with most elements.
Tests: None
Assertion 18.2.3-10
(must) Intrinsic events: onmousedown = script [CT]
The onmousedown event occurs when the pointing device button is pressed over an element.
Assertion 18.2.3-11
(must) Intrinsic events: onmousedown = script [CT]
This attribute may be used with most elements.
Tests: None
Assertion 18.2.3-12
(must) Intrinsic events: onmouseup = script [CT]
The onmouseup event occurs when the pointing device button is released over an element.
Assertion 18.2.3-13
(must) Intrinsic events: onmouseup = script [CT]
This attribute may be used with most elements.
Tests: None
Assertion 18.2.3-14
(must) Intrinsic events: onmouseover = script [CT]
The onmouseover event occurs when the pointing device is moved onto an element.
Assertion 18.2.3-15
(must) Intrinsic events: onmouseover = script [CT]
This attribute may be used with most elements.
Tests: None
Assertion 18.2.3-16
(must) Intrinsic events: onmousemove = script [CT]
The onmousemove event occurs when the pointing device is moved while it is over an element.
Assertion 18.2.3-17
(must) Intrinsic events: onmousemove = script [CT]This attribute may be used with most elements.
Tests: None
Assertion 18.2.3-18
(must) Intrinsic events: onmouseout = script [CT]
The onmouseout event occurs when the pointing device is moved away from an element.
Assertion 18.2.3-19
(must) Intrinsic events: onmouseout = script [CT]
This attribute may be used with most elements.
Tests: None
Assertion 18.2.3-20
(must) Intrinsic events: onfocus = script [CT]
The onfocus event occurs when an element receives focus either by the pointing device or by tabbing navigation.
Assertion 18.2.3-21
(must) Intrinsic events: onfocus = script [CT]
This attribute may be used with the following elements: A, AREA, LABEL, INPUT, SELECT, TEXTAREA, and BUTTON.
Tests: None
Assertion 18.2.3-22
(must) Intrinsic events: onblur = script [CT]
The onblur event occurs when an element loses focus either by the pointing device or by tabbing navigation.
Assertion 18.2.3-23
(must) Intrinsic events: onblur = script [CT]
This attribute may be used with the same elements as onfocus.
Tests: None
Assertion 18.2.3-24
(must) Intrinsic events: onkeypress = script [CT]
The onkeypress event occurs when a key is pressed and released over an element.
Assertion 18.2.3-25
(must) Intrinsic events: onkeypress = script [CT]
This attribute may be used with most elements.
Tests: None
Assertion 18.2.3-26
(must) Intrinsic events: onkeydown = script [CT]
The onkeydown event occurs when a key is pressed down over an element.
Assertion 18.2.3-27
(must) Intrinsic events: onkeydown = script [CT]
This attribute may be used with most elements.
Tests: None
Assertion 18.2.3-28
(must) Intrinsic events: onkeyup = script [CT]
The onkeyup event occurs when a key is released over an element.
Assertion 18.2.3-29
(must) Intrinsic events: onkeyup = script [CT]
This attribute may be used with most elements.
Tests: None
Assertion 18.2.3-30
(must) Intrinsic events: onsubmit = script [CT]
The onsubmit event occurs when a form is submitted.
Assertion 18.2.3-31
(must) Intrinsic events: onsubmit = script [CT]
It only applies to the FORM element.
Tests: None
Assertion 18.2.3-32
(must) Intrinsic events: onreset = script [CT]
The onreset event occurs when a form is reset.
Assertion 18.2.3-33
(must) Intrinsic events: onreset = script [CT]
It only applies to the FORM element.
Tests: None
Assertion 18.2.3-34
(must) Intrinsic events: onselect = script [CT]
The onselect event occurs when a user selects some text in a text field.
Tests: None
Assertion 18.2.3-35
(must) Intrinsic events: onselect = script [CT]
This attribute may be used with the INPUT and TEXTAREA elements.
Tests: None
Assertion 18.2.3-36
(must) Intrinsic events: onchange = script [CT]
The onchange event occurs when a control loses the input focus and its value has been modified since gaining focus.
Tests: None
Assertion 18.2.3-37
(must) Intrinsic events: onchange = script [CT]
This attribute applies to the following elements: INPUT, SELECT, and TEXTAREA.
Tests: None
Assertion 18.2.3-38
(should) It is possible to associate an action with a certain number of events that occur when a user interacts with a user agent.
Tests: None
Assertion 18.2.3-39
(must) Each of the "intrinsic events" takes a value that is a script.
Tests: None
Assertion 18.2.3-40
(must) The script is executed whenever the event occurs for that element.
Tests: None
Assertion 18.2.3-41
(must) The syntax of script data depends on the scripting language.
Tests: None
Assertion 18.2.3-42
(must) Control elements such as INPUT, SELECT, BUTTON, TEXTAREA, and LABEL all respond to certain intrinsic events.
Tests: None
Assertion 18.2.3-43
(may) When control elements do not appear within a form, they may be used to augment the graphical user interface of the document.
Tests: None
Assertion 18.2.3-44
(must) "document.write" or equivalent statements in intrinsic event handlers create and write to a new document rather than modifying the current one.
Tests: None
Assertion 18.2.4-1
(may) Scripts that are executed when a document is loaded may be able to modify the document's contents dynamically. The ability to do so depends on the scripting language itself (e.g., the "document.write" statement in the HTML object model supported by some vendors).
Tests: None
Assertion 18.2.4-2
(may) The dynamic modification of a document may be modeled as follows:
1. All SCRIPT elements are evaluated in order as the document is loaded.
2. All script constructs within a given SCRIPT element that generate SGML CDATA are evaluated. Their combined generated text is inserted in the document in place of the SCRIPT element.
3. The generated CDATA is re-evaluated.
Tests: None
Assertion 18.2.4-3
(must) HTML documents are constrained to conform to the HTML DTD both before and after processing any SCRIPT elements.
Tests: None
Assertion 18.3.1-1
(author)(must) Start tags and End tags for NOSCRIPT are required.
Tests: None
Assertion 18.3.1-2
(must) The NOSCRIPT element allows authors to provide alternate content when a script is not executed.
Tests: None
Assertion 18.3.1-3
(should) The content of a NOSCRIPT element should only be rendered by a script-aware user agent in the following cases:
1. The user agent is configured not to evaluate scripts.
2. The user agent doesn't support a scripting language invoked by a SCRIPT element earlier in the document.
Tests: None
Assertion 18.3.1-4
(must) User agents that do not support client-side scripts must render NONSCRIPT element's contents.
Tests: None
Assertion 18.3.2-2
(should) Some scripting engines, including those for languages JavaScript, VBScript, and Tcl allow the script statements to be enclosed in an SGML comment. User agents that don't recognize the SCRIPT element will thus ignore the comment while smart scripting engines will understand that the script in comments should be executed.
Tests: None
Assertion 18.3.2-3
(should) One of solution to the problem that user agents don't recognize the script element is to keep scripts in external documents and refer to them with the src attribute.
Tests: None
Assertion 18.3.2-4
(should) The JavaScript engine allows the string "<!--" to occur at the start of a SCRIPT element, and ignores further characters until the end of the line. JavaScript interprets "//" as starting a comment extending to the end of the current line. This is needed to hide the string "-->" from the JavaScript parser.
Tests: None
Assertion 18.3.2-5
(should) In VBScript, a single quote character causes the rest of the current line to be treated as a comment. It can therefore be used to hide the string "-->" from VBScript.
Tests: None
Assertion 18.3.2-6
(should) In Tcl, the "#" character comments out the rest of the line.
Tests: None
Assertion 18.3.2-7
(author)(should) Some browsers close comments on the first ">" character, so to hide script content from such browsers, you can transpose operands for relational and shift operators (e.g., use "y < x" rather than "x > y") or use scripting language-dependent escapes for ">".
Tests: None


Home
Rules
Events
Screenshots
Contact
Server Address
: <IP_ADDRESS>:40060
Events
Upcoming
events.
test


{% extends 'event_layout.html' %} {% block event_content %}
ModFest 1.14 was a Fabric modding event that ran from April 20th, 2019 to April 27th, 2019..
After this ModFest was conducted, one mod was released.