text:
##  Description of  tagged spot file format (.tsf)

Nico Stuurman, April 3, 2013, modified Jan. 2017

The goal of the tagged post file format is to provide an efficient data format for superresolution microscopy data that generate images by locating the position of single fluorescent emitters.  Two formats exists, a binary format (using Google protocol buffers) and a text format.  An application is free to  upport only one or the other, but is encouraged to support both.

### Binary format.

The binary format relies on [Google Protocol buffers](http://code.google.com/apis/protocolbuffers/) to encode data. Two message types are defined, “SpotList”, which contains metadata concerning the dataset, and “Spot”, which contains the per-spot data.  For convenience, a copy of the proto file describing these messages is included at the bottom of the document, however, the authorative version resides in this github repository.

Note that you can extend the TSF.proto file yourself and add fields that you need for your specific application.  The file created with your proto file can still be read by all other software that reads the tagged spot file format (although it will not be able to interpret the fields that you added).

File offsets are of type signed int or signed long (to ensure compatibility with Java code) and are encoded as big endian.

### File layout on disk:

1. `int magic` (4 bytes) - must be 0 (this is for compatibility with older versions of the tsf format)

2. `long SpotList offset` (8 bytes) - offset in bytes to SpotList message (note, this is the offset from the beginning of the file minus 12 bytes).

3. As many copies of the message “Spot” as desired, where

	* `varint length` - Size of the Spot message in a Google Protocol buffer defined varint

	* `Spot message`

4. The Spot messages are followed by the SpotList message:

	* `varint length` - Size of SpotList message in a Google Protocol buffer defined varint

	* `SpotList message`

The SpotList message is at the end so that it ispossible to write all the Spot data first and then list the number of Spots that have been written in the SpotList message.  Code that reads the file can first read the SpotList (using the SpotList offset) and will then know how many Spot messages to expect.  Note that it is not necessary to know this number in advance, one can simply parse Spot messages until no more new ones are found.

###  Building and/or using the code

To use the tsf format in your own code, you need Java or C++ source code to work with the tsf format.  This source code is created by the Google Protocol Buffers binary based on the TSF.proto file.  You can create this source code yourself by downloading and installing Google Protocol Buffers and compiling the the TSF.proto file.  To do so, I use the following script (Mac OS X shell script):

~~~~
protoc -I=src/ --java_out=build src/TSFProto.proto
javac -sourcepath build -classpath dist/gproto.jar build/edu/ucsf/tsf/TaggedSpotsProtos.java
jar cf dist/TSFProto.jar -C build .
protoc -I=src/ --cpp_out=buildcpp src/TSFProto.proto
g++ -c buildcpp/TSFProto.pb.cc -o buildcpp/libTSFProto.o
ar cru buildcpp/libTSFPProto.a buildcpp/TSFProto.o /usr/local/lib/libprotobuf.a
~~~~

Alternatively, you can download and install the source code that I build.  It resides in this github repository.  The Java source code is in directory “build”, the C++ source code in directory “buildcpp”.

If you code in C++, you can save a lot of time by making use of the class TSFUtils, which is part of the source code of the example application in the tsfutil directory.  The example command line application tsftrans can read and write tsf files in both binary and text formats and is an easy tool to convert between the two.

The following (pseudo Java) code shows how you can read in a file in TSF format:

~~~~
        FileInputStream fi = new FileInputStream(selectedFile);
        DataInputStream di = new DataInputStream(fi);

        // the file has an initial 0, then the offset (as long)
        // to the position of spotList
        int magic = di.readInt();
        long offset = di.readLong();
        fi.skip(offset);
        edu.ucsf.tsf.TaggedSpotsProtos.SpotList psl = SpotList.parseDelimitedFrom(fi);
        fi.close();

        // psl contains the header information
        // the following code shows examples how to use it

        String name = psl.getName();
        int width = psl.getNrPixelsX();
        int height = psl.getNrPixelsY();
        float pixelSizeUm = psl.getPixelSize();
        long totalSpots = psl.getNrSpots();
        long maxNrSpots = 0;

        // now read the messages that contain the spot data
        // Re-open the stream

        fi = new FileInputStream(selectedFile);
        fi.skip(12); // size of int + size of long

        // simple example of reading Spot messages.
        // One could also store the Spots as an Array or List
        // and access the Spot data directly in the code (i.e., use
        // the Spot message as a native data structure

        edu.ucsf.tsf.TaggedSpotsProtos.SpotSpot pSpot;

        while (fi.available() > 0 && (expectedSpots == 0 || totalSpots < expectedSpots)) {

             pSpot = Spot.parseDelimitedFrom(fi);
             double x = pSpot.getXPosition();
             double y = pSpot.getYposition();
             double in = pSpot.getIntensity();
             if (pSpot.hasZ()) {
                 double zc = getZ();
             }

             totalSpots++;
        }
        fi.close();
~~~~

### Reading and writing files from Matlab

To be written...

### Text format

The text version of the Tagged Spot format is modeled closely after the binary format.  The first line of the file (terminated with a newline “\n” symbol) contains the Summary metadata (the SpotList message in the binary format).  It contains Key-Value pairs (separated by “: “) where the keys are defined in the TSF.proto file SpotList description, and the values are given in asci representation.  The Key-Value pairs are separated by the tab (“\t”) sign.

The second line of the file contains the Keys of the Spot message for the Spot data that follow.  The allowed names for the Keys are defined in the TSF.proto file Spot message definition.  Keys are separated by tabs (“\t”), and the line ends with a newline (“\n”) symbol.

All following lines are Spot data in asci format separated by tabs (“\t”) and each Spot is on its own line (that ends with “\n”).

### Extensions
IDs 1500-2047 have been reserved for application-specific fields.  You can find an example of the use of extensions in the mmGaussian branch of [my TSFProto Github repository] (https://github.com/nicost/TSFProto/tree/mmGaussian).  The use of extensions in the derived code is not immediately obvious, there is an example in the Micro-Manager Localization Microscopy Plugin code in the class [edu.valelab.gaussianfit.data.LoadAndSave] (https://github.com/nicost/micro-manager/blob/Gaussian2/plugins/Gaussian/src/main/java/edu/valelab/gaussianfit/data/LoadAndSave.java).

### TSF.proto file:

~~~~

// ProtoBuffer description file for tagged spots
// Objects that are smaller than the difraction limit of a microscope
// result in indistinguishable spot images.  The location of the original
// object can be estimated by fitting (the basis of super-resolution
// microscopy).  This data format is used to convey information about
// such spots and the results and methodolgy of fitting
// Authors: Nico Stuurman (nico.stuurman at ucsf.edu), 2011-2013
//          Steve Wolter (swolter at sdf.org), 2014
// Contributions by Nico Stuurman are copyright Regents of the University of
//                   California
// Jan. 2017, added fields suggested by Alex Herbert
// License: BSD 2-Clause License

package TSF;

option java_package = "edu.ucsf.tsf";
option java_outer_classname = "TaggedSpotsProtos";

enum FitMode {
   ONEAXIS = 0;
   TWOAXIS = 1;
   TWOAXISANDTHETA = 2;
}

enum ThetaUnits {
   DEGREES = 0;
   RADIANS = 1;
}

enum IntensityUnits {
   COUNTS = 0;
   PHOTONS = 1;
}

enum LocationUnits {
   NM = 0;
   UM = 1;
   PIXELS = 2;
}

message FluorophoreType {
   required int32 id = 1; // Key for Spot.fluorophore_type.
   optional string description = 2;
   optional bool is_fiducial = 3;
}

// ROI in pixels, should be consistent with nr pixels given in SpotList
message ROI {
   required int32 x = 1;
   required int32 y = 2;
   required int32 x_width = 3;
   required int32 y_width = 4;
}

message SpotList {
   // UID for the application that generated these data
   // Request a UID from nico at cmp.ucsf.edu or use 1
   required int32 application_id = 1 [default = 1];

   optional string name = 2; // name identifying the original dataset
   optional string filepath = 3; // path to the image data used to generate these spot data
   optional int64 uid = 4; // Unique ID, can be used by application to link to original data
   optional int32 nr_pixels_x = 5; // nr pixels in x of original data
   optional int32 nr_pixels_y = 6; // nr pixels in y of original data
   optional float pixel_size = 7; // pixel size in nanometer
   optional int64 nr_spots = 8; // number of spots in this data set
   optional int32 box_size = 17; // size (in pixels) of rectangular box used in Gaussian fitting
   optional int32 nr_channels = 18; // Nr of channels in the original data set
   optional int32 nr_frames = 19; // Nr of frames in the original data set
   optional int32 nr_slices = 20; // Nr of slices in the original data set
   optional int32 nr_pos = 21; // Nr of positions in the original data set

   // Fluorophore type characterizations. If you use the fluorophore type field,
   // you must add a FluorophoreType message for each used id.
   repeated FluorophoreType fluorophore_types = 26;

   // If units will always be the same for all spots, then use these units tags,
   // otherwise use the unit tags with each spot
   optional LocationUnits location_units = 22;
   optional IntensityUnits intensity_units = 23;
   optional ThetaUnits theta_units = 27;

   // If fitmode  will always be the same for all spots, then use this fitmode
   // otherwise use the fitmode with each spot
   optional FitMode fit_mode = 24;

   // flag indicating whether this is a sequence of spot data in consecutive
   // time frames thought to originate from the same entity
   optional bool is_track = 25 [default = false];

   // The electron conversion factor (camera gain), defined as
   // # of electrons per pixel / # of counts per pixel
   // The ecf can be different for different channels (which can
   // happen when separate cameras are used for separate channels),
   // therefore provide the ecf for each channel in the channel order
   repeated double ecf = 28;

   // The quantum efficiency can be used to calculate the number
   // of photons that hit the sensor, rather than the number of
   // electrons that were derived from them
   // Since this number is wavelength dependent, provide the QE
   // for each fluorophore type (in the fluorophore type order)
   // See the description of the field channel in the Spot message below
   repeated double qe = 30;

   optional ROI roi = 29;

   // The followinf ids can be used in your own .proto derived from this one
   extensions 1500 to 2047;

}

message Spot {
   // Identifier for a physical molecule. Multiple localizations will be considered
   // to be generated by the same molecule if they share the same molecule ID.
   // Typically, a molecule generates up to one localization per frame.
   // If you don't implement tracking, assign a different molecule ID to
   // each localization.
   // The difference between molecules and clusters is that a cluster is a group
   // of physical molecules, e.g. a raft on a membrane. When you are tracking to
   // link your localizations, you're looking at a molecule, and when you're
   // thresholding on the nearest neighbor distance, it's typically a cluster.
   // If you are using both cluster and molecule, localizations with the same
   // molecule ID should have the same cluster ID.
   // Molecule IDs must be globally unique across clusters.
   required int32 molecule = 1;

   // Identifier for an input channel. Input channels represent different optical
   // paths, often with different spectral characteristics. For example, in a
   // biplane setup, you'd have two channels, one for each camera. Channels are
   // 1-based.
   // Please note that channels and fluorophore type are subtly different: channel
   // gives the *physical* excitation path (camera 1 or camera 2), while fluorophore
   // type gives the *fluorophore's* type (Cy5, Cy3, Tetraspeck). For example, for
   // biplane single-color 3D, you'd set the channel field if you emit separate
   // localizations for both channels, but never the type field. For biplane
   // two-color experiments, you'd set both channel and type if you fit in both
   // channels independently, and only types if your fitter combines information
   // for both channels. For spectrally separated measurements, channel and type
   // are usually identical, but for spectral unmixing, they may differ.
   required int32 channel = 2;

   // Frame number (image number). The frames of each channel are numbered
   // sequentially, starting from 1.
   required int32 frame = 3;

   // Z slice. If you are taking a series of images at different axial offsets,
   // you can tag the localizations from each respective slice with this 1-based
   // field. Please apply the offset between slices before saving to a TSF file:
   // z=100 with slice=1 is considered same position as z=100 with slice=2.
   optional int32 slice = 4;

   // Lateral position. If you are taking images at multiple x/y stage positions,
   // you can tag the localizations from each position with this 1-based field.
   // Positions are 1-based. Please apply the offset between positions before
   // saving the TSF file:
   // x=100 with pos=1 is considered same position as x=100 with pos=2.
   optional int32 pos = 5;

   // Fluorophore type. The number is 1-based. Please compare the note for
   // channel for the distinction between type and channel.
   optional int32 fluorophore_type = 19;

   // The identifier of the cluster that the localization belongs to, 1-based.
   // A cluster is a logical group of multiple physical molecules. Typical
   // examples are membrane rafts,
   optional int32 cluster = 20;

   // xyz coordinates of the spot in location_units
   // after fitting and optional correction
   optional LocationUnits location_units = 17;
   required float x = 7;
   required float y = 8;
   optional float z = 9;

   // Intensity values

   // Use intensity_units only if different from SpotList
   // integrated spot density. This can either be determined from a fit or
   // using any other methods.  This number should be corrected for background
   optional IntensityUnits intensity_units = 18;
   required float intensity = 10; // integrated spot density
   // Background around the spot.
   // This can be determined through a fit or other methods
   // This number should not include the camera bias, i.e. it should be linearly
   // proportional to the number of photons in the background
   optional float background = 11;

   // Peak shape parameters

   // Peak width at half height in location units
   // for asymmetric peaks, calculate the width as the square root of the
   // product of the widths of the long and short axes
   optional float width = 12;
   // Shape of the peak: width of the long axis
   // divided by width of the short axis
   optional float a = 13;
   // Rotation of asymetric peak, only used
   // when fitmode == TWOAXISANDTHETA
   optional float theta = 14;

   // Original xyz coordinates from fitting before correction
   optional float x_original = 101;
   optional float y_original = 102;
   optional float z_original = 103;

   // localization precision
   optional float x_precision = 104;
   optional float y_precision = 105;
   optional float z_precision = 106;

   // position in the original image (in pixels) used for fitting
   optional int32 x_position = 107;
   optional int32 y_position = 108;

   // These ids can be used in your own .proto derived from this one
   extensions 1500 to 2047;

}

repository: nicost/TSFProto

repo_name: nicost/TSFProto


text:
## The Greengrass mini-fulfillment center example

At re:Invent 2016 AWS Greengrass was introduced to the world. This miniature
fulfillment center demonstration was used to display what could be done with
Greengrass when announced. It has since been upgraded to use the publicly available
version of [Greengrass](https://aws.amazon.com/greengrass/) v1.

A [video](https://youtu.be/XQQjX8GTEko?t=27m27s) was taken of the completed and
operational Greengrass-based miniature fulfillment center, a.k.a. "dual robot arm demo"
in action at re:Invent. Since re:Invent this demo and example has continued to
evolve. It has been the seed for [other demos](https://youtu.be/dpatdO2uPCA) and
now supports Greengrass [discovery](http://docs.aws.amazon.com/greengrass/latest/developerguide/gg-discover-api.html)
capabilities.

The artifacts, example code, and instructions to construct this demo are
available in this repository as an example. We look forward to seeing what
you'll do with it.

#### Directory Structure and Noteworthy Files
```
aws-greengrass-mini-fulfillment/
  +- docs/
  |  +- BOM.md         -- the bill of materials necessary for construction
  |  +- CONSTR.md      -- instructions for physical construction (TODO)
  |  +- INSTALL.md     -- instructions for software provisioning and install
  |  +- OPERATE.md     -- instructions for operation of the demo
  |  +- TIDBITS.md     -- tiny pieces of setup information that might be helpful
  |  +- TROUBLE.md     -- troubleshooting of install and operation
  |
  +- groups/
  |  +- cert_setup.py  -- generates local certificates used by Greengrass groups
  |  +- group_setup.py -- provisions and deploys example Greengrass groups
  |  +- servo_setup.py -- prepares the servo communication code for example use
  |  |
  |  +- arm/           -- the code and config necessary for an arm host
  |  |  +- ggd/        -- the Greengrass Devices that will be run on the Host
  |  |  |  +- servo/   -- the servo communications libraries
  |  |  +- inv_arm/    -- the specific config and certs for the `inv_arm` group
  |  |  +- sort_arm/   -- the specific config and certs for the `sort_arm` group
  |  |
  |  +- lambda/        -- the Lambda functions used in the Greengrass groups
  |  |
  |  +- master/        -- the directory of the `master` Greengrass group
  |     +- certs/      -- the group AWS IoT and local certs to be copied to Core
  |     +- ggd/        -- the Greengrass Devices that will be run on the Host
  |        +- certs/   -- the client certs used by GG devices
  |        +- flask/   -- where the web GG device gets files to serve
  |        +- servo/   -- the servo communications libraries
  |
  +- models/           -- the models used to 3D print components of this demo
  +- LICENSE
  +- README.md -- this file
  +- requirements.txt
```

After following the [installation instructions](docs/INSTALL.md), each directory
contains all the files necessary to support one of the three Demo groups' hosts.
There are three Greengrass Groups named:

| Group | Host Name | Description |
| :---: | :---: | :--- |
| `inv_arm` | `inv_arm-pi` | contains the Inventory Arm devices and the Inventory Arm Core |
| `master` | `master-pi` | contains both the Conveyor Belt devices and the Master Core |
| `sort_arm` | `sort_arm-pi` | contains the Sorting Arm devices and the Sort Arm Core |

The demo behavior is broken into the concept of a series of simple control stages
organized by Group. Those stages are:

| Group | Control Stages |
| :--- | :--- |
| **Inventory Arm** | `... > Home > Finding > Pickup > Shipping > Home > ...` |
| **Master** | `..conveyor direction..` |
| **Sorting Arm** | `... > Home > Finding > Pickup > Sorting > Home > ...` |

As shown in the video above, even with these simple stages the interaction between
the three Groups displays complex, cohesive, and coordinated behaviors.

This is possible because the whole system is modeled as a collection of micro-services.
Those micro-services then leverage high-speed local messaging to enable communication
within and between groups, as well as transactional state control using local device
shadows.

The high-level, local architecture of the demo is:
![mini-fulfillment demo architecture](docs/img/demo-architecture.png)

#### Master/Conveyor Host
There are six processes on this host:
- the Master Greengrass Core
- the [`heartbeat`](groups/master/ggd/heartbeat.py) Greengrass Device (GGD) process
- the [`bridge`](groups/master/ggd/bridge.py) GGD process
- the [`belt`](groups/master/ggd/belt.py) GGD process -- manages the conveyor belt servo
- the [`button`](groups/master/ggd/button.py) GGD process -- manages the button box's red, green, and white control buttons
- the [`web`](groups/master/ggd/web.py) GGD process

Within the Master Core, these are the Lambda functions:
- [`MasterErrorDetector`](groups/lambda/MasterErrorDetector/error_detector.py) -- this function monitors local telemetry and detects any error states
- [`MasterBrain`](groups/lambda/MasterBrain/master_brain.py) -- this function monitors the fabric of telemetry coming from the
  bridges and the local GGDs. This function will decide what to do with respect
  to current telemetry and errors in the system

There is a web visualization on this host. If one browses to: `<master_ip>:5000` a
visualization that reads data from the Master Core can be seen.

#### Inventory Arm Host
There are three processes on this host:
- the Inventory Arm Greengrass Core
- the [`heartbeat`](groups/arm/ggd/heartbeat.py) Greengrass Device (GGD) process
- the [`arm`](groups/arm/ggd/arm.py) GGD process

Within the Inventory Arm Core, this is the Lambda function:
- [`ArmErrorDetector`](groups/lambda/ArmErrorDetector/error_detector.py) -- this function monitors local telemetry and detects any error states

#### Sorting Arm Host
There are three processes on this host:
- the Sorting Arm Greengrass Core
- the [`heartbeat`](groups/arm/ggd/heartbeat.py) Greengrass Device (GGD) process
- the [`arm`](groups/arm/ggd/arm.py) GGD process

Within the Sort Arm Core, this is the Lambda function:
- [`ArmErrorDetector`](groups/lambda/ArmErrorDetector/error_detector.py) -- this function monitors local telemetry and detects any error states

#### Noteworthy Files
There are some noteworthy files in the repository that centralize a fair amount
of work around the instantiation of this demonstration.
- `groups/group_setup.py` – performs all provisioning of each host's Greengrass Group.
This file has commands that are useful when instantiating this demo and that demonstrate the use of the Greengrass REST APIs.
    - `create <group_type> <config_file>` – creates a Greengrass Group for a given
    group type and configuration file. Also stores all of the provisioning
    artifacts (i.e. `GroupID`, `CoreDefinitionId`, etc.) in the local configuration file.
    - `deploy <config_file>` – deploys a previously provisioned Greengrass Group
    - `clean-all <config_file>` – cleans up the entirety of a Greengrass Group
    and the locally stored provisioning artifacts.
- `groups/servo_setup.py` – prepares the servo manufacturer's communication library
for use on a Raspberry Pi with the Raspbian OS.

## DIY
If you'd like to build a copy of this demo yourself you'll want to read both
the [installation instructions](docs/INSTALL.md) and the
[construction instructions](docs/CONSTR.md). Please share any feedback you have
or questions you run into here as [Issues](https://github.com/awslabs/aws-greengrass-mini-fulfillment/issues).

## Special Thanks
[Brett Francis](https://github.com/brettf) and [Todd Varland](https://github.com/toddvarland) would like to thank the following. Without their
help and existence we simply would not have made this demo.

> **The Francis Family, The Varland Family, [gg-group-setup](https://github.com/awslabs/aws-greengrass-group-setup),
[ROBOTIS](https://github.com/ROBOTIS-GIT/DynamixelSDK), [Servode](https://github.com/brettf/servode),
Pretty Lights, Sigur Ros, Flume - Insanity, Amazon.com, HBO Silicon Valley, The [Greengrass](https://aws.amazon.com/greengrass/) Developers**

branch_name: refs/heads/master

extension: md

gha_language: Python

license_type: permissive


text:
# BinaryWatch
My first project designing and creating *everything*.

Current board rev: *4.1*

Supplies I went through for breadboard testing:
  * atmega328p-pu
  * sn74hc595n x2
  * LEDs x10
  * 16MHz external crystal
  * 32.768kHz external crystal
  * 2 22pF capacitors
  * 2 0.1uF capacitors
  * two buttons for configuring time
  * one button for sleep/wakeup
  * jumper wires

  * arduino uno (for easier programming in the beginning)

Supplies for PCB:
  * (SMD) atmega328p-au
  * 74hc595 SMD shift registers x2
  * JST right angle connector
  * 400mAh Li-Po battery
  * LEDs 1206 SMD x10 (or flat top, whatever you prefer.)
  * 32.768kHz SC-32S SMD crystal
  * SMD capacitors 0805 22pF x2
  * SMD capacitors 0805 12.5pF x2
  * 3 buttons
  * 10k SMD resistors 0805 x1
  * 2k SMD resistors 0805 x10 (in testing for LED brightness)
  * PCB (oshpark)
  * 3D printed case (fusion360)

**PCB designed on:** eagleCAD

**3D case designed on:** fusion360

**CURRENT TASK:** This project is complete!

Blog Posts following development:

**Basis:**  https://thalliatree.wordpress.com/2017/12/25/74hc595-texas-instruments-shift-registers/

**Intro:**  https://thalliatree.wordpress.com/2018/01/01/project-hype-binary-wristwatch/

**Breadboard Hardware (with Uno):**   https://thalliatree.wordpress.com/2018/01/26/atmega328p-microcontroller-74hc595-shift-register-setup-and-test-binary-watch/

**Code - Part 1:**  https://thalliatree.wordpress.com/2018/01/29/code-part-1-binary-watch/

**Code - Part 2:**  https://thalliatree.wordpress.com/2018/01/31/code-part-2-binary-watch/

**Breadboard Hardware (without Uno):**    https://www.thalliatree.net/posts/prepping-the-atmega-hardware-test-bw.html

**Mock Up PCB with coin cells + early schematic:**   https://thalliatree.wordpress.com/2018/02/05/mock-up-pcb-binary-watch/

**Code - Part 3:**   https://thalliatree.wordpress.com/2018/03/16/code-part-3-binary-watch/

**Atmega328p 32.768kHz, sleep modes, and new schematic:**   https://thalliatree.wordpress.com/2018/03/26/atmega328p-32-768khz-sleep-modes-and-new-schematic-binary-watch/

**Final Code, Schematic, and PCB layout:**   https://thalliatree.wordpress.com/2018/04/03/final-code-schematic-and-pcb-binary-watch/

**PCB 95% Complete:**   https://thalliatree.wordpress.com/2018/05/03/pcb-95-complete-binary-watch/

**Binary Watch | Complete:**  https://thalliatree.wordpress.com/2018/05/14/binary-watch-complete

For later revisions:
-  Power: The charging and power circuit needs to be on the board itself.
- Experimenting with new power: I want to try powering this thing from a coin cell again. I have 2 other boards with this design, so I'm going to solder them together, but with different resistor types on the LEDs to see how much current the LEDs and microcontroller are drawing. That way I can estimate what the best resistor value is for brightness + mAh value of battery to get.
- The 3D case is cool with the PCB exposed, but it ain't cool because it's exposed to the weather and other wet and sticky things. Therefore I must cover it up. The lid for case I design next will likely be screwed on, 1) for easier access and 2) for better security of the PCB. Depending on how secure I want it, I may add some kind of sealant. We'll see...
- 3D case: If I add a charging port, it'll need a hole for the plug.
- Through-hole LEDs: if the PCB is to be covered by the case, SMD LEDs aren't going to shine through very well. I have some cool cylindrical blue LEDs that should work, so I'll have to design the case cover to sit around/on top of them, which requires a new PCB design entirely.
- With the PCB case covering the top, I'll need to either add holes for the pushbuttons or design a way to put them on the sides of the case.
- Watch strap: I'm planning on weaving some leather cord in a celtic knot fashion, or maybe some cool braided thing. I've been looking at some chunkier weaves on Pinterest, but I haven't found the right one yet.
- With the new case top, I may make it thicker and engrave some cool circuit-looking designs around the LEDs poking through and paint the engravings an electric blue color. Electric blue is a great idea.

repository: thallia/BinaryWatch

repo_name: thallia/BinaryWatch


text:
# kittentrate

Kittentrate is a kitten (and simplified) version of the [Concentration](https://en.wikipedia.org/wiki/Concentration_(game)) game.
The user must match all the couples in the game and trying to achieve the highest score.

The images are all taken from Flickr.

 |

repository: winterdl/kittentrate

repo_name: winterdl/kittentrate


text:
---
title: Creating Multiple Category and Product Pages
description: Creating Multiple Category and Product Pages
---

# Creating Multiple Category and Product Pages

[AEM CIF Core Components](https://github.com/adobe/aem-core-cif-components) provides content authors the ability to create additional category and product pages. These pages can be enriched with additional marketing content and configured to target specific categories and products. The following video walks through the setup of this feature.

>[!VIDEO](https://video.tv.adobe.com/v/28969/?quality=12)

You can find more information on this topic from the following resource(s):

- [AEM CIF Core Components - Multi catalog page configuration](https://github.com/adobe/aem-core-cif-components/wiki/configuration#multi-catalog-page-template-configuration)

license: MIT

gha_license_id: MIT


text:
# Spherical Geometry

This library provides classes and functions for the computation of geometric data on the surface of the Earth. Code ported from the Google Maps API.

### Install

Require this package with composer using the following command:

```bash
composer require javidalpe/spherical-geometry
```

### API

**SphericalUtil::computeHeading**

Returns the heading from one LatLng to another LatLng. Headings are expressed in degrees clockwise from North within the range [-180,180).

**SphericalUtil::computeOffset**

Returns the LatLng resulting from moving a distance from an origin in the specified heading (expressed in degrees clockwise from north).

**SphericalUtil::computeOffsetOrigin**

Returns the location of origin when provided with a LatLng destination, meters travelled and original heading. Headings are expressed in degrees clockwise from North. This function returns null when no solution is available.

**SphericalUtil::interpolate**

Returns the LatLng which lies the given fraction of the way between the origin LatLng and the destination LatLng.

**SphericalUtil::computeAngleBetween**

Returns the angle between two LatLngs, in radians. This is the same as the distance on the unit sphere.

**SphericalUtil::computeDistanceBetween**

Returns the distance between two LatLngs, in meters.

**SphericalUtil::computeLength**

Returns the length of the given $path, in meters, on Earth.

**SphericalUtil::computeArea**

Returns the area of a closed $path on Earth.

**SphericalUtil::computeSignedArea**

Returns the signed area of a closed path on Earth. The sign of the area may be used to determine the orientation of the path. "inside" is the surface that does not contain the South Pole.

### License

The Spherical Geometry is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT)

repository: javidalpe/spherical-geometry

repo_name: javidalpe/spherical-geometry


text:
---
reviewed: 2022-09-20
severity: Critical
pillar: Security
category: Network security and containment
resource: Front Door
online version: https://azure.github.io/PSRule.Rules.Azure/en/rules/Azure.FrontDoorWAF.Enabled/
---

# Enable Front Door WAF policy

## SYNOPSIS

Front Door Web Application Firewall (WAF) policy must be enabled to protect back end resources.

## DESCRIPTION

The operational state of a Front Door WAF policy instance is configurable, either enabled or disabled.
By default, a WAF policy is enabled.

When disabled, incoming requests bypass the WAF policy and are sent to back ends based on routing rules.

## RECOMMENDATION

Consider enabling WAF policy.

## EXAMPLES

### Configure with Azure template

To deploy WAF policies that pass this rule:

- Set the `properties.policySettings.enabledState` property to `Enabled`.

For example:

```json
{
  "type": "Microsoft.Network/FrontDoorWebApplicationFirewallPolicies",
  "apiVersion": "2022-05-01",
  "name": "[parameters('name')]",
  "location": "Global",
  "sku": {
    "name": "Premium_AzureFrontDoor"
  },
  "properties": {
    "managedRules": {
      "managedRuleSets": [
        {
          "ruleSetType": "Microsoft_DefaultRuleSet",
          "ruleSetVersion": "2.0",
          "ruleSetAction": "Block",
          "exclusions": [],
          "ruleGroupOverrides": []
        },
        {
          "ruleSetType": "Microsoft_BotManagerRuleSet",
          "ruleSetVersion": "1.0",
          "ruleSetAction": "Block",
          "exclusions": [],
          "ruleGroupOverrides": []
        }
      ]
    },
    "policySettings": {
      "enabledState": "Enabled",
      "mode": "Prevention"
    }
  }
}
```

### Configure with Bicep

To deploy WAF policies that pass this rule:

- Set the `properties.policySettings.enabledState` property to `Enabled`.

For example:

```bicep
resource waf 'Microsoft.Network/FrontDoorWebApplicationFirewallPolicies@2022-05-01' = {
  name: name
  location: 'Global'
  sku: {
    name: 'Premium_AzureFrontDoor'
  }
  properties: {
    managedRules: {
      managedRuleSets: [
        {
          ruleSetType: 'Microsoft_DefaultRuleSet'
          ruleSetVersion: '2.0'
          ruleSetAction: 'Block'
          exclusions: []
          ruleGroupOverrides: []
        }
        {
          ruleSetType: 'Microsoft_BotManagerRuleSet'
          ruleSetVersion: '1.0'
          ruleSetAction: 'Block'
          exclusions: []
          ruleGroupOverrides: []
        }
      ]
    }
    policySettings: {
      enabledState: 'Enabled'
      mode: 'Prevention'
    }
  }
}
```

## LINKS

- [Best practices for endpoint security on Azure](https://learn.microsoft.com/azure/architecture/framework/security/design-network-endpoints)
- [Securing PaaS deployments](https://docs.microsoft.com/azure/security/fundamentals/paas-deployments#install-a-web-application-firewall)
- [Policy settings for Web Application Firewall on Azure Front Door](https://docs.microsoft.com/azure/web-application-firewall/afds/waf-front-door-policy-settings#waf-state)
- [Web Application Firewall best practices](https://docs.microsoft.com/azure/web-application-firewall/afds/waf-front-door-best-practices)
- [Azure deployment reference](https://learn.microsoft.com/azure/templates/microsoft.network/frontdoorwebapplicationfirewallpolicies)

branch_name: refs/heads/main

gha_language: PowerShell


text:
# TokenScript for your token
These instructions will help you create a TokenScript interface for a smart contract.
User interface code and business logic is organised in XML declarations for a TokenScript engine to render in a mobile wallet. E.g. [AlphaWallet](https://alphawallet.com/).

## Creating your token and UI widgets

* Open (Ethereum Studio)[studio.ethereum.org], and start the Coin project
  * It shows the smart contract and front-end files, and runs a vm and the Coin files in the browser

Although not conforming to the ERC20 interface, a few changes to the example code will have it demonstrable in AlphaWallet
* Add the following to the Coin contract
```
contract Coin {
	//...

    string public name = "Coin";
    uint256 public decimals = 18;
    string public symbol = "COIN";

	// Returns balance of an address
    function balanceOf(address addr) public view returns (uint) {
        return balances[addr];
    }

```
* lastly rename the `function send(` to `function transfer(`

* (optional) you're welcome to modify this Coin example, or use an erc20 contract of your choosing.

Once you're happy with your contract compiling and running here, we will next deploy to the Ropsten Ethereum test network.

### Deploy Token Contract

At the time of writing, studio.ethereum.org defaults contract deployment to the JavaScriptVM.
[Remix](remix.ethereum.org) is a convenient way to deploy to Ropsten:

* Open [remix](remix.ethereum.org) in a new tab, and choose the `Solidity` environment
* Create a new file (also name it Coin.sol)
* From studio, copy the source of `contracts/Coin.sol`. Then in remix, paste in the new Coin.sol
* In the next studio tab, `compiler`, click `Compile Coin.sol`
* In the next studio tab
  * select `Environment` -> `Injected Web3` (e.g. MetaMask, Ropsten)
  * click `Deploy`
  * (keep studio open you'll need it later for the contract abi)
* Once deployed, copy the contract address to the clipboard

### View in AlphaWallet

To see the default rendering of the contract as a fungible token:

* Open AlphaWallet on your mobile
* Tap the `+` in the top-right corner
  * this is required to manually show tokens that you don't have a balance for
  * (alternately, in remix you can use the `mint` function, to give your wallet address some Coin, eg: `wallet_address,<PHONE_NUMBER>0000000000`)
* Enter your contract address:
  * A convenient way is (from your computer) to open (etherscan)[etherscan.io], paste in your address (then enter). Then click on the little QR icon to the right of the address in the top-left (next to the copy button).
  * Alternately, paste the contract address into any [QR code generator](https://www.cssscript.com/demo/flexible-client-side-qr-code-generator/) (Like TokenScript, this one rendered locally in the browser)
  * Tap the camera on the address field to scan
* Once you've added the contract address (QR code or otherwise), you should see the token card `Coin (COIN)`, tagged as `Ropsten`

## Your first TokenScript

### Constructing your xml file (current schema 2019/10)

* In studio, create a new file Coin.xml, and initialise with this template (notice the `name="Coin"` and reference in `origins` for your Coin token contract):
```
<?xml version="1.0" encoding="UTF-8"?>
<ts:token xmlns:ts="http://tokenscript.org/2019/10/tokenscript"
          xmlns="http://www.w3.org/1999/xhtml"
          xmlns:xml="http://www.w3.org/XML/1998/namespace"
          xsi:schemaLocation="http://tokenscript.org/2019/10/tokenscript http://tokenscript.org/2019/10/tokenscript/tokenscript.xsd"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          custodian="false"
>
    <ts:name>
        <ts:string xml:lang="en">Coin</ts:string>
    </ts:name>
    <ts:contract name="Coin" interface="erc20">
        <ts:address network="3">YOUR_CONTRACT_ADDRESS</ts:address>
    </ts:contract>
    <ts:origins>
        <ts:ethereum contract="Coin"></ts:ethereum>
    </ts:origins>
    <ts:cards>
        <!-- action cards will go here -->
    </ts:cards>
    <ts:attribute-types>
        <!-- attributes will go here -->
    <ts:attribute-types>
</ts:token>
```

In the contract address, where the network is 3 for Ropsten, paste your contract address in place of `YOUR_CONTRACT_ADDRESS`.

The UI elements rendering in studio (app.html) will be captured differently for TokenScript. Rather than a single view, individual actions are isolated in action cards.

* For the action of Minting, create a new file called mint.shtml, and initialise with this template:
```
<script type="text/javascript"><![CDATA[
class Token {
    constructor(tokenInstance) {
        this.props = tokenInstance

    }

    render() {
        return `
        <div class="ui container">
            <div class="ui segment">

            </div>
        </div>`;
    }
}

web3.tokens.dataChanged = (oldTokens, updatedTokens) => {
    const currentTokenInstance = web3.tokens.data.currentInstance;
    document.getElementById('root').innerHTML = new Token(currentTokenInstance).render();
};

]]></script>
<div id="root"></div>

```

* mint.shtml: Inside the "ui segment" div, copy/paste contents of the "create" div from app.html
  * notice the "create-address" and "create-address" input fields

* Coin.xml: At the top of the xml (after the version tag), include references to front-end files `app.css` and `mint.shtml`:
  * (For reference, full TokenScript file provided -> `tutorial-files/Coin.xml`)
```
<!DOCTYPE token  [
    <!ENTITY style SYSTEM "app.css">
    <!ENTITY mint.en SYSTEM "mint.shtml">
    ]>
```

  * Coin.xml: Inside the <ts:cards> section, add the following <ts:action>. The english name is "Mint", and front-end files referenced (style and view).
```
        <ts:action>
            <ts:name>
                <ts:string xml:lang="en">Mint</ts:string>
            </ts:name>
            ...
            <!-- attributetype tags -->
            ...
            <!-- transaction tag -->
            ...
            <style type="text/css">&style;</style>
            <ts:view>&mint.en;</ts:view>
        </ts:action>
```

  * Coin.xml: To refer to the input types that will be used in a smart contract call, add their attribute-type (notice "create-address" and "create-amount")

```
			...
            <ts:attribute-type id="create-address" syntax="<IP_ADDRESS>.4.1.14<IP_ADDRESS>.15">
                <ts:name>
                    <ts:string xml:lang="en">Address to receive created tokens</ts:string>
                </ts:name>
                <ts:origins>
                    <ts:user-entry as="address"/>
                </ts:origins>
            </ts:attribute-type>
            <ts:attribute-type id="create-amount" syntax="<IP_ADDRESS>.4.1.14<IP_ADDRESS>.36">
                <ts:name>
                    <ts:string xml:lang="en">Amount to create</ts:string>
                </ts:name>
                <ts:origins>
                    <!-- e18 is a hard coded multiplier.
                    rationale for hardcoding: avoiding over-design -->
                    <ts:user-entry as="e18"/>
                </ts:origins>
            </ts:attribute-type>
            ...
```

  * Coin.xml: Lastly add the transaction (refers to ethereum smart contract, function, and params in the data tag)
```
            <ts:transaction>
                <ts:ethereum function="mint" contract="Coin">
                    <ts:data>
                        <ts:address ref="create-address"/>
                        <ts:uint256 ref="create-amount"/>
                    </ts:data>
                </ts:ethereum>
            </ts:transaction>
```
* Download the xml, css, shtml files, and jump to the section below to test: `Combining files and testing`
  * The required `Makefile` for combining these files is in `tutorial-files`
* Next steps: Once you have been able to test the Mint action, you'll notice the transaction is sent, but does not succeed because the wallet is not the minter.
  * Add a function in the smart contract to set the minter address with a parameter, call from remix with the wallet address
  * Alternately, add a standard `approve` function in the smart contract, and duplicate/modify the `mint` action in `Coin.xml`.

### [future] Obtaining sample files (schema 2020/03)

A really good starting point to generating your own TokenScript (for the upcoming 2020/03 schema) is available with this [ABI-to-TokenScript tool](https://alphawallet.github.io/ABI-to-TokenScript/):

* Enter the contract address
* From remix, copy the contract abi, and paste it in the ABI-to-TokenScript tool
* Enter a contract name, eg "Coin"
* Select erc20 (although this example from studio doesn't completely conform to the erc20 interface)
* Finally, select your network (e.g. Ropsten)
* Click `Create your TokenScript!`, and download `Coin.zip`

Inside you will find:
* A shared.css file
* javascript files of the form <name>.<lang>.js (e.g. for actions: about.en.js, approve.en.js)
* The precursor to your tokenscript file: Coin-TokenScript.xml
  * Confirm the network e.g. ropsten `<ts:address network="3">...contract_address...`
  * Rename this file to Coin.xml for simplicity
* A Makefile to combine the above files

In the following section we'll combine these files in the xml.

### Combining files and testing

Disclaimer: iOS users can simply airdrop the set of js/css/xml files to their device.

To combine the files you will need at least [xmllint](#xmllint) to combine the files, this will give you an unsigned (.canonicalized.xml) file for testing.
When you want to have the file associated with your domain's SSL key, you will then need [xmlsectool](#xmlsectool-optional-signing) create a signed file (.tsml).

* download/install the xmllint command line tool (See instructions [below](#xmllint))
  * can check with `xmllint --version`
* in terminal, from the project directory, run `make Coin.canonicalized.xml`
  * this will look for Coin.xml and use xmllint to combine resources into the output file

Congratulations, you can now add `Coin.canonicalized.xml` TokenScript for use in AlphaWallet!

* Note: Android users will have to ensure "TokenScript Overrides" is turned on in the Settings tab to give access to locally stored xml files.
* Using your tool of choice, copy the file to your device that has AlphaWallet installed
* you can either open the file directly, or manually move it to the AlphaWallet directory
  * eg Android: Internal storage `/AlphaWallet`
* Now in AlphaWallet's Wallet tab, you should see the Coin token card.
* Tapping on the token card will go to the token view, and the row of buttons (or "...") will see additional actions
  * Tap the action to see your action card, enter inputs, then `Confirm` to execute the transaction

## Tools

### xmllint
To get started you will need `xmllint` to import you resource files (eg html/css/js...) into a single canonicalized xml file.

Linux: in `libxml2-utils` - eg `sudo apt install libxml2-utils`
OSX: Pre-installed
Windows: See below

### Windows users

xmllint and xmlsec are available from xmlsoft.org. Precompiled binaries (tools and all dependencies) can be downloaded with curl commands below.
*Alternative:* For convenience [this zip]() has all binary files in a single folder that you can then move to a folder on your PATH.

```
curl -O http://xmlsoft.org/sources/win32/iconv-1.9.2.win32.zip -o iconv-1.9.2.win32.zip
curl -O http://xmlsoft.org/sources/win32/libxml2-2.7.8.win32.zip -o libxml2-2.7.8.win32.zip
curl -O http://xmlsoft.org/sources/win32/libxmlsec-1.2.18.win32.zip -o libxmlsec-1.2.18.win32.zip
curl -O http://xmlsoft.org/sources/win32/libxslt-1.1.26.win32.zip -o libxslt-1.1.26.win32.zip
curl -O http://xmlsoft.org/sources/win32/openssl-0.9.8a.win32.zip -o openssl-0.9.8a.win32.zip
curl -O http://xmlsoft.org/sources/win32/xsldbg-3.1.7.win32.zip -o xsldbg-3.1.7.win32.zip
curl -O http://xmlsoft.org/sources/win32/zlib-1.2.5.win32.zip -o zlib-1.2.5.win32.zip
```
([md5sum here](http://xmlsoft.org/sources/win32/md5sum.txt) for verification)

**Ensure all binaries accessible in PATH**

In lieu of adding each of the corresponding `bin` folders to your PATH variable, you can copy the contents of each `bin` folder (.dll/.exe files) to one folder and put that folder in your PATH.

### xmlsectool (optional signing)
Each OS: installation instructions [here](https://wiki.shibboleth.net/confluence/display/XSTJ2/xmlsectool+V2+Home#xmlsectoolV2Home-ObtainingandUsingxmlsectool) (java).

### (deprecated) xmlstarlet
Linux: `sudo apt install xmlstarlet`
OSX: `brew install xmlstarlet`
Windows: https://sourceforge.net/projects/xmlstar/files/

### (future) xmlsec
Linux: `sudo apt install xmlsec1`
OSX: `brew install libxmlsec1`
Windows: See section `Windows users` above.

repository: hellolucas/TokenScript-Examples

repo_name: hellolucas/TokenScript-Examples


text:
<!--
Hello, and thanks for submitting a pull request! To help us address this PR
quickly, please take the time to fill out this template to the best of
your ability, and please provide as much information as possible!

When you're done, feel free to remove these comments if you like.

Additionally, please remember that PRs are not the place to disclose
a security issue. Instead, please contact a member of our admin team directly
on Discord, or send a private message to the ModMail bot there.

This doesn't mean that you can't contribute to security fixes - we just
require that they be contributed as part of a proper security advisory, so
that they can be worked on without risking wider exposure of the vulnerability
before it is fixed.
-->

# Relevant Issues

If there are any relevant issues, please link them here. Feel free to just create a list
here with direct links to each one - no fancy formatting is required.

# Description

Please explain exactly what this pull request does. Talk about the problems you're addressing,
how you elected to solve them, and how you decided upon your changes.

If you've added any dependencies, then please list them here and explain why you needed them.

# Media

<details>
    <summary>Click to expans</summary>

    It's much easier to look over a pull request if you can show examples of your work. While
    it isn't required to do so, please provide any relevant screenshots, screen recordings
    or other media here.
</details>


text:
From: https://sourcemaking.com/design_patterns

# Creational patterns

## Abstract Factory

> Creates an instance of several families of classes.

### Intent

- provide an interface for creating families of related or dependent objects without specifying their concrete classes.
- A hierarchy that encapsulates: many possible "platforms", and the construction of a suite of "products".
- The `new` operator considered harmful.

### Code examples

#### Java

```java
// class CPU
abstract class CPU {}

// class EmberCPU
class EmberCPU extends CPU {}

// class EnginolaCPU
class EnginolaCPU extends CPU {}
```

filename: Design Patterns-sourcemaking.md


text:
# chronostream

A small Java service that runs one or more computations and returns the stream of results to a simple
javascript front end.

This code was initially written to test various HSMs for correctness and performance. The purpose of open sourcing
the code is to allow anyone to look at our methodology and improve upon it.

In theory, you should be able to re-use this code for arbitrary benchmarking. You might also want to checkout this
Stack Overflow answer related to Java benchmark frameworks: http://stackoverflow.com/a/7445378/2217509

Obligatory reading: https://zedshaw.com/archive/programmers-need-to-learn-statistics-or-i-will-kill-them-all/

# running

    mvn package
    java -cp bcprov-jdk15on-1.51.jar:target/chronostream-1.0-SNAPSHOT.jar chronostream.App server src/main/resources/dev.yaml

and then open [http://localhost:8080/index](http://localhost:8080/index)

repository: alokmenghrajani/chronostream

repo_name: alokmenghrajani/chronostream


text:
# NCOM

![Build](https://github.com/harry-harris-27/NCOM/workflows/Build/badge.svg)
[![Coverage Status](https://coveralls.io/repos/github/harry-harris-27/NCOM/badge.svg?branch=master)](https://coveralls.io/github/harry-harris-27/NCOM?branch=master)

A small portable .NET library built for encoding and decoding [OxTS](https://www.oxts.com/) NCOM binary data packets. Note that this library is not currently complete.

NCOM is a data format designed by OxTS for the efficient communication of navigation measurements and other data. It is a very compact format and only includes core measurements, which makes it particularly suitable for inertial navigation systems. For more information about the NCOM data packet, users should read OxTS's NCOM [manual](https://oxts.app.box.com/s/jovnqyj3lkcht2b2159jefzbt950j1n1).

This library is designed to allow developers to create their own custom .NET applications for their specified needs. OxTS already provides a [NCOM library](https://github.com/OxfordTechnicalSolutions/NCOMdecoder), written in C.

## Getting Started
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. Since this project is not complete and still under development, it should not be used as part of any deployment.

To include this project as part of an existing solution, [download](https://github.com/harry-harris-27/NCOM/master/archive/master.zip) the repository and unzip. Now add the unzipped NCOM and NCOM.Test projects to your solution and add references as required.

Once a initial release of the library has been created, it is planned that a nuget package will be created.

## Code Example
### Decoding
```C#
// Get NCOM data from somewhere. E.g. an UDP packet.
byte[] data;
var buffer = data.AsSpan();

List<NCOMPacket> pkts = new NCOMPacketFactory().ProcessNCOM(buffer);
foreach (NCOMPacket pkt in pkts)
{
    // Check that decoded packet was of type Structure-A.
    if (pkt is NCOMPacketA ncomData)
    {
        // Here we have our decoded NCOM data.
        // ...
    }
}
```
or
```C#
// Decoding a single NCOM packet
NCOMPacketA pkt = new NCOMPacketA();

// Get NCOM data from somewhere...
Span<byte> data;

// Decode
pkt.Unmarshal(data);
```

### Encoding
```C#
NCOMPacketA ncom = new NCOMPacketA();
byte[] encoded = ncom.Marshal();

// Now do want you want with marshalled NCOM data. E.g. send out in UDP packet.
```
or
```C#
NCOMPacketA ncom = new NCOMPacketA();
byte[] buffer = new byte[NCOMPacketA.PacketLength];

ncom.Marshal(buffer.AsSpan());

// Note: This method allows for reuse of buffer. If regular marshalling is require this method will seriously reduce excessive memory allocation
```

## Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what changes you would like to make.

Please make sure to update tests as appropriate.

## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details


text:
ACL exended for Yii v2
======================
Control access level of users using rbac

Installation
------------

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
php composer.phar require --prefer-dist tmukherjee13/yii2-acl-plus "*"
```

or add

```
"tmukherjee13/yii2-acl-plus": "*"
```

to the require section of your `composer.json` file.

Usage
-----
Work in progress.

Menu (Optional)
---------------

If you want to use the menu module provided with the extension, you need to create the necessary tables by executing :

```php
./yii migrate --migrationPath=@tmukherjee13/aclplus/migrations
```


text:
## upstand\_height\_mm Type

`number` ([Upstand Height \[mm\]](iea43_wra_data_model-properties-measurement-location-measurement-location-properties-measurement-point-measurement-point-properties-mounting-arrangement-mounting-arrangement-properties-upstand-height-mm.md))

## upstand\_height\_mm Constraints

**minimum**: the value of this number must greater than or equal to: `0`

gha_language: Jupyter Notebook


text:
[![compatibility](https://github.com/ctuning/ck-guide-images/blob/master/ck-compatible.svg)](https://github.com/ctuning/ck)
[![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)

# MLPerf Inference - Object Detection

MLPerf Inference v0.5 uses SSD-MobileNet-v1-1.0-224 (called SSD-MobileNet in what follows) and SSD-ResNet34 (called SSD-ResNet in what follows).

# Table of contents

1. [Installation](#installation)
    - [Install prerequisites](#installation-debian) (Debian-specific)
    - [Install CK workflows](#installation-workflows) (universal)
1. [Benchmarking](#benchmarking)
    - [via TensorFlow (Python)](tf-py/README.md)
    - [via TensorFlow Lite](tflite/README.md)

# Installation

**NB:** If you would like to get a feel of CK workflows, you can skip
installation instructions and try [benchmarking](#benchmarking)
instructions on available Docker images:
- TensorFlow Lite:
    - [Debian 9](https://github.com/ctuning/ck-mlperf/tree/master/docker/object-detection-tflite.debian-9)
- Arm NN:
    - [Debian 9](https://github.com/ARM-software/armnn-mlperf/tree/master/docker/object-detection-armnn-tflite.debian-9)

Even if you would like to run CK workflows natively (e.g. on an Arm-based
development board or Android phone), you may wish to have a quick look into the
latest Dockerfile's to check for latest updates e.g. system-specific
dependencies.

## Debian

- Common tools and libraries.
- [Python](https://www.python.org/), [pip](https://pypi.org/project/pip/), [SciPy](https://www.scipy.org/), [Collective Knowledge](https://cknowledge.org) (CK).
- (Optional) [Android SDK](https://developer.android.com/studio/), [Android NDK](https://developer.android.com/ndk/).

### Install common tools and libraries
```bash
$ sudo apt install git wget libz-dev curl cmake
$ sudo apt install gcc g++ autoconf autogen libtool
```

### Install Python 3 and the latest pip
```bash
$ sudo apt install python3 python3-pip
$ sudo python3 -m pip install --upgrade pip
```
**NB:** Python 3 is needed for the [COCO API](https://github.com/cocodataset/cocoapi)
used to evaluate object detection accuracy on the [COCO dataset](http://cocodataset.org).

**NB:** Care must be taken not to mix Python 3 and Python 2 packages.
If your system uses Python 2 by default, we recommend you prefix
all CK commands, for example, with `CK_PYTHON=python3` for CK to run under Python 3:
```
$ python --version
Python 2.7.13
$ ck python_version
2.7.13 (default, Sep 26 2018, 18:42:22)
[GCC 6.3.0 20170516]
$ CK_PYTHON=python3 ck python_version
3.5.3 (default, Sep 27 2018, 17:25:39)
[GCC 6.3.0 20170516]
```
Similarly, if you use multiple Python 3 versions (e.g. 3.5 and 3.6), we recommend
you stick to one of them for consistency:
```
$ CK_PYTHON=python3.5 ck python_version
3.5.2 (default, Nov 12 2018, 13:43:14)
[GCC 5.4.0 20160609]
$ CK_PYTHON=python3.6 ck python_version
3.6.7 (default, Oct 25 2018, 09:16:13)
[GCC 5.4.0 20160609]
```

### Install required Python 3 packages
Choose one of the following installation options:
1. system-wide via pip;
1. user-space via pip;
1. user-space via CK.

With the first two options, packages get installed via pip and get registered
with CK later (typically, on the first run of a program).

With the last option, packages also get installed via pip but get registered
with CK at the same time (so there is less chance of mixing things up).

To update all CK repositories (e.g. after a bug fix):
```
$ ck pull repo --all
```

### Install the COCO 2017 validation dataset (5,000 images)
```bash
$ ck install package --tags=object-detection,dataset,coco.2017,val,original,full
```
**NB:** COCO dataset descriptions are in [repo:ck-env](https://github.com/ctuning/ck-env).

**NB:** If you have previously installed the COCO 2017 validation dataset via CK to e.g. `$HOME/coco/`, you can simply detect it as follows:
```bash
$ ck detect soft:dataset.coco.2017.val --full_path=$HOME/coco/val2017/000000000139.jpg
```
(CK also places annotations under `annotations/val2017/`.)

### Preprocess the COCO 2017 validation dataset (first 50 images)
```bash
$ ck install package --tags=object-detection,dataset,coco.2017,preprocessed,first.50
```

### Preprocess the COCO 2017 validation dataset (all 5,000 images)
```bash
$ ck install package --tags=object-detection,dataset,coco.2017,preprocessed,full
```

## Benchmarking

You can benchmark SSD-MobileNet using one of the available options:
- [via TensorFlow (Python)](tf-py/README.md)
- [via TensorFlow Lite](tflite/README.md)

repository: yananYangYSU/inference

repo_name: yananYangYSU/inference


text:
# C\# in Depth

*Jon Skeet*
[Manning.com Link](https://www.manning.com/books/c-sharp-in-depth-fourth-edition?query=c#%20in%20depth)

* [Chapter 1](Chapter1.md)
* [Chapter 2](Chapter2.md)
* [Chapter 4](Chapter4.md)
* [Chapter 5](Chapter5.md)

repository: mickelsonmichael/BookNotes

repo_name: mickelsonmichael/BookNotes


text:
# Selling/Buying Real Estate Web application

College project. Web application developed on LARAVEL PHP framework. It's a Selling/Buying Real Estate application like century-21, for example.

## Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

### Prerequisites

What things you need to install the software and how to install them. For WINDOWS:

```
XAMPP/WAMPP (Which means installing Apache and MySQL)
```

```
PHP 7.x
```

```
Composer dependencies installer
```

### Setting this project for local work enviroment and testing

This is what you need to have this project up and running in your local machine

#### Clone project

```
git clone https://github.com/fuhranku/proyecto_ati_ii.git
```
Note: If you're using XAMPP, for example, project folder needs to be inside **htdocs** directory of XAMPP

#### Install composer dependencies

Whenever you clone a new Laravel project you must now install all of the project dependencies. This is what actually installs Laravel itself, among other necessary packages to get started.

```
composer install
```

#### Create a copy of .env file

Since .env files are not commited, it's necessary to create this file. There is a .env.example which is a template of the .env file that the project expects us to have. So we will make a copy of the .env.example file and create a .env file that we can start to fill out to do things like database configuration in the next few steps.

```
cp .env.example .env
```
This will create a copy of the .env.example file in your project and name the copy simply .env.

#### Generate an app encryption Key

Laravel requires you to have an app encryption key which is generally randomly generated and stored in your .env file. The app will use this encryption key to encode various elements of your application from cookies to password hashes and more.

Laravel’s command line tools thankfully make it super easy to generate this. In the terminal we can run this command to generate that key.
```
php artisan key:generate
```
If you check the .env file again, you will see that it now has a long random string of characters in the APP_KEY field. We now have a valid app encryption key.

#### Create a DB for the application

Turn ON XAMPP/WAMPP MySQL, then go to

```
localhost/phpmyadmin
```

and create database for project. Let's put as a convention to use *p_laravel_ati_ii*

#### In the .env file, add database information to allow Laravel to connect to the database

We will want to allow Laravel to connect to the database that you just created in the previous step. To do this, we must add the connection credentials in the .env file and Laravel will handle the connection from there.

In the .env file fill in the DB_HOST, DB_PORT, DB_DATABASE, DB_USERNAME, and DB_PASSWORD options to match the credentials of the database you just created.

Usually following configuration should work:
```
DB_CONNECTION= mysql
DB_HOST= <IP_ADDRESS>
DB_PORT= 3306
DB_DATABASE= justo_atiempo
DB_USERNAME= justo_atiempo
DB_PASSWORD= 12345678

```
Note: Please check which port is WAMPP/XAMPP using for MySQL, usually is 3306, but it might change.

#### Migrate the database

Once your credentials are in the .env file, now you can migrate your database.

```
php artisan migrate
```
If this command doesn't work because table's name is too long. Fix it as follows

##### Fixing table's length error

Go to AppServiceProvider.php file inside laravel project and put following code:
```
    use Illuminate\Support\Facades\Schema;

    public function boot()
    {
        Schema::defaultStringLength(191);
    }
```
This should be enough. It’s not a bad idea to check your database to make sure everything migrated the way you expected.

## Running project

To see project working turn **Apache** and **MySQL** ON from XAMPP/WAMPP server.

Then, simply visit project by putting following URL
```
localhost/<project_name>/public
```

## Authors

* **Frank Ponte** - *Initial work/Developer* - [fuhranku](https://github.com/fuhranku)
* **Leonardo Pinzón** - *Developer* - [paladin601](https://github.com/paladin601)
* **Ricardo Osuna** - *Developer* - [Osrrus](https://github.com/Osrrus)
* **Yuliana Fernández** - *Developer* - [yuliferna](https://github.com/yuli-ferna)
* **José Enrique Tirado** - *Developer* -[jet29](https://github.com/jet29)

See also the list of [contributors](https://github.com/fuhranku/proyecto_ati_ii/graphs/contributors) who participated in this project.

## Acknowledgments

Thanks to **DevMarketer** for his [Setup a Laravel Project You Cloned from Github.com](https://devmarketer.io/learn/setup-laravel-project-cloned-github-com/)

## About Laravel

Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experience to be truly fulfilling. Laravel takes the pain out of development by easing common tasks used in many web projects, such as:

- [Simple, fast routing engine](https://laravel.com/docs/routing).
- [Powerful dependency injection container](https://laravel.com/docs/container).
- Multiple back-ends for [session](https://laravel.com/docs/session) and [cache](https://laravel.com/docs/cache) storage.
- Expressive, intuitive [database ORM](https://laravel.com/docs/eloquent).
- Database agnostic [schema migrations](https://laravel.com/docs/migrations).
- [Robust background job processing](https://laravel.com/docs/queues).
- [Real-time event broadcasting](https://laravel.com/docs/broadcasting).

## License

The Laravel framework is open-source software licensed under the [MIT license](https://opensource.org/licenses/MIT).

gha_language: HTML


text:
vim-ormolu
==========

Introduction
------------

This is a plugin to integrate [ormolu] or [fourmolu] into your vim workflow. It
will run ormolu on Haskell buffers every time they are saved similar to `gofmt`.
It requires ormolu be accessible from your `$PATH`.

[ormolu]: https://github.com/tweag/ormolu
[fourmolu]: https://github.com/parsonsmatt/fourmolu

Installation
------------

First install ormolu via Cabal, Stack or Nix:

```console
$ stack install ormolu --resolver=lts-15.10   # via stack
$ cabal new-install ormolu --installdir=/home/user/.local/bin # via cabal
$ nix-build -A ormolu   # via nix
```

If you are using **[pathogen.vim](https://github.com/tpope/vim-pathogen)** unpack
this repository into your vim or neovim configuration directory.

```console
$ cd ~/.vim/bundle         # for vim
$ cd ~/.config/nvim/bundle # for neovim
$ git clone https://github.com/sdiehl/vim-ormolu.git
```

If you are using **[Vundle](https://github.com/gmarik/Vundle.vim)** add the
following to your configuration file:

```vim
"Haskell Formatting
Plugin 'sdiehl/vim-ormolu'
```

If you are using **[vim-plug](https://github.com/junegunn/vim-plug)** add the
following to your configuration file:

```vim
"Haskell Formatting
Plug 'sdiehl/vim-ormolu'
```

Configuration
-------------

*The default settings will work fine out of the box without any aditional
configuration*.

If you have a non-standard `$PATH` then set `g:ormolu_command` Vim variable to
the location of the ormolu binary. For example if you want to use
[fourmolu](https://github.com/parsonsmatt/fourmolu) instead pass this as the
argument.

```vim
let g:ormolu_command="fourmolu"
```

When using fourmolu with a configuration file, fourmolu prefixes output
with a "Loaded config from: ..." message. In order to prevent this from being
included in the reformatted file, set

```vim
let g:ormolu_suppress_stderr=1
```

The specific flags for Ormolu can be configured by changing the Vim variable
`g:ormolu_options`. For example to use faster and unsafe formatting:

```vim
let g:ormolu_options=["--unsafe"]
```

To disable the formatting on a specific buffer use `let b:ormolu_disable=1`.

To disable the formatting globally use `let g:ormolu_disable=1`.

If instead of formatting on save, you wish to bind formatting to a specific
keypress add the following to your `.vimrc` or `init.vim`.  For example to bind
file formatting to the key sequence tf use:

```vim
nnoremap tf :call RunOrmolu()<CR>
```

To toggle Ormolu formatting on a buffer to use:

```vim
nnoremap to :call ToggleOrmolu()<CR>
```

To disable Ormolu formatting to td use:

```vim
nnoremap td :call DisableOrmolu()<CR>
```

To enable Ormolu formatting to te use:

```vim
nnoremap te :call EnableOrmolu()<CR>
```

To format a visual block range call `OrmoluBlock()` function. Ormolu doesn't
normally work this way and usually requires more context on the module to
format. So this feature is experimental and may not function as expected. For
example to bind to the key sequence tb use:

```vim
xnoremap tb :<c-u>call OrmoluBlock()<CR>
```

If you see quirky behavior using TypeApplications extensions with the code being
formatted into invalid Haskell, you probably need to enable `-XTypeApplications`
globally because it is set in your global cabal file per this
[issue](https://github.com/tweag/ormolu/issues/452).

```vim
let g:ormolu_options=["-o -XTypeApplications"]
```

To manually install the formatter on a specific file extension invoke
`RunOrmolu()` as a BufWritePre hook.

```vim
autocmd BufWritePre *.hs :call RunOrmolu()
```

To run formatting inside an unsaved buffer as a scratchpad, set your buffer's
filetype to `haskell` and then invoke any of the formatter commands (i.e. `:call
RunOrmolu()`) or bind it key sequence as above.

```vim
set filetype=haskell
```

License
-------

MIT License
Copyright (c) 2019-2020, Stephen Diehl

repository: sdiehl/vim-ormolu

gha_language: Vim script

repo_name: sdiehl/vim-ormolu


text:
---
title: Hilly Lisbon
date: 2016-03-08T15:28:28+00:00
author: Janik von Rotz
slug: hilly-lisbon
images:
  - /wp-content/uploads/2016/03/Lisbon-graffiti-1200x425.jpg
categories:
  - Photography
  - Traveling
tags:
  - beautiful
  - historic
  - lisbon
  - portugal
---
This winter I had the chance to visit the warm city of Lisbon. Settled in the south of Portugal it attracts thousands of tourists every year with its historic buildings and narrow streets.

{{< figure src="/wp-content/uploads/2016/03/lonely-dog-1024x769.jpg" title="Before entering on of the lookout points this lonely dog greeted us." >}}

<!--more-->

{{< figure src="/wp-content/uploads/2016/03/Lisbon-sunset-1024x769.jpg" title="Vier of the city by sunset from one of the lookout pionts." >}}

{{< figure src="/wp-content/uploads/2016/03/patterns-1024x769.jpg" title="Historic buildings are covered with this kind of patterns." >}}

{{< figure src="/wp-content/uploads/2016/03/tweet-1024x769.jpg" title="No city without pigeons." >}}

{{< figure src="/wp-content/uploads/2016/03/urband-gardening-1024x769.jpg" title="Another kind of urban gardening." >}}

{{< figure src="/wp-content/uploads/2016/03/the-yellow-tram-1024x769.jpg" title="As seen on every Lisbon postcard ever." >}}

{{< figure src="/wp-content/uploads/2016/03/narrow-streets-1024x769.jpg" title="Lisbon is well known for its narrow streets and steep stairs." >}}

{{< figure src="/wp-content/uploads/2016/03/colors-of-Lisbon-1024x769.jpg" title="No doubt the heart of the city is an artwork." >}}

{{< figure src="/wp-content/uploads/2016/03/cable-car-1024x769.jpg" title="The cable cars which take you up the hills are expensive compared to the metro." >}}

{{< figure src="/wp-content/uploads/2016/03/the-no-graffiti-wall-1024x769.jpg" title="The first and last wall I've encoutered in Lisbon without tags or graffiti." >}}

{{< figure src="/wp-content/uploads/2016/03/rouster-in-the-garden-1024x769.jpg" title="Some chickens and rousters lived in a park somwhere in the city." >}}


text:
# TICKLE Client

TICKLE playground for our Project

### Todo
* ~~integrate CardCreator into mapview~~
* fix powerscale in accordion
* ~~Server side~~
* Server CRUD Operations
* ~~add selectedCard Marker~~
* user k-means for topic map

* Fork and clone the project:

### To run

* You'll need to have [git](https://git-scm.com/) and [node](https://nodejs.org/en/) installed in your system.
* Fork and clone the project:

```
git clone https://github.com/DinoJay/TickleClient
```

* Then install the dependencies:

```
npm install
```

* Run development server:

```
npm start
```

Open the web browser to `https://<IP_ADDRESS>:8888/#/hassan`

### To build the production package

```
npm run build
```

### Development
The development files for your project you find in src/components/Hassan

### Eslint
There is a .eslint.json config for eslint ready with React plugin.
To use it, you need to install additional dependencies though:

To do the actual linting, run:

```
npm run lint
```

### Notes on importing css styles
* styles having /src/ in their absolute path are considered part of the application and exported as local css modules.
* other styles are considered global styles used by many components and are included in the css bundle directly.

repository: tbergman/TickleClient

repo_name: tbergman/TickleClient


text:
---
layout: default
---

# 1995-08-02 - some discussion of rannos in PGP (was: of a hole in PGP)

## Header Data

From<EMAIL_ADDRESS>To<EMAIL_ADDRESS>(Fred Cohen)

Message Hash: 489d36a0c5006c26c08d3f61178aab6fdce39c39331b5d5c3bfb7ce5011625f1

Message ID<EMAIL_ADDRESS>Reply To: _N/A_

UTC Datetime: 1995-08-02 10:05:21 UTC

Raw Date: Wed, 2 Aug 95 03:05:21 PDT

## Raw message

```
{% raw  %}From<EMAIL_ADDRESS>Date: Wed, 2 Aug 95 03:05:21 PDT
To<EMAIL_ADDRESS>(Fred Cohen)
Subject: some discussion of rannos in PGP (was: of a hole in PGP)
Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

Fred Cohen<EMAIL_ADDRESS>writes on cpunks:
: PGP is a product that is specifically disliked by the powers that be
: because it provides free access to strong cryptography which is against
: the public policy of the US government.  That means that people in that
: same said government likely feel it is their duty to make certain that
: they can still read PGP mail.

Certainly granted!  Hence persecution of Phil Z.

A bit difficult to achieve in the presence of available source code, I
(and many others) are using PGP compiled by themselves.  That doesn't
prove there are no subtle back-doors but it rules out unsophisticated
backdoors in distributed executables.  (Even such things could be
checked if someone got suspicious, things can be reverse engineered).

Now to the question of what can be done practically to help further
validate PGPs authenticity, and freeness from back-doors.

The way I see it the only attack which you could reasonably expect to
pull off in terms of being subtle enough to hope to get away with
given full access to source is the random number generator.

The code which actually generates the random primes, and converts them
to PGP output format is reasonably short and well defined.  Wouldn't
take long to single step that and watch that nothing happened on the
way out to file.

Encryption is a similarly simple operation, M ^ e % n you could easily
check that manually (with a certain small piece of perl even).  Same
for generation of IDEA keys.

I don't really feel qualified to comment properly on the random number
generation, but to me (I looked at the source in fair detail) it looks
good.

I mean there is real entropy being generated (timing key strokes
against a high speed clock on PCs lower on UNIX systems typically)
and the stirring operation looks good, MD5 + XOR on key.

Presuming that the MD5 implementation is correct?  Seems a pretty good
likelihood to be, it's been given enough real world tests that you
could do a very nice probablistic statistical confidence test on it.
Which would easily say that it was correct to some huge degree of
certainty.

The legitimacy of using a high frequency clock to time intervals
between key strokes, seems a very good way of generating random
numbers.  I mean there is most definately *some* entropy being
generated, PGP makes reasonably conservative estimates of the amount
of entropy generated, and stirs the whole number in (not just the
expected entropy).

I'm not saying your comments aren't useful; they are, and analysis and
critique of the random number generation in particular is very
important.  Indeed given the sheer cost of factoring a 2048 bit RSA
modulus, or of brute forcing a 128bit IDEA key, it is indeed a
pertinent question as to whether any kind of brute force attack could
be generated on the random number generation, which could be slighly
cheaper than either of these.  128bits is a lot to play with.

To me it looks good, but then I'm not a cryptographer, and also there
is the kind of "NP problem aspect" to it all in that for reasonably
complex code it will not be apparent whether a proof is possible with
out looking at the specifics.

Still I think some analysis of the random number generation code would
be useful work.  I'm not expecting to see a flaw, but doesn't mean it
shouldn't be entered into with an open mind.

I think it does not fall in the same league as the apparent difficulty
of having a secure sendmail (you said a compromising couple of bugs
seem to get found a couple of times a year), for the reason that what
PGP is doing with it's random no generation is well defined, contained
in a few lines of code, and only really relying on a couple of
assertions:

	1) MD5 is itself not inherently flawed
	2) the MD5 implementation is correct
	3) key stroke timings are a source of a safely conservatively
	   estimatable amount of entropy
	4) the key generation method does not narrow the search space
	5) there are no other compromising bugs between key generation
	   of the key and it being written to the keyring

1) Heh, not a lot you can do about that.  Is it or isn't it?  Time
will tell.

2) Seems pretty likely to me there are test strings which come with
the RFC implemenation, and it would be unbelievably unlikely that it
should produce the complete set of tests and yet somehow still be
flawed.  Given that there are _no_ branches in the algorithm (ie just
various permutations and bit twidlings based on the key info, which
get mangled into the digest.

3) Pretty good I think, especially on a PC, which has a higher speed
timer.  Some entropy is surely generated, and with safe entropy
estimation, and cryptographically secure stirring, it sounds pretty
good to me.

4) For RSA keys, I don't think so, unless you believe that strong
primes will agains become important.  For current factoring algorithms
strong primes are just as hard to factor as a completely randomly
generated prime, except for certain primes which are in any have an
infinitesimal chance of occurring.  For IDEA keys there is little
value added over a striaght ran no, as there are no special properties
which an IDEA key must have.

5) I would assert is relatively trivial to demonstrate, a couple of
hours with a debugger should demonstrate that.  You could do testing
more rigourously, test every branch, so that you have checked that the
outcome is that the key gets written to the keyfile, with various
options, not utterly fool proof of course, but pretty darn good given
the simplicity.

On the more philosophical side, with the idea that you can never be
sure that folks aren't NSA agents with hidden agendas etc, well you
can't be sure.

But the open source and sheer number of folks reading is the best
argument against this.  That means that at least some true blue
cpunks, "live free or die" types will read it in earnest, and examine
very carefully.

Another philosophical argument against PGP having any cleverly hidden
"back-doors" in the form of purposefully weakened ran-no generators or
what have you is that the NSA et all hate PGP with such vehemence.
Heh if they don't like it, it must be good :-)

And remember, say NO to key escrow :-)

(It's no good having an ultra carefully validated PGP if you go to
jail for being caught with a copy on your HD, welcome to the Land of
the Freeh, and all you know.  May happens sooner than expected, then
the only folks using crypto will be the "live free or die" folks, plus
of course the criminals who figure they have more to hide and would
get in more trouble for what they are really up to than for a
"possesion of crypto" charge.)

Adam
--
HAVE *YOU* EXPORTED RSA TODAY? --> http://dcs.ex.ac.uk/~aba/rsa/
--rsa--------------------------8<-------------------------------
#!/bin/perl -s-- -export-a-crypto-system-sig -RSA-3-lines-PERL
$m=unpack(H.$w,$m."\0"x$w),$_=`echo "16do$w 2+4Oi0$d*-^1[d2%Sa
2/d0<X+d*La1=z\U$n%0]SX$k"[$m*]\EszlXx++p|dc`,s/^.|\W//g,print
pack('H*',$_)while read(STDIN,$m,($w=2*$d-1+length($n)&~1)/2)
-------------------------------8<-------------------------------
TRY: rsa -k=3 -n=7537d365 < msg | rsa -d -k=4e243e33 -n=7537d365

{% endraw %}
```

## Thread

+ Return to [August 1995](/archive/1995/08)

+ Return to "[aba@dcs.exeter.ac.uk](/authors/aba_at_dcs_exeter_ac_uk)"

+ 1995-08-02 (Wed, 2 Aug 95 03:05:21 PDT) - some discussion of rannos in PGP (was: of a hole in PGP) -<EMAIL_ADDRESS>


text:
# Contributing to Horizon Trade Notifier
Thank you for your interest in contributing!

#### Table of Contents
[Code of Conduct](https://github.com/JartanFTW/Trade-Notifier/blob/main/.github/CODE_OF_CONDUCT.md)
[How Can I Contribute?](#how-can-i-contribute)
* [Reporting Bugs](##reporting-bugs)
* [Suggesting Features](##suggesting-features)

# How Can I Contribute?

## Reporting Bugs
Bugs are tracked as GitHub issues, allowing us to keep an organized location for all issues Horizon may encounter. You can report bugs in the [Issues tab of the GitHub repository](https://github.com/JartanFTW/Trade-Notifier/issues). Please be sure to follow the bug report formatting guidelines provided.

## Suggesting Features
Feature requests are always welcome, but that doesn't guarantee they will be implemented. If you have a great idea for a new feature, be sure to open a feature request in the\[Issues tab of the GitHub repository](https://github.com/JartanFTW/Trade-Notifier/issues). Please be sure to follow the feature request formatting guidelines provided.

repository: RagdollEngineScript/Trade-Notifier

repo_name: RagdollEngineScript/Trade-Notifier


text:
---
title: Change Control Appearance
page_title: Change Control Appearance
description: This article explains how to customize the appearance of the controls from the Telerik UI for {{ site.framework_name }} suite.
slug: getting-started-change-control-appearance
tags: Change Control Appearance
published: True
position: 2
---

# Change Control Appearance

The UI for WPF controls use [Themes]({%slug styling-apperance-implicit-styles-overview%}) to change their appearance. The suite provides over 25 built-in themes that can fit in the majority of desktop application designs. A list of all the available themes can be found [here]({%slug common-styling-appearance-available-themes%}).

There are two mechanisms that can be used to set a theme:

* [Using Implicit Styles](#setting-a-theme-using-implicit-styles)
	In this case use NoXaml dlls.

* [Using StyleManager](#setting-a-theme-using-stylemanager)
	In this case use Xaml dlls.

It is important to not mix the two approaches and always use the **correct assemblies** for the respective mechanism.

## Custom Appearance

If you wish to simply change a few of the colors or font sizes of your controls, you can [define a new style]({%slug implicit-styles-styling-the-controls%}) for them and override the desired properties.

#### **[XAML] Example 1: Custom styles for RadListBox**
{{region getting-started-change-control-appearance-0}}
    <Style TargetType="telerik:RadListBox">
        <Setter Property="Foreground" Value="Green" />
        <Setter Property="FontSize" Value="22" />
    </Style>
{{endregion}}

If you wish to apply further customizations such as repositioning the building parts of a control, however, you will most probably need to [edit its control template]({%slug styling-apperance-editing-control-templates%}).

## Color Theme Generator

The **Crystal**, **Fluent**, **Material**, **Office2016Touch**, **Office2016**, **Green**, **VisualStudio2013**, **Office2013**, **Windows8Touch** and **Windows8** themes are fully customizable using the available brushes to adjust each color.

For seamless color customization and faster palette creation that looks great and matches all controls, we created the [Color Theme Generator]({%slug common-styling-color-theme-generator%}).

## Next Steps

* [More Learning Resources]({%slug getting-started-next-steps%})
{% if site.site_name == 'WPF' %}
* [Start from the First Steps]({%slug getting-started-first-steps%})
{% else %}
* [Start from the First Steps]({%slug getting-started-first-steps-sl%})
{% endif %}

## See Also

* [Setting a Theme]({%slug styling-apperance-implicit-styles-overview%})
* [Xaml vs. NoXaml]({%slug xaml-vs-noxaml%})
* [Styling the Controls]({%slug implicit-styles-styling-the-controls%})
* [Editing Control Templates]({%slug styling-apperance-editing-control-templates%})
* [Available Themes]({%slug common-styling-appearance-available-themes%})
* [Color Theme Generator]({%slug common-styling-color-theme-generator%})

repository: telerik/xaml-docs

gha_language: JavaScript

gha_license_id: NOASSERTION

repo_name: telerik/xaml-docs


text:
# JWT Middleware

- [JWT Middleware](#jwt-middleware)
  - [1. Intro](#1-intro)
  - [2. Key features](#2-key-features)
  - [3. Installation](#3-installation)
  - [4. Examples](#4-examples)
  - [5. References](#5-references)

## 1. Intro

A middleware that will check that a [JWT](https://jwt.io) is sent on the request header (the header key is customizable) and will then set the content of the JWT into the context.

This module lets you authenticate HTTP requests using JWT tokens in your Go Programming Language applications.

## 2. Key features

- Ability to **check the request header for a JWT**.
- **Decode the JWT** and set the content of it to the request context.
- **Generate the token string** for login handler.

## 3. Installation

```bash
go get github.com/ntk148v/jwt-middleware
```

## 4. Examples

You can check out working examples in the [examples folder](./examples) for the basic usage.

## 5. References

This module is strong inspired by:

- https://github.com/auth0/go-jwt-middleware
- https://github.com/adam-hanna/goLang-jwt-auth-example
- https://github.com/go-pandora/pkg/blob/master/auth/jwt/

repository: vCloud-DFTBA/faythe

gha_language: Go

repo_name: vCloud-DFTBA/faythe


text:
---
title: 'The Web We Take for Granted'
description: Two experts discuss how our online freedom is in immediate danger.
created_at: 19-10-2017
time: '23-11-2017 19:30'
end: '23-11-2017 21:00'
location: 'Auditorium D, Jozef Plateaustraat 22, 9000 Gent'
locationlink: Instituut der Wetenschappen
facebook: 'https://www.facebook.com/events/313118845828839/'
color: '#aea485'
gradient: false
image: 'https://zeus.ugent.be/zeuswpi/Ow2Lrgdx.svg'
---

This event is part of the [TeCH TalkZ](<%= @items['/blog/17-18/tech-talkz.md'].path %>), a collaboration between the two student associations Zeus WPI and CenEka.

# Our Freedom At Stake

In the last year, Net Neutrality has been a hot topic in the news.
America is creating a law that would allow ISP's to make your connection to any service (e.g. Netflix) slower, unless you pay an extra fee.

Regulations like this are not only happening across the Atlantic sea, but also in our own continent. The European Union is finally reforming our copyright laws and some laws that won't do any good for your freedom. Like sharing articles on Facebook and Twitter? With the reform, this could become a crime... Come to the talks and we will explain you why and we will tell you how we can stop it.

## The speakers

### [Ruben Verborgh](https://ruben.verborgh.org) (IDLab)

Ruben Verborgh is a professor at Ghent University. As an expert in the Web, decentralization, he will bring you up-to-date with the state of Net Neutrality. What is happening and why should it be prevented?

### [Felix Reda](https://felixreda.eu/en/) (European Parliament)

Felix Reda is a member of the European Parliament. He will tell us about how the [EU copyright reform](https://felixreda.eu/eu-copyright-reform/) will be beneficial to how we can use the Web as a way to express ourselves.

# Info
The talks are free of charge for everyone and will be held in [Auditorium D](https://soleway.ugent.be/routes/5183) of Campus Plateau - Rozier (Jozef Plateaustraat 22). Ruben Verborgh will start speaking at 19:30. After a short break, Felix Reda is expected to continue at 20:15. After the talks there will be time to discuss the matter with your friends and the speakers with a drink.