text:
# DPC Client

dpcclient is an executable Go command line program that helps you explore the Data at the Point of Care API before writing your own code. It follows the guidelines described in the [DPC Documentation](https://dpc.cms.gov/docs).

This project contains executable files for Macs and Windows 10 machines. If you have go 1.11 or better installed, you can also build the code yourself with the following commands. *Note*: In Go 1.11 and 1.12, first ensure that the environment variable `GO111MODULE` is set to `on`. You can do this by running `go env -w GO111MODULE=on`.

```
go get -u github.com/gbrlsnchs/jwt/v3
go build
```

To build a Windows executable:

```
env GOOS=windows GOARCH=amd64 go build
```

The remainder of this document focuses on using the tool.

# Using DPC Client

While describing dpcclient commands below, we will refer to sections of that documentation. The code itself also cites the documentation it is following.

For convenience, the steps required for engaging with the open sandbox are as follows:

1. Complete [this form](https://dpc.cms.gov/users/sign_up) to request access. After you receive a reply email welcoming you to DPC, continue with the following steps.
1. Log in to the web UI
1. You should see two things you can do: generate client tokens and upload public keys. If you do not see these options, an admin needs to complete setup on your account.
1. Generate a client token
   1. Copy and paste the screen display of the token into a file to save it
   1. You will not be able to see it again via the DPC UI, and the DPC team cannot recover it
   1. If you lose a client token, the only recovery is to generate a new one
   1. If you lose a client token, you should ask the DPC team to revoke that token
1. Upload a public key
   1. dpcclient can generate the public key you will need; see the `genKey` command
   1. Note the ID assigned to your public key; you will need it to get access tokens
1. To make an API request, you need an access token. To get an access token, you first need to generate an auth token.
   1. Documentation: [Authentication and Authorization](https://dpc.cms.gov/docs#authentication-and-authorization)
   1. dpcclient can generate the signed JWT you need; see the `genAuthToken` command
1. Make a request to the `/Token/auth` endpoint containing a correctly formed JWT, receiving an **access token** in response
   1. An **access token** expires after 5 minutes, so an application (or you whilst exploring the API) will need to repeat this step every 5 minutes
   1. For each request to the `/Token/auth` endpoint, you will also need to generate a new auth token as described in the previous step
   1. dpcclient can do this for you; see the `genAccessToken` command
1. Make a request to an application endpoint, using the access token generated in the previous step as a `Bearer` token.
   1. dpcclient does not make API endpoint requests (yet), so these have to be done with cURL, Postman, or a similar tool.

 # Commands

The general form of a dpcclient command is

`dpcclient [command] [args] [flags]`.

The command name is required. Commands that produce artifacts require a name for the artifact. (Yes, all current dpcclient commands produce artifacts.) Commands append additional information to the name you provide to produce the final name for their artifact. Each command describes how it uses the name you provide in the final name for the artifact it produces.

Help will always be given to those who ask for it like so: `dpcclient --help` or `dpcclient -h`. Help for a specific command is also available: `dpcclient genAuthToken -h`.

The following flags are global to dpcclient; all dpcclient commands understand them:

Flag           | Use
-------------- | ----
-k, --keydir   | the local directory where dpcclient stores keys it generates and looks for macaroons
-t, --tokendir | the local directory where dpcclient stores both auth and access tokens it generates
          | _Note that if values for keydir or tokendir are not specified, dpcclient will store and look for files in the current directory._
 _In addition, you can use a .dpcclient.yaml in your home directory to set the keydir and tokendir values._

Some dpcclient commands have additional flags, as follows:

Flag           | Use
-------------- | ----
-K, --keyname  | the PKI key name prefix provided by the user. dpcclient combines `-private.pem` with the key prefix for the private key file it generates, and `-public.pem` with the key prefix for the public key file it generates.
-I, --kid      | the ID DPC assigned to the public key you uploaded to it
-M, --macaroon | the name of a file containing the DPC **client token** (macaroon). dpcclient assumes the macaroon file is in the keydir. If it can't find it there, it will look in the current directory. If it can't find it there, it will complain and exit.

Command documentation is provided below. The help message provided by the executable should always be considered current if it happens to conflict with this documentation.

Command | Example
------- | -------
genKey | `dpcclient genKey myDPCSandboxKey -k ./keys`

Generates a correctly-sized RSA private key and its public key mate, saving them as .pem files in the indicated directory. Files are named by appending `-private.pem` or `-public.pem` to the name argument. For the example command, dpcclient would generate files named `myDPCSandboxKey-private.pem` and `myDPCSandboxKey-public.pem` in a directory named 'keys'.
genAuthToken | `dpcclient genAuthToken myDPCSandboxAuthToken -k ./keys -K myDPCSandboxKey -I <uuid> -M myDPCSandboxMacaroon -t ./tokens`

 Generates a signed JWT required to obtain an **access token**, saving it in the tokens directory. The file is named by appending `-<unix timestamp>.jwt` to the name argument. The auth token file resulting from the example command would be named `myDPCAuthToken-1577976362.jwt` Unix timestamps are discussed [here](https://www.unixtimestamp.com).
getAccessToken | `dpcclient getAccessToken myDPCSandboxAccessToken -t ./tokens -A myDPCSandboxAuthToken-1577976362`

 Sends a request to the DPC API /Token endpoint, receiving an access token in response. If the API responds with a 200, dpcclient will save the access token to a file named by the -T argument with `-<unix timestamp>.jwt` appended to it. If an error occurs, dpcclient will echo the error message to the terminal before exiting.

# All the Things

To illustrate the use of dpcclient, we include this walkthrough of the author using it.

Build executable:

```
go build
```

Make output directories:

```
mkdir out/keys
mkdir out/tokens
```

Create a .dpcclient.yaml file in my home directory:

```
touch ~/.dpcclient.yaml
```

Add these lines to it:

```
keydir: ./out/keys
tokendir: ./out/tokens
```

Generate a key pair:

```
dpcclient genKey happySandbox
ls -l ./out/keys
```

Upload the public key in the web UI, noting the ID assigned to it.
Get a client token from the web UI.
Save the client token (macaroon) in the ./out/keys directory

Generate an auth token and see it in the location I specified in the config file:

```
dpcclient genAuthToken happySandboxAuthToken -K happySandbox -I b3f7d972-9a91-432c-95b3-fabd085a2280 -M happySandboxMacaroon
ls -l ./out/tokens
```

Generate an access token and see it in the location I specified in the config file:

```
dpcclient getAccessToken happySandboxAccessToken -A happySandboxAuthToken-1585516859
ls -l ./out/tokens
```

Use the access token in a cURL request to the API:
```
curl --location --request GET 'http://sandbox.dpc.cms.gov/api/v1/Group' \
--header 'Accept: application/fhir+json' \
--header 'Prefer: respond-async' \
--header 'Authorization: Bearer <paste token here>'
```

Expected response:

```
{
    "resourceType": "Bundle",
    "type": "searchset",
    "total": 0
}
```

repository: CMSgov/dpc-app

gha_language: Java

repo_name: CMSgov/dpc-app


text:
# azure_devops_sdk.model.ApprovalOptions

## Load the model package
```dart
import 'package:azure_devops_sdk/api.dart';
```

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**autoTriggeredAndPreviousEnvironmentApprovedCanBeSkipped** | **bool** | Specify whether the approval can be skipped if the same approver approved the previous stage. | [optional] [default to null]
**enforceIdentityRevalidation** | **bool** | Specify whether revalidate identity of approver before completing the approval. | [optional] [default to null]
**executionOrder** | **String** | Approvals execution order. | [optional] [default to null]
**releaseCreatorCanBeApprover** | **bool** | Specify whether the user requesting a release or deployment should allow to approver. | [optional] [default to null]
**requiredApproverCount** | **int** | The number of approvals required to move release forward. '0' means all approvals required. | [optional] [default to null]
**timeoutInMinutes** | **int** | Approval timeout. Approval default timeout is 30 days. Maximum allowed timeout is 365 days. '0' means default timeout i.e 30 days. | [optional] [default to null]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

license: MIT

branch_name: refs/heads/master

extension: md

license_type: permissive


text:
# Ayame Providers
This repository contains database providers for use with the [Ayame Framework](https://github.com/ayamejs/ayame)

Simply copy over the provider you are interested in into your project's `providers` directory.

The files can contain additional comments for more instructions and tips.

Feel free to contribute more providers or open an issue suggesting them.

## License
All the providers here are released for free under the terms of the [MIT License](LICENSE)

repository: ayamejs/providers

repo_name: ayamejs/providers


text:
---
title: influxdb.api() function
description: >
  `influxdb.api()` submits an HTTP request to the specified InfluxDB API path and returns a
  record containing the HTTP status code, response headers, and the response body.
menu:
  flux_0_x_ref:
    name: influxdb.api
    parent: experimental/influxdb
    identifier: experimental/influxdb/api
weight: 201
---

<!------------------------------------------------------------------------------

IMPORTANT: This page was generated from comments in the Flux source code. Any
edits made directly to this page will be overwritten the next time the
documentation is generated.

To make updates to this documentation, update the function comments above the
function definition in the Flux source code:

https://github.com/influxdata/flux/blob/master/stdlib/experimental/influxdb/influxdb.flux#L66-L75

Contributing to Flux: https://github.com/influxdata/flux#contributing
Fluxdoc syntax: https://github.com/influxdata/flux/blob/master/docs/fluxdoc.md

------------------------------------------------------------------------------->

`influxdb.api()` submits an HTTP request to the specified InfluxDB API path and returns a
record containing the HTTP status code, response headers, and the response body.

**Note**: `influxdb.api()` uses the authorization of the specified `token` or, if executed
from the InfluxDB UI, the authorization of the InfluxDB user that invokes the script.
Authorization permissions and limits apply to each request.

## Response format
`influxdb.api()` returns a record with the following properties:

- **statusCode**: HTTP status code returned by the GET request (int).
- **headers**: HTTP response headers (dict).
- **body**: HTTP response body (bytes).

##### Function type signature

```js
(
    method: string,
    path: string,
    ?body: bytes,
    ?headers: [string:string],
    ?host: string,
    ?query: [string:string],
    ?timeout: duration,
    ?token: string,
) => {statusCode: int, headers: [string:string], body: bytes}
```

{{% caption %}}For more information, see [Function type signatures](/flux/v0.x/function-type-signatures/).{{% /caption %}}

## Parameters

### method
({{< req >}})
HTTP request method.

### path
({{< req >}})
InfluxDB API path.

### host

InfluxDB host URL _(Required when executed outside of InfluxDB)_.
Default is `""`.

### token

[InfluxDB API token](/influxdb/cloud/security/tokens/)
_(Required when executed outside of InfluxDB)_.
Default is `""`.

### headers

HTTP request headers.

### query

URL query parameters.

### timeout

HTTP request timeout. Default is `30s`.

### body

HTTP request body as bytes.

## Examples

- [Retrieve the health of an InfluxDB OSS instance](#retrieve-the-health-of-an-influxdb-oss-instance)
- [Create a bucket through the InfluxDB Cloud API](#create-a-bucket-through-the-influxdb-cloud-api)

### Retrieve the health of an InfluxDB OSS instance

```js
import "experimental/influxdb"
import "influxdata/influxdb/secrets"

token = secrets.get(key: "INFLUX_TOKEN")

response = influxdb.api(method: "get", path: "/health", host: "http://localhost:8086", token: token)

string(v: response.body)

```

### Create a bucket through the InfluxDB Cloud API

```js
import "experimental/influxdb"
import "json"
import "influxdata/influxdb/secrets"

token = secrets.get(key: "INFLUX_TOKEN")

influxdb.api(
    method: "post",
    path: "/api/v2/buckets",
    host: "https://us-west-2-1.aws.cloud2.influxdata.com",
    token: token,
    body:
        json.encode(
            v: {
                name: "example-bucket",
                description: "This is an example bucket.",
                orgID: "x000X0x0xx0X00x0",
                retentionRules: [],
            },
        ),
)

```

gha_license_id: MIT


text:
# Chocolatey

First release to github using tools in parent directory and then use `build.ps1` with version tag:

    build.ps1 v<IP_ADDRESS>2

This will create [chocolatey](https://chocolatey.org/) `.nupkg` file.


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

### Description

enter.asp in Mini-Nuke 2.3 and earlier makes it easier for remote attackers to conduct password guessing attacks by setting the guvenlik parameter to the same value as the hidden gguvenlik parameter, which bypasses a verification step because the gguvenlik parameter is assumed to be immutable by the attacker.

### POC

#### Reference
- http://www.nukedx.com/?getxpl=31
- http://www.nukedx.com/?viewdoc=31

#### Github
No PoCs found on GitHub currently.

repository: trickest/cve

branch_name: refs/heads/main

gha_language: HTML

repo_name: trickest/cve


text:
# Happy or Not

This project is a demo to show how to use https://www.microsoft.com/cognitive-services.  You will need to obtain a key for the Emotion API [here](https://www.microsoft.com/cognitive-services/en-US/subscriptions).

## Setup
### Use Docker (https://www.docker.com/)
1. Clone this repo and move into folder: ```CD happy-image-tester-django```
2. Add environemnt variable with your Cognitive Services key to your current console session:
    mac: ```export OXFORD_KEY=<yourkey>```
    windows: ```set "OXFORD_KEY=<yourkey>"```
3. Run ```docker-compose -f ./docker-compose.debug.yml up``` from same session
4. Browse to the website: open favorite browser to <IP_ADDRESS>:8000
5. Use sample images to upload a file

### Without docker
This project can be [Setup on Windows](#setup-windows) or [Mac](#setup-mac).  You will need to add the Emotion API key to your environment variables (see below on how to do that for local environment).

#### Setup Windows
1. [Install Python 3.5 or greater](https://www.python.org/downloads/) (it will work with 2.7 if you want to use it)
2. Open command prompt and Clone this repo
3. Move into cloned repo folder: ```CD happy-image-tester-django```
4. Create a virtual environment: ```c:\python34\python.exe -m venv env```  (your path to Python may vary)
5. Install library requirements: ```env\scripts\pip install -r requirements.txt```
6. Open the file ```env\scripts\activation.bat```
7. At the end of the file before ```:END``` add  ```set "OXFORD_KEY=<yourkey>"``` and save file.
8. Activate Virtual Environment: ```env\Scripts\activate.bat```
9. Start development server: ```env\scripts\python manage.py runserver```
10. Browse to the website: open favorite browser to <IP_ADDRESS>:8000
11. Use sample images to upload a file.

When done with development de-activate virtual environment with ```env\Scripts\deactivate.bat```

#### Setup Mac
1. [Install Python 3.5 or greater](https://www.python.org/downloads/) (it will work with 2.7 if you want to use it)
2. Open command prompt and Clone this repo
3. Move into cloned repo folder: ```CD happy-image-tester-django```
4. Create a virtual environment: ```python3 -m venv env```
5. Install library requirements: ```env/bin/pip install -r requirements.txt```
6. Open the file ```env/bin/activate``` in your favorite text editor
7. At the middle of the file, after  ```EXPORT PATH``` add  ```export "OXFORD_KEY=<yourkey>"``` and save file.
8. Activate Virtual Environment: ```source env/bin/activate```
9. Start development server: ```env/bin/python manage.py runserver```
10. Browse to the website: open favorite browser to <IP_ADDRESS>:8000
11. Use sample images to upload a file.

When down with development de-activate virtual Environment with ```deactivate```

repository: dacoppet/happy-image-tester-django

repo_name: dacoppet/happy-image-tester-django


text:
# SIG mentions dashboard

Links:
- Postgres SQL file: [sig_mentions.sql](https://github.com/cncf/devstats/blob/master/metrics/kubernetes/sig_mentions.sql).
- Series definition: [metrics.yaml](https://github.com/cncf/devstats/blob/master/metrics/kubernetes/metrics.yaml#L246-L252).
- Grafana dashboard JSON: [sig_mentions.json](https://github.com/cncf/devstats/blob/master/grafana/dashboards/kubernetes/sig_mentions.json).
- User documentation: [sig_mentions.md](https://github.com/cncf/devstats/blob/master/docs/dashboards/kubernetes/sig_mentions.md).
- Production version: [view](https://k8s.devstats.cncf.io/d/41/sig-mentions?orgId=1).
- Test version: [view](https://k8s.teststats.cncf.io/d/41/sig-mentions?orgId=1).

# Description

- We're quering `gha_texts` table. It contains all 'texts' from all Kubernetes repositories.
- For more information about `gha_texts` table please check: [docs/tables/gha_texts.md](https://github.com/cncf/devstats/blob/master/docs/tables/gha_texts.md).
- We're counting distinct GitHub events (text related events: issue/PR/commit comments, PR reviews, issue/PR body texts, titles) that contain any SIG reference.
- We're groupping this by SIG.
- Regexp to match SIG is: `(?i)(?:^|\s)+(@kubernetes/sig-[\w\d-]+)(?:-bug|-feature-request|-pr-review|-api-review|-misc|-proposal|-design-proposal|-test-failure)s?(?:$|[^\w\d-]+)` with `(?i)(?:^|\s)+(@kubernetes/sig-[\w\d-]*[\w\d]+)(?:$|[^\w\d-]+)` fallback.
- Example sig mentions: `@kubernetes/sig-node-bug`, `@Kubernetes/sig-apps`.
- We're only looking for texts created between `{{from}}` and `{{to}}` dates. Values for `from` and `to` will be replaced with final periods described later.
- We're also excluding bots activity (see [excluding bots](https://github.com/cncf/devstats/blob/master/docs/excluding_bots.md))
- Each row returns single value, so the metric type is: `multi_row_single_column`.
- Each row is in the format column 1: `sig_mentions_texts,SIGName`, column 2: `NumberOfSIGMentions`.
- This metric uses `multi_value: true`, so each SIG is saved under different column name in a TSDB series.

# Periods and time series

Metric usage is defined in metric.yaml as follows:
```
series_name_or_func: multi_row_single_column
sql: sig_mentions
periods: d,w,m,q,y
aggregate: 1,7
skip: w7,m7,q7,y7
multi_value: true
```
- It means that we should call Postgres metric [sig_mentions.sql](https://github.com/cncf/devstats/blob/master/metrics/kubernetes/sig_mentions.sql).
- We should expect multiple rows each with 2 columns: 1st defines output series name, 2nd defines value.
- See [here](https://github.com/cncf/devstats/blob/master/docs/periods.md) for periods definitions.
- The final series name would be: `sig_mentions_texts_[[period]]`. Where `[[period]]` will be from d,w,m,q,y,d7.
- Each of those series (for example `sig_mentions_texts_d7`) will contain multiple columns (each column represent single SIG) with time series data.
- Final query is here: [sig_mentions.json](https://github.com/cncf/devstats/blob/master/grafana/dashboards/kubernetes/sig_mentions.json#L117): `SELECT /^[[sigs]]$/ FROM \"sig_mentions_texts_[[period]]\" WHERE $timeFilter`.
- `$timeFiler` value comes from Grafana date range selector. It is handled by Grafana internally.
- `[[period]]` comes from Variable definition in dashboard JSON: [sig_mentions.json](https://github.com/cncf/devstats/blob/master/grafana/dashboards/kubernetes/sig_mentions.json#L184-L225).
- `[[sigs]]` comes from Variable definition in dashboard JSON: [sig_mentions.json](https://github.com/cncf/devstats/blob/master/grafana/dashboards/kubernetes/sig_mentions.json#L230-L248).
- Note that this is a multi value select and reqexp part `/^[[sigs]]$/` means that we want to see all values currently selected from the drop-down.
- SIGs come from the tags: `SHOW TAG VALUES WITH KEY = sig_mentions_texts_name`, this tag is defined here: [tags.yaml](https://github.com/cncf/devstats/blob/master/metrics/kubernetes/tags.yaml#L44).
- For more informations about tags check [here](https://github.com/cncf/devstats/blob/master/docs/tags.md).
- Releases comes from Grafana annotations: [sig_mentions.json](https://github.com/cncf/devstats/blob/master/grafana/dashboards/kubernetes/sig_mentions.json#L43-L55).
- For more details about annotations check [here](https://github.com/cncf/devstats/blob/master/docs/annotations.md).
- Project name is customized per project, it uses `[[full_name]]` template variable [definition](https://github.com/cncf/devstats/blob/master/grafana/dashboards/kubernetes/sig_mentions.json#L251-L268) and is [used as project name](https://github.com/cncf/devstats/blob/master/grafana/dashboards/kubernetes/sig_mentions.json#L54).
- Per project variables are defined using `vars` tools, more info [here](https://github.com/cncf/devstats/blob/master/docs/vars.md).

repository: cncf/devstats

gha_language: Shell

repo_name: cncf/devstats


text:
---
title: Hahn echo
sidebar_label: Hahn echo
slug: ./
id: index
---

This tutorial presents a practical use of QUA to run a well known experiment known as the Hahn echo sequence.
#  Description of experiment
## Introduction

" Electron spin resonance (ESR) and nuclear magnetic resonance (NMR) are used in diverse branches of science, ranging from spectroscopic studies in biochemistry and materials science to imaging of internal organs in medicine.
In NMR and ESR, an ensemble of spins is typically placed within a resonator, controlled by the application of resonant pulses, and measured via emission of signals into a resonator mode. As the spin ensembles are typically inhomogeneous, a common solution is to use control pulses which refocus inhomogeneous interactions, reversing the time evolution of different spin packets to produce a spin echo or ‘Hahn echo’. "

Source : Mølmer et al., Self-stimulated pulse echo trains from inhomogeneously broadened spin ensembles(https://arxiv.org/pdf/2004.01116.pdf)

## Hahn echo sequence
![](https://upload.wikimedia.org/wikipedia/commons/thumb/9/99/SpinEcho_GWM_stills.jpg/1280px-SpinEcho_GWM_stills.jpg)
Source: Gavin Morley, Wikipedia page "Spin echo" (https://en.wikipedia.org/wiki/Spin_echo)

The Hahn echo sequence can be summarized as follows (when working in the rotating frame of the qubit):
1. Apply a $$\pi/2$$-pulse
2. Wait a certain time duration (echo time)
3. Apply a $$\pi$$-pulse
4. Wait again for echo, the relaxation time gives a good indication of the $$T_2$$ relaxation
5. Optional: Apply again a $$\pi/2$$-pulse to come back to the z-axis of the Bloch sphere for deduction of $$T_1$$
6. Readout of the qubit

## Describing the QUA program
### The configuration file

The configuration file is composed of the following items :

- controllers :
We define the outputs and inputs of the OPX device, which will be of use for the experiment. In this case, we have two analog outputs for the qubit, and two others for its coupled readout resonator. We add an analog input which is the channel where will be sampled out the analog results of the readout operation.
- elements :
This defines the set of essential components of the quantum system interacting with the OPX. In this case, the two elements are the qubit and the coupled readout resonator.
Here are specified the main characteristics of the element, such as its resonant frequency, its associated operations (i.e the operations the OPX can apply on the element).
- pulses :
A description of the doable pulses introduced in the elements. Here is provided a description of the default pulse duration (length parameter), the associated waveform (which can be taken from an arbitrary array), the type of operation (e.g control or measurement)
- waveforms :
Specification of the pulse shape based on pre-built arrays (either by the user in case the shape is arbitrary, or constant pulse otherwise)
- Integration weights :
Describe the demodulation process of the data

### The QUA program
The goal of the program is to find the echo time for which the qubit's relaxation process is complete. We then perform a for_ iteration over a set of possible times (within an interval named as t_vec) and perform the Hahn echo sequence. We then retrieve the results using measurement features of QUA (here embedded into the function readout_QUA) and use plot tools to determine the echo time.

```python
with for_(tau, 4, tau < taumax, tau + dtau):
        with for_(n, 0, n < NAVG, n + 1):
            Hadamard("qubit")
            wait(tau, "qubit")
            Rx(π, "qubit")
            wait(tau, "qubit")
            Hadamard("qubit")
            align("rr", "qubit")
            measure_and_save_state("rr")
            wait(recovery_delay // 4, "qubit")
```

## Script

[download script](hahn_echo.py)

repository: qua-platform/qua-libs

gha_language: Python

repo_name: qua-platform/qua-libs


text:
# OpenJS Foundation Standards Working Group Meeting 2021-08-24

## Links

* **Recording**: Session was not recorded
* **GitHub Issue**: $GITHUB_ISSUE$

## Present

* OpenJS Foundation Cross Project Council
* OpenJS Foundation Project Maintainers
* OpenJS Foundation Board of Directors

Jordan Harband
Sonal Bhoraniya
Richard Gibson
Hemanth HM
Jory Burson
Mike Samuel

## Agenda

### Announcements

TC39 meeting next week!

*Extracted from **cross-project-council-agenda** labeled issues and pull requests from the **openjs-foundation org** prior to the meeting.

### openjs-foundation/standards

* Document Delegates & Delegate Approval Process [#142](https://github.com/openjs-foundation/standards/issues/142)

https://docs.google.com/document/d/1vnYJFnVB3wHsIRWNiLnes48PgDgkuaxCqdlJFg-RdO4/edit

TPAC - next time

## Q&A, Other

## Upcoming Meetings

* **Calendar**: <https://calendar.openjsf.org>

Click `+GoogleCalendar` at the bottom right to add to your own Google calendar.

repository: openjs-foundation/standards

repo_name: openjs-foundation/standards


text:
# Project 1 - *FLIX*

**FLIX** is a movies app using the [The Movie Database API](http://docs.themoviedb.apiary.io/#).

Time spent: **8** hours spent in total

## User Stories

- [x] User sees app icon in home screen and styled launch screen
- [x] User can scroll through a list of movies currently playing in theaters from The Movie DB API
- [x] User can "Pull to refresh" the movie list
- [x] User sees a loading state while waiting for the movies to load

## Video Walkthrough

Here's a walkthrough of implemented user stories:

GIF created with [LiceCap](http://www.cockos.com/licecap/).

## Notes

Progress was slow but I'm happy with the result. For the most part everything went smoothly, and all issues were resolved quickly through a bit of troubleshooting.

## License

    Copyright [2018] [Joe Antongiovanni]

    Licensed 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.

---

# Project 2 - *FLIX*

**FLIX** is a movies app displaying box office and top rental DVDs using [The Movie Database API](http://docs.themoviedb.apiary.io/#).

Time spent: **10** hours spent in total

## User Stories

- [x] User can tap a cell to see a detail view
- [x] User can tap a tab bar button to view a grid layout of Movie Posters using a CollectionView
- [x] User can tap a poster in the collection view to see a detail screen of that movie

## Video Walkthrough

Here's a walkthrough of implemented user stories:

GIF created with [LiceCap](http://www.cockos.com/licecap/).

## Notes

I am using a virtual machine to run OSX, and I have encountered an issue where it will not load into the operating system. I have tried numerous troubleshoting methods, but so far I have not been able to resolve the issue, and as a result my progress on the project has been halted at the moment.

## License

    Copyright [2018] [Joe Antongiovanni]

    Licensed 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.

---

# Lab 3 - *FLIX*

**FLIX** is a movies app displaying box office and top rental DVDs using [The Movie Database API](http://docs.themoviedb.apiary.io/#).

Time spent: **10** hours spent in total

## User Stories

- The following screens use AutoLayout to adapt to various orientations and screen sizes
- [x] Movie feed view
- [x] Detail view
- [x] Dynamic Height Cells

## Video Walkthrough

Here's a walkthrough of implemented user stories:

GIF created with [LiceCap](http://www.cockos.com/licecap/).

## Notes

Describe any challenges encountered while building the app.

Not setting constrainsts correctly and having overlapping text or out of posisiton items

## License

    Copyright [2018] [Joe Antongiovanni]

    Licensed 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.

---

# Lab 5 - *FLIX*

**FLIX** is a movies app displaying box office and top rental DVDs using [The Movie Database API](http://docs.themoviedb.apiary.io/#).

Time spent: **3** hours spent in total

## User Stories

- [x] Create a movie model
- [x] Implement the movie model
- [x] Implement property observers
- [x] Create a basic API Client

## Video Walkthrough

Here's a walkthrough of implemented user stories:

GIF created with [LiceCap](http://www.cockos.com/licecap/).

## Notes

Describe any challenges encountered while building the app.

## License

    Copyright [2018] [Joe Antongiovanni]

    Licensed 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.
---


text:
# HashMe
A simple program that helps you to create hashed password. You can save your own template on XML file and choose several hash options.  It's developed in Windows Form C# and if you are tired to search hashing website, you are in the right place!

In the current version (1.6.1) is possible to choose the following options:
Add Salt
Salt position (Head/Tail)
Add salt to hash
Algorithm
Encryption format
Encoding Types

...and....don't miss the Chewie button!!!

repository: my-collection-template/HashMe

repo_name: my-collection-template/HashMe


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

![](http://patriciogonzalezvivo.com/images/glslViewer.gif)

[![Donate](https://www.paypalobjects.com/en_US/i/btn/btn_donate_SM.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=4BQMKQJDQ9XH6)

Live-coding console tool that renders GLSL Shaders. Every file you use (frag/vert shader, images and geometries) are watched for modification, so they can be updated on the fly.

## Install

### Installing on Ubuntu

Install the GLFW 3 library and other dependencies:

```bash
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install libglfw3-dev git-core
```

Download the glslViewer code, compile and install:

```bash
git clone http://github.com/patriciogonzalezvivo/glslViewer
cd glslViewer
make
sudo make install
```

This was tested with Ubuntu 16.04.

These instructions may not work for all users.
For example, it seems that libglfw3-dev conflicts with the older libglfw-dev.
The previous Ubuntu install instructions direct you to
[download and compile glfw3 manually](http://www.glfw.org/docs/latest/compile.html#compile_deps_x11):

```bash
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install git-core cmake xorg-dev libglu1-mesa-dev
cd ~
git clone https://github.com/glfw/glfw.git
cd glfw
cmake .
make
sudo make install
```

### Installing on Debian testing (Buster)

Install the GLFW 3 library, build tools, and other dependencies:

```bash
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install libglfw3-dev xorg-dev libglu1-mesa-dev git-core dh-make fakeroot build-essential
```

Download the glslViewer code, compile and install. These instructions use deb-helper
to build a native debian package, to build a simple binary, follow the Ubuntu instructions above.

```bash
git clone https://github.com/patriciogonzalezvivo/glslViewer.git
cd glslViewer
fakeroot dh binary
cd ..
sudo dpkg -i glslviewer_1.5_amd64.deb
```
(The arch part of the .deb filename will differ on other cpu architectures.)

This was tested with the Debian testing distribution on January 28th 2018.

### Installing on Raspberry Pi

Get [Raspbian](https://www.raspberrypi.org/downloads/raspbian/), a Debian-based Linux distribution made for Raspberry Pi and then do:

```bash
sudo apt-get install glslviewer
```

Or, if you want to compile the code yourself:

```bash
cd ~
git clone http://github.com/patriciogonzalezvivo/glslViewer
cd glslViewer
make
sudo make install
```

### Installing on Arch Linux

```bash
sudo pacman -S glu glfw-x11
git clone http://github.com/patriciogonzalezvivo/glslViewer
cd glslViewer
make
sudo make install
```

Or simply install the AUR package [glslviewer-git](https://aur.archlinux.org/packages/glslviewer-git/) with an [AUR helper](https://wiki.archlinux.org/index.php/AUR_helpers).

### Installing on macOS

Use [Homebrew](https://brew.sh) to install glslViewer and its dependencies:

```bash
brew update
brew upgrade
brew install glslviewer
```

If you prefer to compile from source directly from this repository you need to [install GLFW](http://www.glfw.org), `pkg-config` first and then download the code, compile and install.

```bash
brew update
brew upgrade
brew tap homebrew/versions
brew install glfw3 pkg-config
cd ~
git clone http://github.com/patriciogonzalezvivo/glslViewer
cd glslViewer
make
make install
```

If `glfw3` was installed before, after running the code above, remove `glfw3` and try:

```bash
brew install glfw3 pkg-config
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
make
make install
```

### Install Python wrapper

GlslViewer now ships with a Python package. It's essentially a wrapper that allows to compile, benchmaark and render shaders from a Python script.

1. First make sure you have the setup tools

```bash
sudo apt install python-setuptools
```

2. Once you compile the binnaries do

```bash
sudo make install_python
```

## Using glslViewer

### 1. Loading a single Fragment shader

In the most simple scenario you just want to load a fragment shader. For that you need to:

* Run the app passing the shader as an argument

```bash
cd examples
glslViewer test.frag
```

* Then edit the shader with your favorite text editor.

```bash
vim test.frag
```

**Note**: In RaspberryPi you can avoid taking over the screen by using the `-l` flags so you can see the console. Also you can edit the shader file through ssh/sftp.

**Note**: On Linux and macOS you may used to edit your shaders with Sublime Text, if that's your case you should try this [Sublime Text 2 plugin that launch glslViewer every time you open a shader](https://packagecontrol.io/packages/glslViewer).

### 2. Loading a Vertex shader and a geometrie

![](http://patriciogonzalezvivo.com/images/glslViewer-3D.gif)

You can also load both fragments and vertex shaders. Of course modifying a vertex shader makes no sense unless you load an interesting geometry. That's why `glslViewer` can load `.ply` files. Try doing:

```bash
glslViewer bunny.frag bunny.vert bunny.ply
```

### 3. Loading Textures

You can load PNGs and JPEGs images to a shader. They will be automatically loaded and assigned to a uniform name according to the order they are passed as arguments: ex. `u_tex0`, `u_tex1`, etc. Also the resolution will be assigned to `vec2` uniform according to the texture uniform's name: ex. `u_tex0Resolution`, `u_tex1Resolution`, etc.

```bash
glslViewer test.frag test.png
```

In case you want to assign custom names to your textures uniforms you must specify the name with a flag before the texture file. For example to pass the following uniforms `uniform sampled2D imageExample;` and  `uniform vec2 imageExampleResolution;` is defined in this way:

```bash
glslViewer shader.frag -imageExample image.png
```

### 4. Other arguments

Beside for texture uniforms other arguments can be add to `glslViewer`:

* `-x [pixels]` set the X position of the billboard on the screen

* `-y [pixels]` set the Y position of the billboard on the screen

* `-w [pixels]` or `--width [pixels]`  set the width of the billboard

* `-h [pixels]` or `--height [pixels]` set the height of the billboard

* `-s [seconds]` exit app after a specific amount of seconds

* `-o [image.png]` save the viewport to an image file before

* `-l` to draw a 500x500 billboard on the top right corner of the screen that let you see the code and the shader at the same time. (RaspberryPi only)

* `-c`or `--cursor` show cursor.

* `--headless` headless rendering. Very useful for making images or benchmarking.

* `-I[include_folder]` add an include folder to default for `#include` files

* `-D[define]` add system `#define`s directly from the console argument

* `-[texture_uniform_name] [texture.png]`: add textures associated with different `uniform sampler2D`names

* `-vFlip` all textures after will be flipped vertically

*  `-v` verbose outputs

* `--help` display the available command line options

### Console IN commands

Once glslViewer is running the CIN is listening for some commands, so you can pass data through regular *nix pipes.

* `int`, `floats`, `vec2`, `vec3` and `vec4` uniforms can be passed as **comma separated values** (CVS), where the first column is for the name of the uniform and the rest for the numbers of values the uniform have. **Note** that there is a distinction between `int`and `float`so remember to put `.` (floating points) to your values.

* `help`: return this list of commands

* `date`: return content of `u_date`, return the current year, month, day and seconds

* `time`: return content of `u_time`, the elapsed time since the app start

* `delta`: return content of `u_delta`, return the last delta time between frames

* `fps`: return content of `u_fps`, return the number of frames per second

* `frag`: return the source of the fragment shader

* `vert`: return the source of the vertex shader

* `buffers`: return a list of active buffers as their sampler2D uniform name

* `uniforms`: return a list of active uniforms together with their values in CSV format

* `textures`: return a list of active textures as their sampler2D uniform name folowed by the file path to the source image

* `window_width`, `window_height`, `screen_size` and `viewport` : return the size of the windows, screen and viewport (content of `u_resolution`)

* `pixel_density`: return the pixel density

* `mouse_x`, `mouse_y` and `mouse`: return the position of the mouse (content of `u_mouse`)

* `camera_distance`: returns the distance of the camera to the model. If a value is provide separated by a comma will set the distance. Ex: `camera_distance,10.0`

* `camera_position`: returns the position of the camera. If a value is provide separated by commas will set the position. Ex: `camera_position,0.0,0.0,10.0`

* `view3d`: returns the position of the camera, the up-vector and the center of the object;

* `screenshot,[filename]`: save a screenshot of what's being rendered. If there is no filename as argument will default to what was defined after the `-o` argument when glslViewer was launched.

* `q`, `quit` or `exit`: close glslViewer

## glslViewer conventions

### Pre-Defined `uniforms`

* `uniform sampler2D u_tex[number]`: default textures names

* `uniform float u_time;`: shader playback time (in seconds)

* `uniform float u_delta;`: delta time between frames (in seconds)

* `uniform vec4 u_date;`: year, month, day and seconds

* `uniform vec2 u_resolution;`: viewport resolution (in pixels)

* `uniform vec2 u_mouse;`: mouse pixel coords

* `varying vec2 v_texcoord`: UV of the billboard ( normalized )

* `uniform vec3 u_eye`: Position of the 3d camera when rendering 3d objects

* `uniform vec2 u_view2d`: 2D position of viewport that can be changed by dragging

* `uniform vec3 u_eye3d`: Position of the camera

* `uniform vec3 u_centre3d`: Position of the center of the object

* `uniform vec3 u_up3d`: Up-vector of the camera

### Including dependent files with `#include`

You can include other GLSL code using a traditional `#include "file.glsl"` macro.

*Note*: included files are not under watch so changes will not take effect until the main file is saved.

### Native defines

Beside the defines you can pass as an argument using `-D[define]` you can relay on the following native defines automatically generated for you.

* `GLSLVIEWER`: you can use it to tell your shader it's being render in GlslViewer.

* `PLATFORM_OSX`: added only on MacOS/OSX platforms.

* `PLATFORM_RPI`: added only only on RaspberryPi devices.

* `PLATFORM_LINUX`: added only in i86 and 64bit Linux platforms.

* `BACKGROUND`: added on background shader.

* `BACKGROUND`: added on background shader.

* `BUFFER_[NUMBER]`: added on each buffer pass.

### Using the defines flags to use multiple buffer passes

You can use multiple buffers by forking the code using `#ifdef BUFFER_[number]`, `#if defined (BUFFER_[number])` and/or `#elif defined (BUFFER_[number])`. Then you can fetch the content of those buffers by using the `uniform sampler2D u_buffer[number]` texture. Ex.:

```glsl
    uniform sampler2D   u_buffer0;
    uniform sampler2D   u_buffer1;

    varying vec2        v_texcoord;

    void main() {
        vec3 color = vec3(0.0);
        vec2 st = v_texcoord;

    #ifdef BUFFER_0
        color.g = abs(sin(u_time));

    #elif defined( BUFFER_1 )
        color.r = abs(sin(u_time));

    #else
        color.b = abs(sin(u_time));

        color = mix(color,
                    mix(texture2D(u_buffer0, st).rgb,
                        texture2D(u_buffer1, st).rgb,
                        step(0.5, st.x) ),
                    step(0.5, st.y));
    #endif

        gl_FragColor = vec4(color, 1.0);
    }
```

There is a more extense example on `examples/test_multibuffer.frag` and `examples/grayscott.frag`.

### Using the defines flags to draw the background

If you load a 3D model or set a shader without opacity you will notice the background is black by defaltt (actually transparent in RaspberryPi).

It's possible to set a background by adding a `#ifdef BACKGROUND` check and adding your code there. Check the example `examples/head.frag`

### Examples

* Open a Fragment shader:

```bash
glslViewer examples/test.frag
```

* Open a Fragment shader with an image:

```bash
glslViewer examples/test.frag examples/test.png
```

* Open a Fragment and Vertex shader with a geometry:

```bash
glslViewer examples/bunny.frag examples/bunny.vert examples/bunny.ply
```

* Open a Fragment that use two buffers as a Ping-Pong to do a reaction diffusion example:

```bash
glslViewer examples/grayscott.frag
```

* Open a Fragment that use OS defines to know what platform is running on:

```bash
glslViewer examples/test_platform.frag
```

* Change the value of a uniform by passing CSV on the console IN:

```bash
glslViewer examples/temp.frag
u_temp,30
u_temp,40
u_temp,50
u_temp,60
u_temp,70
```

* Create a bash pipe to animate the uniform value using the CPU temperature of your Raspberry PI:

```bash
examples/.temp.sh | glslViewer examples/temp.frag
```

* Run a headless instance of glslViewer that exits after 1 second outputting a high resolution PNG image:

```bash
glslViewer examples/mandelbrot.frag -w 2048 -h 2048 --headless -s 1 -o mandelbrot.png
```

* Make an SVG from a shader using [potrace](http://potrace.sourceforge.net/) and [ImageMagic](https://www.imagemagick.org/script/index.php):

```bash
glslViewer examples/cross.frag --headless -s 1 -o cross.png
convert cross.png cross.pnm
potrace cross.pnm -s -o cross.svg
```

## Using glslLoader

```glslLoader``` is a python script that is installed together with ```glslViewer``` binary which let you download any shader made with [The book of shaders editor (editor.thebookofshaders.com) ](http://editor.thebookofshaders.com/). Just pass as argument the ***log number***

![](http://patriciogonzalezvivo.com/images/glslGallery/00.gif)

```bash
glslLoader<PHONE_NUMBER>27
```

## Author

[Patricio Gonzalez Vivo](https://twitter.com/patriciogv): [github](https://github.com/patriciogonzalezvivo) | [twitter](https://twitter.com/patriciogv) | [website](http://patricio.io)

## Acknowledgements

Thanks to:

* [Karim’s Naaki](http://karim.naaji.fr/) lot of concept and code was inspired by his: [fragTool](https://github.com/karimnaaji/fragtool).

* [Doug Moen](https://github.com/doug-moen) he help to add the compatibility to ShaderToy shaders and some RayMarching features were added for his integration with his project: [curv](https://github.com/doug-moen/curv).

* [Yvan Sraka](https://github.com/yvan-sraka) for putting the code in shape and setting it up for TravisCI.


text:
# errand

[![forthebadge](https://forthebadge.com/images/badges/made-with-go.svg)](https://forthebadge.com)
[![forthebadge](https://forthebadge.com/images/badges/built-with-love.svg)](https://forthebadge.com)

[![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/dionysius/errand)](https://github.com/dionysius/errand/releases)
[![Go Report Card](https://goreportcard.com/badge/github.com/dionysius/errand)](https://goreportcard.com/report/github.com/dionysius/errand)
[![GitHub](https://img.shields.io/github/license/dionysius/errand?color=lightgrey)](https://github.com/dionysius/errand/blob/master/COPYING)

errand is your little assistant for error slices or so-called multierrors. It helps you append multiple errors together into a single error as minimally as possible. The usage is as native as possible to the original error interface.

errand is the right library for you, if you just want a slice of actual errors from a bunch of calls. It gives you the following features:

- you can directly use errand - no need to initialize the error slice
- appending nil doesn't add another item to the slice - no need to check for nil before appending
- if the error you append to and append from is nil, the error is still nil - no need for a special method to get ErrOrNil() for your returns
- it doesn't force you that error is an error slice - returns that exact error if only one error was appended
- if any error is already an errand, only the entries are taken - exactly one level of error slice is returned, you are flexible in how you organize your code and where you return parts of your error slice
- no external dependencies - it doesn't add weight

errand is **not a replacement for error wrapping**. I encourage you to use [golangs error wrapping functionality](https://blog.golang.org/go1.13-errors)! As of now, you can't find out the types of these errors.

## Usage

errand offers only one package exported function: `Append` (besides the error and string interface type implementations `Error` and `String`).

To download errand:

`go get github.com/dionysius/errand`

To import errand:

`import "github.com/dionysius/errand"`

And use errand like you would with golangs `append`:

```go
package main

import (
  "fmt"

  "github.com/dionysius/errand"
)

func main() {
  errs := fmt.Errorf("a function with possibly an error")

  errs = errand.Append(errs, fmt.Errorf("directly add a possible error"))

  // multiple errands are merged together, we get an errand from the separate function
  errs = errand.Append(errs, separate())

  // any nil errors are ignored
  errs = errand.Append(errs, nil)

  errs = errand.Append(errs, willBeNil())

  // Output the error
  fmt.Printf("%s\n", errs)

  // Or we can also get the error slice using the Errors interface
  if multi, is := errs.(errand.Errors); is {
    for _, err := range multi.Errors() {
      fmt.Println("->", err.Error())
    }
  }
}

func separate() error {
  errs := errand.Append(nil, fmt.Errorf("you can directly use errand without initialisation of the first error"))

  // If there is only one error, like the command above, errs will be exactly that error, not an errand error slice.

  return errand.Append(errs, fmt.Errorf("and force that this function returns an errand since two errors were added"))
}

func willBeNil() error {
  var err error

  // If everything is nil, Append returns nil
  return errand.Append(err, nil)
}
```

The output of the above example is (test it yourself with `go run internal/readme.go`):

```txt
4 errors: a function with possibly an error, directly add a possible error, you can directly use errand without initialisation of the first error, and force that this function returns an errand since two errors were added
-> a function with possibly an error
-> directly add a possible error
-> you can directly use errand without initialisation of the first error
-> and force that this function returns an errand since two errors were added
```

## Todos

- Implement the interfaces for `errors.Is` and `errors.As`. PRs welcome!
- Not sure yet if I even want to: But we could offer an interface `Appends` to offer implementations `Append(error, []error...)` so they can benefit from the merging of error slices into errand.

## Motivation

Most multierror packages are quite heavy. While they offer many features, It's often more than needed and that complicates their usage more than it should be. Don't get me wrong, they're definitely helpful and useful if you need those features!

errand is inspired by [multierror from felixge](https://github.com/felixge/multierror). But since there are no licence informations, looks abandoned and misses a tiny little feature to append two error slices together, I've decided to create errand.

repository: dionysius/errand

repo_name: dionysius/errand


text:
---
tile: Dependency Injection
---

Part of the SOLID principles, D stands for Dependency Injection. It's purpose is to decouple code by implementing the Dependency Inversion Principle. It's a design pattern that helps a class separate the logic of creating dependent objects. The goal is a loosely coupled system.

According to Martin Fowler, Dependency Injection is to have a "separate object, an assembler, that populates a field in a class" that determines the implementation of an interface.

Dependency Injection Principles (DIP):
  * High-level modules should **not** depend on low-level modules. Both should depend on abstractions. Another way of saying this is a dependency should never be made upon a concretion; only upon an abstraction.

Three types of Dependency Injection

 * Type 1 IoC (interface injection)
   - Drawback is that it requires a lot of interfaces to get your application functioning
 * Type 2 IoC (setter injection)

 * Type 3 IoC (constructor injection)
   - Preferred because it makes testing easier
 A service locator is another way to break dependencies. Is an object that knows how to collect and implement all the services that maybe needed in an application. Though it is highly discouraged because it hides dependencies and convolutes code.

When to use setter or constructor injection.
  A General issue with OOP is: Should you fill fields in a constructor or with setters? Marten Fowler says: Create valid objects at construction time. It is based on Kent Beck's Smalltalk best practices.
  Constructor initialization allows you to hide fields that are immutable by simply not providing a setter.

  Constructors suffer from parameters. If you have a lot of strings as parameters, you're relying on position to understand intent. Setter injection can clarify each name to indicate what the string is supposed to do. This is sometimes easier to read.

Problems with IoC
  * Harder to understand and leads to problems during debugging

gha_language: CSS

gha_license_id: NOASSERTION


text:
---
# This page was generated from the add-on.
title: Breakpoints tab
type: userguide
weight: 7
---

# Breakpoints tab

The Breakpoints tab shows you all of the
[breakpoints](/docs/desktop/start/features/breakpoints/) that you have set.
Breakpoints can be set via the [History](/docs/desktop/ui/tabs/history/) and
[Sites](/docs/desktop/ui/tabs/sites/) tabs as well as the 'Add a custom HTTP breakpoint' button on the
[top level toolbar](/docs/desktop/ui/tltoolbar/)

## Right click menu

Right clicking on a breakpoint will bring up a menu which will allow you to:

### Edit...

This will bring up the 'Edit breakpoint' dialog which allows you to edit the criteria that defines the breakpoint. Double clicking on the breakpoint will also show this dialog.

### Remove

This will remove the breakpoint

## See also

|   |                                  |                                       |
|---|----------------------------------|---------------------------------------|
|   | [UI Overview](/docs/desktop/ui/) | for an overview of the user interface |

repository: zaproxy/zaproxy-website

repo_name: zaproxy/zaproxy-website


text:
# Offline Notes

I tend to do a lot of offline testing of Gentoo installs, and rebuilding local
VMs where it would be useful (and kind to the mirrors) to keep the relevant
distfiles and ebuilds on the local network.

Tipes from the Gentoo forums:

* Don't use the default locations of /usr/portage/distfiles and
  /usr/portage/packages (change in /etc/make.conf)
* `emerge -fp <target>` will download any required external files to the
  distfiles directory, seems like I may want to do this: `emerge -uDNpfv --with-bdeps=y @world`

References:

* https://forums.gentoo.org/viewtopic-p-3461249.html
* https://wiki.gentoo.org/wiki/Local_distfiles_cache
* http://swift.siphos.be/aglara/aglara.pdf


text:
# Simple React Form Validation

## [Demo](http://form-validator.digital-logic.net/)

Form validation in react is hard, this library makes it simple.

Optimized for performance:
Component rendering only occurs when necessary, when the validation functions input changes, or a prop on the input element changes. Validation actions do not execute on each keystroke, but wait for a timeout to pass before evaluating the input.

Easy to use.
Form validator provides two higher order components which wrap around your input elements and form component. Validation is automatic, form submission will only be allowed after the form has passed validation.

Easily integrates into any UI component library.

## How does it work?

Design your input components
```javascript
function Input({ label, onChange, value, errorMessage, ...props}) {
    return (
        <label className="input-element">{ label }
            <input onChange={ onChange } value={ value } {...props}/>
            <span className="input-error">{ errorMessage }</span>
        </label>
    );
}
// wrap your input component with the withValidate hoc.
export default withValidate(Input);
```
Design your form component and wrap it with the withGroupValidation hoc.
withGroupValidation will recursively search all children within your form component up to a specified search depth (default: 2) - for any components that are wrapped with the withValidation hoc, and manage there state and share that state with you.
```javascript
function Form(props) {
    return (
        <form {...props} />
    );
}
// make sure to wrap your Form component in the withGroupValidation hoc
export default withGroupValidation(Form);
```

Build your form
```javascript
function BasicForm () {
    const [{ email }, dispatch ] = useReducer(reducer, { email: '' });

    const onChange = useCallback((event) => {
        const { name, value } = event.target;
        dispatch({ type: name, value });
    });

    <Form // Provide an onSubmit function
        // withGroupValidation will execute this function when
        // the form passes validation, or display errors.
        onSubmit={() => console.log('Data Submitted: ', email)}>
        <Input
            label="eMail Address"
            name="email"
            value={email}
            onChange={onChange}
            // Validation function are executed from left to right,
            // the first one to return an error message is the one that is displayed to the user
            validate={[required('Custom error message'), isEmail()]}/>

        <Button type="submit">Submit</Button>
    </Form>
}

function reducer(state, { type, value }) {
    switch(type) {
        case 'email':
            return {
                ...state,
                email: value
            };
        default:
            return state;
    }
}
```

repository: Digital-Logic/React-Form-Validator

repo_name: Digital-Logic/React-Form-Validator


text:
# peerflix

> Stream video- or audio-based torrents to a media player.

- Stream the largest media file in a torrent:

`peerflix "{{torrent_url|magnet_link}}"`

- List all streamable files contained in a torrent (given as a magnet link):

`peerflix "{{magnet:?xt=urn:btih:0123456789abcdef0123456789abcdef01234567}}" --list`

- Stream the largest file in a torrent, given as a torrent URL, to VLC:

`peerflix "{{http://example.net/music.torrent}}" --vlc`

- Stream the largest file in a torrent to MPlayer, with subtitles:

`peerflix "{{torrent_url|magnet_link}}" --mplayer --subtitles {{subtitle-file.srt}}`

- Stream all files from a torrent to Airplay:

`peerflix "{{torrent_url|magnet_link}}" --all --airplay`

repository: chrillebile/tldr

repo_name: chrillebile/tldr


text:
---
layout: post
title:      "Sinatra CRUD"
date:       2018-04-09 20:37:10 +0000
permalink:  sinatra_crud
---

The second project here at flatiron is to build a simple CRUD application. CRUD of course being an acronym for:
Create
Read
Update
Delete.

As I waded through this project it became more and more evident that at the root of almost all user interactive applications is a simple CRUD base.  I could see the directions I would need to go to develop a more complicated/enticing application as I worked on just the simple base app.

My biggest takeaway from this project was the importance of maximizing my resources.  Not only is google of course google but the Learn.co community is phenomenal is their willingness to help.  Personally I have also found it good practice to read everyone's questions to either reinforce knowledge I have or to build on the foundation I have built.

extension: markdown


text:
hws2xml
===

A simple console application which converts [Hammerwatch](http://store.steampowered.com/app/239070) game saves (HWS) into XML files, and vice versa.

This project only brings together codes which are relevant in converting HWS into XML files.

- Check out the more complete project on [HWSEdit](https://github.com/joedf/HWSEdit)
- Core conversion code (`TiltedEngine.cs`) from [Myran](http://hammerwatch.com/forum/index.php?topic=2197.msg5313#msg5313)
- OpenTK shim (`OpenTK.cs`) by [joedf](http://hammerwatch.com/forum/index.php?topic=2197.msg5318#msg5318)

### Usage

On Windows, you will need at least [.NET 4.5 Framework](https://www.microsoft.com/en-us/download/details.aspx?id=30653) or above. Or, you could use [Mono](http://www.mono-project.com/) too.

On Unix, you will need to use [Mono](http://www.mono-project.com/) to run the compiled executable.

If you are using Mono, do remember to execute it with `mono hws2xml.exe`.

```cmd
C:\>hws2xml.exe
Please enter the input and output path.
Example:
  HWS to XML: hws2xml.exe input.hws output.xml
  XML to HWS: hws2xml.exe input.xml output.hws

C:\>hws2xml.exe test.hws test.xml
Conversion complete.

C:\>hws2xml.exe test.xml test.hws
Conversion complete.
```

### Build

Details can be found in `build.bat`. Windows build is built with .NET 4.5 `csc.exe`, while Mono build is built with Mono 4.

### Download

Downloads can be found at [AppVeyor](https://ci.appveyor.com/project/altbdoor/hws2xml/build/artifacts).

- `win_hws2xml.zip` for Windows
- `mono_hws2xml.zip` for Mono

### FAQ

1. **Is this converter safe?**

    The core conversion code is directly from Myran, one of the developers of the game. So, it should be safe!

    I myself have tested it with a couple of my game saves. I was able to cheat obtain all the Strange Planks I missed.

1. **What do I do with the XML now?**

    Feel free to boot up your favorite text editor and start editing the XML. When you are done, use `hws2xml.exe` to convert it back to HWS.

1. **But I don't know how to wade through all this """code"""**

    I have created a small editor of sorts. Its done with largely HTML and JS, and can be found in the repository as `xml_editor.html`. Download the file, and open it on your browser with double click or whatnot.

    Do not count on it being able to edit every single parameter of the game though. Its hacky at best. The editor is only tested in Mozilla Firefox and Google Chrome, as it uses some pretty advanced features. Its a self containing file, which means it does not require any other software in order to work.

1. **Is this editor safe?**

    If you mean for your game saves, I would strongly recommend that you keep a backup copy of the original HWS file before doing anything. But as mentioned, I have tested it with my game saves.

    If you mean for your browser, I can assure you that it is safe. It does not make any external calls through the internet. The only risk is that it might slow down your browser if the XML file is too large.

1. **So I have to convert my game save, load it in the editor, make changes and re-convert it?**

    Yes.

1. **Why?! That is so much work!**

    The core conversion code is done in C#, in which I have not touched in years. I only have a faint recollection of things, good enough to make the converter in command line, but not enough to make a full blown GUI.

    This is also the reason why I did not contribute directly to the original code in HWSEdit. But hey, HWSEdit *is* open source...

1. **This is unfair! You are cheating!**

    Its a choice we all can take. As mentioned by my friend who kept pestering me while working on this project.

    `PLAY THE GAME, THE WAY ITS MEANT TO BE PLAYED.`

### More Why

- Hosted a multiplayer game with friends
- Fell sick, could not host
- Wanted to change host to another friend
- Found HWSEdit, but the players tab was not working
- Converted to XML with HWSEdit and changed the host
- Feel adventurous to help HWSEdit, but no C# knowledge
- Do not know how to decode original conversion logic from Myran
- Kept the conversion in C#
- Plan to remake the editing in another language
- And did it in HTML/JavaScript


text:
# Benchmark between different methods to know a `f64` value is also an integer

Use the following command to bench:

```bash
% rustup override set nightly
% cargo bench
```

```command line
% cargo bench
running 2 tests
test tests::bench_cast  ... bench:     175,998 ns/iter (+/- 79,679)
test tests::bench_fract ... bench:     157,540 ns/iter (+/- 26,664)

test result: ok. 0 passed; 0 failed; 0 ignored; 2 measured; 0 filtered out

% cargo bench
running 2 tests
test tests::bench_cast  ... bench:     173,530 ns/iter (+/- 44,183)
test tests::bench_fract ... bench:     172,032 ns/iter (+/- 47,314)

test result: ok. 0 passed; 0 failed; 0 ignored; 2 measured; 0 filtered out

% cargo bench
running 2 tests
test tests::bench_cast  ... bench:     172,118 ns/iter (+/- 63,072)
test tests::bench_fract ... bench:     181,475 ns/iter (+/- 55,781)

test result: ok. 0 passed; 0 failed; 0 ignored; 2 measured; 0 filtered out

```

repository: tesuji/bench-rust-float-integral

repo_name: tesuji/bench-rust-float-integral


text:
# menace

> Note: This is not an officially supported Google product.

A kotlin implementation of the MENACE Tic-Tac-Toe matchbox learning machine (Machine Educable Noughts and Crosses Engine), originally built with matchboxes in 1961 by Donald Michie, as described by [Matt Parker] in this [video from his standupmaths channel][video].

This is purely a toy project, to facilitate the education in machine learning and the Kotlin language by the author(s). The system has been implemented before in JavaScript and other languages, though, to make the excercise worthwhile, those implementations have not been examined by the author(s).

Also, putting lots of beads in matchboxes is exhausting and tiresome, while coding is fun!

[Matt Parker]: http://standupmaths.com/
[video]: https://www.youtube.com/watch?v=R9c-_neaxeU

repository: cgruber/menace

gha_language: Kotlin

repo_name: cgruber/menace


text:
1. create a service for retrieving and sending saved track data - Weston
1. parse data into the appropriate data structures - David
1. create a service that retrieves and posts sample sets - Joaquin
1. update mixer logic to load in sample sets as a group - Kevin
1. convert add sample dropdown menu to popout menu maybe? - Jake
1. schedule task - update html to show position of sequencer - David maybe after :)

uploadmusic-service
user

backend team has updated the uploadedmusic model - reflect this in our frontend
- readded collections
- switching user isadmin to a stream

tomorrow fred will be here! some time morning and afternoon

- discussing the microservices conversion
- refactoring decisions
    - we will be refactoring a large majority of our step sequencer to allow for dynamic updates to the step sequencer
        - users will be able to load in individual samples load in full sample sets to existing projects, and delete individual samples and sample sets as desired
        - we are replicating our playlist functionality to allow for user created sample sets which will be able to be shared among other users so they can save or share services
    - uploading music and uploading samples will be fleshed out to allow for additional form data like song name to be included when an upload is complete

    - when come back to afternoon meetings, gotta talk to batch as a whole later on today - gonna have to pull us into the main session to have a discussion

    - instead of having isadmin boolean if we had a list of roles, like a string value that's set

- when a pattern is saved, it will be saved as one huge pattern

- updating the upload music page to provide additional form data to backend
- create an upload page for samples
- duplicate playlist page functionality to allow users to create "samplesets"(secretly just playlists of samples basically) and add samples to samplesets
- privacy toggles for songs and samples
- a page that lists samplesets and allows users to add a sampleset to their collection of samplesets
- a page that lists uploaded samples and allows users to add a specific sample to their library of samples

- sample controller work maybe?
- sample controller in project service

- 4/8/2021
- testing published first frontend tests
-

get the average of all population in city by each city
- watch the csharp video that douglas posted

delegates
clr
directives
http verbs
ajax
devop

each pattern is going to need

What are delegates:

Micro services arc vs monolithic arc:

What is the CLR:

exception handling

what is an observable

structural and attribute directives

What are angular directives:

What are the joins

HTTP Verbs:
(look these up)
Post pull or put
Get
Delete
Fetch
Head

status codes
200 ok
300 redirect

average of population in city
select * where

gha_language: C#


text:
# Yahoo Fantasy Sports oAuth Sample

To use you will need to add a file in the root of the web project "oAuth.keys.config" which should contain this:

```
<oAuthConfig
	YahooConsumerKey="**YOUR CONSUMER KEY**"
	YahooConsumerSecret="**YOUR CONSUMER SECRET**" />
```

##How To Use This Code
1. Add the oAuthConfig as noted above.
2. Run the application
3. Click the button to authenticate with Yahoo
4. Agree to the data access
5. Use the notes below to query your Fantasy Sports League

##Sample Query
**http://fantasysports.yahooapis.com/fantasy/v2/leagues;league_keys=GAMEKEY.l.LEAGUEID**

###League Id:
Look at the URL to one of your fantasy leagues, for example this baseball league's URL is:
[http://baseball.fantasysports.yahoo.com/b1/#####](http://baseball.fantasysports.yahoo.com/b1/##### "http://baseball.fantasysports.yahoo.com/b1/#####")
The **#####** at the end of the URL is your League Id.

###Game Key:
Since we already know this is a baseball league, we can simply use the "mlb" key.

Alternatively you can use the numeric Game ID from Yahoo. This can be useful to look at data from a specific year of your league

[http://developer.yahoo.com/fantasysports/guide/game-resource.html#game-resource-key_format](http://developer.yahoo.com/fantasysports/guide/game-resource.html#game-resource-key_format "http://developer.yahoo.com/fantasysports/guide/game-resource.html#game-resource-key_format")

repository: tonyranieri/YahooFantasySports

repo_name: tonyranieri/YahooFantasySports


text:
1. Unit Testing - What is it?

    1. Wikipedia - [Unit Testing](http://en.wikipedia.org/wiki/Unit_testing)
    2. Python unittest builtin module - no setup required, just 'import unittest'
    3. The paradigm: red, green, refactor.
        - red - make a test, but don't write the code. The test obviously fails.
        - green - write the minimum code to pass the test. Verify the test passes.
        - refactor - clean up the code. Follow: [PEP8](http://legacy.python.org/dev/peps/pep-0008/#maximum-line-length), [DRY](http://en.wikipedia.org/wiki/Don't_repeat_yourself), [rule of three](http://en.wikipedia.org/wiki/Rule_of_three_(computer_programming)), etc.
    4. How do we build a good test? That is too large a topic for today, but here are some ideas:
        -  break your code into testable subproblems.
        -  too simple is bad, avoid testing builtins and standard library functions.
        -  build the test before any code is written, this is "Test DRIVEN Development"
        -  This is just one way to code. You should know how to write a test, though.

2.
    1. Build a simple test, e.g. 1+1==2
        -  The test isn't the focus yet.
    2. Build some more tests (2 more today)
        -  Two more tests in the same category.
        -  Simple math is best, we just want to get enough tests to see implementation patterns.
    3. Now lets generalize. 4 things change in each test.
        -  test name - although you could have different text for fail/success
        -  assert statement simply takes True/False (or a list of True/False) - we use only == to keep things simple
        -  left side of assert statement
        -  right side of assert statement
    4. Parts of our testing framework:
        -  test fixture - setup needed to build and breakdown a test - variables, databases, tcp connections, etc.
        -  test case - a single subproblem, can include multiple asserts, and therefore multiple pass/fail responses.
        -  test suite - an aggregation of test cases, iterates over each test case.
        -  test runner - the framework over which tests are run, as easy as a for loop and print statement to display results.

3. Now that we understand the parts we need, let's use a more robust and WELL TESTED framework.
    1. Python [unittest](https://docs.python.org/2/library/unittest.html) builtin module.
        -  This framework uses classes.
        -  Don't get lost in the weeds on the classes.
        -  The module provides a special suite of [Asserts](https://docs.python.org/2.7/library/unittest.html#assert-methods). They are very readable.
    2. unittest howto - the example 1 from the python documentation is copied into this repository:
        -  [unittest.TestCase](https://docs.python.org/2.7/library/unittest.html#unittest.TestCase) is the parent class for our class. Inherit from this.
        -  setUp() function contains the components your unit test needs to access.
        -  tearDown() takes anything down like tcp connections, database connections, etc.
        -  Individual tests are methods of unittest.TestCase. Begin with test_ and name them well.
        -  invoke unittest.main(), as in the example.
            1. There is a complex breakdown of this in the documentation.
            2. It is interesting but very detailed. Eventually you may use it.
    3. Now lets integrate our unit tests from our framework into Python's standard framework.
        -  We do this to translate all the insights we got from building our framework into the unittest framework.
        -  This will solidify learning because your brain hasn't accessed that info for around 40-100 minutes.

repository: noisebridge/PythonClass

repo_name: noisebridge/PythonClass


text:
---
layout: post
title: "Merge Sort Algorithm - Implementation and Analysis"
date: "2018-09-19"
slug: "merge-sort"
description: "Merge Sort is a **Divide and Conquer** sorting algorithm with a runtime complexity of $$\theta(nlogn)$$"
category:
  - Algorithm
# tags will also be used as html meta keywords.
tags:
  - Algorithm
  - Sorting
  - Divide and Conquer
show_meta: false
comments: true
mathjax: true
mermaind: true
gistembed: true
published: true
noindex: false
nofollow: false
# hide QR code, permalink block while printing.
hide_printmsg: false
# show post summary or full post in RSS feed.
summaryfeed: false
---
Merge Sort is a **Divide and Conquer** sorting algorithm with a runtime complexity of $$\theta(nlogn)$$
<!--more-->
The simplest implementation of the merge sort algorithm requires an auxilary space of the order of $$O(n)$$ . In this post, I will present this simplest implementation of *mergesort* algorithm along with another attempt to  reduce the space complexity to the $$O(1)$$ by implementing **in-Place** merging. I will also show how both these implementation of merge sort compares with insertion sort which is $$O(n^{2})$$algorithm.

The idea of merge sort is based on Divide and Conquer Paradigm. We first recursively divide the array into subarrays until no more "Division" or "Partitioning" is possible. We then start merging the partitions in a **Bottom-Up** approach. After each merging, the merged partitions are sorted.

![Merge Sort Algorithm](/assets/Merge_sort_algorithm_diagram.svg)

## Python Implementation with $$O(n)$$ Space Complexity.

```python
    def merge_sort(self, data, start, end):
        if start == end:
            return

        mid = int((start + end)/2)

        # Divide or partitioning Stage
        # Recursive call
        self.merge_sort(start,mid)
        self.merge_sort(mid+1, end)

        # check condition if the two halves are already sorted
        if data[mid] <= data[mid+1]:
            return

        # Take two auxillary arrays left and right
        # for the two partitions in the current
        # recurssion and store values from original
        # unsorted array.

        left = data[start: mid+1]
        right = data[mid+1: end+1]

        left.append(9999999)
        right.append(9999999)

        l = 0
        r = 0

        # MERGING STAGE
        # --------------
        # Iterate through left and right aux array
        # and update original array .after this iteration,
        # the chunck from start to end
        # in the original array is sorted.

        for i in range(start, end+1):
            if left[l] <= right[r]:
                data[i] = left[l]
                l += 1
            else:
                data[i] = right[r]
                r += 1
```

## Python Implementation with In  Place merging. $$O(1)$$ space complexity.

```python
    def InPlace_merge_sort(self, data, start, end):
        if start == end:
            return

        mid = int((start + end) / 2)

        # Divide or partitioning Stage
        # Recursive call
        self.InPlace_merge_sort(start, mid)
        self.InPlace_merge_sort(mid+1, end)

        # check condition if the two halves are already sorted
        if data[mid] <= data[mid+1]:
            return

        l = start
        r = mid+1

        # Merging Stage
        # -------------
        # As long as element at 'l' is less than element at 'r'
        # continue.
        # else :
        # All the remaining element in the left are greater
        # than element at 'r' so shift the remaining array
        # chunck in the left by 1 space
        # and copy the original element at 'r'
        # to the index at 'l'.

        while l <= mid and r <= end:
            if data[l] <= data[r]:
                l += 1
            else:
                temp = data[r]
                data[l+1:r+1] = data[l:r]
                data[l] = temp
                # everything needs to increment here.
                l += 1
                r += 1
                mid +=1
```

## comparing merge sort with insertion sort graphically

From the graph we can see that merge sort is significantly faster than insertion sort algorithm. This is due to the fact that insertion sort grows logarithamically which insertion sort grows quadratically.

![Plot of Merge Sort with Insertion Sort](/assets/comparison-of-merge-sort-with-insertion-sort.png)
![Plot of Inplace Merge Sort with Insertion Sort](/assets/comparison-of-inplace-merge-sort-with-insertion-sort.png)


text:
# RoboGo
### Introduction

Welcome to OpenFRC's RoboGo project! The aim of this project is to bring Go Lang into the FRC community of languages. At the moment, the languages available to FRC coincide with the most widely used languages. That is, the most widely used a few years ago.

There has been a decline in popularity of languages like C++ and Java, which is understandable. Anyone who has spent more than a few days in 'The Land of C++' will know manual memory management is a beast to be feared for the inexperienced programmer. The experience for Java isn't too much better; being a managed language comes with some advantages, but nothing will truly rival the speed of statically compiled code.

#### Go

This is where Golang comes into play. Started as a project from Google (some pretty smart people) in 2009, Golang has been growing in popularity as of late. This is not without good reason; Go brings together the beauty of Java, with the speed of C++, and the simplicity of more modern languages. The one problem with Go, is it's current market space is in web. This project intents to change that perspective, to make Go a more mainstream alternative to the Java's and Cs of the world.

### Status

At the moment, we are a small team of dedicated programmers, and always looking for people who share a love of go and FIRST robotics, and wish to join the ecosystem of OpenFRC. Any contributions would be graciously accepted, be it time, advice, or marketing help. As we are a small team, we may be lacking people who specialize in certain fields, such as networking, low-level hardware interfacing and more.

### Contact Info

If you wish to help contribute or have any questions, please contact me at<EMAIL_ADDRESS>or on Discord on the official FRC Server (discord.gg/frc).

repository: OpenFRC/FRCGopher

repo_name: OpenFRC/FRCGopher


text:
---
layout: post
title: On coffee chats with colleagues
categories: []
tags: [networking, work, career]
---

Networking and getting to know your work colleagues is difficult these
days, especially when you are working remote.

I'm lucky that my current work has some opportunities to make these
connections possible with random pairings for "coffee chats". And here
are some thoughts about the coffee chats I've had so far.

## Setup for coffee chats

First off, these coffee chats are scheduled for 30 minutes. So I try
my best to be timely and respectful of others' time if they have
appointments before or after our chat.

Usually, Outlook or whatever your work's email system should be able
to handle timezones and to show their general availability before
scheduling a meeting. But in case it doesn't, it would be good to
touch base with what times work best.

I'm lucky that I have a Slack channel you can join to opt-in to this
random pairing of coffee chats. If you don't already have this or
something like Donut, then maybe start one yourself.

## Have a quick blurb about yourself ready

To start off, I do end up starting with work just because that is how
we're having this conversation anyway. But then I try to pivot to
other things after.

I like to have some brief introduction to my role at the company and a
project I'm working on. This is great to have for anyone, not just for
these coffee chats.

This is excellent practice to talk about yourself anyways in the event
you have the opportunity to connect and network outside of work too.

## Get to know colleagues personally

I like to think that these chats are a chance for colleagues to try
and not talk about work, per se. Working remote, we're always
connected to the computer doing work, so I like to take this time to
get to know my colleagues a bit.

I have my Zoom background to be of a library I like. Some people have
commented on it and it has brought on some nice conversations about
travel, books, or other hobbies we have.

If work does come up, I try to learn more about how they got there.
Some have worked up the corporate ladder. Some have pivoted from other
fields like I have. Nonetheless, it's so fun to learn.


text:
# Try Out Visual Studio Code Development Containers: Kotlin

Ideas are based on the official **[VS Code Remote Try Java Project](https://github.com/microsoft/vscode-remote-try-java)**

The docker image is based on the ideas from the VS Code java project, but I wanted to try gradle instead.
It also uses JDK version 12.

**[SDKMAN!](https://sdkman.io)** is used to install kotlin in the container, inspiration for this is from the **[docker-sdkman](https://github.com/donbeave/docker-sdkman)** project.

This is a sample project that lets you try out the **[VS Code Remote - Containers](https://aka.ms/vscode-remote/containers)** extension in a few easy steps.

## Challenges ##

SDKMAN! comes with a `sdkman-init.sh` script that sets up the environment for the packages installed by SDKMAN! The file has to be sourced in the current `/bin/bash` which runs inside VS Code. I expected several options to work:

1. Use the CMD directive in the Dockerfile. This is the command that gets executed when the container started. Didn't work...
2. In `devcontainer.json` you find the option `postCreateCommand` where I put the source command. Didn't work either
3. I echoed the source command into `.bashrc` file in the vscode users home. Feels kinda hacky, but maybe you have a better idea. PRs are happily accepted.

## Setting up the development container

Follow these steps to open this sample in a container:

1. If this is your first time using a development container, please follow the [getting started steps](https://aka.ms/vscode-remote/containers/getting-started).

2. **Linux users:** You can update `USER_UID` and `USER_GID` in `.devcontainer/Dockerfile` with your user UID/GID to avoid creating files as root.

3. If you're not yet in a development container:
   - Clone this repository.
   - Press <kbd>F1</kbd> and select the **Remote-Containers: Open Folder in Container...** command.
   - Select the cloned copy of this folder, wait for the container to start, and try things out!

## First steps ##

Examples are from Venkat Subramaniam Programming Kotlin book.

Open the firststeps folder and run `kotlinc-jvm Hello.kt -d Hello.jar` and build a JAVA jar file that you can run with `java -jar Hello.jar`, call the class directly as in `java -classpath Hello.jar HelloKt` or use the `kotlin` tool instead: `kotlin -classpath Hello.jar HelloKt`

### Scripting ###
Runnable kotlin scripts. Files are executable, using the shebang facilities.
Alternatively run with: `kotlinc-jvm -script script.kts`

If all else fails: I put the alias `kts` into the vscode users `.bashrc` file so that you can simply execute any script with `kts script.kts`.

repository: lefoulkrod/vscode-remote-try-kotlin

repo_name: lefoulkrod/vscode-remote-try-kotlin


text:
# Enable RDP on Hyper-V Server 2019

- Run above command on Hyper-V Server Powershell command line:
  - Get Network interface information
    - `Get-NetConnectionProfile`
  - Set Network interface Private, change number of InterfaceIndex
    - `Set-NetConnectionProfile -InterfaceIndex 6 -NetworkCategory Private`

- On SConfig.cmd go on option 7 and (E)nable the Remote Desktop for all connections

- Run again in Powershell command line:
  - Now set exception on firewall
    - `netsh.exe advfirewall firewall add rule name="ICMP ECHOREQUEST" dir=in protocol=icmpv4 action=allow`

### For block this rule and disable RDP, change the Remote Desktop option to (D)isable, and run the command line above on Powershell:
  - `netsh.exe advfirewall firewall add rule name="ICMP ECHOREQUEST" dir=in protocol=icmpv4 action=block`

repository: steniooliv/hyper-v-server-rdp

repo_name: steniooliv/hyper-v-server-rdp


text:
# kjv-bible
In 1604, King James I of England authorized that a new translation of the Bible into English be started. It was finished in 1611, just 85 years after the first translation of the New Testament into English appeared (Tyndale, 1526). The Authorized Version, or King James Version, quickly became the standard for English-speaking Protestants. Its flowing language and prose rhythm has had a profound influence on the literature of the past 400 years.

### Frontend Url
[See live](https://apps.wspecs.com/kjv/)

[![Preview kjv-bible](public/img/preview.png)](https://apps.wspecs.com/kjv/)

## Imported NPM modules

* [@types/body-parser](https://www.npmjs.com/package/@types/body-parser)
* [@types/chalk](https://www.npmjs.com/package/@types/chalk)
* [@types/cookie-parser](https://www.npmjs.com/package/@types/cookie-parser)
* [@types/cookies](https://www.npmjs.com/package/@types/cookies)
* [@types/ejs](https://www.npmjs.com/package/@types/ejs)
* [@types/express](https://www.npmjs.com/package/@types/express)
* [@types/html-minifier](https://www.npmjs.com/package/@types/html-minifier)
* [@types/minimist](https://www.npmjs.com/package/@types/minimist)
* [@types/mkdirp](https://www.npmjs.com/package/@types/mkdirp)
* [@types/mongoose](https://www.npmjs.com/package/@types/mongoose)
* [@types/node](https://www.npmjs.com/package/@types/node)
* [@types/password-hash](https://www.npmjs.com/package/@types/password-hash)
* [@types/randomstring](https://www.npmjs.com/package/@types/randomstring)
* [bible-passage-reference-parser](https://www.npmjs.com/package/bible-passage-reference-parser)
* [chalk](https://www.npmjs.com/package/chalk)
* [cookie-parser](https://www.npmjs.com/package/cookie-parser)
* [cookies](https://www.npmjs.com/package/cookies)
* [ejs](https://www.npmjs.com/package/ejs)
* [express](https://www.npmjs.com/package/express)
* [html-minifier](https://www.npmjs.com/package/html-minifier)
* [minimist](https://www.npmjs.com/package/minimist)
* [mkdirp](https://www.npmjs.com/package/mkdirp)
* [mongoose](https://www.npmjs.com/package/mongoose)
* [reflect-metadata](https://www.npmjs.com/package/reflect-metadata)
* [remove-accents](https://www.npmjs.com/package/remove-accents)
* [scripty](https://www.npmjs.com/package/scripty)
* [typescript](https://www.npmjs.com/package/typescript)

## Set Up

Install and run an instance of
[MongoDB](https://docs.mongodb.com/manual/installation), then run the following
command

```
npm run init
npm run dev
```

## License
[ISC](LICENSE)

license: ISC

repository: wspecs/kjv-wspecs-apps

repo_name: wspecs/kjv-wspecs-apps