text:
#REACT BOOTSTRAP SYMFONY FORM

This part of the bundle seeks to generate a form using the standards already implemented by Symfony (Version 4.1+) and Bootstrap (Version 4.1+)  The only change is the removal of the render template, replaced by a manager class that defines the template for the form to be displayed.

The bundle provides integration of some Symfony validation, uses the Symfony Form Type definitions, and uses the form handler to validate data return to the backend.

This documentation uses a build case in a project I have been working on to illustrate the process of using the **REACT BOOTSTRAP SYMFONY FORM**

###Getting Started
Like all pages in Symfony, the controller is used to create a route and pass off to the various managers to collect the data so the view can be rendered.  The controller code:

    /**
     * editColumn
     *
     * @param TimetableColumnManager $manager
     * @param $id
     * @param string $tabName
     * @return \Symfony\Component\HttpFoundation\Response
     * @throws \Exception
     * @Route("/timetable/column/{id}/edit/{tabName}", name="edit_column")
     * @Security("is_granted('USE_ROUTE', ['manage_columns'])")
     */
    public function editColumn(TimetableColumnManager $manager, $id, $tabName = 'details')
    {
        $manager->find($id);

        $form = $this->createForm(TimetableColumnType::class, $manager->getEntity());

        return $this->render(
            'Timetable/column_edit.html.twig',
            [
                'form' => $form,
                'manager' => $manager,
                'tabName' => $tabName,
            ]
        );
    }
The **TimetableColumnManager** is an entity manager/provider that holds entity, but you can do this as you normally do. The TimetableColumnManager implements the **Hillrange\Form\Util\FormManagerInterface**, required to define template for the form.

The controller passes the created form, generated in the usual manner to the the render.  Note the the full form (*Symfony\Component\Form\FormInterface*) is passed to the render, not the usual formView (*Symfony\Component\Form\FormView*).  The formView is rendered within the template.  As example the render template is:

    {% trans_default_domain "Timetable" %}

    {% extends "Default/template.html.twig" %}

    {% block title %}{{ parent() }}{{ 'Edit Timetable Column'|trans }}{% endblock title %}
    {% block headerTitle %}{{ 'Edit Timetable Column'|trans }}{% endblock headerTitle %}
    {% block headerLead %}{% endblock headerLead %}

    {% block contentContainer %}
       {% include 'Default/wait.html.twig' %}
    {% endblock contentContainer %}

    {% block javascripts %}
       {{ parent() }}
       {{ renderForm(form, manager, 'columnTemplate')|raw }}
    {% endblock javascripts %}

and the only part of the *Default/template.html.twig* that is important for defining form is:

    <div id="pageContent">
        {% block contentContainer %}
            {{ 'No content'|trans }}
        {% endblock contentContainer %}
    </div>
which defines to target for the REACT content.  **id="pageContent"**.  Using the template that I will define below, this results in the following display.
![REACT Display Tab](ReactRender1.jpg)
Image One

So lets start the deep dive into the template definition.

###Template Definition
The render process is handled by the call to **renderForm** in the twig template above.  The renderForm method is passed three attributes, the FormInterface, the TemplateManager (FormManagerInterface) and the name of the template. (*This is set for future expansion to allow multiple forms on a single page.*)

The TemplateManager must provide a property equal to the name of the template (columnTemplate) or a getter for the template name.  In this case the getter in the TemplateManager is:

    /**
     * getColumnTemplate
     *
     * @return array
     */
    public function getColumnTemplate(): array
    {
        return [
            'form' => [
                'url' => '/timetable/column/{id}/save/',
                'url_options' => [
                    '{id}' => 'id'
                ],
            ],
            'tabs' => [
                'details' => $this->getDetailsTab(),
                'columnRow' => $this->getColumnRowsTab(),
            ],
        ];
    }
The template is defined as follows. The template must have one of this optional tabs or container:

* **form** *(Mandatory)*
    * url *(Mandatory)*: The url path of the route used to save the form.
    * url_options *(optional)*: array of options that are used to modify the url for the specific entity details.
    * method *(optional)*: defaults to post. Allowed values are:
        * post
        * get
    * encType *(optional)*: defaults to application/x-www-form-urlencoded' Allowed values are:
        * application/x-www-form-urlencoded
        * text/plain
        * multipart/form-data
* **tabs** *(optional)*
    * name *(Mandatory)*: The name of the tab.  Must be unique.
    * container *(Mandatory)*: See details for a [Container](#container).
    * label *(optional)*: Defaults to false, This label is translated and displayed on the tab.
    * label_params *(optional)*: Defaults to an empty array, but defines translation parameters for the label.
    * display *(optional)*: Defaults to true, or can be the name of a function in the TemplateManager that returns a boolean value.
* **container** *(optional)*: See details for a [Container](#container).

####Container
The container is used to hold the template of a page or tab.  It can have the following definition.  All options in a container default to false:
* panel *(optional)*:
    * label *(Mandatory)*: This label is translated and displayed on the panel header.
    * colour *(optional)*: Defaults to info.  Uses the colours as defined in the bootstrap cards as per [Bootstrap Colours.](https://getbootstrap.com/docs/4.1/utilities/colors/)
    * description *(optional)*: Defaults to false, and is translated as a paragraph under the panel header.
    * buttons *(optional)*: Defaults to false.  Can be set an and array of buttons.  See [Button Definition](#button-definition) for details to define a button.
    * label_params *(optional)*: Defaults to an empty array, but defines translation parameters for the label.
    * description_params *(optional)*: Defaults to an empty array, but defines translation parameters for the description.
    * rows *(optional)*: Defaults to an empty array, but required if a collection is not defined. Defined as per the Row Definition.
    * collectionRows *(optional)*: Defaults to false. These rows are repeated for a collection data and are defined as per the [Row Definition](#row-definition).
    * headerRow *(optional)*: A header row.  Defaults to false See [Row Definition](#row-definition).
* class *(optional)*: Defaults to false. The class (React className) applied to the container \<div> element.
* rows *(optional)*: Defaults to false.  If panel or collection is not defined, then must be defined.  See [Row Definition](#row-definition).
* headerRow *(optional)*: A header row.  Defaults to false See Row Definition.
* collection *(optional)*: Defaults to false. An array defined in Collection Definition.

####Row Definition
Each row must have the following mandatory parameters:
* class: The class (React className) applied to the row \<div> element.
* columns: An array of columns within the row. See [Column Definition](#column-definition)

####Column Definition
All of the parameters for a Column are optional.
* form: Defaults to false or an array of the form name => style, where the style = row ow widget.
* label: This label is translated and displayed on the column header.  Mostly used in a header row member.
* label_params: Defaults to an empty array, but defines translation parameters for the label.
* class: Defaults to false. The class (React className) applied to the column \<div> element. e.g. col-2
* buttons: Defaults to false.  Can be set an array of buttons.  See [Button Definition](#button-definition) for details to define a button.
* container: See details for a [Container](#container). NB: a recursive call to an container to be built inside the column.
* rows: See details for a [Row Definition](#row-definition). NB: a recursive call to rows to be built inside the column.
* collection_actions: Action buttons to be applied to each member of a collection.  If set to true, all the buttons found in this column are rendered for the collection member.

####Button Definition
* type *(Mandatory)*: a string that selects the type of button. Allowed values are:
    * save: The save button uses a url to push data to the backend.
    * ~~submit~~: not currently implemented.
    * add: Add a member to a collection.  Can use a url to do backend work as required.
    * delete: Delete a member of a collection. Can use a url to do backend work as required.
    * return: Return to a previous page using a url.
    * close: Close the current page.
    * ~~duplicate~~: Not currently implemented. Duplicate a member of a collection using a url for backend work as required.
    * ~~up~~: Not currently implemented. Move a member of a collection up one position.
    * ~~down~~: Not currently implemented. Move a member of a collection down one position.
* mergeClass *(optional)*: Defaults to '' (empty string.) Merge this string into button element class.
* style *(optional)*: Defaults to false, or an array of style types as defined by REACT (so use camelCase names.) e.g. backgroundColor => 'red'
* options*(optional)*: An array of details about the form element associated with this button.  The only option avaialable is eid = element identifier.  For a collection, the eid can be set to the name or the id or the full_name of the collection member.  (Smoke and Mirrors.)
* url *(optional)*: The url path of the route used by this button.
* url_options *(optional)*: array of options that are used to modify the url for the specific entity details.
* url_type *(optional)*: Defaults to 'json', or can be 'redirect'
    * json: Does a json ajax call to the backend and returns the form and messages.
    * redirect: Open a page with the url given. (Replace the page.)
* display *(optional)*: defaults to true. Add a method name in the TemplateManager to return a boolean result.
* colour *(optional)*: each button has a default colour.  It can be change by setting this coulour as per [Bootstrap Background Colours](https://getbootstrap.com/docs/4.1/utilities/colors/#background-color).

####Collection Definition
To use collections in the react form render, you must use the __*ReactCollectionType*__. This adds functionality to the standard *CollectionType* to better handle collection members.  Please ensure that you use this type when you define your Collection, so that the functionality is correctly added so the renderer works correctly.  One of the additions is the use of option **sort_manage**, that sets both *allow_up*, and *allow_down* in the standard CollectionType
* form *(Mandatory)*: an array of the form name => style, where the style = row ow widget.
* rows *(Mandatory)*: See [Row Definition](#row-definition).
* buttons *(optional)*: Defaults to false.  Can be set an array of buttons.  See [Button Definition](#button-definition) for details to define a button.
* sortBy *(optional)*: Defaults to false. An array (max count of 3) of collection child names with disrection of sort.

###Example 1 ( a Tab)
Render Image One above

    /**
     * getDetailsTab
     *
     * @return array
     */
    private function getDetailsTab(): array
    {
        return [
            'name' => 'details',
            'label' => 'Details',
            'container' => [
                'panel' => [
                    'colour' => 'info',
                    'label' => 'Manage Timetable Column',
                    'buttons' => [
                        [
                            'type' => 'save',
                        ],
                        [
                            'type' => 'return',
                            'url' => '/timetable/column/list/',
                            'url_type' => 'redirect',
                        ],
                    ],
                    'rows' => [
                        [
                            'class' => 'row',
                            'columns' => [
                                [
                                    'class' => 'col-4 card',
                                    'form' => ['name' => 'row'],
                                ],
                                [
                                    'class' => 'col-4 card',
                                    'form' => ['nameShort' => 'row'],
                                ],
                                [
                                    'class' => 'col-4 card',
                                    'form' => ['dayOfWeek' => 'row'],
                                ],
                            ],
                        ],
                    ],
                ],
            ],
        ];
    }

###Example 2 ( a Tab)

    /**
     * getColumnRowsTab
     *
     * @return array
     */
    private function getColumnRowsTab(): array
    {
        return [
            'name' => 'rows',
            'label' => 'Column Rows',
            'container' => [
                'panel' => [
                    'colour' => 'info',
                    'label' => 'Timetable Column Rows: %{name}',
                    'label_params' => ['%{name}' => $this->getEntity()->getName()],
                    'buttons' => [
                        [
                            'type' => 'save',
                        ],
                        [
                            'type' => 'return',
                            'url' => '/timetable/column/list/',
                            'url_type' => 'redirect',
                        ],
                    ],
                    'rows' => [
                        [
                            'class' => 'row',
                            'columns' => [
                                [
                                    'container' => [
                                        'class' => 'container',
                                        'headerRow' => [
                                            'class' => 'row row-header text-center',
                                            'columns' => [
                                                [
                                                    'class' => 'col-2',
                                                    'label' => 'Name',
                                                ],
                                                [
                                                    'class' => 'col-2',
                                                    'label' => 'Abbrev.',
                                                ],
                                                [
                                                    'class' => 'col-2',
                                                    'label' => 'Start Time',
                                                ],
                                                [
                                                    'class' => 'col-2',
                                                    'label' => 'End Time',
                                                ],
                                                [
                                                    'class' => 'col-2',
                                                    'label' => 'Column Type',
                                                ],
                                                [
                                                    'class' => 'col-2',
                                                    'label' => 'Actions',
                                                ]
                                            ],
                                        ],
                                        'collection' => [
                                            'form' => 'timetableColumnRows',
                                            'sortBy' => [
                                                'timeStart' => 'ASC',
                                            ],
                                            'buttons' => [
                                                'add' => [
                                                    'mergeClass' => 'btn-sm',
                                                    'type' => 'add',
                                                    'style' => [
                                                        'float' => 'right',
                                                    ],
                                                ],
                                                'delete' => [
                                                    'mergeClass' => 'btn-sm',
                                                    'type' => 'delete',
                                                    'url' => '/timetable/column/'.$this->getEntity()->getId().'/row/{cid}/delete/',
                                                    'url_options' => [
                                                        '{cid}' => 'data_id',
                                                    ],
                                                    'url_type' => 'json',
                                                    'options' => [
                                                        'eid' => 'name',
                                                    ],
                                                ],
                                            ],
                                            'rows' => [
                                                [
                                                    'class' => 'small row row-striped',
                                                    'columns' => [
                                                        [
                                                            'class' => 'col-2',
                                                            'form' => ['name' => 'widget'],
                                                        ],
                                                        [
                                                            'class' => 'col-2',
                                                            'form' => ['nameShort' => 'widget'],
                                                        ],
                                                        [
                                                            'class' => 'col-2',
                                                            'form' => ['timeStart' => 'widget'],
                                                        ],
                                                        [
                                                            'class' => 'col-2',
                                                            'form' => ['timeEnd' => 'widget'],
                                                        ],
                                                        [
                                                            'class' => 'col-2 text-right',
                                                            'form' => ['type' => 'widget'],
                                                        ],
                                                        [
                                                            'class' => 'hidden',
                                                            'form' => ['timetableColumn' => 'row'],
                                                        ],
                                                        [
                                                            'class' => 'col-2 text-center align-self-center',
                                                            'form' => ['id' => 'row'],
                                                            'collection_actions' => true,
                                                            'buttons' => [
                                                                'save' => [
                                                                    'mergeClass' => 'btn-sm',
                                                                    'type' => 'save',
                                                                ],
                                                            ],
                                                        ],
                                                    ],
                                                ],
                                            ],
                                        ],
                                    ],
                                ],
                            ],
                        ],
                    ],
                ],
            ],
        ];
    }

![REACT Collection Tab](ReactRender2.jpg)

####Saving a Form Data to the Backend

    /**
     * editColumnSave
     *
     * @param int $id
     * @param Request $request
     * @param FormManager $formManager
     * @param TimetableColumnManager $manager
     * @return JsonResponse
     * @throws \Exception
     * @Route("/timetable/column/{id}/save/", name="edit_column_save")
     * @Security("is_granted('USE_ROUTE', ['manage_columns'])")
     */
    public function editColumnSave(int $id, Request $request, FormManager $formManager, TimetableColumnManager $manager)
    {
        $entity = $manager->find($id);

        $form = $this->createForm(TimetableColumnType::class, $entity);

        $data = json_decode($request->getContent(), true);

        $form->submit($data);

        if ($form->isValid())
        {
            $manager->getEntityManager()->persist($entity);
            $manager->getEntityManager()->flush();
        }

        return new JsonResponse(
            [
                'form' => $formManager->extractForm($form),
                'messages' => $formManager->getFormErrors($form),
            ],
            200);
    }
For the example I have separated out the save logic.  The data here is posted via a json, and therefore the data is not stored in the Request in the same manner, so the form uses the submit, rather than handleRequest. This applies all of the standard Symfony logic to escape inputs for security and cross site attack and validation.
The FormManager has methods to extract the form in the correct format for the react render script.
####Message Management
Messages need to be returned as an array with each message in the format of:
* message: translated message to be displayed.
* level: The status level (danger, success, warning, info) using bootstrap colour settings to indicate the message status.

repository: crayner/symfony-form

repo_name: crayner/symfony-form


text:
kivantium
==============
[![Build Status](https://travis-ci.org/kivantium/kivantium.svg?branch=master)](https://travis-ci.org/kivantium/kivantium)

The core of kivantium CPU.

For more information, please check [Wiki](https://github.com/kivantium/kivantium/wiki).

Progress
--------
- 2016/10/11 `syscall` and `ori` are partially implemented. (able to run `simulator/test/ori.asm`)
- 2016/10/16 `addiu`, `addu`, `jr`, `ori`, `slti`, `syscall` are partially implemented (able to run each test case. However, there are many GACHA element to success.)
- 2016/10/19 learned how to use Block RAM
- 2016/10/24 instructions except `sw` and `lw` are working
- 2016/11/01 recursive fib succeeded. [Video](https://twitter.com/kivantium/status/793435185488404481)
- 2017/02/19 RISV-V based ISA worked in simulation.

LICENSE
--------
This project is licensed under the terms of the MIT license.

license: MIT

branch_name: refs/heads/master

extension: md

license_type: permissive


text:
<img src="https://user-images.githubusercontent.com/33691403/135431755-1da72a4b-2beb-4085-b36c-923787cd67cb.jpg" width="64" />

#### "Programmers seem to be changing the world. It would be a relief, for them and for all of us, if they knew something about it."
###### Ellen Ullman
---
#### Hi there 👋, my Name is Luciano Jung.
#### I'm from Germany, I study Information Science and develop various Software.

### Skills: Java (Spring Boot), DevOps (GitLabCI), Android (Java, Flutter), Web (Angular)

- 🔭 I’m currently working on establishing our agile IWiGA startup -> [IWiGA](https://www.iwiga.de/)
- 🌱 I’m currently learning BigData in an eHealth Startup Company
- 👯 I’m looking to collaborate on Projects with business potential
- 💬 Ask me about technologies, the environment and agile project development
- 📫 How to reach me<EMAIL_ADDRESS>- ⚡ Fun fact: I'm neither a rapper nor an opera singer 😄
---
##### Connect with me:
[![Connect LinkedIn](https://img.shields.io/badge/LinkedIn-informational?style=social&logo=linkedin)](https://www.linkedin.com/in/luciano-jung-3783a31a0/)

<!--
![GitHub stats](https://github-readme-stats.vercel.app/api?username=lucianojung&show_icons=true&theme=graywhite)

![Profile views](https://gpvc.arturio.dev/lucianojung)

-->

repository: lucianojung/lucianojung

branch_name: refs/heads/main

repo_name: lucianojung/lucianojung


text:
---
layout: post
title: It must be Spring... (65/365)
date: '2011-03-06T12:00:00+00:00'
categories:
- baseball
tumblr_url: http://www.somethingnew365.com/post/44289172887/it-must-be-spring-65365
---
… because I’ve started watching the baseball on MLBTV.

Actually it’s really stretching the something new concept a little as I’ve been watching the New York Mets via t’Internet for several seasons now, but yesterday was the first time I watched a game this year so I’m allowing it ;-)

If you’re not a baseball aficionado, it’s really something you have to invest a lot of time in to get the most out of it. The season is 162 games long, and if your team wins just 90 of those that’s a pretty good season and you’ll probably make the playoffs. That means even in a good season you’ll lose 72 games, so each individual game isn’t so important, but the season ebbs and flows, player’s form comes and goes, so you have to watch the drama unfolding over 6 month season to really appreciate what’s going on. Honest.

I started watching when I spent two summers in New Jersey in the late 80s, and thankfully chose the Mets rather than the damn Yankees as my team. For UK readers, the only vaguely equivalent team I can think of is really Man. City BEFORE the big money takeover - a team and club where anything can happen and usually does.

In the last few seasons we’ve been one pitch away from the World Series, had two unbelievably bad and heartbreaking end of season collapses and the worst run of injuries ever seen. The owners are now embroiled in the Madoff scandal so things aren’t looking good.

However. This is still the pre-season, hope springs eternal, we have a new manager and coach, everybody’s just about recovered from injury so despite all evidence to the contrary I have a good feeling about this season. And if you can’t be confident before the season starts, why bother?

repository: bravelocation/somethingneweveryday

repo_name: bravelocation/somethingneweveryday


text:
docker-node
===========

[![](https://images.microbadger.com/badges/version/yunojuno/node.svg)](https://microbadger.com/images/yunojuno/node "Get your own version badge on microbadger.com")
[![](https://images.microbadger.com/badges/image/yunojuno/node.svg)](https://microbadger.com/images/yunojuno/node "Get your own image badge on microbadger.com")

Base docker image for Node-based front-end build systems.

See Dockerfile for more details.

Licence
-------

MIT

repository: yunojuno-archive/docker-node

repo_name: yunojuno-archive/docker-node


text:
[![MIT License][license-shield]][license-url]
[![LinkedIn][linkedin-shield]][linkedin-url]

Sheypoor Scrapper

    scrap over sheypoor content from all categories and all cities

## About The Project
[sheypoor.com](https://sheypoor.com) is one of the biggest website in the middle-east that people post their properties and try to sell them online.

Using this library, all data from [sheypoor.com](https://sheypoor.com) can be retrieved, and data analysis can be done on top of it.

### Built With
The project is built with Python 3, and the package is available on [PyPi](https://pypi.org/)
xxxxxxxxxxxxxxxxxxxx
* [Python](https://www.python.org/)

### Installation
#### Using PIP
Install it using PiP [https://example.com](https://example.com)

#### Cloning the repo
1. Cloning directly from [github](https://github.com/omid23/sheypoor-scrapper)
```sh
git clone https://github.com/omid23/sheypoor-scrapper.git
```
3. Run REQUIREMENT to install the required packages
```sh
pip install requirements.txt
```

## License

Distributed under the MIT License. See `LICENSE` for more information.

## Contact

Omid Mohamad Beigi -<EMAIL_ADDRESS>xxxxx
Project Link: [https://github.com/omid23/sheypoor-scrapper](https://github.com/omid23/sheypoor-scrapper)

[contributors-shield]: https://img.shields.io/github/contributors/othneildrew/Best-README-Template.svg?style=flat-square
[contributors-url]: https://github.com/othneildrew/Best-README-Template/graphs/contributors
[forks-shield]: https://img.shields.io/github/forks/othneildrew/Best-README-Template.svg?style=flat-square
[forks-url]: https://github.com/othneildrew/Best-README-Template/network/members
[stars-shield]: https://img.shields.io/github/stars/othneildrew/Best-README-Template.svg?style=flat-square
[stars-url]: https://github.com/othneildrew/Best-README-Template/stargazers
[issues-shield]: https://img.shields.io/github/issues/othneildrew/Best-README-Template.svg?style=flat-square
[issues-url]: https://github.com/othneildrew/Best-README-Template/issues
[license-shield]: https://img.shields.io/github/license/othneildrew/Best-README-Template.svg?style=flat-square
[license-url]: https://github.com/othneildrew/Best-README-Template/blob/master/LICENSE.txt
[linkedin-shield]: https://img.shields.io/badge/-LinkedIn-black.svg?style=flat-square&logo=linkedin&colorB=555
[linkedin-url]: https://www.linkedin.com/in/omid-beigi/
[product-screenshot]: images/screenshot.png


text:
# [Headstart](website-url), an automated front-end setup

> Headstart is an all-in-one task runner that frees front-end developers of the little worries that come along with modern web development. If you ever wanted to use tools like [Grunt](http://gruntjs.com/) or [Gulp](http://gulpjs.com/), but found the configuration too troublesome, you will probably like this pre-configured setup better.

[![NPM version][npm-image]][npm-url] [![NPM Downloads][downloads-image]][downloads-url] [![Gitter][gitter-image]][gitter-url]

## Documentation

  - [Getting started][getting-started-url]
  - [Base Setup][base-setup-url]
  - [Upgrading][ugrading-url]

## ♥ Feedback

What did you like? What didn't you like? Did you get stuck somewhere? Where the docs easy to follow, or did you give up at a certain point?

This is a one-man project, so some approaches might be personated. Nevertheless, Headstart is meant to be used by other people as well, so your feedback is very valuable!

[Mail me anything at<EMAIL_ADDRESS>or [add an issue][issues-url].

## Updates

For all updates, follow [@headstartio][twitter-url] on Twitter.
Changes can be found on [the changelog page][changelog-url].

[website-url]: http://headstart.io
[getting-started-url]: http://headstart.io/installation
[base-setup-url]: http://headstart.io/base-setup
[changelog-url]: http://www.headstart.io/changelog
[ugrading-url]: http://headstart.io/upgrading-guide
[twitter-url]: https://twitter.com/headstartio
[issues-url]: https://github.com/flovan/headstart/issues
[npm-url]: https://npmjs.org/package/headstart
[npm-image]: https://badge.fury.io/js/headstart.svg
[travis-url]: https://travis-ci.org/flovan/headstart
[travis-image]: https://travis-ci.org/flovan/headstart.svg
[downloads-url]: https://github.com/flovan/headstart
[downloads-image]: http://img.shields.io/npm/dm/headstart.svg
[david-url]: https://david-dm.org/flovan/headstart
[david-image]: https://david-dm.org/flovan/headstart.png?theme=shields.io
[gitter-url]: https://gitter.im/flovan/headstart?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge
[gitter-image]: https://badges.gitter.im/Join%20Chat.svg

repository: alexanderkwright/headstart

repo_name: alexanderkwright/headstart


text:
# Proposal Kickoff

## Minute-by-Minute

| **Elapsed** | **Time**  | **Activity**              |
| ----------- | --------- | ------------------------- |
| 0:00        | 0:05      | Objectives                |
| 0:05        | 0:20      | Activity                |

## Why you should know this or industry application (optional) (5 min)

This will help you scope your project and get feedback on your project spec before you enbark on your week's work

## Learning Objectives (5 min)

1. Define what completion of your project entails
1. Get feedback on the scoping of your project and how accurately it challenges your skillset yet is achieveable
1. Make a plan for your coming week of work

## Activity (20 min)

- Follow the directions in [this slide](https://docs.google.com/presentation/d/1P3rxO3vaeR9S16M1b-gVwyFfz_lYOyTGMexI3e9CRVw/edit#slide=id.g54b9267fe3_0_96) to begin your intensive project proposal

## Additional Resources

1. Here again is the [intensive proposal document](https://docs.google.com/document/d/1pZh24HKYJlB7uuVZB1C8KNeBNC2VdzD8X87PVHwXpqU/edit#heading=h.rwkd8l4c90sq) that all students must fill out

gha_license_id: MIT


text:
## Introduction

The FreeClimb Java SDK will allow you to easily use the FreeClimb API in a Java application.

[![Release](https://jitpack.io/v/PersephonyAPI/FreeClimb-Java-SDK.svg)](https://jitpack.io/#PersephonyAPI/FreeClimb-Java-SDK)
[![Build Status](https://travis-ci.com/PersephonyAPI/FreeClimb-Java-SDK.svg?branch=master)](https://travis-ci.com/PersephonyAPI/FreeClimb-Java-SDK)
[![Maintainability](https://api.codeclimate.com/v1/badges/5db37830ae23321e9150/maintainability)](https://codeclimate.com/github/PersephonyAPI/FreeClimb-Java-SDK/maintainability)
[![Test Coverage](https://api.codeclimate.com/v1/badges/5db37830ae23321e9150/test_coverage)](https://codeclimate.com/github/PersephonyAPI/FreeClimb-Java-SDK/test_coverage)
[Docs](https://jitpack.io/com/github/persephonyapi/FreeClimb-Java-SDK/latest/javadoc/)

### SDK Installation

To include the SDK in your build, follow the instructions on [Jitpack](https://jitpack.io/#PersephonyAPI/FreeClimb-Java-SDK)

## Testing your Installation

Test the SDK is working by sending yourself a text message.

```java
public class Example {

    public static final String accountId = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    public static final String authToken = "your_auth_token";
    public static final String To = "your_phone_number";
    public static final String From = "a_free_climb_phone_number_in_your_account";

    public static void main(String[] args) throws FreeClimbException {
        FreeClimbClient client = new FreeClimbClient(accountId, authToken);

        client.messages.create(From, To, "Welcome to FreeClimb!");
    }
}
```

When you run this code you should get a text message.

### Running Unit Tests

You can run `gradle test` to run the full test suite.

You can also specify cucumber tags with the usual boolean inclusion / exclusion, specific feature files, or the line of the scenario or scenario outline example to run.

```bash
gradle -Dcucumber.options=src/test/resources/com/vailsys/freeclimb/api/call/Call.feature:5 test
```

```bash
gradle -Dcucumber.options="--tags @Calls" test
```

You can generate a Cobertura coverage report by running `gradle cobertura`. The report will be found at build/cobertura.

## Documentation

The [FreeClimb documentation](https://www.persephony.com/docs) has guides on [getting started](https://www.persephony.com/docs/getting-started/) with FreeClimb, as well as the [API reference](https://www.persephony.com/docs/api/), [PerCL reference](https://www.persephony.com/docs/percl/), and several useful [tutorials.](https://www.persephony.com/docs/tutorials/).

## Getting Help

If you are experiencing difficulties, contact our support team at [support@persephony.com](mailto:support@persephony.com).

## Dependencies

This SDK targets Java 7.

Import these dependencies:

- com.google.code.gson:gson:2.6.2

repository: PersephonyAPI/FreeClimb-Java-SDK

repo_name: PersephonyAPI/FreeClimb-Java-SDK


text:
---
layout: page
title: Lean Prover Zulip Chat Archive
permalink: archive/116395maths/28435topologygeneratedbyanorder.html
---

## [maths](index.html)
### [topology generated by an order](28435topologygeneratedbyanorder.html)

#### [Kevin Buzzard (Aug 15 2018 at 14:19)](https://leanprover.zulipchat.com/#narrow/stream/116395-maths/topic/topology%20generated%20by%20an%20order/near/132171480):
I don't know in what generality it's meaningful to ask about the topology "generated by" an order. Luca found `ordered_topology` in `analysis/topology/topological_structures.lean` but this is an assertion that sets coming from the order are closed in the topology, it doesn't rule out there being far more closed sets.

Here's a concrete question. Is there a theorem in mathlib saying that the topology on the reals is the one associated in some way to the total order `<` on the reals? Presumably with a total order one can define basic open sets $$\{x : a<x<b\}$$ for each pair $$(a,b)$$. Is this all there already and how much further does it go? Seems to work fine for total orders, but probably not for partial orders because we seem to need infs and sups. Is this what a lattice is? I am reluctant to do work that's already there and as you can see I am not currently even sure which files I should be looking in.

#### [Mario Carneiro (Aug 15 2018 at 15:08)](https://leanprover.zulipchat.com/#narrow/stream/116395-maths/topic/topology%20generated%20by%20an%20order/near/132173596):
note the difference between `ordered_topology` and `orderable_topology`

#### [Mario Carneiro (Aug 15 2018 at 15:08)](https://leanprover.zulipchat.com/#narrow/stream/116395-maths/topic/topology%20generated%20by%20an%20order/near/132173603):
the latter is for what topologists usually call "the order topology"

#### [Mario Carneiro (Aug 15 2018 at 15:09)](https://leanprover.zulipchat.com/#narrow/stream/116395-maths/topic/topology%20generated%20by%20an%20order/near/132173635):
the former is more like an order-respecting topology

#### [Mario Carneiro (Aug 15 2018 at 15:10)](https://leanprover.zulipchat.com/#narrow/stream/116395-maths/topic/topology%20generated%20by%20an%20order/near/132173703):
> Is there a theorem in mathlib saying that the topology on the reals is the one associated in some way to the total order < on the reals?

Yes, this is the instance of `orderable_topology real`

#### [Mario Carneiro (Aug 15 2018 at 15:11)](https://leanprover.zulipchat.com/#narrow/stream/116395-maths/topic/topology%20generated%20by%20an%20order/near/132173758):
> Is this all there already and how much further does it go? Seems to work fine for total orders, but probably not for partial orders because we seem to need infs and sups.

If you look at the definition in `ordered_topology`, you will see that we require that closed intervals are closed, not that open intervals are open. In partial orders this is more natural. In total orders they are equivalent

#### [Kevin Buzzard (Aug 15 2018 at 15:57)](https://leanprover.zulipchat.com/#narrow/stream/116395-maths/topic/topology%20generated%20by%20an%20order/near/132175935):
Aah this is perfect -- `orderable_topology` is exactly what we want. Thanks!

#### [Luca Gerolla (Aug 16 2018 at 12:46)](https://leanprover.zulipchat.com/#narrow/stream/116395-maths/topic/topology%20generated%20by%20an%20order/near/132231564):
Thank you very much Mario... It was very helpful to understand the different "order_topologies" in `analysis/topology/topological_structures.lean`and at the end I found the result I needed:
```lean
lemma frontier_lt_subset_eq [topological_space α] [decidable_linear_order α] [t : ordered_topology α]
  [topological_space β] {f g : β → α} (hf : continuous f) (hg : continuous g) :
frontier {b | f b < g b} ⊆ {b | f b = g b} :=
begin
  unfold frontier,
  have h₁ : interior {b : β | f b < g b} = {b : β | f b < g b},
    exact interior_eq_iff_open.2 (is_open_lt  hf hg), rw h₁,
  have h₂ : closure {b : β | f b < g b} ⊆ closure {b : β | f b ≤  g b},
    refine closure_mono _  , rw set.set_of_subset_set_of, intros x h, exact le_of_lt h,
  have h₃ : closure {b : β | f b ≤  g b} = {b : β | f b ≤  g b},
    exact closure_eq_iff_is_closed.2 (is_closed_le hf hg), rw h₃ at h₂ ,
  have g₁ : closure {b : β | f b < g b} \ {b : β | f b < g b} ⊆
                 {b : β | f b ≤ g b} \ {b : β | f b < g b},
   {unfold has_sdiff.sdiff set.diff, intros a Ha, simp at Ha, simp,
    cases Ha with a₁ a₂ ,
    have h₄ : a ∈ {b : β | f b ≤ g b}, exact set.mem_of_mem_of_subset a₁ h₂,
    rw mem_set_of_eq at h₄, exact ⟨ h₄, a₂ ⟩ , },
  have g₂ : {b : β | f b ≤ g b} \ {b : β | f b < g b} ⊆ {b : β | f b = g b},
    unfold has_sdiff.sdiff set.diff, intros a Ha, simp  at Ha,
    rw mem_set_of_eq, exact le_antisymm Ha.1 Ha.2,
  exact set.subset.trans g₁ g₂,
end
```
By any chance, would this be helpful (with slicker proof) in mathlib in addition to `frontier_le_subset_eq`?

#### [Mario Carneiro (Aug 16 2018 at 12:48)](https://leanprover.zulipchat.com/#narrow/stream/116395-maths/topic/topology%20generated%20by%20an%20order/near/132231657):
this should be an easy consequence of `frontier_le_subset_eq`

#### [Mario Carneiro (Aug 16 2018 at 12:49)](https://leanprover.zulipchat.com/#narrow/stream/116395-maths/topic/topology%20generated%20by%20an%20order/near/132231681):
The frontier of the complement of A is the same as the frontier of A, so each implies the other since `{b | f b < g b}` is the complement of `{b | g b <= f b} `

#### [Mario Carneiro (Aug 16 2018 at 12:59)](https://leanprover.zulipchat.com/#narrow/stream/116395-maths/topic/topology%20generated%20by%20an%20order/near/132232056):
added

#### [Luca Gerolla (Aug 16 2018 at 13:09)](https://leanprover.zulipchat.com/#narrow/stream/116395-maths/topic/topology%20generated%20by%20an%20order/near/132232441):

```quote
The frontier of the complement of A is the same as the frontier of A, so each implies the other since `{b | f b < g b}` is the complement of `{b | g b <= f b} `
```
I did try to go along this line of reasoning but  I did not find it that shorter ... Definitely not 2 lines like yours! :)

#### [Luca Gerolla (Aug 16 2018 at 13:10)](https://leanprover.zulipchat.com/#narrow/stream/116395-maths/topic/topology%20generated%20by%20an%20order/near/132232506):
Also nice addition  `frontier_compl`! ..I had better update my mathlib


text:
# java-reinforcement-learning-tic-tac-toe

Demo of reinforcement learning using tic-tac-toe with the [java-reinforcement-learning](https://github.com/chen0040/java-reinforcement-learning) package.

# Usage - GUI

The gui version run reinforcement learning in the interactive mode. it is implemented in com.github.chen0040.jrl.ttt.gui.Application

To run the gui version, git clone this project, run the make.ps1 or make.sh to build the reinforcement-learning-tic-tac-toe.jar into the bin folder.

Run:

```bash
java -jar bin/reinforcement-learning-tic-tac-toe.jar
```

# Usage - Console

The console version runs the reinforcement learning against a naive bot, they are implemented in:

* com.github.chen0040.jrl.ttt.dojos.DojoQ
* com.github.chen0040.jrl.ttt.dojos.DojoSarsa
* com.github.chen0040.jrl.ttt.dojos.DojoR

### Q-Learn

The following create two Q-Learning bots that plays against each other on the tic-tac-toe game to a train a Q-Learn model:

```java
public static QLearner train(Board board, int episodes) {

    int stateCount = (int)Math.pow(3, board.size() * board.size());
    int actionCount = board.size() * board.size();

    QLearner learner = new QLearner(stateCount, actionCount);
    //learner.setActionSelection(SoftMaxActionSelectionStrategy.class.getCanonicalName());

    QBot bot1 = new QBot(1, board, learner);
    QBot bot2 =new QBot(2, board, learner);

    int wins = 0;

    for(int i=0; i < episodes; ++i) {
        bot1.clearHistory();
        bot2.clearHistory();

        logger.info("Iteration: {} / {}", (i+1), episodes);
        board.reset();
        while (board.canBePlayed()) {
            bot1.act();
            bot2.act();
        }
        logger.info("winner: {}", board.getWinner());
        bot1.updateStrategy();
        bot2.updateStrategy();
        logger.info("board: \n{}", board);

        wins += board.getWinner() == 1 ? 1 : 0;
        logger.info("success rate: {} %", (wins * 100) / (i+1));
    }

    return learner;
}
```

Alternaitvely, the following create one QBot that plays against a NaiveBot on the tic-tac-toe game to a train a Q-Learn model:

```java
public static QLearner train(Board board, int episodes) {

    int stateCount = (int)Math.pow(3, board.size() * board.size());
    int actionCount = board.size() * board.size();

    QLearner learner = new QLearner(stateCount, actionCount);
    //learner.setActionSelection(SoftMaxActionSelectionStrategy.class.getCanonicalName());

    QBot bot1 = new SarsaBot(1, board, learner);
    NaiveBot bot2 =new SarsaBot(2, board);

    for(int i=0; i < episodes; ++i) {
        bot1.clearHistory();
        bot2.clearHistory();

        logger.info("Iteration: {} / {}", (i+1), episodes);
        board.reset();
        while (board.canBePlayed()) {
            bot1.act();
            bot2.act();
        }
        logger.info("winner: {}", board.getWinner());
        bot1.updateStrategy();
        logger.info("board: \n{}", board);
    }

    return learner;
}
```

The following code uses the trained Q-Learn model to create a QBot (bot1) which plays against bot2 (which is a naive bot that randomly takes a possible action each step):

```java
public static double test(Board board, QLearner model, int episodes) {

    QBot bot1 = new QBot(1, board, model);
    NaiveBot bot2 =new NaiveBot(2, board);

    int wins = 0;
    int loses = 0;
    for(int i=0; i < episodes; ++i) {
        bot1.clearHistory();
        bot2.clearHistory();

        logger.info("Iteration: {} / {}", (i+1), episodes);
        board.reset();
        while (board.canBePlayed()) {
            bot1.act();
            bot2.act();
        }
        int winner = board.getWinner();
        logger.info("Winner: {}", winner);
        wins += winner == 1 ? 1 : 0;
        loses += winner == 2 ? 1 : 0;
    }

    return wins * 1.0 / episodes;
}
```

The following code shows how to train and then test a Q-Learn model:

```java
Board board = new Board();
QLearner model = train(board, 30000);

double successRate = test(board, model, 1000);
logger.info("Q-Learn Bot beats Random Bot in {} % of the games being played", successRate * 100);
```

To save and load the Q-Learn model:

```java
String model_json = model.toJson();
QLearner loaded_from_json = QLearner.fromJson(model_json);
```

This sample code can be found in the DojoQ.java file in the project.

### SARSA (State-Action-Reward-State-Action)

The following create two SARSA bots that plays against each other on the tic-tac-toe game to a train a SARSA model:

```java
public static QLearner train(Board board, int episodes) {

    int stateCount = (int)Math.pow(3, board.size() * board.size());
    int actionCount = board.size() * board.size();

    SarsaLearner learner = new SarsaLearner(stateCount, actionCount);
    //learner.setActionSelection(SoftMaxActionSelectionStrategy.class.getCanonicalName());

    SarsaBot bot1 = new SarsaBot(1, board, learner);
    SarsaBot bot2 =new SarsaBot(2, board, learner);

    for(int i=0; i < episodes; ++i) {
        bot1.clearHistory();
        bot2.clearHistory();

        logger.info("Iteration: {} / {}", (i+1), episodes);
        board.reset();
        while (board.canBePlayed()) {
            bot1.act();
            bot2.act();
        }
        logger.info("winner: {}", board.getWinner());
        bot1.updateStrategy();
        bot2.updateStrategy();
        logger.info("board: \n{}", board);
    }

    return learner;
}
```

Alternaitvely, the following create one SARSA bot that plays against a NaiveBot on the tic-tac-toe game to a train a SARSA model:

```java
public static QLearner train(Board board, int episodes) {

    int stateCount = (int)Math.pow(3, board.size() * board.size());
    int actionCount = board.size() * board.size();

    SarsaLearner learner = new SarsaLearner(stateCount, actionCount);
    //learner.setActionSelection(SoftMaxActionSelectionStrategy.class.getCanonicalName());

    SarsaBot bot1 = new SarsaBot(1, board, learner);
    NaiveBot bot2 =new SarsaBot(2, board);

    int wins = 0;

    for(int i=0; i < episodes; ++i) {
        bot1.clearHistory();
        bot2.clearHistory();

        logger.info("Iteration: {} / {}", (i+1), episodes);
        board.reset();
        while (board.canBePlayed()) {
            bot1.act();
            bot2.act();
        }
        logger.info("winner: {}", board.getWinner());
        bot1.updateStrategy();
        logger.info("board: \n{}", board);

        wins += board.getWinner() == 1 ? 1 : 0;
        logger.info("success rate: {} %", (wins * 100) / (i+1));
    }

    return learner;
}
```

The following code uses the trained SARSA model to create a SarsaBot (bot1) which plays against bot2 (which is a naive bot that randomly takes a possible action each step):

```java
public static double test(Board board, SarsaLearner model, int episodes) {

    SarsaBot bot1 = new SarsaBot(1, board, model);
    NaiveBot bot2 =new NaiveBot(2, board);

    int wins = 0;
    int loses = 0;
    for(int i=0; i < episodes; ++i) {
        bot1.clearHistory();
        bot2.clearHistory();

        logger.info("Iteration: {} / {}", (i+1), episodes);
        board.reset();
        while (board.canBePlayed()) {
            bot1.act();
            bot2.act();
        }
        int winner = board.getWinner();
        logger.info("Winner: {}", winner);
        wins += winner == 1 ? 1 : 0;
        loses += winner == 2 ? 1 : 0;
    }

    return wins * 1.0 / episodes;
}
```

The following code shows how to train and then test a SARSA model:

```java
Board board = new Board();
SarsaLearner model = train(board, 30000);

double successRate = test(board, model, 1000);
logger.info("SARSA Bot beats Random Bot in {} % of the games being played", successRate * 100);
```

To save and load the SARSA model:

```java
String model_json = model.toJson();
SarsaLearner loaded_from_json = SarsaLearner.fromJson(model_json);
```

This sample code can be found in the DojoSarsa.java file in the project.


text:
# Scala.js typings for angular__forms

Typings are for version 7.2.14

## Library description:
Angular - directives and services for creating forms

|                    |                 |
| ------------------ | :-------------: |
| Full name          | @angular/forms |
| Keywords           | - |
| # releases         | 183 |
| # dependents       | 5054 |
| # downloads        | 78464441 |
| # stars            | 11 |

## Links
- [Homepage](https://github.com/angular/angular#readme)
- [Bugs](https://github.com/angular/angular/issues)
- [Repository](https://github.com/angular/angular)
- [Npm](https://www.npmjs.com/package/%40angular%2Fforms)

## Note
This library has been generated from typescript code from first party type definitions.

Provided with :purple_heart: from [ScalablyTyped](https://github.com/oyvindberg/ScalablyTyped)

## Usage
See [the main readme](../../readme.md) for instructions.

## Comments

These comments are from the typescript definitions and might be useful:
```
/**
 * Generated bundle index. Do not edit.
 */
/**
 * @license
 * Copyright Google Inc. All Rights Reserved.
 *
 * Use of this source code is governed by an MIT-style license that can be
 * found in the LICENSE file at https://angular.io/license
 */
/**
 * @module
 * @description
 * Entry point for all public APIs of this package.
 */
/**
 * @description
 *
 * Adds `novalidate` attribute to all forms by default.
 *
 * `novalidate` is used to disable browser's native form validation.
 *
 * If you want to use native validation with Angular forms, just add `ngNativeValidate` attribute:
 *
 * ```
 * <form ngNativeValidate></form>
 * ```
 *
 * @publicApi
 * @ngModule ReactiveFormsModule
 * @ngModule FormsModule
 */
/**
 * @module
 * @description
 * This module is used for handling user input, by defining and building a `FormGroup` that
 * consists of `FormControl` objects, and mapping them onto the DOM. `FormControl`
 * objects can then be used to read information from the form DOM elements.
 *
 * Forms providers are not included in default providers; you must import these providers
 * explicitly.
 */
/**
 * @module
 * @description
 * Entry point for all public APIs of the common package.
 */

```

repository: kamilkloch/ScalablyTyped

repo_name: kamilkloch/ScalablyTyped


text:
# Configure SSL encryption {#concept_v1g_vyv_y2b .concept}

To enhance the security of data links, you can enable SSL encryption and install an SSL certificate issued by the CA in your application. The SSL encryption feature encrypts network connections at the transport layer to improve data security and guarantee data integrity during communication. This topic describes how to view the details of SSL encryption, enable and disable SSL encryption, and update and download an SSL CA certificate.

## Notes {#section_ztb_1zz_ggb .section}

-   Only replica set instances whose database version is MongoDB 3.4 or MongoDB 4.0 support SSL encryption.
-   When you enable, update, or disable SSL encryption for an instance, the instance is restarted once. Therefore, we recommend that you perform such an operation during off-peak hours.
-   You can download an SSL CA certificate only from the console.
-   Due to the inherent defects of SSL encryption, this feature significantly increases the CPU usage. We recommend that you enable SSL encryption only when external network links need to be encrypted. Intranet links are securer and generally do not need to be encrypted.

## Enable SSL encryption {#section_qcd_4dv_y2b .section}

**Note:** When you enable SSL encryption for an instance, the instance is restarted once. Therefore, we recommend that you perform this operation during off-peak hours.

1.  Log on to the [ApsaraDB for MongoDB console](https://mongodb.console.aliyun.com/#/mongodb/list).
2.  In the upper-left corner of the home page, select the region where the target instance is located.
3.  In the left-side navigation pane, click **Replica Set Instances**.
4.  Locate the target instance and click its instance ID.
5.  In the left-side navigation pane, choose **Data Security** \> **SSL**.
6.  In the SSL area, turn on the **SSL Status** switch.
7.  In the Restart Instance dialog box that appears, click **OK**.

## Update an SSL CA certificate {#section_tzm_dfv_y2b .section}

An SSL CA certificate is valid for a year. You can update an SSL CA certificate when it expires or within its validity period.

**Note:** When you update the SSL CA certificate for an instance, the instance is restarted once. Therefore, we recommend that you perform this operation during off-peak hours.

1.  Log on to the [ApsaraDB for MongoDB console](https://mongodb.console.aliyun.com/#/mongodb/list).
2.  In the upper-left corner of the home page, select the region where the target instance is located.
3.  In the left-side navigation pane, click **Replica Set Instances**.
4.  Locate the target instance and click its instance ID.
5.  In the left-side navigation pane, choose **Data Security** \> **SSL**.
6.  In the SSL area, click **Update Certificate**.

    ![](http://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/assets/img/18857/155617605810641_en-US.png)

7.  In the Restart Instance dialog box that appears, click **OK**.

## Download an SSL CA certificate {#section_ajh_sdv_y2b .section}

1.  Log on to the [ApsaraDB for MongoDB console](https://mongodb.console.aliyun.com/#/mongodb/list).
2.  In the upper-left corner of the home page, select the region where the target instance is located.
3.  In the left-side navigation pane, click **Replica Set Instances**.
4.  Locate the target instance and click its instance ID.
5.  In the left-side navigation pane, choose **Data Security** \> **SSL**.
6.  Click **Download Certificate** to download the SSL CA certificate to a local device.

## Disable SSL encryption {#section_rvt_jhv_y2b .section}

You can disable SSL encryption when you do not need this feature.

**Note:** When you disable SSL encryption for an instance, the instance is restarted once. Therefore, we recommend that you perform this operation during off-peak hours.

1.  Log on to the [ApsaraDB for MongoDB console](https://mongodb.console.aliyun.com/#/mongodb/list).
2.  In the upper-left corner of the home page, select the region where the target instance is located.
3.  In the left-side navigation pane, click **Replica Set Instances**.
4.  Locate the target instance and click its instance ID.
5.  In the left-side navigation pane, choose **Data Security** \> **SSL**.
6.  In the SSL area, turn off the **SSL Status** switch.
7.  In the Restart Instance dialog box that appears, click **OK**.

url: https://raw.githubusercontent.com/quanwc/mongodb/af33682f35aea030651842ae188c28b2e99b9389/intl.en-US/User Guide/Data security/Configure SSL encryption.md

repository: quanwc/mongodb

filename: Configure SSL encryption.md

repo_name: quanwc/mongodb


text:
---
title: '8 Sales Role-play Scenarios that will help Prepare your Sales Team to handle any sales situation'
og_title: '8 Sales Role-play Scenarios that will help Prepare your Sales Team to handle any sales situation'
description: Practice makes people perfect. And sales role-plays are best to get your reps to practice and hone their selling skills. Use these 8 sales role-play scenarios to train your sales reps and transform them into the best sellers
og_description: Practice makes people perfect. And sales role-plays are best to get your reps to practice and hone their selling skills. Use these 8 sales role-play scenarios to train your sales reps and transform them into the best sellers
categories: ["ACM"]
id: 198
author:
  name: SmartWinnr
  email<EMAIL_ADDRESS>weight: -198
slug: "8-sales-role-play-scenarios-that-will-help-prepare-your-sales-team-to-handle-any-sales-situation"
featured_image: "/images/blog-198/image1.jpg"
isFeatured: false
date: '2021-10-09T07:30:32+08:00'
tags: ["Sales", "Coaching", "Sales Performance"]
relatedBlogs : ["5 Sales Role Play Games that Prepares your Team to Win", "MQL vs SQL: What are they and How do They Differ?", "How to effectively drive up-selling and cross-selling?", "The Puppy Dog Close Technique: Let your customers experience your brand personally", "How to overcome Prospects’ Resistance?", "Top 6 Sales Methodologies for Closing Complex Deals", "10 Effective Techniques to overcome Sales Objections"]

---

Like most skills, your sales reps’ ability to sell improves with practice. But how can you get your reps to frequently practice and hone their selling skills? The answer to this lies in something called the “sales role-plays”

\
\

### **What is a Sales Role-play?**

A [sales role-play](https://www.smartwinnr.com/post/5-sales-role-play-games-that-prepares-your-team-to-win/) is an activity for coaching and developing your sales team. It uses situations that closely replicate what the sales reps may experience in real-life selling.

Sales role-play involves you giving your employees some sales role play scenarios examples and asking them to act out their role as sales reps. This is basically like an improvisation game for the sales reps where they get to interact with their sales coaches acting out the role of different customer types and,

* Ask questions
* Learn from them how to navigate certain sales scenarios
* And how they can overcome certain roadblocks that they may encounter throughout the process of new client acquisition and beyond

Now that you understand what a sales role-play is, we are going to introduce you to certain sales role-play scenarios that will get your sales team thinking on their feet and mastering various sales scenarios

\
\

### **Top 8 must-try sales role-play scenarios**\
\

#### **1.Scenario-1: Discovery**

Discovery call role-play is the most important sales role play that you can do, period. With discovery call being the first-ever real connection with a prospect, this can potentially set the tone for the rest of the sales process. So it’s absolutely crucial for your sales reps to prepare for this and make the best first impression.

This discovery call role-play particularly helps the BDRs in efficiently identifying the buyers’ problems. It also helps in getting the new hires comfortable in always asking “next layer questions” that will have an immediate impact on the quality of their discovery process.

**How to run this role-play:** Get each one of your sales reps to act as the salesperson making the discovery call to the client. And the manager/ coach/ another sales rep should act as the client. Then set the scenario for the role-play by giving the sales rep the demographic details of the client whom they should call.

Before the call, ask the reps to prepare for it by writing down all the questions that they want to ask the client during the call. Then set up a virtual call between the client and the sales rep and encourage your reps to try to

* Find out as much information as they can about the client
* And map the clients’ problems with the solution that you offer.

\
\

Example discover call role-play script: An ag-tech company talking to a vegetable greenhouse farm that is already using a ton of systems to run their business.

Rep: “Hi Julie. Looking forward to the conversation today. From our work with XYZ and ZYX there are definitely a few areas around [value statement] that I think will be good to talk through.

But first, every single organization we work with is different and has their own unique challenges. I want to spend the first 5-10 minutes talking about your challenges or upcoming projects at [Company], then we’ll spend the bulk of the time talking about what we do at [Rep’s Company], and then if it seems like a fit, we can talk about next steps, does that work for you?”

Prospect: “Sure, sounds good!”

Rep: “What are your top 1 or 2 challenges you’re having today?

Prospect: “We’re looking to optimize our org in order to scale our acres of greenhouses across regions.”

Rep: “Ok, what do you mean by optimizing your organization? Is it the process you have in place from seed to harvest?”

Prospect: “Optimizing our technology. We use a lot of tools, but they’re not really integrated.”

Rep: “Ok, and what challenges is that causing?”

\
\

#### **2.Scenario - 2: Elevator Pitch**

A good elevator [pitch](https://www.smartwinnr.com/post/10-most-effective-sales-pitch-ideas/) is everything to a sales rep. It is a short 30 seconds description of what your sales reps are selling. This kind of pitch helps the sales reps to capture a client’s attention in a short span of time. So, it's absolutely crucial for the sales reps to practice this pitch and get it absolutely right. Also this elevator pitch role-play is like a fun challenge for the reps where they have to communicate their core message in just a few words..

**How to run this role-play:** Ask the sales reps to create an interesting elevator pitch, practice it multiple times, and then deliver it on a video call or in the form of a recorded message. Once the pitch is submitted, the managers should review it and provide helpful feedback.

\

Example of an elevator pitch script:

 As an account executive for [company name], I talk to hundreds of marketers per month. And 99% of them hate creating reports. It's time-consuming, it's tedious, and it's usually not your highest priority. That's where our tool comes in — it pulls from all of your data to create any report you want in less than the time it takes to pour a cup of coffee.

\
\

#### **3. Scenario - 3: Product Demo**

The product demo is that phase in a [sales process](https://www.smartwinnr.com/post/how-to-measure-and-improve-the-effectiveness-of-your-sales-process/) that has the potential to make or break a deal. It’s crucial for you to ensure that your reps’ messaging is precise and their product knowledge is evident in their product demos. So it’s always a good idea to get your reps to practice their product demo skills.

 These demos can then be analyzed for

* The proficiency of product knowledge
* The ease with which they navigate the product
* Keywords that they use
* Filler words that they use
* And their confidence when unexpected questions come their way

After the demo, the sales reps should be provided with helpful feedback on where they can improve and how they can improve

\
\

#### **4. Scenario - 4: Remote Selling**

Needless to say that in the current crisis, [remote selling](https://www.smartwinnr.com/post/7-selling-skills-that-are-essential-to-ace-remote-sales/) is the most important skill for the sales reps to have. This remote selling role-play sales training is especially valuable for those transitioning from field sales to inside sales/ remote sales.

This type of role-play scenario allows the sales reps to

* Practice their remote selling sales conversations
* Get used to using and navigating the video conferencing tool
* Improve their body language while communicating through a video call
* Use gestures, keywords, and phrases that help in building a good rapport and trust remotely
* And practice exhibiting empathy with the client during these crises

**How to run this role-play:** Ask your reps to get into a zoom call with you and give a presentation of the product. During the call, you can evaluate the reps’

* Knowledge of the product
* Selling skills
* Attitude
* Facial expressions
* Confidence in the tone
* Video conference etiquettes etc

At the end of the call, provide valuable feedback on where they can improve and how they can improve

\
\

#### **5. Scenario - 5: Objection Handling**

[Objection handling](https://www.smartwinnr.com/post/10-effective-techniques-to-overcome-sales-objections/) role-play gives reps the chance to practice answering tough questions and combat objections from buyers. This role-play also allows the sales reps to leverage the expertise of their seniors and managers and get to learn from their experience about how they can effectively answer the client’s questions or mitigate their concerns.

 Here the seniors/ managers should pose questions/ objections pertaining to your products, features, pricing, or policy. And the sales reps should try to handle these objections efficiently.

The sales rep’s performance can be evaluate based on,

* Their confidence while giving an explanation
* The validity/ correctness of their explanation
* And their ability to convince the client with logic

\
\

Example Role-play Script:

The Salesperson: “Are there any questions you have for me today?”

The Prospect: “Yeah, I’ve read online that sometimes other people who use your tool have found that [insert common pain point].”

The Salesperson: “We’ve heard of people experiencing that. If a customer has that problem, we usually [insert solution].”

The Prospect: “That makes sense. But what if that doesn’t work?”

The Salesperson: “We haven’t had much documentation of that solution not working, but if it occurs we would [insert solution.]”

The Prospect: “Well my specific problem is [insert pain point]. What if I solve that but I still want to keep doing [insert other common objection].”

The Salesperson: “You’re actually not the first to have that question! We go on a case-by-case basis, but in other scenarios we have [insert solution].”

\
\

#### **6. Scenario - 6: Negotiation**

Great sales reps are skilled negotiators. You can develop great negotiation skills in your salesforce by creating role-plays simulating any of the following scenarios

* Buyers asking for a lower price based on competitor pricing or budget
* Buyers asking to give more feature for the same standard price
* Buyers asking for an extension of the free trial period of the product
* Buyers asking for something to be delivered in an unrealistic time frame
* Buyers asking to make some changes in your t&c or purchase policy

**How to run this role-play:**

Get the sales reps to do a virtual or in-person role-play with their seniors or managers (senior/ manager act as the client). Present a situation to them where they have to negotiate with the client on,

* Product pricing
* Feature requests
* Trial period
* Service period
* Or terms and conditions

Once they present their argument, evaluate it by identifying the number of filler words used, tone, and confidence. And then provide valuable feedback and coaching with which they can improve their negotiation skills.

\
\

Example Sales role-play script:

The Prospect: “Hi! My business just recently had a contract end with our supplier for [insert something your business provides] and we’re hoping to begin a new one within the next few days.”

The Salesperson: “It’s good to meet you! I can definitely help you out here. Can I ask what your specific needs are so I can answer any questions?”

The Prospect: “Yes! We have a fairly large list of clients, around 300, so we need enough [insert specific need here] to provide them with what they need on a weekly basis. Our last supplier was great with their [insert info here], but we always wished that we had [insert something your specific business offers]. I know that this is a bit of a tight time frame, but we’re really hoping we can make something work!”

The Salesperson: “I understand the time constraints! While it is a bit of a quick turnaround, I think we can make it happen. We specifically [insert business’ value proposition], which sounds like what you’re looking for. Our rates are [insert business-specific costs], and we bill on a monthly basis. As far as getting started, we usually need about a 3-week turnaround, but we may be able to get started sooner with an additional [insert extra cost] for the first month since we’ll be getting the ball rolling faster than normal. How does that sound?”

\
\

#### **7. Scenario - 7: Letting a client go**

Breaking up is hard to do. It is even harder when you must tell a customer (and their commission) goodbye.

It’s important to practice these scenarios because they can be nerve-wracking for new reps, and they can get tense. Role-playing prospect breakups is a crucial part of sales training because if this situation is handled correctly, it can open doors to new opportunities with the same client in the future.

**How to run this role-play:** Get into a virtual call with each one the your sales reps one after the other. Present a situation to them where they need to inform the client that

* They cannot fulfill a certain request of theirs
* Or that it’s not in the scope of your business to help them overcome a certain challenge

Evaluate the sales reps’ performance based on their politeness, confidence and positive attitude. After the role-play, provide coaching and feedback help them improve

\
\

Example Role-play script:

The Prospect: “We’ve been having trouble with [insert problem here] and want to use your tool to help us resolve that issue.”

The Salesperson: “I understand that that is a tough scenario to deal with. Unfortunately, our service isn’t meant for [insert prospect need here], we tend to focus more on [insert actual usage for tool]. I don’t think our product is the best fit for that specific situation, but maybe you have other pain points that relate more to what we have to offer?”

The Prospect: “No, that’s our only need — you don’t have any other options?”

The Salesperson: “Unfortunately not, I’m sorry that we won’t be able to help you overcome that challenge. Please know that if you ever get to a point where we can help you, I would be happy to have another conversation and discuss a potential partnership.”

\
\

#### **8.Scenario - 8: Stalled deals scenario**

Every salesperson will experience stalled deals. The prospect might repeatedly reschedule the demo, ghost for weeks at a time, or drag their feet in returning a signed contract.

Whatever the situation, it costs reps time and money. It’s important that they be able to identify these situations and discover the root cause to successfully discern whether to cut ties or move the deal forward.

**How to run this role-play:** Conduct a virtual or in-person role-play session where you present this stalled deal situation to the sales reps and ask them to

* Try to find out the reasons why a prospect might be ignoring you
* Try to get them to reinstate the sales engagement
* Or close the case

Evaluate their performance here based on the way they handling this situation and provide feedback on the areas where they can improve

\
\

Example Sales Role-play script:

The Salesperson: “Hi [customer name], I’m calling because we’ve scheduled a product demo for today. Is this still a good time?”

The Stalled Prospect: “Oh, hi, sorry I was in the middle of something. Can we push this demo until next week? My boss is out of town and I want to make sure they can participate as well.”

The Salesperson: “That makes sense! I hear that you want to push the demo off, but we’ve rescheduled twice before. Can I ask if there are any hesitations on your end that I can help clear up to ensure we’re on the same page?”

The Stalled Prospect: “We don’t have any hesitations, I just want everyone to know what’s going on.”

The Salesperson: “Okay, we’ll I’m here to answer any questions if you have them, even if there are hesitations.”

The Stalled Prospect: “I actually do have a question. [insert question]”

The Salesperson: “I’m glad you asked! [insert solution].”

\
\

### Want to gamify your sales role-play sessions?

**Read:** [5 Sales Role Play Games that Prepares your Team to Win](https://smartwinnr.com/post/5-sales-role-play-games-that-prepares-your-team-to-win/)

\
\

### Want to learn some effective techniques to overcome sales objections?

**Read:** [10 Effective Techniques to overcome Sales Objections](https://smartwinnr.com/post/10-effective-techniques-to-overcome-sales-objections/)

\
\

### Want to learn how to efficiently overcome the prospects’ resistance?

**Read:** [How to overcome Prospects’ Resistance?](https://smartwinnr.com/post/how-to-overcome-prospects-resistance/)

repository: smartwinnr/site-smartwinnr

gha_language: CSS

repo_name: smartwinnr/site-smartwinnr


text:
# action_sms

action_sms allows you to switch between SMS Gateways effortlessly without modifying your application or test code. By keeping SMS Gateway configuration out of your code you can be more adaptable to change.

## Current SMS Gateway Adapters

* [SMSGlobal](http://www.smsglobal.com)
* [Tropo](http://www.tropo.com)

## Adapter Specific Configuration

* [SMSGlobal](http://github.com/dwilkie/action_sms/wiki/SMSGlobal)
* [Tropo](http://github.com/dwilkie/action_sms/wiki/Tropo)

## Usage

### Configuration

Establish a connection to your SMS Gateway Adapter:

    ActionSms::Base.establish_connection(
      :adapter => 'your_adapter',
      # the remaining options are specific to the SMS Gateway Adapter
      :username => 'username',
      :password => 'password'
    )
The only required option is `:adapter`. This specifies the SMS Gateway adapter you want to use. The remaining options are specific to the adapter.

### Send an SMS and check if it was successful

    class SMS
      def recipient
        "617198378843"
      end

      def body
        "Hello world"
      end

      def from
      end
    end

    response = ActionSms::Base.deliver(SMS.new)
    success = ActionSms::Base.delivery_request_successful?(response)

### Receive an SMS

    # Assume 'params' has the data posted back to your server

    # get sender
    sender = ActionSms::Base.sender(params)

    # get message text
    message_text = ActionSms::Base.message_text(params)

### Delivery receipts

    # Assume 'receipt' has the data posted back to your server as the delivery receipt

    # get status
    status = ActionSms::Base.status(receipt)

    # get message id
    message_id = ActionSms::Base.message_id(receipt)

### Authentication

    ActionSms::Base.establish_connection(
      :authentication_key => "my secret",
      :use_ssl => true
    )

If you set up an: `authentication_key` in the configuration, your key will be passed back to your listener url. Using an authentication key in conjunction with a secure connection `use_ssl => true` helps protect you against someone faking incoming messages to your server. You can authenticate an incoming message as follows:

    # Assume 'params' has the data posted back to your server

    # Removes the authentication key from 'params' and returns true or false
    ActionSms::Base.authenticate(params)

### Service url

    # gets the gateway's api url
    # ActionSms::Base.service_url

## Testing

When you set: `:environment => "test"` in your configuration, you get some additional test helpers.

    ActionSms::Base.establish_connection(
      :environment => "test"
    )

    # get sample configuration
    ActionSms::Base.sample_configuration

    # get sample incoming SMS params
    ActionSms::Base.sample_incoming_sms

    # get customized sample incoming SMS
    ActionSms::Base.sample_incoming_sms(
      :message => "hello",
      :to => "6128392323",
      :from => "61289339432",
      :date => Time.now,
      :authentic => false     # see configuration
    )

    # get sample delivery response
    ActionSms::Base.sample_delivery_response

    # get sample delivery response (failed)
    ActionSms::Base.sample_delivery_response(:failed => true)

    # get a sample delivery response with a message id
    ActionSms::Base.sample_delivery_response_with_message_id("12345")

    # get sample message id
    ActionSms::Base.sample_message_id

    # get sample delivery receipt
    ActionSms::Base.sample_delivery_receipt

    # get customized sample delivery receipt
    ActionSms::Base.sample_delivery_receipt(
      :message_id => "12345",
      :status => "delivered",
      :error => "some error",
      :date => Time.now
    )

## Creating your own adapter

To create your own adapter all you need to do is open up the ActionSms::Base class
and add a class method named: `my_adapter_connection` which takes a single hash argument of configuration details and returns an instance of your adapter class. For example, let's create an adapter for clickatell:

    # clickatell_adapter.rb
    require 'action_sms/connection_adapters/abstract_adapter'

    module ActionSms
      class Base
        def self.clickatell_connection(config)
          ConnectionAdapters::ClickatellAdapter.new(config)
        end
      end
    end

    module ConnectionAdapters
      class ClickatellAdapter < AbstractAdapter
        # define your adapter here ...
        def initialize(config)
        end
      end
    end

Take a look at the [source](http://github.com/dwilkie/action_sms/tree/master/lib/action_sms/connection_adapters/) for more details

## Rails

For convenience there is a generator that can be used if you are using action_sms within a Rails app

    rails g action_sms:initializer

Generates an initializer including example configuration for built-in adapters

## Installation

    gem install action_sms

### Rails

Place the following in your Gemfile:

    gem action_sms

Copyright (c) 2010 David Wilkie, released under the MIT license

extension: markdown


text:
# BOTD #3: Swap protocol

## Overview

The **swap protocol** defines the process by which two parties conclude an atomic swap using an interactive exchange of signed messages and Elements transaction.

Identifying with *Alice* as the **Proposer** and *Bob* the **Responder**:

1. Alice connects to Bob through secure transport layer and encrypted connection.
2. Alice proposes a swap crafting an unsigned transaction and a message defined as sending `AMOUNT_P` of `ASSET_P` and receiving `AMOUNT_R` of `ASSET_R`. If confidential, the blinding keys need to be included.
3. Alice sends to Bob the `SwapRequest` message containing the unsingned transaction. An additional input and eventual change output needed to pay *half* of the network fees is included by Alice in the transaction.
4. Bob, if accepts the terms, funds the swap and partially signs the proposed transaction and includes his blinding keys too.
5. Bob sends back to Alice the `SwapAccept` message containing the partially signed transaction. An additional input and eventual change output needed to pay the remaining *half* of the network fees is included by Bob in the transaction.
6. Alice parses the accepted swap and signs the transaction.
7. Alice sends to Bob the `SwapComplete` message containing the signed transaction.
8. Ideally Bob finalizes and broadcast the transaction to the Liquid network.

## Swap

### Data Structures

```protobuf
syntax = "proto3";

message SwapRequest {
  // Random unique identifier for the current message
  string id = 1;
  // The proposer's quantity
  uint64 amount_p = 2;
  // The proposer's asset hash
  string asset_p = 3;
  // The responder's quantity
  uint64 amount_r = 4;
  // The responder's asset hash
  string asset_r = 5;
  // The proposer's unsigned transaction in PSET format (base64 string)
  string transaction = 6;
  // In case of a confidential transaction the blinding key of each confidential
  // input is included. Each blinding key is identified by the prevout script
  // hex encoded.
  map<string, bytes> input_blinding_key = 7;
  // In case of a confidential transaction the blinding key of each confidential
  // output is included. Each blinding key is identified by the output script
  // hex encoded.
  map<string, bytes> output_blinding_key = 8;
}

message SwapAccept {
  // Random unique identifier for the current message
  string id = 1;
  // indetifier of the SwapRequest message
  string request_id = 2;
  // The partial signed transaction base64 encoded containing the Responder's
  // signed inputs in a PSET format
  string transaction = 3;
  // In case of a confidential transaction the blinding key of each confidential
  // input is included. Each blinding key is identified by the prevout script
  // hex encoded.
  map<string, bytes> input_blinding_key = 4;
  // In case of a confidential transaction the blinding key of each confidential
  // output is included. Each blinding key is identified by the output script
  // hex encoded.
  map<string, bytes> output_blinding_key = 5;
}

message SwapComplete {
  // Random unique identifier for the current message
  string id = 1;
  // indetifier of the SwapAccept message
  string accept_id = 2;
  // The signed transaction base64 encoded containing the Proposers's signed
  // inputs in a PSET format
  string transaction = 3;
}

message SwapFail {
  // Random unique identifier for the current message
  string id = 1;
  // indetifier of either SwapRequest or SwapAccept message. It can be empty
  string message_id = 2;
  // The failure code. It can be empty
  uint32 failure_code = 3;
  // The failure reason messaged
  string failure_message = 4;
}
```

### SwapRequest

The `SwapRequest` message is sent by the **Proposer** to the **Responder** to start the swap negotiation. The transaction is a PSET base64 encoded string containing the Proposer's inputs and outputs (amount_r and eventual change).

### SwapAccept

The `SwapAccept` message is sent by the **Responder** to the **Proposer** to accept the swap request.

### SwapComplete

The `SwapComplete` message is sent by **Proposer** to the **Responder** to announce the successful completion of the swap.

### SwapFail

The `SwapFail` message can be sent by either side of the swap protocol, at any time, to announce the swap termination.
`failure_code` is an optional parameter for specifying the failure reason. TBD

repository: liquiDAO/tdex-specs

repo_name: liquiDAO/tdex-specs


text:
> **Warning** This library is no longer maintained. The [`System.Numerics.BitOperations`](https://learn.microsoft.com/en-us/dotnet/api/system.numerics.bitoperations) static class and the [`System.UInt128`](https://learn.microsoft.com/en-us/dotnet/api/system.uint128) type in .NET 7+ should cover most use cases of it.

# SoftWx.Numerics for .NET Standard

This is a .NET Standard port of the [SoftWx.Numerics][reposite] math library, originally written by Steve Hatchett.

Please refer to the original project page for more information.

## Install

The package is available on [NuGet].

[reposite]:https://github.com/softwx/SoftWx.Numerics.git
[nuget]:https://www.nuget.org/packages/SoftWx.Numerics.Portable/


text:
# Health

Health is a healthchecking sidecar

It exposes `/health` as a http endpoint and calls the rpc endpoint `Debug.Health`

Every go-micro service exposes `Debug.Health`. We can use this for liveness checks.

## Usage

### Install

```
go get github.com/micro/util/cmd/health
```

or

```
docker pull microhq/health
```

### Run

Run the healthchecker specifying the service name and address to check

```
health --server_name=greeter --server_address=localhost:9091
```

### Call

Call the healthchecker on localhost:8080

```
curl http://localhost:8080/health
```

Response will be 200 OK

```
OK
```

### Kubernetes

We can add the healthchecking sidecar to a service with a livenessProbe

```
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  namespace: default
  name: greeter
spec:
  replicas: 1
  template:
    metadata:
      labels:
        name: greeter-srv
        micro: go.micro.srv.greeter
    spec:
      containers:
        - name: greeter
          command: [
		"/greeter-srv",
		"--server_address=<IP_ADDRESS>:9091",
		"--broker_address=<IP_ADDRESS>:10001"
	  ]
          image: microhq/greeter-srv:kubernetes
          imagePullPolicy: Always
          ports:
          - containerPort: 9091
            name: greeter-port
        - name: liveness
          command: [
		"/health",
		"--server_name=greeter",
		"--server_address=localhost:9091"
	  ]
          image: microhq/health:kubernetes
          livenessProbe:
            httpGet:
              path: /health
              port: 8080
            initialDelaySeconds: 3
            periodSeconds: 3
```

repository: soxueren/util

repo_name: soxueren/util


text:
---
title: Backend Organization
shortTitle: Backend
---

The [architus backend](https://github.com/architus/architus) is built with microservices at its root, allowing for rapid and flexible horizontal scalability. When it comes to the Discord API, the bot takes advantage of Discord's [sharding functionality](https://discordapp.com/developers/docs/topics/gateway#sharding), which provides determinate distribution of guilds across each bot instance.

## Network Diagram

![Network diagram](./network_diagram.png)

branch_name: refs/heads/develop

gha_language: TypeScript


text:
# Gitron

>Greetings, programs!

## Description

This is a web game based on [TRON](http://en.wikipedia.org/wiki/Tron) universe. Every repository on GitHub can be a TRON character *(sam, clu, flynn, tron, etc.)* and can fight against other repositories.

The score is based on:

* repository size
* number of releases
* number of contributors

**issues** instead will be subtracted to the main score of your repository.
The avatar is generated based on your repository **stars**, more stars it gets more important is the character generated :sunglasses:

Winner is chosen according to the higher score of the two programs fighting.

Beware the program who loses will be subject to immediate **deresolution**!

![sark](https://i.imgur.com/LPZ5XlX.gif)

## Achievements

These are just a few achievements you can unlock in **Gitron**.

Achievement | Description
----------- | -----
THE GRID | Enter The Grid
FOUND ZUSE | Find a way to see Zuse *(the guy with the white hair)*
ISOMORPHIC | Discover and ISO
PURGE | Dereze an ISO
TRON LIVES | Is Tron still alive?
FAITH IN USERS | Dereze the poor Jarvis
BETRAYAL | When Clu 2 derezzed Tron
END OF LINE | Destroy Master Control Program
THE CREATOR | ???

## Assets

Check out :zap: [THIS](https://github.com/syxanash/gitron/blob/master/public/img/ASSETS.md):zap: page for awesome pixel art!

![fight](https://i.imgur.com/vBbmmIh.gif)

## Installation

This app is written in Ruby using Sinatra.

```
gem install octokit
git clone git://github.com/syxanash/gitron
bundle install
ruby app.rb
```

## See also

Here listed a few things I used for developing this project.

* [github-high-scores](https://github.com/leereilly/github-high-scores) by Lee Reilly. I was highly inspired by his work.
* [Sinatra](http://www.sinatrarb.com/) a Ruby web framework
* [noty](https://github.com/needim/noty) jquery notification plugin
* [magic](https://github.com/miniMAC/magic) a couple of very nice CSS3 animations I used
* [github API](https://developer.github.com/v3/)

## Bugs & known issues

* __MCP__ apparently is still alive...

## Easter eggs

:rabbit:

* look up for the source code if you're interested

## About

This is just a summer project I developed after finishing a few exams for university. I really hope you like it as much as I liked creating it!

Let's see if your programs are lucky enough to fight for his own user.

![clu2](http://media.giphy.com/media/IRSvFo1FIXuTK/giphy.gif)

repository: syxanash/gitron

gha_license_id: NOASSERTION

repo_name: syxanash/gitron


text:
# Change Log
**Main implemented enhancements:**

- Rebranding and restyling [\#86](https://github.com/miraisolutions/OasisUI/pull/86) [\#85](https://github.com/miraisolutions/OasisUI/pull/85)
- Collapsable sidebar [\#45](https://github.com/miraisolutions/OasisUI/pull/45)
- Redefined reactive navigation [\#46](https://github.com/miraisolutions/OasisUI/pull/46)
- Restructure workflow to create and run an analysis restructuring and integrate  file managment into intermediate steps[\#92](https://github.com/miraisolutions/OasisUI/pull/92)  [\#90](https://github.com/miraisolutions/OasisUI/pull/90) [\#68](https://github.com/miraisolutions/OasisUI/pull/68) [\#64](https://github.com/miraisolutions/OasisUI/pull/64)
- Integrate Reinsurance [\#75](https://github.com/miraisolutions/OasisUI/issues/75)
- Dependencies cleanup [\#86](https://github.com/miraisolutions/OasisUI/pull/86)
- Added step structure to analysis creation [\#98](https://github.com/miraisolutions/OasisUI/pull/98)
- Improved user experience with enabling and disabling of buttons [\#110](https://github.com/miraisolutions/OasisUI/pull/110)
- Improved code documentation [\#113](https://github.com/miraisolutions/OasisUI/pull/113)
- Restructure reporting [\#114](https://github.com/miraisolutions/OasisUI/pull/114)
- Integrate new API [\#133](https://github.com/miraisolutions/OasisUI/pull/133)

repository: OasisLMF/OasisUI

gha_language: R

repo_name: OasisLMF/OasisUI


text:
# Tools for the NEAR Guildnet Network

First compile the source code in a container

- [Compiler](https://github.com/solutions-crypto/near-guildnet-tools/tree/main/nearcore-autocompiler)

Second install the services

- [Installer](https://github.com/solutions-crypto/near-guildnet-tools/tree/main/nearcore-service-setup)

Optionally install the staking bot

- [Staking Bot](https://github.com/solutions-crypto/near-guildnet-tools/tree/main/staking-bot)

Optionally set up Monitoring

- [Monitor](https://github.com/solutions-crypto/near-guildnet-tools/tree/main/monitor)

repository: solutions-crypto/near-guildnet-tools

gha_language: Shell

repo_name: solutions-crypto/near-guildnet-tools


text:
---
layout: post
title:      "My Workout Tracker Rails App"
date:       2018-05-17 20:43:55 +0000
permalink:  my_workout_tracker_rails_app
---

Continuing on with the theme of fitness, my Rails app is a workout tracker to complement the diet tracker app that I built for my Sinatra project.

The app consists of 3 models; User, Workout, and Exercise.   A `User has_many :workouts and has_many exercises, through: :workouts`, a `Workout belongs_to :user and has_many exercises`, and an `Exercise belongs to :workout`.

A user may create an account through our own authentication form, or login/sign up through Github, via the Omniauth gem.

The app is designed so that a User can log in and add workouts to their log.  A workout is created with a Date, Weekday, Bodypart (area worked that day), and Comments on the workout for later reference.  Once a Workout is created, from the workout show page, you are able to add an exercise, edit the workout, or delete the workout. When you click add a workout, you are taken to the new exercise form.

When adding an exercise, you are able to select an exercise and a bodypart from a pulldown select menu.  For convenience, you have the option to filter the select menu by bodypart, which automatically updates the bodypart select.  You then type in the number of sets and reps you did for that exercise and create the exercise.

You are then directed back to the workout show page, where you will see the exercise you just added.  If you need to edit or delete an exercise that has been added to a workout, simply click on the exercise and you will be taken to the edit exercise page.  Here you can update all aspects of that particular exercise, or delete the exercise if you so choose.

If you need ideas about exercises for an upcoming workout, visit the exercises page, where you can view all of the exercises in the database.  Here you have the ability to again filter exercises by bodypart.  You also have the ability to view your exercises, which are the exercises you have used in a previous workout.

And that is pretty much it.  It is a very simple but useful app for those looking to keep track of their workouts.

You can check it out here:

https://github.com/jaybednar/my-workout-tracker-rails-app