Scott Doyle /<EMAIL_ADDRESS>$\mathbf{x}$ is assigned to $\omega_{i}$ if:
$ g_{i}(\mathbf{x}) > g_{i}(\mathbf{x}) \text{ for all } j\neq i$
Forms of discriminant functions:
\begin{align} g_{i}(\mathbf{x}) &= - R(\alpha_{i}|\mathbf{x})\\ g_{i}(\mathbf{x}) &= P(\omega_{i}|\mathbf{x})\\ g_{i}(\mathbf{x}) &= \ln{p(\mathbf{x}|\omega_{i})} + \ln{P(\omega_{i})}\\ \end{align}
If we assume that $p(\mathbf{x}|\omega_{i})\sim N(\boldsymbol{\mu}_{i},\boldsymbol{\Sigma}_{i})$, then we can plug the multivariate normal (Gaussian) equation into the first term above, and we have:
\begin{align} g_{i}(\mathbf{x}) &= \ln{p(\mathbf{x}|\omega_{i})} + \ln{P(\omega_{i})} \\ &= \ln{ \left[ \frac{1}{ (2\pi)^{\frac{d}{2}} |\boldsymbol{\Sigma}|^{ \frac{1}{2} } } \exp{ \left[ -\frac{1}{2} (\mathbf{x} - \boldsymbol{\mu})^{T} \boldsymbol{\Sigma}^{-1} (\mathbf{x} - \boldsymbol{\mu}) \right] } \right]} + \ln{P(\omega_{i})} \\ &= -\frac{1}{2}(\mathbf{x}-\boldsymbol{\mu}_{i})^{T}\boldsymbol{\Sigma}_{i}^{-1}(\mathbf{x}-\boldsymbol{\mu}_{i}) - \frac{d}{2}\ln{2\pi} - \frac{1}{2}\ln{|\boldsymbol{\Sigma}_{i}}| + \ln{P(\omega_{i})} \\ \end{align}
If the features are all uncorrelated AND have equal variances, then $\boldsymbol{\Sigma}_{i} = \sigma^{2}\mathbf{I}$. That means we can simplify $|\boldsymbol{\Sigma}_{i}|=\sigma^{2d}$ and $\boldsymbol{\Sigma}_{i}^{-1} = (\frac{1}{\sigma^{2}})\mathbf{I}$:
\begin{align} g_{i}(\mathbf{x}) &= -\frac{1}{2}(\mathbf{x}-\boldsymbol{\mu}_{i})^{T} \boldsymbol{\Sigma}_{i}^{-1} (\mathbf{x}-\boldsymbol{\mu}_{i}) &- \frac{d}{2}\ln{2\pi} &- \frac{1}{2}\ln{ |\boldsymbol{\Sigma}_{i}|} &+ \ln{P(\omega_{i})}\\ \\ &= -\frac{ (\mathbf{x}-\boldsymbol{\mu}_{i})^{T} (\mathbf{x} - _{i}) }{ 2 \sigma^{2}} &- \frac{d}{2}\ln{2\pi} &- \frac{1}{2}\ln{\sigma^{2d}}&+ \ln{P(\omega_{i})}\\ \\ &= -\frac{1}{2\sigma^{2}} \left[ \mathbf{x}^{T}\mathbf{x} - 2\boldsymbol{\mu}_{i}^{T}\mathbf{x} + _{i}^{T}\boldsymbol{\mu}_{i} \right] &- \frac{d}{2}\ln{2\pi} &- \frac{1}{2}\ln{\sigma^{2d}} &+ \ln{P(\omega_{i})}\\ \end{align}
We remove terms that don’t depend on the class (everything with an $i$ in it) to get:
\begin{align} g_{i}(\mathbf{x}) &= -\frac{1}{2\sigma^{2}} \left[ \mathbf{x}^{T}\mathbf{x} - 2\boldsymbol{\mu}_{i}^{T}\mathbf{x} + \boldsymbol{\mu}_{i}^{T}\boldsymbol{\mu}_{i} \right] - \frac{d}{2}\ln{2\pi} - \frac{1}{2}\ln{\sigma^{2d}} + \ln{P(\omega_{i})} \\ &= -\frac{1}{2\sigma^{2}} \left[ - 2\boldsymbol{\mu}_{i}^{T}\mathbf{x} + \boldsymbol{\mu}_{i}^{T}\boldsymbol{\mu}_{i} \right] + \ln{P(\omega_{i})} \\ &= \frac{1}{\sigma^{2}}\boldsymbol{\mu_{i}}^{T} \mathbf{x} - \frac{1}{2\sigma^{2}}\boldsymbol{\mu}_{i}^{T}\boldsymbol{\mu}_{i} + \ln{P(\omega_{i})} \\ &= \mathbf{w}_{i}^{T} \mathbf{x} + w_{i0} \\ \end{align}
In general, a linear discriminant function is one for which:
$ g(\mathbf{x}) = \mathbf{w}^{T}\mathbf{x} + w_{0} $
In this expression, $\mathbf{w}$ is the weight vector and $w_{0}$ is the bias.
(In this case, “bias” is not an error, it is just a systemic adjustment.)
Let’s focus on the two-category case for now.
$ g(\mathbf{x}) = \mathbf{w}^{T}\mathbf{x} + w_{0} $
Recall the two-class decision rule regarding discriminants:
In other words, if the inner product $\mathbf{w}^{T}\mathbf{x} > -w_{0}$, decide $\omega_{1}$.
The decision surface is given by $g(\mathbf{x}) = 0$. If $\mathbf{x}_{1}$ and $\mathbf{x}_{2}$ are both on this surface, then:
$ \mathbf{w}^{T}\mathbf{x}_{1} + w_{0} = \mathbf{w}^{T}\mathbf{x}_{2} + w_{0} $
$ \mathbf{w}^{T}(\mathbf{x}_{1} - \mathbf{x}_{2}) = 0 $
What does this look like graphically? Let’s look at a 3D example…
Thus, $\mathbf{w}$ is normal to any vector lying in $H$, which splits the decision space into two regions, $\mathcal{R}_{1}$ (which is on the “positive” side of $H$) and $\mathcal{R}_{2}$ (on the “negative side”).
We can calculate a distance from any vector $\mathbf{x}$ to the hyperplane:
$ \mathbf{x} = \mathbf{x}_{p} + r \frac{\mathbf{w}}{||\mathbf{w}||},$
where $\mathbf{x}_{p}$ is the normal projection of $\mathbf{x}$ onto $H$, and $r$ is the straight-line distance between $\mathbf{x}$ and $H$.
Since $\mathbf{x}_{p}$ lies on the hyperplane (since it’s been projected onto it), then $g(\mathbf{x}_{p}) = 0$ and:
$ g(\mathbf{x}) = \mathbf{w}^{T}\mathbf{x} + w_{0} = r||\mathbf{w}||$
Therefore, $r = \frac{g(\mathbf{x})}{||\mathbf{w}||}$ and the sign of $r$ is determined by the sign of $g(\mathbf{x})$.
This means that $r$ can be negative if $\mathbf{x}$ belongs to $\omega_{2}$ and $g(\mathbf{x}) < 0$. Thus it is a signed distance.
If $\mathbf{x} = (0, \ldots, 0)^{T}$ (ie. we’re at the origin), then:
$ g(\mathbf{x}) = \mathbf{w}^{T}\mathbf{x} + w_{0} = w_{0} $
In this case, the value of $g(\mathbf{x})$ is the intercept. In that case:
$ r = \frac{g(\mathbf{x})}{||\mathbf{w}||} = \frac{w_{0}}{||\mathbf{w}||} $
If $w_{0} > 0$, then $r > 0$ and the origin is on the positive side of $H$, i.e. in $\mathcal{R}_{1}$.
If $w_{0} = 0$, then $g(\mathbf{x}) = \mathbf{w}^{T}\mathbf{x} + w_{0} = \mathbf{w}^{T}\mathbf{x}$, and $H$ passes through the origin.
Here are the takeaway points for the two-class case:
That’s all well and good, but what about extensions to the multicategory space?
For that, we have to go back to an earlier lecture on discriminant functions.
Another benefit of linear discriminants is that they extend seamlessly to multi-class situations.
To begin with, let’s say we have a formula that divides our feature space into two regions, as we saw in the two-class case.
How could we use this to carve up our feature space into multiple class regions?
Let’s start with one-versus-all classification: create $c$ discriminant functions, each with its own hyperplane that divides the space such that $g_{i}(\mathbf{x})$ delineates $\omega_{i}$ from all other classes.
That doesn’t work…

This will give us a total of $c(c-1)/2$ hyperplanes, which divide the space into a series of binary regions, where each plane separates a pair of classes.
Still no good… What are we doing wrong?
The problem here is that we are using the wrong tool for the job: we cannot unambiguously divide the space into pairs of 2 regions. That strategy works fine in the binary case (where there are only 2 regions to worry about), but fails to generate unique solutions in the multiclass case.
This is where linear discriminants – also called linear machines – are able to pick up the slack.
$ g_{i}(\mathbf{x}) = \mathbf{w}_{i}^{T}\mathbf{x} + w_{i0} $
This divides the feature space up into $c$ decision regions, where $g_{i}(\mathbf{x})$ is the largest discriminant if $\mathbf{x}$ is in the region $\mathcal{R}_{i}$. We also now have a series of weight vectors $\mathbf{w}_{i}$, one for each class.
If $g_{i}(\mathbf{x}) = g_{j}(\mathbf{x})$, then it means the vector $\mathbf{x}$ lies on a portion of hyperplane $H_{ij}$ which separates $\mathcal{R}_{i}$ and $\mathcal{R}_{j}$.
The benefit of this is that we are not necessarily creating planes that cut across the entire feature space.
The hyperplane between classes $i$ and $j$ is defined as $g_{i}(\mathbf{x}) = g_{j}(\mathbf{x})$, which can be rewritten as:
\begin{align} \mathbf{w}_{i}^{T}\mathbf{x}+w_{i0} &= \mathbf{w}_{j}^{T}\mathbf{x}+w_{j0} \\ (\mathbf{w}_{i} - \mathbf{w}_{j})^{T}\mathbf{x} + (w_{i0} - w_{j0}) &= 0 \\ \end{align}
Just as before in the two-class case, we can see that $\mathbf{w}_{i} - \mathbf{w}_{j}$ is normal to the hyperplane $H_{ij}$ and the signed distance from $\mathbf{x}$ to $H_{ij}$ is $(g_{i}(\mathbf{x}) - g_{j}(\mathbf{x}))/||\mathbf{w}_{i} - \mathbf{w}_{j}||$.
Key point: Hyperplanes are not binary, since instead of positive or negative value, we have one of several possible values being the maximum.
How does THIS look?
The decision regions are convex: If two points are in the same region, i.e. $\mathbf{x}_{1}\in\mathcal{R}_{i}$ and $\mathbf{x}_{2}\in\mathcal{R}_{i}$, then:
$ \lambda\mathbf{x}_{1}+(1-\lambda)\mathbf{x}_{2} \in \mathcal{R}_{i} \text{ for } 0 \geq \lambda \geq 1.$
In other words, all points between $\mathbf{x}_{1}$ and $\mathbf{x}_{2}$ are also in $\mathcal{R}_{i}$. This limits the complexity of the classifier, which is always a good thing.
Linear machines are most suitable for problems with unimodal distributions $p(\mathbf{x}|\omega_{i})$.
We also like problems where a straight line divides region $\mathcal{R}_{i}$ from region $\mathcal{R}_{j}$, and that we see each region appear in one “blob” in the feature space.
But this isn’t always true! We’ve already seen discontinuous regions appear in previous problems. So how can we model those?
So far, we’ve been discussing linear discriminants.
This means that we assume that there’s a straight line dividing $\mathcal{R}_{1}$ from $\mathcal{R}_{2}$ and so on.
But is this always the case?
We can write $g(\mathbf{x})$ as the sum of the $d$ components of the vector:
$ g(\mathbf{x}) = w_{0} + \mathbf{w}^{T}\mathbf{x} = w_{0} + \sum_{i=1}^{d} w_{i}x_{i} $
In a non-continuous case, we may want to model nonlinear interactions between dimensions. To do this, we add a term that combines products of pairs of components:
$ g(\mathbf{x}) = w_{0} + \sum_{i=1}^{d}w_{i}x_{i} + \sum_{i=1}^{d}\sum_{j=1}^{d}w_{ij}x_{i}x_{j} $
$ g(\mathbf{x}) = w_{0} + \sum_{i=1}^{d}w_{i}x_{i} + \sum_{i=1}^{d}\sum_{j=1}^{d}w_{ij}x_{i}x_{j} $
Now the weight vector $\mathbf{w}$ is a weight matrix, $\mathbf{W}$, which is also symmetric: since $x_{i}x_{j} = x_{j}x_{i}$, we can assume that $w_{ij} = w_{ji}$.
We are no longer restricted to hyperplanes!
The above equation is a second-order equation, resulting in a hyperquadratic.
What about higher-order terms, like $\sum_{i=1}^{d} \sum_{j=1}^{d}\sum_{k=1}^{d} w_{ijk} x_{i} x_{j} x_{k}$?
These are essentially series expansions of an arbitrary $g(\mathbf{x})$, so we can just say:
\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 vector and the functions $y_{i}$ are arbitrary functions of $\mathbf{x}$.
Essentially we are projecting $\mathbf{x}$ into a higher-dimensional space, from $d$ to $\widehat{d}$.
But… Why are we doing this?
In some cases, you may want to have a nonlinear or non-contiguous decision space – for example, you may have a situation where $\mathcal{R}_{2}$ should be “inside” a larger region $\mathcal{R}_{1}$.
However, these are supposed to be “linear” machines, because the math behind them requires that the hyperplanes be linear (can be approximated with a straight line).
So we cheat! We can choose both $\widehat{d}$ and the functions $y_{i}(\mathbf{x})$ to approximate any discriminant function, so we can pick one which is nonlinear in $\mathbf{x}$ but is linear in $\mathbf{y}$.
Now seems like a good time for an example.
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.
The plane $\widehat{H}$ corresponds to:
$ g(\mathbf{x}) = \mathbf{a}^{T}\mathbf{y} = 0 $
dividing $\mathbf{y}$-space into $\widehat{\mathcal{R}}_{1}$ and $\widehat{\mathcal{R}}_{2}$.
This in turn divides the corresponding $\mathbf{x}$-space into arbitrary regions $\mathcal{R}_{1}$ and $\mathcal{R}_{2}$.
In this figure, $\widehat{H}$ corresponds to $\mathbf{a} = (-1, 1, 2)^{T}$, and so the resulting discriminant function resolves to:
$ g(x) = -1 + x + 2x^{2} $
So $g(x)>0$ if $x < -1$ OR if $x > 0.5$.
Obviously we can create very complex decision regions in low-dimensional space using these high-dimensional transforms!
Here we have another case where:
$\mathbf{y} = (x_{1}, x_{2}, \alpha x_{1}x_{2})^{T}$
The mapping is again from a 2D to a 3D space, but now the extra dimension is proportional to $x_{1}x_{2}$.
This represents a hypersurface instead of a curve in 3D.
Note that the discriminant (and the hyperplane $\widehat{H}$) is nonlinear in $\mathbf{x}$-space but still linear in $\mathbf{y}$-space.
So when we go from $\mathbf{x}$-space to $\mathbf{y}$-space, we are projecting up in dimensionality, from $d$ to $\widehat{d}$. This is often easier said than done.
For example, a complete discriminant function requires $\widehat{d} = (d + 1) (d + 2) / 2$ terms. So if $d=50$, then $\widehat{d} = 1,326$!
Each of those dimensions has an associated component in the weight vector $\mathbf{a}$ which must be determined from training.
Generally speaking, we need to have at least as many samples (and typically many more!) as we have dimensions.
This leads to a large burden on the training set, and a huge computational cost.
The mapping trick has a few advantages even if we aren’t trying to build a nonlinear discriminant in $\mathbf{x}$-space.
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}$
So our new discriminant is in the form $g(\mathbf{x}) = \mathbf{a}^{T}\mathbf{y}$, as it was before.
The $d$-dimensional $\mathbf{x}$-space is now projected into $d+1$ dimensional $\mathbf{y}$-space.
This preserves the distance relationships of samples in $d+1$ space.
The $\mathbf{y}$ vectors exist in $d$-dimensional subspace (the $\mathbf{x}$-space).
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}$.
This is actually useful! We’ll see this later in neural networks as well.
Let’s recap: We have our linear discriminant function, $g(\mathbf{x}) = \mathbf{a}^{T}\mathbf{y}$. We also have a set of $n$ training samples, $\mathbf{y}, \ldots, \mathbf{y}_{n}$ labeled either as $\omega_{1}$ or $\omega_{2}$.
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}) $
Our task, then, is to learn the weight vector $\mathbf{a}$ that maximizes our classifier’s performance.
Just like any vector, the weight vector $\mathbf{a}$ specifies a point in weight space.
Let’s assume we know that we can classify these samples perfectly (we have good, robust features with very little error). In this case, the samples are said to be linearly separable.
For a given 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 location of the optimal solution vector is “constrained” by each training sample.
The solution vector lies within the intersection of these half-planes.
It is useful to consider that if we knew which samples belong to $\omega_{1}$ or $\omega_{2}$ (i.e. during training), then the actual sign of $\mathbf{a}^{T}\mathbf{y}_{i}$ doesn’t matter.
We just find a vector $\mathbf{a}$ such that $\mathbf{a}^{T}\mathbf{y}_{i}>0$ for all samples, and flip the signs of those that belong to $\omega_{2}$.
We call this flip in sign “normalization” (not to be confused with “regularization”).
Thus we’re 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”?
We can specify that we want our chosen solution vector to be the one that maximizes the minimum distance from 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$.
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}||}$.
This is all well and good, but we still haven’t said how we should go about actually finding $\mathbf{a}$! We’ve just defined the criteria we’ll use to say what a “good” candidate for $\mathbf{a}$ looks like.
To actually get a vector, and to have a method that’s generalizable, we can’t find a closed-form solution. We have to use numerical optimization techniques.
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.
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:
A simple approach is to use gradient descent: start with a random weight vector, $\mathbf{a}_{1}$, and find a better one iteratively using:
$ \mathbf{a}_{k+1} = \mathbf{a}_{k}-\eta_{k}\Delta J(\mathbf{a}_{k}) $
where $\eta_{k}$ is the learning rate, i.e. how far you “jump down” the gradient at iteration $k$, and $\Delta J(\mathbf{a}_{k})$ is the change in the cost.
Hopefully (!) this will converge to an optimal $J(\mathbf{a})$.
Once you dig into the details, there are a number of questions:
We need to specify the learning rate $\eta$ such that it is reasonably fast (i.e. not too small) but also will not overshoot (i.e. not too big).
I’ll spare you the math, but using a second-order expansion around $\mathbf{a}_{k}$ and some second partial derivatives, we can get:
$ \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$.
If the criterion function is quadratic everywhere, then $\eta_{k}$ is the same for all $k$.
Link: http://www.bcl.hamilton.ie/~barak/papers/nips92-lecun-nofigs.pdf
Linear discriminants divide space up into straight lines (hence the name), but in real life sometimes data doesn’t exactly follow straight lines.
Having multiple regions or classes means we need more descriptive methods to model the feature space divisions.
By projecting data from $d$ to $\widehat{d}$ dimensions, we can build linear discriminants in $\widehat{d}$ which are nonlinear in $d$.
This trick is used a few different ways, in both Support Vector Machines and Neural Networks.
Where do we put our discriminating hyperplane? We use numerical optimization:
Linear discriminants provide a preview of a lot of different concepts:
We will see these concepts again and again, particularly when we discuss clustering and Support Vector Machines.
You can analyze your data using these concepts without performing classification!
This is obviously a big topic, so we’ll have one more lecture on this.
We will cover:
We will discuss ways to decide on the “optimal” hyperplane, which may not perfectly separate out the samples from each class.
We will also start to talk about Support Vector Machines.


★ Overview ★ General Strategies ★ Specific Tactics ★ Tools Against Bullying
Same Team! SAME TEAM!
 Be warned - some battles aren’t worth fighting. Your energy and talents may be better suited elsewhere. Of course, that’s not to say you shouldn’t stand up for yourself.
For those of you who have read the previous articles in this series and still doubt me, then how is it possible that I know what I do, with no formal business or managerial training? And how am I able to describe these situations and scenarios so accurately? You can only learn these things by being taught or going through them yourself.
Little Miss Sunshine
People aren’t naturally like this. There’s this really interesting scene at the end of Little Miss Sunshine about learning hard lessons in life and one of the characters references Marcel Proust’s writing. Basically, the paradox discussed in Little Miss Sunshine is that being blissfully happy precludes personal development, so you either have to choose to love the struggle or be happy and content with where you are. * But you can’t have both. *
Or so Proust critics say anyways. I have my doubts about these conclusions. Why should we not be happy while we seek personal development? Why is life such that pain is the best teacher? Is this true? I hope not, since the scars often hurt more than the pain itself.
Coincidentally, I happen to be writing a Marcel Proust size work with this series of articles.
It’s really only through experiencing this pain that I’ve learned about this stuff. While it hurts, it has made me stronger. I truly hope everyone reading this understands why you don’t put people through these situations. And I’m assuming that many of the people taking part in this either don’t understand what they are doing, what it’s like to be there, or how it affects someone, ultimately.
“Forgive them, for they know not what they do.”
What Makes It Hard to Fight Back?
To your manager, it’s going to seem like you’re whining, unless you have a solid case with well documented examples of clearly negative behavior.
Even then, your manager is going to prefer that you resolve issues with teammates on your own, without requiring intervention. A manager doesn’t want to get between two teammates to resolve personal relationship problems, unless it is clearly necessary. And because of the nature of passive agressive behavior, it’s hard to demonstrate this clearly. Ultimately, they will do it because a manager wants to stand up for their employees and wants to provide the best work environment they can.
Ultimately, I don’t want to feel like I am at odds with the people I work with.
Tools to Fight Back
Here it is, the most important part of this series.
★ Needz Moar Light!
When everyone knows what’s up, manipulations fall apart. These people operate in darkness.  So, usually, the more details you bring to light, the less capable a bully or sociopath is able to manipulate.
Obviously, this doesn’t work for everything, as there are many situations that people would like to keep private and for good reason. However, these bullies are going to use that as an excuse. They’re going to prefer to hide their plans, hide their intentions and cover their tracks. They are going to be duplicitous and various people will develop different ideas of what is truly going on. You need to minimize this.
How do you do this? Effective communication. CC the relevant people on appropraite email threads. Make sure credit for tasks is publicly given to the right people. Reward people in front of others, so everyone knows how people have contributed to the teams efforts.
There’s no need to be sneaky about it. Avoid making criticizing this person behind their back, but don’t be afraid to reach out to someone you trust. No one likes someone who talks behind someone’s back and you’ll basically be doing the same thing as them. Remember, it’s not fair to deplore someone without giving them a chance to correct their behavior. Effective communication doesn’t mean tattling to your manager everytime this person does something. You just need to be more aware and make sure everyone’s on the same page.
★ Bring the Situation to Your Manager and Team’s Attention
Tread carefully when doing this: it may not yet be appropriate. The fact that it’s harder to bring in our manager is one ongoing problem that you may face: your manager is really counting on you to work with the team and for you to mostly take care of any relationship issues that arise. You really need a strong case to bring something to the manager’s attention. And if it is your manager, you’re probably !@#$’ed. GLHF.
★ How Should We Use the Socratic Method?
The Socratic Method is perhaps your most valuable tool, besides conversation. Be careful, the Socratic Method isn’t appropriate everywhere – the military is a good example of a place where questioning everything is a bad thing.
What is the Socratic Method? It’s a method of rhetoric where you ask questions that elucidate your opponents beliefs and likely next actions. You can use this to pigeon hole them, if you can just see a few steps ahead. If you can ask questions that introduce the conditions you need to win a debate or force your opponent to take a certain argument, then you win.
It was popularized by Socrates in Plato’s Republic and you see this especially in Chapter One, in the debate against Thrasymachus. Thrasymachus asserts that strength is justice, which really kicks off the whole book. Socrate’s uses his annoyingly effective methods of reasoning and rhetoric to make an argument someone thought was worth writing a book about. Socrates is killed several years later. Probably because he just won’t stop asking questions.
By the way, you should read Plato’s Republic if you haven’t. This book should be required reading in middle school. It’s not that important – it’s just the foundation of all Western philosophy. You can either struggle understanding the Western world around you – or you can read the book.
Against workplace bullying, the Socratic Method works best when when used subtly. It will at least allow you to better read this person. You can’t just go directly questioning everything. You need to be indirect about it and ask questions, the answers of which may belie their intentions – in front of everyone or in private.
However, the goal is not necessarily to bust this guy out in front of everyone, unless the situation gets to that point. The goal is actually to learn more about what this person is thinking about doing and by asking the right questions, you can block them from ever making shitty moves in the first place. Or you might lead them into contradicting themselves.
It’s kinda like jeopardy. A philosophical form of rhetorical jeopardy …
I really just wanted to use this image lulz
Questions with Yes/No answers aren’t really useful here, though they can be. Ask questions which require a somewhat detailed response and see how your opponent responds. Does their answer mesh with what you suspect to be true? Did they try to hide their answer or change the subject by wrestling control of the conversation from you?
★ Make a Mental Note of It. Or Actually Make Notes.
Observe Manipulative Behavior Discerningly. Don’t Act Quite Yet.
Remember, it’s important not to get swept up in the moment. You could be mistaken. You also need to demonstrate understanding and compassion yourself. Also, it is in your own incentive not to respond so quickly: doing so could backfire or could prevent the person from exhibiting more of their negative behavior.
Also, this is incredibly important for someone conducting job interviews. You want to see how this person behaves on their own: they’re going to have control on the job, aren’t they? Therefore, provide some direction and see where they go with it. I’ve always noticed that interviewers do this. At least, the better ones do.  Do you want to work for someone who isn’t a good judge of character? Starting to get off topic there, but those are good points to reflect on a bit.
It’s important that when you begin noticing problems with someone, start making notes! You’re going to forget the exact details of these situations very quickly and so will everyone else. The full context of the situation might not make sense without written record of it.
Just don’t leave a passive aggresive note.
If you feel a negative relationship is going to develop at work, these notes are going to be invaluable. Later on, you may find yourself distraught by things going on and having these notes can really keep you grounded. Maybe you’re mistaken and you look back and things really aren’t so bad. Or maybe you need a list of a dozen examples of negative behavior for when you bring it to you manager’s attention.
At one job, the first conversation I had with a person alerted me to the fact that I would have problems with this person. I maybe should have reached out to others at that job about it earlier, because I think he was manipulating them too. But I took notes on the things that happened and I still have them. Within a week or so, I was able to determine that, yes, this person was definitely going to give me problems and that I should interact with him very carefully. It was also this guy’s first week: we were hired on the same day. It was also a particularly competitive job, since it was like the coolest company I ever worked for.
Ugh .. doncha hate that? Same Team?!
★ Share Your Tools For Success
In every industry, there are things that can be done better. Better ways to do the same work. After you work a particular role for a while, you may naturally learn these or you pick them up from the people around you. Don’t horde these shortcuts and tools for yourself. Give back to the people around you. If you take the time out of your day to do so, you’ll find that they’ll remember that.
You don’t want to sound condescending when you do it though. I may be guilty of this, but it’s not my intention. I would hope if there’s a faster way of doing something that someone would show me as well.
★ Use the Mirror Effect to Show Him/Her How Their Actions Affect Others
This one is very effective when you’re dealing with a misunderstanding between coworkers. However, when you’re dealing with someone who staunchly wants to push you around and they’re aware of that, the “mirror effect” doesn’t really work as well.
What is the Mirror Effect? Oddly enough, it’s from the 48 Laws of Power. This one is actually good! It took me forever to get it – and I mean YEARS. I sorta understood, but not really. Can I say category theory one more time?
The Mirror Effect is basically mimicking someone’s behavior & words in way such that you’re basically holding up a mirror to them. For people unaware of how their actions are affecting others, it can serve as a great tool that shows them how they are treating others.
There’s a few problems with the Mirror Effect. First off, someone like me is going to have a hard time examining situations from multiple perspectives, which is required. If someone doesn’t “get it,” it’s completely wasted.
Another problem with the Mirror Effect is that using it requires you to mimick someone’s behavior. Doing so can actually cause more problems or misunderstandings. It has to be used in the right way to be effective. Used in the wrong way and you may provide this person with more fodder to be used against you.
You may want to use the Mirror Effect by interacting with another coworker in front of the person you have the problem with. You can display an equivalent behavior in front of the bully and see how they react and what they think. However, beware – no two situations are ever truely identical. Most don’t even come close. And reading people’s reactions from the Mirror Effect is subject to confirmation bias.
★ Ignore the Haters. Don’t Play Their Game. Shine On, My Friends!
It’s very important to resist the urge to resort to the same petty tricks they’re using. This can create more toxicity in the workplace. Don’t do it. Also, you’ll find that this is part of their game: they draw you out into making mistakes, so they can make a fool of you. Don’t give them the ammunition they need because you’ll find they’ll turn it right back against you.
Make sure that you don’t get drawn into their games and forget to do what the !@#$ you’re paid to do.  I’m getting paid to !@#$’ing work, not play little highschool games with grown men. I’m paid to work and I want to do good things. If I’m working for someone, I want to serve them well. If not, it’ll be time for me to move on to my next job and I won’t have much experience to add to my resume. As someone who doesn’t have a college degree, experience is vital to me!
If that light were missing, what would you see?
Also, be aware, that sometimes business is dirty. It’s a game where the people who aren’t “necessary” often find themselves cut out. Sometimes this is just how the chips fall.   By all means – let them continue with their petty tactics by playing dumb, where appropriate. Brush them off lightly for now. This may give you even more evidence to use against them later.
So then, why were you going to do X, Y, and Z?
Be careful not to let them get away with too much, though. If you let them make too many dirty plays, you may find yourself surrounded.
However, you may not want to call them out on something. Let them continue making this mistake. Let them make one hundred mistakes. Then, later, you can reveal what truly happened. And now you have one hundred reasons. *This isn’t really a good strategy though – in fact it’s terrible *. But, you’ll find that people who mistreat a lot of people in their life have made these immoral mistakes thousands of times. You’re not the only one who’s been burned.
★ Experience is Your Friend. Draw on Others’ Experiences, too.
When starting a new job, it’s important to get a lay of the land. Talk with others to learn more about the politics and the recent history. Otherwise, you may find yourself making inapproprate comments for the challanges the team is facing.
But, of course, there are better reasons to get to know the people around you.
★ Grow Your Relationships
Again, another reason to make lots of friends at a new job. You’re going to need those connections and though you shouldn’t be selfishly motivated to form relationships, you do have several incentives to do so.
No one wants to work in a sweatshop, where everyone’s got their heads down eight straight hours a day. Don’t get me wrong, good employees like to work hard, but they want to have fun doing it. This is why it’s dangerous to become so busy at work that you can’t establish connections with other people.
Someone who is well connected in a business is going to be harder to remove: they’re going to have more people standing up for them. Someone who pays attention to the needs of others and listens is going to be much harder to isolate. Someone like this may be important to have around, even if they are not the best at their job. People like this grease the wheels. They make work fun and add to your culture.
Bonsai Tree by Takanori Aiba
Also, information is vital. Knowledge is power. And staying connected with those around you gives you more visibility and makes things more transparent! IMO, transparency is a virtue in business. However, I’m not exactly working at Lockheed.
Again – Managers: *Visibility, Visibility, *VISIBILITY! ** Do not allow one person to construct your perspective of your office’s environment and culture!
★ Don’t Burn Your Bridges
If you find that this person is manipulating people against you, remember that these people probably don’t realize the full context of what they’re doing. Also, you’re going to need all the connections you have later on in life. You really don’t want to burn bridges. Don’t let a bully burn them either.
★ Have Fun, Make People Laugh
Make sure you’re contributing to a positive work environment. Maybe you’re not exactly a stand up comic, but there’s still plenty you can do to make people laugh. Find out what TV show’s people watch and what video games they play.
The Devil is a Part Timer
Video games are great because it gives people in the office who might not otherwise connect a chance to compete with their team mates in activities outside of work. Games & sports also offer a great way to see how people approach challenges and offers a great way to see how your team interacts. You can structure your activities around getting people to collaborate in new ways or pairing new people up. It will drive dialogue and make your team healthier.
Also, a person causing toxicity to show up in the workplace may also drive negative interactions in other places. So if you can spot team problems in other activities, you might diagnose them earlier.
If you find that someone is being cut off from activities outside of work, this could be considered fraternization, especially if it involves a manager and consistent, small set of subordinates. While usually activities that involve fraternization appear harmless – and may be harmless – they can be especially detrimental if someone is using them in the right way! If it is in fact fraternization, this is very wrong!
If it happens to be that someone is cut off from stuff going on outside of the office, this still kinda sucks. Be the person that reaches out.
★ Talk to the Bully
A lot of these situations are basically misunderstandings, which can be defused fairly simply through communication. Don’t allow a negative situation to grow worse. Find out what’s causing these situations to grow, so you can diffuse them quickly. Otherwise, tensions mount and you got a shitstorm brewin’.
“You got a shitstorm brewin’”
No one should be unhappy at work. Work should be something you love. You should invest your life doing things you love that give back to other people, whether it’s people served through the business or simply your family.
★ Ignore the Bully
Workplace bullies can be exceedingly manipulative, abrasive and toxic. Sometimes it really doesn’t matter what you do, they have made up in their minds that they are going to take anything you give them and turn it to poop. At this point, you may need to separate yourself from them. But be careful: isolation is dangerous and may be exactly what this person wants!
You may want to avoid 1 On 1 Communication with this Person … sometimes. Like I said above, you’re going to want to reach out to this person first – start by saying things 1 on 1, but don’t make accusations. Allow them to become aware of what is going on, so that they can react to it appropriately without feeling like they are being chastised, especially in public, in front of others.
There’s a certain kind of 1 on 1 interaction you want to avoid with this person. You don’t want to feel like this person threatens you in private or uses private communications to manipulate and steal credit for your work. So definitely avoid that, if it’s happening.
★ Defy Labels and Define Yourself
This is something I do in my personal life. I don’t like to be labelled as “liberal” or “conservative” because once you are, you acquire all the rest of the baggage that comes along with those labels. So be wary when someone makes statements in front of others, the implications of which may cause the people around you to attach a label! Be neutral.
“Define Yourself” - Kounterfit Klothing
I don’t mean to down on jamskaters in this series. There are some really great, inspiration skaters out there. There’s a few of them pictured above. They’re incredibly innovative people on the cusp of a sport totally new – something most people don’t get. Most people will never truly experience the edge of innovation on something new and completely wide open, but that’s Jamskating.
Most of the negativity I experienced in jamskating took place in 2005 and ended in 2009. The jamskating culture has been constantly improving in the past few years. So, I’m sorry to have brought it up again.
★ Beware of Retribution
Using some of these tools and diffusing some of the bullies manipulations will piss that person off, especially if everyone suddenly gets it. If a bully is outed in their manipulations, you can bet on it. Sometimes this is necessary – but it’s better to not bring attention to someone’s mistakes publicly! So beware of attracting attention, but don’t allow your fear to enable this person to get away with toying with people.
★ Stand Up for Others
If you’ve been in this position before, then you’ll recognize how bad it makes you feel. So stand up for others if you feel that they’re being unfairly treated. Learn to see situations from multiple perspectives and recognize when someone is being unfairly treated. And do something about it when it happens. People are more likely to stand up for you if you do and you’ll set a good example for others.
I hope some of the skills I’ve developed in response to these behaviors have helped you
Identifying Someone Bullying Others At Work
Also, many of these tactics aren’t inherently bad in and of themselves. It really depends on the intention and the scenario in which they are used. It’s crucial to recognize the motivations behind the behavior. Is this person underperforming and seeking to distract from that by puttting a spotlight on someone else?
If it’s moreso a personality issue and they’re not strategically messing with other people, that’s easier to deal with. Still a big deal if they’re negative and bringing other people down, but I think it’s easier to deal with than someone who is strategically employing passive agressive behavior. At least you know it’s not someone doing this to seek promotion or for job security.
Or it could just be *someone who’s right supramarginal gyrus * is just two sizes too small


McDonald’s shares 'one-handed meal hack,' Instagram responds
by Alexandra DeablerMcDonald’s Australia wants everyone to give its newest eating trick a hand — but only one.
The fast-food chain shared a four-step guide – complete with helpful arrows – on how to eat an entire hamburger meal with one hand, and it has gone viral on social media.
WHITE CASTLE OPENS ANOTHER 'LARGEST IN THE WORLD' RESTAURANT NEAR DISNEY WORLD
The brand’s self-proclaimed “meal hack” involves first procuring a drink, fries and one of the various hamburgers the fast-food chain sells that comes in a box. Then, the customer is asked to precariously balance said box open on top of the drink. The third step involves pouring the full box of fries into the empty side of the open box. And finally, the fourth step asks you to apparently sit back and admire your work.
CLICK HERE TO GET THE FOX NEWS APP
The diagram does not explain where one would place a sauce packet for dipping purposes. It also does not mention that the one-handed meal hack still involves both hands — one to hold the beverage, and one to eat the food.
Rest assured, though, the entire four-step procedure does not involve a hammer, screw or Allen wrench, as McDonald’s illustrates on the side. However, it does only work if you have a sturdy straw — an instrument the chain has been working toward eliminating and replacing with paper straws that many have referred to as “soggy.”
With or without the controversial straw, Instagram does not seem to be lovin’ the “meal on the go” option.
CLICK HERE TO SIGN UP FOR OUR LIFESTYLE NEWSLETTER
“Imagine being this lazy,” one person wrote.
“Putting hot food on top of a cold drink ain’t a good idea lmao,” another wrote.
“My burger just fell on the ground… screw you,” another who claimed to have tried the trick wrote.
“Mine fell. Don’t do it you will have to buy another one,” another Instagram user wrote.
“If [you] lift the burger up…the fries are dropping on the ground,” another alleged tester commented, throwing a really Allen wrench into the chain’s promise that this can be eaten on the go.
“Not much help if you get a cheeseburger wrapped in paper,” one person pointed out.
FOLLOW US ON FACEBOOK FOR MORE FOX LIFESTYLE NEWS
This is not the first time a unique repurposing of McDonald’s signature packaging has gone viral. A while ago, awitter user gained popularity for claiming to discover the famous McDonald’s fry carton’s “purpose.”
In a tweet, the user suggested the carton was meant to be bent back and used as a platform to pour ketchup on. However, the clever hack was hotly debated by those on social media.


The Simpsons
Click on any character name to populate cool gifs from The Simpsons!
Is your favorite character missing?
Select a character from the list
Load more...


Basic information about the {{ event.event_name }} can be found in the information chart. All times and dates displayed here, and on the event's individual result pages, are local to the event.
Event Information
{{ event.event_key }}
{{ event.start_date | date : "mediumDate"}} - {{ event.end_date | date : "mediumDate" }}{{ event.start_date | date : "mediumDate"}}


Skin has the ability to switch between previous, current and upcoming design systems.
DS4 is currently the default design system. To opt into DS6, Lasso.js requires the skin-ds6 conditional dependency flag.
{% highlight JavaScript %} myLasso.lassoPage({ flags: ['skin-ds6'] }); {% endhighlight %}Or, alternatively, using the Marko Taglib.
{% highlight html %}IMPORTANT: There are some differences, in terms of HTML structure and class names, between design system versions; therefore be sure to reference the appropriate documentation. In general we try to minimise these differences, but in some cases it cannot be avoided.


Gecode::Int::Linear::EqBoolInt< VX >::Memory Class Reference
#include <linear.hh>
Inherits Gecode::Int::Linear::MemoryLinBoolInt< VX >.
Detailed Description
template<class VX>
class Gecode::Int::Linear::EqBoolInt< VX >::Memory
Propagator using less memory but with linear runtime.
Definition at line 970 of file linear.hh.
Public Member Functions | |
| Memory (Space *home, bool share, Memory &p) | |
| Constructor for cloning p. | |
| Memory (Space *home, ViewArray< VX > &x, int c) | |
| Constructor for creation. | |
| virtual Actor * | copy (Space *home, bool share) |
| Create copy during cloning. | |
| virtual ExecStatus | propagate (Space *home, ModEventDelta med) |
| Perform propagation. | |
| virtual Reflection::ActorSpec | spec (const Space *home, Reflection::VarMap &m) const |
| Specification for this propagator. | |
Static Public Member Functions | |
| static void | post (Space *home, Reflection::VarMap &vars, const Reflection::ActorSpec &spec) |
| Post propagator according to specification. | |
| static Support::Symbol | ati (void) |
| Mangled propagator name. |
Constructor & Destructor Documentation
template<class VX>
| Gecode::Int::Linear::EqBoolInt< VX >::Memory::Memory | ( | Space * | home, | |
| bool | share, | |||
| Memory & | p | |||
| ) |
Constructor for cloning p.
template<class VX>
| Gecode::Int::Linear::EqBoolInt< VX >::Memory::Memory | ( | Space * | home, | |
| ViewArray< VX > & | x, | |||
| int | c | |||
| ) | [inline] |
Member Function Documentation
template<class VX>
| Actor * Gecode::Int::Linear::EqBoolInt< VX >::Memory::copy | ( | Space * | home, | |
| bool | share | |||
| ) | [inline, virtual] |
template<class VX>
| ExecStatus Gecode::Int::Linear::EqBoolInt< VX >::Memory::propagate | ( | Space * | home, | |
| ModEventDelta | med | |||
| ) | [inline, virtual] |
template<class VX>
| Reflection::ActorSpec Gecode::Int::Linear::EqBoolInt< VX >::Memory::spec | ( | const Space * | home, | |
| Reflection::VarMap & | m | |||
| ) | const [inline, virtual] |
Specification for this propagator.
Reimplemented from Gecode::Actor.
Definition at line 421 of file bool-int.icc.
template<class VX>
| void Gecode::Int::Linear::EqBoolInt< VX >::Memory::post | ( | Space * | home, | |
| Reflection::VarMap & | vars, | |||
| const Reflection::ActorSpec & | spec | |||
| ) | [inline, static] |
template<class VX>
| Support::Symbol Gecode::Int::Linear::EqBoolInt< VX >::Memory::ati | ( | void | ) | [inline, static] |
The documentation for this class was generated from the following files:
- gecode/int/linear.hh (Revision: 7285)
- gecode/int/linear/bool-int.icc (Revision: 6017)


Continue as joaopaulomirandamatias
Remove Account
Not joaopaulomirandamatias?
Switch Accounts
or
Sign Up
Get the app.


Course Organization¶
part of
MSE672: Introduction to Transmission Electron Microscopy
by
Gerd Duscher
Materials Science & Engineering Joint Institute of Advanced Materials The University of Tennessee, Knoxville
Books¶
Zuo and Spence¶
Advanced Transmission Electron Microscopy: Imaging and Diffraction
Springer, NewYork, 2017
available online at the Library
Kirkland¶
Advanced Computing in Electron Microscopy
Springer, NewYork, 2010 (2nd Edition)
available online at the Library
R.F. Egerton¶
Electron Energy{Loss Spectroscopy in the Electron Microscope
Plenum Press, 2011 (3rd Edition)
available online at the Library
Software¶
Syllabus¶
Week |
Lecture |
Chp. |
Lab |
|---|---|---|---|
01/17 - 01/23 |
1:Introduction |
1 |
|
01/24 - 01/30 |
2,3:Geometric Ray Optics |
6 |
|
01/31 - 02/06 |
4,5:Kinematic Diffraction |
2,11 |
Lab1: Basic Imaging |
02/07 - 02/13 |
6,7:Kinematic Diffraction -parallel |
12 |
Lab2: Basic Diffraction |
02/14 - 02/20 |
8,9:Kinematic Diffraction -convergent |
19,20 |
Lab3: SAED |
02/21 - 02/27 |
10,11:Dynamic Diffraction |
14,15 |
Lab4: CBED |
02/28 - 03/06 |
12:Imaging Overview |
22 |
|
03/07 - 03/13 |
13,14:Imaging Conventional |
24-27 |
Lab5: Exam |
03/14 - 03/20 |
15,16:Imaging Phase Contrast |
28,30 |
Lab6: Two Beams |
03/21 - 03/27 |
17,18:Imaging and Lens Aberrations |
31 |
Lab7: Phase Contrast |
03/28 - 04/03 |
19,20:Imaging Z-contrast |
Lab8: CTF |
|
04/04 - 04/10 |
21,22:Spectroscopy EELS |
36-40 |
Lab9: Z-contrast |
04/11 - 04/17 |
23,24:Spectroscopy EDS |
33-35 |
Lab10: EELS, ESI |
04/18 - 04/24 |
25:Other Techniques |
29 |
|
04/25 - 05/01 |
26,27: TEM parts and vacuum |
5-9 |
|
05/02 - 05/08 |
28:Project discussion |
Office Hours¶
Office hours are Thursday from 2 – 4pm \ online with the class zoom link\ I will answer email questions in the same time slots.
Class and Lab¶
Parallel to the class there is a Lab course.
We will analyze the data of the lab course, independent of whether you are participating or not,
For the analysis of the data we will need a labtop in class.
Everyone needs a laptop in class
I need real feedback on what you guys want to do and need to learn.
Homework and Quizzes¶
Homeworks and Quizzes are the main way to determine your grade in this course.
Homeworks have to be submitted electronically and generally are about analyzing on your own data which are similar to those in the practice sessions .
Think of these homeworks as small take-home exams.
Additionally, there will be reading assignments every week.
Each week before the lecture, there will be a short quiz about the content of the reading assignments.
Neither the TA nor the instructor will answer questions about your homework after the deadline.
If you are more than two homeworks behind, you failed the class.
Final¶
The final is a report of how TEM will/can be used in your research. This should include a critical review of data from journal articles which did TEM similar to what you propose.


Mohr's Circle for Finite Strain
In a principal cut of the strain ellipsoid, you can calculate elongation and shear
in a direction which makes an
angle Q with the longer axis of the ellipse (Fig.
1).
Fig.
1
Mohr's circle for this principal cut is shown in Fig. 2.
Abb.
2
l' = 1/l and g' = g/l
l = quadratic
Elongation = S2 = (1+e)2 , S = Stretch
Mohr's circle is
derived from:
and


Tic Tac Toe
The world's quickest, smallest, and possibly ugliest Tic-Tac-Toe!
{{theGame.board[row_num][cell_num]}}


Getting Started with the test C Shared Library
The Library Compiler in MATLAB® Compiler SDK™ creates C shared libraries that can be integrated with applications written in C. You can use this guide to set up your environment and learn about integrating the library into your application.
Location of Installed C Shared Library Files
Prerequisites
Complete this step only if you have not installed the MATLAB Runtime while installing the library.
2. Verify that you have a C compiler installed.
You can use the mbuild command within MATLAB to verify whether you have a C compiler installed. For more information, see mbuild.
Compiling C Driver Applications
At the system terminal, type:
mbuild driverApplication.c test.lib
Executing C Driver Applications
At the system terminal, type:
Additional Resources


Pet Manager Lundy:
Excellent! I'll give you one of my most valuable possessions.
There are very few of these, even among the very rich, and today you become one of the chosen few owners!
Please accept this pet exchange ticket. Your new pet is a very popular breed from the north. Raise it carefully! It is very, very rare!


Cyclic cellular automaton is a kind of automaton rule invented by David Griffeath and studied by several other researchers.
You can find more information and rules in Wikipedia.
The experiment comprises several switchable realizations, including GPU-based computations and Web Workers. Most of them work faster than others in some cases.
This experiment is made using state-control, number-to-color, parallel1d, and gpu.js.


Welcome, {{ user.nickname() }}
sign out
Master Password
{% include "keyboard.html" %}
Secure new password
Encrypt and save!
#
Website
Password
Decrypt
Delete
{% for passwd in passwds %}
{{ loop.index }}
{{ passwd.website|truncate(killwords=True,length=15) }}
{{ passwd.website }}
*******
{{ passwd.password }}
decrypt
delete
{% endfor %}


How to populate the selectField using a YUI datasource (from local data, XHR, JSONP, function, ...):
How to listen to the updated event :
How to set the value :


Where are we?
Where to find us
The Journalism, Information and Communications department is situated in the Geoffrey Manton building which is located off of Oxford Road at the All Saints Campus. To find us simply use following map.
Term Time Opening Times
Monday 7.00am - 8.00pm
Tuesday 7.00am - 9.00pm
Wednesday 7.00am - 9.00pm
Thursday 7.00am - 7.00pm
Friday 7.00am - 6.00pm
Saturday - Sunday Closed
Vacation Time Opening Times
Monday 7.00am - 8.00pm
Tuesday 7.00am - 9.00pm
Wednesday 7.00am - 9.00pm
Parking Facilities
There is limited on-road parking available around the Geoffrey Manton building however there are multi-story car park facilities located nearby. (Charges may apply) Also, there are many public transport routes that pass the Geoffrey Manton building such as bus routes and local train stations. We hope to hear from you soon!


This page documents data types appearing in jQuery function signatures, whether defined by JavaScript itself or further restricted by jQuery. Unless explicitly stated otherwise, jQuery functions require primitive values where applicable, and do not accept their Object-wrapped forms. If you want to study these concepts in depth, take a look at MDN.
You should be able to try out most of the examples below by just copying them to your browser's JavaScript Console.
Whenever an example mentions that a type defaults to a boolean value, the result is good to know when using that type in a boolean context:
var x = "";
if ( x ) {
console.log( "x defaulted to true" );
} else {
console.log( "x defaulted to false" );
}
In this case, "x defaulted to false"
is printed.
To keep the examples short, the invert ("not") operator and double-negation are used to show a boolean context:
var x = "";
!x // true
!!x // false (Double negation: Since "not (empty string)" is true, negating that makes it false)
On to the actual types.
The Anything virtual type is used in jQuery documentation to indicate that any type can be used or should be expected.
A string in JavaScript is an immutable primitive value that contains none, one or many characters.
"I'm a String in JavaScript!"
'So am I!'
The type of a string is "string".
typeof "some string"; // "string"
A string can be defined using single or double quotes. You can nest single quotes inside of double quotes, and the other way around. To mix double quotes with double quotes (or single with single), the nested ones have to be escaped with a backslash.
"You make 'me' sad."
'That\'s "cranking" good fun!'
"Home"
A string in JavaScript has some built-in methods to manipulate the string, though the result is always a new string - or something else, eg. split returns an array.
"hello".charAt( 0 ) // "h"
"hello".toUpperCase() // "HELLO"
"Hello".toLowerCase() // "hello"
"hello".replace( /e|o/g, "x" ) // "hxllx"
"1,2,3".split( "," ) // [ "1", "2", "3" ]
All strings have a length property.
"Hello".length // 5
"".length // 0
An empty string defaults to false:
!"" // true
!!"" // false
!"hello" // false
!"true" // false
!new Boolean( false ) // false
A string is designated htmlString in jQuery documentation when it is used to represent one or more DOM elements, typically to be created and inserted in the document. When passed as an argument of the jQuery()
function, the string is identified as HTML if it starts with <tag ... >
) and is parsed as such until the final >
character. Prior to jQuery 1.9, a string was considered to be HTML if it contained <tag ... >
anywhere within the string.
When a string is passed as an argument to a manipulation method such as .append()
, it is always considered to be HTML since jQuery's other common interpretation of a string (CSS selectors) does not apply in those contexts.
For explicit parsing of a string to HTML, the $.parseHTML()
method is available as of jQuery 1.8.
// Appends hello:
$( "hello" ).appendTo( "body" );
// Appends hello:
$( "hellobye" ).appendTo( "body" );
// Syntax error, unrecognized expression: byehello
$( "byehello" ).appendTo( "body" );
// Appends byehello:
$( $.parseHTML( "byehello" ) ).appendTo( "body" );
// Appends hellowaitbye:
$( "hellowaitbye" ).appendTo( "body" );
Numbers in JavaScript are double-precision 64-bit format IEEE 754 values. They are immutable primitive values, just like strings. All operators common in c-based languages are available to work with numbers (+, -, *, /, %, =, +=, -=, *=, /=, ++, --).
12
3.543
The type of a number is "number".
typeof 12 // "number"
typeof 3.543 // "number"
If a number is zero, it defaults to false:
!0 // true
!!0 // false
!1 // false
!-1 // false
Due to the implementation of numbers as double-precision values, the following result is not an error:
0.1 + 0.2 // 0.30000000000000004
JavaScript provides utilities to work with numbers in the Math object:
Math.PI // 3.141592653589793
Math.cos( Math.PI ) // -1
parseInt and parseFloat help parsing strings into numbers. Both do some implicit conversion if the base isn't specified:
parseInt( "123" ) = 123 // (implicit decimal)
parseInt( "010" ) = 8 // (implicit octal)
parseInt( "0xCAFE" ) = 51966 // (implicit hexadecimal)
parseInt( "010", 10 ) = 10 // (explicit decimal)
parseInt( "11", 2 ) = 3 // (explicit binary)
parseFloat( "10.10" ) = 10.1
When appending numbers to string, the result is always a string. The operator is the same, so be careful: If you want to add numbers and then append them to a string, put parentheses around the numbers:
"" + 1 + 2; // "12"
"" + ( 1 + 2 ); // "3"
"" + 0.0000001; // "1e-7"
parseInt( 0.0000001 ); // 1 (!)
Or you use the String class provided by javascript, which try to parse a value as string:
String( 1 ) + String( 2 ); // "12"
String( 1 + 2 ); // "3"
Parsing something that isn't a number results in NaN. isNaN helps to detect those cases:
parseInt( "hello", 10 ) // NaN
isNaN( parseInt("hello", 10) ) // true
Division by zero results in Infinity:
1 / 0 // Infinity
Both NaN and Infinity are of type "number":
typeof NaN // "number"
typeof Infinity // "number"
Note that NaN compares in a strange way:
NaN === NaN // false (!)
But:
Infinity === Infinity // true
An integer is a plain Number type, but whenever explicitly mentioned, indicates that a non-floating-point number is expected.
A float is a plain Number type, just as Integer, but whenever explicitly mentioned, indicates that a floating-point number is expected.
A boolean in JavaScript can be either true or false:
if ( true ) console.log( "always!" );
if ( false ) console.log( "never!" );
Everything in JavaScript is an object, though some are more objective (haha). The easiest way to create an object is the object literal:
var x = {};
var y = {
name: "Pete",
age: 15
};
The type of an object is "object":
typeof {} // "object"
You can write and read properties of an object using the dot notation:
y.name // "Pete"
y.age // 15
x.name = y.name + " Pan" // "Pete Pan"
x.age = y.age + 1 // 16
Or you write and read properties using the array notation, which allows you to dynamically choose the property:
var operations = {
increase: "++",
decrease: "--"
};
var operation = "increase";
operations[ operation ] // "++"
operations[ "multiply" ] = "*"; // "*"
Iterating over objects is easy with the for-in-loop:
var obj = {
name: "Pete",
age: 15
};
for( key in obj ) {
alert( "key is " + [ key ] + ", value is " + obj[ key ] );
}
Note that for-in-loop can be spoiled by extending Object.prototype
(see Object.prototype is verboten) so take care when using other libraries.
jQuery provides a generic each function to iterate over properties of objects, as well as elements of arrays:
jQuery.each( obj, function( key, value ) {
console.log( "key", key, "value", value );
});
The drawback is that the callback is called in the context of each value and you therefore lose the context of your own object if applicable. More on this below at Functions.
An object, no matter if it has properties or not, never defaults to false:
!{} // false
!!{} // true
All objects have a prototype property. Whenever the interpreter looks for a property, it also checks in the object's prototype if the property is not found on the object itself. jQuery uses the prototype extensively to add methods to jQuery instances. Internally, jQuery makes jQuery.fn
an alias of jQuery.prototype
so you can use either one (though plugin developers have standardized on fn
).
var form = $("#myform");
console.log( form.clearForm ); // undefined
// jQuery.fn === jQuery.prototype
jQuery.fn.clearForm = function() {
return this.find( ":input" ).each(function() {
this.value = "";
}).end();
};
// works for all instances of jQuery objects, because
// the new method was added to the prototype
console.log( form.clearForm ); // function
form.clearForm();
Arrays in JavaScript are mutable lists with a few built-in methods. You can define arrays using the array literal:
var x = [];
var y = [ 1, 2, 3 ];
The type of an array is "object":
typeof []; // "object"
typeof [ 1, 2, 3 ]; // "object"
Reading and writing elements to an array uses the array-notation:
x[ 0 ] = 1;
y[ 2 ] // 3
An array has a length property that is useful for iteration:
for ( var i = 0; i < a.length; i++ ) {
// Do something with a[i]
}
When performance is critical, reading the length property only once can help to speed things up. This should be used only when a performance bottleneck was discovered:
for ( var i = 0, j = a.length; i < j; i++ ) {
// Do something with a[i]
}
Another variation defines a variable that is filled for each iteration, removing the array-notation from the loop-body. It does not work when the array contains 0 or empty strings!
for ( var i = 0, item; item = a[i]; i++ ) {
// Do something with item
}
jQuery provides a generic each function to iterate over element of arrays, as well as properties of objects:
var x = [ 1, 2, 3 ];
jQuery.each( x, function( index, value ) {
console.log( "index", index, "value", value );
});
The drawback is that the callback is called in the context of each value and you therefore lose the context of your own object if applicable. More on this below at Functions.
The length property can also be used to add elements to the end of an array. That is equivalent to using the push-method:
var x = [];
x.push( 1 );
x[ x.length ] = 2;
x // [ 1, 2 ]
You'll see both variations a lot when looking through JavaScript library code.
Other built-in methods are reverse, join, shift, unshift, pop, slice, splice and sort:
var x = [ 0, 3, 1, 2 ];
x.reverse() // [ 2, 1, 3, 0 ]
x.join(" – ") // "2 - 1 - 3 - 0"
x.pop() // [ 2, 1, 3 ]
x.unshift( -1 ) // [ -1, 2, 1, 3 ]
x.shift() // [ 2, 1, 3 ]
x.sort() // [ 1, 2, 3 ]
x.splice( 1, 2 ) // [ 2, 3 ]
Note: .unshift() method does not return a length property in Internet Explorer.
An array, no matter if it has elements or not, never defaults to false:
![] // false
!![] // true
In the jQuery API you'll often find the notation of Array<Type>:
dragPrevention Array<String>
This indicates that the method doesn't only expect an array as the argument, but also specifies the expected type. The notation is borrowed from Java 5's generics notation (or C++ templates).
Either a true JavaScript Array or a JavaScript Object that contains a nonnegative integer length
property and index properties from 0
up to length - 1
. This latter case includes array-like objects commonly encountered in web-based code such as the arguments
object and the NodeList
object returned by many DOM methods.
When a jQuery API accepts either plain Objects or Array-Like objects, a plain Object with a numeric length
property will trigger the Array-Like behavior.
The PlainObject type is a JavaScript object containing zero or more key-value pairs. The plain object is, in other words, an Object
object. It is designated "plain" in jQuery documentation to distinguish it from other kinds of JavaScript objects: for example, null
, user-defined arrays, and host objects such as document
, all of which have a typeof
value of "object." The jQuery.isPlainObject()
method identifies whether the passed argument is a plain object or not, as demonstrated below:
var a = [];
var d = document;
var o = {};
typeof a; // object
typeof d; // object
typeof o; // object
jQuery.isPlainObject( a ); // false
jQuery.isPlainObject( d ); // false
jQuery.isPlainObject( o ); // true
The null
keyword is a JavaScript literal that is commonly used to express the absence of an intentional value.
The Date type is a JavaScript object that represents a single moment in time. Date objects are instantiated using their constructor function, which by default creates an object that represents the current date and time.
new Date();
To create a Date object for an alternative date and time, pass numeric arguments in the following order: year, month, day, hour, minute, second, millisecond — although note that the month is zero-based, whereas the other arguments are one-based. The following creates a Date object representing January 1st, 2014, at 8:15.
new Date( 2014, 0, 1, 8, 15 );
A function in JavaScript can be either named or anonymous. Any function can be assigned to a variable or passed to a method, but passing member functions this way can cause them to be called in the context of another object (i.e. with a different "this" object).
function named() {}
var handler = function() {}
You see a lot of anonymous functions in jQuery code:
$( document ).ready(function() {});
$( "a)" ).on( "click", function() {});
$.ajax({
url: "someurl.php",
success: function() {}
});
The type of a function is "function".
Inside a function a special variable "arguments" is always available. It's similar to an array in that it has a length property, but it lacks the built-in methods of an array. The elements of the pseudo-array are the argument of the function call.
function log( x ) {
console.log( typeof x, arguments.length );
}
log(); // "undefined", 0
log( 1 ); // "number", 1
log( "1", "2", "3" ); // "string", 3
The arguments object also has a callee property, which refers to the function you're inside of. For instance:
var awesome = function() { return arguments.callee; }
awesome() === awesome // true
In JavaScript, the variable "this" always refers to the current context. By default, "this" refers to the window object. Within a function this context can change, depending on how the function is called.
All event handlers in jQuery are called with the handling element as the context.
$( document ).ready(function() {
// this refers to window.document
});
$( "a)" ).on( "click", function() {
// this refers to an anchor DOM element
});
You can specify the context for a function call using the function-built-in methods call and apply. The difference between them is how they pass arguments. Call passes all arguments through as arguments to the function, while apply accepts an array as the arguments.
function scope() {
console.log( this, arguments.length );
}
scope() // window, 0
scope.call( "foobar", [ 1, 2 ] ); // "foobar", 1
scope.apply( "foobar", [ 1, 2 ] ); // "foobar", 2
In JavaScript, all variables defined inside a function are only visible inside that function scope. Consider the following example:
// global
var x = 0;
(function() {
// private
var x = 1;
console.log( x ); // 1
})();
console.log( x ); // 0
It defines a variable x in the global scope, then defines an anonymous function and executes it immediately (the additional parentheses are required for immediate execution). Inside the function another variable x is defined with a different value. It is only visible within that function and doesn't overwrite the global variable.
Closures are created whenever a variable that is defined outside the current scope is accessed from within some inner scope. In the following example, the variable counter is visible within the create, increment, and print functions, but not outside of them.
function create() {
var counter = 0;
return {
increment: function() {
counter++;
},
print: function() {
console.log( counter );
}
}
}
var c = create();
c.increment();
c.print(); // 1
The pattern allows you to create objects with methods that operate on data that isn't visible to the outside—the very basis of object-oriented programming.
Combining the above knowledge gives you as a JavaScript developer quite a lot of power. One way to combine that is to implement a proxy pattern in JavaScript, enabling the basics of aspect-oriented programming (AOP):
(function() {
// log all calls to setArray
var proxied = jQuery.fn.setArray;
jQuery.fn.setArray = function() {
console.log( this, arguments );
return proxied.apply( this, arguments );
};
})();
The above wraps its code in a function to hide the "proxied"-variable. It saves jQuery's setArray-method in a closure and overwrites it. The proxy then logs all calls to the method and delegates the call to the original. Using apply(this, arguments) guarantees that the caller won't be able to notice the difference between the original and the proxied method.
A callback is a plain JavaScript function passed to some method as an argument or option. Some callbacks are just events, called to give the user a chance to react when a certain state is triggered. jQuery's event system uses such callbacks everywhere:
$( "body" ).on( "click", function( event ) {
console.log( "clicked: " + event.target );
});
Most callbacks provide arguments and a context. In the event-handler example, the callback is called with one argument, an Event. The context is set to the handling element, in the above example, document.body.
Some callbacks are required to return something, others make that return value optional. To prevent a form submission, a submit event handler can return false:
$( "#myform" ).on( "submit", function() {
return false;
} );
Instead of always returning false, the callback could check fields of the form for validity, and return false only when the form is invalid.
An instance of an Error object is thrown as an exception when a runtime error occurs. Error can also be used as base to define user custom exception classes. In JavaScript an error can be thrown as shown below:
throw new Error( "The argument provided is incorrect" );
An error can also be thrown by the engine under some circumstances. For example, when trying to access a property of null
:
var obj = null;
console.log( obj.foo() );
A selector is used in jQuery to select DOM elements from a DOM document. That document is, in most cases, the DOM document present in all browsers, but can also be an XML document received via Ajax.
The selectors are a composition of CSS and custom additions. All selectors available in jQuery are documented on the Selectors API page.
There are lot of plugins that leverage jQuery's selectors in other ways. The validation plugin accepts a selector to specify a dependency, whether an input is required or not:
emailrules: {
required: "#email:filled"
}
This would make a checkbox with name "emailrules" required only if the user entered an email address in the email field, selected via its id, filtered via a custom selector ":filled" that the validation plugin provides.
If Selector is specified as the type of an argument, it accepts everything that the jQuery constructor accepts, eg. Strings, Elements, Lists of Elements.
jQuery's event system normalizes the event object according to W3C standards. The event object is guaranteed to be passed to the event handler (no checks for window.event required). It normalizes the target, relatedTarget, which, metaKey and pageX/Y properties and provides both stopPropagation() and preventDefault() methods.
Those properties are all documented, and accompanied by examples, on the Event object page.
The standard events in the Document Object Model are: blur
, focus
, load
, resize
, scroll
, unload
, beforeunload
, click
, dblclick
, mousedown
, mouseup
, mousemove
, mouseover
, mouseout
, mouseenter
, mouseleave
, change
, select
, submit
, keydown
, keypress,
and keyup
. Since the DOM event names have predefined meanings for some elements, using them for other purposes is not recommended. jQuery's event model can trigger an event by any name on an element, and it is propagated up the DOM tree to which that element belongs, if any.
An element in the Document Object Model (DOM) can have attributes, text, and children. It provides methods to traverse the parent and children and to get access to its attributes. Due to inconsistencies in DOM API specifications and implementations, however, those methods can be a challenge to use. jQuery provides a "wrapper" around those elements to help interacting with the DOM. But sometimes you will be working directly with DOM elements, or see methods that (also) accept DOM elements as arguments.
Whenever you call jQuery's .each()
method or one of its event methods on a jQuery collection, the context of the callback function — this
— is set to a DOM element.
Some properties of DOM elements are quite consistent among browsers. Consider this example of a simple onblur validation:
$( "input[type='text']" ).on( "blur", function() {
if( !this.value ) {
alert( "Please enter some text!" );
}
});
You could replace this.value
with $(this).val()
to access the value of the text input via jQuery, but in that case you wouldn't gain anything.
Text is a node of the Document Object Model (DOM) that represents the textual content of an element or an attribute. Consider the following code:

Hello world

If you retrieve the children of the paragraph of the example as follows:
var children = document.getElementById( "target" ).childNodes;
you obtain two children. The first one is the element representing the b
tag. The second child is a text node containing the string " world".
A jQuery object contains a collection of Document Object Model (DOM) elements that have been created from an HTML string or selected from a document. Since jQuery methods often use CSS selectors to match elements from a document, the set of elements in a jQuery object is often called a set of "matched elements" or "selected elements".
The jQuery object itself behaves much like an array; it has a length
property and the elements in the object can be accessed by their numeric indices [0]
to [length-1]
. Note that a jQuery object is not actually a Javascript Array object, so it does not have all the methods of a true Array object such as join()
.
Most frequently, you will use the jQuery() function to create a jQuery object. jQuery()
can also be accessed by its familiar single-character alias of $()
, unless you have called jQuery.noConflict()
to disable this option. Many jQuery methods return the jQuery object itself, so that method calls can be chained:
In API calls that return jQuery
, the value returned will be the original jQuery object unless otherwise documented by that API. API methods such as .filter()
or .not()
modify their incoming set and thus return a new jQuery object.
$( "p" ).css( "color", "red" ).find( ".special" ).css( "color", "green" );
Whenever you use a "destructive" jQuery method that potentially changes the set of elements in the jQuery object, such as .filter()
or .find()
, that method actually returns a new jQuery object with the resulting elements. To return to the previous jQuery object, you use the .end()
method.
A jQuery object may be empty, containing no DOM elements. You can create an empty jQuery object with $()
(that is, passing no arguments at all). A jQuery object may also be empty if a selector doesn't select any elements, or if a chained method filters out all the elements. It is not an error; any further methods called on that jQuery object simply have no effect since they have no elements to act upon. So, in this example if there are no bad entries on the page then no elements will be colored red:
$( ".badEntry" ).css({ color: "red" });
Some of jQuery's Ajax functions return the native XMLHttpRequest (XHR) object, or pass it as an argument to success/error/complete handlers, so that you can do additional processing or monitoring on the request. Note that Ajax functions only return or pass an XHR object when an XHR object is actually used in the request. For example, JSONP requests and cross-domain GET requests use a script element rather than an XHR object.
Although the XHR object is a standard, there are variations in its behavior on different browsers. Refer to the WHATWG site and Mozilla Developer Network for more information:
As of jQuery 1.5, the $.ajax() method returns the jqXHR object, which is a superset of the XMLHTTPRequest object. For more information, see the jqXHR section of the $.ajax entry
Any object that has a then
method.
As of jQuery 1.5, the Deferred object provides a way to register multiple callbacks into self-managed callback queues, invoke callback queues as appropriate, and relay the success or failure state of any synchronous or asynchronous function.
This object provides a subset of the methods of the Deferred object (then
, done
, fail
, always
, pipe
, progress
, state
and promise
) to prevent users from changing the state of the Deferred.
A multi-purpose object that provides a powerful way to manage callback lists. It supports adding, removing, firing, and disabling callbacks. The Callbacks object is created and returned by the $.Callbacks
function and subsequently returned by most of that function's methods.
A document object created by the browser's DOM parser, usually from a string representing HTML or XML.
A document object created by the browser's XML DOM parser, usually from a string representing XML. XML documents have different semantics than HTML documents, but most of the traversing and manipulation methods provided by jQuery will work with them.
A reference to or instance of the object holding all of QUnit's assertions. See the API documentation for QUnit.assert
for details.


CSS links
Removing Underlines from link
Link: None Visited: Overline Hover: Line-Through Active: Underline
Visit my Git


Home
Info
About
Pricing & Packages
Work
Weddings
Portraits
Contact
Blog
Home
Info +
About
Pricing & Packages
Work +
Weddings
Portraits
Contact
Blog
Erica Kait
Creative
Erica Kait
Creative
John + Taylor Engagement
Columbia River Gorge, Oregon
October 2018
Previous
Niki + Joel Engagement
Next
Mary + Marc Wedding


Jorge Andreu
-<EMAIL_ADDRESS>- jorgeancal.com
- Shropshire, UK
A highly motivated individual who is confident in leading, working with a team, learning quickly and adapting to any situation.
Work Experience
Site Reliability Engineer
Matillion is data transformation for cloud data warehouses
- Migrate all our service to opentelemetry
- Implementing our own Observability Platform, we’ve chosen Grafana, Loki, Tempo and Mimir
Senior Site Reliability Engineer
Crunch is a medium-sized business whose main product is an accounting software. In this business I was given the opportunity to work as a Site Reliability Engineer and I took it. The role says Site Reliability Engineer but I also do devops and sysadmin work.
Site Reliability Engineer
Crunch is a medium-sized business whose main product is an accounting software. In this business I was given the opportunity to work as a Site Reliability Engineer and I took it. The role says Site Reliability Engineer but I also do devops and sysadmin work.
- I have migrated the cluster from helm 2 to helm 3 without downtime
- We were using Landscaper and we have changed it to helmfile
- I am working on implementing Istio in our Clusters
Java Developer
Crunch is a medium-sized business whose main product is an accounting software.
- We migrated the old security system to Java Services
- We were using a Spring Boot services in cluster but the Software System is based in docker
Senior Java Developer
I was hired by Exis-TI for working in Indra. Indra is a big business which has a lot of branches around the world.
- I was working in a project for the Ministry of Agriculture of Cataluña. In this project, we were using Spring, Oracle SQL, AngularJS. My role in this project was Full Stack. I have to say that there was a lot of work in the Backend and I did some work in the front. The Java JDK that we were using was 1.8.
Senior Java Developer
Hiberus Tecnologia is a big business which has various branches in Spain and one in the U.K. It works with a number of businesses in Spain and some of them are well-renowned like FOX, Simply, Vodafone, Movistar, Amadeus, Ibercaja, and many others.
- I built Java web services, one application on Angularjs and one application on Ionic.
- I was in a section of the company which was working for Travel-IMS, a branch of Amadeus which carries out work for many travel companies. I was full stack and I used EJB, JSF, Angular and Spring. But due to the large workload of the old application, since we were still selling both versions of the app. I worked more with JSF and EJB.
Senior Developer
CPS Ingenieros Obra Civil y Medio Ambiente S.L. is a medium-sized business which manages some branches of the General Direction of Traffic. The headquarters are situated in Valencia.
- I built Java desk programs and Java web services. These projects were about roads and traffic-related matters.
- I was in charge of a project which used spring web.
Junior Developer
Netymedia is a small business that develops websites and custom applications.
- Various projects and management of two servers: Linux Debian 8, Windows Server 2003.
- I built Java desk programs, Java web apps and REST web services.
- I built a PHP Web Service that helps emergency services in the event that a chemical business explodes.
- This application allowed the emergency services to see the emergency plan while they are on the way to the incident, in this way, the response time is faster than before.
- Web Development – I built websites for various clients.
- I was accountable for several interns.
Projects
I'll post about my knowledge and some things that I discover while I’m working. I won’t post everyday because that’s impossible. I’ll try to post once per week or at least once per month.


Terry Brown
All the best Gucci Brown Gear
Tee Shirt
15$
Get one Here
Gucci God
20$
Get one Here
Special tee
20$
Get one Here
Long Sleeve
N/A
In Production
Help Us free The GUCCI GOD
View on youtube!


|
Lethal InjectionWhile a far more humane method of execution than the Electric Chair, lethal injection is both big-brother sinister and antiseptic. Disquieting sights, sounds, and smells become a thing of the past. Of eighty-five people executed in the United States in 2000, all but five were with lethal injection. It is expected in the next decade to displace electrocution entirely.Generally a series of three injections are given: sodium thiopental (relaxant) + pancuronium bromide (paralyzer) + potassium chloride (cardiac arrest). The idea of lethal injection has been floating around since at least 1888, but not until 1997 were laws passed in the United States allowing this technique for the purpose of execution. Even earlier, people were executed by lethal injections, such as the death of George V of England in 1936 by an involuntary morphine shot, and of Sigmund Freud in 1939 by a voluntary one. Noted persons executed by lethal injection include:
|


|
Bullet Collision Detection & Physics Library
|
#include "LinearMath/btVector3.h"
#include "LinearMath/btMatrix3x3.h"
#include "btJacobianEntry.h"
#include "LinearMath/btAlignedObjectArray.h"
#include "btSolverBody.h"
Go to the source code of this file.
Classes | |
| struct | btSolverConstraint |
| 1D constraint along a normal axis between bodyA and bodyB. It can be combined to solve contact and friction constraints. More... | |
Typedefs | |
| typedef btAlignedObjectArray< btSolverConstraint > | btConstraintArray |
Definition at line 72 of file btSolverConstraint.h.


Web Designer
“People ignore design that ignores people.” Any aspect of a website, app or software that doesn’t consider the user’s needs is ultimately doomed to fail.The entire product should be built for these people, so don’t even think about opening Sketch until you’ve done your user research.
Back End Developer
"Things aren’t always #000000 and #FFFFFF."
Front End Developer
"If you're already a front-end developer, well, pretend you're also wearing a pirate hat." A successful business requires a functional, clean and attractive website to appeal to clients and maintain their interest. It's like a joke, if you have to explain it, it's not good at all.
UX Designer
“When UX doesn’t consider ALL users, shouldn’t it be known as “SOME User Experience” or… SUX?” Good UX is all about making technology user-friendly and accessible, after all, and this must include every segment of the population.So, The next big thing is the one that makes the last big thing usable.
Content Strategist
“Quality, relevant content can't be spotted by an algorithm. You can't subscribe to it. You need people - actual human beings - to create or curate it.” Our main focus is on providing better answers for your audience: know that Google wants to have ‘answers’ for its audience, not just a lot of information.


DETAILS
This project returns a JSON detailing the your ip address, language,
software/ browser.
NOTE: IP address provided is localhost as it is
Example Output
{"ipaddress":"<IP_ADDRESS>","language":"en-US,en;q=0.5",
"software":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:63.0)
Gecko/20100101 Firefox/63.0"}


--- layout: post esbma_id: unknown title: SQLite and Android N date: 2016-06-15 12:00:00 keywords: sqlite teaser: The upcoming release of Android N is going to cause problems for many apps that use SQLite. ---
The upcoming release of Android N is going to cause problems for many apps that use SQLite. In some cases, these problems include an increased risk of data corruption.
SQLite is an awesome and massively popular database library. It is used every day by billions of people. If you are keeping a list of the Top Ten Coolest Software Projects Ever, SQLite should be on the list.
Many mobile apps use SQLite in one fashion or another. Maybe the developers of the app used the SQLite library directly. Or maybe they used another component or library that builds on SQLite.
SQLite is a library, so the traditional way to use it is to just link it into your application. For example, on a platform like Windows Phone 8.1, the app developer simply bundles the SQLite library as part of their app.
But iOS and Android have a SQLite library built-in to the platform. This is convenient, because developers do not need to bundle a SQLite library with their software.
The SQLite library that comes with Android is actually not intended to be used except through the android.database.sqlite Java classes. If you are accessing this library directly, you are actually breaking the rules.
Beginning with Android N, these rules are going to be enforced.
If your app is using the system SQLite library without using the Java wrapper, it will not be compatible with Android N.
 But you might not.
I suppose most Android developers use Java. Any app which is only using android.database.sqlite should be fine.
But if you are using Xamarin, it is rather more likely that your app is breaking the rules. Many folks in the Xamarin community tend to assume that "SQLite is part of the platform, so you can just call it".
Xamarin.Android 6.1 includes a fix for this problem for Mono.Data.Sqlite (see their release notes).
However, that is not the only way of accessing SQLite in the .NET/Xamarin world. In fact, I daresay it is one of the less common ways.
Perhaps the most popular SQLite wrapper is sqlite-net (GitHub). If you are using this library on Android and not taking the extra steps to bundle a SQLite library, your app will break on Android N.
Are you using Akavache? Or Couchbase Lite? Both of these libraries use SQLite under the hood (by way of SQLitePCL.raw, which I maintain), so your app will need to be updated to work on Android N.
There are probably dozens of other examples. GitHub says the sqlite-net library has 857 forks. Are you using one of those? Do you use the MvvmCross SQLite plugin? Do any of the components or libraries in your app make use of SQLite without you being aware of it?
And the Xamarin community is obviously not the whole story. There are dozens of other ways to build mobile apps. I can think of PhoneGap/Cordova, Alpha Anywhere, Telerik NativeScript, and Corona, just off the top of my head. How many of these environments (or their surrounding ecosystems) provide (perhaps accidentally) a rule-breaking way to access the Android system SQLite? I don't know.
What I *do* know is that even Java developers might have a problem.
Above, I said: "Any app which is only using android.database.sqlite should be fine." The key word here is "only". If you are using the Java classes but also have other code (perhaps some other library) that accesses the system SQLite, then you have the problems described above. But you also have another problem.
To fix this, you are going to have to modify that "other code" to stop accessing the system SQLite library directly. One way to do this is to change the other code to call through android.database.sqlite. But that might be a lot of work. Or that other code might be a 3rd party library that you do not maintain. So you are probably interested in an easier solution.
Why not just bundle another instance of the SQLite library into your app? This is what people who use sqlite-net on Xamarin will need to do, so it should make sense in this case too, right? Unfortunately, no.
What will happen here is that your android.database.sqlite code will continue using the system SQLite library, and your "other code" will use the second instance of the SQLite library that you bundled with your app. So your app will have two instances of the SQLite library. And this is Very Bad.
Basically, having multiple copies of SQLite linked into the same appliication can cause data corruption. For more info, see this page on sqlite.org. And also the related blog entry I wrote back in 2014.
You really, really do not want to have two instances of the SQLite library in your app.
One example of a library which is going to have this problem is our own Zumero Client SDK. The early versions of our sync library bundled a copy of the SQLite library, to follow the rules. But later, to avoid possible data corruption from The Multiple SQLite Problem, we changed it to call the system SQLite directly. So, although I might like to claim we did it for a decent reason, our library breaks the rules, and we did it knowingly. All Android apps using Zumero will need to be updated for Android N. A new release of the Zumero Client SDK, containing a solution to this problem, is under development and will be released soon-ish.
I really cannot recommend that you have two instances of the SQLite library in your app. The possibility of corruption is quite real. One of our developers created an example project to demonstrate this.
But for the sake of completeness, I will mention that it might be possible to prevent the corruption by ensuring that only one instance of the SQLite library is accessing a SQLite file at any given time. In other words, you could build your own layer of locking on top of any code that uses SQLite.
Only you can decide if this risk is worth it. I cannot feel good about sending anyone down that path.
It also makes this blog entry somewhat more complete for me to mention that changing your "other code" to go through android.database.sqlite is not your only option. You might prefer to leave your "other code" unchanged and rewrite the stuff that uses android.database.sqlite, ending up with both sets of code using one single instance of SQLite that is bundled with your app.
Life was better when there were two kinds of platforms, those that include SQLite, and those that do not. Instead, we now have this third category of platforms that "previously included SQLite, but now they don't, but they kinda still do, but not really".
It is so tempting to blame you for this, but that that would be unfair. I fully admit that those of us who broke the rules have no moral high ground at all.
But it also true that because of the multiple SQLite problem, and the sheer quantity of apps that use the Android system SQLite directly, enforcing the rules now is the best way to maximize the possibility of Android apps that break or experience data corruption.
Would it really be so bad to include libsqlite in the NDK?


Overview
Package
Class
Deprecated
Index
Help
Groovy Documentation
PREV NEXT
FRAMES
NO FRAMES
All Classes
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
_
A
allTime
- Property in
Analytics
Analytics
- Class in
org.grails.plugins.googleurlshortener
Analytics
()
- Constructor in
Analytics
analytics
- Property in
URLResource
AnalyticsDetails
- Class in
org.grails.plugins.googleurlshortener
AnalyticsDetails
()
- Constructor in
AnalyticsDetails
AnalyticsDetailsFragment
- Class in
org.grails.plugins.googleurlshortener
AnalyticsDetailsFragment
()
- Constructor in
AnalyticsDetailsFragment
AnalyticsDetailsFragmentTests
- Class in
org.grails.plugins
AnalyticsDetailsFragmentTests
()
- Constructor in
AnalyticsDetailsFragmentTests
AnalyticsDetailsTests
- Class in
org.grails.plugins
AnalyticsDetailsTests
()
- Constructor in
AnalyticsDetailsTests
AnalyticsTests
- Class in
org.grails.plugins.googleurlshortener
AnalyticsTests
()
- Constructor in
AnalyticsTests
author
- Property in
GoogleUrlShortenerGrailsPlugin
authorEmail
- Property in
GoogleUrlShortenerGrailsPlugin
B
browsers
- Property in
AnalyticsDetails
C
constraints
- Property in
Analytics
constraints
- Property in
AnalyticsDetails
constraints
- Property in
AnalyticsDetailsFragment
constraints
- Property in
URLResource
countries
- Property in
AnalyticsDetails
created
- Property in
URLResource
D
day
- Property in
Analytics
dependsOn
- Property in
GoogleUrlShortenerGrailsPlugin
description
- Property in
GoogleUrlShortenerGrailsPlugin
documentation
- Property in
GoogleUrlShortenerGrailsPlugin
doWithApplicationContext
- Property in
GoogleUrlShortenerGrailsPlugin
doWithDynamicMethods
- Property in
GoogleUrlShortenerGrailsPlugin
doWithSpring
- Property in
GoogleUrlShortenerGrailsPlugin
doWithWebDescriptor
- Property in
GoogleUrlShortenerGrailsPlugin
E
expand
(null)
- Method in
ShortenerService
F
G
getAnalytics
(null)
- Method in
ShortenerService
GoogleUrlShortenerGrailsPlugin
- Class in
GoogleUrlShortenerGrailsPlugin
GoogleUrlShortenerGrailsPlugin
()
- Constructor in
GoogleUrlShortenerGrailsPlugin
grailsVersion
- Property in
GoogleUrlShortenerGrailsPlugin
H
I
J
K
kind
- Property in
URLResource
L
label
- Property in
AnalyticsDetailsFragment
labelCount
- Property in
AnalyticsDetailsFragment
longUrl
- Property in
URLResource
longUrlClicks
- Property in
AnalyticsDetails
M
mappings
- Property in
UrlMappings
month
- Property in
Analytics
N
O
onChange
- Property in
GoogleUrlShortenerGrailsPlugin
onConfigChange
- Property in
GoogleUrlShortenerGrailsPlugin
P
parseDetails
(null)
- Method in
ShortenerService
parseDetailsFragment
(def)
- Method in
ShortenerService
platforms
- Property in
AnalyticsDetails
pluginExcludes
- Property in
GoogleUrlShortenerGrailsPlugin
Q
R
referrers
- Property in
AnalyticsDetails
restUri
- Property in
ShortenerService
S
setUp
()
- Method in
AnalyticsDetailsFragmentTests
setUp
()
- Method in
AnalyticsDetailsTests
setUp
()
- Method in
AnalyticsTests
setUp
()
- Method in
ShortenerServiceTests
setUp
()
- Method in
URLResourceTests
shorten
(null)
- Method in
ShortenerService
ShortenerService
- Class in
ShortenerService
ShortenerService
()
- Constructor in
ShortenerService
ShortenerServiceTests
- Class in
org.grails.plugins.googleurlshortener
ShortenerServiceTests
()
- Constructor in
ShortenerServiceTests
shortUrl
- Property in
URLResource
shortUrlClicks
- Property in
AnalyticsDetails
status
- Property in
URLResource
T
tearDown
()
- Method in
AnalyticsDetailsFragmentTests
tearDown
()
- Method in
AnalyticsDetailsTests
tearDown
()
- Method in
AnalyticsTests
tearDown
()
- Method in
ShortenerServiceTests
tearDown
()
- Method in
URLResourceTests
testSomething
()
- Method in
AnalyticsDetailsFragmentTests
testSomething
()
- Method in
AnalyticsDetailsTests
testSomething
()
- Method in
AnalyticsTests
testSomething
()
- Method in
ShortenerServiceTests
testSomething
()
- Method in
URLResourceTests
title
- Property in
GoogleUrlShortenerGrailsPlugin
transactional
- Property in
ShortenerService
twoHours
- Property in
Analytics
U
UrlMappings
- Class in
UrlMappings
UrlMappings
()
- Constructor in
UrlMappings
URLResource
- Class in
URLResource
URLResource
()
- Constructor in
URLResource
URLResourceTests
- Class in
org.grails.plugins.googleurlshortener
URLResourceTests
()
- Constructor in
URLResourceTests
V
version
- Property in
GoogleUrlShortenerGrailsPlugin
W
week
- Property in
Analytics
X
Y
Z
_
Groovy Documentation