This tutorial shows how to containerize a NetLogo model in a Docker image. As a result, you will be able to run a BehaviorSpace experiment saved in your .nlogo file in a reproducible manner. The experiment will be executed in Headless mode (no Graphic User Interface -- GUI), and the output data will be stored in a folder of your preference.
To start this tutorial, you will need to have [Docker](https://www.docker.com/products/docker-desktop) installed in your computer, as well as a .nlogo file with your working model with at least one BehaviorSpace experiment saved in it. We will use as an example the Wolf Sheep Predation model from the Model Library, which we saved as WolfSheep.nlogo. Following our [suggested directory structure](https://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1000424), we created a project folder named `MyDocker` and it contains the folders `data`, `docs`, `results`, and `src`. WolfSheep.nlogo is in the `src` folder and the rest of the folders are empty. Since this .nlogo file does not contain any BehaviorSpace experiments, we created one short experiment named 'test'. If you want to follow this exact example, you can create an arbitrary BehaviorSpace experiment and save it.
Here is a video walkthrough of the steps described below:
https://youtu.be/ICYM-vXx_Q4
Building the image
***
1. Determine what folder to use
Docker looks for the files existing in the folder where you are when you call the `build` command. Therefore, it is important to verify you are able to navigate to the folder that contains your project using command line. If that is the case, you can continue to step 2. Otherwise, we suggest you to follow Step 1.1 to create a `MyDocker` folder that you can later navigate to.
Step 1.1 on Mac
1. Use Finder to go to your home directory: go to Macintosh HD, then to Users and then to the folder with your user name (which should have a house icon).
2. Create a folder named `MyDocker` in your home directory.
3. Copy the contents of your project's folder to `MyDocker`. In our example, since our project consists of a single .nlogo file (WolfSheep.nlogo), only the `src` folder will contain any files, but we still need to have at least a `results` folder to store the results of our experiment.
Step 1.1 on Windows
1. Open File Explorer, go to My PC, then to the C: drive, then to Users, and finally your username.
2. Create a new folder named `MyDocker`.
3. Copy the contents of your project's folder to `MyDocker`. In our example, since our project consists of a single .nlogo file (WolfSheep.nlogo), only the `src` folder will contain any files, but we still need to have at least a `results` folder to store the results of our experiment
2. Include additional extensions
If your model does not use extensions or uses the extensions that are bundled with the NetLogo download (meaning that you did not have to download anything to start using these extensions in your project), then you can skip this and go to Step 3. Otherwise, it is necessary to follow Step 2.1 to include a copy of the extensions you are using inside the `src` folder of your project.
Step 2.1 on Mac
1. Use Finder to open the Applications folder, where you will find the folder that contains your NetLogo program (if you have multiple versions of NetLogo, be sure to open the right version).
2. Go to the extensions folder and copy the folder corresponding to your extension. Note that you must copy the folder of the extension, not just the .jar file inside it. You might find useful the following description, taken from NetLogo's [Extensions Guide](https://ccl.northwestern.edu/netlogo/docs/extensions.html):
> Each NetLogo extension consists of a folder with the same name as the extension, entirely in lower case. This folder must contain a JAR file with the same name as the folder. For example, the `sound` extension is stored in a folder called `sound` with a file inside called `sound.jar`.
>
>Some extensions depend on additional files. These files will be in the extension’s folder along with the JAR file. The folder may also contain other files such as documentation and example models.
3. Paste the folder in the `src` folder of your project.
Step 2.1 on Windows
1. Use File Explorer to open the Program Files folder, where you will find the folder that contains your NetLogo program (if you have multiple versions of NetLogo, be sure to open the right version).
2. Go to the app folder, then to extensions, and copy the folder corresponding to your extension. Note that you must copy the folder of the extension, not just the .jar file inside it. You might find useful the following description, taken from NetLogo's [Extensions Guide](https://ccl.northwestern.edu/netlogo/docs/extensions.html):
> Each NetLogo extension consists of a folder with the same name as the extension, entirely in lower case. This folder must contain a JAR file with the same name as the folder. For example, the `sound` extension is stored in a folder called `sound` with a file inside called `sound.jar`.
>
>Some extensions depend on additional files. These files will be in the extension’s folder along with the JAR file. The folder may also contain other files such as documentation and example models.
3. Paste the folder in the `src` folder of your project.
3. Create a Dockerfile
The Dockerfile is the file that describes how to create the image of your model and what steps to execute when you run a container based on that image. To create one, open a plain text editor (examples are TextEdit for Mac or Notepad++ for Windows) and copy the following code.
```
FROM openjdk:8-jdk
ARG MODEL_NAME
ARG NETLOGO_VERSION
ARG NETLOGO_NAME=NetLogo-$NETLOGO_VERSION
ARG NETLOGO_URL=https://ccl.northwestern.edu/netlogo/$NETLOGO_VERSION/$NETLOGO_NAME-64.tgz
ENV LC_ALL=C.UTF-8 \
LANG=C.UTF-8
RUN mkdir /home/netlogo \
&& wget $NETLOGO_URL \
&& tar xzf $NETLOGO_NAME-64.tgz -C /home/netlogo --strip-components=1 \
&& rm $NETLOGO_NAME-64.tgz
COPY . /home/
RUN mv /home/src/$MODEL_NAME /home/src/NLModel.nlogo
ENTRYPOINT ["/home/netlogo/netlogo-headless.sh", \
"--model", "/home/src/NLModel.nlogo", \
"--table", "/home/results/table-output.csv", \
"--spreadsheet", "home/results/spreadsheet-output.csv"]
```
If you are curious about the meaning of these lines, or how to get only the table or the spreadsheet output, we included a short explanation [below](#heading--sections).
4. Save your Dockerfile
It is important to save the Dockerfile with the correct format and name, or Docker might not be able to use it to build your image.
Saving your Dockerfile in Mac
1. If using TextEdit, make sure it will be saved as plain text. To do this, you can click on Format and then on Make Plain Text, or just press shift + command + T.
2. Click on File, then Save... . In the dialog window that opens:
+ Type `Dockerfile` as the name of the file.
+ Choose the folder you are going to use (Step 1) as the location of the file. In our example, we would save the `Dockerfile` in `MyDocker`.
+ Uncheck the box that allows to use the `.txt` extension if no extension is provided.
+ Make sure that the format of the file (in the drop-down menu below) is plain text (or Unicode UTF-8).
+ If present, uncheck the box that allows to use the `.txt` extension.
4. Open Finder and look for your `Dockerfile`. It should show up in the folder you chose to use in Step 1 (in our example, in `MyDocker`) and it should not include any extensions in its name (if it has a name like `Dockerfile.txt`, you should rename it to `Dockerfile`)
Saving your Dockerfile in Windows
1. Save your plain text as `Dockerfile` (do not include any extensions in the file name, e.g. .txt) and make sure it is saved in the folder you are going to use (Step 1). In our example, we saved our `Dockerfile` in `MyDocker`.
2. Use File Explorer to check that the file was saved with the right name (`Dockerfile`, no extensions) and in the right location, i.e. the folder you chose to use in Step 1 (`MyDocker` in our example).
5. Double-check your directory structure
The code in the `Dockerfile` assumes a specific organization within the folder containing your Dockerfile. Either the `build` or the `run` command will fail if it cannot find the right files due to an organization or folder naming that are different than expected. Therefore, it is necessary to ensure that the right contents are in the right folders. Your project's folder (`MyDocker` in our example) can have any name, but it must at least contain:
* Your `Dockerfile`, and this is also a good time to check that its name does not have any extensions,
* A `results` folder, which in our case will be empty,
* And a `src` folder (also in lower case), that contains your .nlogo file and, if using extensions that were not bundled in the NetLogo version that you are using, the folders of such extensions.
Your project's folder can contain other folders, like `data` if it uses input files.
6. Build the Docker image
Now we are going to create the virtual entity that will download NetLogo, contain your model, and be ready to execute any experiment that you choose (from the list of BehaviorSpace experiment(s) that you saved in your NetLogo file). To build the image, open a terminal window (Terminal in Mac or Command Prompt in Windows) and navigate to the folder that contains your model and the Dockerfile (if not sure how to do so and followed Step 1.1, you can follow these [short instructions](#heading--navigate)). Once you moved to the directory that contains your model and the Dockerfile, type the following `build` command, replacing the highlighted
spaces as directed:
docker build --build-arg MODEL_NAME=yourfile --build-arg NETLOGO_VERSION=yourversion -t imagename .
* Replace yourfile
with the name of your NetLogo model file, including the .nlogo extension. In our example it would be `WolfSheep.nlogo`.
* Replace yourversion
with the version of NetLogo that you are using to run your model (in our case, `6.1.1`). If you are not sure what is the NetLogo version you are using, you can check the name of your NetLogo application and copy the number that goes after the word 'NetLogo'.
* Replace imagename
with the name you want to give to your image. It can be any name, as long as all the letters you use are lower case, with no spaces.
* Make sure you are _not_ leaving any spaces between the `=` sign and the file name or version number you inserted, and to include the `.` at the end of the command.
In our example, this build command would look like this: docker build --build-arg MODEL_NAME=WolfSheep.nlogo --build-arg NETLOGO_VERSION=6.1.1 -t wolfsheepim .
.
When you press return, Docker will start showing the progress of the processes you instructed it to perform with the Dockerfile. Keep in mind that it has to download some programs from scratch, so building the image could take some minutes. When it is done, you will see the line Successfully tagged imagename:latest
. Now you will be able to run reproducible BehaviorSpace experiments in your containerized model.
We included some known errors can that arise when building the image in our short [Troubleshooting section](#heading--trblshoot).
Running an experiment in a container
***
1. Determine the folder where the experiment results should be stored
The container will open the model, run the specified experiment, and transfer the results to a folder of your preference. It is not necessary to choose a location within your project's folder, but doing so can help with the organization of your results.
Note that subsequent runs will overwrite the result files if the same folder is used twice to receive the results. Therefore, it is a good idea to create a separate folder for each experiment that is run.
2. Run the container
To run an experiment in the container, open a terminal window and type the `run` command according to your operating system:
run
command in Mac
docker run -v path/to/your/results/folder:/home/results image name --experiment experiment name
Where:
* path/to/your/results/folder
is replaced by the _absolute_ path to your results folder in your computer. If the folder does not exist, Docker will create it. In our case, we are going to create a folder named `TestResults` inside MyDocker/results/
. Therefore, our path would be ~/MyDocker/results/TestResults
. Note that your path has to be absolute, or, in other words, start with ~/
.
* imagename
is replaced by the name you gave to the image in the [build
command](#heading--buildc) (in our case, wolfsheepim
).
* experimentname
is replaced by the name of the experiment you want to run. Note that it has to match exactly with the name saved in the .nlogo file. In our example, we saved our arbitrary experiment under the name test
.
In our example, the run
command would look like this: docker run -v ~/MyDocker/results/TestResults:/home/results/ wolfsheepim --experiment test
.
At the end of the run, you should see the files `table-output.csv` and `spreadsheet-output.csv` in the folder you determined to get the results.
run
command in Windows
docker run -v path/to/your/results/folder:/home/results imagename --experiment experimentname
Where:
* path/to/your/results/folder/
is replaced by the _absolute_ path to your results folder in your computer. If the folder does not exist, Docker will create it. In our case, we are going to create a folder named `TestResults` inside `MyDocker/results/`. Therefore, our path would be c:/Users/yourusername/MyDocker/results/TestResults
. Note that your path has to be absolute, or, in other words, start with `c:/`. Also be sure to replace yourusername
with your own user name.
* imagename
is replaced by the name you gave to the image in the [`build` command](#heading--buildc) (in our case, `wolfsheepim`).
* experimentname
is replaced by the name of the experiment you want to run. Note that it has to match exactly with the name saved in the .nlogo file. In our example, we saved our arbitrary experiment under the name `test`.
In our example, the `run` command would look like this: docker run -v c:/Users/myusername/MyDocker/results/TestResults:/home/results/ wolfsheepim --experiment test
.
At the end of the run, you should see the files `table-output.csv` and `spreadsheet-output.csv` in the folder you determined to get the results.
Navigating to your folder of interest
***
If you are not familiar with the use of command line to move between folders (directories) and followed Step 1.1, you can follow these instructions:
Navigating in Mac
1. Open Terminal: press command + space bar, type "Terminal" and open it.
2. Type `cd ~/MyDocker`
Now you can [continue building](#heading--buildc) the Docker image. You can visit websites like [this](https://www.macworld.com/article/2042378/master-the-command-line-navigating-files-and-folders.html) to continue becoming familiar with the command line.
Navigating in Windows
1. Open [Command Line](https://www.computerhope.com/issues/chusedos.htm)
2. Type `cd C:\Users\\MyDocker`, where `` is replaced by your own username.
Now you can [continue building](#heading--buildc) the Docker image.
Sections of this Dockerfile
***
## `FROM`
Dockerfiles start with a `FROM`, followed by a base image. Since we are not going to create everything from scratch, we need to establish what image we are going to use to build our new image from. In this case, we are going to use an image of OpenJDK. Therefore, our Dockerfile starts with `FROM openjdk:8-jdk`.
## `ARG` and `ENV`
ARGuments are pieces of information that may be given to Docker when the `build` command is executed, but can also be set to some default values. In our case, we are leaving the first two arguments (`MODEL_NAME` and `NETLOGO_VERSION`) open for modifications in the [`build` command](#heading--buildc) because these are expected to be modified by each user, while the second two (`NETLOGO_NAME` and `NETLOGO_VERSION`) were assigned default values. You could also overwrite the second two arguments in you `build` command by adding to it `--build-arg =`, although there is no need to do that.
While ARGuments are only stored at the time the image is built and then discarded, ENVironment variables are kept in the image. In our case, we are using `ENV` to set the coding to a standard format, to avoid any incompatibilities.
## `RUN` and `COPY`
In this section we are telling Docker the steps it has to follow to build the image. In short, we are asking it to create some folders and to download and unzip our specified NetLogo version. Afterwards, we are asking it to copy our NetLogo model to a folder in the image. In other words, this is the step in which our model is immortalized in the image we built.
## `ENTRYPOINT`
The final step is to tell the image what to do when we use it to run a container. We use `ENTRYPOINT` to tell it to run `netlogo-headless.sh`, with the arguments `model`, `table`, and `spreadsheet` as specified. When we use the [`run` command](#heading--runc), we are specifying one extra argument, `experiment`, to be the name of one of the available BehaviorSpace experiments. This way, different experiments can be run in the same model image.
If you are not interested in one type of output from your experiments (notice this will modify the outputs of all the experiments that you run using that image), you can delete the line corresponding to it. For example, if you only wanted to get results in the table format and not the spreadsheet, then your `ENTRYPOINT` section would look like the following:
ENTRYPOINT ["/home/netlogoim/netlogo-headless.sh", \
"--model", "/home/netlogoim/ModInImage.nlogo", \
"--table", "/home/netlogoim/results/table-output.csv"]
Troubleshooting Guide
***
Click here to see some known error messages and their probable causes
Your build
command is not correct
When trying to build your image, you get an error message like the following:
"docker build" requires exactly 1 argument.
It means that your `build` command has some typing error. The most likely ones are that it has spaces at any side of the `=` signs or that it is lacking the last `.`.
Your image name contains upper case letters.
invalid argument "WolfSheepIm" for "-t, --tag" flag: invalid reference format: repository name must be lowercase
Use only lower case letters to name the image.
Your Dockerfile is not in plain text format
When trying to build your image, you get an error message like the following:
Error response from daemon: Dockerfile parse error line 1: unknown instruction: {\RTF1\ANSI\ANSICPG1252\COCOARTF1671\COCOASUBRTF600
You will need to convert the format of your file to plain text. If you are using TextEdit, open your Dockerfile, press shift + command + T and save it. Use Finder to make sure that the name of the file does not include any extensions.
The Dockerfile was saved under a different name
When trying to build your image, you get an error message like the following:
unable to prepare context: unable to evaluate symlinks in Dockerfile path: lstat ~/MyDocker/Dockerfile: no such file or directory
Use Finder or File Explorer to check that the name of the file was correctly spelled (`Dockerfile`), and it does not end with any extensions. If your file's name looks like `Dockerfile.txt`, you have to edit its name to erase the `.txt` termination. If your file's name ends with a `.rtf`, go to the previous error to see how to correct it.
If you are not able to erase the extension from your `Dockerfile`'s name, you can also add a `-f` flag to your `build` command. With this flag you can tell Docker the name of your Dockerfile. In our example, and assuming we have a file named `Dockerfile.txt`, our build command would be `docker build --build-arg MODEL_NAME=WolfSheep.nlogo --build-arg NETLOGO_VERSION=6.1.1 -f Dockerfile.txt -t wolfsheepim .`. Note that it is necessary to have a Dockerfile in plain text format to be able to build a Docker image.
The name of your .nlogo file was mispelled
When trying to build your image, you get an error message like the following:
Step 9/10 : RUN rmdir /home/netlogoim/results && mv /home/src/$MODEL_NAME /home/src/NLModel.nlogo
---> Running in (12-digit number)
mv: cannot stat '/home/src/WolfSheeppWrongSpelling.nlogo': No such file or directory
The command '/bin/sh -c rmdir /home/netlogoim/results && mv /home/src/$MODEL_NAME /home/src/NLModel.nlogo' returned a non-zero code: 1
This means that the name of the model you provided in the `build` command, i.e. the name after `--build-arg MODEL_NAME=`, is not identical to the name of your .nlogo file. Check the spelling and that it includes the `.nlogo` extension.
The name of the BehaviorSpace experiment is wrong
When trying to run a container from your image, you get an error message from NetLogo:
Exception in thread "main" java.lang.IllegalArgumentException: Invalid run, specify experiment name or setup file
Verify that the name of the experiment you are asking the container to run is correctly typed and that it exists in the .nlogo file that you used to build the image.


This is your public presence on Cursus. You need a account to upload your paid courses, comment on courses, purchased by students, or earning.
Add information about yourself
Select push and email notifications you'd like to receive
Notify me about activity from the profiles I'm subscribed to
Notify me of courses I might like based on what I watch
Notify me about activity on my comments on others’ courses
Notify me about replies to my comments
Your emails are sent to<EMAIL_ADDRESS>To unsubscribe from an email, click the "Unsubscribe" link at the bottom of it. Learn more about emails from Edututs+.
If this setting is turned off, Cursus may still send you messages regarding your account, required service announcements, legal notifications, and privacy matters
To adjust this preference by course, leave this box checked and go to the course dashboard and click on "Options" to opt in or out of specific announcements.
Modify your privacy settings here.
Want to charge for a course? Provide your payment info and opt in for our promotional programs
Sell more of your exclusive products of this type (equal to the amount on the left) to get % cut from further exclusive sales.
Sell more of your non-exclusive products of this type (equal to the amount on the left) to get 70% cut from every non-exclusive sales.
Get paid by credit or debit card, PayPal transfer or even via bank account in just a few clicks. All you need is your email address or mobile number. More about PayPal | Create an account
Payoneer Prepaid MasterCard® or Global Bank Transfer (Payoneer) offers an easy, convenient and cost effective way to get paid. More about Payoneer | Payoneer FAQs
SWIFT (International Transfer) get paid directly into your bank account. Connected with over 9000 banking organisations, security institutions and customers in more than 200 countries More about SWIFT
The Cursus Affiliate API exposes functionalities of Cursus to help developers build client applications and integrations with Cursus.
To see more details, please visit Cursus Affiliate API
Warning: If you close your account, you will be unsubscribed from all your 5 courses, and will lose access forever.


--- layout: post esbma_id: 1628 title: Martin Woodward, Microsoft MVP date: 2006-10-02 14:13:41 ---
Our very own Martin Woodward has been named a Team System MVP by Microsoft. Congratulations!


Looking at all the dorms, we notice that one of them, Simmons Hall, has some peculiarities in its paint job. In particular, there are five places where there are brightly colored symbols drawn on the windows.
We can interpret each of these symbols using a common puzzle encoding:
| Color | What We See | Encoding | Letter |
|---|---|---|---|
| Red | .-- | Morse Code | W |
| Orange | ∏ | Pigpen Cipher | H |
| Yellow | Flag Semaphore | I | |
| Green | ⠞ | Braille | T |
| Blue-Purple | E | Alphabet | E |
Reading the letters in rainbow order, we get the answer, WHITE.


Markdown:
#### Guidance *Divination cantrip* ___ - **Casting Time:** 1 action - **Range:** Touch - **Components:** V, S - **Duration:** Concentration, up to 1 minute --- You touch one willing creature. Once before the spell ends, the target can roll a d4 and add the number rolled to one ability check of its choice. It can roll the die before or after making the ability check. The spell then ends. #### Spare the Dying *Necromancy cantrip* ___ - **Casting Time:** 1 action - **Range:** Touch - **Components:** V, S - **Duration:** Instantaneous --- You touch a living creature that has 0 hit points. The creature becomes stable. This spell has no effect on undead or constructs.
Convert
HTML:


category
status
Received List
Report
Report
stock flow
report
report
inventory report
(by product)
(by product)
inventory
Report
Report
inventory expiry
Report
Report
inactive inventory
report
report
reorder level
(by product)
(by product)
expired, damaged or
returned stock report
returned stock report


///<reference path="../_definitions.ts"/>
module away.entities
{
//import away3d.materials.utils.DefaultMaterialManager;
//import away3d.animators.IAnimator;
//import away3d.arcane;
//import away3d.containers.*;
//import away3d.core.base.*;
//import away3d.core.partition.*;
//import away3d.events.*;
//import away3d.library.assets.*;
//import away3d.materials.*;
//use namespace arcane;
/**
* Mesh is an instance of a Geometry, augmenting it with a presence in the scene graph, a material, and an animation
* state. It consists out of SubMeshes, which in turn correspond to SubGeometries. SubMeshes allow different parts
* of the geometry to be assigned different materials.
*/
export class Mesh extends away.entities.Entity implements away.base.IMaterialOwner, away.library.IAsset
{
private _subMeshes : away.base.SubMesh[];//:Vector.<SubMesh>;
private _geometry:away.base.Geometry;//Geometry;
private _material:away.materials.MaterialBase;
private _animator:away.animators.IAnimator;
private _castsShadows:boolean = true;
private _shareAnimationGeometry:boolean = true;
/**
* Create a new Mesh object.
*
* @param geometry The geometry used by the mesh that provides it with its shape.
* @param material [optional] The material with which to render the Mesh.
*/
constructor(geometry:away.base.Geometry, material:away.materials.MaterialBase = null)
{
super();
this._subMeshes = new Array<away.base.SubMesh>();//Vector.<SubMesh>();
//this.geometry = geometry || new Geometry(); //this should never happen, but if people insist on trying to create their meshes before they have geometry to fill it, it becomes necessary
if ( geometry == null )
{
this.geometry = new away.base.Geometry();
}
else
{
this.geometry = geometry;
}
if ( material == null)
{
this.material = away.materials.DefaultMaterialManager.getDefaultMaterial(this);
}
else
{
this.material = material;
}
}
public bakeTransformations()
{
this.geometry.applyTransformation(this.transform);
this.transform.identity();
}
public get assetType():string
{
return away.library.AssetType.MESH;
}
private onGeometryBoundsInvalid(event:away.events.GeometryEvent)
{
this.pInvalidateBounds();//this.invalidateBounds();
}
/**
* Indicates whether or not the Mesh can cast shadows. Default value is true.
*/
public get castsShadows():boolean
{
return this._castsShadows;
}
public set castsShadows(value:boolean)
{
this._castsShadows = value;
}
/**
* Defines the animator of the mesh. Act on the mesh's geometry. Default value is null.
*/
public get animator():away.animators.IAnimator
{
return this._animator;
}
public set animator(value:away.animators.IAnimator)
{
away.Debug.throwPIR('Mesh' , 'set animator' , 'Partial Implementation')
/*
if (_animator)
_animator.removeOwner(this);
_animator = value;
// cause material to be unregistered and registered again to work with the new animation type (if possible)
var oldMaterial:MaterialBase = material;
material = null;
material = oldMaterial;
var len:number = _subMeshes.length;
var subMesh:SubMesh;
// reassign for each SubMesh
for (var i:number = 0; i < len; ++i) {
subMesh = _subMeshes[i];
oldMaterial = subMesh._material;
if (oldMaterial) {
subMesh.material = null;
subMesh.material = oldMaterial;
}
}
if (_animator)
_animator.addOwner(this);
*/
}
/**
* The geometry used by the mesh that provides it with its shape.
*/
public get geometry():away.base.Geometry
{
return this._geometry;
}
public set geometry(value:away.base.Geometry)
{
var i:number;
if (this._geometry)
{
this._geometry.removeEventListener(away.events.GeometryEvent.BOUNDS_INVALID, this.onGeometryBoundsInvalid , this);
this._geometry.removeEventListener(away.events.GeometryEvent.SUB_GEOMETRY_ADDED, this.onSubGeometryAdded, this);
this._geometry.removeEventListener(away.events.GeometryEvent.SUB_GEOMETRY_REMOVED, this.onSubGeometryRemoved, this);
for (i = 0; i < this._subMeshes.length; ++i)
{
this._subMeshes[i].dispose();
}
this._subMeshes.length = 0;
}
this._geometry = value;
if (this._geometry)
{
this._geometry.addEventListener(away.events.GeometryEvent.BOUNDS_INVALID, this.onGeometryBoundsInvalid , this );
this._geometry.addEventListener(away.events.GeometryEvent.SUB_GEOMETRY_ADDED, this.onSubGeometryAdded , this );
this._geometry.addEventListener(away.events.GeometryEvent.SUB_GEOMETRY_REMOVED, this.onSubGeometryRemoved , this );
//var subGeoms:Vector.<ISubGeometry> = _geometry.subGeometries;
var subGeoms:away.base.ISubGeometry[] = this._geometry.subGeometries;//
for (i = 0; i < subGeoms.length; ++i)
{
this.addSubMesh(subGeoms[i]);
}
}
if (this._material)
{
this._material.iRemoveOwner(this);
this._material.iAddOwner(this);
}
}
/**
* The material with which to render the Mesh.
*/
public get material():away.materials.MaterialBase
{
return this._material;
}
public set material(value:away.materials.MaterialBase)
{
if (value == this._material)
{
return;
}
if (this._material)
{
this._material.iRemoveOwner(this);
}
this._material = value;
if (this._material)
{
this._material.iAddOwner(this);
}
}
/**
* The SubMeshes out of which the Mesh consists. Every SubMesh can be assigned a material to override the Mesh's
* material.
*/
public get subMeshes():away.base.SubMesh[]//Vector.<SubMesh>
{
// Since this getter is invoked every iteration of the render loop, and
// the geometry construct could affect the sub-meshes, the geometry is
// validated here to give it a chance to rebuild.
this._geometry.iValidate();
return this._subMeshes;
}
/**
* Indicates whether or not the mesh share the same animation geometry.
*/
public get shareAnimationGeometry():boolean
{
return this._shareAnimationGeometry;
}
public set shareAnimationGeometry(value:boolean)
{
this._shareAnimationGeometry = value;
}
/**
* Clears the animation geometry of this mesh. It will cause animation to generate a new animation geometry. Work only when shareAnimationGeometry is false.
*/
public clearAnimationGeometry()
{
away.Debug.throwPIR( "away.entities.Mesh" , "away.entities.Mesh" , "Missing Dependency: IAnimator" );
/* TODO: Missing Dependency: IAnimator
var len:number = this._subMeshes.length;
for (var i:number = 0; i < len; ++i)
{
this._subMeshes[i].animationSubGeometry = null;
}
*/
}
/**
* @inheritDoc
*/
public dispose()
{
super.dispose();
this.material = null;
this.geometry = null;
}
/**
* Disposes mesh including the animator and children. This is a merely a convenience method.
* @return
*/
public disposeWithAnimatorAndChildren()
{
this.disposeWithChildren();
away.Debug.throwPIR( "away.entities.Mesh" , "away.entities.Mesh" , "Missing Dependency: IAnimator" );
/* TODO: Missing Dependency: IAnimator
if (this._animator)
{
this._animator.dispose();
}
*/
}
/**
* Clones this Mesh instance along with all it's children, while re-using the same
* material, geometry and animation set. The returned result will be a copy of this mesh,
* containing copies of all of it's children.
*
* Properties that are re-used (i.e. not cloned) by the new copy include name,
* geometry, and material. Properties that are cloned or created anew for the copy
* include subMeshes, children of the mesh, and the animator.
*
* If you want to copy just the mesh, reusing it's geometry and material while not
* cloning it's children, the simplest way is to create a new mesh manually:
*
*
* var clone : Mesh = new Mesh(original.geometry, original.material);
*
*/
public clone():away.entities.Mesh
{
var clone:away.entities.Mesh = new away.entities.Mesh(this._geometry, this._material);
clone.transform = this.transform;
clone.pivotPoint = this.pivotPoint;
clone.partition = this.partition;
clone.bounds = this._pBounds.clone(); // TODO: check _pBounds is the correct prop ( in case of problem / debug note )
clone.name = this.name;
clone.castsShadows = this.castsShadows;
clone.shareAnimationGeometry = this.shareAnimationGeometry;
clone.mouseEnabled = this.mouseEnabled;
clone.mouseChildren = this.mouseChildren;
//this is of course no proper cloning
//maybe use this instead?: http://blog.another-d-mention.ro/programming/how-to-clone-duplicate-an-object-in-actionscript-3/
clone.extra = this.extra;
var len:number = this._subMeshes.length;
for (var i:number = 0; i < len; ++i)
{
clone._subMeshes[i].material = this._subMeshes[i].material;
}
len = this.numChildren;
var obj : any;
for (i = 0; i < len; ++i)
{
obj = this.getChildAt(i).clone();
clone.addChild( <away.containers.ObjectContainer3D> obj ) ;
}
/* TODO: implement dependency IAnimator
if ( this._animator)
{
clone.animator = this._animator.clone();
}
*/
return clone;
}
/**
* @inheritDoc
*/
public pUpdateBounds()
{
this._pBounds.fromGeometry(this._geometry);
this._pBoundsInvalid = false;//this._boundsInvalid = false;
}
/**
* @inheritDoc
*/
public pCreateEntityPartitionNode():away.partition.EntityNode
{
return new away.partition.MeshNode(this);
}
/**
* Called when a SubGeometry was added to the Geometry.
*/
private onSubGeometryAdded(event:away.events.GeometryEvent)
{
this.addSubMesh( event.subGeometry );
}
/**
* Called when a SubGeometry was removed from the Geometry.
*/
private onSubGeometryRemoved(event:away.events.GeometryEvent)
{
var subMesh:away.base.SubMesh;
var subGeom:away.base.ISubGeometry = event.subGeometry;
var len:number = this._subMeshes.length;
var i:number;
// Important! This has to be done here, and not delayed until the
// next render loop, since this may be caused by the geometry being
// rebuilt IN THE RENDER LOOP. Invalidating and waiting will delay
// it until the NEXT RENDER FRAME which is probably not desirable.
for (i = 0; i < len; ++i)
{
subMesh = this._subMeshes[i];
if (subMesh.subGeometry == subGeom)
{
subMesh.dispose();
this._subMeshes.splice(i, 1);
break;
}
}
--len;
for (; i < len; ++i){
this._subMeshes[i]._iIndex = i;
}
}
/**
* Adds a SubMesh wrapping a SubGeometry.
*/
private addSubMesh(subGeometry:away.base.ISubGeometry)
{
var subMesh:away.base.SubMesh = new away.base.SubMesh(subGeometry, this, null);
var len:number = this._subMeshes.length;
subMesh._iIndex = len;
this._subMeshes[len] = subMesh;
this.pInvalidateBounds();
}
public getSubMeshForSubGeometry(subGeometry:away.base.SubGeometry):away.base.SubMesh
{
return this._subMeshes[this._geometry.subGeometries.indexOf(subGeometry)];
}
public iCollidesBefore(shortestCollisionDistance:number, findClosest:boolean):boolean
{
this._iPickingCollider.setLocalRay(this._iPickingCollisionVO.localRayPosition, this._iPickingCollisionVO.localRayDirection);
this._iPickingCollisionVO.renderable = null;
var len:number = this._subMeshes.length;
for (var i:number = 0; i < len; ++i) {
var subMesh:away.base.SubMesh = this._subMeshes[i];
//var ignoreFacesLookingAway:boolean = _material ? !_material.bothSides : true;
if (this._iPickingCollider.testSubMeshCollision(subMesh, this._iPickingCollisionVO, shortestCollisionDistance))
{
shortestCollisionDistance = this._iPickingCollisionVO.rayEntryDistance;
this._iPickingCollisionVO.renderable = subMesh;
if (!findClosest)
{
return true;
}
}
}
return this._iPickingCollisionVO.renderable != null;
}
}
}


1. Use the products array and the productNumber array to dynamically populate the select menu. Include the productNumbers as value atttributes.
2. Use the selectionFactors array to dynamically create a set of radio buttons.
3. Use the references array to dynamically create a set of check boxes.


DVICONCAT(1) DVICONCAT(1) NAME dviconcat - concatenate DVI files SYNOPSIS dviconcat [ -m magnification ] [ -o outfile ] list of files DESCRIPTION Dviconcat concatenates the named files (or standard input, if no file names are given) onto the standard output or the given outfile, creating a new DVI file usable by any of the TeX conversion programs, or even by dviconcat itself. The magnification of the output file is the same as that of the first input file unless the -m option is given. When dviconcat changes the magnification of any input file, it prints a warning to this effect. AUTHOR Chris Torek, University of Maryland SEE ALSO dviselect(1), latex(1), tex(1) MC-TeX User's Guide BUGS The program should be called dvicat, but that name was taken (for the driver for the C/A/T typesetter). DVICONCAT(1)


{% extends "base.html" %} {% load staticfiles %} {% load crispy_forms_tags %} {% block title %}{{ block.super }}Home{% endblock %} {% block navbar-left %} {% include "_navbar.html" with active_link="home" %} {% endblock %} {% block navbar-right %} {% if not user.is_authenticated %} Log in Sign up {% else %} {{ block.super }} {% endif %} {% endblock %} {% block splash %}
Fully experienced teacher makes your Korean better.
Sign up for Free!SpeakKo has issued by CNN news on last month, and customers rushed to their homepage to apply prior tests. Then their server exploded, but they restored and started their education service again. Now ...
Hillary Clinton and Donald Trump have a simple closing argument for voters: A loss in Tuesday's election would be catastrophic. With four days remaining before the election, the White House rivals ...
A 10-hour humanitarian pause in the besieged Syrian city of Aleppo was set to get under way Friday, but doubts remain whether it will be effective. The pause, which was to begin at ...


Some methods for the inference and clustering of univariate and multivariate functional data, using a generalization of Mahalanobis distance, along with some functions useful for the analysis of functional data. For further details, see Martino A., Ghiglietti, A., Ieva, F. and Paganoni A. M. (2017) <arXiv:1708.00386>.
| Version: | 1.0.1 |
| Depends: | R (≥ 3.3.0) |
| Imports: | graphics, stats |
| Suggests: | knitr, rmarkdown |
| Published: | 2018-04-06 |
| Author: | Andrea Martino [aut, cre], Andrea Ghiglietti [aut], Francesca Ieva [aut], Anna Maria Paganoni [aut] |
| Maintainer: | Andrea Martino <andrea.martino at polimi.it> |
| License: | GPL-3 |
| NeedsCompilation: | no |
| CRAN checks: | gmfd results |
| Reference manual: | gmfd.pdf |
| Vignettes: |
gmfd |
| Package source: | gmfd_1.0.1.tar.gz |
| Windows binaries: | r-devel: gmfd_1.0.1.zip, r-release: gmfd_1.0.1.zip, r-oldrel: gmfd_1.0.1.zip |
| OS X binaries: | r-release: gmfd_1.0.1.tgz, r-oldrel: gmfd_1.0.1.tgz |
| Old sources: | gmfd archive |
Please use the canonical form https://CRAN.R-project.org/package=gmfd to link to this page.


There is a piece of paper near the sculpture. I should be careful not to lose it and take it with me.


Remember Tamagotchi? McDo PH stokes nostalgia with throwback Happy Meal toys
by Coconuts ManilaMillennials will get a chance to relive their fondest childhood memories after McDonald’s Philippines announced yesterday that it will bring back this weekend some of the most iconic Happy Meal toys from over the years to celebrate the 40th anniversary of the much sought-after freebies.
As any serious collector would know, the Happy Meal toys were first released globally in 1979, with the toy craze reaching the Philippines in 1997.
Fourteen toys released by McDonald’s from the 1990s up until 2013 will be available in participating branches across the Philippines from Thursday until Sunday only, giving Filipinos a five-day window to indulge in some serious plastic nostalgia.
The catch: customers aren’t allowed to pick which toy they’ll receive, but one of them could be a Tamagotchi — the 1990s toy fad consisting of an egg-shaped device that housed a digital pet that you needed to feed, care for, and basically not let die. (Is that triggering good or bad memories?)
Diners can buy a Happy Meal box for between PHP115 (US$2) and PHP148 (US$3) and expect to get one of the following freebies:
- McNugget buddies: Cowboy, Mail Carrier, and Fireman (1998)
- Hamburger and Dino Happy Meal Box Changeables (1989, 1991)
- Grimace (1990)
- Hot Wheels Thunderbird (1993)
- Hamburglar (1995)
- Space Jam Bugs Bunny (1996)
- Patti the Platypus (1997)
- Tamagotchi and My Little Pony (1998)
- Furby (1999)
- Hello Kitty (2013)
The price of the Happy Meal depends on its contents, with options including a Chicken McDo, a Cheesy Burger McDo, or an Eggdesal, among others. (But really, does this have anything to do with the food?)
Since arriving in Manila in the ’80s, the fast food behemoth, referred to locally as “McDo,” has since tuned in not just to Filipinos’ affinity for plastic toy freebies, but also to local taste buds, serving uniquely Filipino favorites, like sweet-style McSpaghetti and Chicken McDo with rice.
FIND IT:
McDonald’s is at El Pueblo Real de Manila, Pasig City, Manila
Open 24 hours, daily; plus many branches across the Philippines
FB: @McDo.ph | Twitter: @McDo_PH
Read more about places to eat around the metro here .


Beta This is a test version of the layout of this page. Take the survey to help us improve it
Research and analysis
Evaluation of the impact of the Middle Leadership Development programme on participants and their schools.
This report on the Middle Leadership Development programme (MLDP) summarises:
The National Professional Qualification for Middle Leadership (NPQML) has replaced MLDP. The findings in this report will be useful to NPQML providers and there are ideas for best practice in leadership development for clusters and alliances of schools.


Have fun browsing through available tasks.  Ensure you don't miss out on a task by setting up a TaskMatch Alerts on your profile.
1. Found a task you want to complete?
2.Select the Make An Offer button and enter a price you think is fair
3. Don't forget to introduce yourself and tell the Job Poster what your skills are in the comments
Create an account and then start building your profile to make yourself attractive to people Hiring on TaskMatch. Once you’re ready to get going Browse Tasks, start commenting and Make an Offer if you think you’re the best person to complete the job.


You are looking at a manuscript analysis report. The analyzed paper is visible on the left. This panel allows you to
interact with the report. Available results are listed here - each with a general summary. Click the report name to highlight relevant fragments of
the text. Use the details link to see more information, and highlight individual items of the report.
Shortlist of 10 most important writing tips:
- Use active voice.
- Prefer strong verbs; do not turn them into nouns.
- Put statements in positive form.
- Omit needless words (filter / stop-words).
- Do not bury the very.
- One topic per paragraph: start with the topic sentence; end with emphasis or important consequences.
- Ensure logical flow of ideas from paragraph to paragraph.
- Choose the right punctuation: commas, colons, parenthesis, etc.
- Use emphatic words at the end of a sentence.
- Maintain parallel structure when enumerating terms.
Read more:


Tickets Page
There are many ways to experience this amazing event. If you are unable to join us on your couch for the entire festival, you are able to purchase an "A La Carte Day Pass" and choose your favorite lineup of the event.
For those of you planning on "vegging out" with us all weekend, the "Full Experience Pass" is for you. This includes a collectible bracelet commemorating the event.
For a truly one of a kind experience with your inner circle, purchase the "Ultimate Access Pass". This will include the full weekend of festival access for four, a pack of commemorative bracelets, 4 collectible posters with the full band lineups, and a brief "pre-performance" skype session with members of a band of your choosing. This package will help you and your friends create a lasting memory of the festival, long after the world goes back to normal!
| Ticketing Option | Package inclusions | Price |
|---|---|---|
| "A La Carte" Day Pass | any 1 day festival access | $25 (1)/$90 (4) |
| Full Experience Pass | 3 day festival access/wristband | $65 (1)/$240 (4) |
| Ultimate Access Pass | 3 day festival access/wristband/poster/"pre-show skype call" | $500 (4) |


Class Tetromino
- java.lang.Object
-
- hu.klenium.tetris.logic.tetromino.Tetromino
-
public class Tetromino extends java.lang.Object
A shape in Tetris game, which can be controlled by the player.
A tetromino is a geometric shape composed of four squares, connected orthogonally. The tetromino is part of one board. It can be moved left, right, or down, and can be rotated to right by the player. These operations may fail if the board is not empty at some point. Tetrominoes can't overlap previously fallen tetromino parts located on the board. When the tetromino can't move down any more, it's added to the board's table, and a new Tetromino is created.
-
-
Field Summary
Fields Modifier and Type Field Description private Board
board
The board which this tetromino belongs to.private TetrominoData[]
parts
Data of the tetromino in each rotation.private Point
position
Coordinates of this tetromino.private int
rotation
Current rotation of the tetromino.private int
type
The type determines the shape of the tetromino.
-
Method Summary
Modifier and Type Method Description private boolean
canPushBy(Point delta)
Checks that the thetromino can be pushed away by the given values or not.TetrominoData
getCurrentData()
Gives access to the tetromino's data.Point
getPosition()
Tells the tetromino's position over the board's grid.int
getType()
Tells this tetromino's type.boolean
moveDown()
Tries to move the tetromino down by one.boolean
moveLeft()
Tries to move the tetromino left by one.boolean
moveRight()
Tries to move the tetromino right by one.boolean
moveToInitialPos()
Tries to set the tetromino's initial position after it is created.boolean
rotateRight()
Tries to rotate the tetromino by 90 degrees to right.private boolean
tryPush(Point delta)
Check if moving is possible, and if it is, updates the tetromino's state.
-
-
-
Field Detail
-
board
private final Board board
The board which this tetromino belongs to.
-
type
private final int type
The type determines the shape of the tetromino. Each type has a different shape, they has different views.
This is the index ofTetrominoDataFactory.rawData
.
-
parts
private final TetrominoData[] parts
Data of the tetromino in each rotation. The data contains the tetromino's cells in that rotation, and the bounding box's size.
The index is the rotation. It's length can be less than 4 if two or more rotations have the same data.
-
position
private Point position
Coordinates of this tetromino. It points to the top-left side of the current bounding box (stored inparts
).
-
rotation
private int rotation
Current rotation of the tetromino.
Its value can be bettween 0-3. It's used to indexparts
.
-
-
Constructor Detail
-
Tetromino
public Tetromino(int type, Board board)
Initializes a new falling tetromino.- Parameters:
type
- Type of this tetromino.board
- The game's board which this tetromino belongs to.
-
-
Method Detail
-
getCurrentData
public TetrominoData getCurrentData()
Gives access to the tetromino's data. It contaions each parts, and their bounding box.- Returns:
- Parts in the current rotation.
- See Also:
parts
-
getPosition
public Point getPosition()
Tells the tetromino's position over the board's grid.- Returns:
- The top-left coordinate of the tetromino's bounding box.
- See Also:
position
-
getType
public int getType()
Tells this tetromino's type. Used to display the falling tetromino, and create board cells.- Returns:
- The tetromino's type.
- See Also:
type
-
moveToInitialPos
public boolean moveToInitialPos()
Tries to set the tetromino's initial position after it is created. This position is the board's top-center point.- Returns:
- True if the tetromino could be moved to the specificed position, false otherwise (it also causes game over).
-
rotateRight
public boolean rotateRight()
Tries to rotate the tetromino by 90 degrees to right. If it isn't possible, it'll try to move the tetromino away horizontally, so that if the tetromino is near the board's edge, the player still can perform the rotation easily.- Returns:
- True if the rotating was successful, false otherwise.
-
moveRight
public boolean moveRight()
Tries to move the tetromino right by one.- Returns:
- True if the moving was successful, false otherwise.
-
moveLeft
public boolean moveLeft()
Tries to move the tetromino left by one.- Returns:
- True if the moving was successful, false otherwise.
-
moveDown
public boolean moveDown()
Tries to move the tetromino down by one.- Returns:
- True if the moving was successful, false otherwise.
-
tryPush
private boolean tryPush(Point delta)
Check if moving is possible, and if it is, updates the tetromino's state.- Parameters:
delta
- Difference bettween the current and the target position.- Returns:
- True if the moving was successful, false otherwise.
-
canPushBy
private boolean canPushBy(Point delta)
Checks that the thetromino can be pushed away by the given values or not.- Parameters:
delta
- Difference bettween the current and the target position.- Returns:
- True if moving to position current+delta if possible, false otherwise.
-
-


{% extends "base.html" %} {% block title %}About{% endblock %} {% block title_path %}About{% endblock %} {% block content %}
FlaskPost was written by William Davenport. Contact him via email.
The source for FlaskPost can be found on GitHub. It is licensed under the Apache License.
Flaskpost was build using Armin Ronacher's Flask Microframework for Python.
Flaskpost uses a Postgres database.
Flaskpost is hosted on Heroku.
{% endblock %}


Police Scotland hunt knife thugs after stabbing in Morrisons car park in Bellshill
The 37-year-old victim was taken to hospital for "serious" stab wounds after the attack outside the supermarket.
by Craig Paton, Graeme ThomsonPolice are appealing for witnesses after a man was stabbed in a supermarket car park.
The 37-year-old was taken to hospital for "serious" stab wounds after the attack, in the car park of Morrisons on John Street, Bellshill, Lanarkshire, at around 10pm on Friday.
Police say the man was attacked by two suspects, who were seen "running off".
Local police have now appealed for people to come forward, singling out one onlooker in particular who was stood outside a nearby pub.
Detective constable Peter King, from Wishaw CID, said: "This incident has resulted in a man sustaining serious injuries and it is vital that we trace the persons responsible.
"I'd like to speak to anyone who may have witnessed the attack or anyone who was in the vicinity at the time and may have seen the two suspects running off afterwards.
"In particular I'd like to speak to a man who was seen sitting on a wall at the bus stop across from the New Alhambra Bar on Motherwell Road, Bellshill, at the time the attack took place."
Anyone with information is asked to contact police on 101, quoting the reference number 4324 of November 22.


Reporting Bugs in Open vSwitch
We are eager to hear from users about problems that they have encountered with
Open vSwitch. This file documents how best to report bugs so as to ensure that
they can be fixed as quickly as possible.
Please report bugs by sending email to<EMAIL_ADDRESS>For reporting security vulnerabilities, please read SECURITY.rst.
The most important parts of your bug report are the following:
- What you did that make the problem appear.
- What you expected to happen.
- What actually happened.
Please also include the following information:
- The Open vSwitch version number (as output by ovs-vswitchd --version).
- The Git commit number (as output by git rev-parse HEAD), if you built
from a Git snapshot.
- Any local patches or changes you have applied (if any).
The following are also handy sometimes:
- The kernel version on which Open vSwitch is running (from /proc/version)
and the distribution and version number of your OS (e.g. "Centos 5.0").
- The contents of the vswitchd configuration database (usually
/etc/openvswitch/conf.db).
- The output of ovs-dpctl show.
- If you have Open vSwitch configured to connect to an OpenFlow
controller, the output of ovs-ofctl show <bridge> for each
<bridge> configured in the vswitchd configuration database.
- A fix or workaround, if you have one.
- Any other information that you think might be relevant.
Important
<EMAIL_ADDRESS>is a public mailing list, to which anyone can subscribe,
so do not include confidential information in your bug report.


---
layout: archive
title: Lean Prover Zulip Chat Archive
permalink: 113489newmembers/58188leanbook.html
---
The archive URL format has changed. Please find this page at:
https://leanprover-community.github.io/archive/stream/113489-new-members/topic/lean.20book.html


Version: 0.9.0
Tunes is connected as followed on Cerberus:
| Tunes | Mainboard |
|---|---|
| Socket Type P (pwm on pin9) | Socket 4 |
using System.Threading;
using Bauland.Gadgeteer;
using GHIElectronics.TinyCLR.Pins;
namespace TestTunes
{
static class Program
{
static void Main()
{
// Tunes connected on Socket 4 (Type P) of FEZ Cerberus mainboard.
Tunes tunes = new Tunes(FEZCerberus.PwmPin.Controller3.Id, FEZCerberus.PwmPin.Controller3.Socket4.Pin9);
int duration = 400;
int durationRest = 20;
Melody melody = new Melody(
new MusicNote(Tone.G3, duration), new MusicNote(Tone.Rest, durationRest), new MusicNote(Tone.G3, duration), new MusicNote(Tone.Rest, durationRest), new MusicNote(Tone.G3, duration), new MusicNote(Tone.Rest, durationRest),
new MusicNote(Tone.G3, duration), new MusicNote(Tone.Rest, durationRest), new MusicNote(Tone.B3, duration), new MusicNote(Tone.Rest, durationRest), new MusicNote(Tone.G3, duration), new MusicNote(Tone.Rest, durationRest),
new MusicNote(Tone.A3, duration), new MusicNote(Tone.Rest, durationRest), new MusicNote(Tone.A3, duration), new MusicNote(Tone.Rest, durationRest), new MusicNote(Tone.A3, duration), new MusicNote(Tone.Rest, durationRest),
new MusicNote(Tone.A3, duration), new MusicNote(Tone.Rest, durationRest), new MusicNote(Tone.C4, duration));
tunes.Play(melody);
while (true)
{
Thread.Sleep(20);
}
}
}
}


In my early stages of research of DBC, and what materials we would be learning, I often came across Ruby on Rails. I understood that Ruby was a programming language, but I was unsure how Ruby on Rails differed from the actual language. In doing a little bit of reading on Ruby on Rails, I found that they are quite different. While Ruby is the programming language, Ruby on Rails is a web application framework.
Ruby on Rails is basically a starter kit for web applications. It provides you with what it believes each web application needs at it's core. In doing so, it ensures that all applications built using Ruby on Rails, on a basic level, are similar and use the same conventions. Ruby on Rails is an opinionated software, which means that it makes basic assumptions that there is a best way to do things, and it is designed to encourage those best practices, and discourages any alternatives.
Ruby on Rails, from my basic understanding, uses an MVC software pattern. 'M' referring to model, 'V' to view, and 'C' to controller. These three parts are interconnected to make the applications run.
The user uses the controller to manipulate the model, which updates what the user sees in the view. Think about the diagram as a text editor. The user uses the keyboard to type in a sentence, which manipulates the model(the document), and displays the changes on the view(the updated document).
I think the biggest advantage to using Ruby on Rails is the fact that it automates the basic code needed to create an application. It not only saves time from having to create those files, but it also ensures that each Ruby on Rails project is created the same way, which makes debugging, that much easier. I am definitely excited to learn more about Ruby on Rails, and to start using it to build projects.


Our team of qualified IT experts can help your business at any stage of it’s growth.
Founder
Maxime Hilaire holds a Master’s computer science and has 9 years’ experience as a full stack software engineer. He...


Regular underline Better than regular
Regular typography Bit better than regular
↻ Refresh
“The Answer?” said Deep Thought. “The Answer to what?”
“Life!” urged Fook.
“The Universe!” said Lunkwill.
“Everything!” they said in chorus.
“The Answer?” said Deep Thought. “The Answer to what?”
“Life!” urged Fook.
“The Universe!” said Lunkwill.
“Everything!” they said in chorus.


Copa Libertadores kings Flamengo add league title to complete historic double
by FSA EditorAfter winning the Copa Libertadores on Saturday, Flamengo were crowned Brasileirao champions on Sunday thanks to Gremio beating Palmeiras.
Flamengo have been crowned Brazilian champions for the seventh time in their history and the first time in 10 years – just one day after winning the Copa Libertadores.
Gremio’s win at Palmeiras left Flamengo with an insurmountable 13-point lead at the top of Serie A and Jorge Jesus’ side will be able to enjoy their remaining four games of the season with the title secured.
Two late goals from Gabriel Barbosa earned Flamengo a dramatic 2-1 victory over River Plate in Saturday’s Copa Libertadores final and sparked wild celebrations in the streets of Rio.
The weekend was made even more unforgettable for Flamengo supporters when Pepe scored in second-half stoppage-time to clinch a 2-1 victory for Gremio at Palmeiras, handing the league leaders their first Brasileirao since 2009.


{% extends 'base.html' %} {% block head %} {% end %} {% block content %}
This user's runs are not being shared.


1 Chronicles 17:18
What can David speak more to thee for the honor of thy servant? for thou knowest thy servant.


Ask someone to confirm your identity
Dear C Moore,
Application reference: PEX12345687890
Your passport application is on hold. You look very different in your old and new photos.
You need to ask someone to confirm your identity. This is like a countersignature but they can do it online.
What you need to do
Sign into your tracking page to check who can do this for you and enter their details. Go to https://www.passport.service.gov.uk/track.
Make sure your identity is confirmed before 14 September 2017 or you’ll need to start a new application.
When you need to do this
You need to do this before 14 September 2017 or the person applying will need to start a new application.
For other queries, you can contact HM Passport Office at: https://www.passport.service.gov.uk/help.
Please don't reply to this email - it's an automatic message from an unmonitored account.
|


class ConnectionResolver implements ConnectionResolverInterface
Methods
| void |
__construct(array $connections = array())
Create a new connection resolver instance. |
|
| Connection |
connection(string $name = null)
Get a database connection instance. |
|
| void |
addConnection(string $name, Connection $connection)
Add a connection to the resolver. |
|
| bool |
hasConnection(string $name)
Check if a connection has been registered. |
|
| string |
getDefaultConnection()
Get the default connection name. |
|
| void |
setDefaultConnection(string $name)
Set the default connection name. |
Details
at line 25
public void
__construct(array $connections = array())
Create a new connection resolver instance.
at line 39
public Connection
connection(string $name = null)
Get a database connection instance.
at line 53
public void
addConnection(string $name, Connection $connection)
Add a connection to the resolver.
at line 64
public bool
hasConnection(string $name)
Check if a connection has been registered.
at line 74
public string
getDefaultConnection()
Get the default connection name.
at line 85
public void
setDefaultConnection(string $name)
Set the default connection name.


QualCoder is used for qualitative data analysis. All project files are stored in a project.qda folder.
Text files can be imported from plain text, docx, odt and pdf format. Image files from jpg, png and gif can be imported. Text files can also be entered manually. Survey spreadsheets in csv format can be imported.
Text can be assigned codes. Codes can be ordered into categories. Categories can be stored within a hierarchical tree structure, so several similar categories can be assigned into overarching categories. Annotations can be added to the text. Various code reports can be generated. Reports can be exported as plain text or html files. Codes and categories can be renamed, merged and deleted. Memos can be assigned to the entire project, codes, files, cases and attributes.
Create a new project. The project is stored in a projectname.qda folder. The project folder contains sub folders including folders for documents, images and (for the future) audio files.
Use this option to select and open a project. When opening a project, select the projectname.qda folder and press the open button.
Use this option to close a currently open project.
General notes about the current project can be entered and viewed here.
There are several options in the settings screen. The current coder name can be entered here, or it can be left as default. A second coder name can be entered. Choice of coder for the current session can be changed via the drop down list. Settings and Log files are located in the user's home directory.
Font and font size can be changed. It is recommended that the font size for the code trees be fairly small e.g. size 10. A default directory can be entered in the settings also.
The Manage files dialog shows any files that have been loaded. New files can be loaded using the Import button. Files can be imported from plain text, .docx, .odt and pdf. Some pdf files may not import very well. Image files can be imported from jpg, jpeg, png and gif. These are stored in the qda/images folder.
Memos can be added to each file. The memo square says Yes indicating a memo exists. To delete any memo, open the memo, delete all text from it and click the OK button.
File names can be changed by double-clicking on the file name and entering a new name.
New text files can be created by pressing the Create button.
File attributes can be added to describe and classify the files.
Text files can be exported to plain text and files can be deleted.
Cases are useful for assigning attributes such as age and sex. You can add a memo to each case and rename a case by double-clicking on a case name. Cases can be manually added.
Cases can be imported (as a once off procedure) from a csv file that contains all the cases and any attributes. The first column of the csv file must have the case ids and the file must have a header row. Each of the remaining columns (if any) contain the attribute name and attribute details for each case.
The View case button shows all the text in all the files that is associated with the selected case. It also identifies (but currently does not display) the image files.
You can assign all the text of a file to a case by selecting a case then clicking Add file to case. Image files can be added to a case.
The Open file button show the text of a file. Any currently selected case text will be underlined in red.
Adding and removing text assigned to a case:
Open a file to view it. The file will show in the right hand screen. Select a case then select text with the mouse. Right click to Mark this text to assign it to the case. Similarly, with marked text, you can Unmark using the mouse right click.
You can automatically assign portion of file text to a case by selecting a case then clicking the Auto assign file text button. You will be asked which file or files to assign the case to. Next you need to enter the start and end marks. An example may be a start mark of '[id1]' and an example end mark may be '['.
Cases can be deleted using the Delete case button.
Select Manage journals. You can create journals to write down your thoughts and ideas when investigating the text and developing themes. Journal entries are dated and can be exported or deleted.
Attributes provide additional detail about files or cases. The Manage Attributes dialog allows manual addition or deletion of attributes. Each attribute can be assigned to either the cases or the files. Attributes can be of a character or numeric type. Memos can be given for attributes. Double-click on an attribute name to change the attribute name.
Surveys must be in csv file format. A dialog box will open and the survey delimiter must be chosen. The delimiter is typically a comma ‘,’ but can be a tab or other character. Type ta, tb or tab to tell QualCoder the file is in tab format. Select a quote format: NONE means no quote, MINIMAL means text is quoted but numbers are not, and ALL means every variable of interest is quoted.
This is the central dialog for assigning codes to text. Once text segments are coded, hovering the mouse over the coded text shows the code name as a tooltip. Clicking on the coded segment also shows the code name.
The left hand side shows existing codes. Codes can be assigned a colour and moved under other codes in a tree-like hierarchy. Codes can be assigned memos.
To begin coding you need to view some text. Select a file to view from the list presented in this dialog.
Right click to add codes. Memos can be added and are used for the basis of a codebook. Codes can also be assigned a colour. If no colour has been selected the text is marked with a gray colour.
To delete a code, select a code, right click, and choose delete. Right click to rename a code or change a code colour. Similarly, right click to add, rename, delete or merge code categories.
You can drag and drop codes into different categories. Dragging a code onto another code will merge the two codes together.
Select a code then click the Auto Code button. Enter the text you want to autocode. The next dialog asks for one or more files to autocode. All matching text will be assigned the selected code.
Select a file then select code. Highlight some text, right click and choose mark to assign the code to the text.
Add an annotation (like a memo) to the text. Select some text, right click and choose annotate from the menu. All the annotated text will become bold to mark the position of the annotation. To remove an annotation, open the annotation and delete all the text in your notes.
To remove a code from text, click on the coded text then right click and choose unmark.
Enter text in to the text box then click on the button to jump to each spot in the text that matches your selection.
Select an image. Once selected, the image will be shown in the screen. Any coded image areas will be marked with a red box. Hovering the mouse over a coded area will show the code in a tooltip.
An image can be scaled down to a smaller size using the slider at the bottom of the dialog.
To mark an image area, select a code, then with the left mouse button, mark an area of the image. You can add a memo by right clicking and choosing Memo.
You can remove a coded area by right clicking inside the coded area and selecting Unmark.
Right click to add codes. Memos can be added and are used for the basis of a codebook. Codes can also be assigned a colour. If no colour has been selected the text is marked with a default colour.
To delete a code, select a code, right click, and choose delete.
Right click to rename a code or change a code colour.
Similarly, right click to add, rename, delete or merge code categories.
Codes and categories can be dragged to merge or be assigned under other categories.
A node graph of categories and codes is displayed. Various options are available including selection of particular categories. Nodes can be moved around using the mouse for easier viewing. Right-clicking on a node will display the relevant coded text or memo. Node text can be edited for easier viewing, but clicking on the node and typing any changes. The graph cannot be exported, but you can take a screenshot.
A codebook is a list of your codes. Each code memo should detail the reasons behind assigning each code to the text. The codebook is exported to a text file.
This dialog gives a list of coded text based on your selections.
One or more codes need to be selected and one or both of coder 1 and coder 2 need to be selected. The Search button will present the results. If a category is selected all codes in that category are also selected. Multiple categories can be selected using the mouse and the 'ctrl' button.
Codings can be narrowed down by using the Search Text function, or the File selection Case selection or Attribute selection buttons. Only codings within the selected files or cases will be presented. If text is entered into the Search text field, only codings which contain the matching text will be presented. Codings can also be narrowed down to case selections using the Case selection button. Note that when case selections are used, file selections are ignored. Also when file selections are used, case selections are ignored. The Attribute selection button opens a dialog window where you can select attributes for files and cases, for example: only interview files for people aged > 60.
If you are creating a report based on Case selection, then the code tree pane is hidden. Instead two panes are shown. One pane shows the codings in a list, the other pane shows a matrix with one case on each row and top-level categories in each column. Each of the three panes can be widened or narrowed by dragging with the mouse on the bar that splits each section.
Reports can be exported to text, open document (ODT) or html files.
This dialog contains three panes. The top pane is where SQL statements are entered and the bottom pane contains the results of queries. The left pane contains tables and field names. Double-clicking on a field name adds it to the SQL statement. Results can be exported to a text file. If you are not familiar with SQL take care as you will be able to update and delete the data as well as select data.
Most fields are text. Fields ending in id, x1, y1, width, height, pos0 and pos1 are integer.
Selection results can be exported as a delimited file.
This dialog allows you to compare the coding of two coders for text codings. The comparisons can be for all codes or for selected codes and categories. Percentage agreement and Cohen’s Kappa are calculated. Results can be exported as a text file.
The following results for each code are shown:
Agreement % shows agreement for a combination of coded and non-coded text characters.
A and B % shows agreement for the only the coded text characters divided by the total characters in the text.
Not A and Not B % shows the total of the uncoded text divided by the total characters in the text.
Disagree % shows the percentage of all the coded and non-coded text that did not match between coders. It is the same as 100 - the Agree %.
Cohen's Kappa is calculated based on the information in Wikipedia https://en.wikipedia.org/wiki/Cohen%27s_kappa
TODO.
Contains these instructions and software development details.
This software has currently only been tested on Linux Mint using an Australian English character set.
Do a coding and word summary.
Investigate text mining options.
Potentially incorporate audio/video formats.
Once python3 is installed you also require PyQt5. From the command line run the following to install pyqt5:
Windows:
pip install pyqt
Linux:
sudo pip3 install pyqt


{% load staticfiles %}
{{entry.session.convention.name}}
International {{entry.session.get_kind_display}} Contest
July 6 - 9, 2016
Representing: {{entry.representing.long_name}} District
Members: {{entry.tenor.person.name}}, {{entry.lead.person.name}}, {{entry.baritone.person.name}} {{entry.bass.person.name}}
Representing: {{entry.representing.long_name}}
Directed By: {{entry.director}} {{entry.codirector|default_if_none:""}}
Men on Stage: {{entry.men}}
Order of Appearance: {{appearances.first.num}}
{{contestant.contest.award.name}}: {{contestant.rank}}
{% endfor %}| Songs | MUS | per | SNG | Total |
|---|---|---|---|---|
|
{% for appearance in appearances %}
{% for song in appearance.songs.all %}
{{song.submission.title|truncatewords_html:10}} {% endfor %} {{appearance.round.get_kind_display}} (OA: {{appearance.num}}, Rank: {{appearance.rank}}) {% endfor %} Total |
{% for appearance in appearances %}
{% for song in appearance.songs.all %}
{{song.mus_points}} ({{song.mus_score|floatformat:1}}) {% endfor %} {{appearance.mus_points}} ({{appearance.mus_score|floatformat:1}}) {% endfor %} {{entry.mus_points}} ({{entry.mus_score|floatformat:1}}) |
{% for appearance in appearances %}
{% for song in appearance.songs.all %}
{{song.per_points}} ({{song.per_score|floatformat:1}}) {% endfor %} {{appearance.per_points}} ({{appearance.per_score|floatformat:1}}) {% endfor %} {{entry.per_points}} ({{entry.per_score|floatformat:1}}) |
{% for appearance in appearances %}
{% for song in appearance.songs.all %}
{{song.sng_points}} ({{song.sng_score|floatformat:1}}) {% endfor %} {{appearance.sng_points}} ({{appearance.sng_score|floatformat:1}}) {% endfor %} {{entry.sng_points}} ({{entry.sng_score|floatformat:1}}) |
{% for appearance in appearances %}
{% for song in appearance.songs.all %}
{{song.tot_points}} ({{song.tot_score|floatformat:1}}) {% endfor %} {{appearance.tot_points}} ({{appearance.tot_score|floatformat:1}}) {% endfor %} {{entry.tot_points}} ({{entry.tot_score|floatformat:1}}) |
| Songs | {% for assignment in assignments %}{{assignment.designation}} | {% endfor %}
|---|---|
|
{% for appearance in appearances %}
{% for song in appearance.songs.all %}
{{song.submission.title|truncatewords_html:4}} {% endfor %} {% endfor %} |
{% for assignment in assignments %}
{% for appearance in appearances %}
{% for song in appearance.songs.all %}
{% for score in song.scores.all %}
{% if score.assignment == assignment %}{{score.points}} {% endif %} {% endfor %} {% endfor %} {% endfor %} |
{% endfor %}
| {{category.grouper}} | {% for assignment in category.list %}{{assignment.designation}}: {{assignment.judge.person.common_name}} | {% endfor %}


The arbitrary/div.h
header defines an arbitrary-precision division operator.
#include <chaos/preprocessor/arbitrary/div.h>
The CHAOS_PP_ARBITRARY_DIV
macro computes the quotient produced by dividing two arbitrary-precision values.
CHAOS_PP_ARBITRARY_DIV
(x, y)
The dividend.
The divisor.
This macro expands to an arbitrary-precision value that represents the quotient produced by dividing x by y. If y is an arbitrary-precision value representing zero, this macro intentionally produces an error.
#include<chaos/preprocessor/arbitrary/demote.h>
#include<chaos/preprocessor/arbitrary/div.h>
CHAOS_PP_ARBITRARY_DEMOTE
(CHAOS_PP_ARBITRARY_DIV
( (1)(2)(3)(4), (5)(0) )) // 24
The CHAOS_PP_ARBITRARY_DIV_ID
macro indirectly expands to CHAOS_PP_ARBITRARY_DIV
.
CHAOS_PP_ARBITRARY_DIV_ID
()
This macro exists only for uniformity with other macros that require indirect invocation.
The CHAOS_PP_ARBITRARY_DIV_
macro expands to a λ expression representing CHAOS_PP_ARBITRARY_DIV
.
CHAOS_PP_ARBITRARY_DIV_
This macro is a shorthand form of the following λ binding:


Thanks, your GData Health account was created.
You can start interacting with your health profiles using the command line.
$ AUTH=`curl --data "Email=$EMAIL&Passwd=$PASSWORD&service=health" "https://gdatahealth.appspot.com/accounts/ClientLogin" | grep Auth | cut -d'=' -f2` $ curl --header "Authorization: auth=$AUTH" "https://gdatahealth.appspot.com/health/feeds/profile/list"
Most of the functionality described at the Google Health API documentation page will work with GData Health.


Public Review & Comment in British Columbia
The Application Lifecycle
It can take several seconds to fulfill an application, which is a lot
Learn MoreTopics of Interest
Profiling key topics of interest regarding application activities in British Columbia
Learn More


Examples
These examples all all based on some sample data kindly provided by @apr.
If you want to try them out:
-
git clone https://github.com/binaryfoo/lagotto.git
-
cd lagotto
-
mvn package -DskipTests
-
./lago <… example …>
Filtering
Only output entries with an MTI (field 0) of 2100 using --field.
lago log_samples/q2.log --field mti=2100 -n 1
<log realm="channel/<IP_ADDRESS>:9001" at="Thu Dec 18 15:12:40 UYST 2014.330" lifespan="1ms"> <send> <isomsg direction="outgoing"> <!-- org.jpos.iso.packager.GenericPackager[cfg/jcard.xml] --> <field id="0" value="2100"/> <field id="2" value="6009330000000021"/> <field id="3" value="300000"/> <field id="4" value="8582000000000000"/> <field id="7" value="1218151240"/> <field id="11" value="000000000002"/> <field id="12" value="20141218151240"/> <field id="14" value="1001"/> <field id="15" value="20141218"/> <field id="17" value="1218"/> <field id="22" value="10000000080000000004000001000000" type="binary"/> <field id="32" value="000001"/> <field id="37" value="180312760317"/> <field id="41" value="29110001"/> <field id="42" value="001001"/> <isomsg id="43"> <field id="2" value="jCard Selftest system"/> <field id="4" value="Montevideo"/> <field id="5" value="MV"/> <field id="7" value="UY"/> </isomsg> <isomsg id="113"> <field id="2" value="106"/> </isomsg> </isomsg> </send> </log>
The --field option take an argument of the form path=value. Path can be dot delimited like 48.1.1. The -n limits the number of entries output. Like in 'nix head and tail.
To make the remaining example output shorter let’s introduce the idea tabular output (--table). List out just the fields you’re interested in.
lago log_samples/q2.log --table time,2,11 -f mti=2100 -n 1
time,2,11 15:12:40.330,6009330000000021,000000000002
Whilst comma and tab separated data might be good for import into Excel/Google Docs/Libre Office/MySQL an ASCII table like mysql’s command line client is a bit easier for humans to parse on the command line.
lago log_samples/q2.log -o ascii --table time,2,11 -f mti=2100 -n 1
================================================== | time | 2 | 11 | ================================================== | 15:12:40.330 |<PHONE_NUMBER>000021 |<PHONE_NUMBER>02 | ==================================================
Back to filtering, you can filter using somewhat familiar operators: <, >, !=, ~, and ~/regex/. The last two are contains and regex.
To show log events that took more than 300ms to receive or send use >. The following two receives aren’t really interesting. A send with a non zero lifespan usually means a GC pause or TCP back pressure.
lago log_samples/q2.log -o ascii --table time,msgType,lifespan,src -f 'lifespan>300'
=========================================================== | time | msgType | lifespan | src | =========================================================== | 15:12:41.281 | peer-disconnect | 362 | q2.log:5544 | | 15:12:41.281 | receive | 356 | q2.log:5549 | ===========================================================
You can also use --grep to just search the log entries as text.
lago log_samples/q2.log --grep suspicious -o ascii -t time,63,src
================================================ | time | 63 | src | ================================================ | 15:12:40.537 | Card suspicious | q2.log:1020 | | 15:12:40.538 | Card suspicious | q2.log:1056 | | 15:12:40.539 | Card suspicious | q2.log:1092 | | 15:12:40.760 | Card suspicious | q2.log:1626 | | 15:12:40.761 | Card suspicious | q2.log:1661 | | 15:12:40.763 | Card suspicious | q2.log:1696 | | 15:12:40.767 | Card suspicious | q2.log:1812 | ================================================
Aggregation
Some rather basic SQL like group by and aggregation operators are supported.
Show a table of message type and count.
lago log_samples/q2.log -o ascii -t mti,count
================ | mti | count | ================ | | 92 | | 2800 | 2 | | 2810 | 2 | | 2100 | 35 | | 2110 | 33 | | 2420 | 3 | | 2430 | 3 | ================
Count rows matching a condition (like approved).
lago log_samples/q2.log -o ascii -t 'mti,count,count(39=0000)'
================================= | mti | count | count(39=0000) | ================================= | | 92 | 0 | | 2800 | 2 | 0 | | 2810 | 2 | 2 | | 2100 | 35 | 0 | | 2110 | 33 | 0 | | 2420 | 3 | 0 | | 2430 | 3 | 0 | =================================
Combine with filtering to get the spread of response codes for auths.
lago log_samples/q2.log -o ascii -t '39,count' --field '39!=0000' --field mti=2110
================ | 39 | count | ================ | 1011 | 2 | | 1015 | 3 | | 1002 | 5 | | 1014 | 2 | | 1803 | 21 | ================
Bucketing results by time. You can use a joda time format or a few extras to aggregate by 10 minute (HH:m0) or 10 second (HH:mm:s0) buckets.
lago log_samples/q2.log -o ascii -t 'time(HH:mm:s0),count'
========================== | time(HH:mm:s0) | count | ========================== | 15:12:30 | 18 | | 15:12:40 | 152 | ==========================
The results aren’t that interesting with such a small data set.
TODO group_concat
TODO group_sample
Pairing Requests & Responses
Match responses to requests using --pair. Show one line per pair including the round trip time (rtt): response - request time
lago log_samples/q2.log -o ascii -t time,mti,11,rtt --pair
============================================ | time | mti | 11 | rtt | ============================================ | 15:12:40.288 | 2800 |<PHONE_NUMBER>01 | 4 | | 15:12:40.287 | 2800 |<PHONE_NUMBER>01 | 6 | | 15:12:40.331 | 2100 |<PHONE_NUMBER>02 | 141 | | 15:12:40.330 | 2100 |<PHONE_NUMBER>02 | 143 | | 15:12:40.496 | 2100 |<PHONE_NUMBER>03 | 6 | | 15:12:40.496 | 2100 |<PHONE_NUMBER>03 | 7 | | 15:12:40.515 | 2100 |<PHONE_NUMBER>04 | 22 | | 15:12:40.515 | 2100 |<PHONE_NUMBER>04 | 23 | | 15:12:40.548 | 2100 |<PHONE_NUMBER>05 | 149 | | 15:12:40.547 | 2100 |<PHONE_NUMBER>05 | 150 | | 15:12:40.711 | 2100 |<PHONE_NUMBER>06 | 49 | | 15:12:40.710 | 2100 |<PHONE_NUMBER>06 | 51 | | 15:12:40.775 | 2100 |<PHONE_NUMBER>07 | 6 | | 15:12:40.774 | 2100 |<PHONE_NUMBER>07 | 8 | | 15:12:40.794 | 2100 |<PHONE_NUMBER>08 | 10 | | 15:12:40.793 | 2100 |<PHONE_NUMBER>08 | 12 | | 15:12:40.817 | 2100 |<PHONE_NUMBER>09 | 8 | | 15:12:40.817 | 2100 |<PHONE_NUMBER>09 | 8 | | 15:12:40.837 | 2100 |<PHONE_NUMBER>10 | 9 | | 15:12:40.836 | 2100 |<PHONE_NUMBER>10 | 11 | | 15:12:40.862 | 2100 |<PHONE_NUMBER>11 | 5 | | 15:12:40.861 | 2100 |<PHONE_NUMBER>11 | 7 | | 15:12:40.878 | 2100 |<PHONE_NUMBER>12 | 6 | | 15:12:40.877 | 2100 |<PHONE_NUMBER>12 | 8 | | 15:12:40.896 | 2100 |<PHONE_NUMBER>13 | 6 | | 15:12:40.896 | 2100 |<PHONE_NUMBER>13 | 7 | | 15:12:40.918 | 2420 |<PHONE_NUMBER>14 | 6 | | 15:12:40.917 | 2420 |<PHONE_NUMBER>14 | 8 | ============================================
Cleaning Data
Tidy up a field a little using a regex replacement. This feature is probably somewhat gratuitous.
lago log_samples/q2.log -o ascii -t 'time(HH:mm),mti,11(/^0+//),rtt' --pair
========================================= | time(HH:mm) | mti | 11(/^0+//) | rtt | ========================================= | 15:12 | 2800 | 1 | 4 | | 15:12 | 2800 | 1 | 6 | | 15:12 | 2100 | 2 | 141 | | 15:12 | 2100 | 2 | 143 | | 15:12 | 2100 | 3 | 6 | | 15:12 | 2100 | 3 | 7 | | 15:12 | 2100 | 4 | 22 | | 15:12 | 2100 | 4 | 23 | | 15:12 | 2100 | 5 | 149 | | 15:12 | 2100 | 5 | 150 | | 15:12 | 2100 | 6 | 49 | | 15:12 | 2100 | 6 | 51 | | 15:12 | 2100 | 7 | 6 | | 15:12 | 2100 | 7 | 8 | | 15:12 | 2100 | 8 | 10 | | 15:12 | 2100 | 8 | 12 | | 15:12 | 2100 | 9 | 8 | | 15:12 | 2100 | 9 | 8 | | 15:12 | 2100 | 10 | 9 | | 15:12 | 2100 | 10 | 11 | | 15:12 | 2100 | 11 | 5 | | 15:12 | 2100 | 11 | 7 | | 15:12 | 2100 | 12 | 6 | | 15:12 | 2100 | 12 | 8 | | 15:12 | 2100 | 13 | 6 | | 15:12 | 2100 | 13 | 7 | | 15:12 | 2420 | 14 | 6 | | 15:12 | 2420 | 14 | 8 | =========================================
Sorting
Sort using a field with --sort rtt
lago log_samples/q2.log -o ascii -t 'time,mti,11(/^0+//),rtt' --pair --sort rtt
========================================== | time | mti | 11(/^0+//) | rtt | ========================================== | 15:12:40.288 | 2800 | 1 | 4 | | 15:12:40.862 | 2100 | 11 | 5 | | 15:12:40.287 | 2800 | 1 | 6 | | 15:12:40.496 | 2100 | 3 | 6 | | 15:12:40.775 | 2100 | 7 | 6 | | 15:12:40.878 | 2100 | 12 | 6 | | 15:12:40.896 | 2100 | 13 | 6 | | 15:12:40.918 | 2420 | 14 | 6 | | 15:12:40.496 | 2100 | 3 | 7 | | 15:12:40.861 | 2100 | 11 | 7 | | 15:12:40.896 | 2100 | 13 | 7 | | 15:12:40.774 | 2100 | 7 | 8 | | 15:12:40.817 | 2100 | 9 | 8 | | 15:12:40.817 | 2100 | 9 | 8 | | 15:12:40.877 | 2100 | 12 | 8 | | 15:12:40.917 | 2420 | 14 | 8 | | 15:12:40.837 | 2100 | 10 | 9 | | 15:12:40.794 | 2100 | 8 | 10 | | 15:12:40.836 | 2100 | 10 | 11 | | 15:12:40.793 | 2100 | 8 | 12 | | 15:12:40.515 | 2100 | 4 | 22 | | 15:12:40.515 | 2100 | 4 | 23 | | 15:12:40.711 | 2100 | 6 | 49 | | 15:12:40.710 | 2100 | 6 | 51 | | 15:12:40.331 | 2100 | 2 | 141 | | 15:12:40.330 | 2100 | 2 | 143 | | 15:12:40.548 | 2100 | 5 | 149 | | 15:12:40.547 | 2100 | 5 | 150 | ==========================================
Or sort descending using --sort rtt desc
lago log_samples/q2.log -o ascii -t 'time,mti,11(/^0+//),rtt' --pair --sort 'rtt desc'
========================================== | time | mti | 11(/^0+//) | rtt | ========================================== | 15:12:40.547 | 2100 | 5 | 150 | | 15:12:40.548 | 2100 | 5 | 149 | | 15:12:40.330 | 2100 | 2 | 143 | | 15:12:40.331 | 2100 | 2 | 141 | | 15:12:40.710 | 2100 | 6 | 51 | | 15:12:40.711 | 2100 | 6 | 49 | | 15:12:40.515 | 2100 | 4 | 23 | | 15:12:40.515 | 2100 | 4 | 22 | | 15:12:40.793 | 2100 | 8 | 12 | | 15:12:40.836 | 2100 | 10 | 11 | | 15:12:40.794 | 2100 | 8 | 10 | | 15:12:40.837 | 2100 | 10 | 9 | | 15:12:40.774 | 2100 | 7 | 8 | | 15:12:40.817 | 2100 | 9 | 8 | | 15:12:40.817 | 2100 | 9 | 8 | | 15:12:40.877 | 2100 | 12 | 8 | | 15:12:40.917 | 2420 | 14 | 8 | | 15:12:40.496 | 2100 | 3 | 7 | | 15:12:40.861 | 2100 | 11 | 7 | | 15:12:40.896 | 2100 | 13 | 7 | | 15:12:40.287 | 2800 | 1 | 6 | | 15:12:40.496 | 2100 | 3 | 6 | | 15:12:40.775 | 2100 | 7 | 6 | | 15:12:40.878 | 2100 | 12 | 6 | | 15:12:40.896 | 2100 | 13 | 6 | | 15:12:40.918 | 2420 | 14 | 6 | | 15:12:40.862 | 2100 | 11 | 5 | | 15:12:40.288 | 2800 | 1 | 4 | ==========================================
More Filtering
Show only pairs where the response took more than 100ms using --field
lago log_samples/q2.log -o ascii -t time,mti,11,rtt --pair --field rtt>100
============================================ | time | mti | 11 | rtt | ============================================ | 15:12:40.331 | 2100 |<PHONE_NUMBER>02 | 141 | | 15:12:40.330 | 2100 |<PHONE_NUMBER>02 | 143 | | 15:12:40.548 | 2100 |<PHONE_NUMBER>05 | 149 | | 15:12:40.547 | 2100 |<PHONE_NUMBER>05 | 150 | ============================================
Remember you’ll need to use quotes 'rtt>100' or a slash rtt\>100 to escape the '>' when using bash.
Add the file name and line number to get more detail (or check lago is not lying)
lago log_samples/q2.log -o ascii -t time,mti,11,rtt,src --pair --field rtt>100
========================================================== | time | mti | 11 | rtt | src | ========================================================== | 15:12:40.331 | 2100 |<PHONE_NUMBER>02 | 141 | q2.log:378 | | 15:12:40.330 | 2100 |<PHONE_NUMBER>02 | 143 | q2.log:347 | | 15:12:40.548 | 2100 |<PHONE_NUMBER>05 | 149 | q2.log:1285 | | 15:12:40.547 | 2100 |<PHONE_NUMBER>05 | 150 | q2.log:1254 | ==========================================================
Use some aggregate operators min(), max() and avg() to get basic stats about the round trip times
lago log_samples/q2.log -o ascii -t mti,min(rtt),max(rtt),avg(rtt),count --pair
================================================= | mti | min(rtt) | max(rtt) | avg(rtt) | count | ================================================= | 2800 | 4 | 6 | 5 | 2 | | 2100 | 5 | 150 | 35 | 24 | | 2420 | 6 | 8 | 7 | 2 | =================================================
Find delays of more than 100ms in a message sequence
lago log_samples/q2.log -o ascii -t time,delay,src --field delay>100
====================================== | time | delay | src | ====================================== | 15:12:37.626 | 113 | q2.log:55 | | 15:12:37.792 | 126 | q2.log:105 | | 15:12:40.014 | 2218 | q2.log:120 | | 15:12:40.272 | 227 | q2.log:268 | | 15:12:40.472 | 141 | q2.log:411 | | 15:12:40.697 | 149 | q2.log:1318 | | 15:12:41.279 | 342 | q2.log:5519 | ======================================
Show a table of exceptions. Not very interesting with only one exception but useful when there are many
lago log_samples/q2.log -o ascii -t exception,src --field exception!=
================================================================================== | exception | src | ================================================================================== | Sourced file: inline evaluation of: ``DATE=new Date(); MTI= | q2.log:5479 | ==================================================================================
Show a breakdown of message types
lago log_samples/q2.log -o ascii -t msgType,count
============================= | msgType | count | ============================= | info | 39 | | jce-provider | 1 | | local-master-keys | 1 | | iso-server | 2 | | connect | 1 | | session-start | 1 | | trace | 30 | | send | 28 | | receive | 29 | | abort | 12 | | debug | 13 | | commit | 1 | | error | 10 | | peer-disconnect | 1 | | session-end | 1 | =============================
Dictionaries
TODO Convert a snippet of jPOS' CMF into a dictionary to show how translation works
lago log_samples/q2.log -o ascii -t 'translate(39),39,count' --field mti=2110
================================ | translate(39) | 39 | count | ================================ | | 1011 | 2 | | | 1015 | 3 | | | 1002 | 5 | | | 1014 | 2 | | | 1803 | 21 | ================================
Histograms
You can output an HDR Histogram using --histogram. Has some use for plotting response times (rtt).
lago log_samples/q2.log --pair --histogram rtt
Value Percentile TotalCount 1/(1-Percentile)
4.000 0.000000000000 1 1.00 6.000 0.100000000000 8 1.11 6.000 0.200000000000 8 1.25 7.000 0.300000000000 11 1.43 8.000 0.400000000000 16 1.67 8.000 0.500000000000 16 2.00 8.000 0.550000000000 16 2.22 9.000 0.600000000000 17 2.50 11.000 0.650000000000 19 2.86 12.000 0.700000000000 20 3.33 22.000 0.750000000000 21 4.00 23.000 0.775000000000 22 4.44 49.000 0.800000000000 23 5.00 51.000 0.825000000000 24 5.71 51.000 0.850000000000 24 6.67 141.000 0.875000000000 25 8.00 141.000 0.887500000000 25 8.89 143.000 0.900000000000 26 10.00 143.000 0.912500000000 26 11.43 143.000 0.925000000000 26 13.33 149.000 0.937500000000 27 16.00 149.000 0.943750000000 27 17.78 149.000 0.950000000000 27 20.00 149.000 0.956250000000 27 22.86 149.000 0.962500000000 27 26.67 150.000 0.968750000000 28 32.00 150.000 1.000000000000 28 #[Mean = 31.286, StdDeviation = 48.111] #[Max = 150.000, Total count = 28] #[Buckets = 32, SubBuckets = 2048]
JSON export
Export each log entry as a single line of JSON. The driver idea here was to allow import into Apache Spark for query using Spark SQL.
lago log_samples/q2.log --field mti=2100 -n 1 --json
{"at":"2014-12-18T15:12:40.330-0200","lifespan":1,"realm":"channel/<IP_ADDRESS>:9001","mti":"2100","pan":"6009330000000021","processing_code":"300000","transaction_amount":8582000000000000,"transmission_date_and_time":"1218151240","stan":2,"local_transaction_time":"20141218151240","expiration_date":"1001","settlement_date":"20141218","capture_date":"1218","point_of_service_entry_mode":"10000000080000000004000001000000","acquiring_institution_identification_code":"000001","rrn":"180312760317","card_acceptor_terminal_identification":"29110001","card_acceptor_identification_code":"001001","city":"jCard Selftest system","country":"Montevideo","f_43_5":"MV","f_43_7":"UY","f_113_2":"106","msgType":"send"}
Digest format
Output a slightly less wordy output. Supports translation of field paths to names using a dictionary (TODO explain…).
lago log_samples/q2.log --field mti=2100 -n 1 --digest
<log realm="channel/<IP_ADDRESS>:9001" at="2014-12-18 15:12:40.330" type="send" lifespan="1"> 0: 2100 [mti] 2:<PHONE_NUMBER>000021 [Primary account number] 3: 300000 [Processing code] 4:<PHONE_NUMBER>000000 [Transaction amount] 7:<PHONE_NUMBER> [Transmission date and time] 11:<PHONE_NUMBER>02 [System trace audit number] 12:<PHONE_NUMBER>1240 [Local transaction time] 14: 1001 [Expiration date] 15: 20141218 [Settlement date] 17: 1218 [Capture date] 22:<PHONE_NUMBER>0000000004000001000000 [Point of service entry mode] 32: 000001 [Acquiring institution identification code] 37:<PHONE_NUMBER>17 [Retrieval reference number] 41: 29110001 [Card acceptor terminal identification] 42: 001001 [Card acceptor identification code] 43.2: jCard Selftest system [City] 43.4: Montevideo [Country] 43.5: MV 43.7: UY 113.2: 106 </log>
Gnuplot script generation
lago log_samples/q2.log --pair --plot 'time vs (rtt)' --gnuplot rtts
Wrote rtts.csv Wrote rtts.gp
Produces a .csv file to be plotted
time,rtt 15:12:40.288,4 15:12:40.287,6 15:12:40.331,141 15:12:40.330,143 15:12:40.496,6 15:12:40.496,7 15:12:40.515,22 15:12:40.515,23 15:12:40.548,149 15:12:40.547,150 15:12:40.711,49 15:12:40.710,51 15:12:40.775,6 15:12:40.774,8 15:12:40.794,10 15:12:40.793,12 15:12:40.817,8 15:12:40.817,8 15:12:40.837,9 15:12:40.836,11 15:12:40.862,5 15:12:40.861,7 15:12:40.878,6 15:12:40.877,8 15:12:40.896,6 15:12:40.896,7 15:12:40.918,6 15:12:40.917,8
A gnuplot script to plot the .csv data
#!/usr/bin/env gnuplot name = 'rtts' csv = name.'.csv' set datafile separator ',' set terminal svg enhanced mouse standalone size 1280,960; set output name.'.svg' #set terminal pngcairo size 1280,960; set output name.'.png' set xdata time set timefmt '%H:%M:%S' set format x '%H:%M:%S' set format y '%.1s %c' set lmargin 10 set xrange ['15:12:40.288':'15:12:40.917'] set multiplot layout 1,1 title 'rtts' plot csv using 1:2 w lines lt 2 t column(2)
Executes the gnuplot script to produce a chart
log4j
Given a set of log4j entries that look like:
[01 Jan 1970 10:00:57,135] ERROR [a.ClassName]: amphigenesis receival sulphurlike manlikely worricow postflexion
lago log_samples/log4j.txt.gz --in-format log4j --table 'time(HH),level,count' -n 3
time(HH),level,count 10,ERROR,21 10,INFO,23 11,INFO,18
Garbage Collection logs
lago log_samples/gc.log.gz --in-format gc --plot 'datetime vs (pause) as points labelled by (type), (heapBefore,heapAfter,heapMax) as points, (PSYoungGenBefore,PSYoungGenAfter,PSYoungGenMax) as points, (ParOldGenBefore,ParOldGenAfter,ParOldGenCapacityBefore)' --sort datetime --gnuplot gc-example-chart
Wrote gc-example-chart.csv Wrote gc-example-chart.gp
Produces a .csv to be plotted, a .gp to do the plotting and a chart
The output for all examples is generated by RunExamples.scala.


Conscientious Discourse is the effort to maintain a practice of rigorous internal accountability while also listening and responding to other people. With an interface designed for computers, tablets and smartphones, ThoughtSwap can change the dynamic of discussion in classrooms, civic spaces and other participatory arenas.
Get started quick with auto-generated participant logins. Easily manage and return to groups afterwards.
Contained Anonymity means that people can write anonymously but everyone knows that someone in the room has written each response. Personal fear of exposure is reduced but not interpersonal pro-social responsibility.
Swapping Thoughts means that people can be asked not only “What’s your opinion?” but also “What does someone else think?” Each becomes responsible for representing and elaborating someone else’s thoughts whether they agree with them or not.
Writing broadens the scope of discussion. A more diverse range of opinions in the room is presented for consideration than in traditional classroom discussion.
A facilitator posts a prompt.
Participants write for a few minutes and submit their thoughts(anonymously).
The facilitator convenes a face-to-face discussion for the whole group or for small groups that uses the anonymous submitted thoughts as a spring-board.
The facilitator may swap thoughts, so that each participant sees and becomes responsible for one other person’s thought.
The group reports back to the whole for next steps.


These functions are available from the django.contrib.postgres.aggregates
module. They are described in more detail in the PostgreSQL docs.
Note
All functions come without default aliases, so you must explicitly provide one. For example:
>>> SomeModel.objects.aggregate(arr=ArrayAgg('somefield'))
{'arr': [0, 1, 2]}
ArrayAgg
¶ArrayAgg
(expression, distinct=False, filter=None, ordering=(), **extra)[source]¶Returns a list of values, including nulls, concatenated into an array.
distinct
¶An optional boolean argument that determines if array values
will be distinct. Defaults to False
.
ordering
¶An optional string of a field name (with an optional "-"
prefix
which indicates descending order) or an expression (or a tuple or list
of strings and/or expressions) that specifies the ordering of the
elements in the result list.
Examples:
'some_field'
'-some_field'
from django.db.models import F
F('some_field').desc()
BitAnd
¶BitOr
¶BoolAnd
¶BoolOr
¶JSONBAgg
¶StringAgg
¶StringAgg
(expression, delimiter, distinct=False, filter=None, ordering=())[source]¶Returns the input values concatenated into a string, separated by
the delimiter
string.
delimiter
¶Required argument. Needs to be a string.
distinct
¶An optional boolean argument that determines if concatenated values
will be distinct. Defaults to False
.
ordering
¶An optional string of a field name (with an optional "-"
prefix
which indicates descending order) or an expression (or a tuple or list
of strings and/or expressions) that specifies the ordering of the
elements in the result string.
Examples are the same as for ArrayAgg.ordering
.
y
and x
¶The arguments y
and x
for all these functions can be the name of a
field or an expression returning a numeric data. Both are required.
Corr
¶CovarPop
¶CovarPop
(y, x, sample=False, filter=None)[source]¶Returns the population covariance as a float
, or None
if there
aren’t any matching rows.
Has one optional argument:
sample
¶By default CovarPop
returns the general population covariance.
However, if sample=True
, the return value will be the sample
population covariance.
RegrAvgX
¶RegrAvgY
¶RegrCount
¶RegrIntercept
¶RegrR2
¶RegrSlope
¶RegrSXX
¶RegrSXY
¶We will use this example table:
| FIELD1 | FIELD2 | FIELD3 |
|--------|--------|--------|
| foo | 1 | 13 |
| bar | 2 | (null) |
| test | 3 | 13 |
Here’s some examples of some of the general-purpose aggregation functions:
>>> TestModel.objects.aggregate(result=StringAgg('field1', delimiter=';'))
{'result': 'foo;bar;test'}
>>> TestModel.objects.aggregate(result=ArrayAgg('field2'))
{'result': [1, 2, 3]}
>>> TestModel.objects.aggregate(result=ArrayAgg('field1'))
{'result': ['foo', 'bar', 'test']}
The next example shows the usage of statistical aggregate functions. The underlying math will be not described (you can read about this, for example, at wikipedia):
>>> TestModel.objects.aggregate(count=RegrCount(y='field3', x='field2'))
{'count': 2}
>>> TestModel.objects.aggregate(avgx=RegrAvgX(y='field3', x='field2'),
... avgy=RegrAvgY(y='field3', x='field2'))
{'avgx': 2, 'avgy': 13}
Oct 01, 2019