text:
# Hitchhiker's Guide to FAccT 2021

## Background

The countdown to ACM FAccT 2021 has begun! The conference will be held as a completely virtual conference March 4 - 10, 2021. It is our hope that we can invite some of the same curiosity and engaged participation that has defined the previous four years.

The conference brings together researchers and practitioners interested in fairness, accountability, and transparency in socio-technical systems. This is our first conference under the new name, and still builds on the success of the 2020 conference held in Barcelona. This year we are featuring 17 Tutorial sessions, 11 CRAFT sessions, 26 Paper-focused sessions, 3 Keynotes and a lot more. It is our hope that, whether you are new or seasoned alumni, you walk away feeling connected and excited about the work happening in this multidisciplinary research community.

This Guide contains key dates, information about registration, conference tech set-up, and instructions on how to get support before the event.

## How to Prepare for the Program
The majority of FAccT 2021 occurs on the Hub. The Hub is a custom platform we designed that contains most of the tools you will need to participate in FaaCT 2021. As a registered attendee you will have access to FAccT’s virtual conference portal starting on Thursday, February 25. We recommend you take some time to familiarize yourself with the conference portal and encourage you to engage with speakers and attendees before the conference begins!

During the conference, you will explore the Hub to watch the sessions, learn about speakers, download papers, and discuss relevant topics with your fellow conference attendees. All you need is a browser, an internet connection, and conference registration on the Hub.

## Accessing the Conference

Most sessions will be live streamed into three stages on the Hub. Some sessions, however, are more interactive and require participants to join the Zoom call. In this case, we ask that you [download the Zoom desktop application](https://zoom.us/download) ahead of time. If you need help, please review the Getting Support section below.

Access to live sessions will become available on the scheduled day of the session on our conference live stages. We recommend that you log in a few minutes early since all sessions plan to run on time!

Authors will be available during the conference to answer questions and discuss their findings through discussion boards found on the Hub.

The key features of this year’s event:

**Pre-recorded talks** for research presentations are available for viewing anytime after February 25. Note that all live research paper sessions will have 20-minute pre-recorded content associated with them. Similar themed papers are grouped together and the content will be livestreamed during the first hour and then we will bring the authors together for a live Q&A for the second hour.

**Community discussion boards** to interact with attendees outside of the sessions via Circle.so integration.

**Live Q&A sessions** during the main conference itself will be facilitated via Sli.do for keynotes, panelists, tutorials, and research presentations. All sessions will have access to Sli.do except for sessions that are not live streamed, such as CRAFT. These sessions will have limited capacity, so we encourage you to plan in advance if you wish to participate.

## What you need to Attend

**The Right Browser:** We recommend using Chrome for the best user experience. However, our virtual conference portal works well on Safari, Firefox, and Microsoft Edge.

**Access to Internet:** You will need to have access to the internet in order to access the Hub and watch the livestream.

## Conference Agenda

Please note that all conference times on the portal are in **Coordinated Standard Time (UTC +0)**. You will be able to add events to your own calendar to convert to your local time.

## Diversity, Equity and Inclusion Initiative

The FAccT 2021 Diversity, Equity and Inclusion webpage will go live on February 26th, in the meantime, please direct open questions to DEI Chairs to<EMAIL_ADDRESS>


text:
# Codemirror

The `app-codemirror` component creates a versatile [Codemirror](http://codemirror.net) code editor block for advanced editing and formatting of programming code. It supports multiple languages and themes, which can be specified for inclusion in the `config/environment.js` file. Advanced features include bracket matching, automatic tag closing, whitespace removal, and block comments.

> This functionality requires the {{#link-to "docs.config"}}`codemirror`{{/link-to}} plugin to be enabled.

{{#docs-demo as |demo|}}
	{{#demo.example name='docs-demo-elements-codemirror.hbs'}}
		{{app-codemirror value=value onChange=(action (mut value))}}
	{{/demo.example}}
	{{demo.snippet 'docs-demo-elements-codemirror.hbs'}}
	{{demo.snippet 'docs-demo-elements-codemirror.js'}}
{{/docs-demo}}

license: MIT

repository: abcum/ember-app

branch_name: refs/heads/master

extension: md

gha_language: JavaScript

gha_license_id: MIT

license_type: permissive

repo_name: abcum/ember-app


text:
---
title: "Deploying to Netlify"
metaTitle: "Deploying to Netlify"
metaDescription: "Learn how to deploy your site to Netlify"
---

import YoutubeEmbed from "../src/YoutubeEmbed.js";

In this lesson you will learn how to deploy your Gatsby website to Netlify.
You will be required to create a Netlify account and connect it to your Github
account (or other Git provider).

<YoutubeEmbed link="https://www.youtube.com/embed/D9-Borq9a4U" />

repository: smthomas/gatsby-training

repo_name: smthomas/gatsby-training


text:
# Swagger::Docs::Generator | [![Travis][1]][2] [![Gem][21]][22] [![Docs][11]][12]

Generator for Swagger Apps ([Example with theme](https://github.com/Dev-Crea/swagger-ui))

## Menu

* [How to use](#how-to-use)
  * [Installation](#installation)
  * [Usage](#usage)
* [Development](#development)
* [Contributing](#contributing)

## How to use

### Installation

Add this line to your application's Gemfile :

```ruby
gem 'swagger-docs-generator'
```

And then execute :

```linux
bundle
```

Or install it yourself as :

```linux
gem install swagger_docs_generator
```

### Usage

Create initializer :

```linux
rails generator swagger_docs_generator:initializer
```

Create environment :

```linux
rails generator swagger_docs_generator:environment
```

Execute rake task for generated `swagger.json` :

```linux
rake swagger:docs
```

## Examples

```ruby
# frozen_string_literal: true

module V1
  # Documentation API for AddressesController
  class AddressesDoc < BaseDoc
    CONTROLLER = V1::Geos::AddressesController

    # Describe object Addresses
    # ###
    scontroller 'User Addresses management'

    # Describe all actions
    # ###
    sdoc :show do
      summary 'Show address'
      responses do
        status 200
        schema { definition 'address' }
      end
      responses { status 404 }
      responses { status 422 }
      description <<EOS
  # Show address to user

  Show complete address to user.
EOS
    end

    sdoc :create do
      summary 'Create address'
      responses { status 201 }
      responses { status 422 }
      parameters do
        body do
          name 'address'
          schema 'address create'
        end
      end
      description <<EOS
  # Add address

  Save an address to user.
EOS
    end

    sdoc :update do
      summary 'Update address'
      responses do
        status 200
        schema { definition 'address' }
      end
      responses { status 404 }
      responses { status 422 }
    end

    sdoc :destroy do
      summary 'Destroy address'
      responses do
        status 200
        schema { definition 'address' }
      end
      responses { status 404 }
      responses { status 422 }
    end

    # Add definition more model
    # ###
    sdefinition 'address create' do
      required %w[address]
      properties do
        required %w{country city zip_code street}
        properties country: { type: :string },
                   city: { type: :string },
                   zip_code: { type: :string },
                   street: { type: :string },
                   complements: { type: :string }
      end
    end

    sdefinition 'address' do
      required %w[address]
      properties do
        properties country: { type: :string },
                   city: { type: :string },
                   zip_code: { type: :string },
                   street: { type: :string },
                   complements: { type: :string },
                   coordinates: { type: :string }
      end
    end
  end
end
```

## Development

After checking out the repo, run `bin/setup` to install dependencies. Then,
run `rake spec` to run the tests. You can also run `bin/console` for an
interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run `bundle exec rake install`.
To release a new version, update the version number in `version.rb`, and then
run `bundle exec rake release`, which will create a git tag for the version,
push git commits and tags, and push the `.gem` file to
[rubygems.org](https://rubygems.org).

## Contributing

Bug reports and pull requests are welcome on GitHub at
<https://github.com/Dev-Crea/swagger-docs-generator>. This project is intended to
be a safe, welcoming space for collaboration, and contributors are expected to
adhere to the [Contributor Covenant](http://contributor-covenant.org)
code of conduct.

[1]: https://travis-ci.org/Dev-Crea/swagger-docs-generator.svg?branch=master
[2]: https://travis-ci.org/Dev-Crea/swagger-docs-generator

[11]: https://badge.fury.io/rb/swagger_docs_generator.svg
[12]: https://badge.fury.io/rb/swagger_docs_generator

[21]: https://inch-ci.org/github/Dev-Crea/swagger-docs-generator.svg
[22]: https://inch-ci.org/github/Dev-Crea/swagger-docs-generator

repository: Dev-Crea/swagger-docs-generator

repo_name: Dev-Crea/swagger-docs-generator


text:
“I am [Adrià Ferrer](https://www.linkedin.com/in/AdriaFerrerC), student of the
[Bachelor’s Degree in Video Games by UPC at CITM](https://www.citm.upc.edu/ing/estudis/graus-videojocs/).
This content is generated for the second year’s subject Project 2, under supervision of lecturer
[Ricard Pillosu](https://es.linkedin.com/in/ricardpillosu).”

# Cutscenes
According to wikipedia:

“A cutscene is a sequence in a video game that is not interactive, breaking up the gameplay.”

They are usually used to show conversation between characters, set the mood and introduce new gameplay features or incoming events.
There are two main types of cutscenes.

The ones rendered in **real time** that use the game graphic enginge to create scripted events and **pre-rendered** video or "cinematic".

(examples of GTA V and Tomb Raider)

Although, there are some more types like:

  - **Live-action cutscenes**, which are recorded like a film. (Need for speed)

  - **Mixed media cutscenes**, which, as the name says mixes real time and pre-rendered graphics. (Wing commander III)

  - **Interactive cutscenes** also known as quick time events. (Tomb Raider)

# Pre-rendered vs Real-time
Let's see and compare the pros and cons of both pre-rendered and real-time cutscenes.

The pros of pre-rendered cutscenes are mainly based on the higher capability of creating stuff without resources restriction, just limited to human imagination and ability and to create complex animations, for example physics simulations like fluids or cloth deformation.

In the other hand, real-time has more freedom of what to show in screen, for example if the player has chosen to equip his character with a blue cape instead of a red one, it will be seen in the cutscene, whereas in pre-rendered, the characters and the environment is fixed at the moment it is created and will not change whatever the player does.

However, real-time graphics are limited to the game graphic engine which is suposed to have worse quality than pre-rendered graphics (although nowadays this difference is becoming less and less) and the animations are also limited to the ones "in-game", which tend to be much simplier.
For the same reason, when swapping from gameplay to real-time cutscenes, there is no noticeable change in graphic quality and helps the player to keep immersed into the game. By contrast, with pre-rendered scenes, adding that the characters appearance could change from the gameplay, the player could lose his focus and as a result the feeling of immersion.

Talking about the resources spent for every kind of cutscene, pre-rendered use disk memory as it weights much more than the code lines but if compresed too much, it will lose a lot of quality and could look even worse than in-game graphics.
Real-time, consumes RAM and CPU usage as it is making calculations and moving things at the moment.

The problem with real-time cutscenes, is that there are a lot of factors that could influentiate the behaviour of the scene, for example things or characters that should not be there as we saw in the example of GTA V above. Also, every bug that can happen during the game, can happen during the cutscene for example with colliders, where a character can be stuck and then teleport or stretch in an inhuman way.

As higher is the degree of freedom of the game, the higher the chances that some nasty things occur during the cutscene.
Is for that reason, that the cutscene manager is a really important tool and needs to be well designed and give as much control over every single element as possible.

With all the factors seen above, we can conclude that pre-rendered cutscenes are usefull for advertising as they can look really fancy and cool, for the presentation or the end of the game as well as some scenes at the beginning of specific misions where it does not crash with the gameplay graphics and even it is used to mask loading times, as it does not consume much resources it can be executed simlutaneously while the program is loading the next map/scene and the player will not be exasperated or bored of waiting too much time.
Finally, real-time is good for "in-game" scenes so the player feels a continuity and do not lose the focus. Even more if there is a huge degree of personalization on the environment or the characters/weapons used as it can be easily represented in the cutscene.

# Existing cutscene editors
Now we are going to look at two existing engines and their different approach for creating cutscenes.

### Unity
Since Unity version 2017.2 it includes a native cutscene editor called "Timeline" it is a sequencer of multitracks that allows to create gameplay sequences controling game objects, it is prepared to work with a free plugin called [Cinemachine](https://assetstore.unity.com/packages/essentials/cinemachine-79898) which is a procedural camera system that grants absolute control over camera movements, transitions between several ones and effects.

Also, there are some paying plugins created by community developers that can do the same or even more.
For example [Cinema Director](https://assetstore.unity.com/packages/tools/visual-scripting/cinema-director-timeline-cutscene-editor-19779) which through the same use of a timeline, allows to control game objects, camera position and switches, sound effects and transitions in an easy and intuitive way.
### Unreal Engine
In Unreal engine, there is a tool called Matinee, it works pretty similar to the Unity one. There is a timeline where you can create multiple tracks, each related to a game asset. There, you can add keyframes with a different state in each and the engine will create a smooth transition between them and a cinematic effect.

## The common use of a timeline
Both of them have something in common, they use a timeline to create the cutscenes; however, they use it differently.
Unity uses "blocks" with some function related, they have a start time and a duration. They can also be overlapped between them in order to create a smooth fadding transition when changing.
As in this example image. We can see in blue, the animations that will be executing for the attacker 1, in orange, each sound effect or music and in green, whether a game object will be active or not. It is like any simple video editor.

Then you can access a game object, specially used with cameras and enter the animation function, which allows you to create an animation by saving keyframes of the state of the object and then use it in the timeline. This function is basically what is used in Unreal engine, where you do not create blocks of functions/events but save keyframes of the different changes that happen during the scene to create a "big animation".

   Each red arrow is a keyframe

# Let's code
### Which is our objective
Our objective is to get a functional cutscene manager, which allows us to do some actions in sequence (move and activate/deactivate objects) as easy as possible and "outside the program", without coding.

In order to achieve that, we will try to mimic the cutscene system of Unity, using "blocks" of actions and simulating a timeline. The cutscene will be created and readed in an .xml file.

This is an example of what we will be able to achieve through that cutscene manager

### What we have and what we need
We will use a really basic engine, that grants a system based on diferent modules, each one with a specific task asociated. (input manager, audio manager, render, window, scene, fonts, textures, entity manager and GUI manager).

#### The entity manager:

It basically manages a list of entities. An entity is a subclass that have a position, a section, a type (ALLY or ENEMY) and an ID.

The entity manager is in charge of creating them, calling their function to draw, allowing you to move the selected entity with (WASD) input and to manage the cutscene events related to entities.

To create an entity:
```c++
Entity* j1EntityManager::createAlly(int x, int y);
Entity* j1EntityManager::createEnemy(int x, int y);
```

#### The GUI manager:

It is almost the same than the entity manager, but with a list of UI_Elements (really similar to an entity). The main difference here is that in the example, we will be working with a specific UI_Element which inherit from the main class: TextBox.

The TextBox is an element that will be drawing a white box with some lines of text inside. It uses the element Text which basically stores and prints into screen a string.

To create a TextBox and add lines of text to it:
```c++
TextBox* j1Gui::createTextBox(int x, int y);
void TextBox::addTextLine(std::string text);
```

After we know what we already have and how to use it, let's see what we will have to create.
We will need a new module called CutsceneManager, it will be based on a list of Cutscenes.

A cutscene itself, will be another subclass, based on a list of steps.

And finnaly, each step will contain the information of what action to do and which element of the game will be affected.

### Coding main functionalities
Let's start from the smallest fragment to the big ones.
#### Step:
It contains a duration and a timer, so it knows when to end.

To indentify the element to interact with, it has and ID (int) and a struct:
```c++
enum stepOf
{
	WAIT_TYPE,
	ENTITY,
	UI_ELEMENT,
	MUSIC,
	FX
};
```
The action to perform will be defined by another struct:
```c++
enum step_type
{
	MOVE_TO,
	MOVE,
	ACTIVATE,
	ACTIVATE_AT,
	DEACTIVATE,
	WAIT
};
```
    - Move to: Move the element to a specific position.
    - Move: Move the element a specific amount of pixels.
    - Activate/Deactivate: Self explanatory. In case of fx/music it will reproduce it.
    - Activate at: Activate into a specific position.
    - Wait: Wait a certain amount of time before executing the following steps.

In order to perform the desired action, it will have some iPoints (struct with x and y as ints) or fPoints (struct with x and y as floats):
```c++
iPoint movement; //Stores the specific movement to do
iPoint destiny; //Stores the position we want the element to move to
fPoint movement_vector; //Stores the director vector of the movement to do calculations
```
Finally, it will have a list of Steps called "followingSteps", it will store the steps that have to be executed once the current one is finished.

#### Cutscene:
It contains a string/tag to be identified and two list of steps: steps (all of the steps of the cutscene that start at time=0) and activeSteps (the ones that are active and executing in that moment).

#### Cutscene Manager:
As I said, it will have a list of cutscenes and a pointer to the one that is active (one at a time).

The cutscenes will be stored in an .xml file with a specific structure that we will discuss later. In order to execute a cutscene it will have 4 functions:
```c++
void startCutscene(std::string tag);
Cutscene* isCutsceneLoaded(std::string tag);
Cutscene* loadCutscene(std::string tag);
Step* loadStep(pugi::xml_node step);
```
When we want to execute a cutscene, we call startCutscene() entering the tag of it. It will check if it is loaded using isCutsceneLoaded() and if it is not it will call loadCutscene().

In this function it basically, loops looking for all the steps defined and calling loadStep() on them and pushing them to a new Cutscene.

In loadStep(), it reads what we have defined in the node, and initialize a new Step with the information. If this step have some following steps defined, it will also call again loadStep() on them.

The activeSteps list, will work as an event list from where the other modules read in order to get the needed information.

On the Update() of the cutscene manager, we will be checking wether a step has finished or not and if it does, we will remove it from the list and load the corresponding following steps.
```c++
for(std::list<Step*>::iterator it_s = activeSteps.begin(); it_s != acitveSteps.end(); it_s++)
{
	if ((*it_s)->isFinished())
	{
		activeCutscene->activeSteps.erase(it_s);
		activeCutscene->loadFollowingSteps((*it_s));
	}
}
```
#### The xml
Now let's take a look at how the xml works. Each cutscene will be separated in a different file, all of them stored in a folder called Cutscenes for better organization. The tag of the cutscene will be the name of its file.

To add steps, we will use the following structure:
```c++
<cutscene>
    <step1>
        <step3>
	    <step5>
	    </step5>
	</step3>
	<step4>
	</step4>
    </step1>
    <step2>
    </step2>
</cutscene>
```
In this example, step1 and step2 will start at time=0. Step3 and step4 will start after step1 has finished and step5 will start after step3 has finished.

The good thing about this structure is that we can imagine a vertical line moving from left to right, that would be a timeline and the steps that are in the same point, will start simultaneously. Check this animated example:

The structure of the steps will be as following:
```c++
<step type="" duration="" x="" y="">
    <entity ID=""/>
</step>
```
The type, will define the action to do (move_to, move, activate, activate_at, deactivate, wait).

The duration is for how many miliseconds does the step last. For most of the actions it won't be used as they are instantaneous or the duration is defined by the amount of movement. It is used mainly by the "wait" action.

The coordinates x and y are used to define the amount of movement (move), the position to reach (move_to) or the position to be activated (activate_at).

If some of that attributes are not used in a step, you do not have to include them.

The node inside the step will define the element to interact with and its ID (entity, UI_element, music, fx).

#### Managing cutscene events
To manage all the cutscene events is really simple. Let's take a look for example at the entity manager.

It has a function called manageCutsceneEvents(float dt) which is called at the end of its Update().
In that function, you just loop through all the activeSteps of the activeCutscene, and check if the element related to that step (stepOf) is the one that you are managing. In that case, you do a switch through the possible actions that this element will be affected by (music is not affected by move, so no need to check) and perform the needed operations.
```c++
if (App->cutscenemanager->activeCutscene != nullptr) //Make sure there is an active cutscene
{
	for (std::list<Step*>::iterator it_s = App->cutscenemanager->activeCutscene->activeSteps.begin(); it_s != App->cutscenemanager->activeCutscene->activeSteps.end(); it_s++)
	{
		if ((*it_s)->element == ENTITY) //The step is affecting an entity
		{
			Entity* entity = getEntity((*it_s)->id); //Get the wanted entity
			if (entity != nullptr) //The wanted entity actually exists
			{
			}
		}
	}
}
```
Let's see the operations we are doing to manage the entity events:
```c++
float step_speed = DEFAULT_ENTITY_SPEED*dt; //Get the speed that this entity should have during that frame
switch ((*it_s)->type)
{
case MOVE_TO:
	if ((*it_s)->movement.x == 0 && (*it_s)->movement.y == 0) //In this case, you have defined a destiny
	{
		//So you calculate the needed movement to reach that position
		(*it_s)->movement.x = (*it_s)->destiny.x - entity->position.x;
		(*it_s)->movement.y = (*it_s)->destiny.y - entity->position.y;
		if ((*it_s)->movement.x == 0 && (*it_s)->movement.y == 0)
		{
			//If after that movement still is 0 it means that already is in that position so you finish step
			App->cutscenemanager->activeCutscene->forceStepFinish((*it_s));
			break;
		}
	}
	//And then do as in the normal MOVE case
case MOVE:
	if ((*it_s)->duration == -1) //At the beginning the duration is set to infinite (-1)
	{
		float distance = sqrt(pow((*it_s)->movement.x, 2.0) + pow((*it_s)->movement.y, 2.0));
		float time = distance / DEFAULT_ENTITY_SPEED;
		(*it_s)->duration = time * 1000; //So you calculate the duration that it will take to perform the desired movement
		//Now calculate the director vector of the movement
		(*it_s)->movement_vector.x = (*it_s)->movement.x / distance;
		(*it_s)->movement_vector.y = (*it_s)->movement.y / distance;
	}
	//And change the entity position according to the speed and the direction vector
	entity->position.x += (*it_s)->movement_vector.x*step_speed;
	entity->position.y += (*it_s)->movement_vector.y*step_speed;
	break;
case ACTIVATE_AT:
	//Change the position of the entity to the desired destiny
	entity->position.x = (*it_s)->destiny.x;
	entity->position.y = (*it_s)->destiny.y;
	//And activate it
case ACTIVATE:
	entity->active = true;
	App->cutscenemanager->activeCutscene->forceStepFinish((*it_s)); //This kind of event has infinite duration, so force it to finish
	break;
case DEACTIVATE:
	entity->active = false;
	App->cutscenemanager->activeCutscene->forceStepFinish((*it_s)); //This kind of event has infinite duration, so force it to finish
	break;
}
```

### Code yourself
In order to follow the next exercices, you can download a zip file with: the code with the exercices, the solution and a release with an example [here](https://github.com/Adria-F/Cutscene-Manager/releases/download/1.0/Cutscene.Manager.Exercices.zip)
#### TODO 1
You have the node of the cutscene loaded into a pugi::xml_node called cutscene, now it is time to create the cutscene and load each step (use function loadStep(Step*)).

Hint: Allocate a new cutscene and loop through all the childs of the cutscene node called "step" in order to push them into the new cutscene

Extra: Look and try to understand what loadStep() function does.

  Solution (click to open)(open just to check your result)

#### TODO 2
You have the currently active cutscene stored in a pointer (activeCutscene)

Check each step of the activeSteps list. If one is finished (step.isFinished()), remove it from the activeSteps list and, loadFollowingSteps()

  Solution (click to open)(open just to check your result)

#### TODO 2.5
Use the stored variable "duration" and the timer, to check if this step is finished and return true if it is.

Hint: If the value of duration is -1 it means that this step has infinite duration (never is finished)

  Solution (click to open)(open just to check your result)

#### TODO 3
Fill the cases of ACTIVATE_AT, ACTIVATE and DEACTIVATE

Hint: If you are completely lost, you can check how it is done in j1Gui. But first try to do it yourself

  Solution (click to open)(open just to check your result)

#### TODO 4
Hint: Each tab means that this step is child of the pevious

Create a simple cutscene following this sequence:
```c++
- Activate UI_element(1) at {450, 350}
- Move entity(1) to {500, 400}
  - Deactivate UI_element(1)
  - Activate entity(2) at {500, -30}
  - Move entity(2) {0, 80}
    - Activate UI_element(2) at {450, 10}
    - Activate music(1)
    - Wait 1000 miliseconds
      - Deactivate UI_element(2)
      - Move entity(2) {0, 300}
        - Activate fx(6)
        - Deactivate entity(2)
        - Wait 500 miliseconds
          - Activate music(2)
```
You can execute the cutscene by pressing 'C' in the game.

  Solution (click to open)(open just to check your result)

## How could this be improved
This can be improved in many different ways, but the most important or interesting things that could be added are:

- Create the TextBoxes from the xml.
- Load the fx and music from the xml.
- Allow camera movement.
- Allow scene swapping.
- Allow reproduction of specific animations on entities.

# Bibliography
[https://en.wikipedia.org/wiki/Cutscene](https://en.wikipedia.org/wiki/Cutscene)

[https://www.gamespot.com/forums/playstation-nation-1000002/prerendered-vs-real-time-cutscenes-27069600/](https://www.gamespot.com/forums/playstation-nation-1000002/prerendered-vs-real-time-cutscenes-27069600/)

[https://www.reddit.com/r/truegaming/comments/1zksx4/prerendered_vs_inengine_cutscenes/](https://www.reddit.com/r/truegaming/comments/1zksx4/prerendered_vs_inengine_cutscenes/)

[http://gta.wikia.com/wiki/Cutscenes](http://gta.wikia.com/wiki/Cutscenes)

[https://wiki.unrealengine.com/Matinee_Basics:Creating_Your_First_Matinee_Sequence](https://wiki.unrealengine.com/Matinee_Basics:_Creating_Your_First_Matinee_Sequence)

[https://unity3d.com/es/learn/tutorials/topics/animation/using-timeline-overview?playlist=17099](https://unity3d.com/es/learn/tutorials/topics/animation/using-timeline-overview?playlist=17099)

[https://docs.unity3d.com/Manual/TimelineSection.html](https://docs.unity3d.com/Manual/TimelineSection.html)

[https://docs.unity3d.com/Manual/TimelineOverview.html](https://docs.unity3d.com/Manual/TimelineOverview.html)

[https://docs.unrealengine.com/en-us/Engine/Matinee](https://docs.unrealengine.com/en-us/Engine/Matinee)

[https://unity3d.com/es/learn/tutorials/topics/animation/cinemachine-clear-shot-camera-tutorial](https://unity3d.com/es/learn/tutorials/topics/animation/cinemachine-clear-shot-camera-tutorial)
## Interesting links:
[Cutscene as an information system](https://link.springer.com/chapter/10.1007/978-3-319-07626-3_62)

repository: Adria-F/Cutscene-Manager

repo_name: Adria-F/Cutscene-Manager


text:
# Vagrant Lucee Development VM
Local development environment for CFML projects

> (CentOS+Nginx+Tomcat+Lucee+CommandBox)

Vagrant box for local development with Lucee/CommandBox and several utilities.

## Requirements

It is assumed you have Virtual Box and Vagrant installed. If not, then grab the latest version of each at the links below:
* [Virtual Box and Virtual Box Guest Additions](https://www.virtualbox.org/wiki/Downloads)
* [Vagrant](https://www.vagrantup.com/downloads.html)

### Vagrant Plugins

Once Vagrant is installed, or if it already is, it's highly recommended that you install the following Vagrant plugins:

* [vagrant-hostsupdater](https://github.com/cogitatio/vagrant-hostsupdater)
```$ vagrant plugin install vagrant-hostsupdater```
* [vagrant-vbguest](https://github.com/dotless-de/vagrant-vbguest)
```$ vagrant plugin install vagrant-vbguest```

---

## What's Included
* [CentOS 7.1 64bit](https://www.centos.org)
	* https://github.com/holms/vagrant-centos7-box/releases/download/7.1.1503.001/CentOS-7.1.1503-x86_64-netboot.box
* [Nginx Latest](www.nginx.org)
	* Set up to serve all static content and reverse-proxy cfm/cfc/jsp requests to Lucee with URL rewrites enabled
	* Self-signed SSL certificate can be found under `/etc/nginx/ssl` and every site is configured for SSL as well.
	* Nginx configured with high timeouts for development purposes
* [CommandBox](http://www.ortussolutions.com/products/commandbox)
	* Set up to do build processes, REPL, package management or a-la-carte servers if required
	* CommandBox home configured at `/root/.CommandBox`
* [Lucee](www.lucee.org)
	* Set up via reverse-proxy in Nginx and with a control port on 8888
* [Oracle JDK](http://www.oracle.com/technetwork/java/javase/downloads/)
	* Installed globally under `/usr/lib/jvm/current`
* [FakeSMTP](https://nilhcem.github.io/FakeSMTP/)
	* Lucee is configured with a Fake SMTP server that will output all outbound emails to `/opt/fakeSMTP/output` for convenience
	* This is installed under `/opt/fakeSMTP`

---

## Files
This repository is divided in two parts:
-  `vagrant/` : Run all **vagrant** commands from this directory.
    - `artifacts/` : Where downloaded installers will be placed
    - `provisioners/` : The provisionning bash scripts for the box
    - `configs/` : Configuration files for Nginx, Lucee, etc
    - `Vagrantfile/` : The vagrant configuration file
    - `log/` : Where a log file is stored that documents the last provisioning process.
    - `Sample_VagrantConfig.yaml` : A sample configuration file for new sites.  See "Configuring Sites".
- `www/` : Code for the small, default site that shows you the status of your configuration

## Installation
The first time you clone the repo and bring the box up, it may take several minutes. If it doesn't explicitly fail/quit, then it is still working. You can check the log output in the `log` directory to see the output of the commands that have run.

```
$ git clone git@github.com:Ortus-Solutions/vagrant-centos-lucee.git
$ cd vagrant-centos-lucee/vagrant && vagrant up
```

Once the Vagrant box finishes and is ready, you should see something like this in your terminal:

```
==> default: Lucee-Dev-v0.1.0
==> default:
==> default: ========================================================================
==> default:
==> default: http://www.lucee.dev (<IP_ADDRESS>)
==> default:
==> default: Lucee Server/Web Context Administrators
==> default:
==> default: http://www.lucee.dev:8888/lucee/admin/server.cfm
==> default: http://www.lucee.dev:8888/lucee/admin/web.cfm
==> default:
==> default: Password (for each admin): password
========================================================================
```

> **Mac Note** : You might be required to enter your administrator password in order to modify the `hosts` file. Unless you run the command with `sudo vagrant up`

Once you see that, you should be able to browse to [http://www.lucee.dev/](http://www.lucee.dev/)
or [http://<IP_ADDRESS>/](http://<IP_ADDRESS>/)
(it may take a few minutes the first time a page loads after bringing your box up, subsequent requests should be much faster).

## Configuring Sites

This repo only contains the code and configuration for the default site that displays information about your install.  To add a new app to develop on, check out the repo for that app into the same directory that this `vagrant-centos-lucee` is located so sits along side it.  Each app's repo will need to have a folder in the root called `VagrantConfig` that contains one or more YAML files of any name.

### Sample YAML Configuration File

Here is an example YAML configuration file. It contains the configuration for a single app.  All properties are optional.  `wwwroot` will default to the root of the repo if not specified.

```
# name of the app
name: App 1

# Path to web root relative to the repo root
webroot: www

# List of domains to be added to the Host machine's and VM's "hosts" file
hosts:
- app1.local
- cool.app1.local

# List of CF Mappings to create relative to the repo root
cfmappings:
- virtual: /foo
  physical: www
- virtual: /bar
  physical: ''

# List of datasources to create
datasources:
- name: ds1
  database: db1
  host: sqlserverhost
  port: 1433
  class: com.microsoft.jdbc.sqlserver.SQLServerDriver
  dsn: jdbc:sqlserver://{host}:{port}

```
> **Note** : Keys in a YAML file are case-sensitive.

## Folder setup

Here is an overview of the folder structure that should exist on your hard drive including the configuration files.

-  `vagrant-centos-lucee/` : The contents of this repo
    -  `vagrant/`
    -  `www/`
- `app1/` : An example app
    - `VagrantConfig/`
        - `app1.yaml` : The configuration data for app1`
- `app2/` : Another example app
    - `VagrantConfig/`
        - `app2.yaml` : The configuration data for app2`

## Managing Setup Changes

Every time a new app is added or removed, reboot and reprovision the VM with this command:
```vagrant reload --provision```

All of the hosts will be added to your host machine as well as the VM.  CF mappings and datasources will be added into the Lucee administrator. If more than one site has a mapping or data source with the same name or virtual path, the first one found will be used.

After the re-provisioning is complete, visit the default site to see a current list of the apps that are now configured on the VM.  This page also has links to take you straight to each app as well as the Lucee administrator screens.  Please note, any settings you make in the Lucee administrator will be overwritten when you re-provision the VM.  Consider making changes programmatically via you app's `Application.cfc` file or adding them into the base Vagrant setup.

### Notes
* On Windows (host machines) you should run your terminal as an Administrator; you will also need to make sure your Hosts file isn't set to read-only if you want to take advantage of the hostname functionality. Alternatively, simply use the IP address anywhere you would use the hostname (connecting to database server, etc).

---

## References
* Thanks to Dan Skaggs, as this is a fork of his vagrant box

---

## License
The MIT License (MIT)

Copyright (c) 2015 Dan Skaggs

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

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

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

repository: ryaneberly/vagrant-ubuntu-lucee

repo_name: ryaneberly/vagrant-ubuntu-lucee


text:
---
layout: default
---

# 1993-10-25 - Re: Subliminal Channels

## Header Data

From<EMAIL_ADDRESS>(Michael Sattler)

To: Alexander Reynolds<EMAIL_ADDRESS>Message Hash: aeb4ab94fcaf9b54dcd5e2501e263b2ac8ff9014f4d7beb4868c383458899421

Message ID<EMAIL_ADDRESS>Reply To: _N/A_

UTC Datetime: 1993-10-25 00:03:24 UTC

Raw Date: Sun, 24 Oct 93 17:03:24 PDT

## Raw message

```
{% raw  %}From<EMAIL_ADDRESS>(Michael Sattler)
Date: Sun, 24 Oct 93 17:03:24 PDT
To: Alexander Reynolds<EMAIL_ADDRESS>Subject: Re: Subliminal Channels
Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

I can barely believe *I* am saying this, given my penchant for nibbling on
topics only somewhat near crypt, but IMHO it's time for y'all to take this
elsewhere.

Since it seems to have degenerated into a "is not, is too" exchange between
<EMAIL_ADDRESS>and<EMAIL_ADDRESS>I suggest you two
continue via email.

And *no* using subliminal ascii....

-----------------------------------------------------------------------------
Michael S. Sattler<EMAIL_ADDRESS>      +1<PHONE_NUMBER>
Digital Jungle Software    Encrypt now; ask me how.   (finger for PGP key)

               All that is required for evil to triumph is
                for {wo}men of good will to do nothing.

{% endraw %}
```

## Thread

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

+ Return to<EMAIL_ADDRESS>(Michael Sattler)](/authors/msattler_at_netcom_com_michael_sattler_)"

+ 1993-10-25 (Sun, 24 Oct 93 17:03:24 PDT) - Re: Subliminal Channels -<EMAIL_ADDRESS>(Michael Sattler)_


text:
# Slide Select for React Native
This is a small component I used in one of my earlier projects, a select component with next/previous arrows, can handle images and text values.

### Installation

You can copy SelectSlide.js directly in your components folder, and require it wherever you want to use it

List of component props :

 - data: Array with your options values
 - isImage: false by default, true if you have an array of images URIs.
 - arrowsSize: The size of the arrows Icon (25 by default)
 - arrowsColor: the color of the Arrows (white by default)

Quick examples of use:

```js
 <SlideSelect data={this.state.myImageOptionsArray} isImage={true} />
```

```js
 <SlideSelect data={this.state.myTextOptionsArray} />
```
### Deps
The component requires React Native Vector Icons for the arrows, but feel free to use any kind of representation you want.

```sh
npm install react-native-vector-icons --save
```

License
----
MIT

repository: thepembeweb/react-native-slide-select

repo_name: thepembeweb/react-native-slide-select


text:
# TS3-NodeJS-Library

[![Build Status](https://github.com/multivit4min/TS3-NodeJS-LIbrary/workflows/Node%20CI/badge.svg)](https://github.com/Multivit4min/TS3-NodeJS-Library/actions)
[![npm](https://img.shields.io/npm/v/ts3-nodejs-library.svg)](https://www.npmjs.com/package/ts3-nodejs-library)
[![Coverage Status](https://coveralls.io/repos/github/Multivit4min/TS3-NodeJS-Library/badge.svg?branch=master)](https://coveralls.io/github/Multivit4min/TS3-NodeJS-Library?branch=master)
[![Discord](https://img.shields.io/discord/653273459840778270)](https://discord.gg/Z5rdcGu)

The TS3 NodeJS Library has been strongly influenced by [PlanetTeamSpeaks TS3 PHP
Framework](https://docs.planetteamspeak.com/ts3/php/framework/index.html)

# Introduction

This library can connect to a TeamSpeak Server Query interface, send and receive commands aswell as upload and download files via Filetransfer!

With vscode you will receive powerful autocomplete of functions and their return values, so vscode is highly recommended!

## Install

`npm install --save ts3-nodejs-library`

# Documentation

You can find all necessary documentation [here](https://multivit4min.github.io/TS3-NodeJS-Library)!

# Example

Send a message to all non Query Clients connected:
```typescript
//import with typescript
import { TeamSpeak, QueryProtocol } from "ts3-nodejs-library"
//import with javascript
//const { TeamSpeak } = require("ts3-nodejs-library")

//create a new connection
TeamSpeak.connect({
  host: "localhost",
  protocol: QueryProtocol.RAW, //optional
  queryport: 10011, //optional
  serverport: 9987,
  username: "serveradmin",
  password: "",
  nickname: "NodeJS Query Framework"
}).then(async teamspeak => {
  const clients = await teamspeak.clientList({ client_type: 0 })
  clients.forEach(client => {
    console.log("Sending 'Hello!' Message to", client.nickname)
    client.message("Hello!")
  })
}).catch(e => {
  console.log("Catched an error!")
  console.error(e)
})
```

# Quickstart

## Connecting to a TeamSpeak Server

There are 2 ways to connect with the TeamSpeak Server:
using the wrapper `TeamSpeak.connect()` or by instanciating the `TeamSpeak` class by yourself

> to connect with TeamSpeak.connect():

```javascript
import { TeamSpeak } from "ts3-nodejs-library"

TeamSpeak.connect({
  host: "<IP_ADDRESS>",
  queryport: 10011
}).then(teamspeak => {
  //you are now connected
}).catch(e => {
  //an error occured during connecting
})
```

> when instanciating it by yourself:

```javascript
import { TeamSpeak } from "ts3-nodejs-library"

const teamspeak = new TeamSpeak({
  host: "<IP_ADDRESS>",
  queryport: 10011
})

teamspeak.on("ready", () => {
  //teamspeak connected successfully
})

teamspeak.on("error", () => {
  //teamspeak had an error
})
```

### Configuration

Parameter | Default |  Description
--------- | ------- | -----------
host | "<IP_ADDRESS>" | hostname to connect to
queryport | 10011 | queryport to connect to
protocol | "raw" | either use telnet or ssh to connect to the server
serverport | `empty` | the server port to select when connecting
username | `empty` | the username to login with (required when using ssh)
password | `empty` | the password to login with (required when using ssh)
nickname | `empty` | the nickname to connect with when selecting a server
readyTimeout | 10000 | timeout in ms to wait for the connection to be built
keepAlive | true | wether a keepalive should be sent to the teamspeak server
localAddress | `empty` | local address the socket should connect from

### Error handling when connecting

the method `TeamSpeak.connect()` will do error handling for you, when the query fails to connect or some of the commands which are being initially used to connect may encounter an error then the query will disconnect and reject the Promise with an error

However when instanciating TeamSpeak by yourself an `error` event might get thrown but the `ready` event will never fire

thats why `TeamSpeak.connect()` is more preferable to build a connection

## Basic Usage

### Sending a command

Sending a command is simple, every command will return a `Promise`. If you do not know what a Promise is then please read the documentation first: [developer.mozilla.org > Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)

When using NodeJS then Promises are essential for further progress

> Using Promises
>
```javascript
teamspeak.whoami().then(whoami => {
  console.log(whoami)
})
```

> Using Async/Await
>
```javascript
(async () => {
  const whoami = await teamspeak.whoami()
  console.log(whoami)
})()
```

`whoami` will then give you an object like

```javascript
{
  virtualserver_status: "online",
  virtualserver_unique_identifier: "t1lytXTeyvmHXvNJ4ZcBBd15ugs=",
  virtualserver_port: 9987,
  virtualserver_id: 1,
  client_id: 2,
  client_channel_id: 1,
  client_nickname: "serveradmin",
  client_database_id: 0,
  client_login_name: "serveradmin",
  client_unique_identifier: "serveradmin",
  client_origin_server_id: 0
}
```

### Events

To register for events you need to execute `teamspeak.registerEvent()` first in order to even receive events.

> Registering for all available Events

```javascript
Promise.all([
  teamspeak.registerEvent("server"),
  teamspeak.registerEvent("channel", 0),
  teamspeak.registerEvent("textserver"),
  teamspeak.registerEvent("textchannel"),
  teamspeak.registerEvent("textprivate")
])
```

When being registered for events you can use `teamspeak.on()` to register your event handlers

```javascript
teamspeak.on("textmessage", ev => {
  console.log(`${ev.invoker.nickname} just send the message "${ev.msg}"`)
})
```

### Flood Protection

Flooding will be handled automatically.

When the Query gets accused of Flooding then it will return error with id 524 and an error message which states how much time needs to be waited.

This will be parsed automatically and the Query will wait for the given time (normally its 1 second) + 100 additional milliseconds (sometimes it happens the query gets banned when still sending too early)

# Reconnecting

With version 2.3 this library is able to reconnect to its TeamSpeak Server when the connection has been lost.
It restores its full context this includes:
  * selecting the server
  * logging in with the last credentials
  * subscribing to all used events
  * selecting the correct nickname

all commands which have been added in meantime while the teamspeak server was not connected will be still executed after and all pending commands will be sent AFTER connecting and restoring the context

an example on how this looks like:

```typescript
import { TeamSpeak, QueryProtocol } from "./src/TeamSpeak"

TeamSpeak.connect({
  host: "<IP_ADDRESS>",
  queryport: 10011,
  serverport: 9987,
  protocol: QueryProtocol.RAW,
  username: "serveradmin",
  password: "xxx",
  nickname: "test"
}).then(async teamspeak => {

  teamspeak.on("close", async () => {
    console.log("disconnected, trying to reconnect...")
    await teamspeak.reconnect(-1, 1000)
    console.log("reconnected!")
  })

})
```

# Update Notes from 1.x to 2.x

With version 2.x support for Client Events has been dropped instead use the events from the main class TeamSpeak.
Additionally it comes with `TeamSpeak.connect()` in order to use a promise to connect to a teamspeak server.
Multiple node methods have been replaced with a getter for ex: `client.getDBID()` -> `client.databaseId`, `client.getUID()` -> `client.uniqueIdentifier`, `channel.getID()` -> `channel.cid`
The testing environment now runs via jest which makes mocking and testing easier. Since this project now is written in TypeScript vscode should now be completely capable to autocomplete, so there is no need to update docs on @types.
Documentation software has been switched from `documentation` to `typedoc`

# Update Notes to 2.3

The `close` event now only gets fired when a connection has been successfully established first!
In order to get errors when connecting to a server use the `error` event instead. This was required in order to implement the reconnect logic.

# Authors

* **David Kartnaller** ([Multivit4min](https://github.com/Multivit4min)) - *Initial work*
* **Pascal Sthamer** ([P4sca1](https://github.com/P4sca1)) and **Mattis Krämer** ([Mattzi](https://github.com/Mattzi)) - *TypeScript typings*
* **Alexander** ([xIAlexanderIx](https://github.com/xIAlexanderIx))

See also the list of [contributors](https://github.com/Multivit4min/TS3-NodeJS-Library/graphs/contributors) who participated in this project.


text:
#### Parser Content
```Java
{
Name = snare-592
    Vendor = Microsoft
    Product = Microsoft Windows
    Lms = Splunk
    DataType = "windows-process-created"
    IsHVF = true
    TimeFormat = "MMM dd HH:mm:ss yyyy"
    Conditions = ["""A new process has been created:""", """Detailed Tracking""", "\t592\t" ]
    Fields = [ """exabeam_host=({host}[^\s]+)""",
      """({event_name}A new process has been created)""",
      """Security\s*\d+\s+(Mon|Tue|Wed|Thu|Fri|Sat|Sun) ({time}\w+ \d+ \d+:\d+:\d+ \d+)""",
      """({event_code}592)""",
      """(Information|Audit Success|Success Audit)\s+({host}[^\s]+)""",
      """Image File Name:\s+({process}({directory}(?:[^"]+)?[\\\/])?({process_name}[^\\\/"]+?))\s+Creator Process ID:""",
      """Image File Name:\s+({path}.+?)\s+Creator Process ID:""",
      """User Name:\s+({user}.+?)\s+Domain:\s+({domain}.+?)\s+Logon ID:\s+\([^,]+,({logon_id}[^)]+)""",
      """New Process ID:\s+({process_guid}[^\s]+)\s""",
      """Creator Process ID:\s+({parent_process_guid}[^\s]+)\s"""
    ]
    DupFields = [ "host->dest_host","process_guid->pid","directory->process_directory" ]
  }
```

repository: Shubham-goel-Exa/Content-Doc

repo_name: Shubham-goel-Exa/Content-Doc


text:
# Numerical Analysis Class: Homeworks
Undergraduate numerical analysis, first semester, APPM 4650. University of Colorado Boulder

Most of the homework assignments are here, but homework **solutions** are on Canvas

- [HW 0](APPM4650_Fall20_Homework00.pdf) is optional (suggested due-date: Fri, Aug 28)


text:
# overview 👋

These are a series of notes (see [csinva.io](https://csinva.io/)) to serve as useful reference for people in machine learning / ai / neuroscience.

Below are the high-level topics of each note, with an auto-generated graph showing their similarities (based on tf-idf).

![similarities_graph](similarities_graph.svg)

`*`Topics labelled with an asterisk are research-level notes, not introductory.

The raw similarities are given in the plot below:

![area_similarities](area_similarities.svg)


text:
---
title: Instantiable Implicits in Scala
excerpt: A review of Scala design pattern that allows you to manage context without explicit parameter declarations.
image:  https://source.unsplash.com/qjnAnF0jIGk/1200x900
imageCredit: Markus Spiske | https://unsplash.com/@markusspiske
imageSource: Unsplash | https://unsplash.com
publications:
    - codeburst.io | https://codeburst.io/scala-snippets-1-instanitable-implicits-a37dadc5a8fc
date: 2019-02-18
layout: layouts/post.njk
tags: ["devblogs", "scala", "patterns"]
---

If you have ever written non-trivial code in Scala, you would have come across methods that take implicit parameters. Implicitly passing parameter is an important aspect of Scala that provides a **contextual abstraction** to your domain. One can design the domain model by the fact that by the time of instantiation and processing the functionality of the implicitly passed parameter will be available, irrespective of how it is created or provided. Implicit parameters are defined by prefixing `implicit` keyword to the parameter of a method. all the parameters defined after the keyword are implicit to the method definition.

When Scala encounters such method on compile time and provided the parameter is not passed explicitly, it tries to find an implicit definition in the lexical scope of the call chain and if it can, passes it automatically.

There are three ways to define an implicit parameter instance:

- a val or var defined with implicit keyword in the lexical scope.
- importing above defined instance from other modules into the scope.
- defining the type in such a way that it can be created if no instance found.

First two being trivial methods, below is a useful pattern to define the type that can provide an implicit instance if none found in scope.

```scala

// The trait that needs to be implicitly passed.
trait StringConverter[T] {
 def getStringRepresentation(t: T): String
}

// companion object to provide apply and implicit definitions per type.
object StringConverter {

    // apply method to be called by compiler in case no instance found.
    def apply[T](implicit stringConverter: StringConverter[T]): StringConverter[T] = stringConverter

    // sugar method to avoid writing the new construct for each instance.
    def createConverter[T](f: T => String): StringConverter[T] = new StringConverter[T] {
        override def getStringRepresentation(t: T): String = f(t)
    }

    // basic implicit instances for primitive types.
    implicit val intConverter: StringConverter[Int] = createConverter(t => s"Int: $t")
    implicit val doubleConverter: StringConverter[Double] = createConverter(t => f"Double: $t%2.2f")
    implicit val longConverter: StringConverter[Long] = createConverter(t => s"Long: $t")
    implicit val booleanConverter: StringConverter[Boolean] = createConverter {
        case true => "YES"
        case false => "NO"
    }

    implicit val stringConverter:StringConverter[String] =
        createConverter(t => t.toLowerCase)

    // A generic converter for type T provided at compile time.
    implicit def productConverter[T]: StringConverter[T] =
        createConverter(instance => instance.toString)
}

```

The essence of the pattern is to define `apply` method which provides the implicit instance to the caller. Such implicit parameter can be used in two ways: as implicit parameter explained above and as a context bound to type parameter.

>The context bound usage is specially useful if the implicit parameter needs to be used downstream as you can eliminate defining the implicit parameter in all the subsequent methods.

```scala

// defining an implicit converter
def toRepr[T](t: T)(implicit stringConverter: StringConverter[T]): String =
    stringConverter.getStringRepresentation(t)

// defining context bound implicit, ideal when the implicit needs to be passed down the call chain.
// works identical to implicit parameter and is an aesthetic choice.
def contextBoundToRepr[T: StringConverter](t: T): String =
    implicitly[StringConverter[T]].getStringRepresentation(t)

```

and can be used as below:

```scala

import StringConverter._toRepr(12000)
//res0: String = Int: 12000

toRepr[Double](120.1234)
//res1: String = Double: 120.12

toRepr(false)
//res2: String = NO

contextBoundToRepr("SomeThingSmallCased")
//res3: String = somethingsmallcased

contextBoundToRepr(Set(1,2,3,4))
//res4: String = Set(1, 2, 3, 4)

```

Every time Scala doesn’t find an implicit value, it will create a new instance at compile time. **this can considerably increase the compile time** as well as the compiled library size for a fairly large project with traits, working on large number domain models, provided implicitly. Consider below code where we haven’t provided any default `StringConverter` and we have two separate scope which expects a `StringConverter[T]`

```scala
object StringConverter {
    // apply method to be called by compiler in case no instance found.
    def apply[T](implicit stringConverter: StringConverter[T]): StringConverter[T] = stringConverter

    // sugar method to avoid writing the new construct for each instance.
    def createConverter[T](f: T => String): StringConverter[T] = new StringConverter[T] {
        override def getStringRepresentation(t: T): String = f(t)
    }

    implicit def productConverter[T]: StringConverter[T] =
        createConverter(instance => instance.toString)
}

// caller method
def implicitTestMethod[T](t: T)(implicit stringConverter: StringConverter[T]): String = {
    println(s"instance: ${stringConverter.hashCode()}")
    stringConverter.getStringRepresentation(t)
}

// methods to simulate different scopes
def enclosingScopeA():String = implicitTestMethod("SomeThing")
def enclosingScopeB(): String = implicitTestMethod("SomeThing")

// on Run
enclosingScopeA()
//instance:<PHONE_NUMBER> //res0: String = something

enclosingScopeB()
//instance: 323825454 //res1: String = something
```

If we see the instances of StringConverter used they are different. Now imagine this happening across a large project. In such cases, one should always create an **implicit’s cache** and use it to ensure the implicits are created only once like below:

```scala
object ImplicitCache {
    implicit val stringConverter = StringConverter[String]
}

def enclosingScopeA():String = {
    import ImplicitCache._
    implicitTestMethod("SomeThing")
}

def enclosingScopeB(): String = {
    import ImplicitCache._
    implicitTestMethod("SomeThing")
}
```

When run, uses the same instance throughout:

```scala
// on Run
enclosingScopeA()
//instance:<PHONE_NUMBER> //res0: String = something

enclosingScopeB()
//instance:<PHONE_NUMBER> //res1: String = something
```

That’s it!

I hope this helps understanding implicits better and aids in using them elegantly, utilizing all the awesomeness it provides.


text:
### This app covers the following concepts

1. Flask-RESTful - Create , Update , Delete and Display
2. Authentication using Flask-JWT
3. Passing only the essential arguments using reqparse

##### To run the file , use the below code in the terminal
`python app.py`

##### Use the Postman tool to test your API.

gha_language: Python


text:
<img src="https://raw.github.com/Marxon13/M13CSVParser/master/ReadmeResources/M13CSVParserBanner.png">

M13CSVParser
===========
A set of classes to read and write character separated value files and strings.

Includes:
---------
* A set of classes to read and write CSV files.
* Delegate methods to follow each step of the CSV read/write process.
* A set of examples to show how to read/write data to a NSArray of NSArrays, a NSArray of NSDictionarys, or a NSArray of a custom class.

Classes:
---------
* **M13CSVParser** - Takes a character separated value file or string, and returns it in a more useable format.
* **M13CSVWriter** - Writes data to file in character separated value format.

Categories:
-----------
* **NSArray** - Allows one to initalize an NSArray with a CSV file or string. And Also to write the NSArray to a CSV file.

Protocols:
----------
* **M13CSVParserDelegate** - Allows you to follow the process, or interface directly with the process of reading from a CSV file.
* **M13CSVParserCreationClass** - Allows M13CSVParser to create and populate the data for the custom class the rows in the CSV file represent.

Contact Me:
-------------
If you have any questions comments or suggestions, send me a message. If you find a bug, or want to submit a pull request, let me know.

License:
--------
MIT License

> Copyright (c) 2013 Brandon McQuilkin
>
> Permission is hereby granted, free of charge, to any person obtaining
>a copy of this software and associated documentation files (the
>"Software"), to deal in the Software without restriction, including
>without limitation the rights to use, copy, modify, merge, publish,
>distribute, sublicense, and/or sell copies of the Software, and to
>permit persons to whom the Software is furnished to do so, subject to
>the following conditions:
>
> The above copyright notice and this permission notice shall be
>included in all copies or substantial portions of the Software.
>
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
>EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
>MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
>IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
>CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
>TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
>SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


text:
## File Upload

For uploading media / file, we will use a plugin `material-ui-dropzone`.

So far, we have seen directly adding dependencies in `package.json` file. This is another way to add a dependency via `Terminal` (or) `Cmd prompt` and also add the entry in the `package.json` file.

Run the following command in the terminal

> NOTE: If you are currently in the cmd prompt / terminal which serves the UI (`localhost:3000`), you may want to create a new terminal / cmd prompt instance in the same directory of the project location.

To do so, for windows open a new cmd prompt from `Start` and navigate to the project location.
for MAC, you can create a new tab / window and navigate to the project location.

```
npm install --save material-ui-dropzone
```

Here,

- `install` - installs the dependencies in the `node_modules` folder
- `--save` - adds an entry to the `dependencies` section of **package.json** file.

Post installation, "material-ui-dropzone" should have been added to the "dependencies" section of "package.json" file

Now, we have the library ready to use. This will help us in enabling the file / image upload feature.

Now, let's create a upload component to use this.

Create a folder **Upload** under **src/components**

Create a file **Upload.js** inside **Upload** folder and paste the following

```js
import React from 'react';
import { DropzoneDialog } from 'material-ui-dropzone';

export const Upload = ({ onDialogClose, onFileUploadSave }) => {
  return (
    <div className="upload">
      <DropzoneDialog
        open={true}
        onSave={onFileUploadSave}
        acceptedFiles={['image/jpeg', 'image/png']}
        showPreviews={true}
        maxFileSize={2000000}
        onClose={onDialogClose}
      />
    </div>
  );
};
```

repository: build-web-apps/clone-instagram-ui

repo_name: build-web-apps/clone-instagram-ui


text:
---
Order: 10
Description: Overview about core features.
---
The Pull Request Code Analysis Addin for Cake allows you to add issues from any analyzer or linter to comments in pull requests.

## Supported Core Functionality

The core addin provides the following functionality:

* Modular architecture, allowing to easily enhance it for supporting additional analyzers, linters and code review systems.
* Support for reporting issues from multiple issue providers.
* Filtering issues to only those related to changes in a pull request.
* Automatic resolving of issues fixed in subsequent commits.
* Comparing issues by content to not rely on line numbers.
* Limit number of maximum issues to post.
* Returns all issues as provided by the issue providers and the issues reported to the pull request.
* `ReadIssues` alias for reading issues from multiple issue providers without interacting with a pull request system.
  This can for example be used to fail builds on certain conditions.

## Supported Issue Providers

See [Issue Provider Addins] for a list of currently supported analyzers and linters.

## Supported Pull Request Systems

See [Pull Request System Addins] for a list of currently supported pull request systems.

[Issue Provider Addins]: ../../addins/issue-provider/
[Pull Request System Addins]: ../../addins/pull-request-system/

branch_name: refs/heads/develop

gha_language: C#


text:
# cra-template-pwa

An progressive web app template for [Create React App](https://github.com/facebook/create-react-app).

To use this template add `--template pwa` when creating a new app:

```sh
npx create-react-app my-app --template pwa
```

## Learn more

The [Create React App documentation](https://cra.link/PWA) has more details on using this template
to create your PWA.

repository: TheRusskiy/pwa

repo_name: TheRusskiy/pwa


text:
---
layout: post
title: Week 8
---

1.) What did you do this past week?

I did a moderate amount of work for this class during this past week. I worked with some of my group on configuring docker and getting our static site up and running. We ran into quite a few frustrations along the way, but eventually got it up. It is pretty cool to be able to show our work with friends in an instant by having them visit our URL.

I also have been working through a tutorial on both flask and angular. Since I will be floating between front and back, I thought it wise to spend some time investing in learning both technologies sooner rather than later.

2.)What's in your way?

Lack of motivation. It’s Spring Break. I look through snapchat and other social media to see friends of mine relaxing and enjoying this “break”, but I won’t get to do that. I have three projects due on the week after Spring Break concludes. Even with these facts, I feel my motivation to tackle some of the work waining. Even as I am typing this post up I am browsing through forums or looking at games I’d like to play for the break…

3.)What will you do next week?

I am going try to set small/incremental goals to help me push through the issues that need to be tackled for the first phase of this project. I also think I will give myself a day or two of no work to ease my frustration. Lastly I will continue to follow along the course that Dr. Downing posted in piazza. https://www.coursera.org/learn/learning-how-to-learn

This coursera course is extremely relevant to all of us in SWE right now. In the next few weeks we will be attempting to learn many new tools in a short amount of time. Learning something new always more exhausting than working on tools that you are comfortable with, but this course seems to provide a structured and scientific approach to getting around that fatigue.

Tip-of-the-week: Treat yourself. It’s Spring Break. Take one or two days off to keep the motivation alive!


text:
### [CVE-2020-20131](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-20131)
![](https://img.shields.io/static/v1?label=Product&message=n%2Fa&color=blue)
![](https://img.shields.io/static/v1?label=Version&message=n%2Fa&color=blue)
![](https://img.shields.io/static/v1?label=Vulnerability&message=n%2Fa&color=brighgreen)

### Description

LaraCMS v1.0.1 contains a stored cross-site scripting (XSS) vulnerability which allows atackers to execute arbitrary web scripts or HTML via a crafted payload in the page management module.

### POC

#### Reference
No PoCs from references.

#### Github
- https://github.com/p1ay8y3ar/cve_monitor

repository: trickest/cve

branch_name: refs/heads/main

gha_language: HTML

repo_name: trickest/cve


text:
# Terraform Module: aws/acm-certificate

Creates an AWS ACM certificate with domain validation and automatically creates
Route53 validation records.

```terraform
module "cert" {
  source = "github.com/halostatue/terraform-modules//aws/acm-certificate?ref=v5.x"

  providers = {
    aws.cloudfront-certificates = aws.cloudfront-certificates
    aws.route53                 = aws
  }

  domain-name  = "*.example.com"
  alternatives = {
    "example.com" = {}
    "*.example.org" = { zone-id = aws_route53_zone.example_org.zone_id }
    "example.org" = { zone-id = aws_route53_zone.example_org.zone_id }
  }
  zone-id      = aws_route53_zone.example_com.zone_id
}
```

## Input

### Providers

AWS ACM Certificates can only be created in certain regions if they are intended
for use with CloudFront, and this region may not be the same region used for
Route53 management. Therefore a `providers` alias block must be provided to the
module:

```terraform
providers = {
  aws.cloudfront-certificates = aws.cloudfront-certificates
  aws.route53                 = aws
}
```

### Required

- `domain-name`: The primary domain name for the certificate. Wildcard
  certificates may be specified.

- `zone-id`: The default Route53 zone ID for DNS validation. Used for creating
  the `domain-name` DNS validation record and for any alternative name
  validation record where `zone-id` is omitted.

### Optional

- `alternatives`: A map of domain names to objects containing an optional Route
  53 zone ID for creating validation records. If `zone-id` is omitted, falls
  back to the required `zone-id` variable value. Example:

  ```terraform
  domain-name  = "*.example.com"
  alternatives = {
    "example.com" = {}
    "*.example.org" = { zone-id = aws_route53_zone.example_org.zone_id }
    "example.org" = { zone-id = aws_route53_zone.example_org.zone_id }
  }
  zone-id      = aws_route53_zone.example_com.zone_id
  ```

  In the above example, `*.example.com` and `example.com` validation records
  will be created using `aws_route53_zone.example_com.zone_id`. `*.example.org`
  and `example.org` validation records will be created using
  `aws_route53_zone.example_org.zone_id`.

- `certificate-transparency-logging-preference`: The logging preference for
  certificate transparency. Defaults to `ENABLED`, but may be set to `DISABLED`.

- `dns-record-ttl`: Time to live for the DNS validation records. Defaults to ten
  minutes.

- `key-algorithm`: The key algorithm for this certificate. Defaults to `RSA_2048`
  (RSA 2048 bit), but supports `EC_prime256v1` (ECDSA 256 bit) and
  `EC_secp384r1` (ECDSA 384 bit). Note that CloudFront certificates _must_ be
  `RSA_2048` certificates.

- `tags`: Tags to be applied to the created certificate. The tags `Purpose`,
  `Terraform`, and `TerraformModule` will _always_ be set from the module.

## Local Variables

- `sans`: a set of local alternative names derived from `var.alternatives` key
  names.

## Output

- `id`: the ID of the ACM certificate created.

- `arn`: the ARN of the ACM certificate created.

repository: halostatue/terraform-modules

gha_language: HCL

gha_license_id: NOASSERTION

repo_name: halostatue/terraform-modules


text:
# Terminal Management

Orb has an integrated terminal that can be configured to launch custom terminal resources.

To configure your terminal preferences, right-click on the terminal icon in the NavBar on the left, then select edit.

Any resource you define in the terminal config, will be available in the terminal right-click menu.

These resource definitions are identical to .terminal resource definitions and can reference shared profiles.

The launchParameters not available in the .terminal resource but can be used here to specify the startup switches of the powershell executable.

> You can select a default terminal resource to launch when you click the terminal icon.
> You can also customize "fontSize", "backgroundColor", "textColor" for each terminal type. The new config will be immediately effective when you open a new terminal.

## Sample Terminal Config

```
{
	"modelRepoDir": "C:\\Users\\xxx\\AppData\\Roaming\\Orb\\OrbModels",
	"remoteOrigin": "https://dev.azure.com/orbModels/_git/OrbModels",
	"alwaysOpenInNewTab": true,
	"vstsBaseUri": "https://dev.azure.com/orbModels/_apis/git/repositories/d4136505-6729-4843-9213-84b700af567d",
	"homePageUrl": "https://github.com/Microsoft/Orb",
	"terminalConfig": {
		"default": "PowerShell",
		"resources": [
			{
				"relativePath": "PowerShell",
				"namespace": "",
				"powershellProfile": "",
				"script": "",
				"style": {
					"fontSize": "15px",
					"backgroundColor": "rgb(57, 56, 62)",
					"textColor": "rgb(238,237,240)"
				}
			}
		]
	}
```

## Special Environment Variables

Orb Terminals have two special environment variables that can be used for special casing behavior.

* 1. OrbInstanceId - This is the unique ID for the Orb App Instance. See [File Format](fileFormat.md) for details.
* 2. OrbProcessPath - Full path to the current orb process which is hosting the terminal.

repository: microsoft/Orb

repo_name: microsoft/Orb


text:
# StompActors

A suite of Celluloid actors to consume and produce to queues with Stomp protocol.

## Installation

Add this line to your application's Gemfile:

    gem 'stomp_actors'

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install stomp_actors

## Usage

### Consumers

Inherit from `StompActors::Consumer` then define `#queue` and `#connect_opts`
values, and `#receive(msg)` method.

Define `#subscribe_opts` to customize subscription options.

Use `ack(msg)` to acknowledge message, if needed.

Example:

```ruby
class MyConsumer < StompActors::Consumer
  def connect_opts
    # stomp gem hash login, see:
    # https://github.com/stompgem/stomp#hash-login-example-usage-this-is-the-recommended-login-technique
    {
      hosts: [{ host: "<IP_ADDRESS>", port: 61613}]
    }
  end

  def queue
    "/queue/foo"
  end

  def subscribe_opts
    { ack: 'client' }
  end

  def receive(msg)
    # do something with msg
    ack(msg)
  end
end

MyConsumer.new # your actor is now subscribed and will receive messages.
```

### Producers

Inherit from `StompActors::Producer` then define `#queue` and `#connect_opts`
values.

Use `emit(msg)` to send message to the defined queue.

Example:

```ruby
class MyProducer < StompActors::Producer
  def connect_opts
    {
      hosts: [{ host: "<IP_ADDRESS>", port: 61613}]
    }
  end

  def queue
    "/queue/foo"
  end
end

p = MyProducer.new
p.emit("stuff") # message sent to queue
```

## Contributing

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


text:
---
title: "Learn"
description: "More Information"
date: 2020-05-08T21:52:46+05:00
draft: false
fa_icon: fa-book-open
noshowdate: true
noshowpager: true
listitem: true
---

### Introductory Essays {class="resource-item"} ###

Written by [Montclair State University](https://www.montclair.edu/) Undergraduate Students and Translated by Alessandra Faranda, [University of Palermo](https://www.unipa.it/)

1. ["The Norman Conquest of Southern Italy and Sicily,"](group_one) by Bobby Ammiano, Gary Rodriguez and Brian Schnell
2. ["The Norman Rulers,"](group_two) by Rich DeVivo, Alicya Garrido, Robert Macaluso and Taelor Myrie
3. ["The Worlds the Normans Found,"](group_three) by Masud Ahmed, Fathia Balgahoom, Kenneth Gutierrez and Jonathan Hoffman
4. ["The World the Normans Made,"](group_four) by Emily Cotugno, Kimberly Grecco, Megan Ingwersen, Samuel Moss and Dylan Reddick

### Teaching Resources {class="resource-item"} ###

Created and Translated into Italian Respectively by [Montclair State University](https://www.montclair.edu/) Undergraduate Students Tanner Rusyniak (CHSS, 2022) and Tanina Habib (CHSS, 2023)

1. ["The People of Norman Sicily"](people_of_norman_sicily)
2. ["Monasteries and Religion of Norman Sicily"](monasteries_and_religion_of_norman_sicily)
3. ["Assessing the Stone Stability of Norman Sicily’s Monuments"](assessing_the_stone_stability_of_norman_sicilys_monuments)

### Articles {class="resource-item"} ###

Dawn Marie Hayes and Joseph Hayes, The Norman Sicily Project: An Ongoing, Web-Based Effort to Promote the Island's Eleventh- and Twelfth-Century Past, forthcoming in _Mapping Medieval Sicily: Maritime Violence, Cultural Exchange, and Imagination in the Mediterranean_), ed. Emily Sohmer Tai and Kathryn Reyerson (Palgrave Macmillan). _This is a significantly revised and updated version of the 2019_ Digital Medievalist _article._

Dawn Marie Hayes and Joseph Hayes, The Norman Sicily Project: A Digital Portal to Sicily's Norman Past, [Digital Medievalist](https://journal.digitalmedievalist.org/), 12(1), p.3. DOI: [http://doi.org/10.16995/dm.68](http://doi.org/10.16995/dm.68).

### Videos {class="resource-item"} ###

Dr. Greg Pope's explanation of the [Cultural Stone Stability Index](https://www.shralliance.com/cssi) (CSSI), an adaptation of the [Rock Art Stability Index](https://www.shralliance.com/rasi) (RASI) developed by members of the [Stone Heritage Research Alliance](https://www.shralliance.com/), which we are using to assess a number of Sicily's surviving Norman monuments.

{{< youtube id=CTZxt60CDUE >}}

Click here for a [PDF of the Index](/pdfs/cultural_stone_stability_index.pdf). Currently, the monastic sites we have assessed with the CSSI include St. Nicholas of Fico, St. Venera of Vanella (possibly), St. Lucy of Adernò, Christ the Savior of Placa, St. Bartholomew of Lipari, St. Philip of Agirà, Sts. Peter and Paul d’Agrò and St. George of Gratteri.

The project's [backstory](https://www.youtube.com/watch?v=YGKlwjaH-cw&feature=youtu.be), via [Montclair State University](http://montclair.edu/)'s [Office of Alumni Relations](https://www.montclair.edu/alumni/).

### White Paper {class="resource-item"} ###

[National Endowment for the Humanities](https://www.neh.gov/)' Humanities Collections and Reference Resources [White Paper](/pdfs/neh_white_paper.pdf).

### Conference Paper {class="resource-item"} ###

["The Norman Sicily Project: A Completed Prototype and Next Steps."](/pdfs/nsp_leeds_paper.pdf) Given at the [International Medieval Congress](https://www.imc.leeds.ac.uk/imc-2021/), [University of Leeds](https://www.leeds.ac.uk/), July 5, 2021.

### Bibliography {class="resource-item"} ###

The [NSP's bibliography](https://www.zotero.org/groups/2199947/norman_sicily_project/library).

repository: the-norman-sicily-project/website

repo_name: the-norman-sicily-project/website


text:
{{{
    "title"    : "GPS108 watch protocol",
    "tags"     : [ "Top peak","Toppeak", "GPS108", "Watch" ],
    "category" : "protocols",
    "date"     : "05-30-2013"
}}}

The protocol used by [Top Peak Electronic’s GPS108 watch tracker](http://www.toppeakelec.com/showxp.asp?id=305).
This protocol only supports sending the device’s location to the server.
Sending messages from the server to the watch is not possible (it’s configurable only via SMS).

This protocol is supported by ten20

[GPS108 Watch tacker GPRS PROTOCOL](../protocol_docs/GPS108-Watch-tacker-GPRS-PROTOCOL.doc)

#Example message

```#356823033087326##0#0000#AUT#1#V#01047.4447,E,5955.9397,N,000```


text:
# PostgreSQL Dates

Coming from MSQL, PostgreSQL date functions make so much more sense.

Add dates:

```SQL

SELECT date '2023-01-01' + 10;

--'2023-01-11'

SELECT current_date - 7;

--This day last week

```

Select for specific months, years or age:

```SQL

SELECT * from some_table t where date_part('year',t.date) >= 2022 AND date_part('month',t.date) = 01;

--Data from some_table after 2022 in january

select t.docid, age(t.date) from some_table t where age(t.date) < '1 year 1 mons 10 days' limit 100;

--Data younger than 1 year, 1 months and 10 days

```

Also OVERLAPS is supported!

```SQL

SELECT (MAX(t.docdate), MIN(t.docdate)) OVERLAPS
       (DATE '2020-01-01', DATE '2021-01-01') from some_table t ;

-- Result: true if some_table has dates that overlap '2020-01-01' to  '2021-01-01'.

```

PostgresSQL 15 docs here: https://www.postgresql.org/docs/15/functions-datetime.html

repository: adseib/til

repo_name: adseib/til


text:
# The reference of data lineage format

## 1. Top level elements

- dbvendor: string,  SQL dialects such as oracle, mysql
- dbobjs: array, database objects such as table, view and etc
- relations: array,  column-level relationship

## 2. dbobjs

This is an array that includes all database objects discovered during the data lineage analysis. JSON PATH: `$.dbobjs`.

### Attributes

* id, this is the unique identifier of this object in the data lineage result.
* name, name of the object.

- type, type of the object such as table, view, process.
- coordinates, position of the object in the SQL script.
- columns, optional, valid when type is table, view

## 3. realtions

Relation is the atom unit of the data lineage. Relation build a link between the source and target column( column-level lineage).

Those relations are stored in the `$.relations`.

A relation includes the `type`, `target`, `sources` and other attributes.

### Attributes

- id
- type
- effectType
- target, is an object
- sources, array of source objects
- processid, optional

## List of the elements in data lineage

### 1. Database object

- schema

### 2. Schema object

- table, including external table
- view
- procedure
- function
- trigger

### 3. Hdfs object

- file, such as `/user/data/pv_2008-06-08_us.txt, gs://bucket/path1.csv`
- directory, such as `s3://load/encrypted_files/`, `@exttable_part_stage/logs/`
- stage, this is a directory.

### 4. SQL object

Object created temporary during the execution of the SQL statement.

- select list
- merge insert
- merge update
- update set
- update select
- insert select
- function call
- union
- CTE
- pivot table
- snowflake pivot alias
- sql server open json
- sql server join property
- set of rows ( constructed through the values expression, used in the place where table occurs)
- process, this the the SQL query that does the data transform.

### 5. Relation

* fdd , dataflow
* fdr , data impact

### 6. join

### 7. Abbreviation of the object

The abbreviation of the object used in the diagram generated by the Gudu SQLFlow.

- CTE [C]
- directory [D]
- function [F]
- function call [F]
- file [FL]
- insert select [IS]
- join property [JP] (sql server)
- merge insert [MI]
- merge update [MU]
- open json [OJ] (sql server)
- pivot alias [PA] (snowflake)
- pivot table [PT]
- procedure [P]
- select list [L]
- set of rows [RW]
- stage [S]
- table [T]
- trigger [TR]
- union [U]
- update set [UE]
- update select [US]
- view [V]


text:
---
published: true
title: Sabbatical Week 4 - Cat Ba Island, Hanoi, Da Nang, and Seoul
excerpt: A chill last week of sabbatical in Vietnam and South Korea
---

I intentionally left my last week of sabbatical open-ended and didn't
make any plans beforehand. I was enjoying the beaches and sunsets at Cat Ba Island, so I
decided to stay there for a couple more days.

I booked a kayak tour for the morning. I ended up being the only one who booked,
so I got a private tour. The guide was really personable and we talked for several hours.
He had grown up in the area and had been kayaking the bay since he was a kid. I had so many questions
about what life was like on the floating villages, and we talked about that for awhile. He pointed
out the karsts that had names, one of which was Turtle Island, aptly named. We got pretty close to some of the
oyster farms, which made me better appreciate the scale of the operation. They covered a huge area where they were set up.
We stopped a couple times, once to pick up some wild oysters he said he was going to cook for his family, and another
time at a karst with a small beach to take a quick dip in the water. He said he did both kayak and multi-day hiking tours, which seemed like a pretty strenuous line of work,
but he said he really enjoyed it.

![]({{site.cdn_path}}/2023/05/21/turtle_rock.jpeg)

Back at Quiri, I grabbed a quick shower and checked out of the hotel. I'd decided to switched to
staying at a hostel called Secret Garden because I liked the artsy aesthetic and
I wanted to meet some people. The host at Quiri was super friendly and gave me a ride
up the hill to the hostel with my luggage, which was a huge help.

After checking in, I read by the pool for a bit. I talked with a woman named Alina who was sitting next to me.
She was from Holland and had just completed a rotation as a nurse in a neonatal unit in southern Vietnam. She was
here on a 90-day visa and using up the last 30 days to explore.

In the late afternoon, Andy and I checked out Tung Thu Beach, a less crowded beach that was more
popular with the locals than the one I'd been going to. On the walk over, we passed some people playing volleyball,
which had apparently become really popular. I didn't remember that from 23 years ago; back then, soccer seemed to have that
level of popularity here. There were no lockers at this beach, but it wasn't crowded. We piled our stuff on a small tarp Andy
had brought and got in the water. The water ended up being pretty dirty, so we didn't stay too long. Andy's hostel
was just up the road from mine, so we agreed to meet for happy hour after rinsing off.

Happy hour at Secret Garden was really chill. By 5 pm, probably a dozen people were hanging out
at the tables drinking beer. Waiting for Andy to arrive, I started talking to two women,
Maddie and Chelsea. They were both in their early 20s and solo-traveling through Vietnam.
They mentioned that they'd connected on the Hostelworld app before arriving. As someone who
usually stayed in hotels, I'd never heard of this chat feature of that app and thought it was brilliant.
Great way to connect with fellow travelers before you arrive somewhere. I was also struck by the fact that
so many women were solo-traveling here. I read later that Vietnam is one of the safest places
in Southeast Asia, with violent crime being almost non-existent.

After Andy arrived, we all went to dinner at "Yummy 2" restaurant just down the road. It was
a favorite of Andy and mine, and lived up to its name.
I also had read some reviews of people getting food poisoning at Secret Garden, so I wanted to play it safe.

After dinner, we all split up to go to our separate hostels, as everyone else had early mornings.
I listened to the live music at Secret Garden for a bit, then turned in. I was just winding down,
brushing my teeth, when I noticed a couple massive, hairy legs sticking out from under the sink.
 I slowly peeked under to find the biggest, scariest-looking spider I'd
ever seen. I don't even have a problem with spiders. I usually put them in tupperware and set them free
when I find them in my house. But this thing was a monster. Now wide-awake, I started Googling everything I could.
I quickly assessed that it was a huntsman. Harmless to humans, but with a painful bite.

Still, I wasn't keen on sharing a bathroom with it. I grabbed the hose from the shower and tried to spray the spider,
but the water pressure was pathetic. The spider shook the water off its legs, crawled out from
under the sink, made its way over to the toilet, and vanished behind it.

 I closed the bathroom door and tried to get some rest. I ended up sleeping really fitfully;
it was hot in the room, I had to pee but didn't dare, and my throat was scratchy. I woke up
at 4 am with a full-blown cold to the sound of a rooster crowing. I gave up on getting back to sleep and read for a bit.

The spider had relocated to the ceiling in a corner opposite the toilet, so I felt safe peeing, at long last.
I still watched it warily the whole time.

At noon, I caught the bus to Hanoi. I checked into the Scent Premium again because I'd liked it
last time I was there. I spent the next couple days in Hanoi.

Some highlights:
* The Old Quarter shuts down from Friday through Sunday to car traffic. It was really fun to see families out and about there, with kids driving around small electric cars, and live music at night.
* Visiting Train Street. The main part of Train Street is closed to tourists, but if you walk to the far side of it, there are coffee shops you can watch the train from. I ordered some egg coffee and waited for the train to arrive. It was crazy how close it got.
* Seeing a water puppet show. This was suprisingly really cool. It was a great way to take in some traditional Vietnamese stories. Also, have you ever seen a regular puppet show with fireworks? I think not.
* Buying all of the fake North Face and Patagonia bags I could find. I'm really curious which factory/supply chain makes these, because they're uncanny.
* Getting a massage. It was much needed after lugging my stuff around everywhere.

![]({{site.cdn_path}}/2023/05/21/train_street.jpeg)
![]({{site.cdn_path}}/2023/05/21/water_puppets.jpeg)

I also visited Hoa Lo Prison, where John McCain was a POW during the war. That was a pretty fascinating experience.
There were a bunch of exhibits of French brutality toward the Vietnamese and stories of
heroic Vietnamese prison breaks. But when you get to the section on the Vietnam War, it's totally
whitewashed. They have a bunch of photos of POWs playing chess, smiling, and getting free medical care.
It was pretty surreal. I'm pretty sure John McCain not being able to raise his arm above shoulder level wasn't
from a chess injury. But the whole thing got me questioning areas where Americans whitewash our museums and leave stuff out.
Where I landed was that we really don't talk much about Japanese Internment or how horrific it was that we used
atomic weapons on civilians twice.

I thought about visiting Angkor Wat, but the forecast for the next several days showed extreme heat
and lightning storms, so I decided to save that for another trip.

I flew back to Da Nang for my last few days in Vietnam. I booked a room at the M92 Hotel, which was just a few blocks from the beach.
The first thing I did after I arrived was walk to the beach. I was blown away by how much Da Nang had changed since
we were here in 2000. Back then, the beach was quiet and serene, sprinkled with fishing boats. Now, it felt like Vegas,
with massive hotels and resorts lining the beach and crowds of people everywhere. I felt lucky to have experienced it
before it had become so commercial. I walked down the beach for a bit, trying to spot anything that looked familiar.
I Googled our old hotel, the Tourane, but nothing turned up. It seemed to be long gone. At one point, I thought I found
a place that looked like where it used to be, but it was hard to tell.

![]({{site.cdn_path}}/2023/05/21/da_nang_before.jpg)
![]({{site.cdn_path}}/2023/05/21/da_nang_today.jpeg)

_My Khe Beach: Then and now_


text:
If `catch` is omitted, rethrow a same exception after doing finally clause.

You can also omit a variable of exception object like this.

```javascript
try {
    // try clause
} catch {
    // catch clause
    // Do not need to write an exception object if you don't use it.
} finally {
    // finally clause
}
```

### Exception Type and Message

An exception type can be got via `type()` method,
and an exception message can be also got via `what()` method.
For example, use it as below.

```javascript
try {
    throw RuntimeException("error");
} catch (e) {
    System.println("%{e.type()}: %{e.what()}");
}
```

### Stack Trace

You can print a stack trace as below.

```javascript
try {
    throw RuntimeException("error");
} catch (e) {
    e.printStackTrace();
}
```

### Distinguish Exceptions

You can use an `instanceOf` method to distinguish what kind of exception has been occurred.
For example, when `RuntimeException` were thrown, the exception must be an instance of `RuntimeExceptionClass`.
Kinx will always provide excetions like `SomeException` which is an instance of `SomeExceptionClass` by standard.

```javascript
try {
    throw RuntimeException("error");
} catch (e) {
    if (e.instanceOf(RuntimeExceptionClass)) {
        // do something.
    }
}
```

### Define Own Exception

Here is a template to define your own exception.

```javascript
var YourExceptionClass = System.defineException("YourException");
var YourException = YourExceptionClass.create;
```

`YourExceptionClass` is needed for `instanceOf` for an exception object.
`YourException` is used by `throw` statement.

```javascript
try {
    throw YourException("error");
} catch (e) {
    if (e.instanceOf(YourExceptionClass)) {
        // do something.
    }
}
```

## Examples

### Example 1. Normal catch

#### Code

```javascript
try {
    throw RuntimeException("error");
} catch (e) {
    System.println("%{e.type()}: %{e.what()}");
    e.printStackTrace();
}
```

#### Result

```
RuntimeException: error
Stack Trace Information:
        at <main-block>(test.kx:2)
```

### Example 2.   Finally (3)

`finally` should not modify a value when returning a variable.
Even when the value is changed by `finally`, there is no effect for the returning value.

#### Code

```javascript
function test1() {
    var val = 1;
    try {
        return val;
    } finally {
        val = 2;
    }
}

var s_val;
function test2() {
    s_val = 1;
    try {
        return s_val;
    } finally {
        s_val = 2;
        System.print("(s_val = " + s_val + ") = ");
    }
};

System.println("Test1() = " + test1());
System.print("Test2() = ");
System.println(test2());
System.println("s_val = " + s_val);
```

#### Result

```
Test1() = 1
Test2() = (s_val = 2) = 1
s_val = 2
```

### Example 4.
Stack Trace Information:
        at function func1(<eval>:9)
        at <eval-block>(<eval>:14)
        at function func2(test.kx:21)
        at function func3(test.kx:37)
        at <main-block>(test.kx:48)
finally: main-block
end-of-program.
```

### Example 6.

repository: Kray-G/kinx

gha_language: C

repo_name: Kray-G/kinx


text:
Apache SkyWalking Kubernetes
==========

# Deploy SkyWalking backend to Kubernetes cluster

To install and configure skywalking in a Kubernetes cluster, follow these instructions.

## Structure of repository

### archive

Prior to 6.0.0-GA, only kubernetes YAMLs as examples for users and should be modified to fix real kuberentes enviroment,
for instance, resources, volume claims.

Now, these YAMLs are archived in the repository, that means we never maintain them, but users still could use them.

We recommend using __helm-chart__ as your first choice.

### helm-chart

This is recommended as the best practice to deploy SkyWalking backend stack into kubernetes cluster. You can pick a
 sub folder base on version your desired version.

gha_language: Go


text:
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)

# RAF SK

Projects from *"Software Components"* course at Faculty of Computing in Belgrade.

Project 1: [statement](https://github.com/jelic98/raf_sk/blob/master/project_1/project_1.pdf), [implementation](https://github.com/jelic98/raf_sk/tree/master/project_1)

Project 2: [statement](https://github.com/jelic98/raf_sk/blob/master/project_2/project_2.pdf), [implementation](https://github.com/jelic98/raf_sk/tree/master/project_2)


text:
# Graph Algorithms

In this whole repo, this is the hardest part to make notes on because of the sheer overwhelming amount of information available on each sub topics. Just choosing subtopics worthy to be included is a problem in itself.

So, I figured I'll just cover the topics with most use cases, sorted by popularity.

Before we move forward though, it's good to just refresh rudimentary graph theory (although most of it won't be used in the first couple algorithms, it's good to have them in the back of your head). So, first things first:

### Elementary graph theory

- A Graph is a non-linear data structure consisting of nodes and edges.
- The nodes are sometimes also referred to as vertices and the edges are lines or arcs that connect any two nodes in the graph.

![](https://www.geeksforgeeks.org/wp-content/uploads/undirectedgraph.png)

Set of vertices V = {0,1,2,3,4} ;
Set of edges E = {01, 12, 23, 34, 04, 14, 13}.

#### More subtleties

- Graphs can be Undirected or Directed.
- Edges can have weights or can be unweighted.

## Graph Traversal Algorithms

Since we don't have a way to 'look sideways', we're left with 2 main ways to traverse a graph.
1) We can goo deeper in each level until target is found. This is called **Depth-First Search(DFS)**
2) We can exhaust each 'level' until we can find the target. This is called **Breadth-First Search(BFS)**

#### What's common?
- These algorithms specify an order to search through the nodes of a graph
- We start at the source node and keep searching until we find the target node.
- The **frontier** contains nodes that we've seen but haven't explored yet.
- Each iteration, we take a node off the **frontier**, and add its neighbors to the **frontier**.

## Subsections
- Search
- Minimum Spanning Trees
- Single Shortest Path algorithms

## License
[MIT](https://choosealicense.com/licenses/mit/)


text:
# FizzBuzz in Flask

## Getting Started

1. To create a virtual environment with Python 2.7, run `virtualenv -p python2.7 venv`.
2. Activate the virtual environment by `source venv/bin/activate`.
3. Install the required packages by `pip install -r requirements.txt`.
4. Run `python web/app.py` then go to http://<IP_ADDRESS>:5000 or http://localhost:5000.

## Readings

* [Flask (A Python Microframework)](http://flask.pocoo.org/)
* [Fizz buzz (Wiki)](https://en.wikipedia.org/wiki/Fizz_buzz)

repository: zkan/fizzbuzz-flask

repo_name: zkan/fizzbuzz-flask


text:
The book has been published!
 * Amazon: https://www.amazon.com/Mastering-JavaFX-advanced-visually-applications/dp/1788293827/
 * Packt: https://www.packtpub.com/web-development/mastering-javafx-10

# Mastering JavaFX 10

 * Chapter 1: Stages, Scenes and Layout
 * Chapter 2: Building Blocks: Shapes, Text and Controls
 * Chapter 3: Connecting Pieces: Binding
 * Chapter 4: FXML
 * Chapter 5: Animation
 * Chapter 6: Styling application with CSS
 * Chapter 7: Building Dynamic UI
 * Chapter 8: Effects
 * Chapter 9: Media and WebView
 * Chapter 10: Advanced Controls and Charts
 * Chapter 11: Packaging with Java9 Jigsaw
 * Chapter 12: 3D at a glance
 * Chapter 13: What's Next?

license: Unlicense