text:
# ably-jmeter

An Ably JMeter Plugin supporting the creating of [Apache JMeter](https://jmeter.apache.org/) tests involving Ably clients.

## Status

This is in preview. All feedback and Pull Requests are welcomed.

This is evolving and liable to change. Class and property names and behaviour are all subject to change; anticipate any test plan using this to be invalidated by future releases.

## Installation

The plugin is a standard JMeter plugin. You can download the latest version of ably-jmeter from [Github](https://github.com/ably/ably-jmeter/releases), and then copy the downloaded JAR file into the `$JMETER_HOME/lib/ext` directory. After restarting JMeter, the Ably samplers provided by this plugin are available.

## Prerequisites

This has been tested with JMeter 5.1 and above.

## Build from source code

To build the plugin binary from source, clone the repo and run `gradle build`.

# Properties

A number of JMeter properties can be defined as User Defined Variables, and these will be used as defaults where applicable:

- `ably.environment`: a default for the `Environment` setting in the Ably samplers which, where specified, is used as the value of the `environment` `ClientOption`.

- `ably.api_key`: a default for the `API Key` setting. Where specified, this is used as the `key` `ClientOption`.

# Samplers

The plugin includes the following samplers.

## REST operations

Samplers exist that initialise an Ably REST or Realtime client.

### Ably REST Configuration

This creates a REST client based on given parameters, which is stored in a JMeter variable (ie in thread scope) and usable by other REST operations.
The sampled operation is the (trivial) client instance creation.

#### Configuration options

- **Environment**: specify a non-default Ably endpoint via the `environment` client option.

- **API key**: the Ably API key to use.

- **ClientId**: the `clientId`. Optionally a random suffix can be added to the given `clientId`.

- **Log level**: the `logLevel` passed to the ably library instance. Logging from the library goes to the default logger in the JMeter application, and therefore will be further filtered by the log level specified in JMeter itself.

#### Variables

The variables added to thread scope are:

- `ably.rest_client`: the REST client instance.

- `ably.client_id`: the `clientId` associated with the instance (including any randomly-generated part).

### Ably REST publish

This publishes a message on a named channel, with an Ably REST client instance previously established in the thread. The sampled operation is the publish and acknowledgement of the message.

### Configuration options

- **Channel name**: the name of the channel to use. Optionally, a random suffix can be added to the given name.

- **Payload**: a specified payload, or auto-generated payload of a given length, may be specified. The payload becomes the `data` part of the message.

- **Event name**: a specified `name` value for the message.

- **Encoding**: a specified `encoding` value for the message. There is no attempt to infer the `encoding` from the given payload value.

- **Timestamp**: optionally, the time at which the publish is initiated by the sampler, is added to the message in `extras.metadata.timestamp` as a number, Unix time in milliseconds.

### Variables

The variables added to thread scope are:

- `ably.channel_name`: the channel name used for the publish (including any randomly-generated part).

### Ably REST Stats

This makes a single stats request using a previously established REST client. The JSON stats response is included in the sample response data, and can be processed by any relevant postprocessor (eg JSON extractor). The sampled operation is the stats request itself. Pagination is currently not supported.

#### Configuration options

- **Start**: this specifies the `start` request param which can be a formatted date/time string, or a Unix time in milliseconds. It defaults to the `TESTSTART.MS` JMeter property.

- **End**: this specifies the `end` request param which can be a formatted date/time string, or a Unix time in milliseconds. It defaults to being unspecified, which means that stats up to the time of the call are included.

- **Limit**: this specifies the `limit` request param. It defaults to `10`.

- **Unit**: this specifies the `unit` request param which determines the granularity of the stats request. It defaults to `minute`.

- **Direction**: this specifies the `direction` request param, which determines the order in which stats results are returned. It defaults to `backwards` - ie, most recent time intervals are listed first.

#### Variables

No variables are added to thread scope.

### Ably REST History

This makes a single history request using a previously established REST client. The JSON history response is included in the sample response data, and can be processed by any relevant postprocessor (eg JSON extractor). The sampled operation is the history request itself. Pagination is currently not supported.

#### Configuration options

- **Start**: this specifies the `start` request param which can be a formatted date/time string, or a Unix time in milliseconds. It defaults to the `TESTSTART.MS` JMeter property.

- **End**: this specifies the `end` request param which can be a formatted date/time string, or a Unix time in milliseconds. It defaults to being unspecified, which means that history up to the time of the call is included.

- **Limit**: this specifies the `limit` request param. It defaults to `100`.

- **Direction**: this specifies the `direction` request param, which determines the order in which stats results are returned. It defaults to `backwards` - ie, most recent time intervals are listed first.

#### Variables

No variables are added to thread scope.

## Realtime operations

### Ably Connect

This creates a Realtime client based on given parameters, which is stored in a JMeter variable (ie in thread scope) and usable by other Realtime operations.

#### Configuration options

- **Environment**: specify a non-default Ably endpoint via the `environment` client option.

- **API key**: the Ably API key to use.

- **ClientId**: the `clientId`. Optionally a random suffix can be added to the given `clientId`.

- **Log level**: the `logLevel` passed to the ably library instance. Logging from the library goes to the default logger in the JMeter application, and therefore will be further filtered by the log level specified in JMeter itself.

#### Variables

- `ably.realtime_client`: the Realtime client instance.

### Ably Disconnect

This closes a previously established Ably connection.

### Ably Realtime publish

This publishes a message on a named channel using an established realtime connection, via a transient publish operation. The sampled operation is the publish and acknowledgement of the message.

#### Configuration options

- **Channel name**: the name of the channel to use. Optionally, a random suffix can be added to the given name.

- **Payload**: a specified payload, or auto-generated payload of a given length, may be specified. The payload becomes the `data` part of the message.

- **Event name**: a specified `name` value for the message.

- **Encoding**: a specified `encoding` value for the message. There is no attempt to infer the `encoding` from the given payload value.

- **Timestamp**: optionally, the time at which the publish is initiated by the sampler, is added to the message in `extras.metadata.timestamp` as a number, Unix time in milliseconds.

#### Variables

The variables added to thread scope are:

- `ably.channel_name`: the channel name used for the publish (including any randomly-generated part).

### Ably Realtime Subscribe

This subscribes to a given channel via a previously established realtime connection. The sampled operation is subscription for a given time, or a given number of messages. If the connection failed to be established, this publish sampler will fail immediately.

#### Configuration options

- **Channel name**: the name of the channel to use.

- **Sample on**: The basis on which sampling is performed. The default value is '**elapsed with specified time(ms)**', which means a sub sampler will occur every specified milli-seconds (default is 1000ms). During the 1000 ms, multiple messages could be received, and result in report is the summarized data during 1000 ms. If the value is set to 2000, then means summarized report during 2000 ms. Another option is '**number of received messages**', which means a sub sampler will occur after receiving these specified number of messages (default is 1).

- **Debug response**: If checked, the received message will be displayed in the sampler response.

- **Timestamp**: if the publisher added the publish time as message metadata, then this sampler will determine the mean latency across the sample as report that in the sample result.

#### Variables

No variables are added to thread scope.

### Ably Realtime Group samplers

Analogues of the Connect, Disconnect, and Subscribe samplers exist that operate on a group of realtime connections. The Ably Group Connect sampler has an additional **Group count** configuration option (defaulting to 32) that defines the number of parallel connections created. These primitives can be used to create test plans with very large numbers of connections without the adverse memory impact of having a large number of JMeter threads.

## SSE operations

### Ably SSE Connect

This creates an SSE subscription based on given parameters. Since subscription parameters are specified at the time of connection, this includes both connection and subscription-related configuration options.

#### Configuration options

- **Environment**: specify a non-default Ably endpoint via the `environment` client option.

- **API key**: the Ably API key to use.

- **ClientId**: the `clientId`. Optionally a random suffix can be added to the given `clientId`.

- **Channel name**: the name of the channel to use.

- **Sample on**: The basis on which sampling is performed. The default value is '**elapsed with specified time(ms)**', which means a sub sampler will occur every specified milli-seconds (default is 1000ms). During the 1000 ms, multiple messages could be received, and result in report is the summarized data during 1000 ms. If the value is set to 2000, then means summarized report during 2000 ms. Another option is '**number of received messages**', which means a sub sampler will occur after receiving these specified number of messages (default is 1).

- **Debug response**: If checked, the received message will be displayed in the sampler response.

- **Timestamp**: if the publisher added the publish time as message metadata, then this sampler will determine the mean latency across the sample as report that in the sample result.

#### Variables

- `ably.sse_client`: the Realtime client instance.
- `ably.channel_name`: the channel name used for the publish (including any randomly-generated part).

### Ably SSE Disconnect

This closes a previously established SSE connection.

## Test app creation

For CI testing purposes, it is possible to create a temporary app.

### Ably Create Test App

This creates a temporary app in a given environment. This may be used witih a setup threadgroup of a test plan. By default this creates a single root key in the app, and the following namespaces:

- `push`: a push-enabled namespace;
- `persisted`: a persistence-enabled namespace.

#### Configuration options

- **Environment**: specify a non-default Ably endpoint via the `environment` client option.

#### Variables

The variables added to thread scope are:

- `ably.app_spec`: an object mirroring the `AppSpec` response format of the `/apps` creation endpoint. This gives access to details of the keys, namespaces and other details of the created app.

This sampler also adds properties that are visible to add threads:

- `ably.app_id`: the id of the created app;
- `ably.account_id`: the id of the account associatad with the created app;
- `ably.api_key`: the full API key string for the created root key.

Note that, since these are set as properties instead of User Defined Variables, references to these values by other samplers must be as property references (eg as `${__P(ably.api_key)}`).

### Ably Delete Test App

This closes a previously created Ably test app. This may be used within a teardown threadgroup of a test plan.

#### Configuration options

None.

#### Variables

None.

## Example plans

Illustrative plans are included in the `src/test/resources/plans` directory.

## Release process

This library uses [semantic versioning](http://semver.org/). For each release, the following needs to be done:

1. Create a branch for the release, named like `release/0.0.2`
2. Replace all references of the current version number with the new version number (check this file [README.md](./README.md) and [build.gradle](./build.gradle)) and commit the changes
3. Run [`github_changelog_generator`](https://github.com/skywinder/Github-Changelog-Generator) to update the [CHANGELOG](./CHANGELOG.md).
4. Commit [CHANGELOG](./CHANGELOG.md)
5. Make a PR against `main`
6. Once the PR is approved, merge it into `main`
7. Add a tag and push to origin - e.g.: `git tag v0.0.2 && git push origin v0.0.2`

### Creating the release on Github

Visit [https://github.com/ably/ably-jmeter/tags](https://github.com/ably/ably-java/tags) and `Add release notes` for the release including links to the changelog entry.

## Support, feedback and troubleshooting

Please visit http://support.ably.io/ for access to our knowledgebase and to ask for any assistance.

You can also view the [community reported Github issues](https://github.com/ably/ably-jmeter/issues).

## Contributing

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


text:
---
layout: default
---

# 1997-10-30 - Re: Protocols for Insurance to Maintain Privacy

## Header Data

From<EMAIL_ADDRESS>(Neva Remailer)

To<EMAIL_ADDRESS>Message Hash: 378a42889d2c8ba52a8f8e68f22d975b0afa102a7b8373c96119334ae6dc7e76

Message ID<EMAIL_ADDRESS>Reply To: _N/A_

UTC Datetime: 1997-10-30 21:25:01 UTC

Raw Date: Fri, 31 Oct 1997 05:25:01 +0800

## Raw message

```
{% raw  %}From<EMAIL_ADDRESS>(Neva Remailer)
Date: Fri, 31 Oct 1997 05:25:01 +0800
To<EMAIL_ADDRESS>Subject: Re: Protocols for Insurance to Maintain Privacy
Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

-----BEGIN PGP SIGNED MESSAGE-----

Tim May wrote:
>Turns out that Blue Cross and Blue Shield have negotiated, through
>enormous buying power, daily rates of about $700 a day. (These
>numbers come from my memory of a "60 Minutes" report a few years
>ago. Details and current figures may vary.)

Sounds like what you really want is to be able to buy through these
companies without buying the insurance.

This would be a real easy service for them to provide because if they
mark it up a little bit, it's basically free money.  (They are doing
the negotiations anyway, after all.)  They don't even need to know
your name until you show up wanting to use their health care network.

The Emergency Room Scenario is a little more challenging.  One way to
deal with it is to wear some obvious signs of wealth like a $10,000
watch.  In a pinch you can give them the watch.  ;-) (Some of the
nurses won't know what it is, but the doctors will, I am sure.)

  You really only need to survive until your
lawyer gets to the hospital with a suitcase of cash.

How do super rich people solve this problem?  You can be pretty sure
that Bill Gates self insures and protects his privacy at the same
time.  How does he do it?  How does he solve the Emergency Room
Scenario?

Monty Cantsin
Editor in Chief
Smile Magazine
http://www.neoism.org/squares/smile_index.html
http://www.neoism.org/squares/cantsin_10.htm

-----BEGIN PGP SIGNATURE-----
Version: 2.6.2

iQEVAwUBNFjs2JaWtjSmRH/5AQH8bgf8CmUdMFs1Hzrx4wVhtAKVSDpaizFsA5c9
BuSlOGkVsFcpAWOWSYatZcpR/gx2AJgSFk1oJGWulh89L7QpQ06pNpLaNQUrx39n
Y2PT00ljNShmVE2IEmHrhSwPaEs0XDT03M1TFBpg/N2XK939qnrl32ObNidE7f4/
joQlGlX2n11jJFXFJmKps0nA3s0IpxALBByBcXa7Zxrkuj5R1PpqHQaakBkHZSS1
krRF0ztDiSvV0bn1VWhLj2upvC7TALFmifACFZ29QLgRqk1k8Kp9VqRHO4+ZQENN
Y4Ljk+qEjG/ej57CisWZyu2w5EIO44R1+y1jSNdOfrsevLo9vZn2QQ==
=PFfW
-----END PGP SIGNATURE-----

{% endraw %}
```

## Thread

+ Return to [October 1997](/archive/1997/10)

+ Return to<EMAIL_ADDRESS>(Neva Remailer)](/authors/nobody_at_neva_org_neva_remailer_)"
+ Return to "[Tim May <tcmay@got.net>](/authors/tim_may_tcmay_at_got_net_)"

+ 1997-10-30 (Fri, 31 Oct 1997 05:25:01 +0800) - Re: Protocols for Insurance to Maintain Privacy -<EMAIL_ADDRESS>(Neva Remailer)_
  + 1997-10-31 (Fri, 31 Oct 1997 11:26:45 +0800) - [Re: Protocols for Insurance to Maintain Privacy](/archive/1997/10/6bc3ecee70daf9a689cd45c47c8d36e6da63676b66b7eec771a7724c5d52c7f2) - _Tim May<EMAIL_ADDRESS>

license: MIT

branch_name: refs/heads/master

extension: md

gha_license_id: MIT

license_type: permissive


text:
# mk3s-settings
Collection of personal settings and custom gcode for the Original Prusa MK3S 3D printer

License is MIT as stated in the `LICENSE` for all files that do contain their own license.

## start.gcode

Custom start code that has some advantages over the default:

* Places the nozzle just above the bed while heating so filament cannot ooze out and curl up the nozzle
* Uses full  bed temp but just 160°C for mesh leveling. This also helps to reduce oozing.
* Print a purge bubble and a thick purge line to fill the nozzle and clean it.

Taken from https://github.com/eoprede/prusa_profiles/blob/master/MK3/Slic3r/Pretty%20PLA%20V3.ini

## end.gcode

Also taken from the pretty pla profile.
Use with `start.gcode`.

## temp-tower.gcode

Custom after layer change G-Code for a heat tower.
Don't forget to remove the snippet before printing regular objects.

Heights are for https://www.thingiverse.com/thing:2430797.


text:
# _Event Planner_

#### _A project that tells the cost of an event based on the number of guests, food, beverages, and type of entertainment_

#### By _**Kristen Chellis May 25,2018**_

## Description

_This program takes input from the user about the number of guests, food, beverages, and type of entertainment they would like to have at their event and then returns a cost_

## Setup/Installation Requirements

* _Clone this repository to your computer_
* _Open project in preferred IDE_
* _Run APP.java file in src/main/java_

## Known Bugs

_There are no known bugs at this time_

## Support and contact details

_If you have any questions comments or concerns contact Kristen at<EMAIL_ADDRESS>
## Technologies Used

_Java, IntelliJ_

### License

*This page is licensed under the MIT license*

Copyright (c) 2018 **_Kristen Chellis_**

repository: KChellis/event-planner

repo_name: KChellis/event-planner


text:
# UnityXMLUI
The UI system in Unity 4.6 is fantastic, but there isn’t an efficient method for generating UI at runtime or support for templating designs. For simple static scenarios the WYSIWYG editor is sufficient, but I’ve found it difficult for non developers on my teams to create dynamic, data driven UI’s. I’ve also found myself repeating code between projects for simple tasks like rendering lists of items, swapping image backgrounds, updating data values, handling dialog boxes, etc. The goal of this project is to provide an extendable framework for addressing these issues, borrowing concepts from web frameworks like Angular and Jade.

# Quick Start
1. Clone the repo into a Unity3d project.
2. Create an empty GameObject and attach UITEST.cs
3. UIAssets will also be added to the GameObject. Add an entry to the Fonts field and select "Arial". Do the same for the Images field and select the "Background" sprite.
4. Drag UI/Test/test.xml to the XML field on UITEST.cs
5. Hit play.

# Design

## UI
The UI class provides a wrapper for managing an individual UI, with methods for searching contained elements and rendering templates. When instantiating a UI a IElementBuilder object must be supplied to establish the UI’s rendering rules.

## RulesBuilderBase
This is the default implementation of IElementBuilder. It provides support for three types of elements, div, text, and button, along with a collection of tags which can be used with each of them. It provides a good base for building custom UI implementations providing utility methods for parsing Vector2’s from text, colors by hex or name, etc.

## UIAssets
This global provides access to the fonts, sprites, and materials available for use in the UI. Currently it is very simple, but I would like to ultimately provide support for loading content from asset bundles and providing content variant support.

## IUIBindable
Implementing this interface is required for all objects UI elements will be bound to. Objects implementing this interface receive a reference to the UI element they bind on. To push an update to the bound UI element and all its children simply call the  simply call the Update method on the bound view. *An example of this can be found in the UITEST.cs script*.

repository: TumboTheGnome/UnityXMLUI

repo_name: TumboTheGnome/UnityXMLUI


text:
# Unicorn HAT (HD) simulator

Simulates an Unicorn HAT HD (and should work for the 8x8 HAT and the 8x4 PHAT as well) using pygame.

 Adjust your `import unicornhathd` statement as follows:

```python
try:
    import unicornhathd as unicorn
    print("unicorn hat hd detected")
except ImportError:
    from unicorn_hat_sim import unicornhathd as unicorn
```

You can choose from `import unicornhathd` (16x16), `import unicornhat` (8x8) and `import unicornphat` (8x4).

## Demo

(Note that this gif has a low framerate, the simulator runs nice and smooth in real life)

![Demo](https://cl.ly/2s070z1k0L3J/Screen%20Recording%202017-06-26%20at%2011.12%20PM.gif)

## TODO

- [ ] find a python person who shows me how this would be done properly
- [ ] fix/check rotation
- [ ] add a proper LED glow effect so it looks more like a real unicorn HAT
- [x] publish via pip

repository: jayniz/unicorn-hat-sim

gha_language: Python

repo_name: jayniz/unicorn-hat-sim


text:
Docs
====

[![Build Status](https://travis-ci.org/appbaseio/Docs.svg?branch=master)](https://travis-ci.org/appbaseio/Docs)
http://docs.appbase.io

This site is built with https://www.gatsbyjs.org, and uses several configurations present in the  [reactjs.org](https://github.com/reactjs/reactjs.org/) website.

Hosting
=======

docs.appbase.io is hosted with gh-pages.

## LICENSE

MIT License, Copyright (c) 2015-2017 appbase.io

repository: dhruvdutt/Docs

gha_language: JavaScript

repo_name: dhruvdutt/Docs


text:
# BeFive Bulk HTML Validator Front End

## Introduction
This is a frontend for [Nu Html Checker](https://validator.w3.org/nu/) written with HTML5 / CSS3 / Javascript.

## Demo
Live demonstration is available at [http://validator.befive.info/](http://validator.befive.info/)

## Installation
Download the repo and decompress. Rename the folder and drag and drop the folder into anywhere in your webserver folder.

## How to Use
Enter urls into the textarea. If you want to bulk validate a Wordpress site, you can use [List Urls WordPress plugin](https://wordpress.org/plugins/list-urls/) and paste the content of CSV into the textarea below.
Supported data formats are sitemap XML, html (source), CSV generated by List Urls Wordpress plugin and plain text with url on each line.

## More Information
To find out how to use this frontend with your local validation server, please check out this blog post.

repository: BeFiveINFO/bulk-validator

repo_name: BeFiveINFO/bulk-validator


text:
Lesson 3: Command Line Scorpion
===============================

This lesson we're skipping the philosophy component and concentrating
on finishing our first scorpion.

Scorpion
--------

Continue with the scorpion from lesson 1:

* [Manipulating Files on the Command Line](../../scorpions/scorpion-01-command-line.md)

repository: praekeltfoundation/code-dojo

repo_name: praekeltfoundation/code-dojo


text:
# DAW Host Services

## Context

This project is an assignment for the _Web Application Development_ subject in the
Software Engineering Degree, at _University King Juan Carlos_, Spain (2020/2021).

## Logo

![alt text](artifacts/header.png)

## Table of Contents

**Phases 0 & 1**.
* [Introduction](#introduction)
  * [Team Members](#members)
* [Starting Decisions](#start)
  * [Theme](#theme)
  * [Entities](#entities)
  * [Roles and Permissions](#roles-and-perms)
  * [Images](#images)
  * [Charts](#charts)
  * [Third Party Technology](#third-tech)
  * [Advanced algorithm](#algorithm)
* [Visuals](#visuals)
  * [Screenshots](#screenshots)
  * [Navigation Diagram](#navigation)

**Phase 2**
* [Installation](#phase-2)
  * [Linux](#linux-install-linux-2)
  * [Windows](#linux-install-win-2)
* [Diagrams](#diagrams-2)
  * [Domain Entities](#diagrams-2-ed)
  * [Database EER](#diagrams-2-eer)
  * [Classes and Templates](#diagrams-2-ctd)
* [Members Participation](#members-part-2)

**Phase 3**
* [Installation](#phase-3)
* [API Documentation](#api-docs-3)
* [Classes and Templates Updated Diagram](#diagrams-3-ed)
* [Members Participation](#members-part-3)

**Phase 4**
* [Installation](#phase-4)
* [Angular Components Diagram](#diagrams-4-ed)
* [Demo Video](#demo-video)
* [Members Participation](#members-part-4)

# Introduction

The main objective of this application is to simulate, as closely as possible, a hosting provider.
A lot of different kinds of products will be available for rental, the products will be based on
multiple elegible configurations (_hardware and network specifications_). Each package rental will
have associated an expiration time (_before package usage time expires you need to renew it_).

## Team Members

| Full Name | Email | GitHub Profile |
| ------------- | ------------- | ------------- |
| Serghei Sergheev |<EMAIL_ADDRESS>| [sergheevdev](https://github.com/sergheevdev) |
| Allan Robert Cobb Bellido |<EMAIL_ADDRESS>| [Allanmaster](https://github.com/Allanmaster) |
| Álvaro Noguerales Ramos |<EMAIL_ADDRESS>| [Anogue](https://github.com/Anogue) |
| Alberto Mautone |<EMAIL_ADDRESS>| [albehma](https://github.com/albehma) |
| Alejandro José Rodriguez Montero |<EMAIL_ADDRESS>| [Alexrguez9](https://github.com/Alexrguez9) |

All the organisation will be done using a _Trello_ board.

## Phases 0 & 1

# Starting Decisions

### Theme

- The theme of the application a _marketplace_, to be more concise a server reseller.

### Entities

- **User**: a user will be the entity in charge of storing all kinds of information related to authentication.
- **Role**: a role or authority, holds a set of permissions that will allow a user perform certain actions.
- **Product**: is an entity that contains all the information related to the product (i.e. price, category and specs)
- **Order**: represents a product rental action and contains order attributes (i.e. rental date, expiration
  date, etc)
- **OneTimeDiscount**: will represent a one time discount sale, this is non-recurrent one time applied discount.
- **AccumulativeDiscount**: it will represent a discount as a reward for subsequent purchases in a concrete
  timespan and will contain a configuration (i.e. after 5 puchasing packages of a category, the next packages
  of the same kind, will be given an X% amount of discount)

### Roles and permissions

The previously mentioned _Role_ entity, will be responsible of holding all the permissions, a permission will
represent an additional action which the user can perform (i.e. see a page, perform special action, etc).

- **Visitor**: can read generic information about the business (i.e. homepage, about us, pricing).
- **Client**: can perform client tasks (i.e. order or cancel products, change profile information, check hired services).
- **Administrator**: can effectuate moderative and administrative actions (i.e. disable accounts, check statistics, modify clients).

### Images

- Each client will have its own _profile_ with an _avatar_.
- The website will be plenty of _icons_ to improve accesibility.
- The _administrator_ will be able to see client profile pictures when managing clients from panel.

### Charts

- The **administrator** control panel, will contain the weekly purchased services _pie chart_,
  weekly sales _time series chart_, and the total accumulated capital statistic.

### Third-party Additional Technology

- [Gmail API](https://developers.google.com/gmail/api): we will be using the Gmail API with Spring Email
  to send registration welcome messages and order receipts and server information to the clients.
- [Open PDF](https://github.com/LibrePDF/OpenPDF): we will also be using OpenPDF to generate PDF's for
  the product receipts in the client rented services area.

### Advanced Algorithm

We will be using two kinds of algorithms based on discounts for products:
1. Giving XX% non-recurrent discount on inauguration (or special events), this algorithm will be configurable.
2. Acummulative purchases, every X services you rent in a concrete timespan, given an additional XX% discount
   on subsequent purchases, all percentages also configurable.

# Visuals

### Screenshots

#### Visitor View

- **Homepage**: main page when you enter the application, it contains basic information.

![alt text](artifacts/screenshots/0001%20-%20homepage.jpeg)

- **Pricing**: specifies the price for each package configuration available to purchase.

![alt text](artifacts/screenshots/0002%20-%20pricing.jpeg)

- **About us**: describes the enterprise, its origins, present, and future.

![alt text](artifacts/screenshots/0003%20-%20about.jpeg)

- **Legal**: contains all legal, privacy & security, terms of use and trademarks.

![alt text](artifacts/screenshots/0004%20-%20legal.jpeg)

- **FAQ**: stands for frequently asked questions and contains the most asked questions about our services.

![alt text](artifacts/screenshots/0005%20-%20faq.jpeg)

- **Screenshots**: contains an overview of the user services panel and other interface stuff.

![alt text](artifacts/screenshots/0006%20-%20screenshots.jpeg)

- **Login**: page to perform the authentication and log-in into our account.

![alt text](artifacts/screenshots/0007%20-%20login.jpeg)

- **Register**: here we register providing our personal data and creating an account to become clients.

![alt text](artifacts/screenshots/0008%20-%20register.jpeg)

- **Error**: the page which is shown when the provided page does not exist or you're unauthorized:

![alt text](artifacts/screenshots/0019%20-%20error.jpeg)

#### Client View

- **My Services**: a page where you can see a list of your recently purchased services.

![alt text](artifacts/screenshots/0009%20-%20services.jpeg)

- **Profile**: allows you to modify your personal information details.

![alt text](artifacts/screenshots/0010%20-%20profile.jpeg)

- **Service**: where you manage your concretely selected service from the previous page.

![alt text](artifacts/screenshots/0011%20-%20active%20service.jpeg)

![alt text](artifacts/screenshots/0012%20-%20cancelled%20service.jpeg)

#### Admin View

- **Panel > Statistics**: chart section of the panel where you can easily track your sales.

![alt text](artifacts/screenshots/0013%20-%20panel%20statistics.jpeg)

- **Panel > Manage Clients**: client management section of the panel where you can disable,
  enable and check client profile information.

![alt text](artifacts/screenshots/0014%20-%20panel%20clients.jpeg)

- **Panel > One Time Discount**: one time discount sale management.

![alt text](artifacts/screenshots/0015%20-%20sale%20otd%20active.jpeg)
![alt text](artifacts/screenshots/0016%20-%20sale%20otd%20inactive.jpeg)

- **Panel > Accumulative Discount**: accumulative or recurrent sale management.

![alt text](artifacts/screenshots/0017%20-%20sale%20ad%20active.jpeg)
![alt text](artifacts/screenshots/0018%20-%20sale%20ad%20inactive.jpeg)

### Navigation Diagram

![alt text](artifacts/navigation_diagram.png)

## Phase 2

### Installation

Fully working traditional MVC application with all the backend implemented.

### Installation instructions for GNU/Linux (Ubuntu/Debian based systems)

**Implications of the scripts**:
1. Clones the repository to home directory (_removing the old cloned repo if present_).
2. Installs _Docker_, _Docker-Compose_ and _Maven_.
3. Builds the application packaging it to a _JAR_ file.
4. Builds a docker image of the currently build Spring application
5. Creates and runs two containers (application + mysql instance, in the same network).

**Installation steps**:

1. **Clone script**:

Create a new file, copy this script and give it execution permissions. This script just
clones the current code to your home directory.

```bash
#!/bin/bash
cd $HOME
rm -rf webapp11
git clone https://github.com/CodeURJC-DAW-2020-21/webapp11
```

**WARNING**: Before building and executing make sure you've set up the neccesary credentials
for all the .properties files in "webapp11/backend/src/main/resources/*".

2. **Build and execution script**:

Create a new file, copy this script and give it execution permissions. This script must
be executed with **sudo**.

```bash
#!/bin/bash
cd $HOME
cd webapp11/backend
chmod +x install_and_run.sh
./install_and_run.sh
```

### Installation instructions for Windows

**NOTE**: The first three steps can be easily automated by using a windows package manager like [Chocolatey](https://chocolatey.org/install).

1. Download and install [Docker Desktop](https://desktop.docker.com/win/stable/Docker%20Desktop%20Installer.exe)
2. Download and install [Maven](https://maven.apache.org/guides/getting-started/windows-prerequisites.html)
3. Download and install [Git](https://git-scm.com/download/win)
4. Clone the application repository with Git:

```cmd
git clone https://github.com/CodeURJC-DAW-2020-21/webapp11
```

5. Inside the cloned repository folder, go inside the "backend" folder.
6. Execute the maven command to compile the code:

```cmd
mvn clean install
```

7. Inside the "backend" folder go inside the "target" folder.
8. Copy the "marketplace-0.0.1-SNAPSHOT.jar" file to the "docker" folder.
9. Inside the "docker" folder, change the "_marketplace-0.0.1-SNAPSHOT.jar_" file name to "_marketplace.jar_"
10. Execute the docker image creation command:

```cmd
docker build -t daw-team-11/marketplace .
```

11. Run the docker compose file:

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

### Diagrams

#### Domain entities diagram

This diagram represents our domain entities and their associative
relationships (This diagram is just a quick overview so _methods
are ommited for sake of shortness_).

![alt text](artifacts/entity-diagram.png)

#### Database EER diagram

This diagram is an enhanced entity-relationship diagram (EER),
and this is basically an expanded version of ER diagrams, this
high-level model represents the relationship between the database
entities.

![alt text](artifacts/database-diagram.png)

#### Classes and templates diagram

This diagram is a classes and templates diagram of our application,
represents a high-level view of the entire application without going
too much into details, basically the flow of the requests thru the
controllers, services, repositories to the domain entities and the
response view associated to the request.

**Legend**:
- Yellow (_Views_) represent the view that is loaded upon a given request.
- Green (_Controllers_) represent the controllers that are our web adapters.
- Red (_Services_) self-contained unit of software that performs a specific task.
- Blue (_Repositories_) acts like a list of data, basically abstracts data access.
- Light Pink (_Domain_) represent our domain entities and their relationships.

![alt text](artifacts/classes-templates-diagram.png)

### Members Participation

#### Serghei Sergheev

This team member established the base application, security, worked on the algorithm (discounts), image uploading, and helped
team members with everything that was necessary.

| Number | Description | Commit | Focused on Files |
| ------------- | ------------- | ------------- | ------------- |
| #1 | Added security, draft entities and configuration | [> See commit](https://github.com/CodeURJC-DAW-2020-21/webapp11/commit/5175ef97cf93165e2a420507432f6c553bf1ac4d) | [UserServiceImpl.class](https://github.com/CodeURJC-DAW-2020-21/webapp11/blame/main/backend/src/main/java/es/urjc/code/daw/marketplace/service/UserServiceImpl.java)
| #2 | Added templates and static resources | [> See commit](https://github.com/CodeURJC-DAW-2020-21/webapp11/commit/44bd5c2b558dd319619c44c9ed5b4ad555dddba4) | [ProductServiceImpl.class](https://github.com/CodeURJC-DAW-2020-21/webapp11/blob/main/backend/src/main/java/es/urjc/code/daw/marketplace/service/ProductServiceImpl.java) |
| #3 | Fixed pricing and made it work | [> See commit](https://github.com/CodeURJC-DAW-2020-21/webapp11/commit/feb0b1af86083f7a07a62ea4986a50caa512fb30) | [ProductController.class](https://github.com/CodeURJC-DAW-2020-21/webapp11/blame/main/backend/src/main/java/es/urjc/code/daw/marketplace/web/product/controller/ProductController.java) |
| #4 | Added working profile pictures | [> See commit](https://github.com/CodeURJC-DAW-2020-21/webapp11/commit/9511b3e09a8ae888048898694c12be13804b8b0f) | [PictureServiceImpl.class](https://github.com/CodeURJC-DAW-2020-21/webapp11/blob/main/backend/src/main/java/es/urjc/code/daw/marketplace/service/PictureServiceImpl.java) |
| #5 | Added working sales | [> See commit](https://github.com/CodeURJC-DAW-2020-21/webapp11/commit/fce2e41f3f8b87266eeec5233692186b0f9b9d1e) | [OrderRepository.class](https://github.com/CodeURJC-DAW-2020-21/webapp11/blob/main/backend/src/main/java/es/urjc/code/daw/marketplace/repository/OrderRepository.java) |

#### Allan Robert Cobb

This team member mainly worked on the profile, pdf exportation, https, form functionality, cleaned code, fixed bugs and helped team members.

| Number | Description | Commit | Focused on Files |
| ------------- | ------------- | ------------- | ------------- |
| #1 | Added profile functionality | [> See commit](https://github.com/CodeURJC-DAW-2020-21/webapp11/commit/911176fb4427d532582fe3d06277331377f6a08e) | [UserController.class]() |
| #2 | Added HTTPS | [> See commit](https://github.com/CodeURJC-DAW-2020-21/webapp11/commit/7acdfe3fd6701778b48f5ac3f5f6c196754a63dd) | [ServerConfig.class](https://github.com/CodeURJC-DAW-2020-21/webapp11/blob/7acdfe3fd6701778b48f5ac3f5f6c196754a63dd/backend/src/main/java/es/urjc/code/daw/marketplace/config/ServerConfig.java) |
| #3 | Added PDF export functionality | [> See commit](https://github.com/CodeURJC-DAW-2020-21/webapp11/commit/6a27f3873a8d328bb96222db6541f64ef19d1b86) | [PdfExportServiceImpl.class](https://github.com/CodeURJC-DAW-2020-21/webapp11/blob/main/backend/src/main/java/es/urjc/code/daw/marketplace/service/PdfExporterServiceImpl.java) |
| #4 | Added accumulative discount form and fixes | [> See commit](https://github.com/CodeURJC-DAW-2020-21/webapp11/commit/f9069bd9c3e66ad59174baae6fa03790ce443ff7) | [ProductController.class](https://github.com/CodeURJC-DAW-2020-21/webapp11/blob/main/backend/src/main/java/es/urjc/code/daw/marketplace/web/product/controller/ProductController.java) |
| #5 | Cleaned code | [> See commit](https://github.com/CodeURJC-DAW-2020-21/webapp11/commit/d65f292669c155f33acbe1624c330e002706a40a) | [SaleServiceImpl.class](https://github.com/CodeURJC-DAW-2020-21/webapp11/blob/main/backend/src/main/java/es/urjc/code/daw/marketplace/service/SaleServiceImpl.java) |

#### Alberto Mautone

This team member mainly worked on the mailing service, the html generation, and register functionality, also
created the database diagram.

| Number | Description | Commit | Focused on Files |
| ------------- | ------------- | ------------- | ------------- |
| #1 | Added the mail service | [> See commit](https://github.com/CodeURJC-DAW-2020-21/webapp11/commit/6e0da3174d3d1f77e9804b99b84b470f61e82d5d) | [EmailServiceImpl.class](https://github.com/CodeURJC-DAW-2020-21/webapp11/blob/main/backend/src/main/java/es/urjc/code/daw/marketplace/service/EmailServiceImpl.java) |
| #2 | Added database diagram | [> See commit](https://github.com/CodeURJC-DAW-2020-21/webapp11/commit/9dbc1e20e0d5b52cf5a00383ecf58a6ef62d5b32) | [UserController.class](https://github.com/CodeURJC-DAW-2020-21/webapp11/blob/main/backend/src/main/java/es/urjc/code/daw/marketplace/web/user/controller/UserController.java) |
| #3 | Improved html generation for emails | [> See commit](https://github.com/CodeURJC-DAW-2020-21/webapp11/commit/83e54b12459833d2e8a61d5399d83966a4699e33) | [EmailContent.class](https://github.com/CodeURJC-DAW-2020-21/webapp11/blob/main/backend/src/main/java/es/urjc/code/daw/marketplace/util/EmailContent.java) |
| #4 | Added register functionality | [> See commit](https://github.com/CodeURJC-DAW-2020-21/webapp11/commit/91446619e9ee6c109d49082e0872ecbeb632fe20) | [OrderController.class](https://github.com/CodeURJC-DAW-2020-21/webapp11/blob/main/backend/src/main/java/es/urjc/code/daw/marketplace/web/order/controller/OrderController.java) |
| #5 | Fixed not displaying name when logged in error | [> See commit](https://github.com/CodeURJC-DAW-2020-21/webapp11/commit/3462c59b0ded0d2f47240c47e179067d16c64556) | [UserController.class](https://github.com/CodeURJC-DAW-2020-21/webapp11/blob/main/backend/src/main/java/es/urjc/code/daw/marketplace/web/user/controller/UserController.java) |

#### Alejandro José Rodriguez Montero

This team member mainly worked on the service overview, classes and templates diagram, pdf exportation and multiple bug fixes.

| Number | Description | Commit | Focused on Files |
| ------------- | ------------- | ------------- | ------------- |
| #1 | Added working service overview | [> See commit](https://github.com/CodeURJC-DAW-2020-21/webapp11/commit/4695410461b7f15d1717a6e337d83a675b583390) | [OrderController.class](https://github.com/CodeURJC-DAW-2020-21/webapp11/blob/main/backend/src/main/java/es/urjc/code/daw/marketplace/web/order/controller/OrderController.java) |
| #2 | Multiple bug fixes | [> See commit](https://github.com/CodeURJC-DAW-2020-21/webapp11/commit/892b078b420fce4756ee16122375ffb74d8521fd) | [SaleServiceImpl.class](https://github.com/CodeURJC-DAW-2020-21/webapp11/blame/main/backend/src/main/java/es/urjc/code/daw/marketplace/service/SaleServiceImpl.java) |
| #3 | Added classes and templates diagram | [> See commit](https://github.com/CodeURJC-DAW-2020-21/webapp11/commit/a9d63f5f99450cb79dfb238dfd853a986d8d5361) | [PdfExporterServiceImpl.class](https://github.com/CodeURJC-DAW-2020-21/webapp11/blob/main/backend/src/main/java/es/urjc/code/daw/marketplace/service/PdfExporterServiceImpl.java) |
| #4 | Beautified generated PDF format | [> See commit](https://github.com/CodeURJC-DAW-2020-21/webapp11/commit/17b1027ce63fbd161f17a0f87b20106a83b6d8b5) | [OrderServiceImpl.class](https://github.com/CodeURJC-DAW-2020-21/webapp11/blob/main/backend/src/main/java/es/urjc/code/daw/marketplace/service/OrderServiceImpl.java) |
| #5 | Fixed address and email restrictions | [> See commit](https://github.com/CodeURJC-DAW-2020-21/webapp11/commit/5f47970d2906e84ac354b33837bdcbb598e2267e) | [Order.class](https://github.com/CodeURJC-DAW-2020-21/webapp11/blame/main/backend/src/main/java/es/urjc/code/daw/marketplace/domain/Order.java) |

#### Álvaro Noguerales Ramos

This team member mainly worked on the services listing, one time discount, oders, and bug fixes, also created the entity diagram.

| Number | Description | Commit | Focused on Files |
| ------------- | ------------- | ------------- | ------------- |
| #1 | Added services listing | [> See commit](https://github.com/CodeURJC-DAW-2020-21/webapp11/commit/51b043bc02207646bcd2faba8ac0e56793a1ca28) | [OrderController.class](https://github.com/CodeURJC-DAW-2020-21/webapp11/blob/main/backend/src/main/java/es/urjc/code/daw/marketplace/web/order/controller/OrderController.java) |
| #2 | Added working one time discount form | [> See commit](https://github.com/CodeURJC-DAW-2020-21/webapp11/commit/33b6c0ddeabafc23e65ba237cef9fdc297f66ec1) | [ProductController.class](https://github.com/CodeURJC-DAW-2020-21/webapp11/blame/main/backend/src/main/java/es/urjc/code/daw/marketplace/web/product/controller/ProductController.java) |
| #3 | Fixed multiple bugs | [> See commit](https://github.com/CodeURJC-DAW-2020-21/webapp11/commit/7e5e4131603d34db69297ec7d02288f33e952de3) | [UserController.class](https://github.com/CodeURJC-DAW-2020-21/webapp11/blob/main/backend/src/main/java/es/urjc/code/daw/marketplace/web/user/controller/UserController.java) |
| #4 | Added entity diagram | [> See commit](https://github.com/CodeURJC-DAW-2020-21/webapp11/commit/bab79b7722ac715524d545a0dfbd13f1fe05f4cf) | [UserServiceImpl.class](https://github.com/CodeURJC-DAW-2020-21/webapp11/blame/main/backend/src/main/java/es/urjc/code/daw/marketplace/service/UserServiceImpl.java)
| #5 | Improved discount applicability | [> See commit](https://github.com/CodeURJC-DAW-2020-21/webapp11/commit/1bafa39d43949420d651e14282fe30c50261c96a) | [SaleServiceImpl.class](https://github.com/CodeURJC-DAW-2020-21/webapp11/blame/main/backend/src/main/java/es/urjc/code/daw/marketplace/service/SaleServiceImpl.java) |

## Phase 3

## Installation

### Dependencies (or Prerequisites)

Make sure you have installed:
- Docker Engine
- Docker Desktop (Windows only)
- Docker Compose
- Maven
- OpenJDK 11 (Necessary for Maven to build the JAR before packaging it)

Fully working traditional MVC and REST API application.

### Installation instructions

**Installation steps**:

1. **Clone repository**:

Clone this repository using Git Command Line (Linux or Windows)

Sample script for Linux:
```bash
#!/bin/bash
cd $HOME
rm -rf webapp11
git clone https://github.com/CodeURJC-DAW-2020-21/webapp11
```

**WARNING**: Before building and executing make sure you've set up the neccesary credentials
for all the .properties files (for email messages, https certificates, etc)
in "webapp11/backend/src/main/resources/*".

2. **Build and execution script**:

Go inside the "webapp11/docker" directory, and open the console, then execute one of the
following scripts: **_create_image.sh_** (linux) or **_create_image.bat_** (windows).

You may also check [our published docker image here](https://hub.docker.com/r/dawhost/marketplace).

## API Documentation

The documentation that represents all the REST API endpoints can be viewed in 3 different ways:
- Rendered HTML Static Page [(Click to view the page)](https://rawcdn.githack.com/CodeURJC-DAW-2020-21/webapp11/89222b4850b75515fb1302abe5b497bd85267418/api-docs/api-docs.html)
- Plain Text HTML [(Click to view the page)](https://github.com/CodeURJC-DAW-2020-21/webapp11/blob/main/api-docs/api-docs.html)
- YAML Document Format [(Click to view the page)](https://github.com/CodeURJC-DAW-2020-21/webapp11/blob/main/api-docs/api-docs.yaml)

If you want to test the API make sure to check our postman collections:
- Admin collection [(Click to view the collection)](https://github.com/CodeURJC-DAW-2020-21/webapp11/blob/main/artifacts/phase%203/postman/admin_postman_collection.json)
- Client collection [(Click to view the collection)](https://github.com/CodeURJC-DAW-2020-21/webapp11/blob/main/artifacts/phase%203/postman/client_postman_collection.json)
- Visitor collection [(Click to view the collection)](https://github.com/CodeURJC-DAW-2020-21/webapp11/blob/main/artifacts/phase%203/postman/visitor_postman_collection.json)

Note: those collections have two defined variables:
- _**{{token}}**_: represents the current token value with the bearer included, i.e. "Token rj88jf348jf438jf48..."
- _**{{address}}**_: represents the url of the current server, i.e. "https://localhost:8443"

## Classes and Templates Updated Diagram

This diagram is a classes and templates diagram of our application,
represents a high-level view of the entire application without going
too much into details, basically the flow of the requests thru the
controllers, rest controllers, services, repositories to the domain
entities and the response views or DTO's associated to the request/response.

**Legend**:
- Yellow (_Views_) represent the view that is loaded upon a given request.
- Green (_Web Controllers_) represent the controllers that are our web adapters.
- Light Gray (_Data Transfer Objects_) represent the interface layer representation of the domain model.
- Purple (_Rest Controllers_) represent the rest controllers that are our web adapters.
- Red (_Services_) self-contained unit of software that performs a specific task.
- Blue (_Repositories_) acts like a list of data, basically abstracts data access.
- Light Pink (_Domain_) represent our domain entities and their relationships.

![alt text](artifacts/clasesytemplates.png)

### Members Participation

#### Serghei Sergheev

This team member added the skeleton structure of the rest application, security (jwts), error handling, postman collections, bugfixes, and helped
team members with everything that was necessary.

| Number | Description | Commit | Focused on Files |
| ------------- | ------------- | ------------- | ------------- |
| #1 | Added JWT (Json Web Tokens) auth | [> See commit](https://github.com/CodeURJC-DAW-2020-21/webapp11/commit/f2fceb1201f5fee6d6ca6532691c60e3dc8c92cb) | [TokenRestController.class](https://github.com/CodeURJC-DAW-2020-21/webapp11/blob/main/backend/src/main/java/es/urjc/code/daw/marketplace/api/jwt/controller/TokenRestController.java) |
| #2 | Added Postman Collections | [> See commit](https://github.com/CodeURJC-DAW-2020-21/webapp11/commit/fad5000847df15a82296dec2bec76e56cf87007a) | [OrderRestController.class](https://github.com/CodeURJC-DAW-2020-21/webapp11/blob/main/backend/src/main/java/es/urjc/code/daw/marketplace/api/order/controller/OrderRestController.java) |
| #3 | Refactored REST API for best practices | [> See commit](https://github.com/CodeURJC-DAW-2020-21/webapp11/commit/3acb49075913c56a8c9fa7590d9a5d498c1f8dd1) | [ProductRestController.class](https://github.com/CodeURJC-DAW-2020-21/webapp11/blob/main/backend/src/main/java/es/urjc/code/daw/marketplace/api/product/controller/ProductRestController.java) |
| #4 | Integrated image retrieval in find user | [> See commit](https://github.com/CodeURJC-DAW-2020-21/webapp11/commit/039e42e05617eee8a62a7970cc950776ca74219f) | [SaleRestController.class](https://github.com/CodeURJC-DAW-2020-21/webapp11/blob/main/backend/src/main/java/es/urjc/code/daw/marketplace/api/sale/controller/SaleRestController.java) |
| #5 | Performed general improvements  | [> See commit](https://github.com/CodeURJC-DAW-2020-21/webapp11/commit/fac231e27e154d3742383219cec9ab9e5a465b71) | [UserRestController.class](https://github.com/CodeURJC-DAW-2020-21/webapp11/blob/main/backend/src/main/java/es/urjc/code/daw/marketplace/api/user/controller/UserRestController.java) |

#### Allan Robert Cobb

This team member mainly worked on the order and statisctics controllers, the creation of docker batch scripts (and other docker windows related stuff), helped testing the docker containers and helped team members.
| Number | Description | Commit | Focused on Files |
| ------------- | ------------- | ------------- | ------------- |
| #1 | Implemented Order Mapper and FinderOrderResponseDto | [> See commit](https://github.com/CodeURJC-DAW-2020-21/webapp11/commit/7b5ee8cbc7e9c64130dfdde9db86435f1284ff3b) | [OrderRestController.class](https://github.com/CodeURJC-DAW-2020-21/webapp11/blob/main/backend/src/main/java/es/urjc/code/daw/marketplace/api/order/controller/OrderRestController.java) |
| #2 | Added findServices method (from OrderRestController) | [> See commit](https://github.com/CodeURJC-DAW-2020-21/webapp11/commit/232ee3b7f3d1966ac61d91fc8f62a5cfe06d2c07) | [RestOrderMapper.class](https://github.com/CodeURJC-DAW-2020-21/webapp11/blob/main/backend/src/main/java/es/urjc/code/daw/marketplace/api/order/mapper/RestOrderMapper.java) |
| #3 | Added exportOrderToPdf method (from OrderRestController) | [> See commit](https://github.com/CodeURJC-DAW-2020-21/webapp11/commit/40493fae6f253c2f6971d3bbeff9dd36e3e93f3a) | [StatisticsRestController.class](https://github.com/CodeURJC-DAW-2020-21/webapp11/blob/main/backend/src/main/java/es/urjc/code/daw/marketplace/api/statistics/controller/StatisticsRestController.java) |
| #4 | Created StatisticsResponseDto & StatisticsRestController | [> See commit](https://github.com/CodeURJC-DAW-2020-21/webapp11/commit/3856f1c4fb40ddea2b1ccc46ae0b99459ac267fc) | [FindOrderResponseDto.class](https://github.com/CodeURJC-DAW-2020-21/webapp11/blob/main/backend/src/main/java/es/urjc/code/daw/marketplace/api/order/dto/FindOrderResponseDto.java) |
| #5 | Created windows batch docker script | [> See commit](https://github.com/CodeURJC-DAW-2020-21/webapp11/commit/eaa64fd3a68ca59d2f221dac4994b2256da58df7) | [create_image.bat](https://github.com/CodeURJC-DAW-2020-21/webapp11/blob/main/docker/create_image.bat) |

#### Alberto Mautone

This team member mainly worked on the sales REST API section, the creation, disabling of the sales, also the adaptation of the existent services to work for both rest and web controllers.

| Number | Description | Commit | Focused on Files |
| ------------- | ------------- | ------------- | ------------- |
| #1 | Added "updates current accumulative discount" | [> See commit](https://github.com/CodeURJC-DAW-2020-21/webapp11/commit/eda3ce02ad5a66e6b5d9e70c0dce4fef8f9cb555) | [SaleRestController.class](https://github.com/CodeURJC-DAW-2020-21/webapp11/blob/main/backend/src/main/java/es/urjc/code/daw/marketplace/api/sale/controller/SaleRestController.java) |
| #2 | Added "disables current one time discount" | [> See commit](https://github.com/CodeURJC-DAW-2020-21/webapp11/commit/cafa1b3ccb3191dd237036cbec442fc24de0ad82) | [RestSaleMapper.class](https://github.com/CodeURJC-DAW-2020-21/webapp11/blob/main/backend/src/main/java/es/urjc/code/daw/marketplace/api/sale/mapper/RestSaleMapper.java) |
| #3 | Documented SalesRestController | [> See commit](https://github.com/CodeURJC-DAW-2020-21/webapp11/commit/9619041900d1481b36b26c796cf61e7e824024ab) | [UserRestController.class](https://github.com/CodeURJC-DAW-2020-21/webapp11/blob/main/backend/src/main/java/es/urjc/code/daw/marketplace/api/user/controller/UserRestController.java) |
| #4 | Added "disables current accumulative discount" | [> See commit](https://github.com/CodeURJC-DAW-2020-21/webapp11/commit/bf83ab0982b789f92832c9c301846bf543530124) | [RestUserMapper.class](https://github.com/CodeURJC-DAW-2020-21/webapp11/blob/main/backend/src/main/java/es/urjc/code/daw/marketplace/api/user/mapper/RestUserMapper.java) |
| #5 | Updated UserRestController | [> See commit](https://github.com/CodeURJC-DAW-2020-21/webapp11/commit/7f31d4a0034798cec41e5753137cd56496466123) | [UserServiceImpl.class](https://github.com/CodeURJC-DAW-2020-21/webapp11/blob/main/backend/src/main/java/es/urjc/code/daw/marketplace/service/UserServiceImpl.java) |

#### Alejandro José Rodriguez Montero

This team member participated on several controlers, mostly focused on product and order rest controllers.

| Number | Description | Commit | Focused on Files |
| ------------- | ------------- | ------------- | ------------- |
| #1 | Added the obtaining products method | [> See commit](https://github.com/CodeURJC-DAW-2020-21/webapp11/commit/b8ebf4f42b78a47cdf460f72cd6bd99ae2835b48) | [ProductRestController.class](https://github.com/CodeURJC-DAW-2020-21/webapp11/blob/main/backend/src/main/java/es/urjc/code/daw/marketplace/api/product/controller/ProductRestController.java) |
| #2 | Added purchase products method | [> See commit](https://github.com/CodeURJC-DAW-2020-21/webapp11/commit/7fd6968edd768667d3658fa2df224ddce1203dfe) | [OrderRestController.class](https://github.com/CodeURJC-DAW-2020-21/webapp11/blob/main/backend/src/main/java/es/urjc/code/daw/marketplace/api/order/controller/OrderRestController.java) |
| #3 | Documented with open api | [> See commit](https://github.com/CodeURJC-DAW-2020-21/webapp11/commit/9cc88df2f7e9866a7562361b0bf0019e32bccd30) | [UserServiceImpl.class](aaaaaaaaaaaaaaa) |
| #4 | Added PlaceOrderResponseDto | [> See commit](https://github.com/CodeURJC-DAW-2020-21/webapp11/commit/24cfa7df0c1bd6f28a0cf92cf0a12ea1fd42d9f8) | [PlaceOrderResponseDto.class](https://github.com/CodeURJC-DAW-2020-21/webapp11/blob/main/backend/src/main/java/es/urjc/code/daw/marketplace/api/order/dto/PlaceOrderResponseDto.java) |
| #5 | Update OrderRestController and ProductRestController | [> See commit](https://github.com/CodeURJC-DAW-2020-21/webapp11/commit/1a7631f8e93930ab34439b478c5ad87690207dca) | [UpdateOrderRequestDto.class](https://github.com/CodeURJC-DAW-2020-21/webapp11/blob/main/backend/src/main/java/es/urjc/code/daw/marketplace/api/order/dto/UpdateOrderRequestDto.java) |

#### Álvaro Noguerales Ramos

This team member mainly focused on the sale rest controllers and the different discounts.

| Number | Description | Commit | Focused on Files |
| ------------- | ------------- | ------------- | ------------- |
| #1 | Added "Find otd" in rest controller | [> See commit](https://github.com/CodeURJC-DAW-2020-21/webapp11/commit/ad244160a96c72c18b43a1640f8469e7095dc020) | [SaleRestController.class](https://github.com/CodeURJC-DAW-2020-21/webapp11/blob/main/backend/src/main/java/es/urjc/code/daw/marketplace/api/sale/controller/SaleRestController.java) |
| #2 | Added "Find ad" in rest controller | [> See commit](https://github.com/CodeURJC-DAW-2020-21/webapp11/commit/4ba85577f211f3ed24e7d4f1edfcf7dae334b959) | [SaleRestController.class](https://github.com/CodeURJC-DAW-2020-21/webapp11/blob/main/backend/src/main/java/es/urjc/code/daw/marketplace/api/sale/controller/SaleRestController.java) |
| #3 | Added "Update otd" in rest controller | [> See commit](https://github.com/CodeURJC-DAW-2020-21/webapp11/commit/76f8a1e067bcd08b3a6c45e00ed517b28eb5b4f2) | [SaleRestController.class](https://github.com/CodeURJC-DAW-2020-21/webapp11/blob/main/backend/src/main/java/es/urjc/code/daw/marketplace/api/sale/controller/SaleRestController.java) |
| #4 | Added documented api error  | [> See commit](https://github.com/CodeURJC-DAW-2020-21/webapp11/commit/4a169cb29b4967b7e329f49d925a547386a32d6d) | [SaleRestController.class](https://github.com/CodeURJC-DAW-2020-21/webapp11/blob/main/backend/src/main/java/es/urjc/code/daw/marketplace/api/sale/controller/SaleRestController.java) |
| #5 | Modified routes for REST API best practices  | [> See commit](https://github.com/CodeURJC-DAW-2020-21/webapp11/commit/5d93d7b37e5e7c9ed7e2bcf9674c51b739eb86ba) | [SaleRestController.class](https://github.com/CodeURJC-DAW-2020-21/webapp11/blob/main/backend/src/main/java/es/urjc/code/daw/marketplace/api/sale/controller/SaleRestController.java) |

## Phase 4

## Installation

### Dependencies (or Prerequisites)

Make sure you have installed:
- Docker Engine
- Docker Desktop (Windows only)
- Docker Compose

Fully working angular, traditional MVC and REST API application.

### Installation instructions

**Installation steps**:

1. **Clone repository**:

Clone this repository using Git Command Line (Linux or Windows)

Sample script for Linux:
```bash
#!/bin/bash
cd $HOME
rm -rf webapp11
git clone https://github.com/CodeURJC-DAW-2020-21/webapp11
```

**WARNING**: Before building and executing make sure you've set up the neccesary credentials
for all the .properties files (for email messages, https certificates, etc)
in "webapp11/backend/src/main/resources/*".

2. **Build and execution script**:

Go inside the "webapp11" directory, and open the console, then run the following command:

```
docker build -t dawhost/marketplace -f ./docker/Dockerfile .
```

**WARNING**: the build can take even half an hour for the first time (without having the cache) so
feel free to go and get a coffee.

When the build finishes you can start your application by going inside of the "docker" directory
and running the following command:

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

You may also check [our published docker image here](https://hub.docker.com/r/dawhost/marketplace).

## Angular Components Diagram

This diagram is a components diagram of our angular frontend application,
represents a high-level view of the entire frontend structure without going
too much into detail, basically the flow of the requests thru the services,
mappers, models and components.

**Legend**:
- Blue (_Components_) are the components of our application (different pieces of html, css, ts).
- Green (_Services_) are the boundary that communicates with our REST API.
- Red (_Mappers_) map the received data to the desired display domain model.
- Yellow (_Models_) represent the display entities with on the expected form to be displayed in the interface.

![alt text](artifacts/angular.png)

## Demo video

[![IMAGE ALT TEXT HERE](https://img.youtube.com/vi/WOHzH2nY8YU/0.jpg)](https://www.youtube.com/watch?v=WOHzH2nY8YU)

### Members Participation

#### Serghei Sergheev

This member stablished the base separation of components, made the control panel and
helped with the whole refactorization and services part, also a huge part of the
dockerization and made the diagram. He helped all team members and collaborated in
the video realisation.

| Number | Description | Commit | Focused on Files |
| ------------- | ------------- | ------------- | ------------- |
| #1 | Finished fully working panel | [> See commit](https://github.com/CodeURJC-DAW-2020-21/webapp11/commit/ab74c068b3063b24eab390328e7de7d2516dfb17) | [Login Service](https://github.com/CodeURJC-DAW-2020-21/webapp11/blob/main/frontend/angular/marketplace/src/app/services/login.service.ts) |
| #2 | Huge refactoring (charts, stats, etc) | [> See commit](https://github.com/CodeURJC-DAW-2020-21/webapp11/commit/86b756aa6f65b959f424e714920eb735e632fe07) | [Order Service](https://github.com/CodeURJC-DAW-2020-21/webapp11/blob/main/frontend/angular/marketplace/src/app/services/order.service.ts) |
| #3 | Refactored login component | [> See commit](https://github.com/CodeURJC-DAW-2020-21/webapp11/commit/cbadfc0af07505f2e4184718bc840f86e71ff4f4) | [User Service](https://github.com/CodeURJC-DAW-2020-21/webapp11/blob/main/frontend/angular/marketplace/src/app/services/user.service.ts) |
| #4 | Service overview (pdf, renew, cancel) | [> See commit](https://github.com/CodeURJC-DAW-2020-21/webapp11/commit/5700389a83a47ce39570c051fa9f8e84bbaf523b) | [Control Panel](https://github.com/CodeURJC-DAW-2020-21/webapp11/blob/main/frontend/angular/marketplace/src/app/components/panel/panel.component.ts) |
| #5 | Dockerfile refactoring | [> See commit](https://github.com/CodeURJC-DAW-2020-21/webapp11/commit/16b3fb0648243efc1bd91b30e6b28c9e3320a1e8) | [Charts](https://github.com/CodeURJC-DAW-2020-21/webapp11/blob/main/frontend/angular/marketplace/src/app/components/panel/category-purchases-chart/category-purchases-chart.component.ts) |

#### Allan Robert Cobb

This member has mostly worked on the about and services components, a part from
fixing certain bugs, adding the SPA controller for angular in spring and tried
to start the dockerization (added batch compilation) and also colaborated in a
huge part in the realization of the video.

| Number | Description | Commit | Focused on Files |
| ------------- | ------------- | ------------- | ------------- |
| #1 | Added about and services components | [> See commit](https://github.com/CodeURJC-DAW-2020-21/webapp11/commit/0c24eed51b19bae7aed91c7bedb982eb9099bac4) | [About Component](https://github.com/CodeURJC-DAW-2020-21/webapp11/blob/main/frontend/angular/marketplace/src/app/components/about/about.component.ts) |
| #2 | Fixed broken htmls | [> See commit](https://github.com/CodeURJC-DAW-2020-21/webapp11/commit/4ae04f14bf1138ee7fdb7583a2e34dfba4cbadb7) | [Services Component](https://github.com/CodeURJC-DAW-2020-21/webapp11/blob/main/frontend/angular/marketplace/src/app/components/services/services.component.ts) |
| #3 | Added load orders for my services | [> See commit](https://github.com/CodeURJC-DAW-2020-21/webapp11/commit/8db9eddf2849542670525b2eda6337f173dab355) | [Broken Htmls](https://github.com/CodeURJC-DAW-2020-21/webapp11/blob/main/frontend/angular/marketplace/src/app/components/services/services.component.html) |
| #4 | Added SPAController and draft batch | [> See commit](https://github.com/CodeURJC-DAW-2020-21/webapp11/commit/67e1d02a77ee5b91fee957b2fc806f045de3f624) | [SPA Controller](https://github.com/CodeURJC-DAW-2020-21/webapp11/blob/main/backend/src/main/java/es/urjc/code/daw/marketplace/web/SPAController.java) |
| #5 | Added draft dockerfile | [> See commit](https://github.com/CodeURJC-DAW-2020-21/webapp11/commit/a81550bd9e267c3fe12af0b4fe1fde6861440b96) | [Batch draft Angular build](https://github.com/CodeURJC-DAW-2020-21/webapp11/blob/main/docker/angular.bat) |

#### Alberto Mautone

This member participated mostly on the authentication components such as the
login and registration of users, a part from fixing bugs in the rest api and
in the broken htmls.

| Number | Description | Commit | Focused on Files |
| ------------- | ------------- | ------------- | ------------- |
| #1 | Updated register component | [> See commit](https://github.com/CodeURJC-DAW-2020-21/webapp11/commit/3ace73853a811f6256451430eaf2c2f05d71b6c3) | [Login Component](https://github.com/CodeURJC-DAW-2020-21/webapp11/blob/main/frontend/angular/marketplace/src/app/components/login/login.component.ts) |
| #2 | Updated login component | [> See commit](https://github.com/CodeURJC-DAW-2020-21/webapp11/commit/a8a8163237dc6bbcf07e98d067a4010eac7601c7) | [Login broken html](https://github.com/CodeURJC-DAW-2020-21/webapp11/blob/main/frontend/angular/marketplace/src/app/components/login/login.component.html) |
| #3 | Initial login and register page | [> See commit](https://github.com/CodeURJC-DAW-2020-21/webapp11/commit/22d58ef97877c186df19111794e31d39af0c43c4) | [Register Component](https://github.com/CodeURJC-DAW-2020-21/webapp11/blob/main/frontend/angular/marketplace/src/app/components/register/register.component.ts) |
| #4 | Added base login components | [> See commit](https://github.com/CodeURJC-DAW-2020-21/webapp11/commit/97cf6bbab8a180065acbfb0134d1f9e8b755972f) | [Register broken html](https://github.com/CodeURJC-DAW-2020-21/webapp11/blob/main/frontend/angular/marketplace/src/app/components/register/register.component.html) |
| #5 | Fixed user rest controller bug | [> See commit](https://github.com/CodeURJC-DAW-2020-21/webapp11/commit/7f31d4a0034798cec41e5753137cd56496466123) | [User Rest Controller](https://github.com/CodeURJC-DAW-2020-21/webapp11/blob/7f31d4a0034798cec41e5753137cd56496466123/backend/src/main/java/es/urjc/code/daw/marketplace/api/user/controller/UserRestController.java) |

#### Alejandro José Rodriguez Montero

This member has worked on several components such as the service overview, the
screenshots and legal components, fixed broken htmls, and several merges and
also helped to add the service overview animation.

| Number | Description | Commit | Focused on Files |
| ------------- | ------------- | ------------- | ------------- |
| #1 | Added service, screenshots and legal components | [> See commit](https://github.com/CodeURJC-DAW-2020-21/webapp11/commit/da6dadc05c5d677661b0f43f5cbf77e25ad91a62) | [Service Component](https://github.com/CodeURJC-DAW-2020-21/webapp11/blob/main/frontend/angular/marketplace/src/app/components/service/service.component.ts) |
| #2 | Fixed broken htmls | [> See commit](https://github.com/CodeURJC-DAW-2020-21/webapp11/commit/61b5092994cb2f4af4da345ed2540d53621a8ae4) | [Screenshots Component](https://github.com/CodeURJC-DAW-2020-21/webapp11/blob/main/frontend/angular/marketplace/src/app/components/screenshots/screenshots.component.html) |
| #3 | Merge modifications 1 | [> See commit](https://github.com/CodeURJC-DAW-2020-21/webapp11/commit/efc95b12a5912105e93a4d793403c1465e3f0ca5) | [Legal Component](https://github.com/CodeURJC-DAW-2020-21/webapp11/blob/main/frontend/angular/marketplace/src/app/components/legal/legal.component.html) |
| #4 | Merge modifications 2 | [> See commit](https://github.com/CodeURJC-DAW-2020-21/webapp11/commit/d418912e489dc4888362b5a9261a6654b9625112) | [Service broken html](https://github.com/CodeURJC-DAW-2020-21/webapp11/blob/main/frontend/angular/marketplace/src/app/components/service/service.component.html) |
| #5 | Added service ts animation draft | [> See commit](https://github.com/CodeURJC-DAW-2020-21/webapp11/commit/1f9d7bbb13af802c483cffa6b06058ae0486d271) | [Legal broken html](https://github.com/CodeURJC-DAW-2020-21/webapp11/blob/main/frontend/angular/marketplace/src/app/components/legal/legal.component.html) |

#### Álvaro Noguerales Ramos

This member has worked on a lot of components such as the error, the faq, the
homepage and the profile components, has fixed broken htmls, updated profile,
cleanuped and refactored several parts of the components.

| Number | Description | Commit | Focused on Files |
| ------------- | ------------- | ------------- | ------------- |
| #1 | Added error, faq, home and profile components | [> See commit](https://github.com/CodeURJC-DAW-2020-21/webapp11/commit/8230568cae5a76d63e48c9438d6fada0ab68b3ea) | [Error Component](https://github.com/CodeURJC-DAW-2020-21/webapp11/blob/main/frontend/angular/marketplace/src/app/components/error/error.component.html) |
| #2 | Fixed broken htmls | [> See commit](https://github.com/CodeURJC-DAW-2020-21/webapp11/commit/4edc401c30701b820a9f6b3af913fbe681b82797) | [Faq Component](https://github.com/CodeURJC-DAW-2020-21/webapp11/blob/main/frontend/angular/marketplace/src/app/components/faq/faq.component.html) |
| #3 | Updated profile component | [> See commit](https://github.com/CodeURJC-DAW-2020-21/webapp11/commit/064afcadfbb492d9eff4bf578e605336271c8338) | [Home Component](https://github.com/CodeURJC-DAW-2020-21/webapp11/blob/main/frontend/angular/marketplace/src/app/components/home/home.component.html) |
| #4 | Cleanup unused imports | [> See commit](https://github.com/CodeURJC-DAW-2020-21/webapp11/commit/42f22629f3d41fa12b6ebf9840bddc142f679528) | [Profile Component](https://github.com/CodeURJC-DAW-2020-21/webapp11/blob/main/frontend/angular/marketplace/src/app/components/profile/profile.component.ts) |
| #5 | Fixed old error code | [> See commit](https://github.com/CodeURJC-DAW-2020-21/webapp11/commit/40bffac43c14aa76b8fef15601011afa996a25ce) | [Profile broken html](https://github.com/CodeURJC-DAW-2020-21/webapp11/blob/main/frontend/angular/marketplace/src/app/components/profile/profile.component.html) |

branch_name: refs/heads/main


text:
---
title: JE Meeting 02/27/19
---

# JE Meeting 02/27/19

talk forces me to focus on headlines
what am I really saying if I only have this much bandwidth?

Steve: expressions are the way to go
JE: that's the whole FP thing
Steve: what about that all FP isn't FP enough like my last paper
JE: Haskell is imperitive is already a thing. already too general a point
JE: lots of people are waking up to monads aren't great and now are exciting about algebraic effects
JE: this feels too much of a common message
JE: FRP feels like the core of your message for a while

explaining pure frp / conal to humans
good enough for salon
key: explain denotational religion to normal people
how neat would this be and explain some of the benfits
but here's where it falls down and open problems
it's not there yet
have to admit its more complicated than ex. the elm architecture or something

more modest claim is more interesting than a solution
promising idea is better gives people something to do

relational database were denegrated because too inefficient compared to my hand-optimized hand traversal algoritms, but they were wrong because we could have a general-purpose optimizer that does better than people... when people complain about sql they don't hand-write queries but just optimize sql... it doesn't solve everything buts its known as a big win. parser generators are another great example of this. there are technical connections between the two query optimization. why can't we do this for programming? focus on semantics and have a smart compiler do the optimiziation? programming is premature optimizaion handling bits and pointers...

fp is about the what not the how, but it breaks down when we get big stateful systems. the advanges are irrelevant when simulating imperitive so we need to go further, so we need to go further and get the true semantics of them so we don't encode sequential semantics. it's frp but we haven't figured out how to do it yet.

the story is about the failed promise of functional programming: was about to solve all our problems by getting rid of all our implementation details

how the hell is memoization so hard in FP? why doesn't naive fib work? https://wiki.haskell.org/Memoization

specification langauges throw aroudn quantifiers and sets and there are no way to implement those searches. prolog is done via searching and you specify how the searching happens. easy to check if specification is correct, but really hard to generate. like cryptography.

there's no one essential complexity, but for any problem, there's some incidental and we're looking for better ways of reducing incidental complexity. there's no one optimal way of programming, but some ways have more complexity than others for variuos problems.

for a wide class of problems, fp removes a lot of complexity that imperitive programing has.

fp makes progress by getting rid of inesseitnal state, but when state is essential fp has problems. so what do we do when state is essential? FRP is an answer there.

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

the talk to give at salon is the talk motivating your research. get up there and explain what I'm working on to my fellow researchers. this is your problem statement. here's why I think this is an interesting idea that has promise that'll revolutionize the world.

one option is to tell the story of how I became convinced of this way over the other ways.

then explain how there are open problems that need to be solved and which ones I'm working on now.

the talk can be really different from the paper. don't worry about the paper, just put your talk together. when it's done we'll make a call on what to do with the paper.

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

jquery --> neat but suffers from mutable state, etc

trying to do fp UI with fay (silly poem?) --> a nightmare, just simulates jquery

reactJS --> I fell in love. but there wasn't a great story for updating state

Redux / Elm architecture --> I fell in love again. Then I worked on a large redux app and realized the out of tarpit problem

Read staltz article about where the arrow lives. Fell in love with CycleJS. Const everywhere. Problems: hot and cold observables. Elm architecture again. String ids to connect things.

Finally found my way back to Conal FRP and struggled for a while and eventually got it. Problems: no popular libraries (most in Haskell), doesn't transition to HTML-type interfaces well, really hard to work with the types (visualize things) http://soft.vub.ac.be/~cfscholl/ProWeb17/ProWeb_2017_paper_5.pdf

Benefits of it:
  - denotative, so only subexpressions and no action at a distance
  - no strings ids to connect things, solve recursive knot with true recursion (but the fixpoint thing is a total nightmare)
  - less random apis (redux middleware, hot and cold observables) but harder to implement (no great ones)

Ultimately I want  modular/proportional understanding. I don't want my head to hurt. (Watching kids untangle messes. I don't want to give people the rope to hang themselves.)

1. the arrow must live at the mutated thing - no action at a distance
2. the computer must be able to staticly determine what could affect what (redux and string connectors are too messy)
3. the api should be as simple as possible  - least amount of arbitrary concepts, like middleware, dependency injection, etc... maybe cut this part out....?

Maybe add stuff about JQuery blocks, react blocks, js projectional editors to what isn't harmful...?

license: Unlicense

gha_license_id: Unlicense


text:
# DevSecOps

## Test

### Test configuration control and audit

#### Description

#### Inputs

#### Outputs

#### Tool Dependencies

Test
configuration
control and audit
Track test and security scan
results;
Generate action items;
Make go/no-go decision to the
next phase.
(There may be several
iterations for several tests
across stages)
Test results;
Security scan and
compliance scan
report
Version
controlled test
results;
Action items;
Go/no-go
decision
Team
collaboration
system;
Issue tracking
system;
CI/CD
orchestrator

repository: rogelioii/devsecops

repo_name: rogelioii/devsecops


text:
# InRule Samples

## Rule Application Cache

This sample shows how you can use irSDK to do the following:

* Set the cache depth
* Set the cache retention
* Set a custom cache policy
* Explicitly cache a Rule Application
* Implicitly cache a Rule Application

repository: InRule/Samples

gha_language: C#

repo_name: InRule/Samples


text:
# Hastlayer SDK Readme

## Overview

[Hastlayer](https://hastlayer.com/) - be the hardware. Hastlayer automatically transforms [.NET](https://www.microsoft.com/net/) assemblies into computer chips, improving performance and lowering power consumption for massively parallel applications.

Hastlayer uses [FPGAs](https://en.wikipedia.org/wiki/Field-programmable_gate_array) (chips that can be "re-wired" on the fly): Simply select the compute-bound part of your .NET program, and Hastlayer seamlessly swaps it out with a generated FPGA implementation. Since .NET Intermediate Language assemblies (but not C#, VisualBasic or other code) are transformed, you can use any .NET language (e.g. C#, VB, F# - sample included, C++, Python, PHP, and JavaScript) in theory.

Hastlayer was also featured on [.NET Conf 2017](https://channel9.msdn.com/events/dotnetConf/2017/T212) and [many other conferences and meetups](https://hastlayer.com/hastlayer-world-tour). The [recorded session](https://channel9.msdn.com/events/dotnetConf/2017/T212) covers interesting features of Hastlayer (it's also on [YouTube](https://www.youtube.com/watch?v=03Sq5m3eUSs)). Check out the [FAQ](https://hastlayer.com/faq) for more information.

This is the PC-side component of Hastlayer, the one that transforms .NET assemblies, programs attached FPGAs, and communicates with said FPGAs.

Created by [Lombiq Technologies](https://lombiq.com/), an open source .NET web development company working mostly with [Orchard CMS](https://orchardproject.net).

Hastlayer uses [ILSpy](http://ilspy.net/) to process CIL assemblies and [Orchard Application Host](https://github.com/Lombiq/Orchard-Application-Host) to utilize [Orchard](http://orchardproject.net/) as the application framework.

## Notes on Hastlayer's documentation

These text files should only serve as a starting point. The samples are the best source of information on how to use Hastlayer. The public API of Hastlayer is also documented inline as code comments. Please check the comments for clarification. The projects also have README files.

## Table of contents

- [Getting started](Docs/GettingStarted.md)
- [Working with Hastlayer](Docs/WorkingWithHastlayer.md)
- [Developing Hastlayer](Docs/DevelopingHastlayer.md)
- [Release notes](Docs/ReleaseNotes.md)
- [Roadmap](Docs/Roadmap.md)
- [Support](Docs/Support.md)

## Repository and contributing

The project's source is available in a [git repository on GitHub](https://github.com/Lombiq/Hastlayer-SDK). Note that due to a repository purge the repo history doesn't contain anything from before July 2017 though development has been ongoing more or less actively from 2015.

Bug reports, feature requests and comments are warmly welcome and feel free to send pull requests too.

This project is developed by [Lombiq Technologies Ltd](https://lombiq.com/). Commercial-grade support is available through Lombiq.

repository: awsassets/Hastlayer-SDK

repo_name: awsassets/Hastlayer-SDK


text:
---
name: 'Bug Report'
about: 'Create a report about a bug or problem'
title: ''
labels: ''
assignees: ''
---

### Important information

Android version:

mpv-android version:
<!-- You can find this under Settings > Advanced > Version information -->
<!-- If you have compiled mpv-android yourself instead of using one of the release builds, MAKE SURE TO MENTION THIS. -->

Which version of mpv-android introduced the problem (if known):

### Description

Describe your issue in detail here.

If the circumstances in which it appears are not obvious, provide step-by-step instructions that can be reliably used to reproduce the issue.

### Log output

The Android SDK includes a tool named [`logcat`](https://developer.android.com/studio/command-line/logcat) that is used to view application and system log messages on device.
You will need a computer to view these logs.
Logs pertaining to mpv can be collected like this:

	adb logcat -s 'mpv:*' '*:F'

You can attach text files on Github directly or use sites like https://0x0.st/ to upload your logs.
Depending on the nature of the bug, a log file might not be required and you can *omit this section*. If in doubt provide one, it will help us find possible issues later.

### Additional information

If your issue is only reproducible with a specific (type of) file, provide a short sample file that can be used to reproduce the problem.
You can again use https://0x0.st/ or other cloud storage to share it.

If your issue relates to a certain set of configuration options, provide a full copy of your `mpv.conf` below.

If no additional information is provided please *delete this section*.

repository: mpv-android/mpv-android

gha_language: Kotlin

repo_name: mpv-android/mpv-android


text:
# Real Estate

* Largest financial commitment for most households
* Emotional attachment to ownership
* Down payments = 20%, Closing costs = 3%-5%
* On average ownership is better than bonds/bills and worse than equity in terms of returns.

## Benefits of Renting
* Liquidity
* Location Flexibility
* Diversification of investments
* No maintenance

## Benefits of Buying
* Leveraged investment whose gains accrue to the owner
* Tax benefits
* Long term investment
* Financial control over asset improvements
* Income from renting


text:
# Containers: You Better Get on Board, PowerShell Edition

## Presenter: Anthony Nocentino

### Date: 20 Oct 2021

### Twitter: [@nocentino](https://twitter.com/nocentino)

### GitHub: [Anthony Nocentino](https://github.com/nocentino)

### Website: <http://www.nocentino.com/blog>

### Summary

Containers are taking over, changing the way systems are developed and deployed…and that's not hyperbole. Just imagine if you could deploy SQL Server or even your whole application stack in just minutes. You can do that using containers!

Join Anthony Nocentino for a look at how to get your container journey started, learn some common container scenarios and introduce deployment orchestration with Kubernetes. In this session, we will look at Container Fundamentals, Common Container Scenarios, Deploying Applications in Containers, Running PowerShell in Containers and Kubernetes and Orchestration
with Kubernetes

Speaker Bio:
Anthony Nocentino is a Principal Field Solutions Architect at Pure Storage, Pluralsight Author, and Microsoft Data Platform MVP. He designs solutions, deploys the technology, and provides expertise on business system performance, architecture, and security. Anthony has a Bachelor's and Master's in Computer Science with research publications in high performance/low latency data access algorithms and spatial database systems.

[All Repos](https://github.com/nocentino?tab=repositories)
[Presentations](https://github.com/nocentino/Presentations)

url: https://raw.githubusercontent.com/rtpsug/Meetups/a77ff85c200c87a2216f1abd4ffde8a87a30d2d2/2021/10-October/Anthony Nocentino - Containers - You Better Get on Board - PowerShell Edition/README.md

repository: rtpsug/Meetups

gha_language: HTML

repo_name: rtpsug/Meetups


text:
# CloudAcademy Downloader
This python script was built to download videos and subtitles from cloudacademy.com only for personal offline purpose and self-study.

## Disclaimer

This tool is meant to be used only if your CloudAcademy account supports
lecture downloads.

## Installation instructions
This script requires Python 3 and a CloudAcademy account.
Tested on Linux, Mac and Windows platform.\
First clone this repository in any directory and then run the requirements.txt
```
$ git clone https://github.com/P4ntruka/cloudacademy-dl.git
Cloning into 'cloudacademy-dl'...

$ cd cloudacademy-dl
$ pip install -r requirements.txt
```

## Usage Instructions
```sh
cloud-academy-dl.py <url course> --cookie=file.txt
```
The URL must be the full qualifier from the course, when you see all video list in the left side of the video player.
__`Windows platform user: URL must be in double quotes`__
__`Linux/Mac platform user: URL must be in single or double quotes`__

The **--cookie** argument must be a text file with your cookies, for that, you must loggin on cloud academy and then make right click to inspect the website.
In the **Network tab** mark the **XHR** option and look for a request with **'config'** name in the left side of requests, select all **request header**, copy and save it into a text file.

![cookie example](https://user-images.githubusercontent.com/36051334/85949355-42dd9300-b924-11ea-98e9-6f332f197f0d.jpeg)

**Mandatory: The Request Header must have the 'authorization' and 'cookie' fields in your text file:**

__`"You only need generate the request header file once then can be used multiple time to download until your session expired from server."`__

```
:authority: cloudacademy.com
:method: GET
:path: /api/v3/reports/categories/course/
:scheme: https
accept: application/json
accept-encoding: gzip, deflate, br
accept-language: *
authorization: Bearer eyJ..........
cookie: _gcl_au=123abc....
referer: https://cloudacademy.com/
sec-fetch-dest: empty
sec-fetch-mode: cors
sec-fetch-site: same-origin
user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.106 Safari/537.36
```
# Optional arguments
```
The optional command line arguments for the script are:

--help              Prints out the list of command line arguments.
--res=<resolution>  The required video resolution. Allowed values are 360,
                    720, and 1080. The default value for this argument is
                    1080.
--out=<output_dir>  The directory where the videos are saved. If this command
                    line argument is not specified, then they will be saved in
                    current directory under courses/.
```

# Downloading videos & new features

If error appear while download, you can run again the script to check your downloaded files and if they're not corrupted.\
If any file is corrupted, the script will start downloading again from that point.

![corrupted_file](https://user-images.githubusercontent.com/36051334/85954604-ac6e9900-b946-11ea-8130-fb7a4c693615.png)

__`Icons only available on Mac(oh-my-zsh)`__

repository: beingfluid/cloudacademy-dl

repo_name: beingfluid/cloudacademy-dl


text:
# About

This is a very simple and heavily untested exporter for ActiveCollab. It produces
a CSV file suitable for importing a project into Jira.

The code is provided as-is. I will not be accountable for anything you do or break using it.
So read it and make sure it suits you.

I will not provide support or any updates, as I am not using ActiveCollab any more. Merge
requests will be welcome though (I will not be able to test them).

# Usage

Edit `jira/create_export.php` to fit your needs. You will most certainly need to only change the configuration on top.
You will probably even change the `form` on top (adding options).

Then upload the whole `jira/`-folder to your server and open `https://your-domain.name/jira/create_export.php`,
enter all details (fill out the form) and grab a nice CSV export.

**Note:** The script is not particularly well protected.  Be sure to
set the secret to something safe and only keep the script on your server for as short as possible. I suggest
using a local separate installation where nobody can access the script.

# About the export

* Task lists are exported as Epics to Jira (not optimal, but I think the best way)
* Tickets will be exported including subtasks (type "Task" and "Sub-task")
* The state of the ticket can either be "Open"/"To Do" or "Done"
  * When "Done" the Resolution is set to "Done", too
* Attachments to tickets and comments are exported as Jira issue attachments (no comment attachments possible)
* Important tickets get the priority "Highest"
* Subscribers will be exported as Jira watchers
* Estimation will be exported as the "Original Estimation", NO logged work will be exported
* The export will try to preserve the ticket number when providing the Jira projectKey
  * If not provided some relations between tickets will fail
  * Meaning: Always provide the projectKey
* Mentions will be imported
  * We made the assumption that username==email
  * If thats not right for you, change the code!
* Labels will be exported
  * Note: Jire will not import Labels containing whitespace correctly
* ActiveCollab texts (task description and comments) will be converted to Markdown and then processed to be
  somewhat Jira compatible. I did not put much effort into this and Jira does not use Markdown. But this worked
  fine for us for most cases. Change this if neccessary.
* Trashed items will not be exported.

## Required configuration

* Set `$SECRET` to something only you know, don't share this!
* Set `$AC_BASE_URL` to your ActiveCollab installation URL (including a trailing slash)

## The export form

* `Secret`: The Secret you configured. This is a minimal and sloppy way to prevent other using the script. (And **NOT** really secure)
* `projectId`: The ActiveCollab project ID. See URL when opening a project in ActiveCOllab, the numeric bits.
* `projectKey`: The project key the project will have in Jira. This is optional, but really set it, I mean, **REALLY**.
* `openStatus`: The status your open issues should have. Could be `Open` or `To Do`.
* `doneStatus`: The status your completed issues should have. Normally `Done`.
* `doneResolution`: The resolution your open issues should have. Normally `Done`.
* `hiddenSecurityLevel`: Decide whether to export "Hidden from client". WILL NOT BE IMPORTED, but may help change this manually after the import. (see https://jira.atlassian.com/browse/JRASERVER-64636)

# About the import

* Use the provided file `CSV-configuration.txt` to have a pre-configuration for the import

## After the import

* Check users in the Jira project, all users will be "Developer"'s, probable change that
* "Hidden from client" tasks will be visible to the client.
* Archive the ActiveCollab project ;-)

gha_language: PHP


text:
## Last Week's Accomplishments
	This week I began working on my first bug. The issue I was trying to fix is that a student user is allowed to verify their own submission when only instructors should have access to this feature. I began by figuring out where the validate button is created which was in the the submissionCard.html file. The button would only should if the upload was not verified yet, so I should just need to add a check to see if the user a is an instructor or not. There is a function to check whether the user is an instructor or not within the submissionView.controller file but it does not seem to work. I used console logs to check the value of the isInstructor variable after the function is executed and the variable evaluates to false when the user is an instructor or a student. I tried to figure out what was causing this issue but could not. Instead I documented both component files so the code was easier to understand.

## This Week's Plan

This week I hope to figure out the problem described above so I can fix the bug.

## Anything Blocking?

I do not understand why isInstructor is false for both a student user and an instructor user.

## Notes

> This is an optional section for any sort of information that does not fall under any of the other categories.

repository: thomasdurkin/rcos-status-updates

repo_name: thomasdurkin/rcos-status-updates


text:
# Hubot Groupme
[![npm](https://img.shields.io/npm/v/hubot-groupme.svg)](https://www.npmjs.com/package/hubot-groupme)

Groupme adapter for hubot

## Installation

In your hubot repo, run:
`npm install --save hubot-groupme`

## Running
To use this adapter run hubot with the adapter argument

`./bin/hubot -a groupme`

Or set the adapter environment variable

`export HUBOT_ADAPTER="groupme"`

### Configuration

Three environment variables must be set. You can get these by creating a bot on the [GroupMe API bot page](https://dev.groupme.com/bots)

* `HUBOT_GROUPME_ROOM_ID`: a GroupMe chat room ID. ex: `"111222"`
* `HUBOT_GROUPME_TOKEN`: a GroupMe access token. ex: `"mFKYryFoTjdPkKGd9shvjwnMunSSOLvhs44498Fc"`
* `HUBOT_GROUPME_BOT_ID`: a GroupMe bot ID token. ex: `"66J7ZcVwlRTqEQvdSLNnmV69wV"`

### Source

Forked from [cdzombak/hubot-groupme-http](https://github.com/cdzombak/hubot-groupme-http)
to support the updated Groupme V3 API


text:
---
layout: default
title: Building Autotools
---

Use of GNU Autoconf, Automake, and Libtool (and m4)
===================================================

This procedure is **ONLY** necessary if you are building from a Git clone of
the PMIx repository. If you have a PMIx distribution tarball, this procedure is
unnecessary – you can (and should) skip reading this section.

If you are building PMIx from a repository clone, you must first install fairly
recent versions of the GNU tools Autoconf, Automake, and Libtool (and possibly
GNU m4, because recent versions of Autoconf have specific GNU m4 version
requirements). You can check what versions of the autotools you have installed
with the following:

```shell
    shell$ m4 –version
    shell$ autoconf –version
    shell$ automake –version
    shell$ libtoolize –version
```

To strengthen the above point: the core PMIx developers typically use very,
very recent versions of the GNU tools. There are known bugs in older versions
of the GNU tools that PMIx no longer compensates for (it seemed senseless to
indefinitely support patches for ancient versions of Autoconf, for example).
You **WILL** have problems if you do not use recent versions of the GNU tools.

If you need newer versions, you are strongly encouraged to heed the following advice:

NOTE: On MacOS/X, the default “libtool” program is different than the GNU libtool. You must download and install the GNU version (e.g., via MacPorts, Homebrew, or some other mechanism).

 1. Unless your OS distribution has easy-to-use binary installations, the sources can be can be downloaded from:
	- ftp://ftp.gnu.org/gnu/autoconf/
	- ftp://ftp.gnu.org/gnu/automake/
    - ftp://ftp.gnu.org/gnu/libtool/

   and if you need it:
    - ftp://ftp.gnu.org/gnu/m4/

	NOTE: It is certainly easiest to download/build/install all four of these
	tools together. But note that PMIx has no specific m4 requirements; it is
	only listed here because Autoconf requires minimum versions of GNU m4.
	Hence, you may or may not need to actually install a new version of GNU m4.
	That being said, if you are confused or don’t know, just install the latest
	GNU m4 with the rest of the GNU Autotools and everything will work out
	fine.

 2. Build and install the tools in the following order:
	- m4
    - Autoconf
    - Automake
    - Libtool

 3. You **MUST** install the last three tools (Autoconf, Automake, Libtool)
	into the same prefix directory. These three tools are somewhat
	inter-related, and if they’re going to be used together, they MUST share a
	common installation prefix. You can install m4 anywhere as long as it can
	be found in the path; it may be convenient to install it in the same prefix
	as the other three. Or you can use any recent-enough m4 that is in your
	path.
	- It is strongly encouraged that you do not install your new versions over
	  the OS-installed versions. This could cause other things on your system
	  to break. Instead, install into $HOME/local, or /usr/local, or wherever
	  else you tend to install “local” kinds of software.
	- In doing so, be sure to prefix your $path with the directory where they
	  are installed. For example, if you install into $HOME/local, you may want
	  to edit your shell startup file (.bashrc, .cshrc, .tcshrc, etc.) to have
	  something like:

		```
            # For bash/sh:
            export PATH=$HOME/local/bin:$PATH
            # For csh/tcsh:
            set path = ($HOME/local/bin $path)
		```

	- Ensure to set your $path **BEFORE** you configure/build/install the four packages.

 4. All four packages require two simple commands to build and install (where
    PREFIX is the prefix discussed in 3, above).

	```
        shell$ cd m4-1.4.13
        shell$ ./configure –prefix=PREFIX
        shell$ make; make install
	```

	- If you are using the csh or tcsh shells, be sure to run the "rehash"
	  command after you install each package.

	```
        shell$ cd ../autoconf-2.68
        shell$ ./configure –prefix=PREFIX
        shell$ make; make install
	```

	- If you are using the csh or tcsh shells, be sure to run the
      "rehash" command after you install each package.

	```
        shell$ cd ../automake-1.11.1
        shell$ ./configure –prefix=PREFIX
        shell$ make; make install
	```

	- If you are using the csh or tcsh shells, be sure to run the "rehash"
	  command after you install each package.

	```
        shell$ cd ../libtool-2.2.8
        shell$ ./configure –prefix=PREFIX
        shell$ make; make install
	```

	- If you are using the csh or tcsh shells, be sure to run the
      "rehash" command after you install each package.

  m4, Autoconf and Automake build and install very quickly; Libtool will take a minute or two.

 5.  You can now run PMIx’s top-level autogen.pl script. This script will invoke the GNU Autoconf, Automake, and Libtool commands in the proper order and setup to run PMIx’s top-level "configure" script.

	- You generally need to run autogen.pl only when the top-level file
	  "configure.ac" changes, any files in the config directory change, or any
	  .m4 file in a plugin directory changes.
	- You **do NOT** need to re-run autogen.pl if you modify a Makefile.am.

Use of Flex
===========

Flex may be used during the compilation of a developer’s checkout (it is not
used to build official distribution tarballs). Other flavors of lex are not
supported: given the choice of making parsing code portable between all flavors
of lex and doing more interesting work on PMIx, we greatly prefer the latter.

Note that no testing has been performed to see what the minimum version of Flex
is required by PMIx. We suggest that you use v2.5.35 at the earliest.

Note that the flex-generated code generates some compiler warnings on some
platforms, but the warnings do not seem to be consistent or uniform on all
platforms, compilers, and flex versions. As such, we have done little to try to
remove those warnings.

If you do not have Flex installed, it can be downloaded from the
[Flex](http://flex.sourceforge.net/) site