text:
\section{Introduction}

In this short note we shall sketch a particular first-principles approach to the structure of a physical description of nature. That is, we shall outline the development of a system of mathematical objects together with specifications of how these objects relate to nature in principle. This is to be done in such a way that the emerging framework may accommodate the same predictive power we are familiar with from known physical theories.
However, we shall presuppose neither any specific physical theory nor even merely the mathematical structure of a given physical theory or framework (such as, in particular, quantum theory).
Of course, there cannot be hope for success if we keep this endeavor entirely divorced from physical experience.
Indeed, we shall rely on experience condensed from the most comprehensive physical descriptions of nature known. We extract two key principles that turn out to have far reaching consequences when combined with generic probabilistic reasoning and will be sufficient for our purposes.\footnote{We are far from claiming there are no further principles to be derived from these theories, or even that the ones we choose are to be considered the most important ones.} These principles are \emph{locality} and \emph{operationalism}.

The principle of locality stems from the 19th century discovery that forces do not act at a distance, but are mediated through fields that permeate spacetime. In classical physics particles can only interact through signals carried by fields that connect them in spacetime. This remains true in essence in quantum theory, although particles and fields are replaced there (in quantum field theory) by a unified notion. Thus, interaction can only happen through adjacency in spacetime and is parametrizable through possible ``signals''.

The principle of operationalism is motivated by the discovery of quantum physics. In classical physics reality is described through particle trajectories and field configurations distributed in spacetime. This distribution is an objective fact that exhaustively describes reality and does not depend on the observer or its actions. But we have learned that this is not an accurate description of nature and invented quantum theory to provide a better description. In quantum theory the process of measurement and the observer play a distinguished role. The lesson is that rather than trying to describe an abstract reality that we are somehow in contact with, we should concentrate on the contact itself. That is, we should describe reality \emph{through} the act of probing it, i.e., through measurement, observation, preparation etc. This is what we mean by operationalism.

\section{Spacetime}

A manifestation of locality essential for the successful physical description of our world is the fact that an experiment performed in a laboratory generally does not depend (in important ways and if it is not so intended) on what happens outside the laboratory and vice versa. To implement this aspect of locality in our framework we need a manner to distinguish the laboratory from the rest of the universe. That is accomplished by a notion of spacetime \emph{region}. It serves precisely as a means to distinguish whatever happens inside the region from the rest of the universe.
A crucial element of physical theory consists in establishing relations between what happens in one region and another one. By locality, the interior of a region can interact with the rest of the universe only through the region's \emph{boundary}. Thus, a notion of \emph{adjacency} of regions is required. More technically speaking this means a notion of gluing or \emph{composing} regions along common boundary parts. These boundary parts are spacetime \emph{hypersurfaces}.
We require thus two types of primitive spacetime objects: regions and hypersurfaces, with boundaries of regions being a special case of hypersurfaces. To be mathematically specific we take the regions to be 4-dimensional topological manifolds and the hypersurfaces to be 3-dimensional topological manifolds. In addition to the spacetime objects themselves there is a notion of \emph{composition} of regions along hypersurfaces. Mathematically, this is a gluing of manifolds. Also we require a notion of \emph{decomposition} of hypersurfaces into component hypersurfaces since the gluing is, in general, only along parts of boundaries. For our present purposes it is not necessary, however, to make this mathematically more precise.

\section{Probes}
\label{sec:probes}

By operationalism, rather than aiming for some ontological description of physics, we should describe the act of experimentation, observation, preparation etc.\ together with its outcomes (if any). We subsume this in the concept of a \emph{probe}. In order to make use of locality, a probe is assigned to a spacetime region. It encodes direct influence on, and outcomes of observations in, only this spacetime region. A probe may correlate to events in other spacetime regions, but, due to locality, exclusively so through ``signals'' traversing the boundary of the region. Mathematically, to any spacetime region $M$ we assign a set of probes $\mathcal{P}_M$ in $M$. For any region $M$, there is a special \emph{null-probe} $\emptyset\in\mathcal{P}_M$. This encodes leaving the region ``empty'', i.e., not making any observation in $M$, not putting any apparatus there etc. An elementary, but important operation on probes is their \emph{composition}. Say there are regions $M$ and $N$ that can be composed to a joint region $M\cup N$. Then a probe in $N$ together with a probe in $M$ determine a probe in $M\cup N$. That is, there is a composition map $\diamond:\mathcal{P}_M\times\mathcal{P}_N\to\mathcal{P}_{M\cup N}$. Physically speaking this is the triviality that the combination of two experiments is also an experiment.

\section{Boundary conditions}

As stated, we take locality to imply that whatever happens inside a region influences and is influenced by the rest of the universe exclusively through ``signals'' that traverse the region's boundary. We condense this into a notion of \emph{boundary conditions}. That is, whatever happens outside of the region can be parametrized in so far as it affects the interior by specifying a boundary condition. The same holds for the influence of the interior on the exterior. Moreover, again using locality, boundary conditions should be localizable not only on boundaries, but also on pieces of them, i.e., on general hypersurfaces. Mathematically, we associate to any hypersurface $\Sigma$ a set of boundary conditions $\mathcal{B}_{\Sigma}$.

\section{Values}

So far, we have limited ourselves to a qualitative description of the ingredients of our framework. To make actual predictions we need numbers. We shall follow tradition in physics and assume that any observation or measurement outcome can be described through a finite number of real numbers. This motivates the notion of \emph{values}, refining at the same time the notions of probes and boundary conditions. To a spacetime region $M$, a probe $P\in\mathcal{P}_M$ and a boundary condition $b\in\mathcal{B}_{\partial M}$ we assign a value, i.e., a real number. We shall use the notation $(P,b)_M$ to denote this value. Thus, the value represents the outcome for probe $P$ in region $M$ given the boundary condition $b$. Since a value is a single real number, an experiment might not be representable by a single probe, but might require a number of probes for its description.
Crucially, the assignment of values means that for a given region $M$ we may view a probe $P\in\mathcal{P}_M$ as a real valued function $(P,\cdot)_M$ on the set $\mathcal{B}_{\partial M}$ of boundary conditions. Similarly, we may view a boundary condition $b\in\mathcal{B}_{\partial M}$ as a real valued function $(\cdot,b)_M$ on the set $\mathcal{P}_M$ of probes. In particular, both the set of probes and the set of boundary conditions naturally span real vector spaces of functions. However, the sets are in general not identical to the vector spaces. Arbitrary linear combinations of boundary conditions are not necessarily again boundary conditions. The same goes for probes.

\section{Hierarchies of probes and partial order}

Another important structure that the sets of probes acquires by virtue of being a set of functions is a \emph{partial order}. Given two probes $P,Q\in\mathcal{P}_M$ in a region $M$ we declare $P\le Q$ if and only if for any boundary condition $b\in\mathcal{B}_{\partial M}$ we have, $(P,b)_M\le (Q,b)_M$. This partial order carries important physical meaning as we illustrate in the following.
To simplify the argument we imagine for a moment that a value predicts directly the reading on an apparatus in an experiment. (We shall see later that this cannot be the case in general.) Consider probes that represent experiments that have YES/NO outcomes. That is, these probes yield values in the set $\{0,1\}$, with $0$ representing NO and $1$ YES. We shall call these \emph{primitive probes}. The null-probe is then a primitive probe that always yields YES.
Imagine an apparatus that displays a single light in such a way that the light might either show red or green, nothing else. There are different primitive probes associated with the apparatus. There is the probe that yields $1$ if the light shows green, and $0$ otherwise. Call this $P(g)$. Similarly, there is the probe that yields $1$ if the light shows red, and $0$ otherwise. Call this $P(r)$. There is also the probe that encodes the mere presence of the apparatus, without considering what color the light shows, call this $P(*)$. The probe $P(*)$ is more general than the probes $P(g)$ and $P(r)$ as the latter correspond to special configurations of the former. This \emph{hierarchy} of generality is reflected in a \emph{partial order} relation on those probes. For any boundary condition, the induced values for the probes satisfy the same order relations which are thus order relations between the probes, namely,
\begin{equation}
 \mathbf{0}\le P(g) \le P(*)\quad\text{and}\quad \mathbf{0}\le P(r) \le P(*) .
\label{eq:ex1po}
\end{equation}
Here $\mathbf{0}$ represents the trivial probe that always returns the value $0$. Apart from the order relation we also have an additivity relation here, namely $P(*)=P(r)+P(s)$.
In this simple example the hierarchy and partial order are rather limited. But with growing complexity of the apparatus, the hierarchies quickly become more interesting and powerful. As a second example take an apparatus that displays two lights, each either showing red or green. With the obvious notation we have, for example,
\begin{equation}
 \mathbf{0}\le P(g,r) \le P(*,r)\le P(*,*),
\end{equation}
and a number of similar relations. The partially ordered set of the associated primitive probes is considerably richer than in the first example. Partial orders also arise from continuous measurement outcomes. Consider an apparatus with a scale, showing numbers from $0$ to $5$. The primitive probe that represents an outcome in the range $[0,4]$ is more general than the primitive probe that represents an outcome in the range $[1.5, 3.5]$ for example, etc.

\section{Probability and Conditionality}

The assumption that values always directly predict measurement outcomes has very restrictive implications. Firstly, it implies that any boundary condition is compatible with any apparatus and also with the absence of an apparatus (encoded by the null-probe). This implication is not at all innocent. Indeed, by locality the set of boundary conditions associated to a hypersurface does not ``know'' about the restrictions imposed by the presence of a region much less an apparatus in a region that the hypersurface might be the boundary of. This suggests that the assumption, at least in this simple form, is unsustainable. A second implication is that measurement outcomes are always predicted with certainty. Our experience with quantum physics speaks against this. A third implication is that boundary conditions need to be mutually exclusive, which is highly restrictive.

We should thus allow values to have a probabilistic and conditionalistic relation to measurement outcomes. This requires to adapt the concept of primitive probes. While we continue to consider probes that encode YES/NO measurement outcomes as primitive, we cannot restrict them to yield the binary values $0$ or $1$. Even restricting them to values in the interval $[0,1]$ could meet with normalizability issues. So we merely require them to yield non-negative values. As we shall see, this lack of normalization is not a problem. We also allow probes to be formed as probabilistic ensembles of other probes. These are linear combinations of probes with positive coefficients summing to $1$. While they might not represent a given single experiment, they can give rise to meaningful statements about ensembles. Combining this with the fact that numbers associated to measurement outcomes can be redefined simply by convention justifies considering arbitrary linear combinations of probes as (general, not necessarily primitive) probes. We therefore take the set of probes $\mathcal{P}_M$ from here onward to form a real vector space. The primitive probes admit linear combinations with positive coefficients by forming ensembles and relaxing normalization. Thus, they form a \emph{positive cone} that we shall denote $\mathcal{P}^+_M$ in $\mathcal{P}_M$, making $\mathcal{P}_M$ into an \emph{ordered vector space}.

Crucially, the discussion of the previous section on the physical meaning of hierarchies of probes remains valid in the probabilistic context. In particular, the partial order relations in the examples remain true. However, rather than directly yielding a value corresponding to YES/NO the probes in question yield (relative) probabilities. Recall the example with the apparatus displaying a single light with states ``red'' or ``green''. Given a boundary condition $b\in\mathcal{B}_{\partial M}$ the value of $(P(g),b)_M$ is not restricted to the set $\{0,1\}$, corresponding to ``not green'' or ``green''. But neither is it in general the \emph{probability} for the state to turn out ``green'' in the experiment. Rather, this probability is given by the \emph{quotient}
\begin{equation}
\frac{(P(g),b)_M}{(P(*),b)_M} .
\label{eq:condpp}
\end{equation}
That is, to obtain the probability we have to \emph{condition on} the presence of the apparatus.
The inequality (\ref{eq:ex1po}) precisely guarantees that this quotient lies in the interval $[0,1]$.
The value $(P(*),b)_M$ itself can be seen as a measure of the ``compatibility'' between the boundary condition $b$ and the presence of the region $M$ with the apparatus represented by the probe $P(*)$. Similarly, the value $(\emptyset,b)_M$ associated to the null-probe measures the ``compatibility'' between the boundary condition $b$ and the presence of the region $M$.
Now recall, from last section, the apparatus displaying two lights, each showing either red or green. In this case we can express non-trivial probabilities relating two apparatus states. For example, with boundary condition $b\in\mathcal{B}_{\partial M}$ the probability that the first light shows green given that the second light shows green is given by the quotient,
\begin{equation}
\frac{(P(g,g),b)_M}{(P(*,g),b)_M} .
\end{equation}

\section{Hierarchies of boundary conditions}

In the probabilistic setting boundary conditions need not be mutually exclusive, may be probabilistically combined, and become subject to the formation of hierarchies. As a physical example consider temperature (range) as a boundary condition. For example, a temperature range $b$ between $10$ and $20$ degrees Celsius is more general than one $c$ between $10$ and $15$ degrees. The corresponding partial order is $c\le b$. However, this does \emph{not} reflect an order relation between values $(P,c)_M\le (P,b)_M$ for arbitrary probes $P\in\mathcal{P}_M$. It does reflect this order relation between values, however, for the restricted class of primitive probes $P\in\mathcal{P}_M^+$. As in the case of probes we do not assume normalizability. Thus, any linear combination of boundary conditions with positive coefficients is again a valid boundary condition. We modify our notation slightly and denote the set of boundary conditions by $\mathcal{B}^+_{\Sigma}$ while $\mathcal{B}_{\Sigma}$ shall henceforth denote the real vector space spanned by it. Thus, $\mathcal{B}^+_{\Sigma}$ is a positive cone in $\mathcal{B}_{\Sigma}$, which thus acquires the structure of an ordered vector space.

Analogous to conditional probabilities for different probes given a boundary condition, it makes equal sense to consider conditional probabilities relating different boundary conditions for a given probe. For boundary conditions $b,c\in\mathcal{B}^+_{\partial M}$ with $\mathbf{0}\le c\le b$, i.e., $c$ a specialization of $b$, we can ask for the probability that $c$ is realized given that we know $b$ to be realized and given the primitive probe $P\in\mathcal{P}^+_M$ in $M$. This probability is the quotient,
\begin{equation}
 \frac{(P,c)_M}{(P,b)_M} .
\label{eq:condbdy}
\end{equation}
The physical information added that gives meaning to this probability is the presence of the region $M$ and associated restriction as to what may happen at its boundary $\partial M$.

\section{Expectation values}

For an expectation value two probes are required: One probe $Q_0$ that encodes the mere presence of the measurement apparatus without considering the outcome of the measurement and another probe $Q$ that takes account of the outcome of the measurement. The expectation value is thus,
\begin{equation}
\frac{(Q,b)_M}{(Q_0,b)_M} ,
\label{eq:condev}
\end{equation}
in complete analogy to formula (\ref{eq:condpp}) for primitive probes.

\section{Composition}
\label{sec:composition}

We return to the concept of composition of probes introduced in Section~\ref{sec:probes}. It turns out that locality, suitably understood, is sufficient to derive a \emph{composition law} for probes. We give a condensed account of this in the following. As a first step we introduce \emph{slice regions}. These are hypersurfaces $\Sigma$ considered as infinitesimally thin regions $\hat{\Sigma}$. A slice region has a boundary $\partial\hat{\Sigma}$ with two components $\Sigma$, $\Sigma'$, each of which is a copy of the original hypersurface. The null-probe gives rise to a bilinear map $\mathcal{B}_{\Sigma}\times\mathcal{B}_{\Sigma}\to\mathbb{R}$ via $(b_1,b_2)\mapsto (\emptyset,(b_1,b_2))_{\hat{\Sigma}}$. Assuming that different boundary conditions encode different physics, this inner product must be \emph{non-degenerate}. It may have \emph{positive definite} and \emph{negative definite} parts.\footnote{We deliberately ignore here complications that may arise in an infinite-dimensional setting.} An orthonormal basis $\{b_k\}_{k\in I}$ has the property, $(\emptyset, (b_k , b_l))_{\hat{\Sigma}} = (-1)^{\sigma(k)} \delta_{k,l}$. Here $\sigma(k)=0,1$ for the positive-definite and negative-definite part respectively.
Now, consider the composition of probes $P$, $Q$ in adjacent spacetime regions $M$, $N$. We fix moreover boundary conditions $b$ on $\partial P\setminus \partial Q$ and $c$ on $\partial Q\setminus \partial P$. By locality, it must be possible to describe the effect of probe $Q$ in $N$ with $c$ on $P$ equivalently through a boundary condition $q$ on the interfacing hypersurface $\Sigma = \partial M \cap \partial N$. Formally, $(P\diamond Q, (b, c))_{M\cup N} = (P, (b, q))_M$. Specializing to the case that $M$ is a slice region $\hat{\Sigma}$ with $P$ the null-probe we get,
\begin{equation}
(\emptyset, (b, q))_{\hat{\Sigma}} =
(Q, b)_N = \sum_k (-1)^{\sigma(k)} (\emptyset, (b, b_k ))_{\hat{\Sigma}} (Q, b_k)_N
\end{equation}
For the second equality have used a completeness relation for the inner product. But this implies, $q=\sum_k (-1)^{\sigma(k)} b_k (Q, b_k)_N$. This in turn implies the composition rule,
\begin{equation}
(P\diamond Q, (b, c))_{M\cup N}
= \sum_k (-1)^{\sigma(k)} (P, (b, b_k ))_{M} (Q, (b_k , c))_{N} .
\label{eq:comprule}
\end{equation}

\section{Convergence}

Remarkably, the framework we have arrived at turns out to be essentially a formulation of quantum theory. To explain this, we recall the \emph{general boundary formulation} of quantum theory \cite{Oe:gbqft}, which incorporates manifest locality into quantum theory. In its \emph{amplitude formalism (AF)}, (generalized) Hilbert spaces of states are associated to spacetime hypersurfaces. Amplitudes and observables are associated to spacetime regions. The AF incorporates a composition rule similar to (\ref{eq:comprule}), coming from \emph{topological quantum field theory}. The \emph{positive formalism (PF)} \cite{Oe:dmf} is obtained from the AF by generalizing from pure states to mixed states. It turns out that the framework we have arrived at in this note coincides with the PF. More precisely, the ordered vector space $\mathcal{B}_{\Sigma}$ of boundary conditions arises in the PF as the space of self-adjoint operators on the Hilbert space $\mathcal{H}_{\Sigma}$ (of the AF) associated with the hypersurface $\Sigma$. The primitive probes arise as (unnormalized) \emph{quantum operations}. General probes are quantum observables and quantum measurements. The composition rule (\ref{eq:comprule}) is exactly a version of the Axioms (P5a), (P5b) in \cite{Oe:dmf}. Transition probabilities arise as special cases of formula (\ref{eq:condbdy}) and expectation values as special cases of formula (\ref{eq:condev}). If, as usual in the standard formulation of quantum theory, spacetime regions are time intervals and temporally final states are conditioned on initial ones, the denominators in these formulas turn out to be equal to $1$. This explains why in the standard formulation, transition probabilities and expectation values do not normally take the form of quotients.

In \cite{Oe:dmf} it was shown that even though spaces of self-adjoint operators (for the boundary conditions) have more structure than that of ordered vector spaces, only the latter is necessary for a coherent and predictive physical framework. Indeed, in this note we have arrived only at ordered vector spaces. It turns out that dropping the more restrictive structure of self-adjoint operators is akin to dropping the restriction to quantum theory, as we shall see in a moment. At this point we can only speculate what exactly makes the difference between classical and quantum theory. It might be the difference between boundary conditions forming a lattice versus an anti-lattice.

\section{Bonus: Classical physics}

We proceed to show how classical physics can also be accommodated fairly naturally within the presented formalism. A classical theory associates a space of solutions $L_M$ of the equations of motion to each region $M$ and of germs of solutions $L_{\Sigma}$ to each hypersurface $\Sigma$. Note that for any region $M$ we have a map $L_M\to L_{\partial M}$ that consists in retaining the solution only on the boundary. We can now set up a \emph{deterministic} version of the framework as follows: We define the space of boundary conditions to be $\mathcal{B}_{\Sigma}=L_{\Sigma}$. (We return momentarily to the setting where $\mathcal{B}_{\Sigma}$ is a set without necessarily having the structure of a vector space.) We define the null-probe $(\emptyset,b)_M$ to take the value $1$ if there is a solution in $M$ that induces the boundary condition $b$ and $0$ otherwise. We take general probes to be induced by local observables. That is given an observable $O:L_M\to\mathbb{R}$ in a spacetime region we define an associated probe $P_O$ via $(P_O,b)_M=O(\phi)$ if there is a solution $\phi\in L_M$ that reduces to $b\in L_{\partial M}$ on the boundary and as $0$ otherwise. (This supposes that different solutions in the interior can be distinguished on the boundary or that we restrict to observables that give the same value if the induced boundary conditions are identical.) Since the spaces of boundary conditions are not in general vector spaces here, the composition rule of Section~\ref{sec:composition} does not apply.

A probabilistic setting is achieved by transitioning to classical statistical physics. Thus, the space of boundary conditions is replaced by the space of probability distributions over $L_{\Sigma}$. Not imposing normalization, this becomes a cone $\mathcal{B}^+_{\Sigma}$ of positive distributions inside a real vector space $\mathcal{B}_{\Sigma}$. Integrating over $L_M$ in the interior with such a distribution makes a probe as defined above for the deterministic setting into one for this statistical setting. (We omit details here which may render converting this sketch into a precise formalism quite non-trivial.) In this case the composition rule of Section~\ref{sec:composition} should apply. The present framework, along the lines sketched, might provide a suitable starting point for a statistical treatment of classical field theory without metric background, such as general relativity.

\bibliographystyle{pos}

redpajama_set_name: RedPajamaArXiv


text:
/*
 * xml_test.cpp - Tests whether XML parsing works
 */

#include "test_suite.h"
#include "common.h"
#include "xml.h"
#include "res_table.h"

using namespace wangziqi2013;
using namespace android_dalvik_analysis;

/*
 * TestStringPool() - Tests whether StringPool works and whether we could
 *                    print strings correctly
 */
BinaryXml *TestStringPool(const char *file_name) {
  _PrintTestName();

  size_t length;
  unsigned char *data = FileUtility::LoadFile(file_name, &length);

  dbg_printf("File %s opened. Length = %lu\n", file_name, length);

  // Bind the file data to an object and transfer ownership to the object
  BinaryXml *xml_p = new BinaryXml{data, length, true};
  assert(xml_p->IsValidXml() == true);

  xml_p->DebugPrintAllStrings();

  return xml_p;
}

/*
 * TestOutputXml() - Tests whether XML could be correctly decoded
 *
 * Since the XML file is already decoded
 */
void TestOutputXml(BinaryXml *xml_p, const char *file_name) {
  _PrintTestName();

  Buffer buffer{file_name};
  xml_p->WriteXml(&buffer);

  return;
}

/*
 * ReadResource() - Reads system and app resources and register it into the
 *                  package group
 */
std::pair<ResourceTable *, ResourceTable *> ReadResource() {
  size_t sys_length, app_length;

  unsigned char *sys_data_p = \
    FileUtility::LoadFile("resources-system.arsc", &sys_length);
  unsigned char *app_data_p = \
    FileUtility::LoadFile("resources.arsc", &app_length);

  ResourceTable *sys_table_p = new ResourceTable{sys_data_p, sys_length, true};
  ResourceTable *app_table_p = new ResourceTable{app_data_p, app_length, true};

  return std::make_pair(sys_table_p, app_table_p);
}

int main() {
  EnterTestDir();

  auto p = ReadResource();

  // This is UTF-16
  BinaryXml *xml_p = TestStringPool("AndroidManifest.xml");

  TestOutputXml(xml_p, "AndroidManifest-decoded.xml");

  // Frees memory and the data array since the xml object has ownership
  delete xml_p;
  delete p.first;
  delete p.second;

  return 0;
}

redpajama_set_name: RedPajamaGithub


The Jewish practice of Shiva is modeled after this passage of scripture and reflects the seven days that Jacob mourned the death of his father Isaac. During Shiva family members gather for seven days in the home of the one who died and simply sit in mourning sharing meals and time with loved ones. The image of Shiva and this passage from Job speaks so deeply to me. Sometimes there are simply no words to say. Sometimes our presence is all we have in such times.
The man covered in agonizing boils breaks this week long silence with words that express an unimaginable pain. No longer can Job contain his hurt. The weight of his losses can no longer be kept within. I can feel the despair and see the tears as this blameless man confesses what he has no doubt been thinking all week. Sometimes our pain is so great that we wish that we were not present to experience it. Often our pain is so hard to express - even to dear friends.
Lord, please bring the comfort of silent friends to those who are experiencing pain today.


A lined notebook perfect for your everyday needs.
This notebook is perfect for you and your needs. With 150 lined pages it has enough room for you to jot, write, and scribble all your notes, thoughts and secrets.
Check out Jay Wilson on Amazon for more designs and books that will fit your every need.


Adorable dress by Wauw Capow! This fun dress features a large flamingo design on the front that has a shiny fringe effect. It has short sleeves and rounded hems at the bottom. It is coral in color with black polkadots. This is the perfect gift for little girls. Have fun dressing it up or down.


text:
Warburg is UBS star performer
By William Kay
Buoyant global stock markets meant that UBS Warburg, the City-based arm of the Swiss UBS group, has emerged as the group's top performer with an 86% jump in profits in the first three months of this year compared with a year ago.
UBS was reporting first-quarter net group profits up 41% at £904m. Warburg chipped in a £530m pre-tax profit, mainly from securities and investment banking services to corporate and institutional clients.
While equities revenues were described as 'exceptionally strong' and fixed income revenues as 'very robust', Warburg was also involved in a series of major corporate finance transactions including Pacific Century CyberWorks' record-breaking takeover of Hong Kong Telecom.
Warburg is now getting a quarter of all its bond new issue volume from its only system, DebtWeb. Chief executive Marcel Ospel said: 'This is an outstanding result for the group as a whole and reflects strong performance across the major business groups.'
The other star performer was private banking, where the pre-tax profit was £447m. Asset management profits rose 36% to £45m. In its home base, UBS Switzerland saw a 45% rise in pre-tax profits, mainly from retail and corporate clients and private banking services for high net worth clients.

redpajama_set_name: RedPajamaCommonCrawl


Alex Griendling is a designer and illustrator working for Google in California. He is heavily involved in a redesign effort that is impacting Google's largest and smallest products. Hist team, the Google Art Department, is focused on improving Google's visual standards and the cohesiveness of its brand. Outside of Google, he likes to develop new personal projects, update his blog, read comics, obsessively watch Back to the Future, and meet new people.
A collaborative project in which 52 designers and illustrators each create a unique raygun. The project began in mid 2011 when I received a strange transmission from the year 2258.
We've featured many series that focus their theme on the Alphabet, It's a great practice because every single letter has their own properties and characteristics.
DXTR shared a beautiful post on Behance with illustration, logos and icons for Nickelodeon's Slime Fest 2018. As the name of the even suggest the design direction really expand on the slime theme.
With zombie fever all over pop culture, it's pretty easy to find artworks showing us the theme.


Rostrvm Solutions, which develops and supports software applications for the contact centre and back office process management and reporting, sponsors the Midlands Contact Centre Forum (MCCF) and is speaking at its Regional Forum on Tuesday 18th October hosted by Autonet Insurance Group.
The Midlands Contact Centre Forum (MCCF) provides a user group for contact centre professionals across both the East and West Midlands. It shares knowledge and best practice with its members and encourages Public Sector investment.
Autonet Insurance Group handles over 600,000 calls a year and was declared winner of the "Insurance Times Personal Lines Broker of the Year 2010". This outstanding achievement is one of the most coveted awards in the insurance industry.
Rostrvm Solutions' presentation at the Forum will focus on the changing work mix in the call centre and the new agent and management skills that will be needed.


I had a blast on Amazon's Style Code Live again last night! It's my new favorite show to be a part of because the cast and crew are so vibrant, welcoming and all around fun. The vibe behind the scenes is upbeat and segments are innovative. Last night, I talked New Year Beauty Resolutions with Rachel Smith and Frankie J. Grande. Check it out here. PS: One of my models, Catie, is my sister-in-law!
Last Friday I had such a fun time working with Sara Gore for New York Live. It was the first week the show was in the new studio so I was excited to check it out. And let me tell you, it's gorgeous! Check out my segment on the most iconic beauty buys here.
Detoxing Your Skin on Style Code Live!
Last week I had so much fun on Amazon's new show, Style Code Live. The energy in that studio is great and I love talking about "How to Detox Your Skin" with all of the hosts. You can check out (and shop) my segment here.
You guys know how much I love seeing my friends at New York Live. Today was so much fun as I shared some of my favorite new beauty launches from around the world in honor of the upcoming Olympic events. Check it out.
It's true - just because the label "natural" is on a package doesn't mean the product is 100% natural. Today on NBC's New York Live, I shared my favorite 100% natural beauty buys with Sara Gore. Check it out!
Last month I flew out to LA to film a segment on The Doctors featuring some of the hottest Instagram beauty trends. Thanks to Jessica Alba and Lady Gaga, lip masks are the new rage for plumping the lips and of course, I touched on strobing, but for a more practical day look. Check out the segment and tell me what you think!


Pony Bamboo Knitting Pins. Pair. 33cm x 3.75mm.
Pair of Pony Bamboo Knitting Pins. 33cm x 3.75mm.
Highly polished patina improves with use.
Crafted from finest quality Japanese mature bamboo.
You're reviewing: Pony Bamboo Knitting Pins. Pair. 33cm x 3.75mm.


text:
Everything you Need to Know about Sukhothai
A UNESCO World Heritage City, Sukhothai houses a vast number of historical sites and temple ruins. As the first capital of Siam, the Sukhothai Kingdom (1238 – 1438) was the cradle of Thai civilisation – the birthplace of Thai art, architecture and language. 'Sukhothai' means 'the dawn of happiness', and the kingdom did enjoy an extended period of peace and prosperity until it was annexed by the Ayutthaya Kingdom.
Due to its location (about 427km north of Bangkok and sitting relatively in the middle of nowhere) Sukhothai sees a smaller number of visitors than its more popular counterpart Ayutthaya. Sukhothai's historical sites, however, are by no means less splendid. Most historically significant temple ruins are housed inside the Sukhothai Historical Park and nearby Si Satchanalai Historical Park.
Apart from visiting the historical sites, Sukhothai itself is a quiet rural city where you can still relish the charms of Thailand's rustic lifestyle.
Sukhothai Travel Guide
Sukhothai Heritage City
Sukhothai Historical Park covers an area of about 70sqkm and contains over 190 historical ruins. Inside the city wall Read More»
Where to Stay in Sukhothai
With the exception of one boutique hotel, the accommodation choices around Sukhothai Historical Park are rather limited. Read More»
About 60km north of Sukhothai Historical Park is its sister city called Si Satchanalai, home to another civilisation as Read More»
Sukhothai Historical Park covers an area of about 70sqkm and contains over 190 historical ruins. Inside the city wall and moat, Wat Mahathat stands as the spiritual centre of the kingdom, and the royal palace (now collapsed) lies to its northwest. To the city's immediate north is Wat Phra Pai Luang, believed to be the original Read More...
Sukhothai Hotels - Where to Stay in Sukhothai
With the exception of one boutique hotel, the accommodation choices around Sukhothai Historical Park are rather limited. Most hotels and guesthouses are located in the new city, about 12km from the historical park. Read More...
Sukhothai Attractions
Arriving in Sukhothai is like taking a journey back in time, since history continues to dominate the area. Twelve kilometres west of the new city, the Sukhothai Historical Park houses all the historical ruins dating back to the ancient Sukhothai Kingdom (1238 – 1438). Divided into five zones, the park contains more than 190 ruins, all spread across its 70sqkm area. The central zone – the most visited – is the site of the royal palace (now collapsed) and the spiritual centre, Wat Mahathat.
Also worth a visit, if you have time, is the Si Satchanalai Historical Park located about 60km north of Sukhothai Historical Park. It houses a number of important historical sites, such as Wat Chang Lom and Wat Nang Phaya. This was the birthplace of the beautiful glazed ceramic ware called 'sangkhalok' – a predecessor of celadon.
Sukhothai Dining
Sukhothai's dining scene is dominated by street-side stalls and outdoor markets selling ready-to-eat dishes, just like most rural towns in Thailand. But if there's one dish that Sukhothai is best known for, and that has played a role in spicing up Thailand's culinary scene, it's the typical Sukhothai noodles dish. With its signature spicy tom yam soup, julienned bush beans and ground peanuts, you will be able to spot it easily at any market stall in the new city or around Sukhothai Historical Park.
If you are serious about food and fancy tasting a variety of local delicacies, wake up early and head over to the municipal market in the new town.
Sukhothai Nightlife
Being a quiet rural town and a UNESCO World Heritage City, Sukhothai and nightlife just don't mix well. In fact, nightlife takes on another meaning here; instead of a party scene, there's a more spiritual kind of nightlife, the light and sound show at the Sukhothai Historical Park, called Sukhothai Night (Fri-Sun, 19:00 – 20:00). This is a rare opportunity to see the spectacularly lit ruin sites after sunset, as the park's closing time is normally at 18:00. There's also a walking street outside the historical park every Saturday, starting at 22:00, where you can enjoy local food as well as browsing through handicraft stalls.
But this is not to say that there are no watering holes in the entire city area. You'll find that they're mostly concentrated along the road that connects the new city with Sukhothai Historical Park. Chopper Bar offers cheap local beers and live band music.
Sukhothai Shopping
Sukhothai is best known for sangkhalok ware, gold craft and silver jewellery. With its grayish blue/green matte glaze, featuring simple designs, sangkhalok ware will add a classic touch to any room. Modernised versions of the sangkhalok ware showcase more complex designs and feel rather contemporary.
Sukhothai's gold and silver jewellery craft is equally as unique. Rather than molded into a pre-desired shape, these jewellery pieces are hand-woven into various designs from tiny strands of gold or silver. The designs are usually modelled after the relief patterns found inside Si Satchanalai and Sukhothai Historical Parks. If you are looking for a piece of fabric to embellish your home, head to Hat Siao textile village and have a look at their colourful collection of embroidered textiles.
Sukhothai Activities
Besides sightseeing at the Sukhothai Historical Park and cruising the Yom River in a long-tail boat, there's little else to do in Sukhothai. While inside the park, you have a few options, such as riding an ox-drawn cart from Wat Phra Pai Luang to Wat Sri Chum, exploring the park on a bicycle, or simply enjoying a picnic in the park.
Getting Around Sukhothai
Unlike Ayutthaya, where the ancient and modern worlds merge right in the city centre, Sukhothai Historical Park is located about 12km from the 'new' city. Hiring a tuk-tuk (motorised three-wheelers) or hopping on a songtaew (passenger-carrying trucks) is the best way to commute between the two sites. The songtaews leave from Jarot Withithong Road, near the Yom River, at 06:30-18:00 every day. Once you arrive at the Sukhothai Historical Park (old city), rent a bicycle or motorcycle from one of the many rental stalls.
Sukhothai Historical Park has a simple layout. The original city is contained inside a square area, with Wat Phra Pai Luang at its epicentre. Later during King Ram Khamhaeng the Great's reign (1279-1298), the king relocated the city slightly to the south, to what is today the majority of the historical park. This new site is a large, rectangular area surrounded by the city walls and a moat with Wat Mahathat at its epicentre. You will find all major historical sites inside these two ancient cities.
Getting from Sukhothai to Si Satchanalai
About 60km north of Sukhothai Historical Park is its sister city called Si Satchanalai, home to another civilisation as magnificent as Sukhothai. Archaeological evidence suggests that this ancient city used to be a centre for ceramic trade with China. To get to Si Satchanalai from Sukhothai, it's best to charter a van for the entire day. You can also take a public bus from Sukhothai municipal market. The trip should take about one hour. Some hotels and guesthouses in Sukhothai itself may offer tour services to Sukhothai Heritage Park and Si Satchanalai.
About 60km north of Sukhothai Historical Park is its sister city called Si Satchanalai, home to another civilisation as magnificent as Sukhothai. Archaeological evidence suggests that this ancient city used to be a centre for ceramic trade with China. To get to Si Satchanalai from Sukhothai, it's best to charter a van for the entire day. Read More...
Hotels in Sukhothai
Sukhothai Garden
Foresto Sukhothai Guesthome
Thai Thai Sukhothai Guesthouse
Map of Sukhothai


text:
Q: jquery animation scrolling whole page I'm using the following code to scroll and snap to various sections on the page. It works fine in the beginning but then animation plays with quite a lot of delays. The animations are also jittery and seem to happen at random intervals. Please help!
$.fn.isInViewport = function() {
  var elementTop = $(this).offset().top;
  var elementBottom = elementTop + $(this).outerHeight();

  var viewportTop = $(window).scrollTop();
  var viewportBottom = viewportTop + $(window).height();

  return elementBottom > viewportTop && elementTop < viewportBottom;
};

let sections = $(".scroll-dest");
let lastSt = 0;
let running = false;

$(window).scroll(event => {
  if(!running) {
    running = true
  event.preventDefault();
  let current = null;

  sections.each((i, v) => {
    if ($(v).isInViewport()) current = i;
  });

  let st = $(this).scrollTop();
  if (st > lastSt) {
    // console.log("down");
    console.log(current != sections.length - 1)
    if (current != sections.length - 1) {
      $("html").animate(
        {
          scrollTop: $(sections[current + 1]).offset().top
        },
        500
      );
    }
  } else {
    // console.log("up");
    if (current > 0) {
      $("html").animate(
        {
          scrollTop: $(sections[current - 1]).offset().top
        },
        500
      );
    }
  }
  lastSt = st;
  running = false
}
});

Also, the script is supposed to scroll to the section which is either before or after the current section. But it is scrolling the whole length of the page, which is not what i want.

A: Don't use scroll event for this, try using the Intersection Observer API (IO) for this. It was created to solve problems like yours, to react when elements are getting visible or intersecting with each other in the viewport.
First you would define the options for the IO:
let options = {
  rootMargin: '0px',
  threshold: 1.0
}

After the options are defined you say which elements you want to observe:
const elements = document.querySelectorAll('.scroll-dest');

As a last step you have to define what happens once an element comes into view and bind it to the elements you defined:
const intersectionObserver = new IntersectionObserver((entries, observer) => {
  entries.forEach((entry) => {

    // when element's is in viewport,
    // do something with it!
    if (entry.intersectionRatio > 0) {
      animate(entry.target);
      // remove observer after animation (if it is no longer needed).
      // remove this line if you want to continue observing this element.
      observer.unobserve(entry.target);
    }
  });
});
elements.forEach((element) => intersectionObserver.observe(element));

If you need to support older browsers than use this (official) polyfill from w3c, it recreates intersection observer with listening to scroll events. So it will still be slower on older browsers, nothing you can do about it here. But on newer ones there will be an increase in performance.
You can also think about using window.scrollTo() instead of jQuery animate to get better performance.

redpajama_set_name: RedPajamaStackExchange


Easy-song-writing.com provides PROPHET JONES lyrics, music and other helpful songwriting resources. This list is based on the number of searches that are conducted on the Internet. Only the best and most popular lyrics are added to this list.
PROPHET JONES Lyrics have been provided by Easy-song-writing.com.


text:
Volume 7 – Heaven Smiting Shakes the World
Chapter 745 - Counterattack Begins
"Die!!"
Booooom————
Boom boom boom———
Continuous sounds of explosions reached Floating Cloud City from the far east. Even though it was extremely far away, it was still so overwhelming that it made the hearts of the people so uncomfortable that they felt as if there were going to burst. If you told the people of Floating Cloud City that this was the sound of two people fighting each other three hundred kilometers away, absolutely no one would believe it.
This incredibly overwhelming sound of explosions was not only frequent, it continued for two entire hours and did not stop at all. Many citizens of Floating Cloud City went to the east side of the city to try and find its source by looking to the east.
Ssss!
Ssss!!
Two long, pitch-black fissures appeared on Yun Che's afterimage. Each slash of Fen Juechen's attack were accompanied by an icy dark profound energy. Yet after slashing over ten times like a fierce storm, all he had hit were Yun Che's afterimages. When the last attack landed, the waves were slashed open harshly, but Yun Che's figure got further away.
"Uuaahhhhh!!"
The waves surged. A huge, pitch-black profound energy storm caused the clouds to change color, and it charged towards Yun Che with a fearful aura. Yun Che focused his gaze, crossed his arms before his chest, and roared deeply…
Bang!!
The dark profound energy storm violently collided with Yun Che's body, sending him tumbling away. A giant, three kilometer long reef was sent flying into the air from directly below Yun Che. Before it could land, it was immediately turned into a fine powder within the energy storm.
Yun Che purposely didn't defend. His body was shot three or four kilometers away by the shock of the dark profound energy. When he stopped, he looked at his arms… the ends of his arms had been burnt black. There was no bleeding or pain… he couldn't even feel his skin and flesh!
Whoosh!!
Phoenix flames ignited on his arms, dispersing the strange, pitch-black darkness in the blink of an eye and revealing his flesh which had previously been shrouded… The speed at which his body regenerated had already surpassed the limit of what should have been possible.
"Fen Juechen, it's been three hours! You've really disappointed me! Hahahahaha…"
Yun Che laughed wildly, but not a single part of his body had relaxed. Every time there was a gap between Fen Juechen's attacks, Yun Che would mercilessly ridicule him as if only he himself was a truly strong practitioner. He teased and humiliated his opponent as if he were a cat playing with a mouse. However, in his heart, Yun Che knew that the actual situation was not like that.
As time passed, Fen Juechen became increasingly irritated. His roars had long since become hoarse, and the dark profound energy released by his body had already become a lot weaker. Nonetheless, his attacks were still incomparably fierce. Every strike was made with no care for his own life… His entire person had become an enraged madman. The only image within his blood-red eyes was Yun Che's figure! His mind and soul only had one thought, and that was to kill Yun Che!
A thirty meter long sword beam horizontally sliced out, savagely and ruthlessly tearing through the sky. Yun Che's figure swayed slightly, then suddenly reappeared above the surface of the ocean a hundred and fifty meters below. A quiet sigh suddenly exited his mouth as he watched Fen Juechen roar and charge at him yet again.
Just based on profound energy, Fen Juechen indeed completely surpassed him. If he fought with him head to head, even though he would not necessary be defeated in a short amount of time, he would definitely lose.
But Fen Juechen was just too young.
And his temperament was far too extreme.
He was originally from Burning Heaven Clan. As the Burning Heaven Clan's young master, he naturally wouldn't have experienced a battle of life and death.
Moreover, after he acquired the powerful dark profound energy, he had yet to encounter an opponent who could match him.
As for Yun Che, not only did he have the experience from two lifetimes, he had also experienced many life and death battles. Earlier, Fen Juechen had roared that he had "gone through hell," but all of the things that Yun Che had suffered through were things that even Fen Juechen would never be able to imagine.
Therefore, even though his strength surpassed Yun Che, it didn't mean… that he was be able to beat Yun Che!
In the Azure Cloud Continent, there had been many with strength far beyond Yun Che's. Yet a countless number of them had ended up falling at Yun Che's hand anyway!!
"Looks like we didn't need eight hours at all," Yun Che spoke in a low voice. He focused his mind and used all of his strength to deal with Fen Juechen who was closing the distance to him like a beast.
Floating Cloud City, Xiao Clan.
Number One Under Heaven was floating in the air, looking to the east silently. To normal citizens of Floating Cloud City, the explosive bursting and ripping sounds were just strange sounds in the distance, but he knew that, behind every sound, shocking power was hidden.
"The fight has been going on for four whole hours," Number One Under Heaven lowered his eyebrows and said in a low voice. "Brother Yun was even able to wound Duke Huai in one strike with his sword… to think that the strength of that young Fen Juechen had actually reached such a shocking degree!"
"And he is not someone from the Sacred Grounds!"
"Four hours have passed, yet it is still so intense… so scary." Number Seven Under Heaven's two hands subconsciously wrapped around her stomach as she felt frightened for the baby in her womb.
"Big Brother is strong, he will definitely not lose." Xiao Yun yelled confidently, yet his voice was trembling a little.
"Little Aunt… don't worry. Nothing will happen to Big Brother Yun. Even if he can't beat Fen Juechen, he can use the profound ark and come back immediately," Feng Xue'er continuously comforted Xiao Lingxi… because Xiao Lingxi's aura had been chaotic this entire time. Her expression had yet to relax for a moment, and her face was filled with worry, terror, and fear. Her forehead had also become covered with a fine layer of sweat.
Xiao Lingxi's hands had been gripping Feng Xue'er's snow robe very tightly. She begged once again, "Xue'er, please bring me over there… I am so worried, I…"
"Big Brother Yun, he… he will definitely be safe," Feng Xue'er said, comforting her. Then she bit her lips softly. In her heart, she was not any less worried than Xiao Lingxi. On top of that, she had heard Yun Che himself say that… he was not an opponent for Fen Juechen.
"Nothing bad can happen to Little Che, the same goes for Big Brother Fen… both are them have to be safe! Fen Juechen really isn't a bad guy. He even saved me twice! If he was killed by Little Che, I will never have any peace of mind again… I must go and stop them… They have already fought for so long, it's enough!"
Xiao Lingxi's voice trembled as she began to panic. The sounds coming from the east clearly described just how cruel and violent the fight of hatred had become. It was probable that the battle between Fen Juechen and Yun Che would only stop when one of them died.
If Yun Che died, she would no longer want to live. However, if Fen Juechen died, it would similarly be hard for her to accept.
"But… but I promised Big Brother Yun. I need to listen to Big Brother Yun's words," Feng Xue'er panicked and shook her head.
At this moment, the oppressive sounds of explosive combat from the east suddenly stopped. Even after a long time, it didn't resume. The faint oppressive force they felt, from the battle that was hundreds of kilometers away, had even disappeared at this time.
"Ah? Is it finally… over?" Xiao Yun said in a low voice, and at the same time everyone's expressions became serious.
Since the fight had lasted a full four hours, it was impossible for them to predict just how tragic the outcome would be.
Feng Xue'er hurriedly picked up her sound transmission jade and asked in a very nervous tone, "Brother Yun, are you okay? Did you beat him?"
Each breath after the transmission felt suffocating as they waited for a response. However, Yun Che's voice quickly transmitted back.
"Rest assured, I am fine. After all, there's no way anything would happen to me. You all don't need to worry at all… I will return in another two hours at most…"
Yun Che's voice was very relaxed and full of confidence. A faint chuckle could seemingly be heard as well.
At that instant, everyone felt relieved.
Profound Sky's Eastern Ocean.
Yun Che slowly put away his sound transmission jade, then coldly looked at Fen Juechen in front of him. Yun Che's hair had become completely disheveled, and there were no longer any clothes covering his body. Other than the corners of his mouth, no blood was visible on his body. However, his body was covered in black marks from where his flesh had been charred. He was breathing heavily… but he was in far better condition than Fen Juechen.
Fen Juechen had stopped attacking, but his eyes were still wolflike. His chest intensely heaved up and down as if it could explode at any time. The aura surrounding his body was much weaker than it was at the beginning, but the despair, violence, coldness, and killing intent still remained.
"You… are… purposely… consuming my… strength!" A bloody light flashed through Fen Juechen's pitch-black pupils.
Fen Juechen was proud and self confident. Furthermore, he held extreme hatred and murderous intent for Yun Che. Thus, it had been very easy for Yun Che to enrage him and cause him to attack in a wild rage. As he attacked and failed, it had only made him even more angry… These four hours, he had madly attacked Yun Che constantly, and the profound energy surrounding his body had decreased by more than sixty percent!
As for Yun Che… his profound energy had decreased by less than thirty percent!
The sword strike just now had churned up huge waves in a three kilometer radius. When the cold seawater descended, it had drenched Fen Juechen's entire body, shocking him as the chill assaulted his mind. However, this had also cleared up his mind, causing him to suddenly realize Yun Che's true intention.
Yun Che remained calm as he said with smile, "Right. In the end, you managed to see through it after all. However, it took you a full four hours of battle to realize this, you truly cannot be considered intelligent."
Fen Juechen scoffed, and the pitch-black sword in his hands made terrifying sounds, "The current you is just garbage that must die! No matter what mind games you use today, you can stop thinking about leaving here alive!"
"My, my, looks like even saying you are not intelligent is flattering you." Yun Che's expression was a relaxing, slight smile, "I only defended without attacking during these four hours of your continuous attacks, but I am not dead and they didn't cause a serious injury. Even an idiot should understand by now that, with my movement skill and speed, you wanting to kill me now… is simply foolish nonsense!"
Earlier, when Fen Juechen had gone entirely the offensive, his strength and momentum had both been frightening, but Yun Che now had Fen Juechen completely figured out. Fen Juechen's movement skills and speed were undeniably at least level below him!
Long before this battle, Yun Che had decided to use this method to deal with Fen Juechen. He believed in his superior movement skills and speed and hoped that they would give him an advantage… Currently, it seemed that not only did this advantage exist, it was also greater than he had expected.
Now that Fen Juechen had noticed it, he naturally couldn't continue doing so. Yun Che also had never any intention of remaining on the defense without any sort of retaliation either.
Clang!!
Red light flickered, and the Heaven Smiting Sword was in Yun Che's hands once again. At that instant, under the incomparably tyrannical aura of the sword, the ocean's waves and howling wind died down, as if they had been frozen still. An indifferent smile emerged on Yun Che's face as he coldly sneered and said in a low voice, "Not only that, today, the one who will not be leaving here alive… is you!!"
This Chapter's Teaser


text:
package actions;

import gl.GLCamRotationController;
import gl.GLUtilityClass;
import util.Calculus;
import actions.algos.Algo;
import actions.algos.BufferAlgo1;
import actions.algos.SensorAlgo1;
import android.hardware.SensorManager;
import android.view.MotionEvent;

/**
 * This is nearly the same like {@link ActionRotateCameraBuffered} (same values)
 * but without buffering in the update thread. This class is just for testing so
 * it is depricated and might be removed soon.
 *
 * @author Spobo
 *
 */
@Deprecated
public class ActionRotateCameraBufferedDirect extends Action {

	private GLCamRotationController myTargetCamera;

	public Algo magnetAlgo;
	public Algo accelAlgo;
	public Algo orientAlgo;
	public Algo accelBufferAlgo;
	public Algo magnetBufferAlgo;
	public Algo orientationBufferAlgo;

	private float[] myAccelValues = new float[3];
	private float[] myMagnetValues = new float[3];
	private float[] myOrientValues = new float[3];

	private boolean accelChanged;
	private float[] myNewAccelValues;
	private boolean magnetoChanged;
	private float[] myNewMagnetValues;
	private boolean orientationDataChanged;
	private float[] myNewOrientValues;

	private float[] unrotatedMatrix = Calculus.createIdentityMatrix();
	private float[] rotationMatrix = Calculus.createIdentityMatrix();

	private float timeDelta;

	public ActionRotateCameraBufferedDirect(GLCamRotationController targetCamera) {
		myTargetCamera = targetCamera;
		accelAlgo = new SensorAlgo1(0.1f);
		magnetAlgo = new SensorAlgo1(1.4f);
		orientAlgo = new SensorAlgo1(0.005f);// TODO find correct values

		accelBufferAlgo = new BufferAlgo1(0.1f, 4f);
		magnetBufferAlgo = new BufferAlgo1(0.1f, 4f);
		timeDelta = 0.02f;
	}

	@Override
	public boolean onTouchMove(MotionEvent e1, MotionEvent e2,
			float screenDeltaX, float screenDeltaY) {
		myTargetCamera.changeZAngleBuffered(screenDeltaY);
		return true;
	}

	@Override
	public synchronized boolean onAccelChanged(float[] values) {

		if (accelAlgo != null)
			myNewAccelValues = accelAlgo.execute(values);
		else
			myNewAccelValues = values;
		accelChanged = true;
		calc();
		return true;

	}

	@Override
	public synchronized boolean onMagnetChanged(float[] values) {
		if (magnetAlgo != null)
			myNewMagnetValues = magnetAlgo.execute(values);
		else
			myNewMagnetValues = values;
		magnetoChanged = true;
		calc();
		return true;

	}

	@Override
	public synchronized boolean onOrientationChanged(float[] values) {
		if (orientAlgo != null)
			myNewOrientValues = orientAlgo.execute(values);
		else
			myNewOrientValues = values;
		orientationDataChanged = true;
		calc();
		return true;

	}

	private void calc() {
		if (magnetoChanged || accelChanged || orientationDataChanged) {
			if (magnetoChanged || accelChanged) {
				// if accel or magnet changed:
				if (accelChanged) {
					accelChanged = false;
					if (accelBufferAlgo != null)
						accelBufferAlgo.execute(myAccelValues,
								myNewAccelValues, timeDelta);
					else
						myAccelValues = myNewAccelValues;
				}
				if (magnetoChanged) {
					magnetoChanged = false;
					if (magnetBufferAlgo != null)
						magnetBufferAlgo.execute(myMagnetValues,
								myNewMagnetValues, timeDelta);
					else
						myMagnetValues = myNewMagnetValues;
				}
				// first calc the unrotated matrix:
				SensorManager.getRotationMatrix(unrotatedMatrix, null,
						myAccelValues, myMagnetValues);
			} else if (orientationDataChanged) {
				orientationDataChanged = false;
				if (orientationBufferAlgo != null)
					orientationBufferAlgo.execute(myOrientValues,
							myNewOrientValues, timeDelta);
				else
					myOrientValues = myNewOrientValues;
				GLUtilityClass.getRotationMatrixFromVector(unrotatedMatrix,
						myOrientValues);
			}

			// then rotate it according to the screen rotation:
			SensorManager.remapCoordinateSystem(unrotatedMatrix,
					SensorManager.AXIS_Y, SensorManager.AXIS_MINUS_X,
					rotationMatrix);

			myTargetCamera.setRotationMatrix(rotationMatrix, 0);
		}
	}

	@Override
	public boolean onReleaseTouchMove() {
		myTargetCamera.resetBufferedAngle();
		return true;
	}

}


If you've ever wanted to freeze the action on a water droplet or create a silky effect in a running stream then listen up. Shooting water is one of the most enjoyable and challenging ways to photograph really interesting natural photography. The loveliest thing about shooting water is that you can produce different effects every time you shoot. Some of these effects can be soft and flowing while other effects can be dynamic and commanding. It all is dependent on your light and your shutter.
In order to get a clear photograph of your water photograph you need to have the accurate level of light. Because most flowing water images are done outdoors you will have to prepare yourself for different weather. You will also need to be able to work with natural light in an effective way. Let's take a fountain for example. Fountains in the city can supply beautifully creative shots. We can try to take photos of them two ways. We can shot the motion of the water to give the appearance like a silky-smooth ribbon. Alternatively, we can shoot the flowing water so we see every drop.
These two things depend a lot on your shutter speed. A speedy shutter means that you can stop the action. This means that you will be able to spot every droplet of water poised in the air as it shoots out to the fountain. To do so, you need a large amount of light so that you can have a fast shutter. A slow shutter speed means that you can slow the speed of motion. This produces what is called a silken effect. A silken effect is where your shutter speed slows down and the water seems like it is streaking across your shot. You also need to carefully watch your light so that you do not over expose your photograph. So how does this become applicable?
Let me go into more detail. The longer you have your shutter open, the more light enters the sensor. It works the other way, too. The quicker your shutter speed, the less light that you have to work with. You must find the balance between what outcome you want to create and your lighting. For example, you wanted to photograph the water fountain on an dull day. Perhaps there are clouds approaching and producing some overcast light. You already have in mind that you want to stop the motion of the water so you can see each separate water drop. You know that you need a fast shutter speed to do this, but there is not much daylight in the scene. So how do you get a fast shutter speed so you can stop motion and be able to get just the right amount of light?
You would choose a very high speed of the shutter—1/8000 of a second may be your favorite. However, you see that the camera is telling you that to capture at the speed you are going to have a very underexposed and dark photo. This will not suffice at all, therefore you select a wide aperture. Remember, a wide aperture will blur your background. This might be okay given the situation. So, consequently, you choose f/4. An aperture this large will let a lot of daylight in.
You have set your shutter at 1/8000 of a second and f/4 as your aperture, but now there is another setback. The camera's light meter is suggesting you are still not getting sufficient lighting. Is there something else you can do? Of course there is!
This is where your ISO comes in. Your ISO is the light sensitivity. When you do not have enough light you can increase your ISO. When you take pictures in auto mode, the camera will choose the ISO for you. But, when shooting in manual you have to decide it yourself. If you're shooting fast moving water on an cloudy day, opt for a higher ISO. A high ISO is like getting another two or three f-stops of light. Even though you might not be able to get extra light through your manual setting, you can get additional light by increasing the ISO.
Now, what about the silken effect? You will not have to use a very high ISO if you want the silken effect on a gray day. However, if you are photographing water in a dim forest you may still have to boost your ISO.
Your ISO is a clever function that gives you more light. Keep in mind the key to images of moving water is light and shutter speed. Your shutter captures the movement of water, your aperture and ISO can take care of the light for you.
In agreement with this, photographing water is so much fun, I am enjoying trying all different combos of shutter speed, apterture and ISO, plus dialling down (or up) the exposure compensation. I've also used ND filters from time to time. Half the fun is in the experimenting for me. And having the EXIF data readily available helps to know which settings work – I was going to say 'best' but that's a very subjective word. Sometimes I'm after capturing the droplets of water escaping, other times I want the silken veil effect.
Thank you for this information, I am totally new to photographing. Enjoy reading it.
Thank you for using one of my photos in your article I am very flattered.


text:
"For too long people have been leaving villages and small towns across rural Scotland, because they could not find a house they could afford to live in, or were repeatedly evicted," says Ailsa Raeburn, chair of Community Land Scotland which today publishes a new report on community led housing written by David Ross.
"In the fight against such depopulation, communities the length and breadth of rural Scotland have been coming together to build and manage their own affordable housing," she continues.
These homes are low cost, highly energy efficient which means low heating bills, and aimed at helping people stay in their local area, and attracting back local people to return home, particularly young families.
"Home Delivery – Community Led Housing in rural Scotland" charts the success of the very many rural communities who have bought the land and raised the funds to build the required affordable housing over the last 5 years of the Scottish Government's Rural and Islands Housing Fund. And Community Land Scotland is calling for that fund to continue beyond March 2021 when its current version is due to end.
"This type of development is always about more than numbers – whether the size of the community or the number of houses built," continues Ailsa Raeburn. "We have seen time and again that a very small number of houses can make a huge difference to our most economically fragile rural communities. Community housing is an integral part of empowering communities and that is fundamentally about ensuring that land and other assets are owned and used in the public interest and for the common good."
Minister for Local Government, Housing and Planning Kevin Stewart said: "It has been inspiring to read more stories of rural communities coming together to build affordable, energy-efficient homes that offer tenants and owners long-term housing security."
"Many have had the support of the £30 million Rural and Islands Housing Funds. This is part of our record investment of more than £3.5 billion over this parliamentary term that funds our Affordable Housing Supply Programme, which has delivered around 4,800 affordable homes in these communities over the past four years.
The development of two houses at Ulva Ferry on Mull brought two young families to that community, four working age residents and six children to the local school. The school stayed open and equally importantly the community was given the confidence to go on and build four more affordable houses which are now under construction and being advertised to let.
Three passivhaus-designed homes in Closeburn, Dumfries and Galloway are the first to be community owned in Scotland. Such houses are completely airtight, heavily insulated using very little energy for heating and cooling. This is important in an area with high levels of fuel poverty. Nith Valley LEAF Trust hope their model might be used elsewhere in Scotland.
Ailsa Raeburn continues: "access to safe and warm housing at prices local people can afford is a real issue in lots of parts of Scotland. In rural areas, especially popular holiday destinations, increasing numbers of houses are being turned into holiday homes and short-term lets. This new report by David Ross highlights the devastating personal impact this can have, with local youngsters living in caravans for years and young families being evicted multiple times. Community landowners are seeing this on their doorstep and are committed to finding a solution."
Andrew Thin, chair of the Scottish Land Commission told CLS in the report: "With large housebuilders largely inactive in rural Scotland we need to support other providers and promote new delivery models. Support organisations have a vital role to play here. Scotland has the skills needed to do this and they need to be brought together from across the sector to effectively deliver the housing."
The 205 new homes listed in the report from all across Scotland showcase a range of community led developments all supported by the Scottish Government's Rural and Islands Housing Fund. They include many completed homes, a health centre and business units in Staffin in Skye and the refurbishment of a derelict hotel site In Whithorn, Dumfries & Galloway to create four family homes. A further 200 houses are now in the pipeline in some of the most remote and fragile communities in Scotland.
Kevin Stewart added: ""Each of these new homes can have a significant impact. For example, the Rural and Islands Housing Funds supported a 12-house development in the village of Drumnadrochit that has allowed older residents to live independently, with support from a nearby day centre – an inspiring project created by the community themselves.
"The Scottish Land Commission recently described the Rural and Islands Housing Funds as 'game changers', and Mr Ross's research further shows just how much the funds have helped to facilitate housing development in rural Scotland."
Hugh Ross is from the Staffin Community Trust at Trotternish on Skye. The island with a population of 10,000 has particular pressure on its housing stock. Research for the Scottish Government last year found that almost 20% of all dwellings on Skye were available for holidays through Airbnb. Hugh says: "some 23 townships make up the district of Staffin. You could argue the loss of 40 people amounted to the one whole township leaving."
"We refused to sleepwalk into becoming a retirement village dominated by holiday accommodation. Our project would have not happened without the Rural and Islands Housing Fund. It is a project that is vital to Staffin as we haven't had affordable houses here for 21 years. This development will see seven families secure homes, bolster our schools roll, provide a modern heath centre and new business opportunities in Skye and Lochalsh's most economically fragile community. The sound of children playing in the gardens will be a very welcome noise – that of a community with a bright future."
Dr Calum Macleod, policy director Community Land Scotland said: "It's clear from the case studies in the report that the initial affordable housing proposals often act as a catalyst for wider community regeneration."
He continues: "This includes enabling housing development by social landlords, development of market housing and creation of self-build plots as well as indirectly supporting delivery of other essential services including schools, healthcare, local shops and business facilities, thereby safeguarding existing jobs and creating new ones. Community led housing projects make a vital contribution to the sustainable local development and repopulation of our rural communities and areas. It's therefore essential that the Rural Islands and Housing Fund is retained after next Scottish Parliament election in in May 2021."
See our briefing to MSPs on the report here: https://www.communitylandscotland.org.uk/cls-briefing-for-msps-community-led-housing-in-rural-scotland/
"RT @kirstyMTait: Exciting opportunity to be part of the future of our High Streets here ⬇ Many towns and city neighbourhoods will be watch…"
"RT @CommunityWoods: We've just sent out our January e-bulletin with all the latest news, funding, events & guidance for community woodlands…"
"RT @KWheelArt: Power to the people...@midstquarter is part of a new way of living, working, learning and developing our urban places. One f…"
"RT @SoSCommHousing: Today @midstquarter have launched a crowdfunder to help bring three empty buildings into community ownership. The prop…"
"RT @NorthernCorrid1: We're looking for volunteers for a couple of signage projects, that can be worked on remotely. 2 heritage info boards…"


This charming and beautiful 51 square meters , 1 Bedroom with South exposure, apartment is located on rue Ordener in the 18th arrondissement, on the 5 th French floor of a 20th century walk up building and it sleeps 2 people. This apartment is equipped with : washer, cable, TV, unlimited high speed internet access with the wifi, balcony, decorative fireplace.
The 20th century walk up building is equipped with : intercom, security code.
The entrance hall leads directly to :kitchen, living room and is equiped with hard wood floor.
The living room has a double glazed window facing street and leading to the balcony . It is equipped with : sofa, coffee table, cable, TV, 2 armchairs, hard wood floor.
The separated eat in kitchen has a double glazed window facing courtyard . It is equipped with : breakfast table for 3 people, fridge, freezer, gas burner, oven, microwave, coffee maker, kettle, toaster, and all kitchen utensils, tiled floor.
The dining room has a double glazed window facing street and leading to the balcony . It is equipped with : dining table for 6 people, decorative fireplace, hard wood floor.
The bedroom has a double glazed window facing street and leading to the balcony . It is equipped with : double bed (1.40m), built-in wall closet, hard wood floor.
The bathroom has a double glazed window facing courtyard . It is equipped with : washbasin, shower, towel dryer, washer, tiled floor.
Here is the nice balcony with South exposure equiped with a table and 2 chairs with a view of Montmartre Sacré Coeur.
Here is the view from the balcony of Montmartre Sacré Coeur.


text:
Black Students More Likely to Be Arrested at School
By Evie Blad & Alex Harwin — January 24, 2017 13 min read
School-based police officers Danny Avalos, foreground, and Craig Davis, center, monitor a hallway at E.L. Furr High School in Houston in 2013.
Michael Stravato/The New York Times-File
In 43 states and the District of Columbia, black students are arrested at school at disproportionately high levels, an analysis of federal data by the Education Week Research Center finds.
And one reason may be that black students are more likely than students in any other racial or ethnic group to attend schools with police, according to the analysis of 2013-14 civil rights data, the most recent collected by the U.S. Department of Education.
In most of the jurisdictions with disproportionate arrests of black students, the disparities are significant. In 28 states, the share of arrested students who are black is at least 10 percentage points higher than their share of enrollment in schools with at least one arrest. In 10 of those states, that gap is at least 20 percentage points.
No other student racial or ethnic groups face such disparities in as many states.
In Virginia, black students make up 39 percent of the enrollment in public schools with at least one arrest but 75 percent of school-based arrests. In Louisiana, black students comprise 40 percent of enrollment in schools with at least one arrest but 69 percent of students arrested at school.
Students from other racial and ethnic groups are also arrested at disproportionate rates in a smaller number of states. In Connecticut, for example, Hispanic students make up 25 percent of enrollment in schools with arrests but 35 percent of students arrested at school. And in Arizona, Native Americans comprise 8 percent of enrollment in schools with arrests, but 23 percent of students arrested.
Nationwide, black boys are at the highest risk, three times as likely to be arrested at school as their white male peers. And African-American girls fare little better: They are more than 1.5 times as likely as white boys to be arrested, the analysis shows.
Browse the Data:
Which Students Are Arrested The Most at School? (U.S. Data by School)
Which Schools Have Police?
In four states with disproportionately high arrest rates for black students, the gap between their representation in overall enrollment and in the share of students arrested is quite narrow—within 3 percentage points. In these states, black students make up a relatively low share of overall enrollment.
Nationwide, about 8,000 schools reported a total of nearly 70,000 arrests in the 2013-14 school year. Black students were more likely than their white peers to attend a school where arrests occurred. When black students' share of arrests is compared to their overall enrollment in all schools, the disparities are even more severe.
And rates of student referrals to law enforcement show similar patterns of racial disparities at the state and national levels. Nationwide, black students made up 17 percent of enrollment in schools that referred students to law enforcement, but were 26 percent of students who were referred, the analysis found. Referrals, which are more common than arrests, are broadly defined as any time a student is reported to any law enforcement agency or official "regardless of whether official action is taken," according to the federal data set. Referrals can include citations, court referrals, and, in some cases, arrests.
All of these findings mirror a host of persistent disparities for students of color, including higher rates of school suspensions, less exposure to experienced educators, and lower likelihood of access to rigorous coursework.
There is disagreement in the research and policy worlds about why certain groups of students are arrested at higher rates. Differences in local approaches to school safety and in exposure to out-of-school factors such as poverty and crime are among the reasons cited.
But civil rights advocates say students of color often bear the brunt of overly punitive zero-tolerance policies and state laws that can lead to arrests for relatively minor misbehavior, such as vandalism or classroom arguments.
And the presence of police in schools, such advocates say, makes arrests and referrals more likely, with results that can derail students' lives.
"Far too often when police are consistently present in black and brown communities, they criminalize behavior they wouldn't in other places," said Allison Brown, the executive director of the Communities for Just Schools Fund and a former lawyer for the U.S. Department of Justice.
"Especially for young people, that is just devastating to their chances for success," she said.
A New Era for School Policing
Overall, student arrest and referral rates are relatively low compared to other forms of school discipline. Education Week's analysis found that the arrests documented in 2013-14 represent less than one-tenth of a percent of students nationwide. In the same year, schools reported 223,000 referrals. The federal data do not specify why students were arrested or referred to law enforcement.
The findings come as debates about the role of police in schools—and communities—enter a new era.
Student Arrests: Browse U.S. Data by School
Which students are arrested most in school? Use our data tool to explore student arrest rates and referrals to law enforcement at national, state, and local levels.
SOURCE: Education Week Research Center original analysis of Civil Rights Data Collection, 2017
While some civil rights and student groups argue that police don't belong in schools at all, some school leaders, parents, and police groups say they are necessary for security. Problems, they argue, can be avoided through proper hiring and training practices for school-based officers.
In the 2013-14 school year, schools reported 44,000 part-time and full-time onsite law enforcement officers, another set of federal data show. Researchers say the presence of officers in schools has increased in the wake of high-profile shootings—such as those at Columbine High School in Colorado and Sandy Hook Elementary School in Connecticut—that stoked widespread public fears.
Among 90,000 public schools, 29 percent reported at least one law-enforcement officer in 2013-14, Education Week's analysis showed. That includes 46 percent of high schools, 42 percent of middle schools, and 18 percent of elementary schools.
Very little is known about school resource officers, typically the label given to police who work in schools—such as their backgrounds, their training, and the policies that govern their interactions with students. Only 12 states require specialized training for officers who work the school beat, according to a 2015 study by the American Institutes for Research.
Against that backdrop, President Barack Obama's administration used its megaphone to draw attention to concerns that had guided the work of advocates at the state and local levels for years. The Obama administration attached new strings to federal grants used to hire school police—requiring schools to clearly define when officers should intervene with students and to set training requirements.
The U.S. departments of Education and Justice delivered in 2014 their strongest message about what activists call the "school-to-prison pipeline." The agencies put schools on notice that their discipline policies and practices may violate federal civil rights laws if they lead to disproportionately high rates of arrests or suspensions for some racial groups, even if those policies weren't written with discriminatory intent.
And districts must ensure that school-based officers don't violate students' civil rights—whether they are employed directly by the district or contracted through local police, the agencies said.
"A routine school disciplinary infraction should land a student in the principal's office, not in a police precinct," then-Attorney General Eric Holder said.
Conservative federal lawmakers pushed back against those warnings, however, saying that stance would force schools to avoid disciplining some students.
Before the public has had the chance to see whether those efforts—and parallel efforts in states and districts—have eased disproportionate discipline rates, President Donald Trump's administration will begin implementing policies of its own. Trump's team of advisers and Cabinet nominees have signaled plans to roll back the aggressive civil rights stance of the Obama years. On the campaign trail, Trump, who pledged to be a "law and order president," singled out largely black communities as dysfunctional and unsafe and cited school shootings as a reason to ease gun restrictions and increase security in schools. And in his first week in office, he seems intent on carrying out that pledge. The White House website includes an issue page on "standing up for our law enforcement community" that says: "The dangerous anti-police atmosphere in America is wrong. The Trump Administration will end it."
Trump's education advisers have suggested the new administration will scale back the Education Department's office for civil rights, which led much of the Obama administration's work on intervening in districts with uneven discipline rates.
Debates over police in schools have run parallel to those about police on the street: In both settings, cellphone videos of violent encounters have spread quickly on the internet and fueled controversy.
Police shooting deaths of African-Americans, most of them unarmed, in communities across the country set off national protests and spawned a new movement of civil rights activism calling for dramatic changes to law enforcement and criminal justice. That movement helped accelerate momentum for changes to school discipline and safety.
But since Trump was elected, advocates have grown concerned about other issues, like climate change, said Phillip Goff, the president of the Center for Policing Equity at the University of California, Los Angeles.
"On November 9, policing in general went from the number-one domestic policy issue in the United States to the number-five issue overnight," he said.
The federal data used in Education Week's analysis was collected from nearly every public school in the country a few months before Michael Brown, an unarmed black 18-year-old, was shot and killed by a white police officer in the St. Louis suburb of Ferguson, Mo.
That encounter thrust into the broader public consciousness long-held concerns and anger in black communities about racial bias and inequities in policing and other institutions.
Similarly, scrutiny of the role of police in schools has accelerated since the public watched bystander videos that showed a South Carolina school resource officer dragging a girl from her desk after she refused to surrender a cellphone; a Baltimore officer who kicked and slapped a student accused of trespassing; and other hastily captured images of black and Hispanic students who were tackled, pinned down, and arrested at school, sometimes for minor offenses.
Black Students More Likely to Be in Schools With Police
Other high-profile incidents that weren't caught on video have also heightened concerns about unjust or overzealous policing of students.
In Prince William County, Va., a 14-year-old boy was arrested on charges of disorderly conduct and petty larceny last fall after a school-based officer accused him of stealing a carton of milk. The boy, who qualified for free lunches, said he had gone back to the cafeteria cooler to get the milk after he forgot to pick one up when he first went through the serving line.
In Kansas City, Mo., the ACLU filed a federal lawsuit on behalf of the family of a 7-year-old boy who was handcuffed by a school resource officer for disrupting his elementary school. The boy was crying loudly in response to a bullying incident, the lawsuit said, and an officer handcuffed the boy when he refused to follow directions.
In Alabama, a federal judge said Birmingham school officers used unconstitutionally excessive force when they sprayed students who were not resisting arrest or posing a threat to others with a mix of pepper spray and tear gas at school. In one of those instances, an officer sprayed a pregnant student who was already restrained with handcuffs. The judge ruled that in some other incidents the pepper-spraying was justified.
While violent interactions draw the most attention, advocates say their concerns about police in schools extend beyond those incidents and arrest rates, and into areas that data can't quantify.
Measures like security cameras and police presence in schools have effects on students' experiences that haven't been fully documented, they say.
And what federal data don't show are the daily, incidental interactions between officers and students in hallways, at metal detectors at school entrances, and in searches of students' bags and lockers, those groups say.
The data also don't show what schools lose out on when they channel funds toward law enforcement that could be spent on school counselors, social workers, and other student-support measures, those groups say. For example, an analysis of the 2013-14 civil rights data by the Education Department found that 1.6 million students attended schools with police but no school counselors and that those students were more likely to be Hispanic or black.
And, because students of color are more likely than their white peers to attend schools with on-site officers, policies related to those officers have become an equity issue, said Brown, of the Communities for Just Schools Fund.
Education Week's data analysis found that 74 percent of black high school students attend a school with at least one on-site law enforcement officer, compared with 71 percent of both Hispanic and multiracial high school students, and 65 percent of both Asian and white high school students.
The disparity is more pronounced at the middle school level, where 59 percent of black students attend schools with law enforcement, compared with 49 percent of both Hispanic and multiracial students, 47 percent of white students, and 40 percent of Asian students.
A 2016 study published in the Washington University Law Review found that students were more likely to be referred to law enforcement for offenses like threats, fights, vandalism, and theft at schools with law-enforcement officers who were on site at least weekly. That remained true even after authors controlled for factors like state laws that require schools to report certain issues to law enforcement, levels of criminal activity and disorder, neighborhood crime, and demographic variables.
School Police Need Proper Training
Supporters of school police say the incidents documented in viral videos are outliers and don't represent the behaviors of most school resource officers. They argue that proper training and better vetting of officers in the hiring process can prevent such incidents from occurring.
Schools also need to set clear limits for officers on what types of incidents they can and can't get involved with, said Mo Canady, the executive director of the National Association of School Resource Officers, which provides officer training.
NASRO has repeatedly taken the public position that officers should not be involved in school discipline. And racial and ethnic disparities in school arrest rates mirror disparities in law enforcement as a whole, the organization has said.
Law-enforcement agencies shouldn't treat schools as a regular beat rotation without considering whether officers have the desire and knowledge to work in such a distinct setting, Canady said.
"I don't care where the officer is coming from," he said. "They shouldn't be placed in there just for the sake of having someone there. That's a mistake."
There's a difference between a general law-enforcement officer who works in a school and a school resource officer who has received additional training to work with students, even though the term is often used colloquially to refer to all school-based officers, Canady said.
NASRO's training follows the "triad model," which teaches officers how to serve in three roles in schools: as law-enforcement officials, as educators who teach students about subjects like the criminal-justice system or drug prevention, and as informal counselors and mentors for students. Such training is necessary, Canady said, to understand how students with disabilities interact with law enforcement, how to de-escalate conflict, and how teenagers' brain development influences their behavior and impulse control.
In 2013, when Canady testified before a congressional committee after the Sandy Hook shootings, a lawmaker asked him if more schools should have school resource officers.
"We're not calling for more police in schools," Canady said. "What we're asking for are the ones who go into schools to be properly trained."
Evie Blad
Staff Writer, Education Week
Evie Blad is a reporter for Education Week who covers education politics and policy.
Alex Harwin
Research Analyst, EdWeek Research Center
Alex Harwin is a quantitative research analyst for the EdWeek Research Center.
Research Black Students Discipline Diversity School Safety
Education Week Research Center intern Coral Flanagan contributed to this report.
A version of this article appeared in the January 25, 2017 edition of Education Week as Black Students Most Likely to Be Arrested at School
Policing America's Schools
School resource officer Derrick Hammond greets senior Kemari Averett at Grady High School in Atlanta.
Melissa Golden/Redux for Education Week
School Climate & Safety Atlanta Schools Start Over With Police
Evie Blad, February 7, 2017
Toy Vixayvong, a school resource officer at Como Park High School in St. Paul, Minn., keeps an eye on students in the commons area as they move between classes late last year.
Ackerman + Gruber for Education Week
School Climate & Safety A Fight to Build Trust With School Police
Daarel Burnette II, February 1, 2017
School Climate & Safety Video 'It's Never a Pretty Situation': A Student's Controversial Arrest, Analyzed
School Climate & Safety Obama Administration to Schools: Clear, Limited Roles for Police
Evie Blad, September 9, 2016
A series of screen grabs from video taken by a Spring Valley High School student last year shows Ben Fields, a sheriff's deputy, forcibly removing a student from her desk after she refused to leave her high school math class in Columbia, S.C. Fields was fired, the U.S. Department of Justice is investigating, and the incident has sparked an effort in South Carolina to change a state law that can lead to students being arrested for behavior that is not considered a crime off school grounds.
AP Photos
School Climate & Safety State Laws That Can Lead to School Arrests Targeted for Change
Evie Blad, January 26, 2016
Joseph Fox, a school resource officer in the Shelby County Sheriff's Department, wears a personal body camera while on duty at Southwind High School in Memphis, Tenn. A growing number of school-based police are being equipped with the recording devices.
Stan Carroll/The Commercial Appeal/Zuma
School Climate & Safety Body Cameras on School Police Spark Student Privacy Concerns
Evie Blad, March 3, 2015