text:
---
layout: post
title:      "CSS - Diamonds"
date:       2019-11-12 18:29:25 +0000
permalink:  css_-_diamonds
---

Hello and welcome back to another css blog post by Monks and Ninjas. Today we will be talking about working with diamonds and images in CSS. So the problem we have is cropping images into a diamond shape, which isn't obvious. One previous solution, not that long ago, was to just cut the image into a diamond shape before putting it into HTML. In the modern age we now have a couple of ways of tackling this problem. The first is called the transform-based solution.

## Transform-Based

This solution is similar in some ways to our secret parallelograms solution in the previous post. We needed to wrap our image with a div tag, then apply opposite rotate() transforms to them, like this:

```
<div class="picture">
      <img src="adam-catlace.jpg" alt="..." />
<div>

.picture {
     width: 400px;
		 transform: rotate(45deg);
		 overflow: hidden;
}
.picture > img {
      max-width: 100%;
			transform: rotate(-45deg);
}
```

If you test the code out yourself, you wil see that this doesn't quite work, as we get an octagon shape.  The missing piece here is some math! The problem is the max-width: 100% declaration 100% refers to the side of our .picture container. However, we want our image to be as wide as its diagonal, not its side. Using the pythagorean theorem will give use some insight. Skipping the math, the theorem tells us that the diagonal of a squre is equal to its side multiplied by 1.414213562. Thus we get the number 142% after rounding up and multiplying by 100%. We want to be slightly larger than this number when using max-width.

Instead of doing this though, we will want the size of the image to remain 100%, in case CSS transforms are not supported. Thus we will scale() the image, like so:

```
.picture {
      width: 400px;
      transform: rotate(45deg);
			overflow: hidden;
}
.picture > img {
       max-width: 100%;
			 transform: rotate(-45deg) scale(1.45);
}
```

## Clipping Path

The next method is called the clipping path solution. Clipping paths allow us to clip the element in the shape that we please. In this case, we're going to use a polygon() shape to specify a diamond.

```
clip-path: plygon(50% 0, 100% 50%, 50% 100%, 0 50%);
```

And with fewer code, we have what we want. This method is also animatable, as long as we animate between the same shape functions( polygon()) with the same number of points.

And there you have it, working with Diamonds! Next CSS post will cover cutout corners.

extension: markdown


text:
Source code & pretrained model for "[PointTriNet: Learned Triangulation of 3D Point Sets](https://nmwsharp.com/research/learned-triangulation/)", by [Nicholas Sharp](https://nmwsharp.com/) and [Maks Ovsjanikov](http://www.lix.polytechnique.fr/~maks/) at ECCV 2020.

- PDF: [link](https://nmwsharp.com/media/papers/learned-triangulation/learned_triangulation.pdf)
- Project: [link](https://nmwsharp.com/research/learned-triangulation/)
- Talk: [link](https://www.youtube.com/watch?v=PoNT0u_wz4Y)

![demo gif](https://github.com/nmwsharp/learned-triangulation/blob/master/teaser.gif)

## Example: Generate a mesh

The script `main_generate_mesh.py` applies a trained model to triangulate a point set. A set of pretrained weights are included in `saved_models/`

```sh
python src/main_generate_mesh.py saved_models/model_state_dict.pth path/to/points.ply
```

Check out the `--help` flag on the script for arguments. In particular, the script can either take a point cloud directly as input, or take a mesh as input and uniformly sample points with `--sample_cloud`.

Note that by default, the script opens up a GUI (using [Polyscope](http://polyscope.run/)) to show results. To skip the GUI and just write out the resulting mesh, use:

```sh
python src/main_generate_mesh.py path_to_your_cloud_or_mesh.ply --output result
```

## Example: Integrating with code

If you want to integrate PointTriNet in to your own codebase, the `PointTriNet_Mesher` from `point_tri_net.py` encapsulates all the functionality of the method. It's a `torch.nn.Module`, so you can make it a member of other modules, load weights, etc.

To create the model, load weights, and triangulate a point set, just call:

```python

model = PointTriNet_Mesher()
model.load_state_dict(torch.load(some_path))
model.eval()

samples = # your (B,V,3) torch tensor of point positions

with torch.no_grad():
  candidate_triangles, candidate_probs = model.predict_mesh(samples)
  # candidate_triangles is a (B, F, 3) index tensor, predicted triangles
  # candidate_probs is a (B, F) float tensor of [0,1] probabilities for each triangle

  # You are probably interested in only the high-probability triangles. For example,
  # get the high-probability triangles from the 0th batch entry like
  b = 0
  prob_thresh = 0.9
  high_prob_faces = candidate_triangles[b, candidate_probs[b,:] > prob_thresh, :]

```

## Example: Generate data & train the model

**Prerequisite**: a collection of shapes to train on; we use the training set (all classes) of ShapeNet v2, which you can download on your own. Note that we _do not_ train PointTriNet to match the triangulation of existing meshes, we're just using meshes as a convenient data source from which to sample point cloud patches.

**Step 1** Sample point cloud patches as training (and validation) data

```shell
python src/generate_local_points_dataset.py --input_dir=/path/to/train_meshes/ --output_dir=data/train/ --n_samples=20000

python src/generate_local_points_dataset.py --input_dir=/path/to/val_meshes/ --output_dir=data/val/ --n_samples=5000
```

**Step 2** Train the model

```sh
python src/main_train_model.py
```

With default parameters, this will train for 3 epochs on the dataset above, using < 8GB gpu memory and taking ~6hrs on an RTX 2070 GPU. Checkpoints will be saved in `./training_runs`, along with tensorboard logging.

Note that this script has paths at the top relative to the expected directory layout of this repo. If you want to use a different directory layout, you can update the paths.

## Dependencies

Depends on `pytorch`, `torch-scatter`, `libigl`, and `polyscope`, along with some other typical numerical components. The code is pretty standard, and there shouldn't be any particularly strict version requirements on these dependencies; any recent version should work fine.

For completeness, an `environment.yml` file is included (which is a superset of the required packages).

## Citation

If this code contributes to academic work, please cite:

```bib
@inproceedings{sharp2020ptn,
  title={"PointTriNet: Learned Triangulation of 3D Point Sets"},
  author={Sharp, Nicholas and Ovsjanikov, Maks},
  booktitle={Proceedings of the European Conference on Computer Vision (ECCV)},
  pages={},
  year={2020}
}
```

license: MIT

repository: Wang-Wentao/learned-triangulation

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: Wang-Wentao/learned-triangulation


text:
---
title: How to Request Authorization to Media
date: 10 Jul 2021
---

> **Important:**
> If the appropriate key is not present in your app’s Info.plist file when your app
> requests authorization or attempts to use a capture device, the system terminates
> your app.

```swift
switch AVCaptureDevice.authorizationStatus(for: .video) {
    case .authorized: // The user has previously granted access to the camera.
        self.setupCaptureSession()

    case .notDetermined: // The user has not yet been asked for camera access.
        AVCaptureDevice.requestAccess(for: .video) { granted in
            if granted {
                self.setupCaptureSession()
            }
        }

    case .denied: // The user has previously denied access.
        return

    case .restricted: // The user can't grant access due to restrictions.
        return
}
```

# References

- [Requesting Authorization for Media Capture on iOS](https://developer.apple.com/documentation/avfoundation/cameras_and_media_capture/requesting_authorization_for_media_capture_on_ios)


text:
# <img<EMAIL_ADDRESS>width="32" height="32"/> [![Rocrail](https://img.shields.io/chocolatey/v/rocrail.svg?label=Rocrail)](https://community.chocolatey.org/packages/rocrail) [![Rocrail](https://img.shields.io/chocolatey/dt/rocrail.svg)](https://community.chocolatey.org/packages/rocrail)

## Usage

To install Rocrail, run the following command from the command line or from PowerShell:

```powershell
choco install rocrail
```

To upgrade Rocrail, run the following command from the command line or from PowerShell:

```powershell
choco upgrade rocrail
```

To uninstall Rocrail, run the following command from the command line or from PowerShell:

```powershell
choco uninstall rocrail
```

## Description

Rocrail is free software for controlling model trains for Linux, Apple macOS, Raspberry Pi & Odroid and of course Windows operating systems.

Rocrail assumes all responsibilities for controlling a model railroad and their accessories. Trains can be either manually controlled or completely controlled by the software in automatic mode. A mixed operation, i.e. controlling some trains manually and other trains in fully automatic mode is possible.

Nightly builds are snapshots and it is recommended to save your last working revision in case it will not work for you.
Using this program is at your own risk. Robert Jan Versluis can not be held responsible for any damage that the use of this program may cause to your computer, model trains or anything else. To prevent problems it is strongly recommended to first read the Manual.

**Please Note**: This is an automatically updated package. If you find it is
out of date by more than a day or two, please contact the maintainer(s) and
let them know the package is no longer updating correctly.

## Links

[Chocolatey Package Page](https://community.chocolatey.org/packages/rocrail)

[Software Site](https://wiki.rocrail.net/doku.php)

[Package Source](https://github.com/mkevenaar/chocolatey-packages/tree/master/automatic/rocrail)

repository: mkevenaar/chocolatey-packages

gha_language: PowerShell

repo_name: mkevenaar/chocolatey-packages


text:
# Api Reference

This page collects the documentation for the public types of the Stubbery library.

The main class of the library is [**`ApiStub`**](Stubbery.ApiStub.html), this should be the starting point when creating and starting a stub.

repository: markvincze/Stubbery

branch_name: refs/heads/main

gha_language: C#

gha_license_id: MIT

repo_name: markvincze/Stubbery


text:
# Favorites Release Log

```Minimum configuration DNN 7.1.2+ (.NET 4.0) / DNN 8+ (.NET 4.5)```

## 01.07.00

22/Jan/2016

* Fixes
	* Added support for DNN8
    * Minimum configuration is now DNN 7.1.2+ (.NET 4.0) / DNN 8+ (.NET 4.5)

```Minimum configuration DNN 6.0.3 / DNN 7.0.0 / .NET 3.5```

## 01.06.00

08/Jul/2014

-	Bug fixes
	- Fixed issue with multiple portal support

## 01.05.00
20/Feb/2013

-   Updates
    -   Added DNN7 version compiled against DNN 7.0.0

```Minimum configuration DNN 5.2.3+ / DNN 6+ / .NET 3.5```

## 01.04.00
18/Oct/2012

-   Additions
    -   Empty Html - display any html when the favorites list is empty
    -   Unathenticated Html - display any html when the user is not
        logged in

## 01.03.03

13/Jul/2012

-   Enhancements
    -   Updated to enable Azure deployment

## 01.03.02

29/Apr/2012

-   Enhancements
    -   Updated settings screen to adhere more closely with DNN6
        standards

## 01.03.01

26/Apr/2012

-   Bug Fixes
    -   Bug introduced on switch to DNN 5.2.3 dependency fixed - Url on
        Fav listing was empty

## 01.03.00

19/Apr/2012

-   Additions
    -   [DELETEACTION] image src is now controlled by a localised string
        in view.ascx.resx

-   Enhancements
    -   Minimum supported install is now DNN 5.2.3 and DNN 6.0.0, both
        have to be .NET Framework 3.5 minimum

## 01.02.01

1/Jan/2012

-   Additions
    -   Added new token - [DESCRIPTION] - inserts page description

## 01.02.00

9/Aug/2011

-   Additions
    -   Added capture of page url and page title
    -   Added mode that will show page url, page title instead of tab
        information
    -   Added optional method of capturing a custom page title
        -   setting a hidden input with an id of favorite\_title will be
            captured instead of the page title
        -   useful for modules such as DMX that don't set the page title
            when moving through their folder hierarchy

-   Enhancements
    -   Made DNN6 compatible

## 01.00.00

24/Aug/2010

-   Original Release

gha_language: Visual Basic


text:
# Sumologic Provider
This provider is used to manage collectors and sources supported by Sumologic. The provider needs to be configured with the proper credentials before it can be used.

## Example Usage
```hcl
# Configure the Sumologic Provider
provider "sumologic" {
    access_id   = "${var.sumologic_access_id}"
    access_key  = "${var.sumologic_access_key}"
    environment = "us2"
}

# Create a collector
resource "sumologic_collector" "collector" {
    name = "MyCollector"
}

# Create a HTTP source
resource "sumologic_http_source" "http_source" {
    name         = "http-source"
    category     = "my/source/category"
    collector_id = "${sumologic_collector.collector.id}"
}

# Create HTTP source / SNS auto-confirm
resource "sumologic_http_source_sns_autoconfirm" "sns_confirm" {
  category             = "aws/config/${var.project_name}/${var.env}"
  confirmation_timeout = 3

  triggers {
    http_source_url = "${sumologic_http_source.http_source.url}"
  }
}
```

## Authentication
The Sumo Logic Provider offers a flexible means of providing credentials for authentication. The following methods are supported and explained below:

 - Static credentials
 - Environment variables

### Static credentials
Static credentials can be provided by adding an `access_id` and `access_key` in-line in the Sumo Logic provider block:

Usage:
```hcl
provider "sumologic" {
    environment = "us2"
    access_id   = "your-access-id"
    access_key  = "your-access-key"
}
```

### Environment variables
You can provide your credentials via the `SUMOLOGIC_ACCESSID` and `SUMOLOGIC_ACCESSKEY` environment variables, representing your Sumo Logic Access ID and Sumo Logic Access Key, respectively.

Usage:
```hcl
provider "sumologic" { }
```

```bash
$ export SUMOLOGIC_ACCESSID="your-access-id"
$ export SUMOLOGIC_ACCESSKEY="your-access-id"
$ terraform plan
```

## Argument Reference
- `access_id` - (Optional) This is the Sumo Logic Access ID. It must be provided, but it can also be source from the SUMOLOGIC_ACCESSID environment variable.
- `access_key` - (Optional) This is the Sumo Logic Access Key. It must be provided, but it can also be sourced from the SUMOLOGIC_ACCESSKEY variable.
- `environment` - (Optional) This is the API endpoint to use. Default is `us2`. See the [Sumo Logic documentation][1] for details on which environment you should use. This value can also be source from the SUMOLOGIC_ENVIRONMENT variable.

[Back to Index][0]

[0]: README.md
[1]: https://help.sumologic.com/APIs/General_API_Information/Sumo_Logic_Endpoints_and_Firewall_Security

repository: hamstah/sumologic-terraform-provider

repo_name: hamstah/sumologic-terraform-provider


text:
---
title: "Consulting"
linkTitle: "Consulting"
type: docs
weight: 1
description: >
  What strategies does a organization need to create economic and successful products based on open technology?

---

Protontypes offers consulting on open source application and business strategies for developers and management including:

* Investigations on existing high quality open source product for your industry
* InnerSource Methods to increase collaboration between units of your organisation [[1]](https://resources.github.com/whitepapers/introduction-to-innersource/)
* Consulting on open source business models like open core, software-as-a-service or support only [[2]](https://a16z.com/2019/10/04/commercializing-open-source/)
* Consulting on business and innovation potential for new markets
* Appropriate licensing for your open source release [[3]](https://medium.com/@moqod_development/understanding-open-source-and-free-software-licensing-c0fa600106c9) [[4]](https://people.debian.org/~dktrkranz/legal/Understanding%20Open%20Source%20and%20Free%20Software%20Licensing.pdf)
* Maintenance strategies for longtime support, adaption and improvements
* Community creation and conservation
* Usage of different open source licenses in your organization
* Building partnerships and ecosystems based on open technologies like the [Autoware Foundation](https://www.autoware.org/) or [ELISA](https://elisa.tech/).


text:
# Titlecase

Add titlecase methods to String

## Installation

Add this line to your application's Gemfile:

    gem 'titlecase'

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install titlecase

## Usage

Include this gem in your application to add titlecase methods for String.

    'the quick brown fox jumped over the lazy dog'.titlecase
	# => "The Quick Brown Fox Jumped Over the Lazy Dog"

The *bang* version overwrites the string:

    s = 'the quick brown fox jumped over the lazy dog'
	s.titlecase!
	# => "The Quick Brown Fox Jumped Over the Lazy Dog"
	s
 	# => "The Quick Brown Fox Jumped Over the Lazy Dog"

Stop words can be added to the call as an array:

    'the quick brown fox jumped over the lazy dog'.titlecase(%w[the fox])
	# => "The Quick Brown fox Jumped Over the Lazy Dog"

Note that the first character of the string will *always* be capitalized.

## Author

Tamara Temple<EMAIL_ADDRESS>
## Contributing

1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request

repository: tamouse/titlecase

repo_name: tamouse/titlecase


text:
---
layout: page
title: "Api"
---

## Site

The site object is a global data object used primarily as a convenience strategy.

Define any valid YAML data structure in `_site.yml` and this data will be globally accessible to all pages, layouts, and partials via the `site` variable.

Two useful examples would be defining authorship data:

    author :
      name : Pau Gasol
      email<EMAIL_ADDRESS>      github : username
      twitter : username
      feedburner : feedname

Or composing an Array of page ids, to be used for rendering the primary Navigation:

    navigation :
      - quick-start.md
      - how-it-works.md
      - usage.md

Lastly, in case you ever need it, the full `_config.yml` hash is injected into the site variable at the key : `config`

This makes available, for example, your current theme:

    site.config.theme
    # returns 'twitter'


text:
# IBM Cloud Foundry deployment to a Standard Plan Event Streams

## Overview

To deploy and run the sample:
* Setup your `manifest.yml` with your service details
* Use `ibmcloud cf push` to deploy the app to IBM Cloud Foundry
* Use `ibmcloud cf logs` to check the application.

## Setup the manifest.yml

1. Select the Event Streams service you would like to bind your application to. Do this by replacing `<YOUR_SERVICE_INSTANCE_NAME>` with your actual service's name in `manifest.yml`:
```yaml
  services:
    - "<YOUR_SERVICE_INSTANCE_NAME>"
```
2. Consider your domain: You might need to change this in the `manifest.yml` as the domain varies by IBM Cloud region. If unsure, just delete the domain line and IBM Cloud will pick the domain for you.

## Deploy the Sample to IBM Cloud Foundry
Before continuing, connect to IBM Cloud with the [IBM Cloud command line interface](https://console.bluemix.net/docs/cli/reference/bluemix_cli/get_started.html#getting-started).

Once connected to IBM Cloud, push the app:
```shell
ibmcloud app push
```

## Produce and Consume Messages
The sample application should have created the default sample topic and started producing and consuming messages in an infinite loop. View the logs to verify this:
```shell
ibmcloud app logs kafka-python-console-sample
```

repository: nibalizer/falco-ibm-kubernetes-service

repo_name: nibalizer/falco-ibm-kubernetes-service


text:
# Android Robot Test

This is an android version of theToy Robot Simulator with a visual representation on a canvas and buttons for robot manipulation.

Thi application also supports customizable grid size and customized commands that are made from the basic commands (MOVE, LEFT, RIGHT and REPORT). You can add more custom commands and edit them.

## Description

- The application is a simulation of a toy robot moving on a square tabletop,
  of dimensions 5 units x 5 units.
- There are no other obstructions on the table surface.
- The robot is free to roam around the surface of the table, but must be
  prevented from falling to destruction. Any movement that would result in the
  robot falling from the table must be prevented, however further valid movement
  commands must still be allowed.

The application that can read in commands of the following form

    PLACE X,Y,F
    MOVE
    LEFT
    RIGHT
    REPORT

- PLACE will put the toy robot on the table in position X,Y
  and facing NORTH, SOUTH, EAST or WEST.
- The origin (0,0) can be considered to be the SOUTH WEST most corner.
- The first valid command to the robot is a PLACE command, after that,
  any sequence of commands may be issued, in any order, including another
  PLACE command. The application should discard all commands in the
  sequence until a valid PLACE command has been executed.
- MOVE will move the toy robot one unit forward in the direction it is currently
  facing.
- LEFT and RIGHT will rotate the robot 90 degrees in the specified direction
  without changing the position of the robot.
- REPORT will announce the X,Y and F of the robot.
- Any move that would cause the robot to fall must be ignored.

## Test Input and Output:
App has Unit Tests to assert the correct position after moving and turning the robot around.

a)

	PLACE 0,0,NORTH
    MOVE
    REPORT

	Output: 0,1,NORTH
b)

	PLACE 0,0,NORTH
	LEFT
	REPORT

	Output: 0,0,WEST
c)

	PLACE 1,2,EAST
	MOVE
	MOVE
	LEFT
	MOVE
	REPORT

	Output: 3,3,NORTH

repository: Davidvster/Android-robot-test

gha_language: Kotlin

repo_name: Davidvster/Android-robot-test


text:
# Wayline Kitchen Sink

Kitchen sink for testing Wayline interactive demos

Set the `BINGMAPS_TOKEN` environment variable for this project to work properly

## Build Setup

``` bash
# install dependencies
$ yarn install

# serve with hot reload at localhost:3000
$ yarn run dev

# build for production and launch server
$ yarn run build
$ yarn start

# generate static project
$ yarn run generate
```

This project is based on [Nuxt.js](https://nuxtjs.org).

## License

[MIT](LICENSE) © [Cyberscape](https://cyberscape.co/).

repository: cscape/wayline-ks

repo_name: cscape/wayline-ks


text:
Course project for ["Analysing Software using Deep Learning"](https://www.sola.tu-darmstadt.de/index.php?id=13101). See the [project description](https://www.sola.tu-darmstadt.de/fileadmin/user_upload/Group_SOLA/Teaching/summer_2017/ASDL/project_description_20170529.pdf) for details. The code is based on Michael Pradels [repository](https://github.com/michaelpradel/ASDL2017).

The task was to fill missing code fragments using deep learning. This could for example be used in code editors to make programming faster. In the following example the network would probably predict _i++_ for the missing part.
```
for (i = 0; i < cars.length; ...) {
  text += cars[i] + "<br>";
}
```

To aqcuire this goal 1000 code files were provided that could be used for training.

The best accuracy of 0.645 on the test set was reached with a recurrent neural network and by using both the prefix as well as the suffix of the missing code fragment.


text:
The latin square problems are generated using the code of https://github.com/HelgeS/lsencode which itself is a "Mirror of Carla P. Gomes' lsencode (Generator of Quasigroup Completion Problem and related problems (C code))". These are instances that represent quasigroup (Latin square) completion problems.

The .pls files are the problems in text format (holes are -1), the .cnf files contain the corresponding cnf of the problem.

repository: VincentDerk/Paper-SymGANAK-benchmark

repo_name: VincentDerk/Paper-SymGANAK-benchmark


text:
# pyscanner
Scan documents from pictures in Python using [OpenCV](https://opencv.org/).

# Usage

```
$ python pyscanner.py "image_path" "destination_path"
```

If the document was not correctly scanned there is a way to find where the process failed. Just run:
```
$ python pyscanner.py --debug "image_path" "destination_path"
```
Along the final (although incorrect) scanned document there will be an additional file with the original image with the detected document's corners and edges -- red dots and lines -- and all detected edges in the image -- blue lines --.

repository: alvarorga/pyscanner

repo_name: alvarorga/pyscanner


text:
# luno-node changelog

## [1.1.0](https://github.com/lunoio/luno-node/tree/v1.1.0) (2016-04-21)
[Compare](https://github.com/lunoio/luno-node/compare/v1.0.5...v1.1.0)

- Added JSDoc comments to main functions
- Added argument validation to ensure proper usage and highlight mistakes
- Added utils to handle module errors and contain common functions in the future

## [1.0.5](https://github.com/lunoio/luno-node/tree/v1.0.5) (2016-04-06)
[Compare](https://github.com/lunoio/luno-node/compare/v1.0.4...v1.0.5)

- Sandbox Mode can now be configured for all requests and overridden per-request, rather than having to be specified on every request.

## [1.0.4](https://github.com/lunoio/luno-node/tree/v1.0.4) (2016-03-30)
[Compare](https://github.com/lunoio/luno-node/compare/v1.0.3...v1.0.4)

- Routes can now include `/v1` prefix without resulting in a `route_not_found` error ([\#1](https://github.com/lunoio/luno-node/issues/1))

## [1.0.3](https://github.com/lunoio/luno-node/tree/v1.0.3) (2016-03-21)
[Compare](https://github.com/lunoio/luno-node/compare/v1.0.2...v1.0.3)

- Errors now have a `description` property, which is returned by the API to supplement the `message` with more details.

## [1.0.2](https://github.com/lunoio/luno-node/tree/v1.0.2) (2016-02-29)
[Compare](https://github.com/lunoio/luno-node/compare/v1.0.1...v1.0.2)

- Added [Session middleware](https://github.com/lunoio/luno-node/tree/v1.0.2#middleware) to easily run `/sessions/access` code, setting `req.session` with the current active session for a user.

## [1.0.1](https://github.com/lunoio/luno-node/tree/v1.0.1) (2016-02-09)
[Compare](https://github.com/lunoio/luno-node/compare/v1.0.0...v1.0.1)

- Fixed HMAC signatures for requests that include UTF-8 characters (e.g. emoji).

## [1.0.0](https://github.com/lunoio/luno-node/tree/v1.0.0) (2016-02-08)

- Initial release

repository: reisap/luno-node

repo_name: reisap/luno-node


text:
# Delta

[![Project Status: WIP – Initial development is in progress, but there has not yet been a stable, usable release suitable for the public.](https://www.repostatus.org/badges/latest/wip.svg)](https://www.repostatus.org/#wip) [![Build Status](https://img.shields.io/travis/dragosv/delta/master.svg?label=build)](https://travis-ci.org/dragosv/delta)
[![codecov](https://codecov.io/gh/dragosv/delta/branch/master/graph/badge.svg)](https://codecov.io/gh/dragosv/delta)
[![Go Report Card](https://goreportcard.com/badge/github.com/dragosv/delta)](https://goreportcard.com/report/github.com/dragosv/delta)
[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fdragosv%2Fdelta.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2Fdragosv%2Fdelta?ref=badge_shield)

Pluggable Command Line Interface for job-based Translation Management Services

## License
[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fdragosv%2Fdelta.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fdragosv%2Fdelta?ref=badge_large)

repository: fossabot/delta

repo_name: fossabot/delta


text:
# Automated employee payments

Now we know the basics of solidity, lets try this fun example!!!

Many employees specially working in unregulated industries get paid on the
hourly basis i.e. they get paid based on the hours they work instead of
a fixed payment. In such cases, the amount they worked for is calculated at
the end of some time period like the end of a week and they get paid accordingly.

A Smart contract could be a great application in such a case with many advantages.
Firstly, the time worked by the employee can be calculated paid automatically at
the end of the day. Further, it will provide a transparent record for accounting
purposes while at the same time ensuring employees receive payment they deserve.

{% exercise %}
In this exercise, we will try and implement such an automated payment system.
Your first task is go over the Employee data-structure and the provided functions
and function description to understand the example.

The `employees` mapping is important to the example, which can be only modified
by the `admin` (also creator of contract). Employee's should call the
`startWork` and `stopWork` functions to indicate when they start and stop
working on their shift. Finally, note that as soon as employee stopWork we
should calculate the amount due and call the provided `processPayment` function
to transfer the required funds.

> **Pro tip**: Think about who should be calling each function and check it with the `msg.sender` to verify.

Now you should try and implement `addEmployee`, `startWork` and `stopWork` functions.

{% initial %}
pragma solidity >=0.4.22 <0.6.0;
contract EmployeePay {

    struct Employee {
        uint startedWorkSince;
        uint256 amountPending;
        bool atWork;
        bool isValue;
    }

    address private admin;
    mapping(address => Employee) private employees;
    uint private constant wage = 1 wei;

    /// Create a new EmployeePay contract
    constructor() public {
        admin = msg.sender;
    }

    /// Employee starts working, record time
    function startWork() public {
    }

    /// Employee stops working, calculate hours and do payment
    function stopWork() public {
    }

    /// Adding a new employee by admin
    function addEmployee(address employee) public {
    }

    /// Removing a  employee by admin
    function removeEmployee(address employee) public {
        if (msg.sender != admin || !employees[employee].isValue) return;
        delete employees[employee];
    }

    /// Helper functions to process payments
    function processPayment(address payable employee, uint amount) private {
        if(amount >= address(this).balance){
            employee.send(amount);
        } else {
            employees[employee].amountPending += amount;
        }
    }

    function deposit(uint256 amount) payable public {
        require(msg.value == amount);
        // nothing else to do!
    }

    /// Following functions are for testing only

    function employeeExists(address employee) public view returns ( bool result ) {
        result = false;
        if (employees[employee].isValue) result = true;
    }

    function employeeAtWork(address employee) public view returns ( bool result ) {
        result = false;
        if (employees[employee].atWork) result = true;
    }

    function changeAdmin(address newAdmin) public {
        admin = newAdmin;
    }

}

{% solution %}
pragma solidity >=0.4.22 <0.6.0;
contract EmployeePay {

    struct Employee {
        uint startedWorkSince;
        uint256 amountPending;
        bool atWork;
        bool isValue;
    }

    address private admin;
    mapping(address => Employee) private employees;
    uint private constant wage = 1 wei;
    uint private constant secondsInHour = 3600;

    /// Create a new EmployeePay contract
    constructor() public {
        admin = msg.sender;
    }

    /// Employee starts working, record time
    function startWork() public {
        address employee = msg.sender;
        if (!employees[employee].isValue) return;
        employees[employee].atWork = true;
        employees[employee].startedWorkSince = now;
    }

    /// Employee stops working, calculate hours and do payment
    function stopWork() public {
        address payable employee = msg.sender;
        if (!employees[employee].isValue) return;
        uint timeWorked = (now - employees[employee].startedWorkSince);
        uint hoursWorked = timeWorked/secondsInHour;
        employees[employee].atWork = false;
        processPayment(employee, hoursWorked*wage);
    }

    /// Adding a new employee by admin
    function addEmployee(address employee) public {
        if (msg.sender != admin || employees[employee].isValue) return;
        employees[employee].isValue = true;
    }

    /// Removing a  employee by admin
    function removeEmployee(address employee) public {
        if (msg.sender != admin || !employees[employee].isValue) return;
        delete employees[employee];
    }

    /// Helper functions to process payments
    function processPayment(address payable employee, uint amount) private {
        if(amount >= address(this).balance){
            employee.send(amount);
        } else {
            employees[employee].amountPending += amount;
        }
    }

    function deposit(uint256 amount) payable public {
        require(msg.value == amount);
        // nothing else to do!
    }

    /// Following functions are for testing only

    function employeeExists(address employee) public view returns ( bool result ) {
        result = false;
        if (employees[employee].isValue) result = true;
    }

    function employeeAtWork(address employee) public view returns ( bool result ) {
        result = false;
        if (employees[employee].atWork) result = true;
    }

    function changeAdmin(address newAdmin) public {
        admin = newAdmin;
    }

}

{% validation %}
pragma solidity >=0.4.0 <0.6.0;
import "./EmployeePay.sol";

contract test {

    EmployeePay employeePay;

    function addEmployeeTest () public {
        employeePay = new EmployeePay();
        Assert.equal(employeePay.employeeExists(address(this)), bool(false), "Employee not added yet");
        employeePay.addEmployee(address(this));
        Assert.equal(employeePay.employeeExists(address(this)), bool(true), "Employee not added");
    }

    function onlyAdminCanAddEmployeeTest () public {
        employeePay = new EmployeePay();
        employeePay.changeAdmin(0xf39c53207A1cec3F8dd2dA15B9aeb8340684AAFF);
        Assert.equal(employeePay.employeeExists(address(this)), bool(false), "Employee not added yet");
        employeePay.addEmployee(address(this));
        Assert.equal(employeePay.employeeExists(address(this)), bool(false), "Only admin can edd employee");
    }

    function employeeAtWorkTest () public {
        employeePay = new EmployeePay();
        employeePay.addEmployee(address(this));
        Assert.equal(employeePay.employeeAtWork(address(this)), bool(false), "Employee atWork after adding");
        employeePay.startWork();
        Assert.equal(employeePay.employeeAtWork(address(this)), bool(true), "Employee not atWork after Starting Work");
        employeePay.stopWork();
        Assert.equal(employeePay.employeeAtWork(address(this)), bool(false), "Employee atWork after Stoping Work");
    }

    function employeeAtWorkNotExistTest () public {
        employeePay = new EmployeePay();
        Assert.equal(employeePay.employeeAtWork(address(this)), bool(false), "Employee atWork after adding");
        employeePay.startWork();
        Assert.equal(employeePay.employeeAtWork(address(this)), bool(false), "Employee not exist");
    }
}

{% endexercise %}

> **HINTS**
> * extract the employee information from msg sender and update the employees struct.
> * Don't forget to call processPayment at the end of stopWork to transfer funds which are calculated by time * wage.


text:
---
title: Styles and Templates
page_title: Styles and Templates
description: Check our "Styles and Templates" documentation article for the RadTreeMap {{ site.framework_name }} control.
slug: radtreemap-styles-and-templates
tags: styles,and,templates
published: True
position: 2
---

# Styles and Templates

This section is intended to give you a broad understanding of the possible ways in which you can change the visual appearance of the RadTreeMap and RadPivotMap.

You can modify the look of the RadTreeMap by using the __RadTreeMap.DefaultItemTemplate__ and __TypeDefinition.ItemTemplate__ properties. For the RadPivotMap you can use __RadPivotMap.LeafItemStyle__ and __GroupDefinition.ItemStyle__ properties. You can also use the __TypeDefiniton.ItemStyle__ which is common for both.

The following small practical samples will show you how to use this properties to customize your control:

## RadPivotMap

There could be cases in __RadPivotMap__ when the text per rectangle is chopped due to the size of the rectangles calculated, it is not adjustable by just tuning the text length and size because the rectangle size is recalculated every time when window size is changed. To have a fully readable labels you may wrap your TextBlock in a control like ViewBox for example which resizes itself based on the size of its content and put it in the header of your rectangle using __LeafTemplate__ like this:

#### __XAML__

{{region radtreemap-styles-and-templates_0}}
	<telerik:RadPivotMap x:Name="pivotMap" LayoutStrategy="Squarified" ValuePath="Gdp" LabelPath="City">
	    <telerik:RadPivotMap.LeafTemplate>
	        <DataTemplate>
	            <Viewbox>
	                <TextBlock Text="{Binding Label}" Foreground="Blue" />
	            </Viewbox>
	        </DataTemplate>
	    </telerik:RadPivotMap.LeafTemplate>
	    <telerik:RadPivotMap.GroupDefinitions>
	        <telerik:GroupDefinition Member="Country" />
	    </telerik:RadPivotMap.GroupDefinitions>
	</telerik:RadPivotMap>
{{endregion}}

This is the full source code of the sample:

#### __C#__

{{region radtreemap-styles-and-templates_1}}
    public MainPage()
	{
	    InitializeComponent();
	    pivotMap.ItemsSource = this.GetData();
	}

	public class GdpInfo
	{
	    public string Continent { get; set; }
	    public string Country { get; set; }
	    public string City { get; set; }
	    public double Gdp { get; set; }
	}

	public List<GdpInfo> GetData()
	{
	    List<GdpInfo> data = new List<GdpInfo>()
	    {
	        new GdpInfo() { Country = "Australia", Gdp = 1146 },
	        new GdpInfo() { Country = "Austria", Gdp = 385.1 },
	        new GdpInfo() { Country = "Belgium", Gdp = 468.6 },
	        new GdpInfo() { Country = "Brazil", Gdp = 1749 },
	        new GdpInfo() { Country = "Canada", Gdp = 1565 },
	        new GdpInfo() { Country = "China", Gdp = 1700 },
	        new GdpInfo() { Country = "Denmark", Gdp = 318.1 },
	        new GdpInfo() { Country = "France", Gdp = 2669 },
	        new GdpInfo() { Country = "Germany", Gdp = 3402 },
	        new GdpInfo() { Country = "Greece", Gdp = 329 },
	        new GdpInfo() { Country = "India", Gdp = 1290 },
	        new GdpInfo() { Country = "USA", City = "NY which is in the NY state ", Gdp = 3000 },
	        new GdpInfo() { Country = "USA", City = "Columbus which is in the Ohio state", Gdp = 2000 },
	        new GdpInfo() { Country = "USA", City = "Los Angeles which is in the California state", Gdp = 5000 },
	        new GdpInfo() { Country = "USA", City = "Austin which is in the Texas state", Gdp = 4600 },
	    };
	    return data;
	}
{{endregion}}

#### __VB.NET__

{{region radtreemap-styles-and-templates_2}}
	  Public Sub New()
		InitializeComponent()
		pivotMap.ItemsSource = Me.GetData()
	End Sub

	Public Class GdpInfo
		Public Property Continent() As String
		Public Property Country() As String
		Public Property City() As String
		Public Property Gdp() As Double
	End Class

	Public Function GetData() As List(Of GdpInfo)
		Dim data As New List(Of GdpInfo)() From {New GdpInfo() With {.Country = "Australia", .Gdp = 1146},
		New GdpInfo() With {.Country = "Austria", .Gdp = 385.1},
		New GdpInfo() With {.Country = "Belgium", .Gdp = 468.6},
		New GdpInfo() With {.Country = "Brazil", .Gdp = 1749},
		New GdpInfo() With {.Country = "Canada", .Gdp = 1565},
		New GdpInfo() With {.Country = "China", .Gdp = 1700},
		New GdpInfo() With {.Country = "Denmark", .Gdp = 318.1},
		New GdpInfo() With {.Country = "France", .Gdp = 2669},
		New GdpInfo() With {.Country = "Germany", .Gdp = 3402}, New GdpInfo() With {.Country = "Greece", .Gdp = 329},
		New GdpInfo() With {.Country = "India", .Gdp = 1290}, New GdpInfo() With {.Country = "USA", .City = "NY which is in the NY state ", .Gdp = 3000},
		New GdpInfo() With {.Country = "USA", .City = "Columbus which is in the Ohio state", .Gdp = 2000},
		New GdpInfo() With {.Country = "USA", .City = "Los Angeles which is in the California state", .Gdp = 5000},
		New GdpInfo() With {.Country = "USA", .City = "Austin which is in the Texas state", .Gdp = 4600}}
		Return data
	End Function
{{endregion}}

>caution Since you wrapped the TextBlock in a ViewBox, the Size of the Text will change according to the space available which will lead to texts with different size (shown on the image below). If you don't want such appearance, you should consider removing the ViewBox and using __TextWrapping__ and __MaxWidth__ for the TextBlock-s.

The result is shown below:
![{{ site.framework_name }} RadTreeMap Custom Leaf Template](images/radtreemap_styles_and_templates_01.PNG)

## RadTreeMap

You can customize the way __RadTreeMap__ Items look like per *TypeDefinition*. This is where the __TypeDefinition's ItemStyle__ comes in handy. For example you want every Label to be colored Blue and to have a Red Border per every Item with TypeDefinition where the TargetTypeName is *File*.

>Please refer to the [Populating With Data RadTreeMap]({%slug radtreemap-populating-with-data-radtreemap%}) for the full source code of the sample.

#### __XAML__

{{region radtreemap-styles-and-templates_1}}
	<telerik:RadTreeMap Name="treeMap1">
		<telerik:RadTreeMap.TypeDefinitions>
			<telerik:TypeDefinition TargetTypeName="File" ValuePath="Size" LabelPath="Name">
				<telerik:TypeDefinition.ItemStyle>
					<Style TargetType="telerik:RadTreeMapItem" >
						<Setter Property="Control.Foreground" Value="Blue" />
						<Setter Property="Template">
							<Setter.Value>
								<ControlTemplate>
									<Border BorderBrush="Red" BorderThickness="2">
										<TextBlock Text="{Binding Label}" VerticalAlignment="Center"/>
									</Border>
								</ControlTemplate>
							</Setter.Value>
						</Setter>
					</Style>
				</telerik:TypeDefinition.ItemStyle>
			</telerik:TypeDefinition>
			<telerik:TypeDefinition TargetTypeName="Folder" ValuePath="Size" ChildrenPath="Children" LabelPath="Name" />
		</telerik:RadTreeMap.TypeDefinitions>
	</telerik:RadTreeMap>
{{endregion}}

The result is shown on the following image:
![{{ site.framework_name }} RadTreeMap Custom Item Style](images/radtreemap_styles_and_templates.PNG)

repository: telerik/xaml-docs

gha_language: JavaScript

gha_license_id: NOASSERTION

repo_name: telerik/xaml-docs


text:
Notifications
=============

This application is a demo app for a simple public news feed.  It includes the following features:

The Feed:
- Users can add posts to a public feed
- Users can comment on posts
  - (can later delete their comments)
- Users can like posts or comments (the Like model uses a polymorphic association)
  - (can later unlike something)

Notifications:
- Users will get notified via on site notifications when another user takes an action related to something they've done
  - eg likes or comments on their post
- Users can optionally receive email notifications as

Responsive Design:
- Uses ZURB foundation 5 for responsive design

Points of Interest
------------------

- Ruby 2.1.2
- Rails 4.1.5
- rspec for unit testing
- Cucumber for integration testing
- HAML
- Devise for authentication

Model Concerns: There are 2 concerns. The first is for items that are likeable.  The second is for items that cause
the creation of notifications (NotificationSource).

ActionJob:  The notification objects and emails are created via a NotificationsCreationJob object.  When Rails 4.2 is
available this will be updated to inherit from AcitonJob so it can be run asynchronously.

repository: geoffevason/notifications

repo_name: geoffevason/notifications


text:
# add-hashed-assets-to-html-plugin
[![Build Status](https://travis-ci.org/jgramoll/add-hashed-assets-to-html-plugin.svg?branch=master)](https://travis-ci.org/jgramoll/add-hashed-assets-to-html-plugin)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/a8177620695f401b93c393e42158e9c2)](https://www.codacy.com/project/jgramoll/add-hashed-assets-to-html-plugin/dashboard?utm_source=github.com&utm_medium=referral&utm_content=jgramoll/add-hashed-assets-to-html-plugin&utm_campaign=Badge_Grade_Dashboard)
[![Coverage Status](https://coveralls.io/repos/github/jgramoll/add-hashed-assets-to-html-plugin/badge.svg?branch=master)](https://coveralls.io/github/jgramoll/add-hashed-assets-to-html-plugin?branch=master)
[![Known Vulnerabilities](https://snyk.io/test/github/jgramoll/add-hashed-assets-to-html-plugin/badge.svg?targetFile=package.json)](https://snyk.io/test/github/jgramoll/add-hashed-assets-to-html-plugin?targetFile=package.json)

## About

Add a JavaScript or CSS asset with chunk hash into the HTML generated by html-webpack-plugin.

## Usage

In your webpack.config add AddHashedAssetsToHtmlPlugin with
the list of assets you want to add to your index.html

```js
plugins: [
  new CopyWebpackPlugin([
    {
      from: path.join(root, 'src/dependencies.css'),
      to:   path.join(root, 'dist/dependencies.[hash].css'),
    },
    {
      from: path.join(root, 'src/dependencies.js'),
      to:   path.join(root, 'dist/dependencies.[hash].js'),
    },
  ]),
  new HtmlWebpackPlugin(),
  new AddHashedAssetsToHtmlPlugin({
    assets: [
      {
        from: path.join(root, 'src/dependencies.css'),
        to:   path.join(root, 'dependencies.[hash].css'),
      },
      {
        from: path.join(root, 'src/dependencies.js'),
        to:   path.join(root, 'dependencies.[hash].js'),
      }
    ]
  })
]
```

### Output

```html
<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8">
    <title>Webpack App</title>
  <link href="/dependencies.ceb361c93fdb60f8a5139da1d8ba8947.css" rel="stylesheet"></head>
  <body>
  <script type="text/javascript" src="/dependencies.c21ffaef5051ba8a9a5104c7c850bd7b.js"></script></body>
</html>
```


text:
# [smf](http://senior7515.github.io/smf/)

[![Build Status](https://semaphoreci.com/api/v1/senior7515/smf/branches/master/badge.svg)](https://semaphoreci.com/senior7515/smf)

**smf** is pronounced **/smɝf/**

Site         | Link
------------ | --------
Mailing List  | https://groups.google.com/forum/#!forum/smf-dev
Documentation | https://senior7515.github.io/smf/

# [Official Documentation](https://senior7515.github.io/smf)

Please visit our official documentation,
it'll get you up and running in no time!

If you are using **smf**, drop us a line on the mailing list introducing your project.

[![Analytics](https://ga-beacon.appspot.com/UA-99983285-1/chromeskel_a/readme?pixel)]()

# What is smf?

**smf** is a set of libraries and utilities (like boost:: for C++ or guava for java)
designed to be the building blocks of your next distributed systems.

## RPC subsystem

It is a new RPC system and code generation like gRPC, Cap n Proto,
Apache Thrift, etc, but designed for **microsecond tail latency**.

Current benchmarks in microseconds

| 60 byte payload  | latency   |
| ---------------- | --------- |
| p50              | 7us       |
| p90              | 8us       |
| p99              | 8us       |
| p9999            | 15us      |
| p100             | 26us      |

## Write Ahead Log (WAL) subsystem

It is a write ahead log modeled after an Apache Kafka-like interface or
Apache Pulsar. It has topics, partitions, etc. It is designed to have a
single reader/writer per topic/partition.

Current benchmarks in milliseconds ==> 41X faster

3 Producers latency vs Apache Kafka

| percentile  | Apache Kafka      | smf WAL  | speedup |
| ----------- | ----------------- | -------- |     --- |
| p50	     | 878ms		     | 21ms     |     41X |
| p95	     | 1340ms		    | 36ms     |     37x |
| p99	     | 1814ms		    | 49ms     |     37x |
| p999	    | 1896ms		    | 54ms     |     35x |
| p100	    | 1930ms		    | 54ms     |     35x |

repository: rrozestw/smf

repo_name: rrozestw/smf


text:
# SYNOPSIS

`sn_staramr.pl`

Runs antimicrobial resistance analysis

# Software requirements

* StarAMR >= 0.7.0
* StarAMR database

## StarAMR database

Build the database into the correct folder under SneakerNet
like so

    staramr db build --dir SneakerNet/db/staramr

Under taxonProperties.conf, add the following line under each taxon for pointfinder (SNP)
resistance detection. Most taxa are not supported right now. At the time of this documentation,
only these are supported: salmonella, campylobacter, enterococcus faecalis and enterococcus faecium.

    pointfinder=salmonella

# Algorithm

Runs StarAMR on genome assemblies with Pointfinder.

# Outputs

Table with columns

* Sample - sample name
* Assembly - which assembly was input
* Genotype
* Predicted Phenotype

repository: lskatz/SneakerNet

gha_language: Perl

repo_name: lskatz/SneakerNet


text:
# active_model_serializers-native_extensions
Rust Implementation of the complicated stuff in AMS that builds JSON API documents

### Resources for learning how Rust and Ruby can interact
 - http://blog.skylight.io/bending-the-curve-writing-safe-fast-native-gems-with-rust/
   - https://github.com/skylightio/skylight-ruby/blob/master/ext/skylight_native.c
 - https://github.com/steveklabnik/rust_example
 -

#### Ruby-Rust Bridge
 - https://github.com/rustbridge/helix
   - http://blog.skylight.io/introducing-helix/


text:
---
layout: page
title: "ZoomSurfaceView"
description: "A SurfaceView implementation supporting zoom and pan"
order: 3
disqus: 1
---

A `SurfaceView` implementation (extending `GLSurfaceView`) that supports panning and zooming of its contents
through OpenGL rendering. You can use this for video streaming, camera previews or any other surface application
that streams image buffers into a `Surface`.

```xml
<com.otaliastudios.zoom.ZoomSurfaceView
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    app:transformation="centerInside"
    app:transformationGravity="auto"
    app:alignment="center"
    app:overScrollHorizontal="false"
    app:overScrollVertical="false"
    app:overPinchable="false"
    app:horizontalPanEnabled="true"
    app:verticalPanEnabled="true"
    app:zoomEnabled="true"
    app:flingEnabled="true"
    app:scrollEnabled="true"
    app:oneFingerScrollEnabled="true"
    app:twoFingersScrollEnabled="true"
    app:threeFingersScrollEnabled="true"
    app:minZoom="1"
    app:minZoomType="zoom"
    app:maxZoom="2.5"
    app:maxZoomType="zoom"
    app:animationDuration="280"/>
```

### Setup

There are a few special things about `ZoomSurfaceView` with respect to the other classes:

- It **requires** API level 18
- It will not draw scrollbars
- You **must** either call `ZoomSurfaceView.setContentSize()` passing the stream size, or measure the
  view so that it matches the stream aspect ratio.

> Starting from v1.7.1, you do not need to add the [Egloo](https://github.com/natario1/Egloo) dependency
in order to use `ZoomSurfaceView`.

### Usage

Using `Surface`s is not a simple topic so we won't go into details here. Please take a look
at the demo app which reproduces a zoomable/pannable video through ExoPlayer.

To get a usable `Surface` out of `ZoomSurfaceView`, please add a callback and wait for the surface
to be available:

```java
ZoomSurfaceView surfaceView = findViewById(R.id.zoom_surface_view);
surfaceView.addCallback(new ZoomSurfaceView.Callback() {
    @Override
    public void onZoomSurfaceCreated(@NotNull ZoomSurfaceView view) {
        Surface surface = view.getSurface();
        // Use this surface for video players, camera preview, ...
    }

    @Override
    public void onZoomSurfaceDestroyed(@NotNull ZoomSurfaceView view) { }
});
```

### APIs

The `ZoomSurfaceView` will forward all API calls to the internal engine: see [zoom](zoom-apis), [pan](pan-apis)
and [low level engine](zoom-engine) documentation. You can also get the backing engine using `zoomSurfaceView.getEngine()`.

```java
zoomSurfaceView.panTo(x, y, true); // Shorthand for zoomSurfaceView.getEngine().panTo(x, y, true)
zoomSurfaceView.panBy(deltaX, deltaY, true);
zoomSurfaceView.zoomTo(zoom, true);
zoomSurfaceView.zoomBy(factor, true);
zoomSurfaceView.realZoomTo(realZoom, true);
zoomSurfaceView.moveTo(zoom, x, y, true);
```


text:
# scipy-spacy-alpine Docker image
A python-based ecosystem of open-source software for mathematics, science, and engineering. This repository includes SciPy compilation and loads Spacy English corpus.

repository: xzegga/scipy-spacy-alpine

repo_name: xzegga/scipy-spacy-alpine


text:
---
layout: default
---

# 1993-04-04 - Re: PGP help and comments.

## Header Data

From: J. Michael Diehl<EMAIL_ADDRESS>To<EMAIL_ADDRESS>(Jim McCoy)

Message Hash: 3665a206e22d662a37382ea41ab35aa2f694f1d343a346f8f3dec5c5cbd43a59

Message ID<EMAIL_ADDRESS>Reply To<EMAIL_ADDRESS>UTC Datetime: 1993-04-04 08:18:19 UTC

Raw Date: Sun, 4 Apr 93 00:18:19 PST

## Raw message

```
{% raw  %}From: J. Michael Diehl<EMAIL_ADDRESS>Date: Sun, 4 Apr 93 00:18:19 PST
To<EMAIL_ADDRESS>(Jim McCoy)
Subject: Re: PGP help and comments.
In-Reply-To<EMAIL_ADDRESS>Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

>J. Michael Diehl<EMAIL_ADDRESS>writes:
>> I would like to use pgp on the mainframes, but don't want to store my secret
>> key on their disks.   Would it be possible to have pgp accept it's secret key
>> via stdin.  I could do an ascii upload of my secret key and never expose my
>> key to disk-storage.
>
> This is even more dangerous than storing it on the disks of a multi-user
> machine.  Unless you are running in a kerberos environment it is trivial to
> snoop your upload off the network, and even without that weakness you are
> exposing yourself to the same problem that the docs mention (it is really
> pretty easy to scan someone's terminal input) only you are giving them the
> key outright instead of only giving them the passphrase to your key.

Point taken.
>
> Bad idea.

Sure is.  Thanx.
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: 2.2

mQBNAiu21SIAAAECAMKkKKP4JIxSPR7rOUZ7mbi6yDPfFa7T6zOtOBX8iI939tIU
9JFTxdyvTejK3qmYDGozNaqySQ/0++nGqZgikcsABRG0LUouIE1pY2hhZWwgRGll
aGwsIG1lLCA8bWRpZWhsQHRyaXRvbi51bW4uZWR1Pg==
=YquS
-----END PGP PUBLIC KEY BLOCK-----

{% endraw %}
```

## Thread

+ Return to [April 1993](/archive/1993/04)

+ Return to "[J. Michael Diehl <mdiehl@triton.unm.edu>](/authors/j_michael_diehl_mdiehl_at_triton_unm_edu_)"
+ Return to<EMAIL_ADDRESS>(Jim McCoy)](/authors/mccoy_at_ccwf_cc_utexas_edu_jim_mccoy_)"
+ Return to "[Nickey MacDonald <i6t4@jupiter.sun.csd.unb.ca>](/authors/nickey_macdonald_i6t4_at_jupiter_sun_csd_unb_ca_)"

+ 1993-04-04 (Sat, 3 Apr 93 21:58:14 PST) - [PGP help and comments.](/archive/1993/04/7b7329ccce41fd6c3781c83281eab88ad89711aa12ad58266cf97a7aee883336) - _J. Michael Diehl<EMAIL_ADDRESS>  + 1993-04-04 (Sat, 3 Apr 93 22:47:55 PST) - [Re: PGP help and comments.](/archive/1993/04/869d7e6dc43eaae469abe354cf23aeb7dcbf777be0f704a8fa021addc3ae6461) - _Nickey MacDonald<EMAIL_ADDRESS>  + 1993-04-04 (Sat, 3 Apr 93 23:58:38 PST) - [Re: PGP help and comments.](/archive/1993/04/5f0f9d7ff7733ee906597eed7e57a01e3642ef7a1e322c6856e945f734ab7a72) -<EMAIL_ADDRESS>(Jim McCoy)_
    + 1993-04-04 (Sun, 4 Apr 93 00:18:19 PST) - Re: PGP help and comments. - _J. Michael Diehl<EMAIL_ADDRESS>


text:
# readme-cruiser 🚢

> Cruise through readme files of npm dependencies in your node project. (WIP)

![](https://img.shields.io/github/commit-activity/m/shermix/readme-cruiser?style=plastic)
![](https://img.shields.io/github/last-commit/shermix/readme-cruiser)

![](https://shermix.keybase.pub/image%20url(2).jpg)

## Goals

- Visualizing npm module depndencies as a tree with some graphing library, preferably Graphwiz
- Codemirror API integration for embedding package.json text in web UI
- Building the API and API documentation with JSDoc
- Web app with Vue/React JS Library and Sematic UI CSS Framework
- Proper Unit and E2E testing for the codebase
- Authenticated user accounts with Github marketplace support
- Containerized Docker deployment for the web app

## Features/Roadmap

- [ ] A CLI based application based off the API for readme-cruiser which renders module's readme file as markdown formatted text in terminal.
- [ ] A frontend web app for browser usage built on top of API.

## Installation

```
$ █▒▒▒▒▒▒▒▒▒
```

## Usage

For notes and exhaustive overview of this project, check out the docs on
[Gitbook](https://krewzer.gitbook.io/readme-cruiser).

## License

[MIT](LICENSE)

`Copyright (c) Ankesh Bharti`

[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fshermix%2Freadme-cruiser.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Fshermix%2Freadme-cruiser?ref=badge_shield)

## Notice

This module is currently a work-in-progress and is developed as a personal side project.

repository: krewzer/readme-cruiser

repo_name: krewzer/readme-cruiser


text:
## Install basin setup

Instructions to
install [ARS basin_setup](https://github.com/USDA-ARS-NWRC/basin_setup)
with a conda environment. This installs the
[tauDEM](https://github.com/dtarb/TauDEM) dependency from source. Compilation
utilizes the
[conda  compiler](https://docs.conda.io/projects/conda-build/en/latest/resources/compiler-tools.html)
tools to get gcc-7 for the conda environment.

### Conda Environment

Use the 'basin_setup.yaml' in this folder to create a new conda environment.

```shell
conda env create -f basin_setup.yaml
```

### tauDEM Installation

__NOTE__: Make sure to activate the conda environment before installing tauDEM.

* Create an installation destination for tauDEM.

  Example used here: `/data/iSnobal/`
* Download and extract tauDEM
  ```shell
  wget -O - https://github.com/dtarb/TauDEM/archive/f927ca639a1834565a76cb3df5acbcd2909d6d0d.tar.gz | \
  tar -xz -C /data/iSnobal/
  ```
* Rename the extracted folder
  ```shell
  mv TauDEM-f927ca639a1834565a76cb3df5acbcd2909d6d0d tauDEM
  ```

* Compile and install
  ```shell
  cd /data/iSnobal/tauDEM/
  # Directory for build
  mkdir build
  # Destination for the binaries
  mkdir build_install
  # Compile steps
  cd build
  cmake -DCMAKE_INSTALL_PREFIX=/data/iSnobal/tauDEM/build_install ../src
  make -j 8
  make install
  ```
* After this the binaries for tauDEM are in the `build_install` directory:
  `/data/iSnobal/tauDEM/build_install`

## `basin_setup` Installation

Install the basin package.

__IMPORTANT__: The `--no-deps` enforces to use the installed conda packages
and skips the installation via pip.
```shell
pip install --no-deps .
```

repository: UofU-Cryosphere/isnoda

gha_language: HTML

repo_name: UofU-Cryosphere/isnoda


text:
#emacs
2016-06-01

Emacs and its derivatives are a family of text editors that are characterized by their extensibility. The manual for the most widely used variant, GNU Emacs, describes it as "the extensible, customizable, self-documenting, real-time display editor". Development of the first Emacs began in the mid-1970s and continues actively as of 2016. Emacs has over 2,000 built-in commands and allows the user to combine these commands into macros to automate work. Emacs Lisp provides a deep extension capability allowing users and developers to write new commands using a dialect of the Lisp programming language. Extensions have been written to manage email, files, outlines, and RSS feeds. Some users find they can do almost all their work from within Emacs, not just editing text.

The original EMACS was written in 1976 by Richard Stallman and Guy L. Steele, Jr. as a set of Editor MACroS for the TECO editor. It was inspired by the ideas of the TECO-macro editors TECMAC and TMACS.

Emacs is not only a very popular open source editor, but also it has a strong support by its users. Even, it exists the Church of Emacs, formed by Richard Stallman. In that church they called vi _the editor of the beast_ (vi-vi-vi). Emacs is, along with vi, one of the two main contenders in the traditional editor wars of Unix culture. Both are among the oldest application programs still in use.

***Tags***: Computer engineering, Software management tools, Text editor

#### See also
[Vi_Vim](/vi_vim)
## Material
* https://www.linux.com/learn/gnu-emacs-101-beginners
* http://www.tuxradar.com/content/emacs-tutorial-beginners
* http://www2.lib.uchicago.edu/keith/tcl-course/emacs-tutorial.html
* http://cmgm.stanford.edu/classes/unix/emacs.html

## Books
* Cameron, Debra (1998). [GNU Emacs Pocket Reference](https://www.goodreads.com/book/show/889149.GNU_Emacs_Pocket_Reference). O'Reilly Media
* Petersen, Mickey. (2015). [Mastering Emacs](https://www.goodreads.com/book/show/25587882-mastering-emacs). Self-published
* Glickstein, Bob (1997). [Writing GNU Emacs Extensions](https://www.goodreads.com/book/show/1639039.Writing_GNU_Emacs_Extensions). O'Reilly Media


text:
### Profilers

Profilers are what enables the comparison between relational operations and user defined functions. Based on the information specified by the user, profilers allows to:
* calculate the number of CPU operations required from the input tuples number;
* calculate the number IO operations required from the input tuples number.

As specified in ```Metrics```, these parameters allow to build simple time estimates.

repository: mosaicrown/query-opt

gha_language: Java

repo_name: mosaicrown/query-opt


text:
# **StreamPULSE**

### An R package for fitting metabolism models to StreamPULSE data
### **Description**
StreamPULSE is a community of researchers working to
answer fundamental questions about ecosystem production and
respiration in streams and rivers. The StreamPULSE project
[streampulse.org](http://www.streampulse.org)
includes online tools for viewing, archiving, and cleaning data
submitted by researchers from around the globe. It leverages
metabolism modeling frameworks
[streamMetabolizer](https://github.com/USGS-R/streamMetabolizer)
and [BASE](https://github.com/dgiling/BASE).
This package facilitates
data acquisition from the StreamPULSE database, data
supplementation where necessary, formatting for streamMetabolizer
or BASE, model fitting and prediction, and visualization of model outputs.

---
### **Installation**
```R
# in R
library(devtools)
install_github('streampulse/StreamPULSE')
```

---
### **Example**
See StreamPULSE's [model page](https://data.streampulse.org/model)
for an example of how to use this package.

repository: streampulse/StreamPULSE

repo_name: streampulse/StreamPULSE


text:
> [Go to French version](/fr/Lois/Lois%20du%20Canada/2004/ch.%2017.md)

# An Act to give effect to the Westbank First Nation Self Government Agreement

**S.C. 2004, c. 17**

Assented to on 6 May 2004

----------

**Preamble**

WHEREAS the Government of Canada has undertaken to recommend to Parliament the enactment of legislation to give effect to the Westbank First Nation Self Government Agreement;

NOW, THEREFORE, Her Majesty, by and with the advice and consent of the Senate and House of Commons of Canada, enacts as follows:

## Short Title

**Short title**

**1** This Act may be cited as the Westbank First Nation Self-Government Act.

## Interpretation

**Definition of Agreement**

**2**

- **(1)** In this Act, ***Agreement*** means the Westbank First Nation Self-Government Agreement signed on behalf of the Westbank First Nation and Her Majesty in right of Canada on October 3, 2003 and laid before the Senate and the House of Commons on November 5, 2003, and includes any amendments made to it from time to time in accordance with its provisions.

**Expressions used in Agreement**

- **(2)** In this Act, the expressions ***council***, ***member***, ***Westbank First Nation***, ***Westbank lands*** and ***Westbank law*** have the same meaning as in the Agreement.

## Effect of Agreement

**Force of law of Agreement**

**3**

- **(1)** The Agreement is approved and has the force of law.

**Persons and bodies subject to Agreement**

- **(2)** Persons and bodies have the powers, rights, privileges and benefits conferred on them by the Agreement and are subject to the obligations and liabilities imposed on them by the Agreement.

**Agreement binding**

**4**

- **(1)** The Agreement is binding on and may be relied on by all persons.

**International obligations**

- **(2)** The provisions of the Agreement respecting Canada’s international legal obligations may be invoked only by a party to the Agreement.

**Conflicts with other federal laws**

**5** In the event of a conflict between this Act or the Agreement and any other federal law, this Act or the Agreement prevails to the extent of the conflict.

## Application of Other Acts

**[Indian Act](/en/Acts/Revised%20Statutes%20of%20Canada/I/I-5.md)**

**6** The [Indian Act](/en/Acts/Revised%20Statutes%20of%20Canada/I/I-5.md) does not apply in respect of the Westbank First Nation, its council, its members or Westbank lands except to the extent provided by the Agreement.

**Acts respecting reserve lands**

**7** The [First Nations Land Management Act](/en/Acts/Statutes%20of%20Canada/1999/c.%2024.md) and the [Indian Oil and Gas Act](/en/Acts/Revised%20Statutes%20of%20Canada/I/I-7.md) do not apply in respect of the Westbank First Nation, its council, its members or Westbank lands.

**[Statutory Instruments Act](/en/Acts/Revised%20Statutes%20of%20Canada/S/S-22.md)**

**8** The [Statutory Instruments Act](/en/Acts/Revised%20Statutes%20of%20Canada/S/S-22.md) does not apply in respect of Westbank law.

**[First Nations Fiscal Management Act](/en/Acts/Statutes%20of%20Canada/2005/c.%209.md)**

**8.1 ** Notwithstanding any provision of this Act or the Agreement, for the purpose of enabling the Westbank First Nation to benefit from the provisions of the [First Nations Fiscal Management Act](/en/Acts/Statutes%20of%20Canada/2005/c.%209.md) or obtain the services of any body established under that Act, the Governor in Council may make any regulations that the Governor in Council considers necessary, including regulations
- **(a)** adapting any provision of that Act or of any regulation made under that Act; and
- **(b)** restricting the application of any provision of that Act or of any regulation made under that Act.
> 2005, c. 9, s. 153; 2012, c. 19, s. 680

## Legal Proceedings

**Judicial notice**

**9** Judicial notice shall be taken of the Agreement and Westbank law.

**Judicial review**

**10** Application for judicial review in accordance with the Agreement may only be made after all applicable procedures for appeal or review provided by Westbank law have been exhausted.

**[Federal Courts Act](/en/Acts/Revised%20Statutes%20of%20Canada/F/F-7.md)**

**11** Neither the council nor any person or body appointed by the Westbank First Nation and having, exercising or purporting to exercise jurisdiction or powers conferred by or under Westbank law is a federal board, commission or other tribunal within the meaning of the [Federal Courts Act](/en/Acts/Revised%20Statutes%20of%20Canada/F/F-7.md).

**Notice of issues arising**

**12**

- **(1)** A party in any proceeding before a court or tribunal shall serve notice in writing on the Attorney General of Canada and the Westbank First Nation of any issue raised by that party in respect of
	- **(a)** the interpretation or validity of the Agreement; or
	- **(b)** the validity or applicability of this Act or of Westbank law.

**Content of notice**

- **(2)** A notice must identify the proceeding in which the issue arises, state whether it arises in relation to paragraph (1)(a) or (b), give particulars of the point to be argued and, if a date has been fixed for argument, give the date.

**Attachments**

- **(3)** A notice shall be accompanied by copies of all pleadings and other documents pertaining to the issue that are in the possession of the court or tribunal.

**Time of service**

- **(4)** A notice shall be served within seven days after the issue is first raised by a party to the proceeding, whether in the initial pleadings or otherwise, and the issue may not be argued sooner than fourteen days after service unless the court or tribunal allows a shorter period.

**Participation in proceedings**

- **(5)** In any proceeding to which subsection (1) applies, the Attorney General of Canada and the Westbank First Nation may appear and participate with the same rights as any other party.

## General

**Regulations and orders**

**13** The Governor in Council may, on the recommendation of the Minister of Crown-Indigenous Relations made after consideration of any representations of the council, make any regulations or orders that the Governor in Council considers necessary or advisable for the purpose of carrying out the provisions of the Agreement.
> 2004, c. 17, s. 132019, c. 29, s. 373

**References to Canada**

**14** References in the Agreement to ***Canada***, other than as a place, shall be read as references to Her Majesty in right of Canada.

**[Canada Lands Surveys Act](/en/Acts/Revised%20Statutes%20of%20Canada/L/L-6.md)**

**14.1**

- **(1)** For the purposes of subsection 29(3) of the [Canada Lands Surveys Act](/en/Acts/Revised%20Statutes%20of%20Canada/L/L-6.md), in relation to Westbank lands, surveys and plans must be satisfactory to the council rather than to the Minister of Crown-Indigenous Relations.

**Exception**

- **(2)** Subsection (1) does not apply in relation to boundaries between Westbank lands and other lands.
> 2004, c. 17, s. 14.12019, c. 29, s. 373

**Deposit of Agreement and amendments**

**15** The Minister of Indian Affairs and Northern Development shall have a copy of the Agreement and of every amendment made to the Agreement, certified by the Minister to be a true copy, deposited in
- **(a)** the Library and Archives of Canada;
- **(b)** the library of the Department of Indian Affairs and Northern Development situated in the National Capital Region; and
- **(c)** the office of that Department situated nearest to Westbank lands.
> 2004, c. 17, ss. 15, 21

## Related Amendments

### Access to Information Act

**16** [Amendment]

### Lobbyists Registration Act

**17** [Amendment]

### Privacy Act

**18** [Amendments]

**19** [Amendment]

## Coordinating Amendments

**20** [Amendment]

**21** [Amendment]

## Coming into Force

**Order**

[*]**22** The provisions of this Act, other than sections 20 and 21, come into force on a day to be fixed by order of the Governor in Council.

*: [Note: Sections 20 and 21 in force on assent May 6, 2004; Act, other than sections 20 and 21, in force April 1, 2005, *see* SI/2005-18.]

## RELATED PROVISIONS

######           — 2019, c. 29, s. 371(3)

**Other reference to Department of Indian Affairs and Northern Development**

- **(3)** Unless the context requires otherwise, the reference to the “Department of Indian Affairs and Northern Development” is to be read as a reference to the “Department of Crown-Indigenous Relations and Northern Affairs” in the English version of paragraph 15(b) of the Westbank First Nation Self-Government Act.

######           — 2019, c. 29, par. 373(2)(e)

**Other references to Minister of Indian Affairs and Northern Development**

- **(2)** Unless the context requires otherwise, every reference to the “Minister of Indian Affairs and Northern Development” is, with any grammatical adaptations, to be read as a reference to the “Minister of Crown-Indigenous Relations” in the following provisions:
	- **(e)** the portion of section 15 of the Westbank First Nation Self-Government Act before paragraph (a);

repository: TravisMadill/CanadianLaws

path: /en/Acts/Statutes of Canada/2004/c. 17.md

repo_name: TravisMadill/CanadianLaws


text:
# _Programming Survey_

#### _This project showcases the JavaScript and JQuery that I've learned this past week._

### _Here is a link to my website via gh-pages! https://chonnessey.github.io/programming-survey/_

#### By _**Adrian Camacho**_

## Technologies Used

* _HTML_
* _CSS_
* _VS code_
* _Bootstrap_
* _JavaScript_
* _JQuery_

## Description

_This project contains the new skills and methods I've learned from JavaScript and JQuery. I've explored with Bootstrap a lot more and made my page a little more appealing. The survey questionnare shows my understanding of this week's new concepts at Epicodus!_

## Setup/Installation Requirements

* _VS code or text editor of your choice_
* _PC/Mac_
* _Github_
* _Bootstrap external library_
* _JQuery -3.6.0.js external library_

_Once in my [repository](https://github.com/chonnessey/programming-survey) go ahead and clone it. You can do this by clicking the green drop down button that says "code". Copy the HTTPS URL onto your clipboard. Open up your terminal, use the command {$ git clone (followed by URL that is on your clipboard)}. Move the file into a directory of your choosing. Get into the directory using the command {$ cd}, open the file on your text editor of choice using the command {$ code .}. From there you will be able to Work on it freely!_

## Known Bugs

* _No Known bugs._

## License

Copyright 2021 Adrian Camacho

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

 IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

## Contact Information

_Adrian Camacho: adriancamacho18@gmail.com_

repository: chonnessey/programming-survey

repo_name: chonnessey/programming-survey


text:
---
indicator: 12.4.2.a
layout: indicator
permalink: 12-4-2-a
sdg_goal: '12'
data_non_statistical: false
goal_meta_link: 'http://unstats.un.org/sdgs/files/metadata-compilation/Metadata-Goal-12.pdf'
goal_meta_link_text: United Nations Sustainable Development Goals Metadata (pdf 782kB)
graph_type: line
published: true
target: >-
  By 2020, achieve the environmentally sound management of chemicals and all
  wastes throughout their life cycle, in accordance with agreed international
  frameworks, and significantly reduce their emissions to air, water and soil
  in  order to minimize their adverse impacts on human health and the
  environment By 2020, achieve the environmentally sound management of chemicals
  and all wastes throughout their life cycle, in accordance with agreed
  international frameworks, and significantly reduce their release to air, water
  and soil in order to minimize their adverse impacts on human health and the
  environment
target_id: '12.4'
un_custodian_agency: 'UNSD, UNEP'
un_designated_tier: '2'
data_show_map: false
source_active_1: true
source_url_text_1: Link to source
source_active_2: false
source_url_text_2: Link to Source
source_active_3: false
source_url_3: Link to source
source_active_4: false
source_url_text_4: Link to source
source_active_5: false
source_url_text_5: Link to source
source_active_6: false
source_url_text_6: Link to source
title: Untitled
indicator_name: Volume of hazardous waste generated
indicator_sort_order: 12-04-02-aa
reporting_status: notstarted
previous: 12-4-2
next: 12-4-2-b
tags:
  - custom.divided
national_indicator_available: 12.4.2.a. Volume of hazardous waste generated
computation_calculations: Amount of toxic waste divided by the number of population.
computation_definitions: >-
  RM submits annual national reports, which includes questions regarding the
  generation of toxic waste and other waste, as well as imports and exports of
  toxic waste and other waste meant for reuse, recycling, recovery or final
  disposal.
 Form No.1-toxic waste was submitted (until 2019) by economic
  units  in whose activity toxic waste was generated, stored, used, and
  neutralised  (liquidated). It did not include the import/export of toxic
  waste.
  Toxic waste-waste containing dangerous substances with toxic properties or
  containing pathogens of infectious diseases.
 Starting with 2020 source of
  data regarding waste management is the AIS WM,owned by the Environment Agency
  which also compiles data on hazardous waste.
 Hazardous waste - any waste
  that has  one or more toxic characteristics, as specified in Annex 3 of the
  Law No.  209/2016 on Waste. The toxic waste includes: HP1 Explosives; HP2
  Oxidants; HP3  Flammable; HP4 „Irritating – skin irritation or eye damage”;
  HP5 „Toxicity on  a specific target organ (STOT)/toxicity through aspiration”:
  HP6 „Acute  toxicity”; HP7 „Carcinogen”; HP8 „Corrosive”; HP9 „Infectious”;
  HP10 „Toxic  for reproduction”; HP11 „Mutagen”; HP12 „Discharge of acute
  toxicity gas”;  HP13 „Sensitising substances”; HP14 „Ecotoxic”; HP15 „Waste
  able to develop  one of above-mentioned harmful property, which the initial
  waste does not  imply directly”. RM submits annual national reports, which
  includes questions regarding the generation of toxic waste and other waste, as
  well as imports and exports of toxic waste and other waste meant for reuse,
  recycling, recovery or final disposal.
  Currently, Form No.1-toxic waste
  is submitted by economic units in whose activity toxic waste is generated,
  stored, used, and neutralised (liquidated). It does not include the import and
  export of toxic waste.
 In future, after ensuring the full functionality
  of the AIS MD system, the data source will be changed (Environment Agency) and
  data will be collected also on import/export of toxic waste.
  Toxic waste
  - any waste that has one or more toxic characteristics, as specified in Annex
  3 of the Law No. 209/2016 on Waste. The toxic waste includes: HP1 Explosives;
  HP2 Oxidants; HP3 Flammable; HP4 „Irritating – skin irritation or eye damage”;
  HP5 „Toxicity on a specific target organ (STOT)/toxicity through aspiration”:
  HP6 „Acute toxicity”; HP7 „Carcinogen”; HP8 „Corrosive”; HP9 „Infectious”;
  HP10 „Toxic for reproduction”; HP11 „Mutagen”; HP12 „Discharge of acute
  toxicity gas”; HP13 „Sensitising substances”; HP14 „Ecotoxic”; HP15 „Waste
  able to develop one of above-mentioned harmful property, which the initial
  waste does not imply directly”.
computation_units: kg/person
national_geographical_coverage: Republic of Moldova
graph_title: 12.4.2.a. Volume of hazardous waste generated
source_data_source_1: >-
  Administrative survey No. 1-toxic waste "Generation, use and neutralization of
  toxic  waste" (until 2019) Annual survey No. 1-toxic waste "Generation, use
  and neutralization of toxic waste" - NBS
source_data_supplier_1: >-
  1) Ministry of Agriculture, Regional Development and Environment
  2)
  National Bureau of Statistics 1) Ministry of Agriculture, Regional Development
  and Environment
, 2) National Bureau of Statistics
source_organisation_1: >-
  1) Ministry of Agriculture, Regional Development and Environment
  2)
  National Bureau of Statistics 1) Ministry of Agriculture, Regional Development
  and Environment
, 2) National Bureau of Statistics
source_responsible_monitoring_1: 'Ministry of Agriculture, Regional Development and Environment'
source_periodicity_1: annual
comparison_global: >-
  The global indicator refers to hazardous waste, while the national one (until
  2019) only to  toxic waste which represents a part of hazardous waste

  As compared to  the global indicator, the national indicator does not include
  import and  export of hazardous waste. The global indicator refers to
  hazardous waste, while the national one only to toxic waste which represents a
  part of hazardous waste
  As compared to the global indicator, the
  national indicator does not include import and export of hazardous waste.
---

repository: statisticamd/open-sdg-data-starter

branch_name: refs/heads/develop

gha_language: Shell

repo_name: statisticamd/open-sdg-data-starter


text:
---
title: "Defining Contact Summary"
weight: 1
date: 2017-01-05
description: >
  Defining the fields shown in the contact's Summary card
---

Each field that can be shown on a contact's profile is defined as an object in the `fields` array of `contact-summary.templated.js`. The properties for each object determine how and when the field is shown.

<!-- If you change this table, update the duplicate descriptions in ### Cards -->
| property | type | description | required |
|---|---|---|---|
| `label` | `string` | A translation key which is shown with the field. | yes |
| `icon` | `string` | The name of the icon to display beside this field, as defined through the Configuration > Icons page. | no |
| `value` | `string` | The value shown for the field. | yes |
| `filter` | `string` | The display filter to apply to the value, eg: `{ value: '2005-10-09', filter: 'age' }` will render as "11 years". Common filters are: `age`, `phone`, `weeksPregnant`, `relativeDate`, `relativeDay`, `fullDate`, `simpleDate`, `simpleDateTime`, `lineage`, `resourceIcon`, `translate`. For the complete list of filters, and more details on what each does, check out the code in [`medic/webapp/src/js/filters` dir](https://github.com/medic/medic/tree/master/webapp/src/js/filters). | no |
| `width` | `integer` | The horizontal space for the field. Common values are 12 for full width, 6 for half width, or 3 for quarter width. Default 12. | no |
| `translate` | `boolean` | Whether or not to translate the `value`. Defaults to false. | no |
| `context` | `object` | When `translate: true` and `value` uses [translation variables](https://angular-translate.github.io/docs/#/guide/06_variable-replacement), this value should provide the translation variables. | no |
| `appliesIf` | `function()` or `boolean` | Return true if the field should be shown. | no |
| `appliesToType` | `string[]` | Filters the contacts for which `appliesIf` will be evaluated. For example, `['person']` or `['clinic', 'health_center']`. | no |

See [How to configure profile pages]() for an example.

repository: abbyad/docsy-example

repo_name: abbyad/docsy-example


text:
# Strange behavior of UITextView in UITableViewCell
### (Expand and contract table view cell on iOS)

![preview](https://i.stack.imgur.com/GHHUm.gif)

[↻ replay animation](https://i.stack.imgur.com/GHHUm.gif)

---

### Stack Overflow Question 34996964

Xcode project & source code related to [Selection is destroyed by selectRowAtIndexPath](https://stackoverflow.com/questions/34996964/strange-behavior-of-uitextview-in-uitableviewcell/34997679#34997679) answer.

---

**Instructions:**

1. build and run

**References:**

- Question [34996964](https://stackoverflow.com/questions/34996964) on Stack Overflow
- This and other answers posted on [Swift Recipes](http://swiftarchitect.com/recipes/)


text:
# Exercise 16.29

Where would you put those template member definitions if your compiler uses the inclusion model? Explain why.

**Answer**:

The source file. Because we can find the definitions by include the source file.


text:
---
layout: default
---

# 1993-08-24 - No Subject

## Header Data

From: Anonymous<EMAIL_ADDRESS>To<EMAIL_ADDRESS>Message Hash: 079235e9ffb4c6e1d50119022f52dbb04e5ac0eb8b19c305ea54ecc863582a53

Message ID<EMAIL_ADDRESS>Reply To: _N/A_

UTC Datetime: 1993-08-24 12:01:48 UTC

Raw Date: Tue, 24 Aug 93 05:01:48 PDT

## Raw message

```
{% raw  %}From: Anonymous<EMAIL_ADDRESS>Date: Tue, 24 Aug 93 05:01:48 PDT
To<EMAIL_ADDRESS>Subject: No Subject
Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

 > I think the Hall Remailer at<EMAIL_ADDRESS>recognizes a
 > "cut line" of

 > --ignore--

 > I tried this and it failed the first time, but worked the second.
 > You should try a message to yourself before relying on it.

Let us try it here and see how it works; the following line contains the
kiss-off "ignore" and everything that shows beyond it was added without
my intention:

{% endraw %}
```

## Thread

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

+ Return to "[Anonymous <nowhere@bsu-cs.bsu.edu>](/authors/anonymous_nowhere_at_bsucs_bsu_edu_)"

+ 1993-08-24 (Tue, 24 Aug 93 05:01:48 PDT) - No Subject - _Anonymous<EMAIL_ADDRESS>


text:
# Sample Programs in TypeScript

Welcome to Sample Programs in TypeScript!

## Sample Programs

- [Hello World in TypeScript](https://github.com/jrg94/sample-programs/issues/245)
- [Game of Life in TypeScript](https://github.com/jrg94/sample-programs/issues/309)

## Fun Facts

- Debut: 2012
- Developer: Microsoft

## References

- [TypeScript Wiki](https://en.wikipedia.org/wiki/TypeScript)
- [TypeScript GitHub](https://github.com/Microsoft/TypeScript)


text:
## Rails <IP_ADDRESS> (March 11, 2019) ##

*   No changes.

## Rails <IP_ADDRESS> (November 27, 2018) ##

*   No changes.

## Rails 5.1.6 (March 29, 2018) ##

*   No changes.

## Rails 5.1.5 (February 14, 2018) ##

*   No changes.

## Rails 5.1.4 (September 07, 2017) ##

*   No changes.

## Rails 5.1.4.rc1 (August 24, 2017) ##

*   No changes.

## Rails 5.1.3 (August 03, 2017) ##

*   No changes.

## Rails 5.1.3.rc3 (July 31, 2017) ##

*   No changes.

## Rails 5.1.3.rc2 (July 25, 2017) ##

*   No changes.

## Rails 5.1.3.rc1 (July 19, 2017) ##

*   No changes.

## Rails 5.1.2 (June 26, 2017) ##

*   Fix issues with scopes and engine on `current_page?` method.

    Fixes #29401.

    *Nikita Savrov*

*   Generate field ids in `collection_check_boxes` and `collection_radio_buttons`.

    This makes sure that the labels are linked up with the fields.

    Fixes #29014.

    *Yuji Yaginuma*

*   Update distance_of_time_in_words helper to display better error messages
    for bad input.

    *Jay Hayes*

## Rails 5.1.1 (May 12, 2017) ##

*   No changes.

## Rails 5.1.0 (April 27, 2017) ##

*   Remove the option `encode_special_chars` misnomer from `strip_tags`

    As of rails-html-sanitizer v1.0.3, the sanitizer will ignore the
    `encode_special_chars` option.

    Fixes #28060.

    *Andrew Hood*

*   Change the ERB handler from Erubis to Erubi.

    Erubi is an Erubis fork that's svelte, simple, and currently maintained.
    Plus it supports `--enable-frozen-string-literal` in Ruby 2.3+.

    Compatibility: Drops support for `<%===` tags for debug output.
    These were an unused, undocumented side effect of the Erubis
    implementation.

    Deprecation: The Erubis handler will be removed in Rails 5.2, for the
    handful of folks using it directly.

    *Jeremy Evans*

*   Allow render locals to be assigned to instance variables in a view.

    Fixes #27480.

    *Andrew White*

*   Add `check_parameters` option to `current_page?` which makes it more strict.

    *Maksym Pugach*

*   Return correct object name in form helper method after `fields_for`.

    Fixes #26931.

    *Yuji Yaginuma*

*   Use `ActionView::Resolver.caching?` (`config.action_view.cache_template_loading`)
    to enable template recompilation.

    Before it was enabled by `consider_all_requests_local`, which caused
    recompilation in tests.

    *Max Melentiev*

*   Add `form_with` to unify `form_tag` and `form_for` usage.

    Used like `form_tag` (where just the open tag is output):

    ```erb
    <%= form_with scope: :post, url: super_special_posts_path %>
    ```

    Used like `form_for`:

    ```erb
    <%= form_with model: @post do |form| %>
      <%= form.text_field :title %>
    <% end %>
    ```

    *Kasper Timm Hansen*, *Marek Kirejczyk*

*   Add `fields` form helper method.

    ```erb
    <%= fields :comment, model: @comment do |fields| %>
      <%= fields.text_field :title %>
    <% end %>
    ```

    Can also be used within form helpers such as `form_with`.

    *Kasper Timm Hansen*

*   Removed deprecated `#original_exception` in `ActionView::Template::Error`.

    *Rafael Mendonça França*

*   Render now accepts any keys for locals, including reserved keywords.

    Only locals with valid variable names get set directly. Others
    will still be available in `local_assigns`.

    Example of render with reserved keywords:

    ```erb
    <%= render "example", class: "text-center", message: "Hello world!" %>

    <!-- _example.html.erb: -->
    <%= tag.div class: local_assigns[:class] do %>
      <p><%= message %></p>
    <% end %>
    ```

    *Peter Schilling*, *Matthew Draper*

*   Add `:skip_pipeline` option to several asset tag helpers

    `javascript_include_tag`, `stylesheet_link_tag`, `favicon_link_tag`,
    `image_tag` and `audio_tag` now accept a `:skip_pipeline` option which can
    be set to true to bypass the asset pipeline and serve the assets from the
    public folder.

    *Richard Schneeman*

*   Add `:poster_skip_pipeline` option to the `video_tag` helper

    `video_tag` now accepts a `:poster_skip_pipeline` option which can be used
    in combination with the `:poster` option to bypass the asset pipeline and
    serve the poster image for the video from the public folder.

    *Richard Schneeman*

*   Show cache hits and misses when rendering partials.

    Partials using the `cache` helper will show whether a render hit or missed
    the cache:

    ```
    Rendered messages/_message.html.erb in 1.2 ms [cache hit]
    Rendered recordings/threads/_thread.html.erb in 1.5 ms [cache miss]
    ```

    This removes the need for the old fragment cache logging:

    ```
    Read fragment views/v1/2914079/v1/2914079/recordings/70182313-20160225015037000000/d0bdf2974e1ef6d31685c3b392ad0b74 (0.6ms)
    Rendered messages/_message.html.erb in 1.2 ms [cache hit]
    Write fragment views/v1/2914079/v1/2914079/recordings/70182313-20160225015037000000/3b4e249ac9d168c617e32e84b99218b5 (1.1ms)
    Rendered recordings/threads/_thread.html.erb in 1.5 ms [cache miss]
    ```

    Though that full output can be reenabled with
    `config.action_controller.enable_fragment_cache_logging = true`.

    *Stan Lo*

*   Changed partial rendering with a collection to allow collections which
    implement `to_a`.

    Extracting the collection option had an optimization to avoid unnecessary
    queries of ActiveRecord Relations by calling `#to_ary` on the given
    collection. Instances of `Enumerator` or `Enumerable` are valid
    collections, but they do not implement `#to_ary`. By changing this to
    `#to_a`, they will now be extracted and rendered as expected.

    *Steven Harman*

*   New syntax for tag helpers. Avoid positional parameters and support HTML5 by default.
    Example usage of tag helpers before:

    ```ruby
    tag(:br, nil, true)
    content_tag(:div, content_tag(:p, "Hello world!"), class: "strong")

    <%= content_tag :div, class: "strong" do -%>
      Hello world!
    <% end -%>
    ```

    Example usage of tag helpers after:

    ```ruby
    tag.br
    tag.div tag.p("Hello world!"), class: "strong"

    <%= tag.div class: "strong" do %>
      Hello world!
    <% end %>
    ```

    *Marek Kirejczyk*, *Kasper Timm Hansen*

*   Change `datetime_field` and `datetime_field_tag` to generate `datetime-local` fields.

    As a new specification of the HTML 5 the text field type `datetime` will no longer exist
    and it is recommended to use `datetime-local`.
    Ref: https://html.spec.whatwg.org/multipage/forms.html#local-date-and-time-state-(type=datetime-local)

    *Herminio Torres*

*   Raw template handler (which is also the default template handler in Rails 5) now outputs
    HTML-safe strings.

    In Rails 5 the default template handler was changed to the raw template handler. Because
    the ERB template handler escaped strings by default this broke some applications that
    expected plain JS or HTML files to be rendered unescaped. This fixes the issue caused
    by changing the default handler by changing the Raw template handler to output HTML-safe
    strings.

    *Eileen M. Uchitelle*

*   `select_tag`'s `include_blank` option for generation for blank option tag, now adds an empty space label,
     when the value as well as content for option tag are empty, so that we conform with html specification.
     Ref: https://www.w3.org/TR/html5/forms.html#the-option-element.

    Generation of option before:

    ```html
    <option value=""></option>
    ```

    Generation of option after:

    ```html
    <option value="" label=" "></option>
    ```

    *Vipul A M*

Please check [5-0-stable](https://github.com/rails/rails/blob/5-0-stable/actionview/CHANGELOG.md) for previous changes.


text:
---
metaTitle: "Xamarin - Platform specific visual adjustments"
description: "Idiom adjustments, Platform adjustments, Using styles, Using custom views"
---

# Platform specific visual adjustments

## Idiom adjustments

Idiom specific adjustments can be done from C# code, for example for changing the layout orientation whether the view is shown or a phone or a tablet.

```cs
if (Device.Idiom == TargetIdiom.Phone)
{
    this.panel.Orientation = StackOrientation.Vertical;
}
else
{
    this.panel.Orientation = StackOrientation.Horizontal;
}

```

Those functionalities are also available directly from XAML code :

```cs
<StackLayout x:Name="panel">
  <StackLayout.Orientation>
    <OnIdiom x:TypeArguments="StackOrientation">
      <OnIdiom.Phone>Vertical</OnIdiom.Phone>
      <OnIdiom.Tablet>Horizontal</OnIdiom.Tablet>
    </OnIdiom>
  </StackLayout.Orientation>
</StackLayout>

```

## Platform adjustments

Adjustments can be done for specific platforms from C# code, for example for changing padding for all the targeted platforms.

```cs
if (Device.OS == TargetPlatform.iOS)
{
    panel.Padding = new Thickness (10);
}
else
{
    panel.Padding = new Thickness (20);
}

```

An helper method is also available for shortened C# declarations :

```cs
panel.Padding = new Thickness (Device.OnPlatform(10,20,0));

```

Those functionalities are also available directly from XAML code :

```cs
<StackLayout x:Name="panel">
  <StackLayout.Padding>
    <OnPlatform x:TypeArguments="Thickness"
      iOS="10"
      Android="20" />
  </StackLayout.Padding>
</StackLayout>

```

## Using styles

When working with XAML, using a centralized `Style` allows you to update a set of styled views from one place. All the idiom and platform adjustements can also be integrated to your styles.

```cs
<Style TargetType="StackLayout">
  <Setter Property="Padding">
    <Setter.Value>
      <OnPlatform x:TypeArguments="Thickness"
                  iOS="10"
                  Android="20"/>
    </Setter.Value>
  </Setter>
</Style>

```

## Using custom views

You can create custom views that can be integrated to your page thanks to those adjustment tools.

Select `File > New > File... > Forms > Forms ContentView (Xaml)` and create a view for each specific layout : `TabletHome.xaml`and `PhoneHome.xaml`.

Then select `File > New > File... > Forms > Forms ContentPage` and create a `HomePage.cs` that contains :

```cs
using Xamarin.Forms;

public class HomePage : ContentPage
{
    public HomePage()
    {
        if (Device.Idiom == TargetIdiom.Phone)
        {
            Content = new PhoneHome();
        }
        else
        {
            Content = new TabletHome();
        }

    }
}

```

You now have a `HomePage` that creates a different view hierarchy for `Phone` and `Tablet` idioms.

repository: haifenghuang/generate

repo_name: haifenghuang/generate


text:
# ed25519
A drop in replacement for golang/crypto/ed25519 with additional functionality

# SignExt
SignExt signs the message with privateKey and returns a signature that can be verified using Verify(). The signature supports public key extraction using ExtractPublicKey()

```go
func SignExt(privateKey PrivateKey, message []byte) []byte
```

# ExtractPublicKey
ExtractPublicKey extracts the public key of the private key which signed the message. Sig MUST be a signature created with SignExt() and NOT Sign().

```go
func ExtractPublicKey(message, sig []byte) PublicKey
```


text:
# Prevent PII from being tracking in Google Analytics

Google don't allow PII (Personally Identifiable Information) to be tracked in Google Analytics. You can have your Google Analytics account suspended if you don't abide by the rules.

Google provide some helpful [Best Practises information](https://support.google.com/adsense/answer/6156630?hl=en), but their suggestions often rely on rewriting your web application so that PPI aren't displayed in the URL.

This work-around script works by only including Google Analytics tracking snippet if the URL **does not** include `email`, `username` or `password` strings. The exact strings could easily be modified to suit your needs.

``` html
<script>
  window.ga=function(){ga.q.push(arguments)};ga.q=[];ga.l=+new Date;
  ga('create','UA-XXXXX-Y','auto');ga('send','pageview')
</script>
<script>
  if(location.href.match(/(?:\b|_)(?:username|email|password)(?:\b|_)/i) > -1){
  document.write('<script src="https://www.google-analytics.com/analytics.js" aysnc defer><\/script>');
  }
</script>
```

## Demo

[https://coliff.github.io/prevent-pii-tracking-in-google-analytics/demo.htm](https://coliff.github.io/prevent-pii-tracking-in-google-analytics/demo.htm) - this page loads Google Analytics as normal

If you include params with PII (`email`, `username` or `password`) the URL though, Google Analytics will not load:

- [demo.htm?username=redacted%40example.com&password=Z0CS9](https://coliff.github.io/prevent-pii-tracking-in-google-analytics/demo.htm?username=redacted%40example.com&password=Z0CS9)

- [demo.htm?userName=redacted%40example.com&token=9234](https://coliff.github.io/prevent-pii-tracking-in-google-analytics/demo.htm?userName=redacted%40example.com&token=9234)

- [demo.htm?email=redacted%40example.com&token=%3%tX](https://coliff.github.io/prevent-pii-tracking-in-google-analytics/demo.htm?email=redacted%40example.com&token=%3%tX)

Note; the optimized Google Analytics snippet is from [HTML5Boilerplate](https://github.com/h5bp/html5-boilerplate/blob/master/src/index.html)