SPARQL Grouping and Aggregation with no matches
Andy Seaborne
March 2020
Grouping and Aggregation is the combination of GROUP BY
and one of the
aggregation functions such as COUNT
or MAX
. When there are no matches to
the WHERE
clause, the spec and one of the original working groups tests don’t
agree. In the case of aggregation and no GROUP BY
, the spec needs a fix to get
the expected answer.
- Description
- Grouping and Aggregation, no matching rows
- Aggregation, no grouping, no matching rows
- Spec text
- Execution when grouping has no rows
- The “no group” case
- Possible Fix, “no group” case
Description
Informally, what happens in grouping and aggregation is that the matches from
the WHERE
clause are paritioned by calculating the group key from the GROUP BY
expression for each row , with each row going into a collection of rows with
the same group key. We end up with a dictionary mapping group key to a
collection of those rows with the same group key. Each grouping of rows has at
least one row in it because to create dictionary entry a row with that group key
must have been encountered.
When there is aggregation, the aggregation function (COUNT
, MAX
, etc) is
called on each dictionary entry with the collection of rows as argument.
If there are no rows as a result of the WHERE
clause, there are no pairs of
group key row collection.
There is a special case of aggregation when there is no GROUP BY
but there is
an aggregate function. All the rows are collected together with a special group
key of 1
. The dictionary has one entry.
There is a problem in the specfication here - it puts in a special GROUP BY
expression but when there are no rows from the WHERE
clause, it does not get
called. A possible solution is given below.
From this we can see that:
- When group+aggregate, there are the same number of rows as the grouping alone.
- If there is aggrgation and no group, there is one row in result.
Grouping and Aggregation, no matching rows
GROUP BY
, and GROUP BY
with aggregation have the same number of rows.
There is a disprepency between the SPARQL tests and the specification. The test aggregates-agg-empty-group runs on an empty graph.
PREFIX ex: <http://example.com/>
SELECT ?x (MAX(?value) AS ?max)
WHERE {
?x ex:p ?value
} GROUP BY ?x
Beause it is an empty graph, the WHERE clause has zero rows, and the group step is zero rows.
But the results are given as:
<sparql xmlns="http://www.w3.org/2005/sparql-results#">
<head>
<variable name="x"/>
<variable name="max"/>
</head>
<results>
<result> </result>
</results>
</sparql>
which is one row, with no values, not zero rows.
-----------
| x | max |
===========
| | |
-----------
(the original test results
have no <variable name="x"/>
- that’s corrected in test manifest with these results.)
It should be:
-----------
| x | max |
===========
-----------
that is, zero rows, because
SELECT ?x
WHERE {
?x ex:p ?value
} GROUP BY ?x
has zero rows, the grouping is an empty dictionary (no group keys), and
(MAX(?value) AS ?max)
is not called at all.
Aggregation, no grouping, no matching rows
Compare with the case where there is no GROUP BY
SELECT (MAX(?value) AS ?max)
WHERE {
?x ex:p ?value
}
-------
| max |
=======
| |
-------
where there is supposed to be one row.
Which aggregate is used shouldn’t affect the number of rows, and MAX({})
is
defined to be an evaluation error. The COUNT
case is clearer:
SELECT ?x (COUNT(*) AS ?count)
WHERE { ?x ex:p ?value }
GROUP BY ?x
gives
-------------
| x | count |
=============
-------------
and
SELECT (COUNT(*) AS ?count)
WHERE { ?x ex:p ?value }
gives
---------
| count |
=========
| 0 |
---------
The difference is that when there is an empty outcome from GROUP BY
, there is
an empty dictionary and the aggregation function, MAX
or COUNT
isn’t called
at all. With no GROUP BY
, there is a dictionary entry with an empty collection
of rows and the case Max({}) = error
or Count({}) = 0
covers the case of a
call where there zero rows to aggregate.
SELECT ?x
WHERE {
?x ex:p ?value
} GROUP BY ?x
and no matches of ?x ex:p ?value
is zero rows.
Spec text
These are the relevant parts of the spec and errata:
Section 18.5.1 https://www.w3.org/TR/sparql11-query/#aggregateAlgebra
Group, produces a dictionary with group key ListEval(exprlist, μ)
to (→
) rows { μ' | ...}
:
Group(exprlist, Ω) = { ListEval(exprlist, μ) → { μ' | μ' in Ω, ListEval(exprlist, μ) = ListEval(exprlist, μ') } | μ in Ω }
Aggregation, produces a dictionary group key to aggregate value:
Aggregation(exprlist, func, scalarvals, { key1→Ω1, ..., keym→Ωm } )
= { (key, F(Ω)) | key → Ω in { key1→Ω1, ..., keym→Ωm } }
Then AggregateJoin
puts the results into a query solution.
During evaluation (after errata-query-11):
eval(D(G), Aggregation(exprlist, func, scalarvals, Group(exprlist, P)))
= Aggregation(exprlist, func, scalarvals, eval(D(G), Group(exprlist, P)))
Calling the aggregate function happens within the F(Ω)
calling func
.
Execution when grouping has no rows
Executing when the grouping has no rows, we get:
Group(exprlist, Ω) = { }
because μ in Ω
is empty. Then aggregation is on the empty dictionary:
Aggregation(exprlist, func, scalarvals, { } )
= { (key, F(Ω)) | key → Ω in { } }
which is also { }
because there is no (key → Ω) in { }
.
The query result is zero rows.
If GROUP BY
produces zero rows, aggregation produces zero rows.
The “no group” case
Use of aggregates when there is no GROUP
BY is different.
In section [<IP_ADDRESS> Grouping and Aggregation}(https://www.w3.org/TR/sparql11-query/#sparqlGroupAggregate)
puts in a dummy key of (1)
(a exprlist of one element which is the value 1).
But if there are no rows for the patten matching.
Group(exprlist, { }) = { }
regardless of the exprlist
- the dictionary entry using key 1 is not created.
But we expect
SELECT (COUNT(*) AS ?C)
WHERE {
?x ex:p ?value
}
(no matches to the WHERE
) to be one row with ?C
being 0
.
If it were MAX
, then MAX({})
happens, which evaluates to an error so we have one
row, no columns.
In particular, aggrgeate with no group is not like writing:
PREFIX ex: <http://example.com/>
SELECT ?x (COUNT(*) AS ?count)
WHERE {
?x ex:p ?value
} GROUP BY (1)
which is “no rows” again.
Possible Fix, “no group” case
Somehow, “no group by, with aggregates” needs to be made special.
One way is to make “aggregate, no group” become a distinct, special case of
Group()
that creates the right dictionary.
This can be done in <IP_ADDRESS>, Step Aggregates.
We make the dummy key special marker 'group-all'
, then group all rows into
one dictionary entry, even if the row collection is empty.
This safe because 'group-all'
isn’t an exprlist and so can not be written in a
query using GROUP BY
.
We could use any marker value in place of 'group-all'
as long as it is not an
exprlist. 1
, not (1)
, would work or {}
. The group key of 1
is introduced
when Group
is evaluated as that group keys are RDF terms as before.
The only time Group('group-all', P)
appears is when there is an aggregation step
and there is no GROUP BY
.
If Q contains GROUP BY exprlist
Let G := Group(exprlist, P)
Else If Q contains an aggregate in SELECT, HAVING, ORDER BY
Let G := Group((1), P)
Else
...
becomes:
If Q contains GROUP BY exprlist
Let G := Group(exprlist, P)
Else If Q contains an aggregate in SELECT, HAVING, ORDER BY
Let G := Group('group-all', P)
Else
...
Then Group
handles the case Group('group-all', Ω)
by putting in the group key
of 1 that the spec uses:
Group('group-all', Ω) = { (1 → Ω) }
Group(exprlist, Ω) = { ListEval(exprlist, μ) → { μ' | μ' in Ω, ListEval(exprlist, μ) = ListEval(exprlist, μ') } | μ in Ω }
exprList
is never 'group-all'
so these two evaluation cases don’t overlap.


Documentation / Tutorials
Getting Started
Some words about GraphStream
GraphStream is a graph handling Java library that focuses on the dynamics aspects of graphs. Its main focus is on the modeling of dynamic interaction networks of various sizes.
The goal of the library is to provide a way to represent graphs and work on it. To this end, GraphStream proposes several graph classes that allow to model directed and undirected graphs, 1-graphs or p-graphs (a.k.a. multigraphs, that are graphs that can have several edges between two nodes).
GraphStream allows to store any kind of data attribute on the graph elements: numbers, strings, or any object.
Moreover, in addition, GraphStream provides a way to handle the graph evolution in time. This means handling the way nodes and edges are added and removed, and the way data attributes may appear, disappear and evolve.
In order to handle dynamic graphs, the library defines in addition to graph structures the notion of “stream of graph events”, which as you guessed, is at the origin of the library name. The number of events is restricted they are:
- node addition,
- node removal,
- edge addition,
- edge removal,
- graph/node/edge attribute addition,
- graph/node/edge attribute change,
- graph/node/edge attribute removal.
- step
Inside the library, a lot of components can generate such streams of events. These components are called sources. Other components can receive these events and process them, they are in fact very comparable to listeners, a concept widely used in the Java world. We call such components sinks.
When a component is able to both receive graph events (sink) and produce them (source) we call it a pipe. The graph structures in GraphStream are pipes. There are many kinds of pipes, that can act as filter, removing some events, or adding more events, or allowing to cross the network, or communicate between threads.
Here is an example of an often used pipeline:
A reader reads graph events in a file and acts as a source, producing these events in order. Its output is connected to a graph. Each time a graph receives an event it modifies its structure to reflect the effect of the event. The graph is also a source, that is connected here to a viewer. The viewer accepts the events and shows a graphical representation of the graph.
Installation
Before delving into code, it is important to quickly look at the project organisation in terms of library modules.
The most important and necessary one is gs-core. It defines the base graph
classes, the graph event streaming classes and a minimalist, yet efficient, graph rendering
user interface. The goal of this library is to remain small. This module is
contained in the file gs-core-X.Y.jar
, where X
is the major GraphStream
version, and Y
is the minor GraphStream version. This jar is
the minimal requirement.
Another important module is the gs-algo one. It provides generalist algorithms
often tied to graph libraries (shortest paths, modularity, centrality, etc.) as
well as what we call generators, that are algorithms that produce graphs with
predefined features (random, grid, scale-free, etc.). It is defined in the
gs-algo-X-Y.jar
file.
When you download GraphStream you will find these two jars in the lib/
directory. Simply include them in your classpath
.
Alternatively, you can use Maven to install graphstream and setup eclipse projects as described in the maven tutorial.
A first example
It is time to test the API. Although we emphasize on the dynamics aspects of the library, it is probably better to start with a simple static graph that we will evolve afterwards, in the following tutorials.
All graphs in GraphStream follow the Graph
interface. You import it with:
import org.graphstream.graph.*;
There exist several graph implementations, a versatile one is the SingleGraph
class. It provides a 1-graph (there can be only one edge between two nodes), that
can be either directed or undirected. In fact you can mix directed and undirected
edges inside such a graph, simply consider undirected edges as bidirectional. This
does not well cope with the mathematical definition, but is certainly easier to use
for developing. You import it with:
import org.graphstream.graph.implementations.*;
You create the graph this way:
public class Tutorial1 {
public static void main(String args[]) {
Graph graph = new SingleGraph("Tutorial 1");
}
}
There are lots of ways to populate a graph with nodes, edges and data
attributes. In GraphStream the better way is to connect a graph event producer
to the graph (such as a loader or graph generator). However the Graph
class
also provides a construction interface that allows to build the graph by
hand. This interface is mostly useful to build small examples and to experiment
with idea prototypes.
The construction API of the graph works as a factory for node and edge elements (you cannot create nodes and edges by yourself and add them in the graph, you must ask the graph to create them for you). Add the following lines after the graph declaration:
graph.addNode("A" );
graph.addNode("B" );
graph.addNode("C" );
graph.addEdge("AB", "A", "B");
graph.addEdge("BC", "B", "C");
graph.addEdge("CA", "C", "A");
As their name suggest, these methods will add three nodes and three edges between the nodes. You can see that each node or edge is identified by a string. Such identifiers must naturally be unique.
It is often useful to check the graph by seeing it, you can easily do this using
the display()
utility method:
graph.display();
This should produce a result similar to this:
Here is the full text of the above program:
import org.graphstream.graph.*;
import org.graphstream.graph.implementations.*;
public class Tutorial1 {
public static void main(String args[]) {
Graph graph = new SingleGraph("Tutorial 1");
graph.addNode("A");
graph.addNode("B");
graph.addNode("C");
graph.addEdge("AB", "A", "B");
graph.addEdge("BC", "B", "C");
graph.addEdge("CA", "C", "A");
graph.display();
}
}
The graph being a factory for node, it can create nodes automatically if needed. Instead of the graph construction seen above, you can use:
graph.setStrict(false);
graph.setAutoCreate( true );
graph.addEdge( "AB", "A", "B" );
graph.addEdge( "BC", "B", "C" );
graph.addEdge( "CA", "C", "A" );
To produce the same result. If a node is unknown, it will be created for you.
Exploring the graph structure
Each time you add a node or edge in the graph, a corresponding object is
created for you. These objects belong to the Node
and Edge
interfaces. As you have seen it above, you name the nodes
and edges
by an identifier under the form of a string of characters. Each identifier
must be unique since they relate to only one node or one edge.
Once added in a graph with an identifier, you can obtain a reference on these objects using this identifier:
Node A = graph.getNode("A");
or:
Edge AB = graph.getEdge("AB");
The Node
and Edge
interfaces then allow to obtain details on the
represented nodes and edges. For example:
- what is the unique identifier of the node or edge (
Node.getId()
,Edge.getId()
), - what is the degree of the node (number of connected edges,
Node.getDegree()
), - what are the edges connected to a node (
Node.hasEdgeToward(String id)
andNode.getEdgeToward(String id)
), - is an edge directed or not (
Edge.isDirected()
), - what is the node at the other end of the edge (
Edge.getOpposite(Node n)
), - etc.
In addition to getNode
and getEdge
which impose to know the identifier
of the node or edge, the graph class provides ways to iterate on the nodes or
edges, you can write:
for(Node n:graph) {
System.out.println(n.getId());
}
The code above allows to iterate on all the nodes of the graph and will print their unique identifier, one by line. You can do a similar thing for edges:
for(Edge e:graph.getEachEdge()) {
System.out.println(e.getId());
}
In fact the for(Node n:graph)
instruction is a shorthand for:
for(Node n:graph.getEachNode()) {
...
}
You can also obtain a read-only set of nodes from the graph (this is not a copy, but a view on the set of nodes, hence the operation is reasonably fast):
Collection<Node> nodes = graph.getNodeSet();
This can be useful since a lot of algorithms in the java.util.Collections
are then applicable on the obtained set. The same operation is possible on edges using getEdgeSet()
.
Finally, you can also, if you prefer, use iterators on theses sets of nodes and edges:
Iterator<? extends Node> nodes = graph.getNodeIterator();
while(nodes.hasNext()) {
Node node = nodes.next();
...
}
And anew, this is exactly the same for edges with Graph.getEdgeIterator()
.
Another way to access graph elements is to use their indices. Unlike identifiers which are specified when the elements are created, indices are automatically maintained by the graph. They could change when elements are added or removed but are always between zero and node/edge count minus one. The following loop iterates on all the nodes of the graph:
for (int i = 0; i < graph.getNodeCount(); i++) {
Node node = graph.getNode(i);
...
}
Access by index is generally faster than access by identifier. It can be useful to interface GraphStream with APIs that use arrays. The following code constructs the adjacency matrix of a graph:
int n = graph.getNodeCount();
byte adjacencyMatrix[][] = new byte[n][n];
for (int i = 0; i < n; i++)
for (int j = 0; j < n; j++)
adjacencyMatrix[i][j] = graph.getNode(i).hasEdgeBetween(j) ? 1 : 0;
To get the index of a node knowing its identifier, use:
int i = graph.getNode("A").getIndex();
Inversely, to get the identifier of a node when its index is known, use
String id = graph.getNode(0).getId();


DIS optical flow algorithm. More...
#include <opencv2/video/tracking.hpp>
Public Types | |
| enum | { PRESET_ULTRAFAST = 0, PRESET_FAST = 1, PRESET_MEDIUM = 2 } |
Public Member Functions | |
| virtual int | getFinestScale () const =0 |
| Finest level of the Gaussian pyramid on which the flow is computed (zero level corresponds to the original image resolution). The final flow is obtained by bilinear upscaling. More... | |
| virtual int | getGradientDescentIterations () const =0 |
| Maximum number of gradient descent iterations in the patch inverse search stage. Higher values may improve quality in some cases. More... | |
| virtual int | getPatchSize () const =0 |
| Size of an image patch for matching (in pixels). Normally, default 8x8 patches work well enough in most cases. More... | |
| virtual int | getPatchStride () const =0 |
| Stride between neighbor patches. Must be less than patch size. Lower values correspond to higher flow quality. More... | |
| virtual bool | getUseMeanNormalization () const =0 |
| Whether to use mean-normalization of patches when computing patch distance. It is turned on by default as it typically provides a noticeable quality boost because of increased robustness to illumination variations. Turn it off if you are certain that your sequence doesn't contain any changes in illumination. More... | |
| virtual bool | getUseSpatialPropagation () const =0 |
| Whether to use spatial propagation of good optical flow vectors. This option is turned on by default, as it tends to work better on average and can sometimes help recover from major errors introduced by the coarse-to-fine scheme employed by the DIS optical flow algorithm. Turning this option off can make the output flow field a bit smoother, however. More... | |
| virtual float | getVariationalRefinementAlpha () const =0 |
| Weight of the smoothness term. More... | |
| virtual float | getVariationalRefinementDelta () const =0 |
| Weight of the color constancy term. More... | |
| virtual float | getVariationalRefinementGamma () const =0 |
| Weight of the gradient constancy term. More... | |
| virtual int | getVariationalRefinementIterations () const =0 |
| Number of fixed point iterations of variational refinement per scale. Set to zero to disable variational refinement completely. Higher values will typically result in more smooth and high-quality flow. More... | |
| virtual void | setFinestScale (int val)=0 |
| Finest level of the Gaussian pyramid on which the flow is computed (zero level corresponds to the original image resolution). The final flow is obtained by bilinear upscaling. More... | |
| virtual void | setGradientDescentIterations (int val)=0 |
| Maximum number of gradient descent iterations in the patch inverse search stage. Higher values may improve quality in some cases. More... | |
| virtual void | setPatchSize (int val)=0 |
| Size of an image patch for matching (in pixels). Normally, default 8x8 patches work well enough in most cases. More... | |
| virtual void | setPatchStride (int val)=0 |
| Stride between neighbor patches. Must be less than patch size. Lower values correspond to higher flow quality. More... | |
| virtual void | setUseMeanNormalization (bool val)=0 |
| Whether to use mean-normalization of patches when computing patch distance. It is turned on by default as it typically provides a noticeable quality boost because of increased robustness to illumination variations. Turn it off if you are certain that your sequence doesn't contain any changes in illumination. More... | |
| virtual void | setUseSpatialPropagation (bool val)=0 |
| Whether to use spatial propagation of good optical flow vectors. This option is turned on by default, as it tends to work better on average and can sometimes help recover from major errors introduced by the coarse-to-fine scheme employed by the DIS optical flow algorithm. Turning this option off can make the output flow field a bit smoother, however. More... | |
| virtual void | setVariationalRefinementAlpha (float val)=0 |
| Weight of the smoothness term. More... | |
| virtual void | setVariationalRefinementDelta (float val)=0 |
| Weight of the color constancy term. More... | |
| virtual void | setVariationalRefinementGamma (float val)=0 |
| Weight of the gradient constancy term. More... | |
| virtual void | setVariationalRefinementIterations (int val)=0 |
| Maximum number of gradient descent iterations in the patch inverse search stage. Higher values may improve quality in some cases. More... | |
| Public Member Functions inherited from cv::DenseOpticalFlow | |
| virtual void | calc (InputArray I0, InputArray I1, InputOutputArray flow)=0 |
| Calculates an optical flow. More... | |
| virtual void | collectGarbage ()=0 |
| Releases all inner buffers. More... | |
| Public Member Functions inherited from cv::Algorithm | |
| Algorithm () | |
| virtual | ~Algorithm () |
| virtual void | clear () |
| Clears the algorithm state. More... | |
| virtual bool | empty () const |
| Returns true if the Algorithm is empty (e.g. in the very beginning or after unsuccessful read. More... | |
| virtual String | getDefaultName () const |
| virtual void | read (const FileNode &fn) |
| Reads algorithm parameters from a file storage. More... | |
| virtual void | save (const String &filename) const |
| virtual void | write (FileStorage &fs) const |
| Stores algorithm parameters in a file storage. More... | |
| void | write (const Ptr< FileStorage > &fs, const String &name=String()) const |
| simplified API for language bindings This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More... | |
Static Public Member Functions | |
| static Ptr< DISOpticalFlow > | create (int preset=DISOpticalFlow::PRESET_FAST) |
| Creates an instance of DISOpticalFlow. More... | |
| Static Public Member Functions inherited from cv::Algorithm | |
| template<typename _Tp > | |
| static Ptr< _Tp > | load (const String &filename, const String &objname=String()) |
| Loads algorithm from the file. More... | |
| template<typename _Tp > | |
| static Ptr< _Tp > | loadFromString (const String &strModel, const String &objname=String()) |
| Loads algorithm from a String. More... | |
| template<typename _Tp > | |
| static Ptr< _Tp > | read (const FileNode &fn) |
| Reads algorithm from the file node. More... | |
Additional Inherited Members | |
| Protected Member Functions inherited from cv::Algorithm | |
| void | writeFormat (FileStorage &fs) const |
Detailed Description
DIS optical flow algorithm.
This class implements the Dense Inverse Search (DIS) optical flow algorithm. More details about the algorithm can be found at [50] . Includes three presets with preselected parameters to provide reasonable trade-off between speed and quality. However, even the slowest preset is still relatively fast, use DeepFlow if you need better quality and don't care about speed.
This implementation includes several additional features compared to the algorithm described in the paper, including spatial propagation of flow vectors (getUseSpatialPropagation), as well as an option to utilize an initial flow approximation passed to calc (which is, essentially, temporal propagation, if the previous frame's flow field is passed).
Member Enumeration Documentation
◆ anonymous enum
Member Function Documentation
◆ create()
|
static |
Creates an instance of DISOpticalFlow.
- Parameters
-
preset one of PRESET_ULTRAFAST, PRESET_FAST and PRESET_MEDIUM
◆ getFinestScale()
|
pure virtual |
Finest level of the Gaussian pyramid on which the flow is computed (zero level corresponds to the original image resolution). The final flow is obtained by bilinear upscaling.
- See also
- setFinestScale
◆ getGradientDescentIterations()
|
pure virtual |
Maximum number of gradient descent iterations in the patch inverse search stage. Higher values may improve quality in some cases.
- See also
- setGradientDescentIterations
◆ getPatchSize()
|
pure virtual |
Size of an image patch for matching (in pixels). Normally, default 8x8 patches work well enough in most cases.
- See also
- setPatchSize
◆ getPatchStride()
|
pure virtual |
Stride between neighbor patches. Must be less than patch size. Lower values correspond to higher flow quality.
- See also
- setPatchStride
◆ getUseMeanNormalization()
|
pure virtual |
Whether to use mean-normalization of patches when computing patch distance. It is turned on by default as it typically provides a noticeable quality boost because of increased robustness to illumination variations. Turn it off if you are certain that your sequence doesn't contain any changes in illumination.
- See also
- setUseMeanNormalization
◆ getUseSpatialPropagation()
|
pure virtual |
Whether to use spatial propagation of good optical flow vectors. This option is turned on by default, as it tends to work better on average and can sometimes help recover from major errors introduced by the coarse-to-fine scheme employed by the DIS optical flow algorithm. Turning this option off can make the output flow field a bit smoother, however.
- See also
- setUseSpatialPropagation
◆ getVariationalRefinementAlpha()
|
pure virtual |
Weight of the smoothness term.
- See also
- setVariationalRefinementAlpha
◆ getVariationalRefinementDelta()
|
pure virtual |
Weight of the color constancy term.
- See also
- setVariationalRefinementDelta
◆ getVariationalRefinementGamma()
|
pure virtual |
Weight of the gradient constancy term.
- See also
- setVariationalRefinementGamma
◆ getVariationalRefinementIterations()
|
pure virtual |
Number of fixed point iterations of variational refinement per scale. Set to zero to disable variational refinement completely. Higher values will typically result in more smooth and high-quality flow.
- See also
- setGradientDescentIterations
◆ setFinestScale()
|
pure virtual |
Finest level of the Gaussian pyramid on which the flow is computed (zero level corresponds to the original image resolution). The final flow is obtained by bilinear upscaling.
- See also
- getFinestScale
◆ setGradientDescentIterations()
|
pure virtual |
Maximum number of gradient descent iterations in the patch inverse search stage. Higher values may improve quality in some cases.
- See also
- getGradientDescentIterations
◆ setPatchSize()
|
pure virtual |
Size of an image patch for matching (in pixels). Normally, default 8x8 patches work well enough in most cases.
- See also
- getPatchSize
◆ setPatchStride()
|
pure virtual |
Stride between neighbor patches. Must be less than patch size. Lower values correspond to higher flow quality.
- See also
- getPatchStride
◆ setUseMeanNormalization()
|
pure virtual |
Whether to use mean-normalization of patches when computing patch distance. It is turned on by default as it typically provides a noticeable quality boost because of increased robustness to illumination variations. Turn it off if you are certain that your sequence doesn't contain any changes in illumination.
- See also
- getUseMeanNormalization
◆ setUseSpatialPropagation()
|
pure virtual |
Whether to use spatial propagation of good optical flow vectors. This option is turned on by default, as it tends to work better on average and can sometimes help recover from major errors introduced by the coarse-to-fine scheme employed by the DIS optical flow algorithm. Turning this option off can make the output flow field a bit smoother, however.
- See also
- getUseSpatialPropagation
◆ setVariationalRefinementAlpha()
|
pure virtual |
Weight of the smoothness term.
- See also
- getVariationalRefinementAlpha
◆ setVariationalRefinementDelta()
|
pure virtual |
Weight of the color constancy term.
- See also
- getVariationalRefinementDelta
◆ setVariationalRefinementGamma()
|
pure virtual |
Weight of the gradient constancy term.
- See also
- getVariationalRefinementGamma
◆ setVariationalRefinementIterations()
|
pure virtual |
Maximum number of gradient descent iterations in the patch inverse search stage. Higher values may improve quality in some cases.
- See also
- getGradientDescentIterations
The documentation for this class was generated from the following file:
- opencv2/video/tracking.hpp


pgblog
A musician tackles code
I've never been particularly good at self-analysis, and the last three weeks haven't done much to improve my skills in this regard. When I took the Gregorc personal thinking style quiz, I found myself in the 'little of this, little of that' category. If I can't solve a problem one way, I approach it from the opposite side. I recognize where my comfort zones are, and when I am slipping into them.
It has been interesting to try and compare my html/css process with my Ruby coding process. I enjoy the latter much more than the former, and I think this is because I like objective answers to things.
Getting a piece of code, with many interdependencies, to work is very satisfying because — once the pseudocode is pristine — every piece of the puzzle can be separately tested, and with enough time, the picture will be complete.
With an html page, however, it's difficult to know where to begin working. To a novice, a simple blog template, where the text goes in later, is unsettling to work with, because not only do changes in the text prompt a reassessment of the template — and vice versa — but the criteria for both are 'soft'. The abstract approach or the concrete approach, the random vs. the sequential approach... these attitudes which complement each other so well when working with code seem to turn the website design process into a muddle, at least for my experience.
My only resource right now is patience. I will bravely chip away at this vile sculpture of a blog over the next couple of months.


Using AWS Lambda with Amazon Lex
You can use Amazon Lex to integrate a conversation bot into your application. The Amazon Lex bot provides a conversational interface with your users. Amazon Lex provides prebuilt integration with Lambda, which enables you to use a Lambda function with your Amazon Lex bot.
When you configure an Amazon Lex bot, you can specify a Lambda function to perform validation, fulfillment, or both. For validation, Amazon Lex invokes the Lambda function after each response from the user. The Lambda function can validate the response and provide corrective feedback to the user, if necessary. For fulfillment, Amazon Lex invokes the Lambda function to fulfill the user request after the bot successfully collects all of the required information and receives confirmation from the user.
You can manage the concurrency of your Lambda function to control the maximum number of simultaneous bot conversations that you serve. The Amazon Lex API returns an HTTP 429 status code (Too Many Requests) if the function is at maximum concurrency.
The API returns an HTTP 424 status code (Dependency Failed Exception) if the Lambda function throws an exception.
The Amazon Lex bot invokes your Lambda function synchronously. The event
parameter contains information about the bot and the value of each slot in the dialog.
The
invocationSource
parameter indicates whether the Lambda function should validate the inputs
(DialogCodeHook) or fulfill the intent (FulfillmentCodeHook).
Example Amazon Lex message event
{ "messageVersion": "1.0", "invocationSource": "FulfillmentCodeHook", "userId": "ABCD1234", "sessionAttributes": { "key1": "value1", "key2": "value2", }, "bot": { "name": "OrderFlowers", "alias": "prod", "version": "1" }, "outputDialogMode": "Text", "currentIntent": { "name": "OrderFlowers", "slots": { "FlowerType": "lilies", "PickupDate": "2030-11-08", "PickupTime": "10:00" }, "confirmationStatus": "Confirmed" } }
Amazon Lex expects a response from a Lambda function in the following format. The
dialogAction
field is
required. The sessionAttributes
and the recentIntentSummaryView
fields are optional.
Example Amazon Lex message event
{ "sessionAttributes": { "key1": "value1", "key2": "value2" ... }, "recentIntentSummaryView": [ { "intentName": "Name", "checkpointLabel": "Label", "slots": { "slot name": "value", "slot name": "value" }, "confirmationStatus": "None, Confirmed, or Denied (intent confirmation, if configured)", "dialogActionType": "ElicitIntent, ElicitSlot, ConfirmIntent, Delegate, or Close", "fulfillmentState": "Fulfilled or Failed", "slotToElicit": "Next slot to elicit } ], "dialogAction": { "type": "Close", "fulfillmentState": "Fulfilled", "message": { "contentType": "PlainText", "content": "Thanks, your pizza has been ordered." }, "responseCard": { "version": integer-value, "contentType": "application/vnd.amazonaws.card.generic", "genericAttachments": [ { "title":"card-title", "subTitle":"card-sub-title", "imageUrl":"URL of the image to be shown", "attachmentLinkUrl":"URL of the attachment to be associated with the card", "buttons":[ { "text":"button-text", "value":"Value sent to server on button click" } ] } ] } } }
Note that the additional fields required for dialogAction
vary based on the value of the
type
field. For more information about the event and response fields, see Lambda event and response format in the
Amazon Lex Developer Guide. For an example tutorial that shows how to use Lambda with Amazon Lex, see
Exercise 1: Create Amazon Lex bot using a blueprint in the
Amazon Lex Developer Guide.
Roles and permissions
You need to configure a service-linked role as your function's execution role. Amazon Lex defines the service-linked role with predefined permissions. When you
create an
Amazon Lex bot using the console, the service-linked role is created automatically.
To create a service-linked role
with the AWS CLI, use the create-service-linked-role
command.
aws iam create-service-linked-role --aws-service-name lex.amazonaws.com
This command creates the following role.
{ "Role": { "AssumeRolePolicyDocument": { "Version": "2012-10-17", "Statement": [ { "Action": "sts:AssumeRole", "Effect": "Allow", "Principal": { "Service": "lex.amazonaws.com" } } ] }, "RoleName": "AWSServiceRoleForLexBots", "Path": "/aws-service-role/lex.amazonaws.com/", "Arn": "arn:aws:iam::account-id:role/aws-service-role/lex.amazonaws.com/AWSServiceRoleForLexBots" }
If your Lambda function uses other AWS services, you need to add the corresponding permissions to the service-linked role.
You use a resource-based permissions policy to allow the Amazon Lex intent to invoke
your Lambda function. If you
use the Amazon Lex console, the permissions policy is created automatically. From
the AWS CLI, use the Lambda
add-permission
command to set the permission. The following example sets permission for the
OrderFlowers
intent.
aws lambda add-permission \ --function-name OrderFlowersCodeHook \ --statement-id LexGettingStarted-OrderFlowersBot \ --action lambda:InvokeFunction \ --principal lex.amazonaws.com \ --source-arn "arn:aws:lex:us-east-1:123456789012 ID:intent:OrderFlowers:*"


Blog Posts
Technical Blogs
Version Control
Borders, Padding, and Margins
Arrays and Hashes
Enumerable Methods
Classes
Iterators!
JavaScript
Big O
Cultural Blogs
The DBC Experience
Gregorc Thinking Style
Tech Issues
Pairing is Caring
Stereotype Threat
Combatting Stereotype Threat
Conflict
Asking Good Questions


To replace any TEXTAREA element with the Zapatec visual editor.
Insert anywhere on your page:
<script type="text/javascript">
new Zapatec.MinimalEditor({
field: "target",
toolbarElements: [...]
});
</script>
The following configuration options are available:
- field - reference to target textarea element. Could be the value
of the ID attribute or a reference to a DOM element
- toolbarElements - array of button names that will be added to toolbar
The following values are available:
fontName, fontSize, bold, italic, underline, foreColor, backColor,
insertLink, insertImage, insertTable, justifyLeft, justifyCenter,
justifyRight, insertOrderedList, insertUnorderedList, copy, cut,
paste, outdent, indent, undo, redo, maximize, insertHorizontalRule, selectall
- theme - theme name
- themePath - path to directory where theme files are located
Useful tips:
- Buttons are added to the toolbar in same order as they described in toolbarElements.
- To add a WYSIWYG/HTML switcher, add the "switcher" option to toolbarElements.
- To start a new panel, add the "newPanel" option to toolbarElements.
- To add a new row to the toolbar, add the "newRow" option to toolbarElements.
- To enable the Cut, Copy, and Paste features in Mozilla, please see: following page.
Demo:


icons
add
archive
arrow-down
arrow-left-down
arrow-left-up
arrow-left
arrow-right-down
arrow-right-up
arrow-right
arrow-up
attachment
backspace
ban
bar-chart-alt
bar-chart
board
book
bookmark
calendar
call
camera
caret-down
caret-left
caret-right
caret-up
check
chevron-double-down
chevron-double-left
chevron-double-right
chevron-double-up
chevron-down
chevron-left
chevron-right
chevron-up
circle-add
circle-arrow-down
circle-arrow-left
circle-arrow-right
circle-arrow-up
circle-check
circle-error
circle-help
circle-information
circle-remove
circle-warning
circle
clipboard-check
clipboard-list
clipboard
clock
close
cloud-download
cloud-upload
cloud
computer
copy
credit-card
delete-alt
delete
document-add
document-check
document-download
document-empty
document-remove
document
download
drag
edit-alt
edit
email
enter
expand
export
external-link
eye-off
eye
favorite
filter-1
filter-alt
filter
folder-add
folder-check
folder-download
folder-remove
folder
grid
heart
home
image
inbox
laptop
link-alt
link
list
location
lock
log-out
map
megaphone
menu
message-alt
message
mobile
moon
next
notification-off
notification
options-horizontal
options-vertical
pause
percentage
pin
play
previous
refresh
remove
repeat
search
select
send
settings
share
shopping-cart-add
shopping-cart
shuffle
sort
speakers
stop
sun
sunrise
switch
table
tablet
tag
undo
unlock
user-add
user-check
user-remove
user
users
volume-off
volume-up
warning
webcam
zoom-in
zoom-out


WELL AT WALGREENS
- sodium bicarbonate, sodium chloride
Walgreen Company
Disclaimer: This drug has not been found by FDA to be safe and effective, and this labeling has not been approved by FDA. For further information about unapproved drugs, click here.
Uses
Temporarily relieves symptoms associated with
sinusitis, cold, flu or allergies
-Sneezing
-Nasal Stuffiness
-Runny nose
-Post nasal drip
Removes inhaled irritants (dust, pollen)
Removes nasal and sinus drainage
Helps reduce swelling of nasal membranes
Moisturizes dry nasal passages
Warnings
Stop use and ask a doctor if washing is uncomfortable
or symptoms are not relieved.
Do not use unfiltered tap water. see instructions inside box for proper water sources
Directions
Adults and children 4 years and over: Use 1-2 packets per 8 fl oz (240 mL) up to every two hours as needed.
Children under 4 years: Consult a physician
See enclosed instruction sheet for complete directions and proper use.
Instructions for Use of the Squeeze Bottle:
Directions and Dosage: Read through entire section before using for the first time.
1. Remove the cap from the squeeze bottle.
2. Pour the pre-mixed saline dry into the Squeeze Bottle. First-time users
should start with 1 packet of the saline dry ingredients. As you become more accustomed to the system, work up to using 2 full packets,
Additional packets may be purchased from your nearest pharmacy.
3. Fill the bottle with proper water* leaving approximately 1/2 inch of air at the top of the bottle.
This makes 1 cup (8 oz) of solution.
4. Tighten the cap on the bottle securely, place one finger over the tip of the cap and and gently shake the bottle until
the dry ingredients have completely dissolved.
5. Lean over the sink with your head bent so you are looking directly directly into the basin. Place the tip of the cap up to the right nostril and gently insert the tip
so that it forms a comfortable seal.
6. Squeeze the bottle gently so that the solution enters the right nostril.
7. In a few moments the solution will begin to drain out of the left nostril. Continue to squeeze the bottle gently until you have
used approximately half of the solution.
8. Remove the tip of the bottle from your nostril, then exhale through both nostrils to clear them of
excess mucus and solution. Gently blow your nose into a tissue.
9. Repeat the procedure on the left nostril with the remaining solution.
10. A small amount of the solution will remain in the bottom of the bottle. Discard the remaining solution.
11. Thoroughly rinse the bottle after each use with water that has been distilled, sterilized,
filtered or previously boiled and leave the bottle open to air dry completely. The Squeeze Bottle is
top-rack dishwasher safe.
|
WELL AT WALGREENS
sodium bicarbonate, sodium chloride kit | |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
| |||||||||||||||
|
| Labeler - Walgreen Company (008965063) |


# Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
"""Encode file using the wpm_encoder."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import numpy as np
import tensorflow as tf
from lingvo.tools import wpm_encoder
tf.flags.DEFINE_string(
'source_filepaths', '',
'Comma-separated list of source files. Must align with target')
tf.flags.DEFINE_string('target_filepaths', '',
'Comma-separated list of target files.')
tf.flags.DEFINE_string('output_filepath', '', 'File of tfrecords.')
tf.flags.DEFINE_string('wpm_filepath', '', 'The wordpiece vocabulary file.')
tf.flags.DEFINE_integer('num_shards', -1, 'Total number of shards.')
tf.flags.DEFINE_integer('shard_id', -1, 'This shard id (0-based).')
tf.flags.DEFINE_integer(
'max_len', 0,
'Drop sentence if src/tgt tokens exceeds max length, including <s> and </s> tags. Only use during training. A value of 0 does not filter'
)
FLAGS = tf.flags.FLAGS
BOW_STR = '\xe2\x96\x81'.decode('utf-8')
[docs]def _ReplaceSpaces(text):
return BOW_STR + text.replace(u' ', BOW_STR)
[docs]def _MakeBytesFeature(unicode_array):
value = [tf.compat.as_bytes(w) for w in unicode_array]
return tf.train.Feature(bytes_list=tf.train.BytesList(value=value))
[docs]def _MakeInt64Feature(value):
return tf.train.Feature(int64_list=tf.train.Int64List(value=value))
[docs]def _MakeFloatFeature(value):
return tf.train.Feature(float_list=tf.train.FloatList(value=value))
[docs]def _AssertTextFormat(text):
assert not text.startswith('<s>')
assert not text.endswith('</s>')
assert not text.startswith('<S>')
assert not text.endswith('</S>')
[docs]def _MakeTfExample(enc, source_text, target_text):
# By convention:
# * source always ends in </s>, never starts with <s>.
# * target never ends in </s>, always starts with <s>.
_AssertTextFormat(source_text)
_AssertTextFormat(target_text)
source_text = _ReplaceSpaces(source_text)
src_s, src_i = zip(*enc.EncodeToStringAndIds(source_text))
src_s = list(src_s) + [enc.sentence_end_string]
src_i = list(src_i) + [enc.sentence_end_id]
if FLAGS.max_len > 0 and len(src_i) > FLAGS.max_len:
return None
target_text = _ReplaceSpaces(target_text)
tgt_s, tgt_i = zip(*enc.EncodeToStringAndIds(target_text))
tgt_s = [enc.sentence_start_string] + list(tgt_s)
tgt_l = list(tgt_i) + [enc.sentence_end_id]
tgt_i = [enc.sentence_start_id] + list(tgt_i)
if FLAGS.max_len > 0 and len(tgt_i) > FLAGS.max_len:
return None
feature = {
'source_id': _MakeInt64Feature(src_i),
'source_padding': _MakeFloatFeature(np.zeros_like(src_i)),
'source_word': _MakeBytesFeature(src_s),
'target_id': _MakeInt64Feature(tgt_i),
'target_padding': _MakeFloatFeature(np.zeros_like(tgt_i)),
'target_word': _MakeBytesFeature(tgt_s),
'target_label': _MakeInt64Feature(tgt_l),
'target_weight': _MakeFloatFeature(np.ones_like(tgt_l)),
'natural_order': _MakeInt64Feature([1]),
}
return tf.train.Example(features=tf.train.Features(feature=feature))
[docs]def _Prepropcess(text):
if not isinstance(text, unicode):
text = text.decode('utf-8')
text = text.strip()
text = text.replace(' </s>', '')
return text
[docs]def _RunEncoding():
enc = wpm_encoder.WpmEncoder(FLAGS.wpm_filepath)
pairs = zip(
FLAGS.source_filepaths.split(','), FLAGS.target_filepaths.split(','))
with tf.python_io.TFRecordWriter(FLAGS.output_filepath) as outf:
n = 0
for p in pairs:
with tf.gfile.Open(p[0], 'r') as sourcef:
with tf.gfile.Open(p[1], 'r') as targetf:
for textp in zip(sourcef.readlines(), targetf.readlines()):
n += 1
if n % 10000 == 0:
tf.logging.info('Watermark[%d]: %d', FLAGS.shard_id, n)
if n % FLAGS.num_shards != FLAGS.shard_id:
continue
source_text = _Prepropcess(textp[0])
target_text = _Prepropcess(textp[1])
# tf.logging.vlog(5, 'Source: %s', source_text)
# tf.logging.vlog(5, 'Target: %s', target_text)
ex = _MakeTfExample(enc, _Prepropcess(source_text),
_Prepropcess(target_text))
if not ex: # Too long.
continue
# tf.logging.vlog(5, 'Ex: %s', ex)
encoded = ex.SerializeToString()
outf.write(encoded)
[docs]def main(_):
tf.logging.set_verbosity(tf.logging.INFO)
_RunEncoding()
if __name__ == '__main__':
tf.app.run(main)


Hey everyone here's a little information about me. I'm from Vallejo, CA but I was originally born in San Luis Obispo, CA. In my spare time I like to hang out with my friends, watch sports, and play video games. I have my AA in Psychology from Diablo Valley College and I'm a current Dev Bootcamp student. A random thing about me is that I like to bake and I think I make a pretty good cupcake.
About Me


Logistics
Home
About Us
Services
Air Freight
Ocean Freight
Ground Shipping
Warehousing
Storage
Industries
Blog
Contact


interface ArchiveInterface implements IteratorAggregate, Countable
Methods
| ArchiveInterface |
addMembers(String|Array|SplFileInfo $sources, Boolean $recursive = true)
Adds a file or a folder into the archive |
|
| ArchiveInterface |
removeMembers(String|Array $sources)
Removes a file from the archive |
|
| Array |
getMembers()
Lists files and directories archive members |
|
| ArchiveInterface |
extract(String $toDirectory)
Extracts current archive to the given directory |
|
| ArchiveInterface |
extractMembers(String|Array $members, string $toDirectory = null)
Extracts specific members from the archive |
Details
at line 30
public ArchiveInterface
addMembers(String|Array|SplFileInfo $sources, Boolean $recursive = true)
Adds a file or a folder into the archive
at line 41
public ArchiveInterface
removeMembers(String|Array $sources)
Removes a file from the archive
at line 50
public Array
getMembers()
Lists files and directories archive members
at line 61
public ArchiveInterface
extract(String $toDirectory)
Extracts current archive to the given directory
at line 73
public ArchiveInterface
extractMembers(String|Array $members, string $toDirectory = null)
Extracts specific members from the archive


@remarks
Private Sub Main() Dim ch As Long '' reads from the console keyboard. The function '' will block until the return key is pressed. ch = Console.Read '' we will loop through the characters typed into '' the console and exit the loop when CTRL+Z followed '' by Return is pressed. Do While ch <> 26 Debug.Print Chr$(ch); DoEvents '' As long as there are characters remaining to be '' from the console keyboard, this function won't block. ch = Console.Read Loop End SubAs shown here, the loop just retrieves characters from the console keyboard one character at a time. If there are no more characters in the buffer, then the Read function will block and wait for the Return key to be pressed again. The key combination of CTRL+Z (26) is used as an exit from the loop. CRTL+Z is what is used to signal the end of a file on unix platforms.


WARNING: This is a large dataset, DO NOT try to open the dataset as it will slow down your computer. If you want to see your data, use proc print data=fn (obs=n);
If you are lost and do not know how to use a particular syntax, look it up in the reference manual. Read the explanation, and in particular look at example code in the bottom. Go to the link below, click on index (give it time to load) and look for the keyword. Remember there are most always more than one way to do something, just find one that makes sense to you. At this phase, your only goal is to have the computer do things correctly.
http://support.sas.com/onlinedoc/913/docMainpage.jsp
Input
- Raw csv file from website
- http://www.icpsr.umich.edu/icpsrweb/SAMHDA/studies/32722/version/4
- use “SAS setup” : which should have *.txt (NOT *.stc)
- Setup SAS program to read csv into a sas dataset
- Must edit the program as below to output the sas dataset to your directory.
- Run the program in sas, and check the log to confirm that you have a sas dataset with 57,873 observations and 3125 variables.
- TEST: check the data directory and confirm that you have new sas dataset named as you did in your program (*.sas7bdat). Note this is also the output from this first step that will be the input to the next step. This would be an intermediate result
--- FROM (in the sas program given)
DATA;
INFILE "data-filename" LRECL=6836;
--- CHANGE TO (make this edits)
libname data “DIRNAME”;
DATA data.nsduh;
INFILE "DIRNAME/nsduh.txt" LRECL=6836;
Step 1
- Now you will write your first SAS program.
- It will have one data step, and a few proc steps.
- Open base sas
- In the editor window, write the first few lines of your sas code as below. Replace the unbolded words as appropriate for your program, if needed. You can use the same dataset name for indataset and outdataset, that just means you will overwrite your olddataset with the new one you create. For this assignment, I suggest using a different name so you do not overwrite it. Note data.indataset should be the input to this step, and output from the previous step.
libname data “DIRNAME”;
data data.mynsduh;
set data.nsduh;
proc print data=data.mynsduh(obs=10);
run; - Save your program into lab2/ Run this program in sas. Check the log. It should tell you that now you have a new dataset named with the new name, with the same number of observations and variables. You should have no ERRORs or WARNINGS.
- TEST1: look at the output (results). Check that things look correct.
- TEST2: check in the data directory for the new dataset. See that it is the same size as the olddataset. Note this will change in the next step.
- Now go back to your editor with your three four lines of code.
- Add lines of code in the data step (between data … ; and run; ) to do one thing. For example, to subset variables (keyword keep).
- Now rerun ALL the sas code. Look at the log. This time you should have a message telling you that you only have 17 variables
- TEST: look at the output. Does this look right?
- Now go back to your editor with your code.
- This time, you will add proc steps after your data step to describe your data (proc means, proc freq). Put these between your proc print and run statements
- Again check your log
- TEST: check your output
- Iterate over these steps adding in one task at a time either to the data step (step 1.2), or adding in a new proc step (step 1.3).
- After each task is completed, remember to save your program, always rerun the code, look at the log, and look at the results.
- If you need to stop for the day, save your program and come back to the particular task next time.
Output: Submission
You DO NOT submit the datasets. I don’t need to see your datasets, because I can see your programs. I know exactly what you did to your datasets.
The best way to submit, is after you are all DONE.
- Save your program.
- Exit out of SAS (this is easier than clearing the log and results window, because by now you will have a LOT there).
- Start up SAS again.
- Open your sas program
- Now run your full code. (this should give you a clean log and results)
- Save out the clean log and results (*.html)
- Submit your program, log, and results .


Are you ready to hit power level 9000!? Then read through this lesson plan to be a super saiyan.
Topic / semester outline
Here's the proposed topics I've come up with to start. We may deviate from here as far as timing or how long we spend on different ones.
- Week 1 - Establishing an online identity as an
IT Professional (Vlogger)
- Treating ourselves as brands, we will establish
accounts and begin to setup the foundation for submission of assignments
throughout the semester
- Week 2 – Git / Github / Contribution (All roles)
- Collaborative participation on Github,
understanding concepts of Git / version control and how teams leverage this
technology for code and non-code
projects
- Week 3 - HTML / CSS / JavaScript (Front end)
- The big three powering most of what you use
today, a primer for reverse engineering. We’ll use codepen to demonstrate how
you can extend concepts of github into other realms
- Week 4 - Package management & Reuse (Front
end)
- NPM / Composer and how we stand on the shoulders
of giants
- Week 5 - Web components & Progressive Web
Apps (Front end)
- HTML on steroids and the future of all
application development, web or otherwise
- We’ll look at why this is transformative for
application development and why all teams should be exploring it from an
efficiency perspective. We’ll also experiment with a powerful new platform
called Stackblitz to demonstrate the power of Package management +
compartmentalized HTML
- Week 6 – Creating a website + server (Sys admin)
- We’ll use this for a blog and other experiments throughout the semester but we’ll mostly demystify the process
- Week 7 – Terminal and Command line basics and DDOS (Sys admin)
- Step by step through the basic commands that system developers use to make everything work
- Looking at Cloudflare
and discussing Denial of Service attacks
- Week 8 – Mid-term
- We’ll have a mid-term based on the technologies and skills covered the 1st
half
- There will be no lab this week.
- Come to class, take the exam and then you're free to leave or use the open lab time for catching up on past labs.
- Week 9 - Open source communities (All roles)
- We’ll review governance within open source
communities, understand the difference between licenses, learn how different structures operate (including Open vs Closed), see how to identify
healthy vs stagnated open source communities, and learn when people fallback to proprietary technologies.
- We'll try to identify gaps in on boarding into a community and help improve the documentation associated with this.
- Week 10 - Content management systems (All roles)
- A window into Drupal, WordPress, GravCMS, HAXcms
to understand how they work, limitations, why they are popular, how their
communities operate
- We'll play with https://surge.sh/ for static publishing
- Week 11 – Accessibility (Front end / Developer)
- What is it, why is it important, who benefits,
how do we test for it?
- Week 12 - User experience (Front end / Designer)
- Persona creation and testing using real world
applications
- Week 13 - Server Virtualization technologies (DevOps)
- Vagrant and Docker have changed the web forever,
we’ll explore these and surrounding applications and learn why they are so
powerful
- Week 14 –
Thanksgiving Break
- Week 15-16 Educational Technology, Open
Education Resources (Edtech)
- We’ll look at the courses we’re taking and its
usage of technology, where this technology is usable, where it’s not. Where
accessibility can be improved or accounted for.
- We’ll look at OER / open course technology
movements from philosophical, societal and technological perspectives.
- We’ll audit systems the instructor works on /
has worked on to identify gaps in existing technologies, critique what’s
available and ideate about how technologies discussed throughout the class can
be leveraged
- These labs will be combined into a single submission with 10% of the grade. Lab time will be spent learning about the context and having access to instructors to help while exploring the topic.


Camper & Teacher Roster
Camp Schedule
Daily Itinerary
Music
Kickoff Slides
Hands-On Activities
Electives
Challenges
TCS Cup Rules & Names


Schedules
Add and view arrival times for all trains
Current Train Schedule
Train Name
Destination
Frequency (min)
Next Arrival
Minutes Away
Add Train
Train Name
Destination
First Train Time (HH:mm - military time)
Frequency (min)
Submit


"DELILAH "languishing, a Philistine woman who dwelt in the valley of Sorek (Judges 16:4-20). She was bribed by the “lords of the Philistines” to obtain from Samson the secret of his strength and the means of overcoming it (Judges 16:4-18). She tried on three occasions to obtain from him this secret in vain. On the fourth occasion she wrung it from him. She made him sleep upon her knees, and then called the man who was waiting to help her; who “cut off the seven locks of his head,” and so his “strength went from him.” (See SAMSON.)
"DELILAH "languishing, a Philistine woman who dwelt in the valley of Sorek (Judges 16:4-20). She was bribed by the “lords of the Philistines” to obtain from Samson the secret of his strength and the means of overcoming it (Judges 16:4-18). She tried on three occasions to obtain from him this secret in vain. On the fourth occasion she wrung it from him. She made him sleep upon her knees, and then called the man who was waiting to help her; who “cut off the seven locks of his head,” and so his “strength went from him.” (See SAMSON.)


A brief guide to programming the 6502 in assembly language. It will introduce the 6502 architecture, addressing modes, and instruction set. No prior assembly language programming is assumed, however it is assumed that you are somewhat familiar with hexadecimal numbers. Programming examples are given at the end. Much of this material comes from 6502 Software Design by Leo Scanlon, Blacksburg, 1980.
The 6502 Architecture --------------------- The 6502 is an 8-bit microprocessor that follows the memory oriented design philosophy of the Motorola 6800. Several engineers left Motorola and formed MOS Technology which introduced the 6502 in 1975. The 6502 gained in popularity because of it's low price and became the heart of several early personal computers including the Apple II, Commodore 64, and Atari 400 and 800. Simplicity is key ----------------- The 6502 handles data in its registers, each of which holds one byte (8-bits) of data. There are a total of three general use and two special purpose registers: accumulator (A) - Handles all arithmetic and logic. The real heart of the system. X and Y - General purpose registers with limited abilities. S - Stack pointer. P - Processor status. Holds the result of tests and flags. Stack Pointer ------------- When the microprocessor executes a JSR (Jump to SubRoutine) instruction it needs to know where to return when finished. The 6502 keeps this information in low memory from $0100 to $01FF and uses the stack pointer as an offset. The stack grows down from $01FF and makes it possible to nest subroutines up to 128 levels deep. Not a problem in most cases. Processor Status ---------------- The processor status register is not directly accessible by any 6502 instruction. Instead, there exist numerous instructions that test the bits of the processor status register. The flags within the register are: bit -> 7 0 +---+---+---+---+---+---+---+---+ | N | V | | B | D | I | Z | C | <-- flag, 0/1 = reset/set +---+---+---+---+---+---+---+---+ N = NEGATIVE. Set if bit 7 of the accumulator is set. V = OVERFLOW. Set if the addition of two like-signed numbers or the subtraction of two unlike-signed numbers produces a result greater than +127 or less than -128. B = BRK COMMAND. Set if an interrupt caused by a BRK, reset if caused by an external interrupt. D = DECIMAL MODE. Set if decimal mode active. I = IRQ DISABLE. Set if maskable interrupts are disabled. Z = ZERO. Set if the result of the last operation (load/inc/dec/ add/sub) was zero. C = CARRY. Set if the add produced a carry, or if the subtraction produced a borrow. Also holds bits after a logical shift. Accumulator ----------- The majority of the 6502's business makes use of the accumulator. All addition and subtraction is done in the accumulator. It also handles the majority of the logical comparisons (is A > B ?) and logical bit shifts. X and Y ------- These are index registers often used to hold offsets to memory locations. They can also be used for holding needed values. Much of their use lies in supporting some of the addressing modes. Addressing Modes ---------------- The 6502 has 13 addressing modes, or ways of accessing memory. The 65C02 introduces two additional modes. They are: +---------------------+--------------------------+ | mode | assembler format | +=====================+==========================+ | Immediate | #aa | | Absolute | aaaa | | Zero Page | aa | Note: | Implied | | | Indirect Absolute | (aaaa) | aa = 2 hex digits | Absolute Indexed,X | aaaa,X | as $FF | Absolute Indexed,Y | aaaa,Y | | Zero Page Indexed,X | aa,X | aaaa = 4 hex | Zero Page Indexed,Y | aa,Y | digits as | Indexed Indirect | (aa,X) | $FFFF | Indirect Indexed | (aa),Y | | Relative | aaaa | Can also be | Accumulator | A | assembler labels +---------------------+--------------------------+ (Table 2-3. _6502 Software Design_, Scanlon, 1980) Immediate Addressing -------------------- The value given is a number to be used immediately by the instruction. For example, LDA #$99 loads the value $99 into the accumulator. Absolute Addressing ------------------- The value given is the address (16-bits) of a memory location that contains the 8-bit value to be used. For example, STA $3E32 stores the present value of the accumulator in memory location $3E32. Zero Page Addressing -------------------- The first 256 memory locations ($0000-00FF) are called "zero page". The next 256 instructions ($0100-01FF) are page 1, etc. Instructions making use of the zero page save memory by not using an extra $00 to indicate the high part of the address. For example, LDA $0023 -- works but uses an extra byte LDA $23 -- the zero page address Implied Addressing ------------------ Many instructions are only one byte in length and do not reference memory. These are said to be using implied addressing. For example, CLC -- Clear the carry flag DEX -- Decrement the X register by one TYA -- Transfer the Y register to the accumulator Indirect Absolute Addressing ---------------------------- Only used by JMP (JuMP). It takes the given address and uses it as a pointer to the low part of a 16-bit address in memory, then jumps to that address. For example, JMP ($2345) -- jump to the address in $2345 low and $2346 high So if $2345 contains $EA and $2346 contains $12 then the next instruction executed is the one stored at $12EA. Remember, the 6502 puts its addresses in low/high format. Absolute Indexed Addressing --------------------------- The final address is found by taking the given address as a base and adding the current value of the X or Y register to it as an offset. So, LDA $F453,X where X contains 3 Load the accumulator with the contents of address $F453 + 3 = $F456. Zero Page Indexed Addressing ---------------------------- Same as Absolute Indexed but the given address is in the zero page thereby saving a byte of memory. Indexed Indirect Addressing --------------------------- Find the 16-bit address starting at the given location plus the current X register. The value is the contents of that address. For example, LDA ($B4,X) where X contains 6 gives an address of $B4 + 6 = $BA. If $BA and $BB contain $12 and $EE respectively, then the final address is $EE12. The value at location $EE12 is put in the accumulator. Indirect Indexed Addressing --------------------------- Find the 16-bit address contained in the given location ( and the one following). Add to that address the contents of the Y register. Fetch the value stored at that address. For example, LDA ($B4),Y where Y contains 6 If $B4 contains $EE and $B5 contains $12 then the value at memory location $12EE + Y (6) = $12F4 is fetched and put in the accumulator. Relative Addressing ------------------- The 6502 branch instructions use relative addressing. The next byte is a signed offset from the current address, and the net sum is the address of the next instruction executed. For example, BNE $7F (branch on zero flag reset) will add 127 to the current program counter (address to execute) and start executing the instruction at that address. SImilarly, BEQ $F9 (branch on zero flag set) will add a -7 to the current program counter and start execution at the new program counter address. Remember, if one treats the highest bit (bit 7) of a byte as a sign (0 = positive, 1 = negative) then it is possible to have numbers in the range -128 ($80) to +127 (7F). So, if the high bit is set, i.e. the number is > $7F, it is a negative branch. How far is the branch? If the value is < $80 (positive) it is simply that many bytes. If the value is > $7F (negative) then it is the 2's compliment of the given value in the negative direction. 2's compilment -------------- The 2's compilment of a number is found by switching all the bits from 0 -> 1 and 1 -> 0, then adding 1. So, $FF = 1111 1111 <-- original 0000 0000 <-- 1's compliment + 1 --------- 0000 0001 <-- 2's compliment, therefore $FF = -1 Note that QForth uses this for numbers greater than 32768 so that 65535 = -1 and 32768 = -32768. In practice, the assembly language programmer uses a label and the assembler takes care of the actual computation. Note that branches can only be to addresses within -128 to +127 bytes from the present address. The 6502 does not allow branches to an absolute address. Accumulator Addressing ---------------------- Like implied addressing, the object of the instruction is the accumulator and need not be specified. The 6502 Instruction Set ------------------------ There are 56 instructions in the 6502, and more in the 65C02. Many instructions make use of more than one addressing mode and each instruction/addressing mode combination has a particular hexadecimal opcode that specifies it exactly.  Some 6502 instructions make use of bitwise logic. This includes AND, OR, and EOR (Exclusive-OR). The tables below illustrate the effects of these operations: AND 1 1 -> 1 "both" 1 0 -> 0 0 1 -> 0 0 0 -> 0 OR 1 1 -> 1 "either one or both" 1 0 -> 1 0 1 -> 1 0 0 -> 0 EOR 1 1 -> 0 "one or the other but not both" 1 0 -> 1 0 1 -> 1 0 0 -> 0 Therefore, $FF AND $0F = $0F since, 1111 1111 and 0000 1111 --------- 0000 1111 = $0F AND is useful for masking bits. For example, to mask the high order bits of a value AND with $0F: $36 AND $0F = $06 OR is useful for setting a particular bit: $80 OR $08 = $88 since 1000 0000 ($80) 0000 1000 ($08) or --------- 1000 1000 ($88) EOR is useful for flipping bits: $AA EOR $FF = $55 since 1010 1010 ($AA) 1111 1111 ($FF) eor --------- 0101 0101 ($55) Other 6502 instructions shift bits to the right or the left or rotate them right or left. Note that shifting to the left by one bit is the same as multipling by 2 and that shifting right by one bit is the same as dividing by 2. The 6502 instructions fall naturally into 10 groups with two odd-ball instructions NOP and BRK: Load and Store Instructions Arithmetic Instructions Increment and Decrement Instructions Logical Instructions Jump, Branch, Compare and Test Bits Instructions Shift and Rotate Instructions Transfer Instructions Stack Instructions Subroutine Instructions Set/Reset Instructions NOP/BRK Instructions Load and Store Instructions =========================== LDA - LoaD the Accumulator LDX - LoaD the X register LDY - LoaD the Y register STA - STore the Accumulator STX - STore the X register STY - STore the Y register Microprocessors spend much of their time moving stuff around in memory. Data from one location is loaded into a register and stored in another location, often with something added or subtracted in the process. Memory can be loaded directly into the A, X, and Y registers but as usual, the accumulator has more addressing modes available. If the high bit (left most, bit 7) is set when loaded the N flag on the processor status register is set. If the loaded value is zero the Z flag is set. Arithmetic Instructions ======================= ADC - ADd to accumulator with Carry SBC - SuBtract from accumulator with Carry The 6502 has two arithmetic modes, binary and decimal. Both addition and subtraction implement the carry flag to track carries and borrows thereby making multibyte arithmetic simple. Note that in the case of subtraction it is necessary to SET the carry flag as it is the opposite of the carry that is subtracted. Addition should follow this form: CLC ADC ... . . ADC ... . . . Clear the carry flag, and perform all the additions. The carry between additions will be handled in the carry flag. Add from low byte to high byte. Symbolically, the net effect of an ADC instruction is: A + M + C --> A Subtraction follows the same format: SEC SBC ... . . SBC ... . . . In this case set the carry flag first and then do the subtractions. Symbolically, A - M - ~C --> A , where ~C is the opposite of C Ex.1 ---- A 16-bit addition routine. $20,$21 + $22,$23 = $24,$25 CLC clear the carry LDA $20 get the low byte of the first number ADC $22 add to it the low byte of the second STA $24 store in the low byte of the result LDA $21 get the high byte of the first number ADC $23 add to it the high byte of the second, plus carry STA $25 store in high byte of the result ... on exit the carry will be set if the result could not be contained in 16-bit number. Ex.2 ---- A 16-bit subtraction routine. $20,$21 - $22,$23 = $24,$25 SEC clear the carry LDA $20 get the low byte of the first number SBC $22 add to it the low byte of the second STA $24 store in the low byte of the result LDA $21 get the high byte of the first number SBC $23 add to it the high byte of the second, plus carry STA $25 store in high byte of the result ... on exit the carry will be set if the result produced a borrow Aside from the carry flag, arithmetic instructions also affect the N, Z, and V flags as follows: Z = 1 if result was zero, 0 otherwise N = 1 if bit 7 of the result is 1, 0 otherwise V = 1 if bit 7 of the accumulator was changed, a sign change Increment and Decrement Instructions ==================================== INC - INCrement memory by one INX - INcrement X by one INY - INcrement Y by one DEC - DECrement memory by one DEX - DEcrement X by one DEY - DEcrement Y by one The 6502 has instructions for incrementing/decrementing the index registers and memory. Note that it does not have instructions for incrementing/decrementing the accumulator. This oversight was rectified in the 65C02 which added INA and DEA instructions. The index register instructions are implied mode for obvious reasons while the INC and DEC instructions use a number of addressing modes. All inc/dec instructions have alter the processor status flags in the following way: Z = 1 if the result is zero, 0 otherwise N = 1 if bit 7 is 1, 0 otherwise Logical Instructions ==================== AND - AND memory with accumulator ORA - OR memory with Accumulator EOR - Exclusive-OR memory with Accumulator These instructions perform a bitwise binary operation according to the tables given above. They set the Z flag if the net result is zero and set the N flag if bit 7 of the result is set. Jump, Branch, Compare, and Test Bits ==================================== JMP - JuMP to another location (GOTO) BCC - Branch on Carry Clear, C = 0 BCS - Branch on Carry Set, C = 1 BEQ - Branch on EQual to zero, Z = 1 BNE - Branch on Not Equal to zero, Z = 0 BMI - Branch on MInus, N = 1 BPL - Branch on PLus, N = 0 BVS - Branch on oVerflow Set, V = 1 BVC - Branch on oVerflow Clear, V = 0 CMP - CoMPare memory and accumulator CPX - ComPare memory and X CPY - ComPare memory and Y BIT - test BITs This large group includes all instructions that alter the flow of the program or perform a comparison of values or bits. JMP simply sets the program counter (PC) to the address given. Execution proceeds from the new address. The branch instructions are relative jumps. They cause a branch to a new address that is either 127 bytes beyond the current PC or 128 bytes before the current PC. Code that only uses branch instructions is relocatable and can be run anywhere in memory. The three compare instructions are used to set processor status bits. After the comparison one frequently branches to a new place in the program based on the settings of the status register. The relationship between the compared values and the status bits is, +-------------------------+---------------------+ | | N Z C | +-------------------------+---------------------+ | A, X, or Y < Memory | 1 0 0 | | A, X, or Y = Memory | 0 1 1 | | A, X, or Y > Memory | 0 0 1 | +-----------------------------------------------+ The BIT instruction tests bits in memory with the accumulator but changes neither. Only processor status flags are set. The contents of the specified memory location are logically ANDed with the accumulator, then the status bits are set such that, * N receives the initial, un-ANDed value of memory bit 7. * V receives the initial, un-ANDed value of memory bit 6. * Z is set if the result of the AND is zero, otherwise reset. So, if $23 contained $7F and the accumulator contained $80 a BIT $23 instruction would result in the V and Z flags being set and N reset since bit 7 of $7F is 0, bit 6 of $7F is 1, and $7F AND $80 = 0. Shift and Rotate Instructions ============================= ASL - Accumulator Shift Left LSR - Logical Shift Right ROL - ROtate Left ROR - ROtate Right Use these instructions to move things around in the accumulator or memory. The net effects are (where C is the carry flag): +-+-+-+-+-+-+-+-+ C <- |7|6|5|4|3|2|1|0| <- 0 ASL +-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+ 0 -> |7|6|5|4|3|2|1|0| -> C LSR +-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+ C <- |7|6|5|4|3|2|1|0| <- C ROL +-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+ C -> |7|6|5|4|3|2|1|0| -> C ROR +-+-+-+-+-+-+-+-+ Z is set if the result it zero. N is set if bit 7 is 1. It is always reset on LSR. Remember that ASL A is equal to multiplying by two and that LSR is equal to dividing by two. Transfer Instructions ===================== TAX - Transfer Accumulator to X TAY - Transfer Accumulator to Y TXA - Transfer X to accumulator TYA - Transfer Y to Accumulator Transfer instructions move values between the 6502 registers. The N and Z flags are set if the value being moved warrants it, i.e. LDA #$80 TAX causes the N flag to be set since bit 7 of the value moved is 1, while LDX #$00 TXA causes the Z flag to be set since the value is zero. Stack Instructions ================== TSX - Transfer Stack pointer to X TXS - Transfer X to Stack pointer PHA - PusH Accumulator on stack PHP - PusH Processor status on stack PLA - PulL Accumulator from stack PLP - PulL Processor status from stack TSX and TXS make manipulating the stack possible. The push and pull instructions are useful for saving register values and status flags. Their operation is straightforward. Subroutine Instructions ======================= JSR - Jump to SubRoutine RTS - ReTurn from Subroutine RTI - ReTurn from Interrupt Like JMP, JSR causes the program to start execution of the next instruction at the given address. Unlike JMP, JSR pushes the address of the next instruction after itself on the stack. When an RTS instruction is executed the address pushed on the stack is pulled off the stack and the program resumes at that address. For example, LDA #$C1 ; load the character 'A' JSR print ; print the character and it's hex code LDA #$C2 ; load 'B' JSR print ; and print it . . . print JSR $FDED ; print the letter JSR $FDDA ; and its ASCII code RTS ; return to the caller RTI is analagous to RTS and should be used to end an interrupt routine. Set and Reset (Clear) Instructions ================================== CLC - CLear Carry flag CLD - CLear Decimal mode CLI - CLear Interrupt disable CLV - CLear oVerflow flag SEC - SEt Carry SED - SEt Decimal mode SEI - SEt Interrupt disable These are one byte instructions to specify processor status flag settings. CLC and SEC are of particular use in addition and subtraction respectively. Before any addition (ADC) use CLC to clear the carry or the result may be one greater than you expect. For subtraction (SBC) use SEC to ensure that the carry is set as its compliment is subtracted from the answer. In multi-byte additions or subtractions only clear or set the carry flag before the initial operation. For example, to add one to a 16-bit number in $23 and $24 you would write: LDA $23 ; get the low byte CLC ; clear the carry ADC #$02 ; add a constant 2, carry will be set if result > 255 STA $23 ; save the low byte LDA $24 ; get the high byte ADC #$00 ; add zero to add any carry that might have been set above STA $24 ; save the high byte RTS ; if carry set now the result was > 65535 Similarly for subtraction, LDA $23 ; get the low byte SEC ; set the carry SBC #$02 ; subtract 2 STA $23 ; save the low byte LDA $24 ; get the high byte SBC #$00 ; subtract 0 and any borrow generated above STA $24 ; save the high byte RTS ; if the carry is not set the result was < 0 Other Instructions ================== NOP - No OPeration (or is it NO oPeration ? :) BRK - BReaK NOP is just that, no operation. Useful for deleting old instructions, reserving room for future instructions or for use in careful timing loops as it uses 2 microprocessor cycles. BRK causes a forced break to occur and the processor will immediately start execution of the routine whose address is in $FFFE and $FFFF. This address is often the start of a system monitor program. Some simple programming examples ================================ A few simple programming examples are given here. They serve to illustrate some techniques commonly used in assembly programming. There are doubtless dozens more and I make no claim at being a proficient assembly language programmer. For examples of addition and subtraction see above on CLC and SEC. A count down loop ----------------- ; ; An 8-bit count down loop ; start LDX #$FF ; load X with $FF = 255 loop DEX ; X = X - 1 BNE loop ; if X not zero then goto loop RTS ; return How does the BNE instruction know that X is zero? It doesn't, all it knows is that the Z flag is set or reset. The DEX instruction will set the Z flag when X is zero. ; ; A 16-bit count down loop ; start LDY #$FF ; load Y with $FF loop1 LDX #$FF ; load X with $FF loop2 DEX ; X = X - 1 BNE loop2 ; if X not zero goto loop2 DEY ; Y = Y - 1 BNE loop1 ; if Y not zero goto loop1 RTS ; return There are two loops here, X will be set to 255 and count to zero for each time Y is decremented. The net result is to count the 16-bit number Y (high) and X (low) down from $FFFF = 65535 to zero. Other examples -------------- ** Note: All of the following examples are lifted nearly verbatim from the book "6502 Software Design", whose reference is above. ; Example 4-2. Deleting an entry from an unordered list ; ; Delete the contents of $2F from a list whose starting ; address is in $30 and $31. The first byte of the list ; is its length. ; deluel LDY #$00 ; fetch element count LDA ($30),Y TAX ; transfer length to X LDA $2F ; item to delete nextel INY ; index to next element CMP ($30),Y ; do entry and element match? BEQ delete ; yes. delete element DEX ; no. decrement element count BNE nextel ; any more elements to compare? RTS ; no. element not in list. done ; delete an element by moving the ones below it up one location delete DEX ; decrement element count BEQ deccnt ; end of list? INY ; no. move next element up LDA ($30),Y DEY STA ($30),Y INY JMP delete deccnt LDA ($30,X) ; update element count of list SBC #$01 STA ($30,X) RTS ; Example 5-6. 16-bit by 16-bit unsigned multiply ; ; Multiply $22 (low) and $23 (high) by $20 (low) and ; $21 (high) producing a 32-bit result in $24 (low) to $27 (high) ; mlt16 LDA #$00 ; clear p2 and p3 of product STA $26 STA $27 LDX #$16 ; multiplier bit count = 16 nxtbt LSR $21 ; shift two-byte multiplier right ROR $20 BCC align ; multiplier = 1? LDA $26 ; yes. fetch p2 CLC ADC $22 ; and add m0 to it STA $26 ; store new p2 LDA $27 ; fetch p3 ADC $23 ; and add m1 to it align ROR A ; rotate four-byte product right STA $27 ; store new p3 ROR $26 ROR $25 ROR $24 DEX ; decrement bit count BNE nxtbt ; loop until 16 bits are done RTS ; Example 5-14. Simple 16-bit square root. ; ; Returns the 8-bit square root in $20 of the ; 16-bit number in $20 (low) and $21 (high). The ; remainder is in location $21. sqrt16 LDY #$01 ; lsby of first odd number = 1 STY $22 DEY STY $23 ; msby of first odd number (sqrt = 0) again SEC LDA $20 ; save remainder in X register TAX ; subtract odd lo from integer lo SBC $22 STA $20 LDA $21 ; subtract odd hi from integer hi SBC $23 STA $21 ; is subtract result negative? BCC nomore ; no. increment square root INY LDA $22 ; calculate next odd number ADC #$01 STA $22 BCC again INC $23 JMP again nomore STY $20 ; all done, store square root STX $21 ; and remainder RTS This is based on the observation that the square root of an integer is equal to the number of times an increasing odd number can be subtracted from the original number and remain positive. For example, 25 - 1 1 -- 24 - 3 2 -- 21 - 5 3 -- 16 - 7 4 -- 9 - 9 5 = square root of 25 -- 0 If you are truly interested in learning more, go to your public library and seek out an Apple machine language programming book. If your public library is like mine, there will still be plenty of early 80s computer books on the shelves. :)


The index at which to start the searching forwards in the string. It can be any integer. The default value is 0. If fromIndex <= 0 the entire string is searched. If fromIndex >= str.length, the string is not searched and -1 is returned. Unless searchValue is an empty string, then str.length is returned.
Characters in a string are indexed from left to right. The index of the first character is 0, and the index of the last character of a string called stringName is stringName.length - 1.
The following example defines two string variables. The variables contain the same string except that the second string contains uppercase letters. The first console.log() method displays 19. But because the indexOf() method is case sensitive, the string "cheddar" is not found in myCapString, so the second console.log() method displays -1.


4 references to Method
Microsoft.PowerShell.Commands.Utility (1)
commands\utility\GetMember.cs (1)
200
memberTypeToSearch ^= (PSMemberTypes.Property | PSMemberTypes.ParameterizedProperty | PSMemberTypes.
Method
);
System.Management.Automation (3)
engine\MshMemberInfo.cs (3)
112
Methods = CodeMethod |
Method
| ScriptMethod,
2539
public override PSMemberTypes MemberType => PSMemberTypes.
Method
;
4575
if (member.MemberType == PSMemberTypes.Property || member.MemberType == PSMemberTypes.
Method
)


Children’s University expands into Telford
by Lisa O'BrienA successful project which aims to raise the aspirations of children through exciting activities outside of the classroom is expanding into Telford.
The University of Wolverhampton Children’s University has received a charitable donation from the Wynn Foundation, which supports good causes in Shropshire, Telford and Wrekin.
The project encourages learning beyond the classroom via extra-curricular activities and aims to build confidence by enabling children to try new experiences.
Activities that children who participate in Children’s University can gain credits for include various sports, cookery classes, choir, dancing, martial arts and visits to local learning providers such as museums and community groups.
The initiative has been running in the Black Country and Birmingham since 2014 and runs in 42 schools and is now being expanded into Telford and Wrekin.
Children have a passport where they collect credits through their activities and attend a graduation ceremony to celebrate their achievements.
Professor Jackie Dunne, deputy vice-chancellor of the University of Wolverhampton, which has a campus in Priorslee, said: “We are delighted to be expanding our Children’s University into Telford and are extremely grateful to the Wynn Foundation for supporting this initiative.
“This programme is our way of empowering, inspiring and nurturing the aspirations of our youngest learners because we share their enthusiasm for learning about the world.
"As the University of Opportunity we want to contribute to the dreams of young learners and enable them to make informed decisions about their future.”
See Jenny Wynn talk about the Children's University:
Jenny Wynn, trustee of the Wynn Foundation, which aims to reduce inequalities and enable people to access opportunities, said: “We were particularly impressed by what the Children’s University aims to do in terms of addressing inequality and raising aspirations. From an early age it raises aspirations so children who have never had anyone from their family go to university it starts to make that achievable and improves their life chances.
“We would like to wish the very best of luck to all the young people that participate in Children’s University in Telford.”
For more information about the Children’s University, visit childrensuniversity.co.uk


Terms of Service
Limitations
- The terms of service specify the terms of all services (hereinafter ‘the Service’) provided on this site by Shinichiro Aska. (hereinafter ‘Aska’). Users of this service (hereinafter ‘the User’) can use the Service according to the specified terms.
Prohibited items
Following is a list of prohibited items/acts when using the service. When you commit a prohibited act, we may terminate the service, deregister or terminate any future access to the service provided to the User.
- Do not write secret information ( eg. password, credit card number ) on the task or comments.
- When the User breaches the Terms of Service.
- When the User does not use the service for a certain period of time after user registration.
- When a User attempts special access outside normal usage without using a Web browser.
- When a user publishes a large load of requests to this site, and places burden on the system.
- Unauthorized use of another Account.
- An act equivalent to unauthorized access or cracking.
- Illegal acts.
- An act involving a crime.
- An act which violates intellectual property rights including copyright and patent.
- Acts that disturb public order and morals.
- Acts which are interpreted as socially inappropriate behavior.
- When Aska judges an act as inappropriate, etc.
Information Security
- Aska pays the utmost attention to the security of information registered with the service.
User Responsibility
- When problems arise in the service between Users or the User and third party, it is their responsibility to resolve the problems at their own expense. Aska does not bear any responsibility.
Service Content
- The Service is provided free of charge.
- Aska may discontinue the service for our convenience. When we discontinue the service, we will provide 30 days notice on this site before the termination.
Amendment etc. of Terms of Service and Content
- Aska may amend the terms without notice. When the terms change, we will not notify the user individually so please be sure to check the latest Terms of Service on this site regularly.
- Amendments shall become effective from when they are displayed on this site.
- The content of service provided on this site may be amended, supplemented or deleted without notice.
Governing Law
- The Terms of Service shall be governed by the laws of Japan.
Court of Jurisdiction
- The Tokyo District Court shall be the exclusive agreement jurisdictional court for any and all disputes arising from the Terms of Use.
Supplementary Provision
- Date of Constitution and effect September 25, 2011
Questions
- Any questions about this Terms of Service should be addressed to Shinichiro Aska.


Credits
Menu icons are made by Dave Gandy from www.flaticon.com and are licensed under the Creative Commons Attribution 3.0 International License.
This website is indeed using Ethan Schoonover's Solarized color palette, although I prefer Monokai.
License
The code behind this website is licensed under an MIT license. Read the whole thing here
GitHub


| Serial No |
Complaints Filed | Date | Status |
|---|---|---|---|
| 1 | Re-evaluation of Mathematics midsem papers | 01.01.2020 | In Process |
| 2 | Regarding poor ventilation in classrooms | 10.01.2020 | In Process |
| 3 | Improvement of Registration process | 11.01.2020 | Resolved |
| 4 | Change of faculty in ECE Department | 15.01.2020 | Resolved |
| 5 | Change in lecture timetable | 17.01.2020 | Acknowledged |


PLAYGROUND
ENTER
add light
SPACE
pick up/drop light
SHIFT+H
hide controls
Author
opensourceskier
More
source (github)
original (msurguy)


---
layout: definitions
---
A $m\times n$ matrix $A=[a_{ij}]$ is
row reduced if it satisfies
- The first nonzero entry in each row is $1$
- Each column of leading nonzero entry of some row has all other entries equal to 0
Concepts
Coming soon
Used In
Coming soon
Hypothesis
Coming soon
Results
Coming soon


Adam,
Bacon ipsum dolor amet ham hock short loin shoulder capicola landjaeger sirloin beef ribs. Shank rump leberkas picanha kevin jerky. Ground round short loin shank, tail beef ribs doner pig flank cupim. Pig ham venison tongue alcatra andouille sirloin pancetta bresaola leberkas. Kielbasa meatball alcatra pork shoulder prosciutto pancetta landjaeger short loin shankle andouille. Ham hock short ribs pork belly venison drumstick landjaeger chicken rump fatback doner kevin. Boudin tongue andouille turducken.
Shankle doner filet mignon rump picanha. Pastrami t-bone pork loin sausage. Turducken spare ribs alcatra, sausage sirloin short loin kielbasa ribeye.
 Corned beef leberkas cupim rump strip steak ground round ball tip tongue, shankle venison flank sirloin kielbasa bresaola. Hamburger picanha pork loin capicola salami pancetta. Boudin kielbasa shankle pig, beef ribs pancetta capicola porchetta spare ribs corned beef pork belly biltong sirloin short loin. Pig hamburger landjaeger meatball boudin, tail flank kevin filet mignon ribeye fatback.
Adam