text:
## General Guidelines

### You should think of an API like a product. Indeed a Business API is a product.

Like a product it should follow these rules:

- Easy to learn
- Hard to misuse
- Easy to read and maintain it
- Audience oriented

### Design your API with a customer, or at least with a customer in mind and actively seek feedback.

Every API should be designed as if it were an external API for paying customers. Design your API with the API consumer in mind!

Each resource MUST make sense from the perspective of the API consumer. Beware of simply copy your internal model. Do not leak irrelevant implementation details out to your API.

**We believe that APIs are products**. We will provide these APIs to other business units and partners. The future is unpredictable. The conviction that an API is only internally or in one Business unit of use, can rapidly change. Therefore APIs should be designed like external APIs. Last but not least we learn to design better APIs.

### Do not invent or implement API Management

We have a list of appropriate API management solutions we like to standardize on. If our existing solutions and blueprints do not fit, we work with you to find one which does. Refer to [API Management](../api-management/api-management.md) for details.

### Every API MUST be described using a formal API description language

While we recognize the existence of various languages ([RAML](https://raml.org/), [API Blueprint](https://apiblueprint.org/)) we standardize on [Swagger](https://swagger.io) as the most commonly used language. API documentation has to be generated from its Swagger definition to ensure inherent consistency. Swagger is used to provide access to the API via API management tooling.

Reserve time to create documentation. Use [Swagger](http://swagger.io/) to document. Refer to [Documentation](../documentation/documentation.md) for details.

### API clients MUST use an API Key

Different SLA’s CAN be offered by the API provider. API clients are identified by API keys obtained from the API Portal. **No API access without a corresponding and valid API key** (Exception for pubsub notification APIs which only contain the link to the resource but not the resource itself).

repository: Haufe-Lexware/api-style-guide

repo_name: Haufe-Lexware/api-style-guide


text:
# Chaturbate API

Chaturbate API is a simple, barebones php script that will fetch [Chaturbate's affiliate XML feed](http://affiliates.hillipino.com/jPqoq) or [Camgasm's XML feed](http://camgasm.com/affiliates/in/?track=default&tour=07kX&campaign=7iFy8) and display the cams on your website. The template is fully customizable and responsive.

Each version is slightly different but the below steps are pretty much the same. Each individual version has its own settings file which is commented throughout.

## Setup and Configuration

To setup the script is fairly straightforward. The below steps are the minimum steps to get the script running. Feel free to change or customize as you see fit.

1. Download the latest release here ( https://github.com/hillipino/Chaturbate-API/releases )
2. Unzip the archive.
3. Go to includes/settings.php and enter your chaturbate and server settings. The script should work once you set the 'BASEHREF', but to get credit for your referrals you need to also change the chaturbate settings. If you do not have one, setup a [Chaturbate affiliate account](http://affiliates.hillipino.com/jPqoq) or  [Camgasm affiliate account](http://camgasm.com/affiliates/in/?track=default&tour=07kX&campaign=7iFy8).</a>
4. Upload the files to your server.
5. On your server make sure includes/data/feed.xml is writable.
6. If you are running this script in a sub directory, you need to modify the htaccess file. Anywhere that you see /index.php , change it to /sub-directory/index.php

## Script Speed

When you first use this script, you may realize that it takes forever to load. This is due to the fact that every time you load the page the xml feed has to be parsed.

I highly recommend seting the USECRON to true and either setup a cronjob on your server or use one of the free services below to execute cron.php every 5 minutes or so. This file basically just fetches the xml feed and writes to a local file on your server that can be cached, preventing your site from downloading the feed on every page load.

### Free Cron Services

- Cron-job.org ( https://cron-job.org )
- SetCron ( https://www.setcron.com/ )
- MyWebCron ( http://www.mywebcron.com/ )

## Settings

An explanation of the settings.php file. It is heavily commented but I figured I would list some extra notes here anyways.

 I would recommend changing USECRON to true and setting up a cronjob as noted above.

```php
	define ( 'BASEHREF',		'http://<IP_ADDRESS>/adult/chaturbate/v2.3/' );		// The Url path o the index.php
	define ( 'BASEPATH',		getcwd() );											// The file directory path to index.php
	define ( 'FLATFILE',		BASEPATH . '/includes/data/feed.xml');				// Name of file to store xml feed into
	define ( 'USECRON',			false );											// If you would like to update via cron set this to true.
```

### Chaturbate/Camgasm Settings

Your [Chaturbate affiliate account](http://affiliates.hillipino.com/jPqoq) or  [Camgasm affiliate account](http://camgasm.com/affiliates/in/?track=default&tour=07kX&campaign=7iFy8) settings. These are pretty much self explanatory except for the CBWL.

Due to some recent changes if you are using a whitelabel the iframes will error if you are linking with the https://. So be sure to use http:// in your whitelabel domain for the CBWL setting. If you aren't using a whitelabel, just leave it as is.

```php
	define ( 'USER',			'blogbabes' );								// Your Chaturbate Username ( this is only useful if you embed a personal chatroom )
	define ( 'AFFID',			'827SM' );									// Chaturbate Affiliate ID
	define ( 'TRACK',			'HILLIPINO' );								// Chaturbate Campaign for Tracking
	define ( 'MODE',			'revshare' );								// ( revshare, signup, or tokens )
	define ( 'ROOM',			'top' );									// Which featured chatroom to embed ( top, male, transexual, personal, NULL )
	define ( 'CBWL',			'https://chaturbate.com' );					// If you are wanting to change the domain to match one of your hosted whitelabels,
																			// enter the domain here. eg ( http://www.yourdomain.com ) the default is 'https://chaturbate.com'

```

### General Settings

```php
	define ( 'SITENAME',		'Chaturbate API Demo V2.3' );	// Your Site Name
	define ( 'GOOGLE',			'' );							// Google Analytics Tracking ID Leave Blank to disable
```

### Layout Settings

These control how certain layout elements behave or rather or not to show them.

```php
	define ( 'SLIDE_DIR',		'down' );		// Which direction thumbnail overlays slide in. (up,down,left,right)
	define ( 'RELATED_SHOW',	true );			// Shows related cams on single cam page.
	define ( 'RELATED_CNT', 	20 );			// The amount of related cams to show.
	define ( 'THUMB_CNT',		30 );			// How many Thumbnails to show per page in the cam listings.
	define ( 'BIRTHDAY_SHOW',	true );			// Show Birthday Cams
	define ( 'PAGINATE',		true );			// Paginate Cams
```

### Thumbnail Position Ads

This is pretty experimental, you will have to tweak the css to get your ads to show up correctly within the grid. I wouldn't recommend using this unless you are comfortable modifying the css files. There are helper classes for each ad.

Note the AD_CODE is a php variable, so be sure to escape correctly

```php
	define ( 'AD_POS1',			NULL );			// ( Thumbnail Ad Position starting at 0 , NULL for no ad )
	define ( 'AD_POS2',			NULL );			// ( Thumbnail Ad Position starting at 0 , NULL for no ad )
	define ( 'AD_POS3',			NULL );			// ( Thumbnail Ad Position starting at 0 , NULL for no ad )
	define ( 'AD_POS4',			NULL );			// ( Thumbnail Ad Position starting at 0 , NULL for no ad )

	define ( 'AD_CODE1',		NULL );			// ( Ad Code for position 1 )
	define ( 'AD_CODE2',		NULL );			// ( Ad Code for position 2 )
	define ( 'AD_CODE3',		NULL );			// ( Ad Code for position 3 )
	define ( 'AD_CODE4',		NULL );			// ( Ad Code for position 4 )

	// Example Ad Code

	define ( 'AD_CODE4',		'<a href="' . $variable . '" class="whatever"><img src="/path/to/img" alt="something" /></a>' );			// ( Ad Code for position 4 )
```

### Random Titles and Descriptions

You can add as many titles and descriptions as you like just change the $num variable to match the correct amount of descriptions and add a new case. eg... if you added 10 descriptions it would read:

```php
		$num = Rand (1,10);
```

Example Title

``` php
		/*
			Available variables are:

			$model			- Models Username
			$age 			- How old they are

		*/

		case 1:
		echo '
			' . $model . '\'s Live Cam Show
		';
		break;
```

Example Description ( note descriptions can use the global defines in set above )

``` php
		/*
			Available variables are:

			$model			- Models Username
			$age 			- How old they are
			$location 		- Where they are
			$num_users 		- amount of people watching
			$time_online 	- how long they have been online.
		*/

		case 1:
		echo '
			<p>
				Welcome to <strong>' . $model . '\'s live stream</strong> and chat room! Watching ' . $model . ' getting naked, fucking, sucking, etc... is <storng>completely FREE</strong>! However, to chat with ' . $model . ', view ' . $model . '\'s private profile photos and video clips, and many more member-only features... you\'ll need a <a href="' . LINK_SIGNUP . '" class="external">FREE account</a>. Right now, ' . $model . ' is responding live to viewers... <a href="' . LINK_SIGNUP . '" class="external">Create your free account</a> now to join in on the fun!
			</p>
		';
		break;
```

### Links

These shouldn't have to be changed, but you can check in your affiliate account to make sure the codes match up. It is possible that these could change in the future or on a per account basis.

## License

Chaturbate API is released under the MIT license.

Copyright (c) hillipino.com

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.

license: MIT

repository: SecurityAnalysts/Chaturbate-API

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: SecurityAnalysts/Chaturbate-API


text:
---
layout: post
title: 799. Champagne Tower
category: [Leetcode]
description:
keywords: ['Leetcode', 'Medium']
---
### [799. Champagne Tower](https://leetcode.com/problems/champagne-tower)

#### Tags:

We stack glasses in a pyramid, where the first row has 1 glass, the second row has 2 glasses, and so on until the 100th row.  Each glass holds one cup (250ml) of champagne.

Then, some champagne is poured in the first glass at the top.  When the top most glass is full, any excess liquid poured will fall equally to the glass immediately to the left and right of it.  When those glasses become full, any excess champagne will fall equally to the left and right of those glasses, and so on.  (A glass at the bottom row has it's excess champagne fall on the floor.)

For example, after one cup of champagne is poured, the top most glass is full.  After two cups of champagne are poured, the two glasses on the second row are half full.  After three cups of champagne are poured, those two cups become full - there are 3 full glasses total now.  After four cups of champagne are poured, the third row has the middle glass half full, and the two outside glasses are a quarter full, as pictured below.

Now after pouring some non-negative integer cups of champagne, return how full the j-th glass in the i-th row is (both i and j are 0 indexed.)

Example 1:
Input: poured = 1, query_glass = 1, query_row = 1
Output: 0.0
Explanation: We poured 1 cup of champange to the top glass of the tower (which is indexed as (0, 0)). There will be no excess liquid so all the glasses under the top glass will remain empty.

Example 2:
Input: poured = 2, query_glass = 1, query_row = 1
Output: 0.5
Explanation: We poured 2 cups of champange to the top glass of the tower (which is indexed as (0, 0)). There is one cup of excess liquid. The glass indexed as (1, 0) and the glass indexed as (1, 1) will share the excess liquid equally, and each will get half cup of champange.

Note:

poured will be in the range of [0, 10 ^ 9].

query_glass and query_row will be in the range of [0, 99].

### Solution

path: /_drafts/0799-Champagne Tower.md

filename: 0799-Champagne Tower.md


text:
### Game of Thrones Fan Quiz

This is a slightly cleaned up version of my earliest javascript assignment for  Berkeley Coding Boot Camp.  The challenge, posed in week 3, was to create a timed quiz game with interactions produced primarily through DOM manipulation using vanilla Javascript and jQuery, and include a high scores record.  I've done some cleanup of the code to make it work properly.  As time permits, plans for enhancement include adding more questions, more dynamic features, replacing simple alert boxes with nicer modals, and rewriting the traditional For Loops with map functions.

Additions and collaborations from other GOT fans are welcome!

## Contents | Quick Links
[Getting Started](#start)     |     [Demo](#demo)     |     [Built With](#built)     |     [Authors](#author)     |     [Visuals](#visuals)     |     [Contributing & Tests](Contributing.md)     |     [Contact](#contact)

## [Getting Started](#start)

### View a demo here:
* [Deployed on GitHub Page](https://jenjayme.github.io/new-GOT-game/#demo)

### Download from the repo here:
* [Git Hub Repo](https://github.com/jenjayme/new-GOT-game)

## [Visuals](#visuals)

![Example Gif](./example.gif)

## Built With
* HTML5 & CSS
* [Javascript](https://www.javascript.com/)
* [Bootstrap](https://https://getbootstrap.com/)
* [VS Code](https://code.visualstudio.com/)

## Questions
For questions or to discuss collaborations on this or other projects, contact the author via LinkedIn or GitHub as follows.

## Author

**Jen Jayme**

[linkedin.com/jenjayme](https://www.linkedin.com/in/jenjayme)

[github.com/jenjayme](https://github.com/JenJayme)

## Acknowledgements
* Special thanks to Jerome Chenette, UC Berkeley Coding Boot Camp and Trilogy Education Services for referring this project.
* Endless appreciation to Fred Rodolfo for tutoring advice and support.
* Shout out to Alex Bodin for the cool animated button styling.

repository: JenJayme/new-GOT-quiz

branch_name: refs/heads/main

repo_name: JenJayme/new-GOT-quiz


text:
# Modular Object Detection Framework

## Introduction

The *MOOD* Framework is used for easier integration of object detection algorithms
using the [ROS plugin](http://wiki.ros.org/pluginlib/Tutorials/Writing%20and%20Using%20a%20Simple%20Plugin) libraries.

## Dependencies

### ROS Packages
* [uav_ros_lib](https://github.com/lmark1/uav_ros_lib)

### External packages
* OpenCV
* PCL

## Description
The *MOOD* manager consists of a ROS Message Synchronizer plugin and an Object Detector plugin.

### ROS Message Synchronizer
In order to synchronize the needed sensor messages please provide a ROS message synchonization
implementation of the ```mood_base::msg_sync_interface``` in [msg_sync_interface.hpp](include/mood_ros/msg_sync_interface.hpp).
**NOTE** If there is need for synchronization of more than three ROS messages or other ROS message types, please augment the ```sensor_comm::sensor_info``` structure in [sensor_comm.hpp](include/mood_ros/sensor_comm.hpp).

### Object Detector
In order to add a new object detector plugin please provide a concrete implementation of the ```mood_base::detector_interface``` in  [detector_interface.hpp](include/mood_ros/detector_interface.hpp).

### Pose Tracker and Kalman Filter
For now remain static elements of the MOOD Manager. Pose Tracker tracks a single detected pose based on distance and Kalman filter performs prediction on the given tracked pose.

### MOOD Manager
A node which dynamically loads and connects one ROS Message Synchronizer plugin and one Object Detector plugin defined by the given configuration file (e.g. [detection_manager_config.yaml](config/detection_manager_config.yaml)).
**NOTE** Plugins do not need to be sctrictly in the *mood_ros* ROS package. Any plugin that implements the appropriate interface can be
loaded into the MOOD Manager node.

## Blob Detector

An example detector plugin which aims to detect Blob poses using RGB-D sensor information. It expects to be paired with a  synchronization plugin that can provide ```sensor_msgs::Image``` and ```sensor_msgs::Pointcloud2``` ROS messages (e.g. [PointcloudRGBSync](src/double_msg_sync.cpp)).

## FAQ

### What are ROS Plugins?

[Here](https://www.xuningyang.com/2020-05-12-ros-pluginlib/) is a quick tutorial on making and using ROS plugins.


text:
# Typedoc-plugin-tutorials

__*Important notice:* This plugin is deprecated. Please use [@knodes/typedoc-plugin-pages](https://www.npmjs.com/package/@knodes/typedoc-plugin-pages) instead__

---

This typedoc plugin allows you to create tutorials for your typedoc documentation. Those tutorial pages will be generated using your theme. The tutorial index is added as a doc page visible in the global menu of your documentation. This page generates a basic index page containing all your tutorials.

Example generated tutorials page: https://gerkindev.github.io/vuejs-datatable/tutorials/index.html

Example `typedoc.json` file:

```json
{
	"tutorials-map": "./tutorials/tutorials.json",
	"tutorials-directory": "./tutorials"
}
```

In this examples, tutorials general informations (**title**, description & children) will be loaded from `./tutorials/tutorials.json`. Markdown files (`.md`) are expected to be found under the `./tutorials` directory.

Example `tutorials.json` file

```json
{
	"my-first-tutorial": {
		"title": "My first tutorial",
		"description": "This tutorial is just an introduction",
		"children": {
			"my-second-tutorial": {
				"title": "My second tutorial",
				"description": "This tutorial is a child of the 1st tutorial"
			}
		}
	},
	"hello-world": {
		"title": "Hello world"
	}
}
```

This configuration will look for `my-first-tutorial.md`, `my-second-tutorial.md` & `hello-world.md` in the specified tutorials directory and render them as tutorial pages.

Each tutorial key **must** be unique, even through children.

In your doc comments, linking with tutorials can be done the following ways:

```ts
/**
 * This is the description of the doc comment. Here is a link to [[tutorial:my-first-tutorial]].
 *
 * @tutorial my-second-tutorial An optional descriptionto attach to the tutorial
 */
void myFunc(){}
```

repository: GerkinDev/typedoc-plugin-tutorials

gha_language: TypeScript

gha_license_id: MIT

repo_name: GerkinDev/typedoc-plugin-tutorials


text:
# Module 6: Styling HTML5 by Using CSS3

Wherever a path to a file starts with *[Repository Root]*, replace it with the absolute path to the folder in which the 20480 repository resides. For example, if you cloned or extracted the 20480 repository to **C:\Users\John Doe\Downloads\20480**, change the path: **[Repository Root]\AllFiles\20480C\Mod01** to **C:\Users\John Doe\Downloads\20480\AllFiles\20480C\Mod01**.

# Lesson 2: Styling Block Elements

### Demonstration: Switching Between Cascading Style Sheets (CSS) Layout Models

#### Preparation Steps

Ensure that you have cloned the 20480C directory from GitHub (**https://github.com/MicrosoftLearning/20480-Programming-in-HTML5-with-JavaScript-and-CSS3/tree/master/Allfiles**). It contains the code segments for the labs and demos in this course.

#### Demonstration Steps

#### Switch between layout modes in a webpage

1.	Open Microsoft Visual Studio 2017.
2.	In Microsoft Visual Studio, on the **File** menu, point to **Open**, and then click **File**.
3.	In the **Open File** dialog box, browse to the **[Repository Root]\Allfiles\Mod06\Democode** folder, click **positioning.html**, and then click **Open**.
4.	Review the code with the students. This file contains an HTML **article** with four **div** elements. The file also contains styles for the **article** and **div** elements.
   ```html
        <!DOCTYPE html>
        <html xmlns="http://www.w3.org/1999/xhtml">
        <head>
          <title>Positioning Demo</title>
          <style type="text/css">
            body {
              text-align: center;
            }

            article {
              padding: 10px;
              border: 2px solid red;
            }

            div {
              margin: 10px;
              padding: 5px;
              border: 2px solid black;
              width: 150px;
              height : 150px;
            }

            div:nth-child(odd) {
              font-size: 4rem;
            }
          </style>
        </head>
        <body>
          <article>
            <div id="one">One</div>
            <div id="two">Two</div>
            <div id="three">Three</div>
            <div id="four">Four</div>
          </article>
        </body>
        </html>
   ```
5.	On the **File** menu, click **View in Brower (Microsoft Edge)**.
6.	In Microsoft Edge, if the **Intranet settings are turned off by default** message appears, click **Don’t show this message again**.
7.	Observe the four **div** elements laid out one below the other, in order, within the **article** element. To highlight its boundaries, the **article** element has a red border. This is the **block layout** mode.

![alt text](./Images/20480B_6_Layout-Column.png "The div elements in block layout mode")

8.	Press F12.
9. In the F12 Developer Tools Pane, click on **Dock Bottom** option on the top right corner, so that can see Both Microsoft Edge and Developer windows at the same time.
10.	To display the fully expanded version of the layout rules applied to the HTML content, click **Elements** tab.
11. In Elements tab expand **body** and expand **article**.
12.	Right-click the **div** entry, and then select **Add attribute**.
13.	Type **style=display: inline** for each **div** entry, and then press ENTER.
14.	In Microsoft Edge, notice that the four **div** elements are now laid out side-by-side aligned by text baseline with height and width properties ignored. This is the **inline layout** mode.

![alt text](./Images/20480B_6_Layout-Row.png "The div elements in inline layout mode")

15.	Resize the browser window to make it narrower, so you can see how the application wraps the blocks onto the next line in the **inline layout** mode.
16.	In the F12 Developer Tools window, on the **CSS** tab, click the **display: inline** rule, change it to read **display:inline-block**, and then press ENTER.
17.	Notice the layout is the same but the **height** and **width** properties are now preserved. This is the **inline-block** mode.

>**Note**: If required, make the browser window wider so that blocks **One** and **Three** are on the same line.

![alt text](./Images/20480B_6_Layout-Inline-Block.png "The div elements in inline-block layout mode")

18.	In Microsoft Edge, resize the browser window so you can see how the application wraps the blocks onto the next line in the **inline layout** mode.
19.	In the F12 Developer Tools window, on the **CSS** tab, click the **display: inline-block** rule. Change this rule to **display:-ms-flexbox**, and then press ENTER.
20.	To view the new layout, switch to Microsoft Edge. The application displays the **div** elements in a vertical column.
21.	In the F12 Developer Tools window, on the **CSS** tab, click the **display: -ms-flexbox** rule, change it to **display:table-cell**, and then press ENTER.
22.	To view the new layout, switch to Microsoft Edge. The application displays the **div** elements in a horizontal table.

#### Switch between positioning modes in a webpage

1.	In the F12 Developer Tools window, on the **CSS** tab, clear the three check boxes next to the display attributes for **body**, **article**, and **div**.
2.	Right-click the **div** entry, and then select **Add rule**.
3.	Type **#three**, and then press **Tab**.

>**Note**: This action creates a new rule for the **<div>** element with the **id** property set to **three**. This is the **<div>** containing the text **Three**.

4.	Type **position: relative**, and then press ENTER.
5.	Right-click the **#three** entry, and then select **Add property**.
6.	Type **top: 2em**, and then press ENTER.
7.	Right-click the **#three** entry, and then select **Add property**.
8.	Type **left: 2em**, and then press ENTER.
9.	In Microsoft Edge, notice how the application positions the **three** box relative to its normal position.
10.	In the F12 Developer Tools window, on the **CSS** tab, click the **position:relative** rule for the **#three** selector, change it to **position:absolute**, and then press ENTER.
11.	In Microsoft Edge, notice how the application positions the**three** box relative to its containing **article** block.
12.	In the F12 Developer Tools window, on the **CSS** tab, click the **position:absolute** rule for the **#three** selector, change it to **position:fixed**, and then press ENTER.
13.	In Microsoft Edge, notice how the application positions the **three** box relative to the browser window. Make the window small enough to require scrolling and see how the **three** box remains stationary when you scroll (it does not scroll into view).
14.	Close Microsoft Edge.
15.  Close **positioning.html - Microsoft Visual Studio**.

# Lesson 4: Enhancing Graphical Effects by Using CSS3

### Demonstration: Styling Text and Block Elements by Using CSS3

#### Preparation Steps

Ensure that you have cloned the 20480C directory from GitHub (**https://github.com/MicrosoftLearning/20480-Programming-in-HTML5-with-JavaScript-and-CSS3/tree/master/Allfiles**). It contains the code segments for the labs and demos in this course.

#### Demonstration Steps

1.	Read the lab scenario to the students and point out that they should read each scenario before attempting the lab for a module.
2.	Point out to students that the exercise scenario for each exercise is essential reading and contains a description of what they will accomplish in the exercise.
3.	Start Microsoft Visual Studio.
4. In Microsoft Visual Studio, on the File menu point to **Open**, and then click **Project/Solution**.
5. From the **[Repository Root]\Allfiles\Mod06\Labfiles\Solution\Exercise 3** folder, open the **ContosoConf.sln** solution.
>**Note**: If **Security Warning for ContosoConf** dialog box appears, clear **Ask me for every project in this solution** checkbox and then click **OK**.
6.	On the **Debug** menu, click **Start Without Debugging**.

>**Note**: If the **Intranet settings are turned off by default** message appears, click **Don’t show this message again**.

7.	In Microsoft Edge, on the **Home** page, point out the styling of the items in the navigation bar. Click each page in turn, and notice how the navigation bar uses a ribbon effect to indicate the current page.
8.	In the navigation bar, click **Home**.
9.	On the **Home** page, point out the **Register Free** link. This is an ordinary HTML link created as a **<a>** tag that takes the user to the **Register** page, but styled to look like a large red button.
10.	Place the mouse pointer over the **Register Free** link and point out how the link is highlighted.
11.	In the navigation bar, click **About**. Point out the following features of the text on this page:
   - The text is formatted in three columns.
   - The first letter of the first paragraph is styled as a drop cap.
   - The text at the start of all the remaining paragraphs is indented.
   - The block quote in the third column is styled to make it stand out.
12.	Close Microsoft Edge.
13.	In **Solution Explorer**, expand the **ContosoConf** project, expand the **styles** folder, and then double-click **nav.css**.
14.	In the **Code Editor** window, scroll through the code. Point out that to change the layout of the navigation bar, the students will add the styles defined in this file.
15.	In **Solution Explorer**, double-click **header.css**.
16.	In the **Code Editor** window, summarize the purpose of the following style rules:
   - **header.page-header .register**. This rule formats the **Register Free** link as a large red button.
   - **header.page-header .register:hover**. This rule highlights the **Register Free** link when the mouse pointer is placed over it.
   - **header.page-header .register:before**. This rule adds a dotted border around the button for the **Register Free** link.
   - **header.page-header .register .free**. This rule sets the font size of the word **Free** in the **Register Free** link. This word is displayed with a font size that is 80% of the size of the word **Register**.
17.	In **Solution Explorer**, in the **styles** folder, expand **pages**, and then double-click **about.css**.
18.	In the **Code Editor** window, summarize the purpose of the following style rules:
   - **.about > article > section**. This rule formats the text on the **About** page in three columns.
   - **.about p:first-child:first-letter**. This rule formats the first letter of the first paragraph as a drop cap.
   - **.about p**. This rule indents each paragraph on the **About** page.
   - **.about p:first-child**. This rule prevents the drop cap in the first paragraph from being indented.
   - **.about blockquote**. This rule formats the text for the block quote on the **About** page.
   - **.about blockquote:before**. This rule adds the quote mark to the start of the block quote.
19. Close all open windows.

©2018 Microsoft Corporation. All rights reserved.

The text in this document is available under the  [Creative Commons Attribution 3.0 License](https://creativecommons.org/licenses/by/3.0/legalcode), additional terms may apply. All other content contained in this document (including, without limitation, trademarks, logos, images, etc.) are  **not**  included within the Creative Commons license grant. This document does not provide you with any legal rights to any intellectual property in any Microsoft product. You may copy and use this document for your internal, reference purposes.

This document is provided "as-is." Information and views expressed in this document, including URL and other Internet Web site references, may change without notice. You bear the risk of using it. Some examples are for illustration only and are fictitious. No real association is intended or inferred. Microsoft makes no warranties, express or implied, with respect to the information provided here.


text:
# BlueHeronTransportUART

[![Hex version](https://img.shields.io/hexpm/v/blue_heron_transport_uart.svg "Hex version")](https://hex.pm/packages/blue_heron_transport_uart)
[![API docs](https://img.shields.io/hexpm/v/blue_heron_transport_uart.svg?label=hexdocs "API docs")](https://hexdocs.pm/blue_heron_transport_uart/BlueHeronTransportUART.html)

BlueHeron supports UART-based Bluetooth modules. Currently, this ONLY includes
the Cypress Semiconductor
[BCM43438](https://www.cypress.com/part/cychpset-p62s143438-1). This part is on
the Raspberry Pi Zero W and the Raspberry Pi 3 B. It is NOT on the 3 B+.

To use, add `:blue_heron_transport_uart` to your `mix.exs` dependencies and
adapt the following to initialize a transport context.

```elixir
config = %BlueHeron.HCI.Transport.UART{
  device: "/dev/ttyACM0",
  uart_opts: [speed: 115200],
}
{:ok, ctx} = BlueHeron.transport(config)
```

## License

The source code is released under the MIT license.

Check [NOTICE](NOTICE) and [LICENSE](LICENSE) files for more information.


text:
# Bayesian Modeling using Stan

Stan is an open-source, Bayesian inference tool with interfaces in R, Python, Matlab, Julia, Stata, and the command line. Users write statistical models in a high-level statistical language. The default Bayesian inference algorithm is the no-U-turn sampler (NUTS), an auto-tuned version of Hamiltonian Monte Carlo. Stan was developed to address the speed and scalability issues of existing Bayesian inference tools.

The goal of the workshop is the practical application of Stan to different models, via the RStan and PyStan interfaces. Each day will be divided into three sections:

1. Bayesian Statistics and MCMC
2. Coding models in RStan
3. Case studies in biostatistics (days 1 and 2)

The afternoon on the third day will allow users to bring their own data and prototype a model for it using Stan.

Instructors: [Bob Carpenter](https://github.com/bob-carpenter) (Columbia University), [Daniel Lee](https://github.com/syclik) (Columbia University), Chris Fonnesbeck (Vanderbilt University)

Event Timing: May 31 - June 2, 2016, 9:00 - 16:00
Event Address: [Featheringill Hall 136](https://www.google.com/maps/place/Featheringill+Hall/@36.1447708,-86.8055131,17z/data=!3m1!4b1!4m5!3m4!1s0x886466bd355f5741:0x3ae06da3496821a0!8m2!3d36.1447708!4d-86.8033244)

The slides presented at the workshop can be [downloaded here](http://mc-stan.org/workshops/vanderbilt2016/)

## Schedule

### Day One
- Intro to Stan
	- Supporting reproducible research
	- First examples
	- I/O in the RStan interface
- Intro to Bayesian Statistics
- Components of a Stan Program
	- Basic data types and variable declarations
	- Variable constraints and transform to unconstrained scale
	- Program blocks and execution: data, parameters, model
	- Derived quantities
	- Functions, operators, statements
	- Debugging and error handling
	- User-defined functions
	- Solving ordinary differential equations (ODE)
- Working with RStan

### Day Two

- Inference with Markov Chain Monte Carlo
	- Monte Carlo methods and plug-in inference
	- Markov chain Monte Carlo (MCMC)
	- Warmup adaptation
	- Diagnosing convergence with R-hat
	- Effective sample size vs. number of iterations
- Stan Programming Techniques
	- Reproducible research practices
	- Probabilistic programming principles
	- Generated quantities for inference
	- Data simulation and model checking
	- Posterior predictive checks
	- Marginalizing discrete parameters
	- Handling missing data
	- Ragged and sparse data structures

### Day Three

- Stan Programming Techniques (continued)
- Topics in Applied Modeling with Stan
	- A few case studies
	- Bring your own statistical models

<iframe src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d3221.8949587563097!2d-86.80551308477725!3d36.14477078008877!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x886466bd355f5741%3A0x3ae06da3496821a0!2sFeatheringill+Hall!5e0!3m2!1sen!2sus!4v1462888357093" width="600" height="450" frameborder="0" style="border:0" allowfullscreen></iframe>

Questions? Contact chris.fonnesbeck@vanderbilt.edu


text:
# fantavier
Awesome SV analysis pipeline

# How to use
1. symlink the data directory in /mnt to the fantavier folder

```
cd fantavier
ln -s /mnt/humanSV/data .
```

2. Then run using e.g.

```
snakemake -j 2 -- 5_racon/assembly_consensus.fasta
```

Where the last file is file you want to create.

repository: dkoppstein/fantavier

repo_name: dkoppstein/fantavier


text:
---
slug: "js-set-vs-map"
title: Set vs Map
---

Set vs Map

- [Javascript Map Object vs Set Object](https://stackoverflow.com/questions/24085708/javascript-map-object-vs-set-object)
- Set is a collection of unique values
- Map object holds key-value pairs and remembers the original insertion order of the keys.
  - Map is mainly used for fast searching and looking up data. (set, get, has)

repository: doinghun/TIL

gha_language: JavaScript

repo_name: doinghun/TIL


text:
# FSharp.Charting: An F# Charting Library

The FSharp.Charting library implements charting suitable for use from F# scripting.

See http://fsharp.github.io/FSharp.Charting/ and [other charting libraries for use with F#](http://fsharp.org/guides/data-visualization/)

## Library license

The library is available under MIT. For more information see the [License file](https://github.com/fsharp/FSharp.Charting/blob/master/LICENSE.md) in the GitHub repository.

## Maintainer(s)

- [@dsyme](https://github.com/dsyme)
- [@tpetricek](https://github.com/tpetricek)

The default maintainer account for projects under "fsprojects" is [@fsgit](https://github.com/fsgit) - F# Community Project Incubation Space (repo management)


text:
# Benchmark

## How fast is Clear?

## Initial bootstrapping

Clear magic is built on compile time. Therefore, the impact on loading time is very limited. Clear can be used for example into web function \(lambda function, google cloud function\) application without any problem.

The only overhead is the connection to the database; Clear allocate by default 5 connections to PostgreSQL. In the case of mono-fiber web-function projects, you may want to reduce the connection pool to 1 only:

```ruby
Clear::SQL.init("postgres://postgres@localhost/example_db", connection_pool_size: 1)
```

Another good performance improvement would be to connect through [PGBouncer](https://pgbouncer.github.io/) instead of directly to the database.

## Query and fetching benchmark

Here is a simple benchmark comparing the different layers of Clear and how they impact the performance, over a 100k row very simple table:

```text
With Model: With attributes and cursor    7.4  (135.09ms) (± 6.44%)  116409530 B/op   5.64× slower
               With Model: With cursor   8.61  (116.08ms) (± 2.82%)   97209247 B/op   4.84× slower
           With Model: With attributes  13.78  ( 72.59ms) (± 3.61%)   83101520 B/op   3.03× slower
          With Model: Simple load 100k  16.41  ( 60.94ms) (± 3.22%)   63901872 B/op   2.54× slower
                    Hash from SQL only  30.21  (  33.1ms) (± 5.18%)   22354496 B/op   1.38× slower
        Using: Model::Collection#pluck  41.74  ( 23.96ms) (± 8.35%)   25337128 B/op        fastest
```

## Against the competition

While being a bit outdated, a benchmark of the competition [has been done here](https://github.com/jwoertink/crystal_orm_test).

Clear stands in the middle of the crowd, being slightly slower than some other ORM over `select` methods.

More noticeably, Clear performs 5 to 8x faster than Ruby's ActiveRecord !

repository: anykeyh/clear

gha_language: Crystal

repo_name: anykeyh/clear


text:
# 11. Express.js Challenge: Note Taker

![MIT License](https://img.shields.io/badge/license-MIT-green)

## Description

Welcome to my note taker! Written with Node.js, this application takes advantage of the Express npm package to create a backend server that connects with the front end HTML user interface. As a full stack application, the notes you create are saved on the server and persist between sessions.

## Table of Contents

* [Deployment](#deployment)
* [Usage](#usage)
* [License](#license)
* [Credits](#credits)
* [Authors](#authors)
* [Questions](#questions)

## Deployment

You can view the live site [here](https://amato-note-taker.herokuapp.com/).

## Usage

![A screenshot of the landing page.](./screenshots/screenshot-1.png)

After clicking the above link to the deployed application, click "Get Started". This will bring you to the application's main page.

![A screenshot of the main page with no saved notes](./screenshots/screenshot-2.png)

Now you can start writing your first note! When you've finished simply click the save icon in the top right of the screen to save your note to the server.

![A screenshot of a sample note](./screenshots/screenshot-3.png)

You can add a new note by clicking the add button in the top right corner. To view a note you already wrote, simply click that note from the list on the left hand side of your screen. You can also a note by pressing the delete icon on that note in the list.

![A screenshot of a list of saved notes](./screenshots/screenshot-4.png)

## License

[MIT](./LICENSE.txt)

## Credits

3rd Party Dependencies

* [Express](https://expressjs.com/)

Starter Code

* [UCF Coding Bootcamp](https://github.com/coding-boot-camp/miniature-eureka)

## Authors

Aidan Amato

## Questions

Please reach out of you have any additional questions!

* [GitHub](https://github.com/aidanamato)
*<EMAIL_ADDRESS>

repository: aidanamato/note-taker

repo_name: aidanamato/note-taker


text:
# Michel Moriniaux
####<EMAIL_ADDRESS>+1<PHONE_NUMBER>

## Experienced SRE leader

## Profile
Experienced manager with 24 years of experience in tech and 8 years in people management. I have held positions leading network engineering to supporting product development teams at leading corporations.

## Work Experience
### [LinkedIn](https://www.linkedin.com "LinkedIn Homepage"), Professional Social Network, Microsoft Corporation, 2020 to present
#### SRE Sr Manager, LinkedIn Talent Solutions, Jan 2023 to Present
After 2 years managing the Hire SRE team my role was expanded to lead all of LinkedIn's Talent Solutions SRE teams ( Hire, Seekers and Jobs, Learning ) supporting the 3 Talent pillars.
In this role I've:
* managed up to 25 engineers and managers, currently 3 managers and 2 IC directs.
* Successfully expanded the learnings and methods devised in the Hire team to the 2 other teams
* In the space of 3 months, accelerated the transition of SREs to SWE roles as we move SREs out of the firefighting path and concentrating in providing the tools for reliable, transparent service ownership. focusing on regression prevention through the SDLC.

#### SRE Manager, SRE Sr Manager, LinkedIn Hiring Solutions, 2020 to Jan 2023
After 20 years in the networking and datacenter business it was time for a change. I decided to expand on the side job I had at Criteo managing a PRE team and dive fully into management. I joined LinkedIn on the first day of Covid shutdown to manage the team in charge of reliability of the Hiring product. This product generated most of LinkedIn's revenue. Unfortunately, reliability was not at the right level and SREs spent their time chasing fires. During my 2 years in this team I:
* managed up to 12 engineers
* raised the availability of the product from 98.9% to 99.97%
  * brought reliability to the heart of SWE preoccupations
  * Pushed SWE management to start the Major product redesign process that modularized the product monolith, culminating in a 3 year project to phase out the original LinkedIn hiring product
  * executed on the project providing my team's support to build the right accountability
* initiated a transformation initiative to bring more responsibility from SWEs and less gatekeeping from SREs.
  * initial successes pushed the SRE org to accelerate their larger SRE3.0 plan that proposed similar principles.
  * significantly reduced stress levels and fear of on-call and stopped on-call burn-out related attrition.
* brought structure to project management by enforcing lightweight Agile methods. The team welcomed the change as it gave them goals with increased autonomy

### [Criteo](http://www.criteo.com "Criteo's Homepage"), AdTech global leader in retargeting solutions, 2014 to 2020
2.5B revenue, 2.7K employees, 8 datacenters around the world 2MW minimum footprint, Global nx100G WAN, 5M QPS
#### Start of the US adventure, 2017 to 2020, Sr Staff Ops Lead
I built a project to move to our US office to create a set of teams that leverage the talent pool of the Valley and be as close as possible to where innovation is happening.
Over 3 years I built 3 teams from scratch two of which where totally outside of my comfort zone and areas of expertise. I groomed managers to lead these teams.
* An integrated infrastructure team (4): Leveraging Valley innovation I built a team of multidisciplinary experts that streamlined the way we build-out capacity while bringing-in the latest and best practices. we delivered the following projects:
  * Procedural datacenter layouts: where historically we were planning out floorplans by hand we now had a set of scripts to layout everything in 3D
  * Automated the rack and roll validation process by creating a Raspberry pi based appliance to do the job.
  * Criteo's quickest capacity build-out to date
  * Brought to Criteo a complete line of Whitebox alternative switches for our Clos fabrics
  * Became contributors to the SONiC OSS Network Operating System and were recognized at the OCP keynote for our efforts
  * Rolled out SONiC to our greenfield builds
  * Designed the future of our disaggregated datacenters and the DCI OLS solution it would be built upon
  * Launched a set of machine learning projects to leverage the monitoring data that we had been storing. The goal was to be able to predict rather than react to failures in the network
* a PRE team (4): PRE stands for Product Reliability Engineering, it consists in bringing the SRE method to Product Engineering. PREs sit with the product developers and clear all non-business-logic dependencies by integrating or coding the necessary connectors, they are responsible for the reliability of the product and are the first line of support when things go wrong.
* A DBA team (3): The Palo Alto office needed to have a set of resident Database Administrators to help them with our SQL stack, I worked with our Paris HQ DBA teams to recruit local talent and managed to secure an experienced internal mobility to lead the team.

This is a very interesting hybrid role as I have to technically contribute but I also have to hold an engineering manager position. I report directly to my VP of infrastructure on one side and through dotted lines to the VP of SRE and the local SVP of Product Engineering.

Employment at Criteo stopped when the company decided to close the Palo Alto Office. Thanks to my influence in the office's day to day, I was part of a 4 person team tasked to facilitate the transition or termination of 150 employees and the clean shutdown of the office's operations.

#### From leading network tech to leading the network engineers, 2015 to 2017, Sr Staff Network Engineer, Sr Staff Ops Lead
Having natural leadership in my team it became logical to give me the management of the team. This was a time of consolidation where we took everything we learned in the past 2 years and built:
* A team of 4 engineers: 3 local and 1 remote in Beijing, China.
* Guided 2 engineers through the P&P process to a successful promotion to Staff Operations Engineer level.
* A standardized way of building network fabrics that could scale cost effectively
  * 5 stage clos architectures built out of one generic SKU that could be sourced from multiple vendors ( 32x100G Tomahawk based switches )
* Designed the Edge pod and replaced expensive transit routers with a commodity switch based mini IP fabric + BGP optimizer. We no longer need expensive million route TCAMs but 10000 entries are enough with good route selection.
* Budgeting

#### Scaling Criteo Networks, 2014 to 2015, Staff Network Engineer
I joined Criteo with one project in mind: build Clos Fabrics at scale.
At the time Criteo used proprietary L2 tech from one entrenched vendor. The Premji-Lapukhov Draft had not been made public yet and the only literature available was a Microsoft presentation about using eBGP in large scale datacenters. Nevertheless I was convinced this was the way to go. The first challenge was to convince my new colleagues and with the help of several hyperscale vendors I was able to move my vision through. If we were going to build large vendor agnostic IP fabrics we would not only need new automation but also the support of other teams as we were going to drastically change the way services were provisioned and used.
We built a v-team with the nascent SRE team and EPMs to kickstart the project. One year later we had built Europe's largest private Hadoop cluster with 5000 nodes and a full eBGP 5-stage Clos IP Fabric with automated network provisioning.

I delivered the following:
* introduced the netDevOps concept and infrastructure as code
* Introduced IP fabrics
* Created an Ansible based automation system that was vendor agnostic and could generate configurations from an abstraction
* Deployed the largest private Hadoop cluster in EMEA
* Streamlined build processes to move from a boutique operation to a just-in time industrialized builds

### [Prosodie Cap Gemini](http://www.odigo.com), Managed Services Provider, 2009 to 2014
3 datacenters, 250Kw minimum footprint, National dark fiber WAN
#### From WAN to DC
I joined the company as a network engineer and rapidly rose to tech lead on the routing and WAN side of the business. I subsequently got introduced to the datacenter side and what it took to operate a multitenant system with hundreds of custom builds.
during my stay I delivered the following projects:
* WAN redesign: moving from SDH(EuroSonnet) loops to loops riding a DWDM muxponder network.
* Replaced all core routers and edge routers ( cisco6500 to Brocade MLXe )
* Redesigned the complete routing stack twice: first from a full OSPF to a MP-BGP based ISP design then to a BGP-free core design
* Merged Prosodie's and InternetFR networks during the M&A
* Introduced IPv6

### [B3g Telecom](http://www.sfrbusiness.fr), VoIP Service Provider, 2006 to 2008
3 PoPs, 2500+ remote offices in France though DSL backhauls
#### A new challenge
I came on-board when B3G signed it's largest customer: France's largest supermarket chain with more than 2000 locations. My mission was to build a redundant network to all locations to be able to provide the company's VoIP centrex product to the branches.
I solved the following challenges:
* Engineer the infrastructure solution
* The whole network had to be autoconfigured: CPEs, IP phones, ATAs, accounts, centrex configs, LNS
* Create the supply chain to deploy and auto-provision 10 locations per day

### [UUNET / Worldcom / MCI / Verizon](https://en.wikipedia.org/wiki/UUNET), ISP, 2000 to 2005
Global IP network, AS701,AS702,AS703, most connected IP network at the time.
#### The learning years
I Joined the ABN ( Access and Backbone Networks ) team to work on the core of AS702. UUNet was ISP/Carrier networks university, I got to learn from the best in the business the best practices and the most scalable way to design carrier grade IP networks.
During my tenure there I:
* Redesigned the OOB management network and deployed it to the EMEA region
* Day to day Network operations and on-call rotations
* Built the first STM16 network in Paris out of brand new Juniper M40 and M160
* Designed the technical components of the new xDSL based products
* Special Bids technical consultant

## Skills
* Organizational Transitions
* Agile Methodologies
* Technical Leadership
* Inclusive Team Leadership
* Software development
* Network Design
* Data Center
* English, French and Spanish native speaker

## Education
#### [Stevens Institute of Technology](https://www.stevens.edu/schaefer-school-engineering-science/departments/computer-science), Hoboken NJ, MS CS 2000

#### [EPITA](http://www.epita.fr), Paris France, Specialized school in Computer Science, Engineer degree 1999

## Misc.
Authorized to work in the USA ( green card ) and EU ( French citizen )

repository: MichelMoriniaux/cv

repo_name: MichelMoriniaux/cv


text:
# Topics of Discussion

## InfoSys1D

### When updating new content:
1. Describe what your code does in the main md of each branch
2. Update to the corresponding branch, avoid updating the main branch unless everyone agrees on it
3. Creating new branches to add specific new content, avoid causing instability to the main branch

### Critical Deadlines:

    Due date: 30 Sept, 2020 Wed 23:59 (Week 3)

    Submit 1D project team membership

    Due date: 15 Oct, 2020 Thu (Week 5)

    1D project checkoff presentation in Session 3 (Wed or Thurs)

    6 mins presentation

    4 mins Q&A

    Due date: 26 Nov, 2020 Thu (Week 11)

    1D project checkoff presentation in Session 3 (Wed or Thurs)

    6 mins presentation

    4 mins Q&A

    Due date: 3 Dec, 2020 Thu (Week 12)
    1D Project Final Checkoff in cohort class venues

Due date: 7 Dec, 2020 Mon (Week 13)

Virtual Exhibition

Monday 7 Dec 2020 2359 hrs

Prepare a 3-5 min demo video on your system. Submit the raw file.

A description of your project. Use this template and submit a MS Word document.

An A1 poster about your project in PDF Make it simple, not wordy. It should be a visual illustration of your project.

Due date: 14 Dec, 2020 Mon 2359 hrs

Submit your source code and report for the 1D project in eDimension here. You may submit a Github link to your code.

Monday 9 Dec 2019

Return all loan phones to DS Lab

C1: 2.30pm to 3pm

C2: 3pm to 3.30pm

C3: 3.30pm to 4pm

Prepare your team project claim for submission to ISTD office.

path: /Weekly Outlines.md

filename: Weekly Outlines.md


text:
## Requirements
1. Ubuntu LTS VM (tested on 18.04)
2. Python3 virtualenv (on the build machine)

## Preparing environment
1. On the target machine, create non-root user on the target ubuntu system

```
sudo useradd -m user
```

2. Allow the user to execute sudo without password

```
echo 'user ALL=(ALL) NOPASSWD: ALL' | sudo tee /etc/sudoers.d/user
```

3. On your computer, switch to the directory containing this README guide and create a virtual environment after cloning the repo

```
python3 -m virtualenv --python=python3 venv
```

## Usage

1. Activate the virtual environment

```
source venv/bin/activate
```

2. Set the target vm ip and execute init.sh, for example

```
IP=<IP_ADDRESS> ./init.sh
```

3. Create SSH key pairs,

```
ssh-keygen
```

4. Transfer the SSH public key to the target VM, for example

```
ssh-copy-id -i ~/.ssh/id_rsa.pub<EMAIL_ADDRESS>```

6. Run the playbook

```
ansible-playbook --private-key ~/.ssh/id_rsa -i cluster/hosts.yaml --become --become-user=root --flush-cache -u user kubespray/cluster.yml
```


text:
# serverless-api-to-api-auth

## Introduction

Example of serverless internal api to api authentication/authorisation using Cognito's client credentials grant flow, based on the following [blog post](https://leejamesgilmore.medium.com/serverless-api-to-api-authentication-d4cb4472721e)

In the Serverless World, there are always situations when developing solutions that two or more internal APIs need to communicate with each other. The gold standard would be totally decoupled domain services using events, but in reality, there are often reasons why you need a machine to machine style communication using REST.

This repo covers using the OAuth2 Credentials Grant flow to authenticate APIs (machines) rather than users, using AWS Cognito, API Gateway, AWS Lambda, and TypeScript, hosted in a Lerna monorepo for ease of the demo.

## What are we building?

The following diagram below shows what we are building in this repo:

![architecture image](docs/images/serverless-api-to-api.png)

## Deploying

🛑 **Note**: Running the following commands will incur charges on your AWS account so change the config accordingly.

In the base of the repo run `npm i` and then `npm run bootstrap` (_this will install the dependencies and then bootstrap Lerna_)

Once completed steps above, run the following command `npm run deploy:develop` in each of the folders in order:

1. `./apps/auth-service`
2. `./apps/deliveries`
3. `./apps/orders`

## Tearing Down

To remove the services please run the following `npm run remove:develop` in each of the folders in order:

1. `./apps/orders`
2. `./apps/deliveries`
3. `./apps/auth-service`

## Testing

Use the Postman file in the `./postman/` folder to test the endpoints, logging into the CloudWatch console to view the output for the lambdas to see how this is all working correctly.

This is covered in more detail in the associated blog post.

**\***\* The information provided are my own personal views and I accept no responsibility on the use of the information. \*\*\*\*\*\*


text:
---
title: "차다, 차갑다, 춥다, 감기 - Korean Words vs. Words S2 #20 "
published: 2016-03-14
date: 2016-03-14
---
<iframe id="audio_iframe" src="https://www.podbean.com/media/player/23cdq-5d82ba?skin=8" width="100%" height="100" frameborder="0" scrolling="no"></iframe>

Sometimes, easy word is hard in other languages. 차다/차갑다/춥다 are good example for this. They are all cold in English. However, Koreans use them differently.

#  차다/차갑다

When some object is cold, or weather is cold, you can use both 차다 and 차갑다.

찬 음식 너무 많이 먹지 마. 배탈 나.
Don't eat too much cold food. You will get stomachache.

날씨가 많이 차가워서, 목도리를 했다.
As the weather is cold a lot, I wore muffler.

You can use both 차가운 음식 or 날씨가 많이 차서 in examples above.

##  차갑게

When you want to use 차다 and 차갑다 in adverb form, 차갑게 is more frequently used. It is also possible to conjugate like "차게", but it is less frequently used than 차갑게.

일을 마치고 오니, 커피가 차갑게 식어 있었다.
Coming back after finishing the work, the coffee became cold.

이 과일은 차갑게 해서 먹어야 더 맛있어.
This fruit tastes better when it is cold.

##  차가워지다

When you want to talk about becoming cold which was once hot, 차가워지다 is more frequently used. It is hard to find 차게 되다 or 차지다.

냉장고에 1시간 정도 넣어 놨더니 물이 많이 차가워졌다.
After putting the water in fridge for an hour, it became cold a lot.

차가워진 밥을 데우기 위해 전자레인지에 넣었다.
To heat up the cold rice, I put it into the microwave.

#  춥다

When the weather is cold and you feel cold because of the weather, it is 춥다.

사막의 밤은 진짜 추워.
The night in the desert is really cold.

추운 데 오래 있으면 감기 걸려.
If you are in cold place for a long time, you will catch a cold.

춥다 is the special word for weather only. You can only use it for the temperature of the air around you. It is not used for other things like 커피, 물, 과일, 냉장고, etc. In these cases, you should only use 차다 or 차갑다.

When you are talking about weather, 차다, 차갑다 and 춥다 are interchangeable.

#  감기

When you are in the cold place for a long time, you will catch a cold. This cold, the name of a disease, is 감기 in Korean.

감기 조심하세요.
Watch out for cold.

This phrase was used a lot in an ad for cough medicine.

repository: sainthkh/wiseinit-blog

repo_name: sainthkh/wiseinit-blog


text:
# Overview

Triggers and template should be configured in the ConfigMap `argocd-notification-cm` inside the entry `config.yaml`, or you can add single trigger/template using the patterns of `trigger.NAME` / `template.NAME` where each entry. The process will read all the `trigger.NAME` / `template.NAME` entries and than merge them with `config.yaml`.

```yaml
{!argocd-notifications-cm.yaml!}
```

## Triggers

The trigger defines the condition when the notification should be sent. The definition includes name, condition
and notification template reference.

The following trigger sends a notification when application sync status changes to `Unknown`:

```
  - name: on-sync-status-unknown
    condition: app.status.sync.status == 'Unknown'
    template: app-sync-status
    enabled: true
```

* **name** - a unique trigger identifier.
* **template** - the name of the template that defines the notification content.
* **condition** - a predicate expression that returns true if the notification should be sent. The trigger condition
evaluation is powered by [antonmedv/expr](https://github.com/antonmedv/expr). The condition language syntax is described
at [Language-Definition.md](https://github.com/antonmedv/expr/blob/master/docs/Language-Definition.md).
* **enabled** - flag that indicates if trigger is enabled or not. By default trigger is enabled.

## Templates

The notification template is used to generate the notification content. The template is leveraging
[html/template](https://golang.org/pkg/html/template/) golang package and allow to define notification title and body.
The template is meant to be reusable and can be referenced by multiple triggers.

The following template is used to notify the user about application sync status.

```
  - name: app-sync-status
    title: Application {{.app.metadata.name}} sync status is {{.app.status.sync.status}}
    body: |
      Application {{.app.metadata.name}} sync is {{.app.status.sync.status}}.
      Application details: {{.context.argocdUrl}}/applications/{{.app.metadata.name}}.
```

Each template has access to the following fields:

- `app` holds the application object.
- `context` is user defined string map and might include any string keys and values.
- `notificationType` holds the notification service type name. The field can be used to conditionally
render service specific fields.

repository: olegsu/argocd-notifications

repo_name: olegsu/argocd-notifications


text:
# Dotfiles: weechat configuration

My config for [weechat](https://weechat.org/) which I manage via [homeshick](https://github.com/andsens/homeshick).

You might use this as a starting point or reference but blindly using this repository will probably not work for you.

repository: languitar/config-weechat

repo_name: languitar/config-weechat


text:
# Anagram Checker

## Introduction

You have to write an [anagram](https://en.wikipedia.org/wiki/Anagram) checker that supports the operations listed below. Make the functionality available through two user interfaces:

1. Command-line tool
1. Web API

**Note** that both user interfaces mentioned below must use the same logic implemented in a [C# class library](https://docs.microsoft.com/en-us/dotnet/core/tutorials/library-with-visual-studio).

If you struggle with technical requirements, make sure to visit the links in the requirements below. They lead to helpful chapters in the C# documentation.

## Check Two Words

### Console App

Write a console app that can check whether two words are anagrams (i.e. one word is formed by rearranging the letters of the other word using all the original letters exactly once). The words to check are given in [command line arguments](https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/main-and-command-args/command-line-arguments).

The command `AnagramChecker check listen silent` must lead to the *STDOUT* result `"listen" and "silent" are anagrams`

The command `AnagramChecker check talk jump` must lead to `"talk" and "jump" are no anagrams`.

### Web API

The following request has to return the HTTP status code *OK* because *listen* and *silent* are anagrams.

```http
GET http://localhost:5000/api/checkAnagram
Content-Type: application/json

{
    "w1": "listen",
    "w2": "silent"
}
```

The following request has to return the HTTP status code *BadRequest* because *talk* and *jump* are no anagrams.

```http
GET http://localhost:5000/api/checkAnagram
Content-Type: application/json

{
    "w1": "talk",
    "w2": "jump"
}
```

## Find Anagrams

### Console App

Write a console app that can get all *known* anagrams from a dictionary (details regarding dictionary see below).

The command `AnagramChecker getKnown silent` must lead to the following *STDOUT* result:

```txt
listen
inlets
```

If no known anagrams exist, print *No known anagrams found* on *STDOUT*.

### Web API

A user can send a word and the app has to return all *known* anagrams.

```http
GET http://localhost:5000/api/getKnownAnagrams?w=silent
```

This HTTP request returns the HTTP status code *OK* and a result like the following in the HTTP body:

```json
["listen", "inlets"]
```

If no known anagrams exist, return the HTTP status code *NotFound*.

### Dictionary

Your app should [read known anagrams from a text file](https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/file-system/how-to-read-from-a-text-file) that you have to add to your app. You are free to chose the format of the text file (e.g. JSON, CSV).

Your app has to read the text file at runtime. **Make the name of the text file a configuration setting**. Do not hard-code the text file's name in your code.

Here are some sample anagrams that you can use for testing:

* tar = rat
* arc = car
* elbow = below
* state = taste
* cider = cried
* dusty = study
* night = thing
* inch = chin
* brag = grab
* cat = act
* bored = robed
* save = vase
* angel = glean
* stressed = desserts
* silent = listen
* silent = inlets

## Encapsulation

Make sure your code fulfills the following non-functional requirements.

### Logic in Separate Classes

The logic (anagram check, reading dictionary from file) must **not** be part of the ASP.NET Controller. It has to be encapsulated in its own class in a separate class library. Use a [C# interface](https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/interface) in combination with [*dependency injection*](https://docs.microsoft.com/en-us/aspnet/core/fundamentals/dependency-injection) to get an instance of the anagram checker in the ASP.NET controller.

### Logging for Web API

If the users asks for known anagrams for a word for which no anagrams could be found, write a proper log message using [ASP.NET Core logging](https://docs.microsoft.com/en-us/aspnet/core/fundamentals/logging/).

## Extra Points

If you fulfill all the requirements above, you can earn up to two extra points by solving the following requirements. If you think you earned extra points, let me know by adding a GitHub issue.

### Serilog with File Sink

Earn an extra point if you configure your app to use [*Serilog*](https://serilog.net/) with its [*File* sink](https://github.com/serilog/serilog-sinks-file).

### Get Permutations

A user can ask for *all* anagrams of a given word, independent of whether they make sense (=generate all possible *permutations*).

```http
GET http://localhost:5000/api/getPermutations?w=abc
```

This HTTP request returns the HTTP status code *OK* and the following result in the HTTP body:

```json
["abc", "acb", "bac", "bca", "cba", "cab"]
```

Tip: Consider using the [*Heap* algorithm](https://en.wikipedia.org/wiki/Heap's_algorithm).


text:
# Laravel smart seeder

[![Join the chat at https://gitter.im/parfumix/laravel-smart-seed](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/parfumix/laravel-smart-seed?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

## Installation

Begin by installing this package through Composer. Run this command from the Terminal:

```bash
    composer require parfumix/laravel-smart-seed
```

## Laravel integration

To wire this up in your Laravel project, you need to add the service provider. Open `app/config/app.php`, and add a new item to the providers array.

```php
 'LaravelSeed\Laravel5SeedServiceProvider',
```

Then, add you have to register an command . Just go to app/console/kernel and add following line to

```php
protected $commands = [
    'App\Console\Commands\Inspire',

    # --- insert that ---
    LaravelSeed\Commands\Seeder::class
];
```

Publish your config file using command and go to your config folder.

```php
php artisan vendor:publish
```

## Add new source seeders.

To add new sources you have to enter command below
```bash
php artisan smart:seed create user,page,news
```
Each of the name have to be identical existent Eloquent model.

To run all created seeder sources enter
```bash
php artisan smart:seed run
```

## Set up configuration file

To add new providers go to app/seeds.php configuration file and add provider

```php
 'providers' => array(
        'yaml' => array(
            'path'   => config_path('seeds/yaml'),

            #enter an provider which will create an seed resource and rn
            'class'  => LaravelSeed\Providers\YamlProvider::class,

            #or add closure functions
            'run' => function() {
              // run all your migrations from provider path
            },

            'create' => function($source, $class) {
              // create an resource seed
            }
        )
    )
```

## Set up an default provider

To set up an default provider go to app/seeds.php

```php
  # enter an existing provider.
  'default' => 'yaml',
```

### License

Laravel smart seeder is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT)

gha_language: PHP


text:
Google Maps v2 Demo
===================

This code provides an example of how to use Google Maps v2 in an
Android application. The **SimpleMapDemo** project demonstrates the
basic features of Google Maps for Android v2. It requires the Google
Play Services client library, and it is designed to run on API 15
devices and later.

For an example of gathering location data,
see the [FusedLocationProvider](https://developer.xamarin.com/samples/monodroid/FusedLocationProvider/)
code example. (The **LocationDemo** project that was previously part of
**MapsAndLocationDemo\_v3** is obsolete and has been removed from the
solution.)

## Prerequisites

- The **SimpleMapDemo** sample uses Xamarin GooglePlayServices NuGets
  that are automatically downloaded when you build the project.

- You must also have the Google Play Client Services library installed
  in order to use the Component. You can install this by using the
  Android SDK Manager. This library is available under **Tools > Extras**:

    [ ![](Screenshots/sdk_manager-sml.png)](Screenshots/sdk_manager.png)

**Note:** The package name of your application should be all lower
case. Android is very particular and the Google Maps API will not
authenticate the API key property if the package name has mixed case.

Google Maps v2 API Key
----------------------

You must
[obtain a new API Key](https://developers.google.com/maps/documentation/android/start#the_google_maps_api_key)
for Google Maps v2. API keys from Google Maps v1 will not work.

The location of the debug.keystore file that Xamarin.Android uses
depends on your platform:

- **Windows**: `C:\Users\[USERNAME]\AppData\Local\Xamarin\Mono for Android\debug.keystore`
- **macOS** : `/Users/[USERNAME]/.local/share/Xamarin/Mono for Android/debug.keystore`

To obtain the SHA1 fingerprint of the debug keystore, you can use the
`keytool` command that is a part of the JDK. This is an example of
using `keytool` at the command-line:

    $ keytool -V -list -keystore debug.keystore -alias androiddebugkey -storepass android -keypass android

Adding the API Key to your application
--------------------------------------

The API key goes in your application's manifest, contained in the file
**Properties/AndroidManifest.xml**. From there, the Maps API reads the key
value and passes it to the Google Maps server, which then confirms that
you have access to Google Maps data.

In AndroidManifest.xml, add the following element as a child of the
`<application>` element, by inserting it just before the closing tag
`</application>`

    <application android:label="@string/app_name">

		<!-- Put your Google Maps V2 API Key here. This key will not work for you.-->

		<!-- See https://developers.google.com/maps/documentation/android/start#obtaining_an_api_key -->

		<meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="SAzaSyC1O8yQaNtuur4t5y6u7ZBPnYdVDgYKHtfA8" />

	</application>

Specifying additional permissions
---------------------------------

Besides permissions required by other parts of your application, you
must add the following permissions to AndroidManifest.xml in order to
use the Google Maps Android API:

	<!-- We need to be able to download map tiles and access Google Play Services-->

	<uses-permission android:name="android.permission.INTERNET" />

	<!-- Allow the application to access Google web-based services. -->

	<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />

	<!-- Google Maps for Android v2 will cache map tiles on external storage -->

	<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

	<!-- Google Maps for Android v2 needs this permission so that it may check the connection state as it must download data -->

	<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

	<!-- These are optional, but recommended. They will allow Maps to use the My Location provider. -->

	<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />

	<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />

Verifying Google Play Services installation on your device or emulator
----------------------------------------------------------------------

[Google Play Services](https://play.google.com/store/apps/details?id=com.google.android.gms)
must be installed on a device or emulator before Google Maps for
Android v2 will work.

Emulators using the
[Google APIs Add-On](https://developers.google.com/android/add-ons/google-apis/)
with API 17 and higher have Google Play Services included in the Google
APIs Add On.

Emulators not using the Google APIs Add-On images, *will not have
Google Play Services installed*. The appropriate APKs may be manually
installed into the emulator image, but installing Google Play Services
is beyond the scope of this example.

If the device does not have Google Play Services installed, you will
see a stack trace similar to the following:

	com.htc.autotest.dlib.RecordEngine in loader dalvik.system.DexClassLoader@4052ca48Loaded assembly: Mono.Android.Support.v4.dll [External]

	Google Play services is missing.
	Google Play services is missing.
	Google Play services is missing.
	Shutting down VM
	FATAL EXCEPTION: main
	java.lang.NoClassDefFoundError: com.google.android.gms.R$string
		at com.google.android.gms.common.GooglePlayServicesUtil.b(Unknown Source)
		at com.google.android.gms.internal.d.a(Unknown Source)
		at com.google.android.gms.internal.d.onCreateView(Unknown Source)
		at com.google.android.gms.maps.SupportMapFragment.onCreateView(Unknown Source)
		at android.support.v4.app.Fragment.performCreateView(Fragment.java:1460)
		at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:911)
		at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1088)
		at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:682)
		at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1444)
		at android.support.v4.app.FragmentActivity.onStart(FragmentActivity.java:551)
		at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1201)
		at android.app.Activity.performStart(Activity.java:3908)
		at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1794)
		at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1842)
		at android.app.ActivityThread.access$1500(ActivityThread.java:132)
		at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1038)
		at android.os.Handler.dispatchMessage(Handler.java:99)
		at android.os.Looper.loop(Looper.java:143)
		at android.app.ActivityThread.main(ActivityThread.java:4263)
		at java.lang.reflect.Method.invokeNative(Native Method)
		at java.lang.reflect.Method.invoke(Method.java:507)
		at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
		at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
		at dalvik.system.NativeStart.main(Native Method)
	Sending signal. PID: 19208 SIG: 9

# Troubleshooting

## AAPT.EXE location incorrect

Google changed the location of certain tools in r22 of the Android SDK
(release in mid-May, 2013), which may cause Xamarin.Android to report
this error. The forum post
[aapt.exe location incorrect](http://forums.xamarin.com/discussion/comment/15360/#Comment_15360)
contains some helpful advice for dealing with this issue.

## "does not implement inherited abstract member" compile error

This error is typically caused by a stale `google-play-services_lib`
directory – Ensure that you have an up-to-date version of the
Google Play Services library via the Android SDK manager, and ensure
that the Android Library project that your project is using is also up
to date. The forum post
[Google Maps v2 and "does not implement inherited abstract member" messages](http://forums.xamarin.com/discussion/5030/google-maps-v2-and-does-not-implement-inherited-abstract-member-messages)
will also be useful in troubleshooting this issue.

repository: adlair/monodroid-samples

repo_name: adlair/monodroid-samples


text:
[![Build Status](https://travis-ci.org/ajeydudhe/facile-ui-test.svg?branch=master)](https://travis-ci.org/ajeydudhe/facile-ui-test) [![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
# facile-ui-test - Library to test UI with mock http responses.
**facile-ui-test** can be used to write UI tests especially for Spring MVC projects. It uses [**BrowserMobProxy**](https://github.com/lightbody/browsermob-proxy) to complete the http request flow from the UI test => browser => http proxy => [**MockMvc**](https://docs.spring.io/spring/docs/current/spring-framework-reference/testing.html#spring-mvc-test-framework) => UI test. Additionally, you can use [**Mockito**](https://site.mockito.org/) to define the mock http responses.

![Workflow](facile-ui-test.png)

## Adding the library reference
Add the maven dependency to your pom.xml as follows:
```xml
<dependency>
    <groupId>org.expedientframework.uitest</groupId>
    <artifactId>facile-ui-test</artifactId>
    <version>1.0.0-M2</version>
</dependency>
```

## Usage for Spring MVC project
### Pre-requisite
Make sure that [**MockMvc**](https://docs.spring.io/spring/docs/current/spring-framework-reference/testing.html#spring-mvc-test-framework) setup is complete.
Refer [**AbstractPageTest.java**](/samples/spring-boot-web/src/test/java/org/expedientframework/uitest/AbstractPageTest.java)
### Create [**UiTestContext**](/core/src/main/java/org/expedientframework/uitest/core/UiTestContext.java)
```java
this.uiTestContext = new UiTestContext(this.mockMvc, "/myapp");
```
### Create WebDriver instance
Use the _**UiTestContext.getProxyPort()**_ method to set the proxy for the WebDriver as below:
```java
protected void createWebDriver(final UiTestContext uiTestContext) {

  if(this.webDriver != null) {

    this.webDriver.close();
  }

  final ChromeOptions chromeOptions = new ChromeOptions();

  chromeOptions.setHeadless(true);

  final String proxyAddress = "localhost:" + uiTestContext.getProxyPort();
  final Proxy proxy = new Proxy().setHttpProxy(proxyAddress).setSslProxy(proxyAddress);

  chromeOptions.setProxy(proxy);
  // Required to use proxy for localhost address
  chromeOptions.addArguments("--proxy-bypass-list=" + "<-loopback>");

  this.webDriver = new ChromeDriver(chromeOptions);
}
```
**Note:** Make sure to add _**--proxy-bypass-list=<-loopback>**_ argument so that the _**localhost**_ address is proxied.

### Mock the MVC controllers or other beans
In your test configuration create a bean for [_**MockInstanceBeanFactoryPostProcessor**_](/core/src/main/java/org/expedientframework/uitest/core/beans/MockInstanceBeanFactoryPostProcessor.java) as follows:
```java
@Configuration
public class TestConfiguration {

  @Bean
  public MockInstanceBeanFactoryPostProcessor mockInstanceBeanFactoryPostProcessor() {

    return new MockInstanceBeanFactoryPostProcessor(HelloWorldController.class,
                                                    StudentController.class);
  }
}
```
In the constructor for the bean provide the list of MVC controller or other bean classes which needs to be mocked. If your MVC controller to be mocked has other dependencies which needs to be mocked then provide those also here. Inject the mocked MVC controllers or other beans into your tests.
### Writing a test with mocked http response
```java
@Test
public void greet_usingUiTestContext_succeeds() {

  try (UiTestContext uiTestContext = new UiTestContext(this.mockMvc)) {

    // Using Mockitto we mock the response at the controller class level
    when(helloWorldController.greet("John")).thenReturn("Hello 'Blah' Dummy !!!");

    // Hook into http  request
    createWebDriver(uiTestContext.getProxyPort());

    this.webDriver.get("http://localhost/hello/greet/John");

    // Finally checking the response is mocked one
    assertThat(this.webDriver.getPageSource()).as("Hello message").isEqualTo("<html><head></head><body>Hello 'Blah' Dummy !!!</body></html>");
  }
}
```
* First we are creating the _**UiTestContext**_ instance.
* Next using _**Mockito**_ we define that _**helloWorldController.greet()**_ when called with parameter as _**John**_ should return value as _**"Hello 'Blah' Dummy !!!"**_.
* Next we are creating the _**WebDriver**_ instance using the http proxy port.
* Then we load the web page using _**this.webDriver.get("http://localhost/hello/greet/John");**_
* Finally, we verify that we are getting the mock response.

As seen above the entire web page is getting loaded as is in the browser but only the http response is getting mocked using _**Mockito**_.

## Usage for non-Spring MVC project e.g. ExpressJS
Above example suffices when you have the Spring MVC project. But what if you have created a web application using, say, ExpressJS. For such project you can create a separate Java project for writing the test. Refer _**/samples/external-server/expressjs-tests**_.
Here, the setup is similar to above except that we need to:
* Start the external web server in another project.
* Mock only the required http calls while other calls should go to the server.
### Sample test case
Following is a sample test case [**StudentDetailsPageTestIT**](/samples/external-server/expressjs-tests/src/test/java/org/expedientframework/uitest/StudentDetailsPageTestIT.java)
```java
@ContextConfiguration(classes = TestConfiguration.class)
public class StudentDetailsPageTestIT extends AbstractTestNGSpringContextTests {

  @Test
  public void getStudentByID_studentExists_displaysDetails() {

    final MockMvc mockMvc = MockMvcBuilders.standaloneSetup(this.studentController).build();

    WebDriver webDriver = null;
    try(UiTestContext uiTestContext = new UiTestContext(mockMvc)) {

      uiTestContext.shouldMock((method, url, headers) -> url.contains("/api/"));

      webDriver = createWebDriver(uiTestContext.getProxyPort());

      final String studentId = "MyStudent" + UUID.randomUUID().toString();
      final Student mockedStudent = createStudent("Mocked-" + UUID.randomUUID().toString());

      when(studentController.student(studentId)).thenReturn(mockedStudent);

      webDriver.get("http://localhost:8080/students/" + studentId);

      TestUtils.waitForAjaxCalls(webDriver);

      final StudentDetailsPage studentPage = PageFactory.initElements(webDriver, StudentDetailsPage.class);

      LOG.info("Page Source: {}{}", System.getProperty("line.separator"), webDriver.getPageSource());

      // Welcome message is not mocked so should be as per stidentID passed.
      assertThat(studentPage.getWelcomeMessage()).as("Welcome Message").isEqualTo("Welcome " + studentId);

      // Below all is mocked so should match mockedStudent
      assertThat(studentPage.getStudentId()).as("Student ID").isEqualTo(mockedStudent.getStudentId());
      assertThat(studentPage.getFirstName()).as("First Name").isEqualTo(mockedStudent.getFirstName());
      assertThat(studentPage.getLastName()).as("Last Name").isEqualTo(mockedStudent.getLastName());
      assertThat(studentPage.getAge()).as("Age").isEqualTo(mockedStudent.getAge());
    } finally {

      if(webDriver != null) {

        webDriver.close();
      }
    }
  }

  //... Few line omitted...

  private static Student createStudent(final String studentId) {

    final Student student = new Student();

    student.setStudentId(studentId);
    student.setFirstName(studentId + "-firstName");
    student.setLastName(studentId + "-lastName");
    student.setAge(12);

    return student;
  }

  @Autowired
  private StudentController studentController;
  private static final Logger LOG = LoggerFactory.getLogger(StudentDetailsPageTestIT.class);
}
```
* The _**@ContextConfiguration(classes = TestConfiguration.class)**_ on the test class is used to initialized the mock controllers as mentioned in [Mock the MVC controllers or other beans](#mock-the-mvc-controllers-or-other-beans)
* At the start of the test we create the **MockMvc** instance using the MVC controller we are going to mock.
    ```java
    final MockMvc mockMvc = MockMvcBuilders.standaloneSetup(this.studentController).build();
    ```
* We create the _**UiTestContext**_ instance and define that only the urls containing _**/api/**_ needs to be mocked.
  ```java
  uiTestContext.shouldMock((method, url, headers) -> url.contains("/api/"));
  ```
* We then create and initialize the **webDriver** instance as mentioned in [**Create WebDriver instance**](#create-webdriver-instance)
  ```java
  webDriver = createWebDriver(uiTestContext.getProxyPort());
  ```
* In our sample app. we request a student details passing in the student id in url and on page load make a REST call to fetch the student details.
* For our test we are going to load this page and mock the REST call to return mocked data.
* Below we use random studenId value and also a random mocked student object.
  ```java
  final String studentId = "MyStudent" + UUID.randomUUID().toString();
  final Student mockedStudent = createStudent("Mocked-" + UUID.randomUUID().toString());
  ```
* We define the mock behavior as below. It implies that we should return the _**mockedStudent**_ instance when the controller methods is called.
  ```java
  when(studentController.student(studentId)).thenReturn(mockedStudent);
  ```
* Now, we load the web page using _**webDriver**_.
  ```java
  webDriver.get("http://localhost:8080/students/" + studentId);
  ```
* Once loaded we get the Page object.
* Now, we start the validation.
* First on the web page there is a message for the student as "Welcome <studentId>".
* We validate that this message is formed using the studentId passed in the page url.
  ```java
  assertThat(studentPage.getWelcomeMessage()).as("Welcome Message").isEqualTo("Welcome " + studentId);
  ```
* Now, below is the validation to make sure the REST request returned the _**mockedStudent**_ instance which has different studentId than the one we used in loading the page. The values on the page are retrieved using [**StudentDetailsPage**](/samples/external-server/expressjs-tests/src/test/java/org/expedientframework/uitest/StudentDetailsPage.java).
  ```java
  assertThat(studentPage.getStudentId()).as("Student ID").isEqualTo(mockedStudent.getStudentId());
  assertThat(studentPage.getFirstName()).as("First Name").isEqualTo(mockedStudent.getFirstName());
  assertThat(studentPage.getLastName()).as("Last Name").isEqualTo(mockedStudent.getLastName());
  assertThat(studentPage.getAge()).as("Age").isEqualTo(mockedStudent.getAge());
  ```

## Open items
* Handle all request types e.g. form upload etc.

repository: ajeydudhe/facile-ui-test

gha_language: Java

repo_name: ajeydudhe/facile-ui-test


text:
ASP.NET v5 Homebrew Tap
=======================

[Homebrew](http://brew.sh/) formulae for installing ASP.NET 5 in OS X.

This project is part of ASP.NET 5. You can find samples, documentation and getting started instructions for ASP.NET 5 at the [Home](https://github.com/aspnet/home) repo.

To install, first 'tap' the repository using the following command:

```
brew tap aspnet/k
```

Then, you can install the `kvm` script using the following command:

```
brew install kvm
```

Finally you can use the `kvm` script to install the latest runtime using the following command:

```
kvm upgrade
```

See the [Home](https://github.com/aspnet/home) repo for more information!

repository: jadiaz/homebrew-k

repo_name: jadiaz/homebrew-k


text:
## Goals
This project has some basic goals and pull requests should align with these goals while solving problems and issues.

 - Core hypermedia support should be separate to formatting concerns. Ideally the base hypermedia concerns will be pulled out so it can be reused to create a Collection+JSON formatter or other hypermedia formats.
 - This library should not be tied to a framework or system.Web. Integration with frameworks like MVC, WebAPI and Nancy will be done in different libraries built on top of this library.

## Contributing
 - Keep your pull requests related to a single problem or issue.
 - Master should always be deployable to NuGet
 - We follow Semantic Versioning (SemVer.org).
 - We follow standard [GitHubFlow](https://guides.github.com/introduction/flow/index.html)

 ## Builds
 TODO - Setup CI and deploy to NuGet build

repository: DotNetHypermedia/DotNetHypermedia

repo_name: DotNetHypermedia/DotNetHypermedia


text:
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements.  See the NOTICE file
distributed with this work for additional information
regarding copyright ownership.  The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License.  You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied.  See the License for the
specific language governing permissions and limitations
under the License.
-->

# Labs

1. [Filtering a Stream (Ride Cleansing)](ride-cleansing)
1. [Stateful Enrichment (Rides and Fares)](rides-and-fares)
1. [Windowed Analytics (Hourly Tips)](hourly-tips)
   - [Exercise](hourly-tips/README.md)
   - [Discussion](hourly-tips/DISCUSSION.md)
1. [`ProcessFunction` and Timers (Long Ride Alerts)](long-ride-alerts)
   - [Exercise](long-ride-alerts/README.md)
   - [Discussion](long-ride-alerts/DISCUSSION.md)
1. [Tuning & Troubleshooting Labs](troubleshooting)


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

# WsLargeDataIO
---

This is the basic readme for this module. Include any usage or deployment instructions and links to other documentation here.

### Release Notes

#### 0.0.4
- Update Java to OpenJDK 8 to enable TLS1.2

#### 0.0.3
- Fix SSL cert issue
- Make Auth environment configurable
- Updated tests with a valid test object

#### 0.0.2
- Added provenance information to saved objects

repository: kbaseapps/WsLargeDataIO

repo_name: kbaseapps/WsLargeDataIO


text:
<!-- Summary of changes above here -->

## Ticket
<!-- Paste the url for the jira task/bug or Github issue here -->

## How Has This Been Verified?
<!--- Please describe in detail how you tested your changes. -->

## Checklist:
<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
- [ ] The change works as expected.
- [ ] New code can be debugged via logs.
- [ ] I have added tests to cover my changes.
- [ ] I have locally run the tests and all new and existing tests passed.
- [ ] Requires updates to the documentation.
- [ ] I have made the required changes to the documents.

repository: socialsky-io/openapi-generator-go

repo_name: socialsky-io/openapi-generator-go


text:
# Jenkins docker image

Tested with 2.235.2

To build:
```
docker build -t ace-jenkins-server .
```
Running the container:
```
 docker run --rm -ti -p 18080:8080 -p 40000:50000 -v /Development/tdolby/public-jenkins_home:/var/jenkins_home --privileged -v /var/run/docker.sock:/var/run/docker.sock ace-jenkins-server
```
Set an admin password, then install the "Blue Ocean" plugin (Manage Jenkins -> Manage Plugins) and optionally the "Test Results Analyzer" plugin for easier viewing of JUnit results.

The Jenkins docker container will be able to run docker commands on the host, which is how the "docker build" commands in the pipeline work. In anything other than a demo environment, other ways of building would be preferred (kaniko or equivalent) to avoid the Jenkins container having so much power.

## Credentials

Need CT_JDBC and IBMCLOUD_APIKEY for actual pipeline, and a GitHub API key for Blue Ocean to run the pipeline.

## Working setup for initial demo environment

For reference, the initial setup included

- Jenkins running in a container and accessible on kenya.hursley.uk.ibm.com:18080
- DB2 also running on kenya.hursley.uk.ibm.com:50000
- uk.icr.io/ace-registry as the IBM Cloud registry
- aceCluster running in Dallas (us-south) for the preprod tests
- local registry for ace-minimal:<IP_ADDRESS>-alpine built from https://github.com/ot4i/ace-docker/tree/master/experimental/ace-minimal

Jenkins credentials viewed from build page:

![credentials](jenkins-creds.png)

Jenkins classic (as opposed to Blue Ocean) view of the build:

![demo in Jenkins](jenkins-view-of-demo.png)

Jenkins Blue Ocean plugin installed after initial server start:

![plugin](blue-ocean-plugin.png)


text:
# p4-apps
This repo provides basic P4_16 library to ease development of future P4 applications.
All applications are complient with the BMv2.

# Folders:
## Parsers
The parser folder contains some standard packet parsers.

# list of files
## headers.p4
Contains a list of standard header types

## IPv4TCP.p4
Standard eth, IPv4, TCP stack.

## 5Protocols.p4
Standard ethernet, IPv6, IPv4, UDP, TCP.