text:
# bateau

[![Build Status](https://travis-ci.org/jawher/bateau.svg?branch=master)](https://travis-ci.org/jawher/bateau)
[![GoDoc](https://godoc.org/github.com/jawher/bateau?status.svg)](https://godoc.org/github.com/jawher/bateau)

Docker ps on steroids, aka rich querying language for filtering docker containers and images

## Examples:

Find all containers created more than 2 weeks ago which are not running, except for the container named `precious`,
and delete them:

```
$ bateau 'created > 2w & !running & name!=precious' | xargs docker rm -fv
```

Find all containers with either a `org/web-app` image, or whose name container `my-app` or with a `role` label set to `web`,
 and which exited with a non-zero code, and pipe them to docker inspect.

```
$ bateau '(image=org/web-app | name~my-app | label.role=web) & exit!=0' | xargs docker inspect

```

Find all images weighing more than 300MB which were created more than 2 months ago or which were built by docker 1.5 or 1.6:

```
$ bateau -i 'size>300MB & (created > 2M | docker_version~1.5 | docker_version~1.6)'
```

## Motivation

The default `docker ps` command has a couple of shortcomings:

* Inconsistent handling of invalid filtering keys. For example, `docker images` will reject unknown fields, whereas `docker ps` would not.
* No handling of invalid syntax: `docker ps` will accept  `"a & b.c=42"` as a filter without complaining
* No support for other operators than `=`
* Due to the previous point, `docker ps` and co need to expose various flags (`--before`, `--since`, ...) to implement features which could have been implemented as regular filter if more operators were supported, e.g. `>`, `<`, or `before` ...
* Filters can only be combined using the `and` boolean operation. there is no way to combine them using `or`. It is not possible to retrieve in one-shot containers having one of two different labels for example.
* Filters cannot be negated. It is not possible to retrieve the containers without a specific label for example.

## Usage

```
Usage: bateau [-e] [-c|-i] QUERY

Docker ps on steroids

Arguments:
  QUERY=""     The containers filtering query

Options:
  -e, --endpoint=""       The docker socket path or TCP address
  -c, --containers=true   Filter on containers
  -i, --images=false      Filter on images
```

## Query syntax

### Conditions

Conditions can be written as just a field name, e.g.:

```
running
```

or:

```
label.arch
```

For boolean fields.
Most fields require an operator and a value.

Supported operators are:

* `=`: strict equal: `name=container1`
* `~`: like operator: case insensitive string contains: `name~tAiNe`
* `!=`: not equal: `exit!=0`
* `!~`: not like: `image!~db`
* `>`, `>=`, `<` and `<=`: greater than, greater than or equal, less than and less than or equal: `size>15MB`, `created<=1d`, ...

### Negation
You can use the `!` operator to negate an expression: `!running`, `!exit=42`

### Or/And
Expressions can be combined together using the `|` and `&` boolean operators: `running & created>1d`, `size>10MB | name~junk`

### Parenthesis
Expressions can be wrapped inside parenthesis to control the operator precedence: `!(running | paused)`, `image~server & (running | exit=0)`

## Supported fields:
### Containers

|     field      |       supported operators       |                          desc                         |
| -------------- | ------------------------------- | ----------------------------------------------------- |
| `running`      | <none>                          | matches running containers                            |
| `paused`       | <none>                          | matches paused containers                             |
| `restarting`   | <none>                          | matches restarting containers                         |
| `label.<name>` | <none>                          | matches containers with a `<name>` label`             |
| `label.<name>` | `=`, `~`, `!=`, `!~`            | match against the label value                         |
| `id`           | `=`, `~`, `!=`, `!~`            | match against the container id                        |
| `name`         | `=`, `~`, `!=`, `!~`            | match against the container name                      |
| `image`        | `=`, `~`, `!=`, `!~`            | match against the container image                     |
| `cmd`          | `=`, `~`, `!=`, `!~`            | match against the container command                   |
| `entrypoint`   | `=`, `~`, `!=`, `!~`            | match against the container entrypoint                |
| `exit`         | `=`, `!=`, `>`, `>=`, `<`, `<=` | match against the container exit code                 |
| `created`      | `=`, `!=`, `>`, `>=`, `<`, `<=` | match against the container age   (since creation)    |
| `exited`       | `=`, `!=`, `>`, `>=`, `<`, `<=` | match against the duration since the container exited |

### Images

|      field       |       supported operators       |                      desc                      |
| ---------------- | ------------------------------- | ---------------------------------------------- |
| `label.<name>`   | <none>                          | matches containers with a `<name>` label`      |
| `label.<name>`   | `=`, `~`, `!=`, `!~`            | match against the label value                  |
| `id`             | `=`, `~`, `!=`, `!~`            | match against the image id                     |
| `comment`        | `=`, `~`, `!=`, `!~`            | match against the image comment                |
| `author`         | `=`, `~`, `!=`, `!~`            | match against the image author                 |
| `arch`           | `=`, `~`, `!=`, `!~`            | match against the image architecture           |
| `docker_version` | `=`, `~`, `!=`, `!~`            | match against the image docker version         |
| `cmd`            | `=`, `~`, `!=`, `!~`            | match against the image command                |
| `entrypoint`     | `=`, `~`, `!=`, `!~`            | match against the image entrypoint             |
| `size`           | `=`, `!=`, `>`, `>=`, `<`, `<=` | match against the image size                   |
| `created`        | `=`, `!=`, `>`, `>=`, `<`, `<=` | match against the image age   (since creation) |

## Value formats
### Durations
The `created` and `exited` fields accept values using the duration syntax:

```
1s
2h 40m
30w
```

A duration is a sequence of one or more number and unit pairs.
The supported units are:

* `ms` for milliseconds
* `s` for seconds
* `m` for minutes
* `h` for hours
* `d` for days (24 hours)
* `w` for weeks (7 days)
* `M` or `months` for months (30 days)
* `y` for years (365 days)

### Sizes
The `size` field accepts values using the size syntax:

```
12
400MB
1GB 250MB 14Kb
```

A size is a sequence of one or more number and unit pairs.
The supported units are:

* <none> for bytes
* `kb` or `Kb`: 1000 bytes
* `KB`: 1024 bytes
* `Mb`: 1000Kb
* `MB`: 1024KB
* `Gb`: 1000Mb
* `GB`: 1024MB

## License

This work is published under the MIT license.

Please see the `LICENSE` file for details.

repository: jawher/bateau

repo_name: jawher/bateau


text:
# Home Weather Station

Arduino based DIY weather station which measures temperature, pressure and humidity in define time intervals and sends the data to Google Sheet. Later, the data can be read by an app on your computer or phone (in development).

## Weather station - main components
* Arduino Uno
* ESP-01 - Wi-Fi ESP8266 module
* BMP180
* DHT22 module
* Step-down power module or other source of 3.3 V to power ESP-01 (Arduino cannot handle it)

## Communication with ESP-01
* Connect ESP-01 and Arduino Uno as in the picture below to communicate with ESP-01 module through your Arduino board

[![Connection scheme](https://raw.githubusercontent.com/AlbertRtk/home_weather_station/master/sketch/sketch_esp_communication.jpg "Connection scheme")](https://raw.githubusercontent.com/AlbertRtk/home_weather_station/master/sketch/sketch_esp_communication.jpg "Connection scheme")

* Power ESP-01 and connect Arduino board via USB cable to your computer
* Run Arduino IDE and open Tools > Serial Monitor
* Choose "Both NL & CL" and Baud Rate 115200
* Type command `AT`. You should get `OK` response
* Change ESP-01 Baud Rate
```sh
AT+UART_DEF=9600,8,1,0,0
```
* Switch Serial Monitor to 9600 baud
* Set connection with your Wi-Fi. Connection will be saved in ESP8266 memory and set automatically after restart of the module
```sh
AT+CWMODE=3
AT+CWJAP="your wifi ssid","your wifi password"
```
* You can check if setting are saved by restarting the module. Connection to Wi-Fi should be established automatically now
```sh
AT+RST
```

## Weather station

[![Weather station scheme](https://raw.githubusercontent.com/AlbertRtk/home-weather-station/master/sketch/sketch_station.jpg "Weather station scheme")](https://raw.githubusercontent.com/AlbertRtk/home-weather-station/master/sketch/sketch_station.jpg "Weather station scheme")

license: MIT

branch_name: refs/heads/master

extension: md

license_type: permissive


text:
# Getting Started with Books app

This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app) Typescript template.

## Available in production

Deployed with [Vercel](https://vercel.com/) to https://books-app-tau.vercel.app/.

## Available scripts

In the project directory, you can run different tasks with npm.
If you don't have npm installed : [install Node and npm](https://www.npmjs.com/get-npm).

### `npm start`

Runs the app in the development mode.\
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.

The page will reload if you make edits.\
You will also see any lint errors in the console.

### `npm test`

Launches the test runner in the interactive watch mode.\
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.

### `npm run build`

Builds the app for production to the `build` folder.\
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.\
Your app is ready to be deployed!

See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.

## Learn More

You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).

## What was done

- Display the given list of bookshelves (no pagination).
- Display the list of forms for each selected bookshelf thanks to pagination : previous and next buttons displayed, number of pages computed, grid.
- Display information about each form (book) in a list of forms : cover, short title, authors if any, price.
- Add links to Glose's authors public pages.
- Create Redux model for : bookshelves, forms and authors (user is not handled).
- Reuse some of the existing CSS from Glose example page.
- Use given API services.
- Make a minimum error handling.
- Technical :
  - Normalize Redux state and use immer if necessary for immutability.
  - Use Redux dev tools, chrome developer console and [Insomnia](https://insomnia.rest/) to debug.
  - Use css modules and scss for stylesheets.
  - Use typescript for typing.
  - Use react-testing-library for testing.
  - Use [funtch](https://github.com/ViBiOh/funtch) for http requests.
  - Use VsCode IDE to develop this project and github to manage the source code.

## What could have been done

- Add more tests : unit, integration, E2E with cypress.
- Add more features :
  - Show average rate for each form if any.
  - Sort and filter the list of forms displayed.
  - Allow different types of list display (grid, list).
  - Display forms count next to bookshelf names.
  - Show long form or bookshelf titles on mouse hover thanks to a tooltip.
  - Handle user information and display.
- Handle forms that appear in more than one bookshelf.
- Add design system components : typography, pagination and loading.
- Handle different languages.
- Handle different currencies.
- Cancel requests if the user goes quickly from page to page.
- Handle form covers that can not be loaded and optimize covers loading.
- Handle errors and display a better feedback to the user.
- Handle api errors : inconsistent number of forms per page or downtime if any.
- Deploy to production and check npm tasks for CI.
- Change Favicon.
- Improve performance and study web vitals.
- Technical :
  - Study if Map, Set and Reselect could have been usefull.

  - Do not use global variable for forms count per page.
  - Improve file paths to make it more readable.

## Issues to fix

**Npm Audit Manual Review**

Some vulnerabilities require attention to resolve

Package : immer

Patched in 8.0.1/

Dependency react-scripts > react-dev-utils > immer

**Lighhouse report**

Performance : 54

Accessibility : 95

Best practices : 93

SEO : 100

repository: eponae/books-app

gha_language: TypeScript

gha_license_id: MIT

repo_name: eponae/books-app


text:
# airflow-ecs
Setup to run Airflow in AWS ECS containers

## Requirements

### Local
* Docker

### AWS
* AWS IAM User for the infrastructure deployment, with admin permissions
* [awscli](https://aws.amazon.com/cli/), intall running `pip install awscli`
* [terraform](https://www.terraform.io/downloads.html)
* setup your IAM User credentials inside `~/.aws/credentials`
* setup these env variables in your .zshrc or .bashrc, or in your the terminal session that you are going to use

  export AWS_ACCOUNT=your_account_id
  export AWS_DEFAULT_REGION=eu-east-1 # it's the default region that needs to be setup also in infrastructure/config.tf

## Local Development
* Generate a Fernet Key:

  pip install cryptography
  export AIRFLOW_FERNET_KEY=$(python -c "from cryptography.fernet import Fernet; print(Fernet.generate_key().decode())")

  More about that [here](https://cryptography.io/en/latest/fernet/)

* Start Airflow locally simply running:

  docker-compose up --build
  </pre

If everything runs correctly you can reach Airflow navigating to [localhost:8080](http://localhost:8080).
The current setup is based on [Celery Workers](https://airflow.apache.org/howto/executor/use-celery.html). You can monitor how many workers are currently active using Flower, visiting [localhost:5555](http://localhost:5555)

## Deploy Airflow on AWS ECS
To run Airflow in AWS we will use ECS (Elastic Container Service).

### Deploy Infrastructure using Terraform

cd infrastructure
terraform get
terraform init -upgrade;
terraform apply

By default the infrastructure is deployed in `eu-east-1`.

When the infrastructure is provisioned (the RDS metadata DB will take a while) check the if the ECR repository is created then run:

bash scripts/push_to_ecr.sh airflow-dev

By default the repo name created with terraform is `airflow-dev`
Without this command the ECS services will fail to fetch the `latest` image from ECR

### Deploy new Airflow application
To deploy an update version of Airflow you need to push a new container image to ECR.
You can simply doing that running:

./scripts/deploy.sh airflow-dev

The deployment script will take care of:
* push a new ECR image to your repository
* re-deploy the new ECS services with the updated image

## TODO
* Create Private Subenets
* Move ECS containers to Private Subnets
* Use ECS private Links for Private Subnets
* Improve ECS Task and Service Role

repository: feribg/aws-ecs-airflow

repo_name: feribg/aws-ecs-airflow


text:
# vimrc

My vim configuration, mainly used for Golang development.

# Requirement

- Golang 1.8+ installed and env setup

# Install

1. Clone this repo to some path `/path/to/this/repo`
2. Make a symlink: `~/.vim` -> `/path/to/this/repo`; Make sure you backup your original `.vim` and `.vimrc`
3. Open a vim and run `:PlugInstall` to install plugins and tools used by plugins

# Installed Plugins

- https://github.com/junegunn/vim-plug
- https://github.com/sheerun/vimrc
- https://github.com/itchyny/lightline.vim
- https://github.com/mhinz/vim-startify
- https://github.com/jiangmiao/auto-pairs
- https://github.com/Shougo/neocomplete.vim
- https://github.com/sheerun/vim-polyglot
- https://github.com/fatih/vim-go
- https://github.com/jamessan/vim-gnupg

repository: huangjunwen/vimrc

repo_name: huangjunwen/vimrc


text:
# Building this project

To build this project you require a compatible version of visual studio, from there a build should simply work.

To generate our builds we use the commands below, these can be customised to meet your needs if necessary.

### Windows Exe including runtime (no dependencies)

```
dotnet publish -r win-x64 -c Release /p:PublishSingleFile=true /p:PublishTrimmed=true
```
This command results in several files in the bin\win-x64\publish folder. Only the .exe is required for distribution.

### Windows Exe without runtime (requires .Net Core 3.0)

```
dotnet publish -r win-x64 -c Release /p:PublishSingleFile=true --self-contained false
```

This command results in several files in the bin\win-x64\publish folder. Only the .exe is required for distribution.

repository: genericitperson/BackblazeUploader

repo_name: genericitperson/BackblazeUploader


text:
![housecss-logo](https://cloud.githubusercontent.com/assets/6453968/19875670/f88e8530-9f8b-11e6-9c4f-defa8611d7da.png)

# housecss
> A Functional CSS Library Built for Rapid Iteration. Created and maintained by
the [House House](http://house-house.design/) folks — [@bengroulx](https://github.com/bengroulx) and [@durfee](https://github.com/durfee/).

⚠ WIP Warning: This is certainly a work in progress. We wouldn't recommend using this in a production project yet. Expect a proper release in the next couple months as soon as we get some time.

## Usage
Via npm: (yarn coming soon)
```bash
$ npm install --save housecss
```

via unpkg:
```html
<link rel="stylesheet"<EMAIL_ADDRESS>```

## Using the Framework
Welcome to housecss! This functional CSS framework should be used as a foundation for you and your team to get set up and working on a project as quickly as possible. Whether you are expanding housecss locally, or contributing back upstream to the housecss repo, we encourage you write CSS according our code guidelines and conventions:

1. Write CSS as if someone is using it to learn how code. It needs to be sensible and learnable for new front-end developers and designers — everyone should be able to get going with housecss speedily. We achieve this by writing well-documented code.
2. Housecss is content-agnostic, meaning HTML and CSS are completely separate from one another. If you hide all styles from your template, the HTML should be well-structured and semantically correct, formatted and arranged in a logical hierarchy. That also means classes should be self-documenting and independent of elements. The exception is components, which are directly coupled to markup or other styles.
3. Follow the [Code of Conduct](https://github.com/househouse/housecss/blob/master/code-of-conduct.md) at all times.

Note: When contributing back upstream, run postcss with: `npm run build && npm run minify`. Additionally, be sure to check it with [CSS Stats](http://cssstats.com/stats?link=https%3A%2F%2Fraw.githubusercontent.com%2Fhousehouse%2Fhousecss%2Fmaster%2Fcss%2Fmain.css) to make sure the stylesheet is still maintainable.

## Future things
* Demo site
* Better docs

More to come
✌✌🏻✌🏼✌🏽✌🏾✌🏿

repository: househouse/housecss

gha_language: CSS

repo_name: househouse/housecss


text:
# notes

## Arch/Manjaro

`ln -s /usr/lib/libffi-3.2.1/include/ffi*.h /usr/include`

## Weird errors

Consistently reproducible `Fatal Python error: _Py_HashRandomization_Init: failed to get random numbers to initialize Python` when using `pip` to install `dulwich`.

[This StackOverflow answer](https://stackoverflow.com/a/64706392) and [this GitHub comment](https://github.com/appveyor/ci/issues/1995#issuecomment-546325062) both helped understand that I forgot to update the environment instead of overwriting it, in one spot.

## Custom fonts can be installed using

<https://github.com/MicksITBlogs/PowerShell/blob/master/InstallFonts.ps1>

## Windows GPG setup is missing some steps

Definitely need to formalize the startup process that includes a:

```powershell
del -Recurse -Force "$(gpgconf --list-dirs agent-ssh-socket)" -ErrorAction Continue
```

[docs on how to continue and stop on errors may be helpful](https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_commonparameters?view=powershell-7.1)

Also, sometimes if `gpg-agent` and `wsl-ssh-pageant` appear to be running, but with the card inserted, a `git commit -S` produces:

```
gpg: signing failed: Not confirmed
gpg: signing failed: Not confirmed
error: gpg failed to sign the data
fatal: failed to write commit object
```

And the pinentry gui keeps popping up asking for the card to be inserted, and `gpg --card-status` shows:

```
gpg: OpenPGP card not available: General error
```

I've found `gpgconf --reload` usually does the trick to restart `scdaemon`, and the others. Then `gpg --card-status` shows it's inserted.

This usually happens if I load everything, then try to use the card, all before it's inserted.

repository: mawillcockson/dotfiles

branch_name: refs/heads/main

repo_name: mawillcockson/dotfiles


text:
# Javascript Quiz
---------------------------------------------------------------
#### This is a simple online JavaScript quiz, 25/September/2018
---------------------------------------------------------------
#### Author
  **Benson w. Okwara**
---------------------------------------------------------------
## DESCRIPTION
Once you click the image on the front-end page, it will launch you to simple JavaScript questions.They are 6 in numbers and each question carries (16 mks). After successful completion of the questions, scores will be tabulated and the results will be displayed on a new page in %.
## INSTALLATION REQUIREMENTS
Your device needs to have the following Installations:
* Smartphone or laptop
* git clone  https://benokwara.github.io/Quiz-Board
* atom
* code
* Internet access
## KNOWN BUGS
  none
## TECHNOLOGIES USED
* HTML
* CSS
* jQuery
* JavaScript (I have used, _Bootstrap_ thumbnail as a link to access the quiz section)

## BDD

| Behaviour   |      Input     |  Output |
|----------|:-------------:|------:|
| User clicks the front end-image |   :point_up_2:    |   Will be launched to the quiz |
| User answers no question | 0,0,0,0,0,0 |    _HI THERE! HERE'S WHAT YOU SCORED: NaN_ |
| User answers One question correct | 0,0,16,0,0,0 |    _HI THERE! HERE'S WHAT YOU SCORED: 16%_ |
| User answers Two questions correct | 16,0,0,0,0,16 |    _HI THERE! HERE'S WHAT YOU SCORED: 32%_ |
| User answers 3 questions correct | 0,16,0,0,16,16 |    _HI THERE! HERE'S WHAT YOU SCORED: 48%_ |
| User answers 4 questions correct | 16,0,16,0,16,16 |    _HI THERE! HERE'S WHAT YOU SCORED: 64%_ |
| User answers 5 questions correct | 16,0,16,16,16,16 |    _HI THERE! HERE'S WHAT YOU SCORED: 80%_ |
| User answers all questions correct | 16,16,16,16,16,16 |    _HI THERE! HERE'S WHAT YOU SCORED: 96%_ |

## SUPPORT AND CONTACT CHANNELS
Anyone with questions to ask, ideas or concerns, you can hit me-up
:phone:<PHONE_NUMBER>    :inbox_tray<EMAIL_ADDRESS>
### LICENSE
[MIT License](https://choosealicense.com/licenses/mit/#)

__copyright :copyright: 2008 gen.co.__

repository: BenOkwara/Quiz-Board

repo_name: BenOkwara/Quiz-Board


text:
# Notifications in uw-frame

## User-facing content

When you create a notification for uw-frame, its content will be displayed to users in a number of ways.

### Notification bell

On medium and large screens, a bell icon button containing the number of unseen notifications appears in the application's top bar. Clicking the button
brings users to the notifications page for a more detailed view.

[![notification bell in top bar](./img/notifications/top-bar-bell.png)](img/notifications/top-bar-bell.png)

On small screens, a small bell icon without the notification count appears on top of the mobile menu button.

[![notification bell on mobile](./img/notifications/mobile-bell.png)](img/notifications/mobile-bell.png)

### Mobile menu link

In addition to the bell icon, the mobile menu contains a link to the notifications page that also displays the number of unseen notifications.

[![mobile menu notifications link](./img/notifications/mobile-link.png)](img/notifications/mobile-link.png)

### Priority notifications

For critical notifications that require a higher degree of visibility, notifications can be designated as "priority" and will appear more prominently, fixed above the
application top bar. In cases when the user has more than one priority notification to view, a generic message will be displayed, featuring the priority notifications
count and a link to the notifications page.

[![priority notification](./img/notifications/priority.png)](img/notifications/priority.png)

### Notifications page

On the notifications page, users can view their notifications, dismiss them, and follow calls to action. They can also click the
'Dismissed' tab to view notifications they've previously dismissed.

Priority notification float to the top of the list and appear with a small icon to the left of the notification's content.

[![notifications page](./img/notifications/notifications-page.png)](img/notifications/notifications-page.png)

## Technical implementation

Notifications depend on a JSON feed containing certain attributes and flags. See the [configuraton](configuration.md) doc for information about how to
point uw-frame to your desired feed.

### Example notification

*Note: All notifications must be contained within the `notifications` array.*

```json
{
  "notifications": [
    {
      "id": 1,
      "groups" : ["Users - Service Activation Required"],
      "title"  : "You need to modify your NetID account to activate essential UW Services.",
      "actionURL" : "https://www.mynetid.wisc.edu/modify",
      "actionAlt" : "Activate Services",
      "dismissable" : true,
      "priority" : false
    }
  ]
}
```

**Attribute breakdown**

- **id**: A unique number to identify the notification. This is used for tracking dismissed/un-dismissed state as well as the sort order on the notifications page.
- **groups**: An attribute to optionally show notifications only to specific groups (ex. Manifest groups, uPortal groups). **Must contain at least one value**. Using the "Everyone" group will make
your notification visible to all users. Contact your portal development team for more information about group filtering.
- **title**: The text to be displayed as the notification's main content. **Best practices:**
    - Be concise! Try to limit your notification's title to ~140 characters. Shorter titles improve click-through and are less likely to cause display issues on smaller screens.
    - Use general language and avoid pronouns for broadly visible notifications that don't pertain to specific users' needs (ex. "City of Madison - Declared Snow Emergency").
    - Use the word "You" when the group filtering for a notification is somewhat specific (i.e. Users with unactivated accounts).
- **actionURL**: A URL where users can get more information or respond to calls to action.
- **actionAlt** (*optional*): Applies an aria-label to the notification title. Use this if vision-impaired users might need additional context to understand your notification.
- **dismissable**: Set to true if users should be able to dismiss the notification from their list. This also works for dismissing priority notifications from their fixed position above the top bar.
This should almost always be true.
    - **Example "false" use case**: In some cases, following through on a notification's call to action could result in that notification going away on its own. For example, you may have a notification only visible to a group called
    "Users - Account Activation Required," which calls on those users to activate their accounts. Upon following through, a user would be removed from that group and the notification would be no longer visible. In this example, the call
     to action is reasonably important, and the notification should stick around until the user takes the desired action.
- **priority**: Set to true if the notification is of critical importance. The visibility of the notification will be amplified throughout the UI. **This feature should be used sparingly.**

### Action buttons

If your notification would lead to a page with more links or calls to action, you can save your users some clicks by adding the `actionButtons` attribute to its configuration.
Action buttons can also be used to call more attention to the `actionURL`.

```json
{
  "id": 1,
  ...
  ...
  "actionButtons" : [
    {"label": "Take survey", "url": "/example/survey", "target": ""},
    {"label": "Learn more", "url": "/example/learnMore", "target": "_blank"}
  ]
}

```

**Action button attributes**

- **label**: Text to display. This should be limited to a maximum of three words.
- **url**: A url for the action
- **target** (*optional*): The `target` attribute for the button's `<a>` tag (ex. "_blank", "_self", etc)

repository: plumedsi/uw-frame

repo_name: plumedsi/uw-frame


text:
# Coniothyrium oryzivorum Hara SPECIES

#### Status
ACCEPTED

#### According to
Index Fungorum

#### Published in
Diseases of the Rice Plant (Japan) 161 (1939)

#### Original name
Coniothyrium oryzivorum Hara

### Remarks
null

repository: mdoering/backbone

repo_name: mdoering/backbone


text:
# Build a Lightweight Docker Container For Android Testing

[![Docker Hub](https://img.shields.io/badge/Docker%20Hub-info-blue.svg)](https://hub.docker.com/r/codecaigicungduoc/android-container/)
[![Docker Stars](https://img.shields.io/docker/stars/thyrlian/android-sdk.svg)](https://hub.docker.com/r/codecaigicungduoc/android-container/)
[![Docker Pulls](https://img.shields.io/docker/pulls/thyrlian/android-sdk.svg)](https://hub.docker.com/r/codecaigicungduoc/android-container/)
[![Build Status](https://travis-ci.com/fastphat/android-container.svg?branch=master)](https://travis-ci.com/fastphat/android-container)

# Goals

* No Android Studio/GUI applications required.
* Android emulator runs on a Docker container.
* Accelerates build speed and stablize testing process, especially UI Tests.
* Has ability to cache Gradle distribution and dependencies.

# Gradle
You can either use Gradle Wrapper or Local Installation but first option is recommended because of following reasons.

* Reliable: Different users get the same result on any give gradle version.
* Configurable: Say that to update new gradle version to different users and execution environments (IDE, CI machine, etc), you only need to edit the config file, gradl wrapper will take care the rest.

### Get the idea of Gradle Wrapper
Gradle wrapper is a script that allow you to run the build with predefined version and settings. These distribution information is stored in `gradle/wrapper/gradle-wrapper.properties`

![gradle wrapper properties](https://github.com/fastphat/android-container/blob/master/images/gradle-wrapper.png?raw=true)

To change the version of gradle wrapper, grab one at [https://services.gradle.org/distributions/](https://services.gradle.org/distributions/) and update `distributionUrl` accordingly.

### Speed up build with gradle caching
By default all files downloaded under docker container doesn't persist if that container is removed. Therefore, gradle needs to download dependencies for every build, including gradle distribution and app libraries.

To prevent that behavior, Docker offers a solution called [Volume](https://docs.docker.com/storage/). Volumes are typically directories or files on host filesystem and are accessible from both container and host. They will not be removed after the container is wiped out.

The Gradle cached files are by default located under `GRADLE_USER_HOME` ( `/` ), so you can keep them there and move to another director. Docker will persist them as long as you define a volume for that directory.

```
ENV GRADLE_USER_HOME=/cache
VOLUME $GRADLE_USER_HOME
```

![docker volume](https://github.com/fastphat/android-container/blob/master/images/docker-volume.png?raw=true)

Ok. Looks good, check out these directories to see how things are wired up on host machine:

- On Macos: `screen ~/Library/Containers/com.docker.docker/Data/vms/0/tty`
- On Linux: under `~/var/lib/docker/volumes`

Some useful commands for Docker volume:

* To list all volumes are being use: `docker volume ls`
* To get detailed information of a specific volume, `docker volume inspect [volume_id]`

### Non-cached vs cached gradle dependencies

55s instead of 4m 25s for doing the same task. Ok, I have 3 mins to make a cup of coffee ☕☕

![build time comparision](https://github.com/fastphat/android-container/blob/master/images/build-time.png?raw=true)

# Emulator (x86 or ARM)

![warning emulator](https://github.com/fastphat/android-container/blob/master/images/arm.png?raw=true)

You probably see this prompt when booting an ARM-based emulator. They were old and deprecated since Android SDK Level 25. In the contrary, x86 (or x86_64) emulators are 10x faster. However, it requires your host to have hardware acceleration (HAXM on Mac & Windows, QEMU on Linux).

I won't go too detail about architecture defination but focus more on improving the stability and perfomance of Android Emulator when perfoming UI tests.

### Ability to run UI Test on any host machine
The script below simply checks whether host system supports Hardware Accelerator and KVM to run x86 emulator rather than ARM.

```shell
  cpu_support_hardware_acceleration=$(grep -cw ".*\(vmx\|svm\).*" /proc/cpuinfo)
  kvm_support=$(kvm-ok)

  emulator_name=${EMULATOR_NAME_ARM}
  if [ "$cpu_support_hardware_acceleration" != 0 ] && [ "$kvm_support" != *"NOT"* ]; then
    emulator_name=${EMULATOR_NAME_x86}
  fi
```

### Reduce flaky tests
Disable animation when Android emulator is fully loaded and ready to use.

```shell
#!/bin/bash

function wait_emulator_to_be_ready() {
  cpu_support_hardware_acceleration=$(grep -cw ".*\(vmx\|svm\).*" /proc/cpuinfo)
  kvm_support=$(kvm-ok)

  emulator_name=${EMULATOR_NAME_ARM}
  if [ "$cpu_support_hardware_acceleration" != 0 ] && [ "$kvm_support" != *"NOT"* ]; then
    emulator_name=${EMULATOR_NAME_x86}
  fi

  adb devices | grep emulator | cut -f1 | while read line; do adb -s $line emu kill; done
  emulator -avd "${emulator_name}" -verbose -no-boot-anim -no-window -gpu off &
  boot_completed=false
  while [ "$boot_completed" == false ]; do
    status=$(adb wait-for-device shell getprop sys.boot_completed | tr -d '\r')
    echo "Boot Status: $status"

    if [ "$status" == "1" ]; then
      boot_completed=true
    else
      sleep 1
    fi
  done
}

function disable_animation() {
  adb shell "settings put global window_animation_scale 0.0"
  adb shell "settings put global transition_animation_scale 0.0"
  adb shell "settings put global animator_duration_scale 0.0"
}

wait_emulator_to_be_ready
sleep 1
disable_animation

```

Some additional adb commands that helps you avoid flaky tests in some common cases:

```shell
# Disable soft keyboard
adb shell settings put secure show_ime_with_hard_keyboard 0
# Set the default locale
adb shell am broadcast -a com.android.intent.action.SET_LOCALE --es com.android.intent.extra.LOCALE EN

```

### Emulator startup options

Here are some basic options for faster booting Emulator. Unlikne adb, you can only specify those when starting the emulator, not later on. Consider this command:

```
emulator -avd ${EMULATOR_NAME} -no-boot-anim -no-window -gpu off -accel auto -memory 2048 -skin 1440x2880
```

* `-no-boot-anim`: Disable the boot animation during emulator startup for faster booting
* `-acel auto`: Determine automatically if acceleration is supported and use it when possible
* `-no-window -gpu off`: This option is useful when running the emulator on servers that have no display. You'll still be able to access the emulator through adb or the console. UI tests result logs normally.
* `-skin 1440x2880`: In case you want the screen has enough room of item views, especially with ListView or RecyclerView. Use it at your risk, it's better to handle them properly. You always have customer using small android phone.
* `-memory 2048`: Specify the physical RAM size from 128 to 4096 MBs, especially suits with high permomance machine. 4GB RAM, why not?

# Build Steps

Let's use [Sunflower](https://github.com/android/sunflower) as sample.

Build new Docker Image with name `android-container` and tag `sunflower`:

```shell
docker build -t android-container:sunflower .
```

Clone and go to top level directory of Sunflower project:

```shell
git clone https://github.com/android/sunflower && cd sunflower/
```

Mount `/sunflower` into container as `/data`, use volume `gradle-cache`, which is pointed to `/cache` in the container and run Gradle tasks!

```shell
docker run --privileged -it \
--rm -v $PWD:/data \
-v gradle-cache:/cache \
android-container:sunflower \
bash -c '. /start.sh && /data/gradlew test connectedAndroidTest -p /data'
```

## License

Released under the [Apache License](https://www.apache.org/licenses/LICENSE-2.0).

Read the [LICENSE](https://raw.githubusercontent.com/fastphat/android-container/master/LICENSE) for more details.

repository: fahrudina/android-container

repo_name: fahrudina/android-container


text:
## Add Lighthouse Tickets To Your GitHub Wiki

***NOTE: This will not work on private GitHub project wikis***

### Create a READONLY API token in Lighthouse
[Log into your profile on Lighthouse](https://sera.lighthouseapp.com/login).  In the sidebar,
choose the account and project you're wanting to show.  It's important that this is a *READ ONLY*
key and the project is OSS or public because anyone can see your key.

### Add the code to your GitHub wiki
Add the code below to the wiki page you want to show Lighthouse tickets on.
Because GitHub sanitizes inline scripts, you'll need to specify your account, token and a
custom query if you'd like on a span element with the id **lighthouse-parameters**.

    <notextile>

    </notextile>

    13680c7b2c869868cfd87963df8e8252202d9a0d

repository: dineshkummarc/lighthouse-badge

extension: markdown

repo_name: dineshkummarc/lighthouse-badge


text:
### umsamples runtime Installation ###

1. Create a python virtual environment

```
   virtualenv venv
   cd venv
   source bin/activate
```

2. Check out the code from github

```
   git clone https://www.github.com:/rdbwebster/umsamples.git
   cd umsamples
```

3. Install the package and dependencies

```
   pip install -U setuptools
   pip install .
```

### Installation for umtools Development Environment ###

umtools should be installed and executed in a Python 2 Virtual Environment.

#### umtool Prerequisites ####

* Python 2.7
* Pip 9.0.1

Verify the python and pip versions on the development workstation

```
$ python --version
Python 2.7.10

$ pip --version
pip 9.0.1 from /Users/bwebster/python/virtualEnvs/umsamples/lib/python2.7/site-packages (python 2.7)

// upgrade pip if needed - Mac OSX

sudo pip install --upgrade pip

```

####  SSL Handshake failure on Mac OSX 10
http.requests ssl error: [SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure

Requires an updated OpenSSL library

Two Choices
*     Install OpenSSL from Homebrew, then install a new version of Python 2 from Homebrew which will automatically link against the Homebrew-provided OpenSSL.

*     Install OpenSSL from Homebrew, and then install PyOpenSSL against that new version by running

```
env ARCHFLAGS="-arch x86_64" LDFLAGS="-L/usr/local/opt/openssl/lib" CFLAGS="-I/usr/local/opt/openssl/include" pip install PyOpenSSL.

```

pip install PyOpenSSL

repository: rdbwebster/umsamples

gha_language: Python

repo_name: rdbwebster/umsamples


text:
# angularjs-sandbox
Demo application used in recent presentations on AngularJS XSS at Security BSides Boston 2016.

To build and run clone and cd into root directory. Run `mvn tomcat7:run`. Navigate to `localhost:8080`.

Presentation deck is here: https://speakerdeck.com/caseydunham/advanced-xss-and-injection-attacks

repository: caseydunham/angularjs-sandbox

repo_name: caseydunham/angularjs-sandbox


text:
**The S-Lang implementation of the affine-invariant MCMC Hammer**

[isis_emcee](http://www.sternwarte.uni-erlangen.de/wiki/doku.php?id=isis:emcee) is an S-Lang implementation of the *affine-invariant Markov chain Monte Carlo (MCMC) ensemble sampler* proposed by [Goodman & Weare (2010)](http://dx.doi.org/10.2140/camcos.2010.5.65), implemented in Python ([emcee](https://github.com/dfm/emcee)) by [Foreman-Mackey et al. (2013)](http://adsabs.harvard.edu/abs/2013PASP..125..306F), which has then been implemented in the [Interactive Spectral Interpretation System (ISIS)](http://space.mit.edu/cxc/isis/) in S-Lang by [M. A. Nowak](http://space.mit.edu/home/mnowak/isis_vs_xspec/), modified by T. Beuchert, L. Corrales, and M. Kuehnel. The S-Lang MCMC hammer ([emcee](https://www.sternwarte.uni-erlangen.de/wiki/index.php/Emcee)) is included in the [Remeis ISISscripts](http://www.sternwarte.uni-erlangen.de/isis/).

### Installation

1- Install HEASoft: download [the HEASOFT Software](https://heasarc.nasa.gov/lheasoft/download.html)

    gunzip -c heasoft6.19.tar.gz | tar xf -
    cd heasoft-6.19/BUILD_DIR/
    ./configure
    make
    make install

2- Install ISIS:

    wget http://space.mit.edu/cxc/isis/install-isis.sh
    setenv HEADAS /usr/local/headas/x86_64-unknown-linux-gnu-libc2.7/
    sh install-isis.sh DIR

3- Install ISISscripts: download [the Remeis ISISscripts](http://www.sternwarte.uni-erlangen.de/isis/)

or obtain the developing version from the ISISscripts git-repository:

    git clone http://www.sternwarte.uni-erlangen.de/git.public/isisscripts

    tar xfz isisscripts.tgz

Add it to to your personal `~/.isisrc` startup file

    add_to_isis_load_path("/path/to/isisscripts/");

Load the ISISscripts in your S-Lang script:

    require("isisscripts");

4- Install the S-lang MCMC Hammer:

Obtain the developing version from the github:

    git clone https://github.com/mcfit/isis_emcee.git

Load the S-lang MCMC Hammer in your S-Lang script:

    require("isis_emcee");


text:
# sv-style-guide
A SystemVerilog style guide.

## Table of Contents
- [Packages, `import`, and `include`](https://github.com/s-okai/sv-style-guide#packages-import-and-include)
- [`always`, `always_ff`, and `always_comb`](https://github.com/s-okai/sv-style-guide#always-always_ff-and-always_comb)
- [`wire`, `reg`, and `logic`](https://github.com/s-okai/sv-style-guide#wire-reg-and-logic)
- [`enum` Types](https://github.com/s-okai/sv-style-guide#enum-types)
- [Blocking and Non-blocking Assignment](https://github.com/s-okai/sv-style-guide#blocking-and-non-blocking-assignment)

## Packages, `import`, and `include`

### Do Not Use `include`
Using `include` to share code with other files should be avoided.
```verilog
`include "sample_pkg.sv"
```
The `include` keyword creates a new definition of the code `sample_pkg.sv` each time it is used. This because `include` is a macro rather than a proper import, and simply "copies" the text contents of `sample_pkg.sv` into the file. This creates several issues, such as when using custom types as ports for modules or as the arguments of functions, as you have conflicting between the top-level/caller and the module/callee.

### Use Packages and `import`
`include` is a hold-over from Verilog, and should be replaced with packages and `import` in SystemVerilog.

Packages can be defined in the following manner:
```systemverilog
package sample_pkg;
  // Definitions here...
endpackage
```

Symbols in packages can either be referenced using the package name
```systemverilog
assign value = sample_pkg::SAMPLE_CONSTANT;
```
or by importing either individual symbols from the package
```systemverilog
import sample_pkg::SAMPLE_CONSTANT;
...
assign value = SAMPLE_CONSTANT;
```
or the entire package
```systemverilog
import sample_pkg::*;
...
assign value = SAMPLE_CONSTANT;
```

## `always`, `always_ff`, and `always_comb`

### Do Not Use `always`
Using `always` for sequential and combinational logic should be avoided.
```verilog
// Old Verilog-style sequential block.
always @(posedge clk)
  begin
  ...
end

// Old Verilog-style combinational block.
always @(*)
  begin
  ...
end
```
Verilog-style `always` are not checked at compile time to verify that the code included synthesizes to true flip-flops or combinational logic. Warnings are often generated in synthesis tools when code does not map properly to flip-flops or combinational logic, but are often missed, and simulation tools will often remain silent.

### Use `always_ff` and `always_comb`
Use `always_ff` and `always_comb` instead. `always_ff` and `always_comb` blocks are verified by most tool chains at compile time and will throw errors if the code does not map to flip-flops or combinational logic. For example, using `always_comb` will cause compilation to fail if the code infers a latch while `always @(*)` will only throw a warning.
```systemverilog
// New SystemVerilog-style sequential block.
always_ff @(posedge clk)
  begin
  ...
end

// New SystemVerilog-style combinational block.
always_comb
  begin
  ...
end
```

## `wire`, `reg`, and `logic`

### Do Not Use `wire` and `reg`
Using `wire` and `reg` should be avoided.
```verilog
wire internal_wire;
reg internal_reg;
...
assign internal_wire = value_0;

always @(*)
  begin
  internal_reg = value_1;
end
```
The common convention in Verilog is to use `wire` for nodes driven outside of `always` blocks (such as those driven via `assign`), and `reg` for nodes driven in `always` blocks. This is convention is tedious and makes refactoring code difficult. It also fails to add any clarity, since `reg` could be a node driven by either combinational or sequential logic.

### Use `logic`
Use `logic` instead of `wire` and `reg`. Nodes of type `logic` can be driven either inside or outside of `always` blocks.
```systemverilog
logic node_0;
logic node_1;
...
assign node_0 = value_0;

always_comb
  begin
  node_1 = value_1;
end
```
It is also good practice to use `logic` for all output port, as it also allows them to be driven either inside or outside of `always` blocks.
```systemverilog
module sample_module (
    output logic output_0,
    output logic output_1
  );
  ...
  assign output_0 = value_0;

  always_comb
    begin
    output_1 = value_1;
  end
endmodule
```

## `enum` Types

### Do Not Use Non-`enum` Types for State Machine States
Avoid using non-`enum` types (`parameter`, `logic`, `int`, etc) when defining state machine states.
```verilog
parameter [2:0] IDLE = 3'b001, RUN = 3'b010, DONE = 3'b001; // Functional bug
```
Here we have unintentionally defined multiple states (`IDLE` and `DONE`) with the same value (`3'b001`), causing the state machine to fail.
```verilog
parameter [1:0] IDLE = 3'b001, RUN = 3'b010, DONE = 3'b100; // Functional bug
```
Here we have unintentionally assigned 3-bit values to 2-bit states. Since Verilog allows width mismatches in assignments, the code compiles, and the state machine will fail. This case is especially common when additional states are added to an existing state machine.
```verilog
parameter [2:0] IDLE = 3'b001, RUN = 3'b010, DONE = 3'b100;
wire [2:0] next_state;
assign next_state = 3'b111; // Functional bug
```
Here we have unintentionally assigned an invalid state value to `next_state`. Once again, this compiles and the state machine will fail.

### Use `enum` for State Machine States
Use `enum` types for defining states in state machines.
```systemverilog
typedef enum logic [2:0] {IDLE = 3'b001, RUN = 3'b010, DONE = 3'b001} state_t;  // Compile error

state_t state;
state_t next_state;
```
As before, we have unintentionally defined multiple states (`IDLE` and `DONE`) with the same value (`3'b001`). However, this time it causes a compile error because `enum` types require the entire enumerated list to be unique.

```systemverilog
typedef enum logic [1:0] {IDLE = 3'b001, RUN = 3'b010, DONE = 3'b100} state_t;  // Compile error

state_t state;
state_t next_state;
```
As before, we have unintentionally assigned 3-bit values to 2-bit states. However, this time it causes a compile error because `enum` types require the values assigned to the enumerated list to match the width of the type.

```systemverilog
typedef enum logic [2:0] {IDLE = 3'b001, RUN = 3'b010, DONE = 3'b100} state_t;  // Compile error

state_t state;
state_t next_state;

assign next_state = 3'b111;
```
As before, we have unintentionally assigned an invalid state value to `next_state`. However, since an `enum` type node can only be assigned labels (`IDLE`, `RUN`, `DONE`) or values (`3'b001`, `3'b010`, `3'b100`) from its enumerated list, the code will fail to compile.

We may also choose to leave label values unassigned:
```systemverilog
typedef enum logic [2:0] {IDLE, RUN, DONE} state_t;

state_t state;
state_t next_state;

assign next_state = IDLE;
```
Note that this means we can no longer assign `enum` type nodes by value: we must assign them by label (`IDLE`, `RUN`, `DONE`). This often increases readability (think of it as using constants rather than literals) and maitainability (adding additional states is as simple as adding a new label: we do not need to manage all the values by hand).

Simulators often allow you to view `enum` type nodes by label (`IDLE`, `RUN`, `DONE`) instead of value (`3'b001`, `3'b010`, `3'b100`) in waveform view, allowing for easier debugging.

## Blocking and Non-blocking Assignment

### Do Not Use Blocking Assignment (`=`) In `always_ff` Blocks
Avoid using blocking assignment (`=`) in `always_ff` blocks as it creates an inconsistencies when referencing the assigned node.
```
always_ff @(posedge clk)
  begin
  c = a + b;
  e_in <= c;  // The c referenced here is before the flip flop.
  ...
end

assign e_out = c; // The c referenced here is after the flip flop.
```
If a node assigned using blocking assignment is referenced inside the _same_ `always_ff` block it was assigned in _after_ the assignment, it takes the value of the node _before_ the flip flop. If referenced anywhere else, it takes the value of the node after the flip flop. Blocking assignment creates two separate nodes with the same name, and which one you get depends on _where_ you reference it. This is both functionally confusing and results in poor maintainability.

## References
1. [SystemVerilog packages](http://www.asic-world.com/systemverilog/hierarchy1.html)

repository: s-okai/sv-style-guide

repo_name: s-okai/sv-style-guide


text:
A simple, redux-centric LISP interpreter.

Redux Scripting can be used to create simple programs that are evaluated and
executed at runtime. A single statement is structured like so:

```
(function arg0 arg1 arg2 ...)
```

For example, the statement `(+ 1 1)` will evaluate to the value `2`.

Commas are treated as whitespace, so you can do this:

```
(function arg0, arg1, arg2, ...)
```

Single line comments start with a semicolon:

```
; this is a comment
(+ 1 1)  ; this is also a comment
```

The `?` function is a short cut for `LOG(INFO)` and can take a variable number
of arguments.

```
(? 'hello world')
```

Variables can be declared using the `var` keyword:

```
(var one 1)
(var two 2.0)
(var hello 'hello')
```

Redux scripting uses the C++ type system behind the scenes, so you get access
to the same standard types.

* `true` and `false` literals are treated as booleans
* whole numbers (e.g. 1, 5, 15, 39) are treated as int32_t
* decimal numbers (e.g. 1.2, 3.456, 0.87) are treated as doubles
* numbers suffixed with `f` (e.g. 1f, 2.3f) are treated as floats
* numbers suffixed with `u` (e.g. 2u) are treated as uint32_t
* numbers suffixed with `l` (e.g. 3l) are treated as int64_t
* numbers suffixed with `ul` (e.g. 4ul) are treated as uint64_t
* strings can be enclosed in single `'` or double quotes `"`
* the `null` literal is treated as a special "null" type

Values can be explicitly cast to other types using the following functions:
`int8`, `int16`, `int32`, `int64`, `uint8`, `uint16`, `uint32`, `uint64`,
`float`, and `double`.

For example, `(uint8 214)` will return a `uin8_t` with the value `214`.

A set of expressions can be evaluated in sequence using the `do` command.

```
(do
  (+ 1 1)
  (+ 2 2)
)
```

The result of the last expression within the `do`-block will be the result of
the block itself. You can use a `return` statement to stop execution of a
block.

```
(do
  (+ 1 1)
  (return (+ 2 2))
  (+ 3 3)          ; will not be evaluated
)
```

You can define functions using `def`:

```
(def add (x y) (
  (+ x y)
))
```

The body of the function is treated like a `do`-block and can contain multiple
statements.

Similarly, you can define a macro using `macro`:

```
(def maco (x y) (
  (+ x y)
))
```

The difference between a function and a macro is that the arguments to a
function are evaluated before they are passed to the function, whereas the
arguments to a macro are passed to the macro in an unevaluated form.

For example, consider the following:

```
(def my_function (x) (+ x x))
(macro my_macro (x) (+ x x))
```

Calling

```
(var my_var 1)
(my_function (= my_var (+ my_var 1)))
```

will return a value of `4`. This is because the value of `my_var` will be
assigned to `2` before the function is called.

Calling

```
(var my_var 1)
(my_macro (= my_var (+ my_var 1)))
```

In this case, the result is `5`.  That is because the entire expression
`(= my_var (+ my_var 1))` is passed into the macro which it then evaluated
twice before being added. In other words, the macro is doing:

```
(+
  (= my_var (+ my_var 1))  ; sets my_var to 2
  (= my_var (+ my_var 1))  ; sets my_var to 3
)
```

Redux scripting provides several other built-in functions as well, but they
are described in the individual header files under `redux/functions`. These
include (but are not limited to):

* Conditional/branching using `if` and `cond`
* Boolean algebra operators `and`, `or`, and `not`
* Comparison operators `==`, `!=`, `<`, `>`, `<=`, and `>=`
* Mathematical operators `+`, `-`, `*`, `/`, and `%`
* Vector math types `vec2`, `vec2i`, `vec3`, `vec3i`, `vec4`, `vec4i`, and
  `quat`
* Time types which can be created using `seconds` and `milliseconds`
* Entity IDs using `entity`

repository: honggui/lullaby

repo_name: honggui/lullaby


text:
CONFIG OPTIONS for go

	packageName
	    Go package name (convention: lowercase). (Default: openapi)

	hideGenerationTimestamp
	    Hides the generation timestamp when files are generated. (Default: true)

	packageVersion
	    Go package version. (Default: 1.0.0)

	withGoCodegenComment
	    whether to include Go codegen comment to disable Go Lint and collapse by default GitHub in PRs and diffs (Default: false)

	withXml
	    whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML) (Default: false)

	prependFormOrBodyParameters
	    Add form or body parameters to the beginning of the parameter list. (Default: false)

Back to the [generators list](README.md)

repository: bannzai/openapi-generator

gha_language: HTML

repo_name: bannzai/openapi-generator


text:
# cookie_CWL_tool
cookiecutter template for CWL CommandLineTool

Simple template creating a folder containing the tool.cwl and tool-job.yml files.
You will be prompted for stuff like:
- cwlVersion
- docker image
- initial file names and formats
- Metadata (authors, organisations, licences)
- etc.

These templates are following recommendations from the [CWL user guide](http://www.commonwl.org/user_guide/index.html) and [CWL recommended practices](http://www.commonwl.org/user_guide/rec-practices/).

# How to
1. [Install cookiecutter](https://cookiecutter.readthedocs.io/en/latest/installation.html)
2. cd to destination folder
3. `cookiecutter https://github.com/ninsch3000/cookie_CWL_tool`

If you want to change the default values, clone the repo and edit cookiecutter.json. You can then also call cookiecutter on your local copy of cookie_CWL_tool.

gha_language: Common Workflow Language


text:
---
layout: page
title: User Guide
---
*(Written by Nicholas Canete)*

Thank you for choosing **Common Cents**! This is your convenient at-hand **expense-tracking tool**, meant for **anyone who runs a small-scale business**.
With just a few commands, _Common Cents_ will keep track, categorise and calculate your income and expenditure for you!
You can even keep your expenses in multiple accounts for seamless organisation. Amalgamating the features of a
Command Line Interface (CLI) with a Graphical User Interface (GUI), _Common Cents_ is meant to be functional, intuitive and
faster than most traditional GUI expense-trackers out there!

* Table of Contents
{:toc}

This User Guide will show you how to navigate the User Interface (UI), give you step-by-step instructions on using commands, tips and tricks on how to maximise your experience with _Common Cents_ and clarify most doubts that you may have.

The _Common Cents_ interface and commands consist of a few levels: `App` level, `Account` level and `Entry` level.

* `App` level commands deal with interactions with the app itself.

* `Account` level commands deal with managing the different accounts in the app.

* `Entry` level commands deal with managing the entries which are either expenses or revenues in an account.

--------------------------------------------------------------------------------------------------------------------
# 1. Quick Start

*(Written by Jordan Yoong)*

Below are steps to help you set up and start your _Common Cents_ experience!

1\. Ensure you have Java `11` or above installed in your Computer.

2\. Download the latest `commoncents.jar`.

3\. Copy the file to the folder you want to use as the _home folder_ for _Common Cents_.

4\. Double-click the file to start the app. You should see the GUI similar to the one below in a few seconds (**Figure 1-1**).
Note how the app contains some sample expenses and revenues if you have not used the app before.

 ![Ui](images/Ui.png)

  Figure 1-1: Default GUI

5\. Type the command in the command box and press Enter to execute it. e.g. typing `help` and pressing Enter will open the help window.

   Some example commands you can try:

   * `add c/expense d/buy lunch a/5.20 t/food` : Adds an expense named "buy lunch" to the expense list.
   * `delete 1 c/expense` : Deletes the 1st entry in the expense list.
   * `exit` : Exits the app.

6\. Refer to the [Features](#5-features) below for details of each command.

--------------------------------------------------------------------------------------------------------------------

# 2. How to identify notations
*(Written by Lim Zi Yang)*

These blocks are a few examples of notations that will be used in this document. Each block and icon
has a different meaning so do look out for them under our features.

:information_source: **Note:**

Important notes to read regarding the feature.

[comment]: <> (This only appears in Github CSS)

:bulb: **Tip:**

Ways to better your experience with _Common Cents_.

:green_book: **Example:**

An example, or multiple examples to follow.

:warning: **Warning:**

Important cautions that needs to be known before using the feature.

--------------------------------------------------------------------------------------------------------------------

# 3. User Interface Overview
*(Written by Le Hue Man)*

As you can see, **Figure 3-1** below shows the default user interface (UI) of _Common Cents_ with its components.
![annotatedUi](images/commands/annotatedUi.PNG)

  Figure 3-1: Default user interface of Common Cents

You can find the description for each UI component shown in the table below.

UI component | Description
--------|------------------
*Menu bar* | Displays the menu bar of _Common Cents_. You can use this to access the User Guide or exit the application.
*Active account name* | Displays the account you are currently on.
*Display picture* | Displays the default display picture of the application.
*Command box* | Displays a text field for you to type the commands.
*Result display* | Displays the result of your command. If the command is invalid, an error message will be displayed to prompt and guide you to input valid correct command.
*Account summary chart* | Displays the total expenses and revenues in your current account in a pie chart.
*Chart legend* | Displays the legend for the account summary chart.
*Status bar* | Displays the current date.
*Expense list* | Displays all the expenses in your current account in a panel.
*Revenue list* | Displays all the revenues in your current account in a panel.

--------------------------------------------------------------------------------------------------------------------

# 4. Components
*(Written by Nicholas Canete)*

This section describes the various components that comprises _Common Cents_, mainly Account and Entries. If you
are new to _Common Cents_, do not fret as this section will guide you step by step in understanding the components
available! This will better your experience with _Common Cents_ and your usage of features!

## 4.1 Accounts
*(Written by Nicholas Canete)*

Accounts in _Common Cents_ are key features that help you better manage, categorise, and organise your finances better.
In _Common Cents_, each account has a unique name, and a unique list of expenses and revenues.
You can make as many accounts as you'd like in order to help you better categorise and organise your finances better!

When you first launch _Common Cents_, a **General Account** is made for you by default, which you may use on top of other
accounts. You may also make new accounts and switch between them and give them their very own set of expenses and revenues.

### 4.1.1 Name
As mentioned in the previous section, you are able to make new accounts on top of the General Account. Every account
**MUST** have a unique name and duplicate names are not supported, so that you are able to distinguish and identify your
accounts better.

### 4.1.2 Expense List
Each account will have an Expense list - that is, a list of transactions that involve expenditure on your end (i.e.
net outflow of money). In general, expenses keyed into _Common Cents_ have a compulsory Description and Amount, as well as
optional Tags. In the app user interface, each expense amount will be displayed as a negative value and all the expenses
will be displayed as a scrollable list.

### 4.1.3 Revenue List
Each account will also have a Revenue list - that is, a list of transactions that involve profit from your end (i.e.
net inflow. of money). Like expenses, revenues keyed into _Common Cents_ have a compulsory Description and Amount, as well as
optional Tags. In the app user interface, each revenue amount will be displayed as a positive value and all the revenues
will be displayed as a scrollable list, right beside the expenses list.

## 4.2 Entries
*(Written by Nicholas Canete)*

'Entry' (or 'Entries') is the term used to describe either Expense or Revenue. Each entry input into _Common Cents_ would
have compulsory fields - Description, Amount - and optional Tags.

### 4.2.1 Category
Category is the field that specifies the type of Entry input that _Common Cents_ receives from you. It is used in commands
to differentiate entries between Expense and Revenue. You can either specify the category as an `expense` or a `revenue`,
or `e` or `r` for short and these are not case-sensitive. This documentation uses `expense` or `revenue` as examples in
the [Features](#5-features) below.

### 4.2.2 Description
Description refers to the textual information that is associated with the Entry that _Common Cents_ receives from you, in
order to provide more information about the Entry.

### 4.2.3 Amount
Amount is the numeric value associated with the Entry that _Common Cents_ receives from you. All amounts, for both expenses
and revenues must be given as a positive value.

### 4.2.4 Tags
Tags refer to short textual prompts attached to an Entry, with the purpose of giving extra information and identity for
your Entries in _Common Cents_.

--------------------------------------------------------------------------------------------------------------------

# 5. Features
*(Written by Jordan Yoong)*

Here are some general notes about the commands in _Common Cents_.

:information_source: **About the command format:**

* Words in UPPERCASE are the parameters to be supplied by the user.

  e.g. in `add c/CATEGORY...`, `CATEGORY` is a parameter which can be used as `add c/REVENUE...`

* Items in square brackets are optional.

  e.g. `...a/AMOUNT [t/TAG]` can be used as `...a/50.10 t/Supplies` or as `...a/50.10`.

* Parameters **preceded by a prefix** can be in any order.

  e.g. if the command specifies `c/CATEGORY d/DESCRIPTION...`, `d/DESCRIPTION c/CATEGORY...` is also acceptable.

* **Numeric** parameters (e.g. `INDEX`) must be in the correct order.

  e.g. if the command specifies `INDEX c/CATEGORY`, only `INDEX c/CATEGORY` is acceptable
  and `c/CATEGORY INDEX` is invalid.

* Commands with no prefix parameters (e.g. `clear`, `profit`, `listacc`) can take in extra words after the command word
  without affecting its execution.

  e.g. the command `profit abc` works the same as `profit` and is considered valid.

The commands are separated into three categories: App-Level commands, Entry-Level commands and Account-Level Commands.

Each level interacts with _Common Cents_ differently to maximise your experience. More details about each level are
found in its own section below.

## 5.1 App-Level Commands
App-Level commands deals with interactions with the app, _Common Cents_, itself.

### 5.1.1 Viewing help : `help`
*(Written by Jordan Yoong)*

You can use this command when you are at a lost or want to view an overview of how to use the application.
This command will return a message explaining how to access the help page (**Figure 5.1-1**).
You can click on the `Copy URL` button to copy the link to clipboard and paste it in your web browser.

**Format**: `help`

:green_book: **Example:**

* `help`: Returns help prompt (**Figure 5.1-1**)

![helpMessage](images/helpMessage.png)

  Figure 5.1-1: Help message

### 5.1.2 Exiting the program : `exit`
*(Written by Jordan Yoong)*

You can use this command when you are done with what you need to do and want to close the application.

**Format:** `exit`

:green_book: **Example:**

* `exit`: Returns exit message then quits the program in 1.5 seconds (**Figure 5.1-2**)

![exitCommand](images/commands/exitCommand.png)

  Figure 5.1-2: Exit message appears in Result display

## 5.2 Entry-Level Commands
Entry-Level commands involve managing the entries which are either expenses or revenues in an account.

### 5.2.1 Adding an entry: `add`
*(Written by Jordan Yoong)*

You can use this command when you want to add an entry (expense/revenue) to the tracker.

**Format:** `add c/CATEGORY d/DESCRIPTION a/AMOUNT [t/TAG]`

:green_book: **Example:**

* `add c/expense d/buying supplies a/10.10 t/blogshop t/eCommerce` (**Figure 5.2-1**)
* `add c/revenue d/sale of clothes a/200 t/blogshop t/eCommerce`

![addCommand](images/commands/addCommand.png)

  Figure 5.2-1: A new expense called "buying supplies" is added

:information_source: **Note:**

* Adds an entry to either category.
* The category refers to the classification of the entry in the entry lists.
* The category must be either 'expense' or 'revenue'.
* Each tag can only be 1 word.
* If multiple tags are required, do input multiple t/ prefixes.
* Each tag in entry only appears once even if added multiple times.

:bulb: **Tip:**

* Input expense/revenue information can be in any order

### 5.2.2 Deleting an entry: `delete`
*(Written by Jordan Yoong)*

You can use this command to remove an entry (expense/revenue) from the tracker when you do not want to keep track of
it anymore.

**Format:** `delete INDEX c/CATEGORY`

:green_book: **Example:**

* `delete 1 c/expense` : Deletes first entry in expense category
* `delete 2 c/revenue` : Deletes second entry in the revenue category (**Figure 5.2-2**)

:bulb: **Tip:**

* It is possible for you to use the `find` function then `delete`.

![deleteCommand1](images/commands/deleteCommand1.png)

  Figure 5.2-2: The revenue at index 2 is deleted

:information_source: **Note:**

* Deletes the entry at the specified INDEX.
* The index refers to the index number shown in the displayed entry lists.
* The index must be a positive integer (e.g. 1, 2, 3), and must be within the range of the number of entries (e.g. if there are 10 entries, the INDEX given cannot be > 10).

### 5.2.3 Editing an entry: `edit`
*(Written by Jordan Yoong)*

You can use this to make edits to any existing entries in the tracker when the details of the entry are wrongly keyed.

**Format:**
* `edit 1 c/CATEGORY d/DESCRIPTION a/AMOUNT t/TAG`
* `edit 2 c/CATEGORY d/DESCRIPTION`
* `edit 3 c/CATEGORY a/AMOUNT`

:green_book: **Example:**

* `edit 2 c/expense d/buy McSpicy a/8.60`: Changes the name and the amount of entry 2 (**Figure 5.2-3**) to
`buy McSpicy` and `$8.60` respectively (**Figure 5.2-4**)
* `edit 2 c/revenue d/sell McNuggets`: Changes the name of entry 2 to `sell McNuggets`
* `edit 2 c/expense a/5.50`: Changes the amount of entry 2 to `$5.50`

![beforeEditCommand](images/commands/beforeEditCommand.png)

  Figure 5.2-3: The targeted expense at index 2 before editing

![afterEditCommand](images/commands/afterEditCommand.png)

  Figure 5.2-4: The targeted expense at index 2 after editing

:information_source: **Note:**

* Edits an entry that matches the entry name and changes the parameters of an entry depending on which are specified.
* The tags d/ and a/ have to be used to indicate which field specifies DESCRIPTION and which field specifies AMOUNT.
* When editing an entry’s tags, the existing tags of the entry will be removed i.e adding of tags is not cumulative.
* The index must be a positive integer 1, 2, 3, and must be within the range of the number of entries
(e.g. if there are 10 entries, the `INDEX` given cannot be > 10).
* It is possible for you to use the `find` function then `edit`.
* The `edit` command still executes if you use the same description, amount or tags as the existing entry in the parameters.

:warning: **Warning:**

* When you use the 'edit' command after the 'find' command, if the edited description does not match the predicate, it disappears from the list!

### 5.2.4 Locating entries by description: `find`
*(Written by Le Hue Man)*

You can use this command to list expenses and/or revenues that have the given keyword(s) in their descriptions. This is
useful when you want to find some particular entries to [`delete`](#522-deleting-an-entry-delete) or [`edit`](#523-editing-an-entry-edit).
If there is no expense or revenue found, the respective list will be empty.

**Format:** `find [c/CATEGORY] k/KEYWORDS`

:green_book: **Example:**

* `find c/expense k/watercolours canvas`: Finds all expenses with keywords `watercolours` and/or `canvas` in their
description
* `find c/revenue k/phone`: Finds all revenues with keyword `phone` in their
description
* `find k/canvas earrings`: Finds all expenses and revenues with keywords `canvas` and/or `earrings` in their
description (**Figure 5.2-5**)

![findCommand](images/commands/findCommand.PNG)

  Figure 5.2-5: Find command successfully executed

:information_source: **Note:**

* The search is case-insensitive. e.g. `grocery` will match `grocery` and `Grocery`.
* Only the entry's description is searched.
* The search does not match partial words. e.g. `food` will match `food` and `fast food` but not `fastfood`.
* Entries matching at least one keyword will be returned (i.e. OR search). e.g. `Food` will return `Hawker food`,
`Restaurant Food`.
* The `c/CATEGORY` is optional.

[comment]: <> (This only appears in Github CSS)

:bulb: **Tip:** When there are a lot of entries, and you want to delete something,
you can use `find` to search for it in the list and use [`delete INDEX`](#522-deleting-an-entry-delete) to remove it from the updated
list, with the updated `INDEX`.

### 5.2.5 Listing all entries: `list`
*(Written by Jordan Yoong)*

You can use this command to list all entries in the current account when you want to have an overview of your account.

**Format:** `list`

:green_book: **Example:**

* `list`: Returns the latest list of all entries

### 5.2.6 Clearing all expenses or revenue: `clear`
*(Written by Jordan Yoong)*

You can use this command to clear all entries from a particular category when you do not need to track them anymore.

**Format:** `clear [c/CATEGORY]`

:green_book: **Example:**

* `clear`: Clears all entries visible in both the expense and revenue lists
* `clear c/expense`: Clears all entries visible in expense list (**Figure 5.2-6**)
* `clear c/revenue`: Clears all entries visible in revenue list

![clearCommand](images/commands/clearCommand.png)

  Figure 5.2-6: The expenses in the account are cleared

:information_source: **Note:**

* The `clear` command will clear all entries in the stipulated category. If you would like to delete selected
entries, use the `delete` command instead.
* It is possible for you to use the `find` function then `clear`.

### 5.2.7 Calculating net profits based on expenses and revenues: `profit`
_(Written by Cheok Su Anne)_

If you wish to calculate the profits you have currently, you may use this command to do so.

**Format:** `profit`

:green_book: **Example:**

* `profit`: Returns the profits (**Figure 5.2-7**) by taking the difference between the expenses and revenues

![profitCommand](images/commands/profitCommand.PNG)

  Figure 5.2-7: Profit command successfully executed

:information_source: **Note:**

The `profit` function will show deficits as a negative number if the total expenses is greater than the total revenue.

### 5.2.8 Undoing Entry-level commands: `undo`
*(Written by Lim Zi Yang)*

You can use this command to return to the state of the entry prior to the previous command.

**Format:** `undo`

:green_book: **Example:**

* `undo`: Returns the state of expenses and revenues prior to the previous command. For example, if the
[`delete`](#522-deleting-an-entry-delete) command was used (**Figure 5.2-8**), using `undo` returns account to the state before the
[`delete`](#522-deleting-an-entry-delete) command was used (**Figure 5.2-9**).

![deleteCommand](images/commands/deleteCommand.png)

  Figure 5.2-8: Before the undo command, an expense was deleted

![undoCommand](images/commands/undoCommand.png)

  Figure 5.2-9: After the undo command, the deleted expense is added again

:information_source: **Note:**

* Do note that the `undo` command can only undo  [`add`](#521-adding-an-entry-add), [`delete`](#522-deleting-an-entry-delete),
[`edit`](#523-editing-an-entry-edit) and [`clear`](#526-clearing-all-expenses-or-revenue-clear) commands at the entry-level.
Account-level commands cannot be reverted using the `undo` command.
* Once you use the [`switchacc`](#535-switching-accounts-switchacc) command, all the previous states for the `undo` command will be lost. This would mean that if you choose to switch back to the account, you cannot undo the previous entry-level commands anymore.

:warning: **Warning:**

* There is no `redo` command to revert your `undo` command. Do use the `undo` command with caution!
* Once you exit the app, all the previous states will be lost. Do confirm your changes to the entries in the account
before you exit the app!

## 5.3 Account-level Commands
Account-Level commands involve managing the different accounts in the app.

### 5.3.1 Adding new account: `newacc`
*(Written by Lim Zi Yang)*

You can create a new account to manage a different set of entries with this command.

**Format**: `newacc n/NAME`

:green_book: **Example:**

* `newacc n/My Flower Shop`: Adds a new account, `My Flower Shop`, with no expenses or revenues
* `newacc n/$uper $avers`: Adds a new account, `$uper $avers`, with no expenses or revenues (**Figure 5.3-1**)

![addAccountCommand](images/commands/addAccountCommand.png)

  Figure 5.3-1: A new account called $uper $avers is added

:information_source: **Note:**

* The app does not automatically switch to the new account. Once the account is created, you can check it using [`listacc`](#534-listing-accounts-you-have-listacc) or switch to it using [`switchacc`](#switching-accounts-switchacc).
* You cannot create an account with the same name as an existing account.

### 5.3.2 Deleting an account: `deleteacc`
*(Written by Lim Zi Yang)*

You can remove an account by using this command. This command is useful for clearing accounts you are no longer using.

**Format:** `deleteacc INDEX`

:green_book: **Example:**

* `deleteacc 3`: Deletes third account based on list generated by using [`listacc`](#534-listing-accounts-you-have-listacc)
 (**Figure 5.3-2**)

![deleteAccountCommand](images/commands/deleteAccountCommand.png)

  Figure 5.3-2: An account called My Flower Shop is deleted

:information_source: **Note:**

Do note that _Common Cents_ prevents you from deleting the account if you are currently on that account
or if the account is your only account left.

:bulb: **Tip:**

If you are unsure of the account index, use [`listacc`](#534-listing-accounts-you-have-listacc) to check the index!

:warning: **Warning:**

Deleting your account means all the data of the entries in the account is lost as well. Also, deleting is an
irreversible action and cannot be undone. Do delete your account with caution!

### 5.3.3 Editing the name of the current account: `editacc`
*(Written by Lim Zi Yang)*

You can edit the name of the current account you are on using this command.

**Format:** `editacc n/NAME`

:green_book: **Example:**

* `editacc n/Bob's Bakery`: Replaces the name of the current account, `Default Account 1` to `Bob's Bakery` (**Figure 5.3-3**)

![editAccNameCommand](images/commands/editAccNameCommand.png)

  Figure 5.3-3: The currently active account, "Default Account 1", is renamed to "Bob's Bakery"

:information_source: **Note:**

* You can only edit the account name of the account you are currently on. To edit the name
of another account, you can use [`switchacc`](#535-switching-accounts-switchacc) to switch to the other account
and edit the name from there.
* You cannot edit the account name to a name of another existing account.

### 5.3.4 Listing accounts you have: `listacc`
*(Written by Lim Zi Yang)*

You can check the accounts you have in the app by using this command. Each account will be numbered with an index and
displayed as their names.

**Format:** `listacc`

:green_book: **Example:**

* `listacc`: Shows a numbered list of the account names as a message (**Figure 5.3-4**)

![listAccCommand](images/commands/listAccCommand.png)

  Figure 5.3-4: All the accounts are listed in the Result Display

### 5.3.5 Switching accounts: `switchacc`
*(Written by Lim Zi Yang)*

You can use this command to switch to the desired account. This is useful if you want to manage entries in the
desired account or edit the name of the desired account.

**Format:** `switchacc INDEX`

:green_book: **Example:**

* `switchacc 2`: Switches to the second account based on the list generated by
[`listacc`](#534-listing-accounts-you-have-listacc) (**Figure 5.3-5**)

![switchAccCommand](images/commands/switchAccCommand.png)

  Figure 5.3-5: Current account has been switched to "Default account 2"

:bulb: **Tip:**

If you are unsure of the account index, use [`listacc`](#534-listing-accounts-you-have-listacc) to check the index!

:warning: **Warning:**

Once you use the `switchacc` command, all the previous states for the [`undo`](#528-undoing-entry-level-commands-undo) command will
be lost. This would mean that if you choose to switch back to the account, you cannot undo the previous entry-level
commands anymore. Do confirm the changes made to the entries in the account before you switch account!

--------------------------------------------------------------------------------------------------------------------
# 6. Frequently Asked Questions (FAQ)
This section contains a few frequently asked questions with regard to _Common Cents_.

## 6.1 General Inquiry
*(Written by Nicholas Canete)*

This section features general questions about _Common Cents_ that are not specific to the features.

1\. **Question:** How do I save my data in _Common Cents_?

**Answer:** You do not need to do anything! Your data will be automatically saved in the `data` folder
 under the name of `CommonCents.json`.

2\. **Question:** How do I transfer my data to another computer?

**Answer:** Install the app in the other computer and overwrite the default data file (in the `data` folder) with the file
`(CommonCents.json)` that contains the data of your previous _Common Cents_ session.

3\. **Question:** What if I notice something wrong with the application?

**Answer:** You may submit a bug report or send us a notice directly [here](https://github.com/AY2021S1-CS2103T-T13-4/tp).

## 6.2 Features Inquiry
This section features feature-related questions about _Common Cents_.

1\. **Question:** What happens if I forget my account names?

**Answer:** You may use the `listacc` command to see a full list of your existing accounts.

2\. **Question:** I encountered this situation when using the features as shown in the screenshot below. I understand that the
prefix indicated is wrong after checking the `add` section in the User Guide. However, the error message states that my category is
wrong (**Figure 6.2**). Can I clarify on this situation?

![errorMessage](images/commands/errorMessage.png)

  Figure 6.2: Error message that might cause confusion

**Answer:**
Yes, the prefix indicated is wrong as it should be `d/` instead of `n/`. As a result, the category parameter is read as
`expense n/buy McSpicy a/8.60` instead of `expense`. Do remember to check that the **prefixes and parameters required for a command
are correct!** If you are unsure of the prefixes and parameters required, do check the sections under features above!

3\. **Question:** What if I typed in multiple prefixes with valid parameters? For instance, `add c/expense c/revenue d/Buy lunch a/4.30`.

**Answer:** Multiple instances of prefixes, as well as indexes except for `tags (t/)` will not be executed and an error
message will be shown. For instance, the example above has both `c/expense` and `c/revenue`, hence the command will not be executed.
Please follow the format of the commands closely in the [Features](#5-features) section above!
--------------------------------------------------------------------------------------------------------------------

# 7. Command Summary
*(Written by Jordan Yoong)*

The table below summarises the above commands in the order of appearance in this User Guide for your reference.

Action | Format
--------|------------------
[**Help**](#511-viewing-help--help) | `help`
[**Exit**](#512-exiting-the-program--exit) | `exit`
[**Add**](#521-adding-an-entry-add) | `add c/CATEGORY d/DESCRIPTION a/AMOUNT [t/TAG]`
[**Delete**](#522-deleting-an-entry-delete) | `delete INDEX c/CATEGORY`
[**Edit**](#523-editing-an-entry-edit) | `edit INDEX c/CATEGORY [d/DESCRIPTION] [a/AMOUNT] [t/TAG]`
[**Find**](#524-locating-entries-by-description-find) | `find [c/CATEGORY] k/KEYWORD [MORE_KEYWORDS]`
[**List**](#525-listing-all-entries-list) | `list`
[**Clear**](#526-clearing-all-expenses-or-revenue-clear) | `clear [c/CATEGORY]`
[**Profit**](#527-calculating-net-profits-based-on-expenses-and-revenues-profit) | `profit`
[**Undo**](#528-undoing-entry-level-commands-undo) | `undo`
[**New Account**](#531-adding-new-account-newacc) | `newacc n/NAME`
[**Delete Account**](#532-deleting-an-account-deleteacc) | `deleteacc INDEX`
[**Edit Account Name**](#533-editing-the-name-of-the-current-account-editacc) | `editacc n/NAME`
[**List Account**](#534-listing-accounts-you-have-listacc) | `listacc`
[**Switch Account**](#535-switching-accounts-switchacc) | `switchacc INDEX`

--------------------------------------------------------------------------------------------------------------------

# 8. Acknowledgement

* The project is a brown-field project, based on AddressBook-Level3 by the [SE-EDU initiative](https://se-education.org/).
* The background image is [Designed by Freepik](http://www.freepik.com).

gha_language: Java

gha_license_id: NOASSERTION


text:
# simple-orchestration-js

This module is a wrapper around [Etcd](https://github.com/coreos/etcd), designed to assist with the orchestration of distributed services and configuration.

## Installation and Setup

To install, `npm install simple-orchestration-js`.

To use:

```javascript
const SO = require('simple-orchestration-js')

const so = return new SO({
	url: <Host of Etcd instance>
})
```

### Optional params
This module uses [request](https://github.com/request/request) under the hood so any request parameter can be passed in as part of the options.

If you are using Etcd via [Compose](http://www.compose.com) and want to use the supplied SSL certificate you can do:

```javascript
const SO = require('simple-orchestration-js')

const so = return new SOS({
	url: <Host of Etcd instance>,
	ca: fs.readFileSync("/path/to.cert.ca")
})
```

Alternatively, if you wish to ignore the SSL requirements, use `strictSSL: false`:

```javascript
const SO = require('simple-orchestration-js')

const so = return new SOS({
	url: <Host of Etcd instance>,
	strictSSL: false
})
```

## Methods

There are a number of methods to help with the orchestration of services and configuration.

### .register( namespace, serviceName, serviceConfig, opts )
The `.register()` method will register a service in Etcd.

* `namespace` is a string that defines a namespace for these services to be collected in (e.g. production, search, crm)
* `serviceName` is a string that defines the name of the service
* `serviceConfig` is a JSON object that defines the configuration needed to consume this service
* `opts` is a JSON object that defines some options for the registration, such as a TTL.

```javascript
const serviceConfig = {
  hostname: "http://search.example.com",
  api_key: "mylittlesecret"
}
so.register("production", "search-api", serviceConfig, { ttl: 30 })
```

The `.register()` method will register this service against Etcd every 10 seconds by default (or by the defined `ttl`). This means that once your app is stopped, the registration will expire within this time frame.

### .service( namespace, serviceName )
The `.service()` method will attempt to discover a service by `serviceName` in a particular `namespace`.

This method returns an EventEmitter with events on:

* `set` - when a service is registered (or re-registered)
* `expire` - when a service registration expires
* `delete` - when a service registration is deleted

```javascript
so.service("production", "search-api")
.on("set", data => {
	// handle set event
})
.on("expire", data => {
	// handle expire event
})
.on("delete", data => {
	// handle delete event
})
```

### .setEnv( namespace, envName, envValue, [callback] )
The `.setEnv()` method will set an environment parameter inside the provided `namespace`.

```javascript
so.setEnv("production", "support-email"<EMAIL_ADDRESS>(err, data) => {
	// handle optional callback
});
```

### .getEnv( namespace, envName )
The `.getEnv()` method will attempt to discover environment parameters inside the provided `namespace`.

This method returns an EventEmitter with events on:

* `set` - when a service is registered (or re-registered)
* `expire` - when a service registration expires
* `delete` - when a service registration is deleted

```javascript
getEnv("production", "support-email")
.on("set", data => {
	// handle set event
})
.on("expire", data => {
	// handle expire event
})
.on("delete", data => {
	// handle delete event
})
```

## Contributing

The projected is released under the Apache-2.0 license so forks, issues and pull requests are very welcome.

repository: glynnbird/simple-orchestration-js

repo_name: glynnbird/simple-orchestration-js


text:
> [Go to French version](/fr/Règlements/Décrets,%20ordonnances%20et%20règlements%20statutaires/2015/114.md)

# Marketing Authorization for Gluten-free Oats and Foods Containing Gluten-free Oats

**SOR/2015-114**

Enabling authorities:
- [FOOD AND DRUGS ACT](/en/Acts/Revised%20Statutes%20of%20Canada/F/F-27.md)

Date registered: 19 May 2015

----------

The Minister of Health, pursuant to sections 30.2[a] and 30.3[a] of the [Food and Drugs Act](/en/Acts/Revised%20Statutes%20of%20Canada/F/F-27.md)[b], issues the annexed Marketing Authorization for Gluten-free Oats and Foods Containing Gluten-free Oats

a: S.C. 2012. c. 19, s. 416

b: R.S., c. F-27

Ottawa, May 15, 2015

RONA AMBROSE
*Minister of Health*

## Interpretation

**Definitions**

**1** The following definitions apply in this Marketing Authorization.

***gluten*** means
- **(a)** any gluten protein from the grain of any of the following cereals or from the grain of a hybridized strain that is created from at least one of the following cereals:
	- **(i)** barley,
	- **(ii)** oats,
	- **(iii)** rye,
	- **(iv)** triticale,
	- **(v)** wheat; or
- **(b)** any modified gluten protein, including any gluten protein fraction, that is derived from the grain of any of the cereals referred to in paragraph (a) or from the grain of a hybridized strain referred to in that paragraph. (*gluten*)

***p.p.m.*** means parts per million by weight. (*p.p.m.*)

## Exemptions

**Representation or advertisement — gluten-free oats**

**2** Any representation about gluten on the label of a food that is oats or that contains oats, and an advertisement for the food is exempt from the application of section B.24.018 of the [Food and Drug Regulations](/en/Regulations/Consolidated%20Regulations%20of%20Canada/801-900/C.R.C.,%20c.%20870.md) if
- **(a)** the oats — as a food or as an ingredient or component of a food — are
	- **(i)** specially produced and processed in a manner designed to avoid their contamination by gluten from barley, rye, triticale or wheat or from a hybridized strain created from at least one of those cereals, and do not contain more than 20 p.p.m. of gluten from those cereals and hybridized strains created from at least one of those cereals, or
	- **(ii)** specially processed in a manner designed to limit or reduce the amount of gluten from barley, rye, triticale or wheat or from a hybridized strain created from at least one of those cereals, and do not contain more than 20 p.p.m. of gluten from those cereals and hybridized strains created from at least one of those cereals;
- **(b)** the food contains no oats other than oats referred to in paragraph (a);
- **(c)** the food does not contain more than 20 p.p.m. of gluten from barley, rye, triticale or wheat or from a hybridized strain created from at least one of those cereals;
- **(d)** the food does not contain any added gluten from barley, rye, triticale or wheat or from a hybridized strain created from at least one of those cereals; and
- **(e)** all representations with respect to oats on the label of the food and in an advertisement for the food, clearly refer to the oats as gluten-free.

**Source of gluten**

**3** A food that is oats or that contains oats and that satisfies the conditions set out in section 2 is exempt from the application of section B.01.010.1 and subparagraph B.01.010.3(1)(b)(ii) of the [Food and Drug Regulations](/en/Regulations/Consolidated%20Regulations%20of%20Canada/801-900/C.R.C.,%20c.%20870.md) in respect of the requirement to show the source of gluten from oats.

**Name for oats**

**4** A food that is oats or that contains oats and that satisfies the conditions set out in section 2 is exempt from the application of subsection B.01.010(2) of the [Food and Drug Regulations](/en/Regulations/Consolidated%20Regulations%20of%20Canada/801-900/C.R.C.,%20c.%20870.md) in respect of the name by which oats are shown as an ingredient or component in the list of ingredients for the food.

## Coming into Force

**Registration**

**5** This Marketing Authorization comes into force on the day on which it is registered.

repository: TravisMadill/CanadianLaws

path: /en/Regulations/Statutory Orders and Regulations/2015/114.md

repo_name: TravisMadill/CanadianLaws