text:
# Vipps Recurring API

API version: 1.0

Document version 2.0.7.

The Vipps Recurring API delivers recurring payment functionality for a merchant
to create a payment agreement with a customer for fixed interval payments.
When the agreement is accepted by the end user the merchant can send charges
that will be automatically processed on the due date.

**IMPORTANT:** The Vipps Recurring API is available for existing customers that
have "Vipps på Nett" and a direct integration with the
[Vipps eCom API](https://github.com/vippsas/vipps-recurring-api)
and have completed some additional KYC checks required by Finanstilsynet.
Vipps is required to perform some extra compliance checks before
activating the Vipps Recurring API, please
[contact Vipps customer service](https://www.vipps.no/kontakt-oss/bedrift/vipps/)
to get access to the Recurring API in production.

## Table of Contents

- [Vipps Recurring API](#vipps-recurring-api)
  - [Table of Contents](#table-of-contents)
  - [Terminology](#terminology)
  - [Flow diagram](#flow-diagram)
  - [Call by call guide](#call-by-call-guide)
    - [Vipps screenshots](#vipps-screenshots)
  - [API endpoints](#api-endpoints)
  - [Optional Vipps HTTP headers](#optional-vipps-http-headers)
  - [Agreements](#agreements)
    - [Create an agreement](#create-an-agreement)
    - [Accept an agreement](#accept-an-agreement)
    - [Intervals](#intervals)
    - [Initial charge](#initial-charge)
    - [Campaigns](#campaigns)
    - [Retrieve an agreement](#retrieve-an-agreement)
  - [Charges](#charges)
    - [Create a charge](#create-a-charge)
    - [Amount changes](#amount-changes)
    - [Charge descriptions](#charge-descriptions)
    - [Charge times](#charge-times)
    - [Charge retries](#charge-retries)
  - [Manage charges and agreements](#manage-charges-and-agreements)
    - [Agreement states](#agreement-states)
    - [Update an agreement](#update-an-agreement)
    - [Pause an agreement](#pause-an-agreement)
    - [Stop an agreement](#stop-an-agreement)
    - [Charge states](#charge-states)
  - [Userinfo](#userinfo)
    - [Scopes](#scopes)
    - [Userinfo call by call guide](#userinfo-call-by-call-guide)
    - [Example calls](#example-calls)
    - [Vipps Login access token](#vipps-login-access-token)
    - [Userinfo call](#userinfo-call)
    - [Consent](#consent)
  - [HTTP responses](#http-responses)
  - [Rate-limiting](#rate-limiting)
  - [Polling guidelines](#polling-guidelines)
  - [Timeouts](#timeouts)
    - [Using a phone](#using-a-phone)
    - [Using a laptop/desktop](#using-a-laptopdesktop)
  - [Authentication and authorization](#authentication-and-authorization)
  - [Recomendations regarding handling redirects](#recomendations-regarding-handling-redirects)
  - [Questions?](#questions)

## Terminology

| Term        |  Description                                    |
| ----------- | ----------------------------------------------- |
| Agreement   | A payment subscription with a set of parameters that a customer agrees to  |
| Charge      | A single payment within an agreement |
| Idempotency | The property of endpoints to be called multiple times without changing the result after the initial request. |

## Flow diagram

This diagram shows a simplified payment flow:

![Recurring agreement flow](/images/Recurring-createagreement.svg)

## Call by call guide

The normal "happy day" flow for a new agreement and a charge is:

1. Create a (draft) agreement:
   [`POST:/agreements`](https://vippsas.github.io/vipps-recurring-api/#/Agreement%20Controller/draftAgreement).
   The user can now confirm the agreement in Vipps.
   See [Create a new agreement](#create-a-new-agreement).
2. Retrieve the (hopefully approved) agreement:
   [`GET:/agreements/{agreementId}`](https://vippsas.github.io/vipps-recurring-api/#/Agreement%20Controller/getAgreement).
   See [Retrieve an agreement](#retrieve-an-agreement).
3. Create a charge for the agreement:
   [`POST:/agreements/{agreementId}/charges`](https://vippsas.github.io/vipps-recurring-api/#/Charge%20Controller/createCharge).
   See [Create a charge](#create-a-charge).
4. Capture the charge:
  [`POST:/v2/agreements/{agreementId}/charges/{chargeId}/capture`](https://vippsas.github.io/vipps-recurring-api/#/Charge%20Controller/captureCharge)

**Note:** Vipps will *only* perform a payment transaction on an agreement when the merchant calls
[`POST:/agreements/{agreementId}/charges`](https://vippsas.github.io/vipps-recurring-api/#/Charge%20Controller/createCharge)
and
[`POST:/v2/agreements/{agreementId}/charges/{chargeId}/capture`](https://vippsas.github.io/vipps-recurring-api/#/Charge%20Controller/captureCharge).
Vipps does _not_ automatically perform payments. One reason for this is that the user may go to the "my page"
at the merchant to manage the agreement, and skip, postpone or otherwise change a payment.

You can also [Manage charges and agreements](#manage-charges-and-agreements).

That's the basics.
There is, of course, much more to this.
We have done our best to document everything about this API, and you _should_
have all information needed to integrate with Vipps.

### Vipps screenshots

![Vipps screenshots](images/RecurringOverview.png)

## API endpoints

| Operation           | Description         | Endpoint          |
| -------------------- | ------------------- | ----------------- |
| [Create an agreement](#create-an-agreement)  | Create a new, draft agreement.  | [`POST:/agreements`](https://vippsas.github.io/vipps-recurring-api/#/Agreement%20Controller/draftAgreement)  |
| [Retrieve an agreement](#retrieve-an-agreement)  | Retrieve the details of an agreement.  |  [`GET:/v2/agreements/{agreementId}`](https://vippsas.github.io/vipps-recurring-api/#/Agreement%20Controller/getAgreement) |
| [Update an agreement]()   |  Update an agreement with new details. |  [`PATCH:/agreements/{agreementId}`](https://vippsas.github.io/vipps-recurring-api/#/Agreement%20Controller/updateAgreement) |
| [Stop an agreement](#stop-an-agreement) | Update the status to `STOPPED`.  | [`PATCH:/agreements/{agreementId}`](https://vippsas.github.io/vipps-recurring-api/#/Agreement%20Controller/updateAgreement)  |
| List all charges  | Get all charges for an agreement.  | [`GET:/v2/agreements/{agreementId}/charges`](https://vippsas.github.io/vipps-recurring-api/#/Charge%20Controller/listCharges)  |
| [Create a charge](#create-a-charge)   |  Create a new charge for an agreement. |  [`POST:/agreements/{agreementId}/charges`](https://vippsas.github.io/vipps-recurring-api/#/Charge%20Controller/createCharge) |
| Retrieve a charge  | Retrieve all details of a charge.  | [`GET:/v2/agreements/{agreementId}/charges/{chargeId}`](https://vippsas.github.io/vipps-recurring-api/#/Charge%20Controller/getCharge)  |
| Capture a charge  | Each charge must first be created, then captured.  | [`POST:/v2/agreements/{agreementId}/charges/{chargeId}/capture`](https://vippsas.github.io/vipps-recurring-api/#/Charge%20Controller/captureCharge)  |
| Cancel a charge | Cancel an existing charge before the user is charged. | [`DELETE:/agreements/{agreementId}/charges/{chargeId}`](https://vippsas.github.io/vipps-recurring-api/#/Charge%20Controller/cancelCharge) |
| Refund a charge    | Refund a charge that has been performed.   | [`POST:/agreements/{agreementId}/charges/{chargeId}/refund`](https://vippsas.github.io/vipps-recurring-api/#/Charge%20Controller/refundCharge)  |

See [Authentication and authorization](#authentication-and-authorization).

See the Postman collection available on https://github.com/vippsas/vipps-recurring-api
for en easy way to test the API.

## Optional Vipps HTTP headers

We recommend using the following _optional_ HTTP headers for all requests to the
Vipps Recurring API. These headers provide useful metadata about the merchant's system,
which help Vipps improve our services, and also help in investigating problems.

| Header                        | Description                                  | Example value        |
| ----------------------------- | -------------------------------------------- | -------------------- |
| `Merchant-Serial-Number`      | The merchant serial number                   | `123456`             |
| `Vipps-System-Name`           | The name of the ecommerce solution           | `woocommerce`        |
| `Vipps-System-Version`        | The version number of the ecommerce solution | `5.4`                |
| `Vipps-System-Plugin-Name`    | The name of the ecommerce plugin             | `vipps-woocommerce`  |
| `Vipps-System-Plugin-Version` | The version number of the ecommerce plugin   | `1.4.1`              |

These headers are required for plugins and partners and sent by the recent versions of
[the official Vipps plugins](https://github.com/vippsas/vipps-developers#plugins)
and we recommend all customers with direct integration with the API to also do so.

## Agreements

An agreement is between the Vipps user and the merchant.
Think of it as a subscription.
An agreement has payments, called charges.
See [Charges](#charges).

### Create an agreement

Create an agreement:
[`POST:/agreements`](https://vippsas.github.io/vipps-recurring-api/#/Agreement%20Controller/draftAgreement).

This code illustrates how to create an agreement:

[`POST:/agreements`](https://vippsas.github.io/vipps-recurring-api/#/Agreement%20Controller/draftAgreement)

```json
{
  "currency": "NOK",
  "customerPhoneNumber":"90000000",
  "interval": "MONTH",
  "intervalCount": 1,
  "isApp": false,
  "merchantRedirectUrl": "https://example.com/confirmation",
  "merchantAgreementUrl": "https://example.com/my-customer-agreement",
  "price": 49900,
  "productDescription": "Access to all games of English top football",
  "productName": "Premier League subscription"
}
```

The `merchantAgreementUrl` is a link to a "My page", where the customer
can manage the agreement: Change,  an, cancel, etc.
Vipps does not offer any form of agreement management, as this may be
quite complex operations, like changing subscription types,
temporary address change, etc.
The URL is opened in the standard web browser.

**Please note:** If the user closes Vipps before the redirect is done,
the `merchantRedirectUrl` will not be used. It is therefore impretant that you
actively check the payment with
[`GET:/v2/agreements/{agreementId}](https://vippsas.github.io/vipps-recurring-api/#/Agreement%20Controller/getAgreement).

The `merchantAgreementUrl` is just a normal link to a page where the customer
can log in and manage the agreement. We strongly recommend to use
[Vipps Logg Inn](https://www.vipps.no/produkter-og-tjenester/bedrift/logg-inn-med-vipps/logg-inn-med-vipps/)
so the user does not have to use a username and password, but is logged
in automatically through Vipps. See the
[API documentation](https://github.com/vippsas/vipps-login-api)
for more details.

The request parameters have the following size limits
(see
[`POST:/agreements`](https://vippsas.github.io/vipps-recurring-api/#/Agreement%20Controller/draftAgreement)
for more details):

* `productName`: Max length 45 characters
* `productDescription`: Max length 100 characters
* `price`: Greater than 100, meaning 1 NOK.

Agreements may be initiated with or without an [initial charge](#initial-charge),

The agreement price, and the amount for the initial charge, is given in øre,
the centesimal subdivision of the Norwegian kroner (NOK).
There are 100 øre in 1 krone.

| # | Agreement      | Description                                                                          |
|:--|:-----------|:-------------------------------------------------------------------------------------|
| 1 | `Agreement starting now`  | Agreement with an `initialcharge` that uses `DIRECT_CAPTURE` will only be `active` if the initial charge is processed successfully |
| 2 | `Agreement starting in future`  | Agreement without an `initialcharge`, or with `initialcharge` that uses `RESERVE_CAPTURE` can be approved but no payment will happen until the first charge is provided |

The response contains an `agreementResource`, a `vippsConfirmationUrl` and an `agreementId`.
This `agreementResource` is a complete URL for performing a
[`GET:/agreements/{agreementId}`](https://vippsas.github.io/vipps-recurring-api/#/Agreement%20Controller/getAgreement)
request.

The `vippsConfirmationUrl` should be used to redirect the
user to the Vipps landing page in a desktop flow (with `https://`),
or to Vipps in a mobile flow (with `vipps://`), where the
user can then approve the agreement.

### Accept an agreement

[`POST:/agreements`](https://vippsas.github.io/vipps-recurring-api/#/Agreement%20Controller/draftAgreement) will return the following JSON structure.

```json
{
  "vippsConfirmationUrl": "https://api.vipps.no/dwo-api-application/v1/deeplink/vippsgateway?v=2/token=eyJraWQiOiJqd3RrZXkiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJmMDE0MmIxYy02YjI",
  "agreementResource": "https://api.vipps.no-recurring/v2/agreements/agr_TGSuPyV",
  "agreementId": "agr_TGSuPyV"
}
```

The `vippsConfirmationUrl` should be used to redirect the user to the Vipps landing
page. The user can then confirm their identity, and receive a prompt to accept the
agreement within Vipps.

The `isApp` property can be used to receive a deeplink URL, which in a mobile context,
can be used to perform an app-switch, which removes the landing page step. This will only
work if the user has Vipps installed on the same device as they are initiating
the agreement from.

### Intervals

Intervals are defined with a interval type `MONTH`, `WEEK`, or `DAY` and frequency as a count.

Example for a bi-weekly subscription:
```json
"interval": "WEEK",
"intervalCount": 2,
```

Example for a quarterly subscription
```json
"interval": "MONTH",
"intervalCount": 3,
```

Example for a yearly subscription
```json
"interval": "MONTH",
"intervalCount": 12,
```

Example for a subscription every 100th day:
```json
"interval": "DAY",
"intervalCount": 100,
```

### Initial charge

Initial charge will be performed if the `initialcharge` is provided when
creating an agreement. Unlike regular (or `RECURRING`) charges, there is no
price limit on an `initialCharge`. This allows for products to be bundled with
agreements as one transaction (for example a phone). The user will be clearly
informed when an `initialCharge` is included in the agreement they are accepting.

See [Charge Titles](#charge-title) for explanation of how the charge description
is shown to the user.

The initial charge has two forms of transaction, `DIRECT_CAPTURE` and `RESERVE_CAPTURE`.
See:
[What is the difference between "Reserve Capture" and "Direct Capture"?](https://github.com/vippsas/vipps-ecom-api/blob/master/vipps-ecom-api-faq.md#what-is-the-difference-between-reserve-capture-and-direct-capture)
in the eCom FAQ).

`DIRECT_CAPTURE` processes the payment immediately, while `RESERVE_CAPTURE`
reserves the payment for capturing at a later date. `RESERVE_CAPTURE` must be
used when selling physical goods bundled with an agreement - such as a phone
when subscribing to an agreement.

This example shows the same agreement as above, with an `initialCharge`
of 499 NOK:

```
{
  "currency": "NOK",
  "customerPhoneNumber":"90000000",
  "initialCharge": {
     "amount": 49900,
     "currency": "NOK",
     "description": "Premier League subscription",
     "transactionType": "DIRECT_CAPTURE"
  "interval": "MONTH",
  "intervalCount": 1,
  "isApp": false,
  "merchantRedirectUrl": "https://example.com/confirmation",
  "merchantAgreementUrl": "https://example.com/my-customer-agreement",
  "price": 49900,
  "productDescription": "Access to all games of English top football",
  "productName": "Premier League subscription"
}
```

Change the `transactionType` field to `RESERVE_CAPTURE` to reserve the initial charge.

```json
"initialCharge": {
  "transactionType": "RESERVE_CAPTURE",
  "amount": 19900,
  "currency": "NOK",
  "description": "Phone"
},
```
A reserved charge can be captured with
[`POST:/agreements/{agreementId}/charges/{chargeId}/capture`](https://vippsas.github.io/vipps-recurring-api/#/Charge%20Controller/captureCharge)
when the product is shipped.

### Campaigns

A campaign in recurring is a period where the price is lower than usual, and
this is communicated to the customer with the original price shown for comparison.

![Campaign example](images/CampaignExample.PNG)

In order to start a campaign the campaign field has to be added either to the agreement draft
[`POST:/agreements`](https://vippsas.github.io/vipps-recurring-api/#/Agreement%20Controller/draftAgreement)
for a campaign in the start of an agreement or update an agreement
[`PATCH:/agreements/{agreementId}`](https://vippsas.github.io/vipps-recurring-api/#/Agreement%20Controller/updateAgreement)
for an ongoing agreement. When adding a campaign
while drafting a new agreement the start date is ignored and the current
date-time is used. All dates must be in date-time format as according to
[RFC-3999](https://www.ietf.org/rfc/rfc3339.txt).

```json
"campaign": {
  "start": "2019-05-01T00:00:00Z",
  "end": "2019-06-01T00:00:00Z",
  "campaignPrice": 49900
}
```

| Field         | Description                                 |
| ------------------- | ------------------------------------------- |
| `start`            | Start date of campaign offer, if you are creating a agreement this is set to default now, and not an available variable  |
| `end`            | End date of campaign offer, can not be in the past |
| `campaignPrice`       | The price that will be shown for comparison   |

### Retrieve an agreement

A newly created agreement will be in status `PENDING` for 5 minutes before it expires.
If the customer approves the agreement, and the initialCharge (if provided) is successfully
processed, the agreement status will change to `ACTIVE`.

The approved agreement is retrieved from
[`GET:/agreements/{agreementId}`](https://vippsas.github.io/vipps-recurring-api/#/Agreement%20Controller/getAgreement)
with `"status":"ACTIVE"` when the customer has approved the agreement.

See [Agreement states](#agreement-states).

This is an example response from a call to
[`GET:/agreements/{agreementId}`](https://vippsas.github.io/vipps-recurring-api/#/Agreement%20Controller/getAgreement):

```json
{
  "id": "agr_5kSeqzFAMkfBbc",
  "start": "2018-08-22T13:00:00Z",
  "stop": null,
  "status": "ACTIVE",
  "productName": "Premier League subscription",
  "price": 49900,
  "productDescription": "Access to all games of English top football",
  "interval": "MONTH",
  "intervalCount": 1,
  "currency": "NOK",
  "campaign": null,
}
```

## Charges

An [agreement](#agreements) has payments, called charges.

### Create a charge

Charge the customer for each period with
[`POST:/agreements/{agreementId}/charges`](https://vippsas.github.io/vipps-recurring-api/#/Charge%20Controller/createCharge).

Each specific charge on an agreement must be scheduled by the merchant, a
minimum of two days before the payment will occur (it is minimum one day in the test environment).

Example: If the charge is _created_ on the 25th, the earliest the charge can be
_made_ is the 27th (25+2). This is so that the user can be informed about the
upcoming charge. The user is only shown one charge per agreement, in order to
not overwhelm the user when doing daily or weekly charges.

Create a charge for a given agreement. `due` will define for which date
the charge will be performed. This date has to be at a minimum two days in the
future (it is minimum one day in the test environment), and all charges `due` in
30 days or less are visible for users in Vipps.

An optional _and recommended_ `orderId` field can be set in the request.
If used this will be the id used to identify the charge throughout its payment
history, including in settlement files.

This `orderId` must be unique across all Recurring and eCom
transactions for the given `merchantSerialNumber`.
See
[orderId recommendations](https://github.com/vippsas/vipps-ecom-api/blob/master/vipps-ecom-api.md#orderid-recommendations).

If the field is not given a
unique id will be generated in the form `chr_xxxxxxx` (where each x is an alphanumeric
character). In settlements this autogenerated id is presented as `chrULxxxxxxx`.

### Amount changes

The `amount` of a charge is flexible and does not have to match the
`price` of the agreement.

A limit is in place however, which is 10 times the agreement `price` during the
span of the last `interval`. For example, in the
"Premier League subscription" agreement example above a limit of 4990 NOK (499 x 10)
over the last single `MONTH` period would be in place. If this limit becomes a
hindrance the agreement `price` can be [updated](#update-an-agreement).

**Note:** Although it is _technically_ possible to increase the price 10
times, we **strongly** recommend to be as user-friendly as possible, and
to make sure the user understands any changes and get updated information.

### Charge descriptions

When charges are shown to users in Vipps, they will have a title, and a
description. The title of a charge is derived directly from
`{agreement.ProductName}` whereas the description is set per charge, ie.
`{charge.description}`. For example, a charge on an agreement with product
name *Premier League subscription* with description *October* would look like
the following screenshot:

![Charge description example](images/charge_descriptions_example.png)

When the charge is processed, the payment will show up in the users's payment
history. In the payment history a charge from Vipps recurring payment will have
a description with follow format `{agreement.ProductName} - {charge.description}`.

[`POST:/agreements/{agreementId}/charges`](https://vippsas.github.io/vipps-recurring-api/#/Charge%20Controller/createCharge)
```json
{
  "amount": 49900,
  "currency": "NOK",
  "description": "October",
  "due": "2018-09-01",
  "retryDays": 5
}
```

**Note:** `description` cannot be longer than 45 characters.

### Charge times

Charge _attempts_ are made two times during the day: 08:00 and 16:00 UTC.
This is the same both for our production and test environment.
Subsequent attempts are made according to the `retryDays` specified.

### Charge retries

Vipps will retry the charge for the number of days specified in `retryDays`.
So if `retryDays=2` that would a maximum of 6 retries (two initial day, and two
each for the subsequent days).
Be aware that if you check the status of the charge within the retry period, it
might have status `FAILED`.
If `retryDays=0` it will be `FAILED` after the first attempt.

## Manage charges and agreements

It is the merchant's responsibility to manage and update charges and agreements,
and to use the API to make sure everything is in sync.

### Agreement states

| # | State      | Description                                                                          |
|:--|:-----------|:-------------------------------------------------------------------------------------|
| 1 | `PENDING`  | Agreement has been created, but not approved by the user in Vipps yet |
| 2 | `ACTIVE` | The agreement has been confirmed by the end user in Vipps and can receive charges |
| 3 | `STOPPED`  | Agreement has been stopped by the merchant most, typically when the end user wants to cancel the payment agreement |
| 4 | `EXPIRED` | The user did not accept, or failed to accept (due to processing an `initialCharge`), the agreement in Vipps |

### Update an agreement

A merchant can update an agreement by calling
[`PATCH:/agreements/{agreementId}`](https://vippsas.github.io/vipps-recurring-api/#/Agreement%20Controller/updateAgreement).
The following properties are available for updating:

```json
{
  "productName": "A new name",
  "productDescription": "A new description",
  "price": 25000,
  "status": "ACTIVE",
  "campaign": {
    "start": "2019-10-01T00:00:00Z",
    "end": "2019-12-01T00:00:00Z",
    "campaignPrice": 10000
  }
}
```

**Please note:** As a `PATCH` operation all parameters are optional. However
when setting an agreement status to `STOPPED` no other changes are allowed.
Attempts at changing other properties while stopping an agreement will result
in a `400 Bad Request` response.

### Pause an agreement

If there should be a pause in an agreement, like a temporary stop of a
subscription: Simply do not create any charges during the pause.

We recommended not to set the agreement status to `STOPPED`, but to update
the `productDescription` field of the agreement so the user can see that the
subscription is paused in Vipps.

### Stop an agreement

When a user notifies the merchant that they want to cancel a subscription or
service, the merchant must ensure that the status of the recurring agreement is
set to `STOPPED` at a suitable time.

We recommend that the recurring agreement remains `ACTIVE` for as long as the
user has access to the service. For example, if the user cancels their
subscription but they are still able to use the service until the end of the
billing cycle, the agreement should only be set to `STOPPED` at the end of the
billing cycle.  In this case we also recommend updating the `productDescription`
field of the agreement so that the user can see that the subscription is
cancelled or due to be cancelled at a given time.

Since `STOPPED` agreements cannot be reactivated, a benefit of waiting until
the "end of service" before setting the agreement status to `STOPPED` is that
the merchant will be able to reactivate the user's subscription without having
to set up a new agreement.

### Charge states

![Recurring charge states](images/Recurring-chargestates-new.svg)

| # | State      | Description                                                                          |
|:--|:-----------|:-------------------------------------------------------------------------------------|
| 1 | `PENDING`  | The charge has been created, but has not yet been approved by the user. |
| 2 | `DUE`      | The charge is now visible in Vipps, and will be made in the next 30 days (this was previously 6). |
| 3 | `CHARGED`  | The charge has been completed. |
| 4 | `FAILED`   | The charge has failed for some reason, i.e. expired card, insufficient funds, etc. |
| 5 | `REFUNDED` | The charge has been refunded. The timeframe for issuing a refund is 365 days from the date of capture. |
| 6 | `PARTIALLY_REFUNDED`| A part of the captured amount has been refunded. |
| 7 | `RESERVED` | An initial charge with `transactionType` set to `RESERVE_CAPTURE` changes state to `CHARGED` when captured successfully. |
| 8 | `CANCELLED` | The charge has been cancelled. |
| 9 | `PROCESSING` | The charge is currently being processed by Vipps. |

## Userinfo

Vipps offers the possibility for merchants to ask for the user's profile
information as part of the payment flow. This is done by adding a `scope`
parameter to the initiate call:
[`POST:/recurring/v2/agreements`](https://vippsas.github.io/vipps-recurring-api/#/Agreement%20Controller/draftAgreement).

If the enduser has not already consented to sharing information from Vipps to the merchant the user will be asked for such consent before completing the payment flow. Once the payment flow is completed the merchant can get the profile information from our Userinfo endpoint. The Userinfo endpoint is shared with [Vipps login](https://github.com/vippsas/vipps-login-api) and the merchant needs to have activated Vipps login to use this feature.

To activate for Vipps Login - go to the developer section under https://portal.vipps.no and click "Setup login" for the desired account. When this is enabled, you get access to both Vipps login as a product, or fetching the users profileinfo can be used as standalone. If you are only using userinfo to fetch users profile info as part of a payment flow, you do not need to input redirect URIs when setting up login.

A users consent to share information with a merchant applies accross our services. Thus, if the merchant implements Vipps login in addition to profile information as part of the payment flow, the merchant can also use Vipps to log the user in without the need for additional consents.

### Scopes

| Scopes      | Description                                    | User consent required  |
| ------------| -----------------------------------------------|-------- |
| `address`     | List containing the user's addresses. Will always contain the home address, but can also include work and other.    |   yes   |
| `birthDate`   | Birth date (BankID verified)                               |   yes   |
| `email`       | Email address (verified), the flag "email_verified : true" in the response indicates whether the email address is verified                                   |   yes   |
| `name`        | First, middle and given name (verified with National Population Register)              |   yes   |
| `phoneNumber` | Phone number (verified - the number used when creating the Vipps account)                          |   yes   |
| `nin`        | Norwegian national identity number (verified with BankID). **NB:** Merchants need to apply for access to NIN. See: [Who can get access to NIN and how?](https://github.com/vippsas/vipps-login-api/blob/master/vipps-login-api-faq.md#who-can-get-access-to-nin-and-how) |   yes      |
| `accountNumbers` | User bank account numbers. **NB:** Merchants need to apply for access to accountNumbers. See: [Who can get access to account numbers and how?](https://github.com/vippsas/vipps-login-api/blob/master/vipps-login-api-faq.md#who-can-get-access-to-accountnumbers-and-how) |   yes      |

See the API specification for the formats and other details for each scope.

**Please note:** If the e-mail address that is delivered has the flag `email_verified : false`
this address should not be used to link the user to an existing account without
further authentication. Such authentication could be to prompt the user to
login to the original account or confirm the account linking by having a
confirmation link sent to the email address.

### Userinfo call by call guide

Scenario: You want to complete a payment and get the name and phone number of
a customer.

1. Retrieve the access token:
   [`POST:/accesstoken/get`](https://vippsas.github.io/vipps-recurring-api/#/Access%20Controller/getAccessToken).
2. Add scope to the transaction object and include the scopes you wish to get
   access to (valid scopes) before calling
   [`POST:/agreements`](https://vippsas.github.io/vipps-recurring-api/#/Agreement%20Controller/draftAgreement).
3. The user consents to the information sharing and perform the payment in Vipps.
4. Retrieve the `sub` by calling
   [`GET:/agreements/{agreementId}`](https://vippsas.github.io/vipps-recurring-api/#/Agreement%20Controller/getAgreement)
5. Generate an OAuth 2 access token with
   [`POST:/oauth2/token`](https://vippsas.github.io/vipps-login-api/#/Vipps%20Log%20In%20API/oauth2Token),
   using the `clientId:client_secret` as base64 as described in
   [Vipps Login access token](#vipps-login-access-token),
   with the `grant_type` set to `"client_credentials"`.
6. Using the access token from step 5, call
   [`GET:/vipps-userinfo-api/userinfo/{sub}`](https://vippsas.github.io/vipps-login-api/#/Vipps%20Log%20In%20API/userinfo)
   to retrieve the user's information.

**Important note:** The API call to
[`GET:/vipps-userinfo-api/userinfo/{sub}`](https://vippsas.github.io/vipps-login-api/#/Vipps%20Log%20In%20API/userinfo)
must _not_ include the subscription key used for the Recurring API as Login
is _not_ under the same subscription, and will result in a
`HTTP Unauthorized 401` error.

### Example calls

To request these scopes add the scopes to the initial call to
[`POST:/v2/agreements`](https://vippsas.github.io/vipps-recurring-api/#/Agreement%20Controller/draftAgreement)

Example of request with scope:

```json
{
  "currency": "NOK",
  "customerPhoneNumber":"90000000",
  "interval": "MONTH",
  "intervalCount": 1,
  "isApp": false,
  "merchantRedirectUrl": "https://example.com/confirmation",
  "merchantAgreementUrl": "https://example.com/my-customer-agreement",
  "price": 49900,
  "productDescription": "Access to all games of English top football",
  "productName": "Premier League subscription",
  "scope": "address name email birthDate phoneNumber"
}
```

The user then consents and pays in Vipps.

 If a user chooses to reject the terms the payment will not be
processed. Unless the whole flow is completed, this will be handled as regular
a failed agreement by the recurring APIs

Once the user completes the session a unique identifier `sub` can be retrieved in the agreement details
[`GET:/v2/agreements/{agreementId}`](https://vippsas.github.io/vipps-recurring-api/#/Agreement%20Controller/getAgreement) endpoint alongside the full URL to Userinfo.

Example `sub` and `userinfoUrl` format:

```json
"sub": "c06c4afe-d9e1-4c5d-939a-177d752a0944",
"userinfoUrl": "https://api.vipps.no/vipps-userinfo-api/userinfo/c06c4afe-d9e1-4c5d-939a-177d752a0944"
```

This `sub` is a link between the merchant and the user and can used to retrieve
the user's details from Vipps Login:
[`GET:/vipps-userinfo-api/userinfo/{sub}`](https://vippsas.github.io/vipps-login-api/#/Vipps%20Log%20In%20API/userinfo)

**Please note:** It is recommended to get the user's information directly after completing the transaction. There is a however a **time limit of 168 hours** (one week) to retrieve the consented profile data from the userinfo endpoint to better support merchants that depend on manual steps/checks in their process of fetching the profile data. The merchant will get the information that is in the user profile at the time when they actually fetch the information. This means that the information might have changed from the time the user completed the transaction and the fetching of the profile data.

### Vipps Login access token

Accessing the Login `userinfo` endpoint required the Vipps Login access token: [`POST:/oauth2/token`](https://vippsas.github.io/vipps-login-api/#/Vipps%20Log%20In%20API/oauth2Token). The client constructs the request by adding the parameters described below to the HTTP body by using the `application/x-www-form-urlencoded` format.

**Request**

*Headers*

| Header            | Description                           |
| ----------------- | ------------------------------------- |
| Content-Type      | "application/x-www-form-urlencoded"   |
| Authorization     | "Basic {Client Credentials}"          |

The Client Credentials is a base 64 encoded string consisting of the Client id
and secret issued by Vipps joined by ":"

Example of generating the client credentials in bash where:

- client_id = 123456-test-4a3d-a47c-412136fd0871
- client_secret = testdzlJbUZaM1lqODlnUUtrUHI=

```bash
echo "123456-test-4a3d-a47c-412136fd0871:testdzlJbUZaM1lqODlnUUtrUHI=" | base64
```

Which results in the base64 client secret: `MTIzNDU2LXRlc3QtNGEzZC1hNDdjLTQxMjEzNmZkMDg3MTp0ZXN0ZHpsSmJVWmFNMWxxT0RsblVVdHJVSEk9Cg==`

*Form content*

| Key               | Description                         |
| ----------------- | ----------------------------------- |
| grant_type        | Value **must** be the actual string  `"client_credentials"`, not the value generated above.  |

**Example response:**

```json
{
  "access_token": "hel39XaKjGH5tkCvIENGPNbsSHz1DLKluOat4qP-A4.WyV61hCK1E2snVs1aOvjOWZOXOayZad0K-Qfo3lLzus",
  "id_token": "eyJhbGciOiJSUzI1NiIsImtpZCI6InB1YmxpYzo4MGYzYzM0YS05Nzc5LT <snip>",
  "expires_in": 3599,
  "scope": "openid",
  "token_type": "bearer"
}
```

### Userinfo call

This endpoint returns the payload with the information that the user has consented to share, which is provided in the OAuth 2.0 access token.
You can learn more at the [OIDC Standard](https://openid.net/specs/openid-connect-core-1_0.html#UserInfo).

Call [`GET:/vipps-userinfo-api/userinfo/{sub}`](https://vippsas.github.io/vipps-login-api/#/Vipps%20Log%20In%20API/userinfo) with the `sub` that was retrieved when calling [`GET:/v2/agreements/{agreementId}`](https://vippsas.github.io/vipps-recurring-api/#/Agreement%20Controller/getAgreement). See below on how to construct the call.

**Request**

*Headers*

| Header            | Description                            |
| ----------------- | -------------------------------------  |
| Authorization     | "Bearer {Access Token}"                |

The access token is received on a successful request to the token endpoint described above.

**Example response:**

```json
{
    "sub": "c06c4afe-d9e1-4c5d-939a-177d752a0944",
    "birthdate": "1815-12-10",
    "email"<EMAIL_ADDRESS>    "email_verified": true,
    "nin": "10121550047",
    "name": "Ada Lovelace",
    "given_name": "Ada",
    "family_name": "Lovelace",
    "sid": "7d78a726-af92-499e-b857-de263ef9a969",
    "phone_number": "4712345678",
    "address": {
        "street_address": "Suburbia 23",
        "postal_code": "2101",
        "region": "OSLO",
        "country": "NO",
        "formatted": "Suburbia 23\\n2101 OSLO\\nNO",
        "address_type": "home"
    },
    "other_addresses": [
        {
            "street_address": "Fancy Office Street 2",
            "postal_code": "0218",
            "region": "OSLO",
            "country": "NO",
            "formatted": "Fancy Office Street 2\\n0218 OSLO\\nNO",
            "address_type": "work"
        },
        {
            "street_address": "Summer House Lane 14",
            "postal_code": "1452",
            "region": "OSLO",
            "country": "NO",
            "formatted": "Summer House Lane 14\\n1452 OSLO\\nNO",
            "address_type": "other"
        }
    ],
    "accounts": [
        {
            "account_name": "My savings",
            "account_number": "12064590675",
            "bank_name": "My bank"
        }
    ]
}
```

**Please note:** More documentation about the token and userinfo endpoint can be found [here](https://github.com/vippsas/vipps-login-api/blob/master/vipps-login-api.md#access-token).

![Userinfo sequence](images/userinfo-direct.png)

### Consent

A user's consent to share information with a merchant applies across all Vipps
services. Thus, if the merchant implements Vipps Login in addition to profile
information as part of the agreement flow, the merchant can also use Vipps to
log the user in without the need for additional consent.

The user is presented with a consent card that must be accepted before
approving the agreement in Vipps. The following screens shows examples
of consent cards for Android(left) and iOS(right):

![Consent card](images/share-user-info.png)

**Please note:** This operation has an "all or nothing" approach, so a user must accept the agreement and consent to _all_ values in order to complete the
session. If a user chooses to reject the terms the agreement will not be
activated. Unless the whole flow is completed, this will be handled as a
failed agreement by the Recurring API.

## HTTP responses

This API returns the following HTTP statuses in the responses:

| HTTP status                 | Description                                 |
| --------------------------- | ------------------------------------------- |
| `200 OK`                    | Request successful                          |
| `201 Created`               | Request successful, resource created        |
| `400 Bad Request`           | Invalid request, see the error for details  |
| `401 Unauthorized`          | Invalid credentials                         |
| `403 Forbidden`             | Authentication ok, but credentials lacks authorization  |
| `404 Not Found`             | The resource was not found                  |
| `409 Conflict`              | Unsuccessful due to conflicting resource    |
| `422 Unprocessable Entity`  | Vipps could not process                     |
| `429 Too Many Requests`     | Look at [table below to view current rate limits](#rate-limiting)   |
| `500 Server Error`          | An internal Vipps problem.                  |

All error responses contains an `error` object in the body, with details of the
problem.

## Rate-limiting

We have added rate-limiting to our API (`HTTP 429 Too Many Requests`) to prevent
fraudulent and wrongful behaviour, and increase the stability and security of
our API. The limits should not affect normal behaviour, but please contact us
if you notice any unexpected behaviour.

| API                                                                                | Limit          | Key used                                          |
|----------------------------------------------------------------------------------------------------------|----------------|---------------------------------------------------|
| [CreateCharge](https://vippsas.github.io/vipps-recurring-api/#/Charge%20Controller/createCharge)         | 2 per minute   | agreementId + chargeId (based on idempotency key) |
| [CancelCharge](https://vippsas.github.io/vipps-recurring-api/#/Charge%20Controller/cancelCharge)         | 5 per minute   | agreementId + chargeId                            |
| [CaptureCharge](https://vippsas.github.io/vipps-recurring-api/#/Charge%20Controller/captureCharge)       | 5 per minute   | agreementId + chargeId                            |
| [RefundCharge](https://vippsas.github.io/vipps-recurring-api/#/Charge%20Controller/refundCharge)         | 5 per minute   | agreementId + chargeId                            |
| [ListAgreements](https://vippsas.github.io/vipps-recurring-api/#/Agreement%20Controller/listAgreements)  | 5 per minute   | (per merchant)                                    |
| [UpdateAgreement](https://vippsas.github.io/vipps-recurring-api/#/Agreement%20Controller/updateAgreement)| 5 per minute   | agreementId                                       |
| [FetchCharge](https://vippsas.github.io/vipps-recurring-api/#/Charge%20Controller/getCharge)             | 10 per minute  | agreementId + chargeId                            |
| [ListCharges](https://vippsas.github.io/vipps-recurring-api/#/Charge%20Controller/listCharges)           | 10 per minute  | agreementId                                       |
| [FetchAgreement](https://vippsas.github.io/vipps-recurring-api/#/Agreement%20Controller/getAgreement)    | 120 per minute | agreementId                                       |
| [DraftAgreement](https://vippsas.github.io/vipps-recurring-api/#/Agreement%20Controller/draftAgreement)  | 300 per minute | (per merchant)                                    |

## Polling guidelines

General guidelines for When to start polling with
[`GET:/v2/agreements/{agreementId}`](https://vippsas.github.io/vipps-recurring-api/#/Agreement%20Controller/getAgreement):

1. Start after 5 seconds
2. Check every 2 seconds

These are reasonable values, but different merchants have different use cases,
and values should be adapted to the specific case.

See [Timeouts](#timeouts) for details about timeouts.

## Timeouts

### Using a phone

Both the deeplink URL, which causes the app-switch to Vipps, and the landing
page displayed in browsers, is valid for 5 minutes.

If the user does not act on the app-switch (such as not attempting to log into
Vipps) within 5 minutes, the payment times out.

After the app-switch to Vipps, the user has another 5 minutes to complete the
payment in Vipps.

This means that the user has a total of 10 minutes to complete the payment.

### Using a laptop/desktop

If the user is using a laptop/desktop device, and the user must confirm or
enter the phone number on the landing page within 5 minutes.
If the user does not do so, the payment times out.

After the user has clicked "OK" on the landing page, the user
has an additional 5 minutes to complete the payment in Vipps.

This means that the user has a total of 10 minutes to complete the payment.

## Authentication and authorization

All Vipps API requests must include an `Authorization` header with
a JSON Web Token (JWT), which we call the _access token_.
The access token is obtained by calling
[`POST:/accesstoken/get`](https://vippsas.github.io/vipps-ecom-api/#/Authorization_Service/fetchAuthorizationTokenUsingPost)
and passing the `client_id`, `client_secret` and `Ocp-Apim-Subscription-Key`.

See [Get an access token](https://github.com/vippsas/vipps-developers/blob/master/vipps-getting-started.md#get-an-access-token)
in the
[Getting started guide](https://github.com/vippsas/vipps-developers/blob/master/vipps-getting-started.md)
for more information.

## Recomendations regarding handling redirects

Since Vipps is a mobile entity the amount of control Vipps have over the redirect back to the merchant after the purchase is completed is limited. A merchant must not assume that Vipps will redirect to the exact same session and for example rely entirely on cookies in order to handle the redirect event. For example the redirect could happen to another browser.

Examples of some, but not all, factors outside of Vipps control.
- Configurations set by the OS itself, for example the default browser.
- User configurations of browsers.
- Users closing app immediately upon purchase.

Therefore Vipps recommends having a stateless approach in the site that is supposed to be the end session. An example would a polling based result handling from a value in the redirect url.

Example for demonstration purposes that should be handled.

- User starts is in web session in a Chrome Browser.
- A Vipps purchase is started, a redirect URL is defined by the Merchant.
- The user completes the purchase.
- The Vipps app redirects the user.
- The OS defaults to a Safari Browser for the redirect.
- The merchant handles the redirect without the customer noticing any discrepancies from the browser switch.

## Questions?

We're always happy to help with code or other questions you might have!
Please create an [issue](https://github.com/vippsas/vipps-recurring-api/issues),
a [pull request](https://github.com/vippsas/vipps-recurring-api/pulls),
or [contact us](https://github.com/vippsas/vipps-developers/blob/master/contact.md).

Sign up for our [Technical newsletter for developers](https://github.com/vippsas/vipps-developers/tree/master/newsletters).

repository: alfmags/vipps-recurring-api

repo_name: alfmags/vipps-recurring-api


text:
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "dynatrace_alerting_profile Data Source - terraform-provider-dynatrace"
subcategory: ""
description: |-

---

# dynatrace_alerting_profile (Data Source)

<!-- schema generated by tfplugindocs -->
## Schema

### Optional

- **display_name** (String) The name of the Dynatrace entity.
- **id** (String) The ID of the Dynatrace entity.

branch_name: refs/heads/main

extension: md

gha_language: Go

license_type: permissive


text:
## 0.8.1

* Fix typo (thanks to @marcosgallardo)

## 0.8.0

* Added native support for playlists
* Fix looping bug
* Fix #9 & #10 (thanks to @murilobaixou)

## 0.7.3

* Small bug fix

## 0.7.2

* Deleted unnecesary files
* Updated dependencies

## 0.7.1

* Added options to allow muting, prevent screen sleep and controlling fullscreen mode.

## 0.7.0

* Updated to work with Chewie ^0.9.0

## 0.6.2

* Fix copy-paste issue

## 0.6.1

* Fix minor bugs

## 0.6.0

* Fixed bugs and added example on how to implement a playlist

## 0.5.2

* Fixed possible stack overflow on videoEnd callback.

## 0.5.1

* Fixed `autoPlay` not working due to video thumbnail
* Added `fullscreenByDefault` property

## 0.5.0

* Added `onVideoStart` and `onVideoEnd` (extremely useful) callbacks

## 0.4.3-4

* Revert 0.4.2 as it was not working

## 0.4.1-2

* Changed dispose approach trying to fix some errors derived from video disposal

## 0.4.0

* Added thumbnail to videos (thumbnail loads directly from YT). You can control whether you want to display the original video thumbnail with the `showThumb` property. The default value is `true`.

## 0.3.1

* Fix bugs
* You can now access the inner video controller via `GlobalKey<FlutubeState>`

## 0.3.0

* Updated Chewie to 0.8.0
* Removed unnecessary code
* Fixed bugs

## 0.2.0

* Fix [#2](https://github.com/ja2375/FluTube/issues/2)
* Fixed a potential bug that made videos don't stop playing when route was deactivated

## 0.1.2

* Fixed a bug which made `autoStart` property not work without setting `autoInitialize` to true.

## 0.1.1

* Updated http dependency to allow installation on all Flutter channels.

## 0.1.0

* Added in-plugin API. The plugin does not depend anymore on the YT Link Deconstructor hosted on HerokuApp.

## 0.0.1

* Initial release.

license: MIT

repository: mnomanmemon/FluTube

branch_name: refs/heads/master

gha_license_id: MIT

repo_name: mnomanmemon/FluTube


text:
Data Containers
===================

Your application lives only if containers remain alive. If you want to make data
storage persistent use data-only containers.

How? Nothing change here:

```
docker-compose up -d
```

repository: LDKJJ/compose

repo_name: LDKJJ/compose


text:
# Test Server 3

A test server which runs in dev mode and requires a bunch of external services:

 * [Redis](https://redis.io) for sessions
 * [MongoDB](https://www.mongodb.com) for storage
 * [Keycloak](https://www.keycloak.org) for security (via OpenID Connect)
 * [Mosquitto](https://mosquitto.org) as external messaging provider (via MQTT)

## Start

    docker-compose up
    npm start

Open http://localhost:5050 for the Portal and http://localhost:5050/mashroom for the Admin UI

Predefined users: john/john, admin/admin

## Stop

    <CTRL+C
    docker-compose down

## Administration

### Keycloak

To add some additional users and manage roles:

  * Open: http://localhost:8080/admin
  * Login with admin/admin
  * Switch to the *Test* realm and add manage users and roles
  * Add the *mashroom-admin* role if the users should be Administrator

*Export the realm with users*

See: https://www.keycloak.org/server/importExport

### Test External Messaging with Mosquitto

To test the communication with Mashroom you can connect to Mosquitto on localhost:1883 (e.g. with http://mqtt-explorer.com)
or via Websocket on localhost:9001 (e.g. with a web client like http://www.hivemq.com/demos/websocket-client)

Send a message from the Portal to an external system:

 * In the MQTT client subscribe to: external1/#
 * In the Mashroom Portal add the *Demo Remote Messaging App* to a page and send a message to *external1/foo*
 * You should see the message in the MQTT client

Send a message from an external system to the Portal:

 * In the Mashroom Portal add the *Demo Remote Messaging App*
 * In the MQTT client send a message to: mashroom/user/<portal-user>/test
   or to mashroom/global-notifications (to all users)
 * You should see the message in the *Demo Remote Messaging App*

repository: nonblocking/mashroom

gha_language: TypeScript

repo_name: nonblocking/mashroom


text:
---
description: Manage your Celo node
---

## Commands

### Accounts

List the addresses that this node has the private keys for.

```
USAGE
  $ celocli node:accounts

OPTIONS
  --ledgerAddresses=ledgerAddresses              [default: 1] If --useLedger is set, this will get the first N addresses
                                                 for local signing

  --ledgerConfirmAddress                         Set it to ask confirmation for the address of the transaction from the
                                                 ledger

  --ledgerCustomAddresses=ledgerCustomAddresses  [default: [0]] If --useLedger is set, this will get the array of index
                                                 addresses for local signing. Example --ledgerCustomAddresses "[4,99]"

  --useLedger                                    Set it to use a ledger wallet
```

_See code: [packages/cli/src/commands/node/accounts.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/node/accounts.ts)_

### Synced

Check if the node is synced

```
USAGE
  $ celocli node:synced

OPTIONS
  --verbose  output the full status if syncing
```

_See code: [packages/cli/src/commands/node/synced.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/node/synced.ts)_


text:
# Ipsum Lorem -
## a tekst- "fish"
that is used in printing and design.
Lorem Ipsum is actually standard "fish" until the XVI century, when an unknown printer took a galley of
font and made a selection of her designs fonts. "Fish" has survived not only five centuries, but also
the leap into electronic typesetting, remaining essentially unchanged.

It was popularized in the 60s of the last century with the release of Letraset fonts,
which contain passages Lorem Ipsum, and again - more recently with computer typesetting programs
such as Aldus Pagemaker, which used different versions of Lorem Ipsum.


text:
# Input Tag Types

###### Last updated November 15, 2021

:::

##### User Context

*When I log in to the web app from my desktop computer, I never have any trouble typing in my email address: the ‘@’ symbol is easily accessible by pressing Shift-2 on the keyboard. However, when I log in from my iPhone, it’s a lot harder: I must navigate through multiple screens to find the ‘@’ symbol, and the keyboard tries to autocorrect my email address.*

:::

:::

##### Explanation

On a desktop computer, we only need two `<input>` text field types: text and password. A full keyboard makes it easy to enter freeform text, numbers, or special symbols. However, on mobile devices with their smaller screens and limited space for keyboards, more creative solutions are necessary. These take the form of `<input>` types like *email*, *telephone*, or *url*, each of which signals to a mobile web browser both that it should present a customized keyboard better suited for entering that sort of data, and how it should treat autocorrection.

:::

:::

##### How to Use

Review MDN’s [HTML 5 Input Types](https://developer.mozilla.org/en-US/docs/Learn/Forms/HTML5_input_types) to learn more about the available input types. Next, update the input tags on your forms that would benefit from greater customization. Starting with the email field may be best, as this can be one of the more frustrating types of data to enter on a mobile device.

Important note: confusingly, the input type number should not be used for values like account numbers, social security numbers, credit card numbers, confirmation numbers, or any other fixed value. The number field type is a great way to allow users to choose from a range of numeric values, but its feature set can make choosing a fixed value quite error prone, as described in the CSS Tricks article, [You probably don’t need input type=“number”](https://css-tricks.com/you-probably-dont-need-input-typenumber/). Instead, consider using the following, as described in another CSS Tricks article, [What to Use Instead of Number Inputs](https://css-tricks.com/what-to-use-instead-of-number-inputs/).

`<input type="text" inputmode="numeric" pattern="[0-9]*">`

:::

:::

##### Next Steps

- [HTML 5 Input Types, MDN](https://developer.mozilla.org/en-US/docs/Learn/Forms/HTML5_input_types)
- [The Input (Form Input) element, MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input)
- [“Input”, Can I Use…](https://caniuse.com/?search=input)

:::

branch_name: refs/heads/dev


text:
# Chinese-Calligraphy-Database-Crawler
A crawler for Chinese calligraphy database (with a web server).

## Deployed web server
https://kaminyou.com/Chinese-Calligraphy-Database-Crawler/

## Instruction
1. Please execute `crawl.py` or `quick_crawl.py` to crawl the mapping relationship of the word and idx.
```
python3 crawl.py
# or
python3 quick_crawl.py
```
2. Extract valid pairs in the output csv `mapping.csv` to `data.js`.
```
python3 check2js.py
```


text:
# Hologram
[![Build Status](https://travis-ci.org/trulia/hologram.png)](https://travis-ci.org/trulia/hologram)
[![Code Climate](https://codeclimate.com/github/trulia/hologram.png)](https://codeclimate.com/github/trulia/hologram)

Hologram is a Ruby gem that parses comments in your CSS and helps you
turn them into a beautiful style guide.

There are two steps to building a great style guide:

1. Documenting your css and javascript, and generating html examples.
2. Styling the output of step 1.

The hologram gem itself is only concerned with step 1. This means you
are free to make your style guide look however you would like. If you
don't feel like going through this process yourself you can take a look
at the
[templates](https://github.com/trulia/hologram-example/tree/master/templates)
in our [example repository](https://github.com/trulia/hologram-example)
and use the assets defined there instead.

## Installation

Add this line to your application's Gemfile:

    gem 'hologram'

And then execute:

    $ bundle

If you don't use bundler you can run `gem install hologram`.

## Quick Start

``` hologram init ```

This will create a `hologram_config.yml` file  (more on this below), and
also create a starter `_header.html` and `_footer.html` file for you.
You can then tweak the config values and start documenting your css.

Building the documentation is simply:

``` hologram ```

###Command line flags

Hologram has a couple command line flags:

* `-c` or `--config` - specify the config file, by default hologram
  looks for `hologram_config.yml`
* `-r` or `--root` - specify the directory to use when processing files
  (useful if you run hologram in a different directory than your assets.
  Defaults to current working directory)

## Details

There are two things you need to do to start using hologram:

1. Create a YAML config file for your project.

2. Go document some code!

### Creating a YAML config file

Hologram needs a few configuration settings before it can begin to build
your documentation for you. Once this is set up you can execute hologram
by simply running:

`hologram path/to/your/config.yml` or (using bundler) `bundle exec
hologram path/to/your/config.yml`

Your config file needs to contain the following key/value pairs

* **source**: relative path to your source files

* **destination**: relative path where you want the documentation to be
  built

* **documentation_assets**: The path that contains supporting assets for
  the documentation page. This typically includes html fragments
  (header/footer, etc), style guide specific CSS, javascript and any
  images. Hologram specifically looks for two files: `_header.html` and
  `_footer.html`, these are used to start and end every html page
  hologram generates.

  Hologram treats `_header.html` and `_footer.html` as ERB files for
  each page that is generated. You can access the `title`, `file_name`,
  `blocks`, and `categories`.

  `blocks` is a list of each documentation block on the page. Each item
  in the list has a `title`, `name`, `category`, and optionally a
  `parent`. This is useful for, say, building a menu that lists each
  component.

  `categories` is a list of all the categories found in the
  documentation

  **Nota Bene:** Filenames that begin with underscores will not be
  copied into the destination folder.

* **custom_markdown**: (optional) this is the filename of a class that
  extends RedCarpet::Render::HTML class. Use this for when you need
  additional classes or html tags for different parts of the page.  See
  `example_markdown_renderer.rb.example` for an example of how your
  class can look like.

* **index**: (optional) this is a category (see **Documenting your
  styles** section below) that will be used as the index.html.

* **dependencies**: a **list** of relative paths to folders containing
  any dependencies your style guide has. These folders will be copied
  over into the documentation output directory. PUT THE CSS/JS THAT IS
  ACTUALLY BEING DOCUMENTED HERE

##### Example config file

    # The directory containing the source files to parse source:
    ../components

    # The directory that hologram will build to destination: ../docs

    # The assets needed to build/style the docs (includes header.html,
    footer.html, etc) documentation_assets: ../hologram_assets

    # A custom markdown renderer that extends `RedCarpet::Render::HTML
    class` custom_markdown: trulia_markdown_renderer.rb

    # Any other asset folders that need to be copied to the destination
    folder # This is where the CSS/JS you are actually documenting
    should go dependencies:
        - ../build

### Documenting your styles

Hologram will scan for stylesheets (.css, .scss, .sass, .less, or .styl)
within the **source** directory defined in you configuraiton.  It will
look for comments that match the following:

    /*doc
    ---
    title: Buttons
    name: button
    category: Base CSS
    ---

    Button styles can be applied to any element. Typically you'll want
    to use either a `<button>` or an `<a>` element:

    ```html_example <button class="btn btnDefault">Click</button> <a
    class="btn btnDefault" href="trulia.com">Trulia!</a> ```

    If your button is actually a link to another page, please use the
    `<a>` element, while if your button performs an action, such as
    submitting a form or triggering some javascript event, then use a
    `<button>` element.

    */

The first section of the comment is a yaml block that defines certain
aspects of the this documentation block (more on that in the next
section). The second part is simply markdown as defined by Redcarpet.

Notice the use of `html_example`. This tells the markdown renderer that
it should treat the example as...well...html. If your project uses
[haml](http://haml.info/) you can also use `haml_example`. In that case
the output will be html for the example and the code block will show the
haml used to generate the html. For components that require
[javascript](https://www.destroyallsoftware.com/talks/wat) you can use
`js_example` for your javascript. In addition to outputing the
javascript in a `<code>` block it will also wrap it in a `<script>` tag
for execution.

#### Document YAML section

The yaml in the documention block can have any
key value pair you deem important but it specifically looks for the
following keys:

* **title**: The title to display in the documents
* **category**: This is the broad category for the component, all
  components in the same category will be written to the same page.
* **name**: This is used for grouping components, by assigning a name a
  component can be referenced in another component as a parent.
* **parent**: (Optional.) This should be the **name** of another
  component. If this is set the current component will be displayed as
  a section within the **parent**'s documentation.

For example, you might have a component with the **name** *buttons* and
another component named *buttonSkins*. You could set the **parent** for
the *buttonSkins* component to be *buttons*. It would then nest the
*buttonSkins* documentation inside the *buttons* documentation.

Each level of nesting (components are infinitely nestable) will have a
heading tag that represents its depth. In the above example *buttons*
would have an `<h1>` and *buttonSkins* would have an `<h2>`.

You can see [this exact example in our demo
repo](https://github.com/trulia/hologram-example/tree/master/components/button),
and the output of this nesting [in our demo
styleguide](http://trulia.github.io/hologram-example/base_css.html#Buttons).

### Documentation Assets

The documentation assets folder contains the html, css, js and images
you'll need for making your style guide look beautiful.

Hologram doesn't care too much about what is in here as it is
intended to be custom for your style guide.

##### Styling Your Code Examples

Hologram uses [pygments.rb](https://github.com/tmm1/pygments.rb) gem to
provide syntax highlighting for code examples. One of the assets that
you probably want to include in your documentation assets folder is a
css file that styles the "pygmentized" code examples. We use
`github.css` which can be found along with the css we use to style code
blocks
[here](https://github.com/trulia/hologram-example/tree/gh-pages/hologram_assets/doc_assets/css).

## Supported Preprocessors/File Types

The following preprocessors/file types are supported by Hologram:
- Sass (.scss, .sass)
- Less (.less)
- Stylus (.styl)
- Vanilla CSS (.css)
- Javascript (.js)
- Markdown (.md, .markdown)

## Extensions and Plugins

- [Guard Hologram](https://github.com/kmayer/guard-hologram) is a sweet
  little gem that uses guard to monitor changes to your hologram project
  and rebuilds your styleguide on the fly as you make changes.

## Contributing

1. Fork it
2. Create your feature/bug fix 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

## Authors

Hologram is written and maintained by [August
Flanagan](http://github.com/aflanagan) and [JD
Cantrell](http://github.com/jdcantrell).

## Contributors

These fine people have also contributed to making hologram a better gem:

* [Rajan Agaskar](https://github.com/ragaskar)
* Louis Bennett
* [jho406](https://github.com/jho406)
* johny (wrote our initial tests!)
* [Elana Koren](https://github.com/elanakoren)
* [Ken Mayer](https://github.com/kmayer)
* [Roberto Ostinelli](https://github.com/ostinelli)
* [Nicole Sullivan](https://github.com/stubbornella)

## License

[Hologram is licensed under the MIT License](https://github.com/trulia/hologram/blob/master/LICENSE.txt)


text:
# Sensitive Param Filter

[![Build Status](https://travis-ci.org/amaabca/sensitive-param-filter.svg?branch=master)](https://travis-ci.org/amaabca/sensitive-param-filter)

`sensitive-param-filter` is a zero-dependency package designed to filter sensitive values from JavaScript objects.
This package can be used to scrub logs, filer data before outputting to a UI, etc.
The defaults provided with sensitive-param-filter should work well for most applications.

## Installation

Install sensitive-param-filter to your project via either npm:

`npm install @amaabca/sensitive-param-filter`

or yarn:

`yarn add @amaabca/sensitive-param-filter`

## Usage

```js
const { SensitiveParamFilter } = require('@amaabca/sensitive-param-filter')
const paramFilter = new SensitiveParamFilter()
const rawObject = {
  Authorization: 'Bearer somedatatoken',
  body: {
    info: '{ "amount": 28.64, "credit_card": "4242424242424242", "cvv": "123" }'
  },
  method: 'POST',
  url: 'https://pay.example.com?user=bob.bobbington&password=asecurepassword1234'
}
const filteredObject = paramFilter.filter(rawObject)
// filteredObject = {
//   Authorization: 'FILTERED',
//   body: {
//     info: '{ "amount": 28.64, "credit_card": "FILTERED", "cvv": "FILTERED" }'
//   },
//   method: 'POST',
//   url: 'https://pay.example.com?user=bob.bobbington&password=FILTERED'
// }
```

### Details

sensitive-param-filter examines keys to determine which values to filter.
Key matching is done in a case-insensitive, partial-macthing manner (that is, if the param `AUTH` is provided, `Authorization`, `AUTHENTICATION`, etc. will be filtered).

### Key Features

 * Does not modify input objects
 * Performs a deep copy of the input object (note that booleans, numbers, and strings - which are immutable - are technically copied by reference)
 * Can be configued to filter out or leave "unexpected" objects (such as functions)
 * Handles circular references
 * Filters valid JSON strings
 * Filters valid and malformed URL query params
 * Filters Errors, Arrays, Maps, Sets, and simple objects

### Options

```js
const { SPFDefaultParams, SensitiveParamFilter } = require('@amaabca/sensitive-param-filter')
const filter = new SensitiveParamFilter({
  filterUnknown: false,
  params: SPFDefaultParams.concat(['data', 'email']),
  replacement: '***',
  whitelist: ['authentic', 'encryption_standard']
})
```

* **filterUnknown:**
Indicates whether "unexpected" objects (such as functions) should be filtered or returned as-is.
Defaults to `true`

* **params:**
An array of string params to filter.
These entries will be combined into a regex that is used by sensitive-param-filter.
Setting this option overwrites the default array (`SPFDefaultParams`).

* **replacement:**
The object to replace filtered values with.
Defaults to `'FILTERED'`.

* **whitelist:**
An array of strings to exclude from filtering.
For example, if `pass_through` is including in the whitelist, the key `pass_through` will not be filtered.
Note that entries must match keys exactly to prevent filtering - that is, whitelisting `secrets` still causes `secrets_store` to be filtered.

## Default Values

See [defaults](src/defaults.js).
Note that all of these values can be overridden via the options.

The default keys that are filtered are:

* auth
* bearer
* credit
* CVD
* CVV
* encrypt
* PAN
* pass
* secret
* token

## License & Contributing

`sensitive-param-filter` uses the MIT license.
See the [license](LICENSE).

We welcome contributions.
See [contributing](CONTRIBUTING.md).

repository: amaabca/sensitive-param-filter

gha_language: JavaScript

repo_name: amaabca/sensitive-param-filter


text:
---
layout: template
title: Device Information
permalink: /development/device_info/
link_group: development
---
# Device Information

pyatv can extract various information about a device, e.g. which
operating system (and version) it runs or its hardware model (3, 4K, etc.).
This information is exposed via the interface {% include api i="interface.DeviceInfo" %}.

## Using the Device Information API

After connecting to a device, you get device info via {% include api i="interface.AppleTV.device_info" %}:

```python
atv = await pyatv.connect(config, ...)
devinfo = atv.device_info
```

You can then access the actual information via properties:

```python
print(devinfo.operating_system)
print(devinfo.version)
print(devinfo.mac)
```

 Just printing `devinfo` will produce a summary of the device information
 (MAC-address is not included here):

 ```python
 >>> print(devinfo)
 4K tvOS 13.3.1 build 17K795
 ```

repository: postlund/pyatv

gha_language: Python

repo_name: postlund/pyatv


text:
In this course, you will learn how to install [PowerShell](https://github.com/PowerShell/PowerShell/) and become familiar with the basics of the PowerShell environment on [Ubuntu Linux](https://ubuntu.com/).

### Contributing

You can contribute to this course by creating a pull request [on GitHub](https://github.com/pcgeek86/katacoda-scenarios).

* [Visit my website](https://trevorsullivan.net)
* [Twitter (@pcgeek86)](https://twitter.com/pcgeek86)


text:
# react-canvas-paint
#### [DEMO](https://piotrrussw.github.io/react-canvas-paint/)
> A react drawing library
<br/>

![library example](assets/gif.gif?raw=true "GIF")

[![NPM](https://img.shields.io/npm/v/react-canvas-paint.svg)](https://www.npmjs.com/package/react-canvas-paint) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)

## Install

```bash
npm install --save react-canvas-paint
```

## Usage

```jsx
import React, { Component } from 'react'

import ReactCanvasPaint from 'react-canvas-paint'
import 'react-canvas-paint/dist/index.css'

class Example extends Component {
  render() {
    return <ReactCanvasPaint />
  }
}
```

## Props

| Property      | Type     | Default                                                            | Description                                     |
| :------------ | :------- | :----------------------------------------------------------------- | :---------------------------------------------- |
| `width`       | number   | 400                                                                | canvas width                                    |
| `height`      | number   | 400                                                                | canvas height                                   |
| `viewOnly`    | bool     | false                                                              | Set to true disable drawing on canvas           |
| `data`        | Object   | undefined                                                          | Initial imageData that can be put on the canvas |
| `onDraw`      | function | undefined                                                          | Function with imageData on every line drawn     |
| `colors`      | Array    | ['#7030A2', '#000000', '#0170C1', '#FE0002', '#FFFF01', '#00AF52'] | array of choosable colors to draw               |
| `strokeWidth` | number   | 5                                                                  | width of drawing stroke                         |

## License

MIT © [piotrrussw](https://github.com/piotrrussw)

This module was bootstrapped with [create-react-library](https://github.com/transitive-bullshit/create-react-library).

repository: piotrrussw/react-canvas-paint

repo_name: piotrrussw/react-canvas-paint


text:
## magik-scraper
Scrap & Save lastes updated fund performance to csv

## Features
* Currently NAV
* NAV Change
* Bid
* Offer
* Datetime

## Requirement
* Python 3.6+
* Requests 2.22.0
* Beautiful Soup 4.7.1

## Download
Clone or Download as zip

## Quickstart
```python
import magik

# url from Fund Performance not a Fund Profile!
url = 'https://www.wealthmagik.com/FundInfo/FundPerformance-TMBAM-MIXBAL-TMBAALF-กองทุนเปิดทหารไทยจัดทัพลงทุน%20ระยะยาว'
filename = 'TMBAALF'
magik.scrape(url, filename)

repository: king-peanut/magik-scraper

repo_name: king-peanut/magik-scraper


text:
# gorillamux-postgis-service
Testing out a Postgis database service using Go.

Some basic additional command info.

brew install postgresql
brew services start PostgreSQL - Run now and on restart
brew install postgis

export makes a variable something that will be included in child process environments. It does not affect other already existing environments. In general there isn't a way to set a variable in one terminal and have it automatically appear in another terminal, the environment is established for each process on its own.

Adding it to your .profile makes it so that your environment will be setup to include that new variable each time you log in though. So it's not being exported from one shell to another, but instead is instructing a new shell to include it when it sets up the initial environment.

export APP_DB_USERNAME=postgres
export APP_DB_PASSWORD=postgres
export APP_DB_NAME=postgis

CREATE TABLE products
(
    id SERIAL,
    name TEXT NOT NULL,
    price NUMERIC(10,2) NOT NULL DEFAULT 0.00,
    CONSTRAINT products_pkey PRIMARY KEY (id)
)

docker run -p 5432:5432 --name postgis -e POSTGRES_PASSWORD=postgres -e POSTGRES_USER=postgres  -e POSTGRES_DB=postgis -d postgis/postgis


text:
---
title: "Field: ADJUSTMENT"
layout: field
parent: OTHER_METHOD
language: en
indicator: 6-4-2
slug: ADJUSTMENT
---
## Sources of discrepancies

Differences might occur due to the following, amongst others: For national estimates incoming water is counted as being part of the country’s available water resources, while global estimates can only be done by adding up the internal renewable water resources (water generated within the country) of all countries in order to avoid double counting.

repository: weblate/sdg-metadata

repo_name: weblate/sdg-metadata


text:
# test-react-native-app

### A mobile app made with react-native for some reason.

Instructions to run this project.

1.- Install the dependencies,

    $   yarn install

1.5 if you are using ios you need to run

    $   npx pod-install ios

2.- Start the development server

    $   yarn start

3.- Run the proyect

    $   yarn run android //if you are using android
    $   yarn run ios  if You are using ios


text:
## Versioning
This package provides helpers and a config file to bust the client cache for your assets.
If you are using webpack or something similar, this is not needed.

## Installation
```shell
composer require habier/versioning
php artisan vendor:publish --provider="Habier\Versioning\AssetVersioningServiceProvider"
```

After this, you will find a new config file called **version.php** in your config folder.
This config file holds your global app version.

## Usage
```blade
<link href="{{ url_version('css/app.css') }}" rel="stylesheet">
<link href="{{ asset_version('css/app.css') }}" rel="stylesheet">
```

You can add specific version number too.
```blade
<link href="{{ url_version('css/app.css', 42) }}" rel="stylesheet">
<link href="{{ asset_version('css/app.css', 42) }}" rel="stylesheet">
```

repository: Habier/versioning

repo_name: Habier/versioning


text:
# flutter_auth_ui

A Flutter plugin for using the Firebase Auth UI with Dart in Flutter apps.
(not official plugin.)

## Getting Started

This plugin is wrapped Android/iOS's native plugin.

Check documents and setup your firebase project.

* iOS : <https://firebase.google.com/docs/auth/ios/firebaseui>
* Android : <https://firebase.google.com/docs/auth/android/firebaseui>

## How to use

```
// Set provider
final providers = [
  AuthUiItem.AuthEmail,
  AuthUiItem.AuthApple,
  AuthUiItem.AuthGithub,
  AuthUiItem.AuthGoogle,
  AuthUiItem.AuthMicrosoft,
  AuthUiItem.AuthYahoo,
];
final tosAndPrivacyPolicy = TosAndPrivacyPolicy(
  tosUrl: Terms of Service URL,
  privacyPolicyUrl: Privacy Policy URL,
);

final result = await FlutterAuthUi.startUi(
  items: providers,
  tosAndPrivacyPolicy: tosAndPrivacyPolicy,
  enableSmartLockForAndroid: (option) true(default)/false,
);
```
### Email link authentication

If you want to enable email link authentication on iOS, check `AuthUiItem.AuthEmail` doc.


text:
Artifactory NetApp SnapCenter User Plugin
=======================================

A REST to trigger NetApp SnapCenter backup using from Artifactory.
---
### Steps to trigger SpanCenter Backup

1. create **body.json** with SanpCenter url, token (Non expirable), policy and resourcegroups.
    ```
       {
         "url": "https://sc1.netapp.local:8146",
         "token": "Token",
         "policy": "Database_Daily",
         "resourcegroups": "db1_netapp_local_MySQL_artdb"
       }
    ```

2. Use following command to call Artifactory user plugin to trigger backup":

    `curl  -u admin:password -H "Content-Type: application/json" -X POST -d @body.json "http://localhost:8081/artifactory/api/plugins/execute/snapCenter"`

repository: jfrog/artifactory-user-plugins

gha_language: Groovy

repo_name: jfrog/artifactory-user-plugins


text:
---
title: 'New Google Slides Service'
subTitle: 'Trying out the new service provided in Google Apps Script'
author: jordan
categories:
  - Demonstrations
tags:
  - Projects
  - google apps script
  - classroom roster
  - google slides
  - presentations
youtube: 'https://www.youtube.com/watch?v=4Qk7BdSf9VM'
---

Google Apps Script now provides a simple way to integrate with slide decks!

<iframe width="560" height="315" src="https://www.youtube.com/embed/4Qk7BdSf9VM" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>

One of the problems that I am noticing is that there are no triggers associated with the SlidesApp service yet. It would be great if those start to get introduced. For example, if there is a trigger when a presentation starts you could create functions that run at the time of a presentation and play music or start a timer.

Check out my video above and let me know what you think! How would you use this great new tool? As always contact me on twitter, in the comments, or send a smoke signal into the ether and let's build tools for teachers!

branch_name: refs/heads/development


text:
# ionic-input-mask
Input mask for Ionic2 and upper versions.

<img src="https://raw.githubusercontent.com/EDumdum/ionic-input-mask/master/resources/ionic-input-mask.png" width="190px">

# Getting Started

## Installing
```bash
npm install ionic-input-mask --save
```

## Using
```typescript

# app.module.ts
import { InputMaskModule } from 'ionic-input-mask';
imports: [
    InputMaskModule,
]
```

```html
# *.html
<input-mask mask="+32 (0) 4__/__.__.__" allowedChars="0-9" type="tel" maskCharacter="_" tabindex="100"></input-mask>
```

### mask

**Mandatory**
Definition of the mask. maskCharacter *(default = '_')* will define the maximum length of the field and which characters will be replaced in the mask. Mask is not included in the return value, only input typed by the user.

### maskCharacter

*Optional*
Define which character in the mask should be replaced.
Default value is '_'.

### allowedChars

*Optional*
Define which characters are allowed in the field. Must be character range like in regular expression.
Ex:
- 0-9 -> Numbers only
- A-Z -> Letters only, in uppercase

If not defined, all characters are allowed.

### tabindex

*Optional*
Directly linked to ion-input field tabindex.

### type

*Optional*
Directly linked to ion-input field type.


text:
# Interactive neural network
This is an interactive neural network where you can see how it works and change multiple settings!

## Visit to experiment yourself:

NOT FOR MOBILE USERS!!!!

https://neuralnetworkmodel.000webhostapp.com/

## The website in action
![](https://github.com/marijusGood/Interactive-neural-network/blob/master/pictures/show.gif)

## About the project itself:
There are 3 loaded datasets: AND, OR and Iris flower datasets, press on the there buttons at the very top to load the datasets.

![](https://github.com/marijusGood/Interactive-neural-network/blob/master/pictures/datasets.PNG)

You can train this network with your own data, press on "Your own data" and below network diagram select input and output size.
Then write your own data into the table in the input fields and press "Add data to the table".

![](https://github.com/marijusGood/Interactive-neural-network/blob/master/pictures/yourOwn.PNG)

The canvas displays the neural network, in the middle of the node the bias is shown. If the weight between the nodes is positive it will be
red, the bigger the number, the more red it is. If the weight is blue then is is negative and the more blue it is, the bigger
the negative is. Also it shows which nodes and input layer(the arrows are pointing to the nodes) and which one is output layer(the arrows are
pointing from the nodes).

![](https://github.com/marijusGood/Interactive-neural-network/blob/master/pictures/canvas.PNG)

You can add more or less layers in an network or nodes in a layer.

![](https://github.com/marijusGood/Interactive-neural-network/blob/master/pictures/layers.PNG)

You have a whole set of parameters you can tweak to see which one dose what and train your model faster.

![](https://github.com/marijusGood/Interactive-neural-network/blob/master/pictures/parameters.PNG)

The table below shows inputs, expected outputs and predicted outputs.

![](https://github.com/marijusGood/Interactive-neural-network/blob/master/pictures/table.PNG)

The graph shows how this model preformed with each iteration.

![](https://github.com/marijusGood/Interactive-neural-network/blob/master/pictures/graph.PNG)

## About the code:
I used HTML, CSS and Javascript.
Everything is commented so you can go and take a look at it but I will give a quick summary of it.

[buttons.js](buttons.js) - it holds all of the code for responding to the buttons(I know right!?), it holds datasets, manipulates the data like normalization,
hides or shows specific parameters from the user when switching between datasets, changes the weight size. So when you press Iris dataset it will call functions
that change the table, redraw the network, regenerates the weights, displays correct labels for the new network and hides certain parameters.

[drawContent.js](drawContent.js) - it draws all of the graphics(I'm good at creating file names) and it modifies the table that shows how the network
is doing. Also it stores all of the variables.

[googleLineChart.js](googleLineChart.js) - makes a linear chart that shows networks loss over each iteration.

[neuralNetwork.js](neuralNetwork.js) - This makes all of the calculations. It generates the weights, dose the forward pass of the network, calculates the loss for the Google
graph, calculates the gradient and changes the new weights. It also dose forward pass or backpropagation dependent on what activation function is selected,
what mini-batch is selected, whats the networks size and the gradients momentum.

Author Marijus Gudiskis<EMAIL_ADDRESS>

repository: marijusGood/Interactive-neural-network

repo_name: marijusGood/Interactive-neural-network


text:
WebAssembly Dynamic Linking
===========================

This document describes the early plans for how dynamic linking of WebAssembly
modules might work.

Note: there is no stable ABI here yet.

# Dynamic Libraries

A WebAssembly dynamic library is a WebAssembly binary with a special custom
section that indicates this is a dynamic library and contains additional
information needed by the loader.

## The "dylink" Section

The "dylink" section is defined as:

| Field           | Type        | Description                    |
| ----------      | ----------- | ------------------------------ |
| memorysize      | `varuint32` | Size of the memory area the loader should reserve for the module, which will begin at `env.__memory_base` |
| memoryalignment | `varuint32` | The required alignment of the memory area, in bytes, encoded as a power of 2. |
| tablesize       | `varuint32` | Size of the table area the loader should reserve for the module, which will begin at `env.__table_base` |
| tablealignment  | `varuint32` | The required alignment of the table area, in elements, encoded as a port of 2. |

`env.__memory_base` and `env.__table_base` are `i32` imports that contain
offsets into the linked memory and table, respectively. If the dynamic library
has `memorysize > 0` then the loader will reserve room in memory of that size
and initialize it to zero (note: can be larger than the memory segments in the
module, if the dynamic library wants additional space) at offset
`env.__memory_base`, and similarly for the table (where initialization is to
`null`, i.e., a trap will occur if it is called). The allocated regions of the
table and memory are guaranteed to be at least as aligned as the library
requests in the `memoryalignment, tablealignment` properties. The library can
then place memory and table segments at the proper locations using those
imports.

The "dylink" section should be the very first section in the module; this allows
detection of whether a binary is a dynamic library without having to scan the
entire contents.

## Interface and usage

A WebAssembly dynamic library has some conventions for how it should be loaded
and used:

 * The module can import `env.memory` for memory that is shared with the
   outside. If it does so, it should import `env.__memory_base`, an `i32`, in
   which the loader will provide the start of the region in memory which has
   been reserved and zero-initialized for this module, as described earlier.
 * The module can import `env.table` for a table that is shared with the
   outside. If it does so, it should import `env.__table_base`, an `i32`, in
   which the loader will provide the start of the region in the table which has
   been reserved for this module, as described earlier.
 * The module can export a function called `__post_instantiate`. If it is so
   exported, the loader will call it after the module is instantiated, at a time
   when it is ready to be used. (Note: the WebAssembly `start` function is not
   sufficient in all cases due to reentrancy issues, i.e., the `start` function
   is called as the module is being instantiated, before it returns its exports,
   so the outside cannot yet call into the module.)
 * While exported functions are straightforward, exported addresses (i.e.,
   exported indexes of locations in memory or in the table) are exported
   *before* the loaded module can apply any relocation, since the module cannot
   add `__memory_base` before it exports them. Thus, the exported address is
   before relocation; the loader, which knows `__memory_base`, can then
   calculate the proper relocated and final address of those addresses.

## Implementation Status

Emscripten can load WebAssembly dynamic libraries using `dlopen` and access them
using `dlsym`, etc. (See `test_dlfcn_*` in the test suite for examples;
`test_dylink_*` are relevant as well.)

Emscripten can create WebAssembly dynamic libraries with its `SIDE_MODULE`
option, see [the wiki](https://github.com/kripken/emscripten/wiki/WebAssembly-Standalone).

repository: PoignardAzur/tool-conventions

repo_name: PoignardAzur/tool-conventions


text:
---
title: For Organisations
permalink: /take-action/organisations/
---

<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.13.0/css/all.min.css" rel="stylesheet">

 What can you do as an organisation?

Environmentally-friendly actions can start small. Consistently reducing the amount of energy, water, and paper our businesses use can make a huge difference. Going green on your company’s printing, air-conditioning, lighting, water usage and transport systems can have a huge accumulated impact. Learn about some eco tips below (external links):

Practise 3R

Boost Energy Efficiency

Encourage Recycling

Conserve Water

Build Organisational Awareness

Conscious Purchasing

Join Programmes

Singapore Packaging Agreement (SPA) and Packaging Partnership Programme (PPP): Programmes to reduce packaging waste

Energy Efficiency National Partnership (EENP): A voluntary partnership programme that helps corporations enhance their long-term business competitiveness and reduce their carbon footprint by becoming more energy-efficient.

Labelling Scheme: Singapore's leading environmental standard and certification mark that endorses consumer products with milder negative impact on the environment.

3R Programme for Hotels: A voluntary programme where participating hotels work with the Singapore Hotel Association and NEA to reduce waste.

Project Eco Office: A local certification scheme developed to promote environmentally-friendly offices, Project Eco-Office encourages management and staff working in offices to practise environmentally-friendly habits.

Happy Toilet Programme: The Happy Toilet Programme encourages organisations to have their toilet facilities audited for Happy Toilet standards.

Clean Singapore Learning Trail: Give back to the community by cleaning up the beach, and protecting its ecosystem.

Visits to Semakau Landfill and Incineration Plants: Learn first-hand about Singapore’s efficient waste disposal system.

Dengue Prevention Volunteer: Help educate and spread the awareness on dengue prevention to fellow residents through activities and house-to-house visits.

Climate Action Package: Look up courses under the Singapore Cooperation Programme and Climate Action Package.

Utilize Our Resources

-   [Educational Materials](https://www.nea.gov.sg/corporate-functions/resources/educational-materials/exhibits):
Brochures, posters, and other materials are available for download at the NEA website
-   [Food Waste Minimisation Guidebooks](https://www.nea.gov.sg/our-services/waste-management/3r-programmes-and-resources/food-waste-management):
Guidebooks developed by NEA and SFA for food retail, supermarkets and food manufacturers to reduce waste across the supply chain.
-   [3R Guidebooks](https://www.nea.gov.sg/our-services/waste-management/3r-programmes-and-resources/3r-guidebooks):
Step-by-step guides to implement 3R programmes in hotels, offices, shopping malls; as well as during Meetings, Incentives, Conferences & Exhibition (MICE) events.
-   [Guide to Implementing Environmentally-Friendly Best Practices for Events](http://www.mse.gov.sg/top/faqs/guide-to-environmentally-friendly-practices-for-events)

More Resources

repository: sarahanncheong/mse

repo_name: sarahanncheong/mse


text:
---
layout: post
title: JavaScript Design Patterns - Behavioral
---

# Observer Pattern

# Mediator Pattern

# Command Pattern

# References
[Practical Design Patterns in JavaScript](https://app.pluralsight.com/library/courses/javascript-practical-design-patterns)


text:
# API reference
[Home](./)

These API reference articles are available:
* [Overview](overview.md): an overview over the `Plotter.js` library.
* [Type definitions](types.md): a list of all types used in this documentation.
* [Diagram class](Diagram.md): a description of the `Diagram` class. **This article is incomplete.**
* [Point class](Point.md): a description of the `Point` class.
* [PointList class](PointList.md): a description of the `PointList` class.
* [Axis class](Axis.md): a description of the `Axis` class. **This article is incomplete.**
* [ImageComponent class](ImageComponent.md): a description of the `ImageComponent` class. **This article is incomplete.**
* [DataConsumer class](DataConsumer.md): a description of the `DataConsumer` class. **This article is incomplete.**
* [CanvasImage class](CanvasImage.md): a description of the `CanvasImage` class. **This article is incomplete.**

Also, you might want to check out these articles:
* [Getting Started Guide](getting-started.md): some instructions for new comers.
* [Building Plotter.js](build.md): learn how to build `Plotter.js` yourself.
* [Method chaining](method-chaining.md): a technique used in `Plotter.js`.


text:
# COVIINFO

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

## COVIINFO Deployed Link
click the link below to visit the website : [COVIINFO Link](https://group6-uot.github.io/uot-project1-group6/)

## Repository
click the link below to check the repository : [Github Repository Link](https://github.com/Group6-UoT/uot-project1-group6)

### Tech Used
    -HTML
    -CSS
    -JavaScript
    -jQuery
    -Server Side API's

>New Technology

    -Chart.js
    -Material UI

## Task lists
- [x] User can watch World wide and Canada wide Covid-19 information in textual and graphical representation.
- [x] User can choose any province Canada wide to see information on Covid-19.
- [x] COVIINFO provides facility to get latest news from all over the world on covid.
- [x] Scheduling of Covid vaccination appointment is also available.
- [x] Some important links (such as links quarantine rules, travelling rules and so on) are also available in this website.

## Preview
![alt screenshot1](/assets/images/img1.png)
![alt screenshot1](/assets/images/img2.png)
![alt screenshot1](/assets/images/img3.png)
![alt screenshot1](/assets/images/img4.png)
![alt screenshot1](/assets/images/img5.png)

## Created By
* [Sonali Pandey](https://github.com/sonali-pandey)
* [Matilda Bakare](https://github.com/matildabakare)
* [Kirti Patel](https://github.com/kirti18patel)
* [Kruti Patel](https://github.com/krutipatel07)
* [Sudhanshu Batra](https://github.com/sudbatra)

© [group6-uot]()


text:
# LL4MA Robots Gazebo
This package allows for simulation of robots used by the [Utah Learning Laboratory for Manipulation Autonomy (LL4MA Lab)](https://robot-learning.cs.utah.edu) at the University of Utah. We use the [Gazebo simulator](http://gazebosim.org/) with [DART](https://dartsim.github.io/) as the physics engine.

***

## Installation
Clone this repository into the `src` folder of a catkin workspace as usual

    git clone https://bitbucket.org/robot-learning/ll4ma_robots_gazebo # https
    git clone git@bitbucket.org:robot-learning/ll4ma_robots_gazebo.git # SSH

We have a few internal dependencies you will need in order to use this package. We have created an installation script that utilizes [wstool](http://wiki.ros.org/wstool) (`sudo apt install python-wstool` if you don't have it). Simply navigate to the root of this repository and execute

    ./install_dependencies.sh

More detailed documentation on the dependencies and how the install script can be configured is available on [our wiki](https://robot-learning.cs.utah.edu/ll4ma_robots_gazebo#package_installation).

## Usage
Each robot has a single launch file that serves as the user interface to selecting different options for simulating that robot. For example, the KUKA LBR4 can be launched with

    roslaunch ll4ma_robots_gazebo lbr4.launch

This will launch the LBR4 arm model in simulation with controllers enabled but with no end-effector attached to it. If for some reason you don't want the controllers running, use

    roslaunch ll4ma_robots_gazebo lbr4.launch control:=false

To load the LBR4 for control with the Allegro hand attached, use

    roslaunch ll4ma_robots_gazebo lbr4.launch end_effector:=allegro

To test that the controllers are working properly, you can run `joint_tester.py`, which builds a simple joint trajectory and executes it on the robot:

    rosrun ll4ma_robots_gazebo joint_tester.py

For more detailed usage instructions, including a comprehensive description of launch file parameters, see [our wiki page](https://robot-learning.cs.utah.edu/ll4ma_robots_gazebo).

## Topics
| Topic                        | Description                                                                                | Type                     |
|------------------------------|--------------------------------------------------------------------------------------------------------------------------|--------------------------|
| `/lbr4/joint_cmd`            | Control commands sent to this topic are split by joint state splitter and sent to ROS controller for each LBR4 joint.    | `sensor_msgs/JointState` |
| `/lbr4/joint_des_cmd`        | Send desired control commands (e.g. computed joint torques) to this topic for LBR4.                                      | `sensor_msgs/JointState` |
| `/lbr4/joint_states`         | LBR4 joint states are published to this topic.                                                                           | `sensor_msgs/JointState` |
| `/allegro/joint_cmd`         | Control commands sent to this topic are split by joint state splitter and sent to ROS controller for each Allegro joint. | `sensor_msgs/JointState` |
| `/allegro/joint_des_cmd`     | Send desired control commands (e.g. computed joint torques) to this topic for Allegro.                                   | `sensor_msgs/JointState` |
| `/allegro/joint_states`      | Allegro joint states are published to this topic.                                                                        | `sensor_msgs/JointState` |
| `/lbr4_allegro/joint_states` | Combined joint states for LBR4 and Allegro.                                                                              | `sensor_msgs/JointState` |

## Acknowledgement
The URDF for the KUKA LBR4 was modified by Antoine Hoarau<EMAIL_ADDRESS>to work with Gazebo and DART.