text:
# Build SDK Source

[SDK binaries](https://github.com/subor/sdk/releases) should be sufficent for the majority of development scenarios (also check the [Unity](unity.md) and [UE4](ue4.md) docs).

This document discusses building the SDK yourself.  This may be necessary in the following situations:

* You use a [supported programming language](https://thrift.apache.org/docs/Languages) whose API we don't provide
* You need libraries built with a particular toolchain or compiler/linker flags

As discussed [here](layer0.md), the client SDK uses [Apache Thrift](https://thrift.apache.org/).  The Thrift interface definitions, C++/C# Visual Studio projects, and sourcecode for the Ruyi SDK are available from the [SDK source repository](https://github.com/subor/sdk/tree/master/ThriftFiles).

## C++

__Prerequisites__

* See [C++ prerequsites](cplusplus.md#prerequisites)
* External C++ libraries [provided by us](https://github.com/subor/sdk/releases), or built on your own:
    * [thrift](https://thrift.apache.org/) version 0.12 [Download](https://thrift.apache.org/download)
        * [boost](http://www.boost.org/) version 1.64.0 (used by thrift) [Download](https://sourceforge.net/projects/boost/files/boost-binaries/1.64.0/)
        * [openssl](https://www.openssl.org/) version 1.1.1-dev (used by thrift)
    * [jsoncpp](https://github.com/open-source-parsers/jsoncpp) version version 1.8.3 (used by cpp unit test) [Download](https://github.com/open-source-parsers/jsoncpp/releases/tag/1.8.3)
    * [zeromq](http://zeromq.org/) version 4.2

__Instructions__

1. Clone or download `https://github.com/subor/sdk.git` to __sdk__ folder:
    `git clone<EMAIL_ADDRESS>sdk`
1. Unzip external libs (listed [above in prerequisites](#prerequisites)) to __externals/__ folder which is sibling of __sdk/__:

        +---externals
        |   +---boost_1_64_0
        |   |   +---boost
        |   |   \---lib
        |   |       \---x64
        |   +---jsoncpp
        |   |   +---include
        |   |   |   \---json
        |   |   \---src
        |   |       \---lib_json
        |   +---OpenSSL
        |   |   +---include
        |   |   |   \---openssl
        |   |   \---lib
        |   |       \---engines-1_1
        |   |   +---src
        |   |   |   \---thrift
        |   |   \---test
        |   +---thrift.csharp
        |   \---ZeroMQ
        |       +---include
        |       \---lib
        \---sdk
            +---RuyiLogger
            +---RuyiSDK
            +---RuyiSDKCpp
            +...

1. Build external libs
    * If asked to retarget projects, for __Windows SDK version__ pick `10.0.15063.0` and __Platform Toolset__ `Upgrade to v141` (or whatever is appropriate for your codebase)
    * Select __Release__ and __x64__ when possible
1. Open `sdk/SDK.sln`
    * __Release__ is for libraries compiled with `/MD`
    * __Release_mt__ is for libraries compiled with `/MT`
1. [Build the SDK](#building)

## C Sharp/C# #

__Prerequisites__

* [thrift](https://thrift.apache.org/) version 0.12 [Download](https://thrift.apache.org/download)
* [netmq](https://netmq.readthedocs.io/en/latest/) version <IP_ADDRESS> (via nuget)

__Instructions__

1. Open `sdk/SDK.sln`
    * `.Net Framework 3.5` contains projects suitable for Unity 3D
    * `.Net Standard` contains projects targetting [.Net Standard 2.0](https://docs.microsoft.com/en-us/dotnet/standard/net-standard)
1. [Build the SDK](#building)

## Building

The runtime, [layer0](layer0.md), checks the version of the SDK used by client applications.  To satisfy this check the SDK should be compiled as the same version.

1. Get version to build SDK for
    * Right-click `Layer0/Layer0.exe`, select __Properties__ then __Details__ tab and note __File version__ value.  It should be similar to `a.b.c.d` (e.g `<IP_ADDRESS>7`).
1. Build the SDK for that version
    * Pass `/p:AssemblyMain` and `/p:AssemblyRevision` (for C++) and `/p:AssemblyVersion` (for C#) options to __msbuild__:

        `msbuild SDK.sln /p:AssemblyVersion=a.b.c.d /p:AssemblyMain=a.b.c /p:AssemblyRevision=d`

        e.g. for `<IP_ADDRESS>7`:

        `msbuild SDK.sln /p:AssemblyVersion=<IP_ADDRESS>7 /p:AssemblyMain=0.7.2 /p:AssemblyRevision=1447`

## Thrift

The SDK source also includes the underlying [Thrift interface definitions](https://github.com/subor/sdk/tree/master/ThriftFiles).  This means the Ruyi SDK can be generated for a [large number of different langauges](https://thrift.apache.org/docs/Languages).

Run `thrift.exe --help` for a full list of supported languages (generators) and options.

The API Tool provided with [devtool](devtool.md#api-tool) provdes some assistance working with our Thrift files.

repository: subor/sdk

gha_language: C#

repo_name: subor/sdk


text:
---
templateKey: blog-post
title: English for software developers
date: 2019-05-26T19:07:11.509Z
description: Why I think non native english speakers should invest in their language skills
featuredpost: true
featuredimage: /img/english_business_1.jpg
tags:
  - development
  - english
  - language
  - self improvement
  - practice
---
![A hand holding a pen, finishing the sentence "Do you speak english?"](/img/english_business_1.jpg "Do you speak english")

If you are a software developer, there is approximately zero chance that you don't already know some english.

In fact more than likely, you know enough english to read through most forums threads, stack overflow Q&As and tutorials. You can also follow along any video tutorials you encounter.

Then one day you have to actually interact with another human being in english. It may be your boss, a client, a stake holder or a colleague. After the first few times of heavy sweating and increased heartbeat, you got used to it, and now you can get through any type of conference call. You even understand _most_ of what is being said.

That's it, you now know enough english to be able to do your work and you never have to worry about that again, right?

Well, I don't think so. In fact, I would strongly argue that most software developers who don't use english as their first language, should value practicing it as much as they value practicing code testing or source control.

## Does anyone really care, as long as they can understand me?

I believe so.  In fact, I'm an optimist, so I'll say most people probably aren't even consciously aware of the bias they have. But nevertheless I'm quite certain that really poor english skills are holding you back.

If people are struggling to piece together what you are trying to say, they will most likely stick to the big picture. Any finer details of your point will be lost along the way.

What is absolutely certain is that you will have a far tougher time forming a deeper connection with them, socializing and taking the whole working relationship to the next level.

Getting better at english will also make you feel more confident and allow you to focus more on the point you are making.

##

## All of this applies only if I actually work with native English speakers, right?

Well, yeah, that's true. But these days you'd be really hard pressed to find a job that requires zero interaction with english speakers. Be that native english speakers or simply people around the globe who don't share your language, you are bound to use english sooner or later.

Even if you most definitely have zero need to speak english at your current position, there are good chances that you will change jobs or change what you do, and also good chances your next job _will_ require speaking english. So why not start preparing now?

## So how do I get better?

My main advice is to try and listen.

I personally know a bunch of great software developers who speak mediocre english at best, and even though they are exposed to both native english speakers as well as more skilled colleagues every day, they never improve, not one bit.

Most likely, they simply aren't giving it any thought. That could be the mistake holding their careers back.

One good tip is to record yourself. The next time you have a chat in english, just record yourself. Heck, you can even start recording and just talk by yourself for the sole purpose of evaluating where you are.

Then compare that to a native person speaking.

Try and spot the differences in tone, melody, timing, pacing, pronunciation and grammar.

As long as you are actively thinking about what mistakes you are making, you can make a conscious effort to correct those mistakes the next time, soon enough the correct way should start sounding better to you, and you'll automatically switch to it.

I'm not going to expand further on language learning techniques, the internet is full of articles, tutorials, apps, videos and what nots for language learners. My main goal was to argue that "good enough" is not good enough.

## Disclaimer

There are bound to be errors in this blog post. Maybe even basic ones. I'm sure there's some dodgy grammar here and there.

I am definitely not a native english speaker.  I'm a self taught english speaker. When i was a little kid I watched a lot of cartoon network with no subtitles, and I started using a PC. Both were not possible without english, so I had little choice but to learn. I later made an effort to pay close attention to english in every movie, tv show or cartoon I watched, picking up on the subtleties of the language.

I'm not saying my english is perfect by any stretch of the imagination, nor that everyone should simply copy what I am doing. I'm just giving my perspective as someone who has worked a lot with both native and non native english speaking devs.

Also, this post was made with a hefty dose of automatic spell checking built into Chrome. Thanks, google :)

license: MIT

branch_name: refs/heads/master

extension: md

license_type: permissive


text:
# Client

In `quic-go/example/client`

```
/usr/local/go/bin/go run main.go https://localhost:6121/
```

This will completely crawl the target website, downloading everything but not writing
anything to disk.

Optionally you may provide an `-o=n` switch where `n` is the number of concurrent requests the crawler shall make.

# Server

In `quic-go/example`

```
/usr/local/go/bin/go run main.go -www ~/
```

Replace `~/` with your `HTTP_ROOT`. The h2quic server will create an index if no index page is available so you can just point it to a random folder and then download all the files in it.

repository: vanvantong/plus-quic-go

repo_name: vanvantong/plus-quic-go


text:
+++
title = "Dynamic Content"
weight = 30
lastModifierDisplayName =<EMAIL_ADDRESS>date = 2018-03-23
+++

{{% notice note %}}
{{% siteparam "disclaimer" %}}
{{% /notice %}}

## Dynamic Component

Sometimes you want create HTML using an algorithm instead of a template. Think of a chess board. It would be boring to create the HTML table by hand. In Blazor, you can ignore the template and create the component fully in C#. The following code sample demonstrates that. It creates a tic-tac-toe board with nine cells and some CSS classes for formatting.

The class that is used for dynamically generating content is `Microsoft.AspNetCore.Blazor.RenderTree.RenderTreeBuilder` ([source on GitHub](https://github.com/aspnet/Blazor/blob/release/0.1.0/src/Microsoft.AspNetCore.Blazor/RenderTree/RenderTreeBuilder.cs)). It contains methods to open elements, add attributes, add content, add components, etc. Take a look at the source code or use IntelliSense in Visual Studio to see all available render methods.

Note that you can put this class anywhere in your project. Just make sure to add the `Route` attribute as shown in the example below. [Blazor's router](../router/) will work just fine for your code-only component.

```cs
using Microsoft.AspNetCore.Blazor.Components;
using Microsoft.AspNetCore.Blazor.RenderTree;

namespace BlazorPages.Pages
{
    [Route("/dynamic-render-tree")]
    public class DynamicRenderTree : BlazorComponent
    {
        protected override void BuildRenderTree(RenderTreeBuilder builder)
        {
            var seq = 0;
            builder.OpenElement(seq, "table");
            builder.OpenElement(++seq, "tbody");

            for (var row = 0; row < 3; row++)
            {
                builder.OpenElement(++seq, "tr");
                for (var col = 0; col < 3; col++)
                {
                    builder.OpenElement(++seq, "td");
                    builder.AddAttribute(++seq, "class", "tictactoe-cell");
                    builder.CloseElement();
                }

                builder.CloseElement();
            }

            builder.CloseElement();
            builder.CloseElement();
        }
    }
}
```

## Render Fragments

It is not necessary to build the entire component in C#. You can also dynamically generate fragments as shown in the following example. Note that the method creating the render fragment (delegate in `DynamicFragment`) is called whenever a rendering occurs, not just during component load.

```cs
@page "/render-fragment"

<h1>Welcome</h1>

<p>Lorem ipsum...</p>

<button type="button" @onclick(() => ShouldRender())>
    Trigger rendering (i.e. makes text longer)
</button>

@DynamicFragment

<p>Lorem ipsum...</p>

@functions {
    private string dynamicContent = "This is a long text...";

    protected override void OnInit()
    {
        DynamicFragment = builder =>
        {
            // Make the text longer every time this delegate is called
            dynamicContent = dynamicContent.Replace("long", "long long");

            builder.OpenElement(1, "p");
            builder.AddContent(2, dynamicContent);
            builder.CloseElement();
        };
    }

    private Microsoft.AspNetCore.Blazor.RenderFragment DynamicFragment;
}
```

repository: daveaglick/learn-blazor

repo_name: daveaglick/learn-blazor


text:
##Quick Setup

First, install wkhtmltopdf from here.

Navigate to the server directory in our app using command-line.

Run npm install

Rename your excel file to input.xls and place in the server/uploads directory

Run node initial.js and wait for it to finish

Now, if you run node app.js, the mails would be sent to the participants

##Note

Your excel file should only be in .xls format

Your excel file should contain name, lastName, email, college and event columns

repository: abinthomasonline/e-certificates

repo_name: abinthomasonline/e-certificates


text:
---
title: "Fight Complexity with Functional Programming"
header-image: https://img.youtube.com/vi/Dvr6gx4XaD8/hqdefault.jpg
category: videos
tags: [core]
link: https://youtu.be/Dvr6gx4XaD8
event: All Things Open 2020
---

A Metric-driven approach to reduce Cognitive Complexity in a code base, using Functional Programming, demoed hands-on, by solving a complex real-world ubiquitous design challenge - REST API Bulk Request Validation, with an extensible Framework that separates what-to-do (Validations) from how-to-do (Validation Orchestration). Let's do a case study of a successful implementation done by our team in the world's largest SaaS org, Salesforce, using Kotlin and Arrow.

repository: arrow-kt/arrow-media

branch_name: refs/heads/main

gha_language: SCSS

gha_license_id: NOASSERTION

repo_name: arrow-kt/arrow-media


text:
Ingredients, Quantities and Units Evaluation
-------

To run the evaluation scripts, first add the texts to the EvaluationSet directory.

In order to do this:

* Read in the file ids from the file SampleForIngredientQuantityUnitEvaluation.tsv and download the corresponding files. Rename each file to the id provided in the column 'id'
* Put the files in the corresponding batches in EvaluationSet, each batch has 10 files.

You can now run the different evaluations notbooks such as EvaluateIngredientsAllerhande or EvaluateQuantitiesUnits

repository: DHLab-nl/historical-recipe-web

repo_name: DHLab-nl/historical-recipe-web


text:
### Changed
- Drop support for Python 3.7 ([#151](https://github.com/blairconrad/dicognito/issues/151))

### Fixed
- Version table format has bad separator ([#147](https://github.com/blairconrad/dicognito/issues/147))

## 0.16.0a1

### Changed

- Require pydicom 2.3.1 or higher ([#136](https://github.com/blairconrad/dicognito/issues/136))

### New

- Officially support Python 3.11 ([#136](https://github.com/blairconrad/dicognito/issues/136))
- Complete list of attribute changes now listed in README ([#140](https://github.com/blairconrad/dicognito/issues/140))

## 0.15.0

### Changed

- If neither `--in-place`/`-i` or `--output-directory`/`-o` are specified on the command line, a
  warning will be printed ([#134](https://github.com/blairconrad/dicognito/issues/134))

  The anonymization will proceed as if `--in-place`/`-i` were specified.
  A future release will require that one of the options be specified.

### New

- `--in-place`/`-i` flag added to explicitly specify in place editing of source files ([#134](https://github.com/blairconrad/dicognito/issues/134))

  It's an error to specify both `--in-place`/`-i` and `--output-directory`/`-o`.

## 0.14.0

### Changed

- Now assuming DA fields are 8 characters long ([#123](https://github.com/blairconrad/dicognito/issues/123))
- Summary formatted as GitHub Flavored Markdown ([#125](https://github.com/blairconrad/dicognito/issues/125))
- Anonymized UI values are now consistent between runs if the same seed is supplied ([#126](https://github.com/blairconrad/dicognito/issues/126))

## 0.13.0

### New

- Command line options define how to detect and handle burned-in annotations in source
  ([#44](https://github.com/blairconrad/dicognito/issues/44),
   [#113](https://github.com/blairconrad/dicognito/issues/113)):
    ```bash
    dicognito --assume-burned-in-annotation if-yes --on-burned-in-annotation warn  # default
    dicognito --assume-burned-in-annotation unless-no
    dicognito --assume-burned-in-annotation never
    dicognito --on-burned-in-annotation fail
    ```
- Indicate filename when anonymization fails ([#120](https://github.com/blairconrad/dicognito/issues/120))
- Officially support Python 3.10 ([#115](https://github.com/blairconrad/dicognito/issues/115))

### Fixed

- Fails to anonymize LEI file with Mitra global patient ID when using pydicom 2.2.x ([#118](https://github.com/blairconrad/dicognito/issues/118))

### Additional Items

- Add type hints, per [PEP 484](https://www.python.org/dev/peps/pep-0484/)
  ([#111](https://github.com/blairconrad/dicognito/issues/111))
- Remove Python 2.7 shims ([#105](https://github.com/blairconrad/dicognito/issues/105))

### With special thanks for contributions to this release from:
- [justineclin](https://github.com/justineclin) 🥇

## 0.12.0

### New

- Officially support Python 3.9 ([#99](https://github.com/blairconrad/dicognito/issues/99))
- Command line flag `--version` also outputs environmental info and pydicom version ([#103](https://github.com/blairconrad/dicognito/issues/103))

### Fixed

- Unable to anonymize dataset with encapsulated pixel data that contains embedded sequence delimiter ([#96](https://github.com/blairconrad/dicognito/issues/96))

## 0.11.0

### New

- Officially support Linux (tested on Ubuntu) ([#85](https://github.com/blairconrad/dicognito/issues/85))

### Changed

- Require pydicom 2.0.0 or higher ([#92](https://github.com/blairconrad/dicognito/issues/92))

### Fixed

- Deflated files are corrupt when anonymized from the command line ([#80](https://github.com/blairconrad/dicognito/issues/80))
- Date/time offset is not always the same for a given seed ([#86](https://github.com/blairconrad/dicognito/issues/86))
- Anonymizing dataset with StationName but no Modality fails ([#97](https://github.com/blairconrad/dicognito/issues/97))

## 0.10.0

### New

- Test on Python 3.8 as well as 3.7

### Fixed

- Same patient names anonymize differently when formatted differently ([#78](https://github.com/blairconrad/dicognito/issues/78))

## 0.9.1

### Fixed

- Fails to anonymize object with Issue Date of Imaging Service Request ([#72](https://github.com/blairconrad/dicognito/issues/72))

## 0.9.0

### New

- Add option to write anonymized files to another directory ([#69](https://github.com/blairconrad/dicognito/issues/69))

## 0.8.1

### Fixed

- Fails to anonymize TimeOfLastCalibration ([#66](https://github.com/blairconrad/dicognito/issues/66))

## 0.8.0

### Changed

- Drop support for Python 2.7 ([#63](https://github.com/blairconrad/dicognito/issues/63))
- Require pydicom 1.3 or higher ([#62](https://github.com/blairconrad/dicognito/issues/62))

### New

- Anonymize placer- and filler-order numbers ([#58](https://github.com/blairconrad/dicognito/issues/58))
- Anonymize Mitra Global Patient IDs ([#60](https://github.com/blairconrad/dicognito/issues/60))

### Fixed

- Fails on multi-valued dates and times ([#61](https://github.com/blairconrad/dicognito/issues/61))

## 0.7.1

### Fixed

- Command-line anonymizer fails if an object doesn't have an AccessionNumber ([#55](https://github.com/blairconrad/dicognito/issues/55))

## 0.7.0

### Changed

- Renamed "salt" to "seed" in command-line tool and `Anonymizer` class ([#49](https://github.com/blairconrad/dicognito/issues/49))

### New

- Provide `--version` flag and `__version__` attribute ([#47](https://github.com/blairconrad/dicognito/issues/47))
- Add De-identification Method after anonymizing ([#42](https://github.com/blairconrad/dicognito/issues/42))
- Add Patient Identity Removed attribute when appropriate ([#43](https://github.com/blairconrad/dicognito/issues/43))

### Additional Items

- Add API documentation ([#45](https://github.com/blairconrad/dicognito/issues/45))
- Enforce black formatting via tests ([#50](https://github.com/blairconrad/dicognito/issues/50))
- Enforce PEP-8 naming conventions via tests ([#53](https://github.com/blairconrad/dicognito/issues/53))

## 0.6.0

### Changed

- Made InstitutionName more unique ([#19](https://github.com/blairconrad/dicognito/issues/19))

### Additional Items

- Add how_to_build.md ([#8](https://github.com/blairconrad/dicognito/issues/8))
- Update CONTRIBUTING.md ([#9](https://github.com/blairconrad/dicognito/issues/9))
- Update package keywords and pointer to releases ([#37](https://github.com/blairconrad/dicognito/issues/37))
- Update docs in README ([#36](https://github.com/blairconrad/dicognito/issues/36))

## 0.5.0

### New

- Add option to anonymize directory trees ([#22](https://github.com/blairconrad/dicognito/issues/22))
- Support python 3.7 ([#31](https://github.com/blairconrad/dicognito/issues/31))

### Additional Items

- Format code using [black](https://black.readthedocs.io/en/stable/)
  ([#33](https://github.com/blairconrad/dicognito/issues/33))

## 0.4.0

### Changed
- Anonymize files in place ([#21](https://github.com/blairconrad/dicognito/issues/21))

### New

- Print summary of anonymized studies ([#2](https://github.com/blairconrad/dicognito/issues/2))

### Additional Items

- Use tox for testing ([#28](https://github.com/blairconrad/dicognito/issues/28))

## 0.3.1.post7

### Fixed

- Cannot anonymize instance lacking `PatientSex` ([#24](https://github.com/blairconrad/dicognito/issues/24))

### Additional Items

- Test on a CI environment ([#11](https://github.com/blairconrad/dicognito/issues/11))
- Add tools for preparing release branch and auto-deploying ([#17](https://github.com/blairconrad/dicognito/issues/17))

## 0.3.0

### New
- Add option to add a prefix or suffix for some IDs ([#1](https://github.com/blairconrad/dicognito/issues/1))

## 0.2.1

### New
- Initial release, with minimal functionality

### With special thanks for contributions to this release from:
- [Paul Duncan](https://github.com/paulsbduncan) 🥇

repository: blairconrad/dicognito

gha_language: Python

gha_license_id: MIT

repo_name: blairconrad/dicognito


text:
---
layout: post
title: "Gryadka is not Paxos, so it's probably wrong (RETRACTED)"
comments: true
permalink: "if-its-not-paxos-its-probably-wrong-gryadka"
---

*[Leslie Lamport][lamport] purportedly once said (though I can't prove it):*

> If it's not Paxos, it's probably wrong.

In the original version of this post, I claimed that [gryadka][gryadka], which
claims to be built on top of a Paxos-backed CAS register, was incorrect by
providing a "counter-example".

It turns out that you really drop 20 IQ points on a vacation, and that I had
not at all provided a counter-example, despite having looked closely at the
algorithm.

My claim that the Paxos-style CAS register exhibited anomalies is thus wrong
(or, at least, unproven).

My apologies to [@rystsov][rystsov-tw], who kindly pointed out my mistake. I'll
look into the algorithm more (post-vacation), but now considering that it might
be correct, which would be quite exiting - perhaps there are Paxos-like things
which are not Paxos but are not wrong.

The original version of this post is available in the [commit history][ch],
preserved for posterity. My mistake not carrying out the read phase in the
middle fully: If you do, then you'll commit the old value "again", making the
anomaly-exhibiting later CAS fail.

[lamport]: http://lamport.azurewebsites.net
[rystsov-tw]: https://twitter.com/rystsov
[gryadka]: https://github.com/gryadka/js
[ch]: https://github.com/tschottdorf/tschottdorf.github.io


text:
---
layout: default
---

# 1996-07-24 - Re: DES brute force? (was: Re: Borders *are* transparent)

## Header Data

From: "Dan Bailey"<EMAIL_ADDRESS>To<EMAIL_ADDRESS>Message Hash: 5602bdff94dd7989c37549b957b8f7debfdd61adb93342ff2f0d3188c3ca1603

Message ID<EMAIL_ADDRESS>Reply To: _N/A_

UTC Datetime: 1996-07-24 12:03:16 UTC

Raw Date: Wed, 24 Jul 1996 20:03:16 +0800

## Raw message

```
{% raw  %}From: "Dan Bailey"<EMAIL_ADDRESS>Date: Wed, 24 Jul 1996 20:03:16 +0800
To<EMAIL_ADDRESS>Subject: Re: DES brute force? (was: Re: Borders *are* transparent)
Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

If we choose a plaintext/ciphertext pair carefully, we can easily save
ourselves some work (50%) while still making the attack a credible
demonstration.  The idea is to use each trial encryption twice.
	In _Differential Cryptanalysis of the Data Encryption Standard_, Biham and
Shamir note the following, known as the complementation property of DES:

if T = DES(P, K) where T is ciphertext, P plaintext, and k key, then:
T' = DES(P', K') where T', P', and K' are the bitwise complement of the above.

Now the interesting part. If two pairs (P1,T1) and (P2,T2) are available with
P1 = P2' or T1 = T2', then an attacker can restrict his search to only the keys
with LSB = 0.  The attacker runs through the remaining 2^55 keys (with LSB = 0)
and tests the results against both T1 and T2'.  Since testing for equality is
much faster than performing the actual encryption, time savings is on the order
of 50%.

Just a thought on how to save some cycles.
					Dan

{% endraw %}
```

## Thread

+ Return to [July 1996](/archive/1996/07)

+ Return to "["Dan Bailey" <dan@milliways.org>](/authors/dan_bailey_dan_at_milliways_org_)"

+ 1996-07-24 (Wed, 24 Jul 1996 20:03:16 +0800) - Re: DES brute force? (was: Re: Borders *are* transparent) - _"Dan Bailey"<EMAIL_ADDRESS>


text:
# Snabb NFV Test Suite Walk-through

## Prerequisites

On a machine with an *Intel 82599 10-Gigabit network interface card* and
*Docker* installed:

```
$ lspci | grep 82599
01:00.0 Ethernet controller: Intel Corporation 82599ES 10-Gigabit SFI/SFP+ Network Connection (rev 01)
01:00.1 Ethernet controller: Intel Corporation 82599ES 10-Gigabit SFI/SFP+ Network Connection (rev 01)

$ which docker
/usr/bin/docker
```

Clone the Snabb Switch repository and build Snabb Switch:

```
$ git clone https://github.com/snabbnfv-goodies/snabbswitch.git
[...]
$ cd snabbswitch
$ (cd src && scripts/dock.sh "(cd ..; make)")
[...]
```

## Test Suite for Linux virtual machines

```
$ (cd src && SNABB_PCI0=0000:01:00.0 \
             SNABB_PCI1=0000:01:00.1 \
             scripts/dock.sh program/snabbnfv/selftest.sh)
Defaulting to SNABB_TELNET0=5000
Defaulting to SNABB_TELNET1=5001
USING program/snabbnfv/test_fixtures/nfvconfig/test_functions/other_vlan.ports
Defaulting to MAC=52:54:00:00:00:
Defaulting to IP=fe80::5054:ff:fe00:
Defaulting to GUEST_MEM=512
Defaulting to HUGETLBFS=/hugetlbfs
Defaulting to QUEUES=1
Defaulting to QEMU=/root/.test_env/qemu/obj/x86_64-softmmu/qemu-system-x86_64
Waiting for VM listening on telnet port 5000 to get ready... [OK]
Waiting for VM listening on telnet port 5001 to get ready... [OK]
USING program/snabbnfv/test_fixtures/nfvconfig/test_functions/same_vlan.ports
1 packets transmitted, 1 received, 0% packet loss, time 0ms
PING succeded.
[  3]  0.0-10.0 sec  8.43 GBytes  7.24 Gbits/sec
IPERF succeded.
1 packets transmitted, 1 received, 0% packet loss, time 0ms
JUMBOPING succeded.
[  3]  0.0-10.0 sec  9.41 GBytes  8.09 Gbits/sec
IPERF succeded.
tx-checksumming: on
TX-CHECKSUMMING succeded.
tx-checksumming: on
TX-CHECKSUMMING succeded.
USING program/snabbnfv/test_fixtures/nfvconfig/test_functions/tx_rate_limit.ports
1 packets transmitted, 1 received, 0% packet loss, time 0ms
PING succeded.
IPERF (RATE_LIMITED) succeded.
IPERF rate is 814 Mbits/sec (900 Mbits/sec allowed).
RATE_LIMITED succeded.
1 packets transmitted, 1 received, 0% packet loss, time 0ms
JUMBOPING succeded.
IPERF (RATE_LIMITED) succeded.
IPERF rate is 814 Mbits/sec (900 Mbits/sec allowed).
RATE_LIMITED succeded.
USING program/snabbnfv/test_fixtures/nfvconfig/test_functions/rx_rate_limit.ports
1 packets transmitted, 1 received, 0% packet loss, time 0ms
PING succeded.
IPERF (RATE_LIMITED) succeded.
IPERF rate is 814 Mbits/sec (1200 Mbits/sec allowed).
RATE_LIMITED succeded.
1 packets transmitted, 1 received, 0% packet loss, time 0ms
JUMBOPING succeded.
IPERF (RATE_LIMITED) succeded.
IPERF rate is 814 Mbits/sec (1200 Mbits/sec allowed).
RATE_LIMITED succeded.
USING program/snabbnfv/test_fixtures/nfvconfig/test_functions/tunnel.ports
Dec 14 2015 14:12:51 nd_light: Resolved next-hop fe80::5054:ff:fe00:0 to 52:54:00:00:00:00
Dec 14 2015 14:12:51 nd_light: Resolved next-hop fe80::5054:ff:fe00:1 to 52:54:00:00:00:01
ND succeded.
1 packets transmitted, 1 received, 0% packet loss, time 0ms
PING succeded.
[  3]  0.0-10.0 sec  6.18 GBytes  5.31 Gbits/sec
IPERF succeded.
1 packets transmitted, 1 received, 0% packet loss, time 0ms
JUMBOPING succeded.
[  3]  0.0-10.0 sec  6.18 GBytes  5.31 Gbits/sec
IPERF succeded.
USING program/snabbnfv/test_fixtures/nfvconfig/test_functions/filter.ports
1 packets transmitted, 1 received, 0% packet loss, time 0ms
PING succeded.
Connection to fe80::5054:ff:fe00:0001%eth0 12345 port [tcp/*] succeeded!
PORTPROBE succeded.
Trying ::1...
Connected to localhost.
Escape character is '^]'.
nc -w 1 -q 1 -v  fe80::5054:ff:fe00:0001%eth0 12346
nc: connect to fe80::5054:ff:fe00:0001%eth0 port 12346 (tcp) timed out: Operation now in progress
root@fe00:~#
root@fe00:~# Connection closed by foreign host.
FILTER succeded.
USING program/snabbnfv/test_fixtures/nfvconfig/test_functions/stateful-filter.ports
1 packets transmitted, 1 received, 0% packet loss, time 0ms
PING succeded.
Connection to fe80::5054:ff:fe00:0001%eth0 12345 port [tcp/*] succeeded!
PORTPROBE succeded.
Trying ::1...
Connected to localhost.
Escape character is '^]'.
nc -w 1 -q 1 -v  fe80::5054:ff:fe00:0001%eth0 12348
nc: connect to fe80::5054:ff:fe00:0001%eth0 port 12348 (tcp) timed out: Operation now in progress
root@fe00:~#
root@fe00:~# Connection closed by foreign host.
FILTER succeded.
Trying ::1...
Connected to localhost.
Escape character is '^]'.
nc -w 1 -q 1 -v  fe80::5054:ff:fe00:0000%eth0 12340
nc: connect to fe80::5054:ff:fe00:0000%eth0 port 12340 (tcp) timed out: Operation now in progress
root@fe00:~#
root@fe00:~# Connection closed by foreign host.
FILTER succeded.
```

## Test Suite for DPDK virtual machines

Run the Snabb NFV DPDK benchmark with varying packet sizes (64, 128, 256,
512, 1500 and 9000 bytes). First run is with DPDK 2.1, second run is with
DPDK 1.7 (with compatibility patches). Numbers are in Mpps (million
packets per second). **Notes:** The `l2fwd` application shipping with
DPDK 2.1 negotiates two additional Virtio-net options, “Indirect
Descriptors” and “Mergeable RX buffers”, and this triggers lower
performance in this benchmark environment. We are identifying the root
cause and then we expect to achieve consistent performance across DPDK
versions. The results below were obtained using an Intel(R) Xeon(R) CPU
E5-2650 0 @ 2.00GHz CPU.

```
$ (cd src && SNABB_TEST_IMAGE=snabbco/nfv-dpdk2.1 \
             SNABB_PCI_INTEL0=0000:01:00.0 \
             SNABB_PCI_INTEL1=0000:01:00.1 \
             scripts/dock.sh 'for c in 64 128<PHONE_NUMBER> 9000; do echo $c $(CAPFILE=$c bench/snabbnfv-loadgen-dpdk); done')
64 2.788
128 2.455
256 2.183
512 2.318
1500 0.818
9000 0.138
```

```
$ (cd src && SNABB_TEST_IMAGE=snabbco/nfv-dpdk1.7 \
             SNABB_PCI_INTEL0=0000:01:00.0 \
             SNABB_PCI_INTEL1=0000:01:00.1 \
             scripts/dock.sh 'for c in 64 128<PHONE_NUMBER> 9000; do echo $c $(CAPFILE=$c bench/snabbnfv-loadgen-dpdk); done')
64 4.358
128 4.477
256 3.923
512 2.312
1500 0.814
9000 # DPDK 1.7 did not support 900 byte packets
```

repository: snabbnfv-goodies/snabbswitch

branch_name: refs/heads/snabbnfv-goodies

gha_language: Lua

repo_name: snabbnfv-goodies/snabbswitch


text:
# Change Log

All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [5.1.4](https://github.com/mlaursen/react-md/compare/v5.1.3...v5.1.4) (2022-06-16)

**Note:** Version bump only for package @react-md/form

## [5.1.3](https://github.com/mlaursen/react-md/compare/v5.1.2...v5.1.3) (2022-05-07)

### Bug Fixes

* **@react-md/form:** fix typo for transparent in disabled toggle hover color ([7346587](https://github.com/mlaursen/react-md/commit/73465874d4223d86b3f98a928b98f45f64f7ff92))

### Documentation

* fix typos throughout codebase ([725d1a2](https://github.com/mlaursen/react-md/commit/725d1a252482dba56088dffa2f773b2ea13fb08a))

### Other Internal Changes

* **typos:** fix additional typos throughout repo ([ef20132](https://github.com/mlaursen/react-md/commit/ef2013288ce8649b9fddba9bc23c71df72ea03a1))

## [5.1.2](https://github.com/mlaursen/react-md/compare/v5.1.1...v5.1.2) (2022-04-02)

**Note:** Version bump only for package @react-md/form

## [5.1.1](https://github.com/mlaursen/react-md/compare/v5.1.0...v5.1.1) (2022-04-01)

**Note:** Version bump only for package @react-md/form

# [5.1.0](https://github.com/mlaursen/react-md/compare/v5.0.0...v5.1.0) (2022-03-18)

### Other Internal Changes

* run lint-scripts --fix for consistent-type-imports ([42d839d](https://github.com/mlaursen/react-md/commit/42d839d359922e0a8ee3775a75162b9755a2c2b6))
* **@react-md/form:** bump nanoid from 3.2.0 to 3.3.1 ([e625488](https://github.com/mlaursen/react-md/commit/e625488fb9683865ec4af8ade0a53a0101b2ee17))

# [5.0.0](https://github.com/mlaursen/react-md/compare/v4.0.3...v5.0.0) (2022-01-31)

### Bug Fixes

* **@react-md/form:** `TextArea` applies custom height style when resize="none" ([e77d939](https://github.com/mlaursen/react-md/commit/e77d939263ed34eb8fea78a1f3698788879401bc))

### Features

* **@react-md/form:** Update `TextFieldContainer` to optionally fill all space in flex containers ([2c8e68c](https://github.com/mlaursen/react-md/commit/2c8e68ccb004c9a36da773fd8cd3873df7b4184b))

### Other Internal Changes

* feat!(menu): Implemented new Menu API ([c27bf55](https://github.com/mlaursen/react-md/commit/c27bf558a950bf2938811a98b2b168efca4055cc))
* chore!(icon): Renamed the download icon to upload ([2752a98](https://github.com/mlaursen/react-md/commit/2752a981fe4021636de66f8576fdd8842a7e90af))
* **@react-md/form:** Updated `FileInput` snapshots for new icon ([f5e43fe](https://github.com/mlaursen/react-md/commit/f5e43fe4bf7ccc7f0387d66ae183a2190ad294cb))
* **@react-md/menu:** Added tests for the new menu API and fixed a few issues ([7202dd0](https://github.com/mlaursen/react-md/commit/7202dd00a2e734dd1a58d29142b551d8a9411b5a))

### Breaking Changes

* Menu buttons will no longer open by pressing the
`ArrowUp` or `ArrowDown` keys.
* The `DropdownMenu` component no longer accepts a list
of `items` and instead the `children` should be the `MenuItem`
components.
* The `DropdownMenu` component no longer supports the
`menuRenderer` and `itemRenderer` props. Instead, there is built-in
support for conditionally rendering as a `Sheet` component using the
`renderAsSheet` prop.
* The `DropdownMenu` component now requires a parent
`AppSizeListener` because of the conditional `Sheet` rendering
functionality. This might require updating your tests to either use the
`Configuration` component from `@react-md/layout` (recommended) or
adding the `AppSizeListener` to tests that include `DropdownMenu`s.
* The `DropdownMenuItem` component is no longer required
for nested dropdown menus and is an "internal" component instead that
shouldn't really be used.
* The `MenuItemSeparator` now renders as an `<li>`
instead of an `<hr>` or `<div>`.
* The `useContextMenu` now returns an object instead of an
ordered list.
* Using any of the `MenuItem` components requires the
`<MenuKeyboardFocusProvider>` to be mounted as a parent component which
might affect tests. This will not break anything if you are using the
`DropdownMenu` or `Menu` components.

## [4.0.3](https://github.com/mlaursen/react-md/compare/v4.0.2...v4.0.3) (2021-12-31)

### Other Internal Changes

* Update tests to use jest.mocked ([4bb25fb](https://github.com/mlaursen/react-md/commit/4bb25fb3f1c74a6df643aff5e6fc28fa33cff29e))
* Updated all packages' peerDependenciesMeta ([60fcd71](https://github.com/mlaursen/react-md/commit/60fcd719ac785c2f0b9d27cda82baa3c773c0e5a)), closes [#1319](https://github.com/mlaursen/react-md/issues/1319)

## [4.0.2](https://github.com/mlaursen/react-md/compare/v4.0.1...v4.0.2) (2021-11-30)

### Bug Fixes

* **@react-md/form:** Prevent scrolling while dragging `Slider` on mobile ([7eb6740](https://github.com/mlaursen/react-md/commit/7eb674060bae10950007f6666497d6c16a0f3132))

## [4.0.1](https://github.com/mlaursen/react-md/compare/v4.0.0...v4.0.1) (2021-11-27)

### Bug Fixes

* **@react-md/form:** Added fixes required for Concurrent Rendering ([b4994f4](https://github.com/mlaursen/react-md/commit/b4994f4d927d90c9a5635bdd57464c19ea935100))
* **@react-md/utils:** Update `getPercentage` to optionally not throw errors ([ff8a1d6](https://github.com/mlaursen/react-md/commit/ff8a1d6bbcf4539e5175987f1570699b06cceb09))

### Other Internal Changes

* Updated imports to use `import type` when possible ([ba96bb6](https://github.com/mlaursen/react-md/commit/ba96bb62eeddcc0879f6d584aa670850203561e6))

# [4.0.0](https://github.com/mlaursen/react-md/compare/v3.1.1...v4.0.0) (2021-11-24)

### Bug Fixes

* **sass:** Do not use legacy global functions ([6159e16](https://github.com/mlaursen/react-md/commit/6159e161af72a6e2d5fe43afb02ef537c3f55c11))

### Features

* Update to use new JSX Transform and latest `eslint` ([8111cd3](https://github.com/mlaursen/react-md/commit/8111cd31e45bf60c1b92509264af1b71dfba5696))
* **@react-md/transition:** No longer use findDOMNode for transitions ([cb952da](https://github.com/mlaursen/react-md/commit/cb952da5b0cd0a67b9650e45d1e29896d66f01e1))
* **@react-md/typography:** Renamed Text to `Typography` ([30cf056](https://github.com/mlaursen/react-md/commit/30cf056fbaf0e3d28e04dd03f1fd37929967f7ab))

### Documentation

* **@react-md/form:** Updated hook overrides so documentation appears correctly ([436fbff](https://github.com/mlaursen/react-md/commit/436fbff934ee1ca20a7bc0dc6855e1ffcaad9edf))

### Other Internal Changes

* always skip lib check ([229cef1](https://github.com/mlaursen/react-md/commit/229cef1e3d338ea362c1a2eaac06204c84ff21a6))
* **react-md:** Remove prop-types package and usage ([2637a6f](https://github.com/mlaursen/react-md/commit/2637a6f43d681a06054e3a4518f692cf51baf997))
* **stylelint:** Updated to use `stylelint` ([22d1598](https://github.com/mlaursen/react-md/commit/22d15985061df76d827d4ca9319198526e320f11))

### Breaking Changes

* Minimum React version is now 16.14 instead of 16.8
* **@react-md/typography:** The Text component has been renamed to Typography to
help with auto-imports conflicting with the Text element that exists in
`lib.d.ts`
* **react-md:** There will no longer be run-time prop validation with
the `prop-types` package.

# [3.1.0](https://github.com/mlaursen/react-md/compare/v3.0.1...v3.1.0) (2021-09-10)

### Bug Fixes

* **@react-md/form:** `TooManyFilesError` is only used if all the other validation has passed ([6ed3f54](https://github.com/mlaursen/react-md/commit/6ed3f545fd292ff9d8dfe0c8d554c1dfe3450a01))
* **@react-md/form:** ensure file names end with a period for `useFileUpload` extensions ([9238140](https://github.com/mlaursen/react-md/commit/9238140311c0f27048cd634971bc98fddd531df2))
* **@react-md/form:** prevent infinite rerenders when calling useFileUpload's reset in useEffect ([b2875b1](https://github.com/mlaursen/react-md/commit/b2875b17634651ec26365268658445260cd675ca))
* **typescript:** updated all array types to be readonly ([8f71bcb](https://github.com/mlaursen/react-md/commit/8f71bcbde12928434975c6836079c3dda7c6ab1f))

### Features

* **@react-md/form:** add `isValidFileName` option to `useFileUpload` ([dbd0375](https://github.com/mlaursen/react-md/commit/dbd03756b1b21c528fc0fdee250672e3f52a5997))

### Other Internal Changes

* ran `yarn format` to include new files ([48d3d7f](https://github.com/mlaursen/react-md/commit/48d3d7fddb0435edf7dec9d0ba38cf3f0f251709))
* **typescript:** support<EMAIL_ADDRESS>([5a9dd72](https://github.com/mlaursen/react-md/commit/5a9dd729e1f34df326aee20eca9a7436bb152cd4))

## [3.0.1](https://github.com/mlaursen/react-md/compare/v3.0.0...v3.0.1) (2021-08-15)

### Bug Fixes

* Updated peerDependencies to fix yarn berry peer requirements ([250efcd](https://github.com/mlaursen/react-md/commit/250efcdd81ea39c06b08eb30109589c89d9b8e0f)), closes [#1224](https://github.com/mlaursen/react-md/issues/1224)

# [3.0.0](https://github.com/mlaursen/react-md/compare/v2.9.1...v3.0.0) (2021-08-13)

### Bug Fixes

* **sass:** use math.div instead of division since it's deprecated ([d8c3f12](https://github.com/mlaursen/react-md/commit/d8c3f1299ea35814667c5915880744399e5b2108))

### Other Internal Changes

* **@react-md/dev-utils:** updated variables command to work with `sass` ([5376be1](https://github.com/mlaursen/react-md/commit/5376be11f3499afafd3ddde363178e1aa270cb9c))
* **@react-md/form:** removed deprecated implementation in `useIndeterminateChecked` ([6b7871f](https://github.com/mlaursen/react-md/commit/6b7871f9f0372916ac9b13cb12b49d6d2b52e564))
* **@react-md/utils:** removed InteractionModeListener alias ([216c8ef](https://github.com/mlaursen/react-md/commit/216c8efe62a12e031414d94c17f97cb4c12c4b8e))

### Breaking Changes

* **@react-md/utils:** Removed `InteractionModeListener` since it was an alias for `UserInteractionModeListener`
* **@react-md/form:** The second argument for `useIndeterminateChecked` is now an object of options

## [2.9.1](https://github.com/mlaursen/react-md/compare/v2.9.0...v2.9.1) (2021-07-27)

### Other Internal Changes

* **install:** slighly reduce install size by excluding tests in publish ([9d01a44](https://github.com/mlaursen/react-md/commit/9d01a44b81b619d6ac1c4d458005c99838fc6894))

# [2.9.0](https://github.com/mlaursen/react-md/compare/v2.8.5...v2.9.0) (2021-07-18)

### Bug Fixes

* **@react-md/form:** `FileInput` correctly center the icon when children aren't provided ([3a6ab33](https://github.com/mlaursen/react-md/commit/3a6ab3361e91879a9ecbdaaa71aa084508414b11))

### Features

* **@react-md/form:** `FileInput` automatically swaps button type to text if children exist ([e5585e1](https://github.com/mlaursen/react-md/commit/e5585e1309d4bde0dcd8ed0afc6b737a12863011))
* **@react-md/form:** `FormMessageCounter` component added to public API ([1508812](https://github.com/mlaursen/react-md/commit/15088122c3607730fdc52ff706d1d9ea56a6e32c))
* **@react-md/form:** Added a `useFileUpload` hook to upload files to the browser ([efb3f2f](https://github.com/mlaursen/react-md/commit/efb3f2f2e3f4b848097c42d58da32e42887c541b)), closes [#1159](https://github.com/mlaursen/react-md/issues/1159)

### Other Internal Changes

* **@react-md/form:** Added tests for `useFileUpload` ([49ce4d9](https://github.com/mlaursen/react-md/commit/49ce4d9812a3a854a256c36b7e7ef7fcdb696ba4))
* **react-md.dev:** Added examples for `useFileUpload` ([8f9002e](https://github.com/mlaursen/react-md/commit/8f9002ea95e2562e0d04291c2acc972953eca09e))

## [2.8.5](https://github.com/mlaursen/react-md/compare/v2.8.4...v2.8.5) (2021-07-03)

### Bug Fixes

* **@react-md/form:** `MenuItemCheckbox` added missing indeterminate state ([aa2c552](https://github.com/mlaursen/react-md/commit/aa2c55215812de2052b3af691ac16405806f3952)), closes [#1186](https://github.com/mlaursen/react-md/issues/1186)
* **@react-md/form:** `useIndeterminateChecked` correctly uses readonly prefix ([7f69a71](https://github.com/mlaursen/react-md/commit/7f69a719affbe6d15542225b94ba4b0dc5ea5fa4))
* **@react-md/form:** `useIndeterminateChecked` supports `MenuItemCheckbox` with new option ([9ab67bf](https://github.com/mlaursen/react-md/commit/9ab67bffe5cad01991452bd35fefd2fa0724701e))
* **@react-md/form:** MenuItemCheckbox, MenuItemRadio, and `MenuItemSwitch` styles on light themes ([fc4dcd9](https://github.com/mlaursen/react-md/commit/fc4dcd9a2b687f5cee6a62efefc6ad5d2a87b6cc))

### Documentation

* **@react-md/form:** Updated documentation for `useIndeterminateChecked` ([8646c28](https://github.com/mlaursen/react-md/commit/8646c2819e9c6d03a4635f5813f8f3c93ff6bdd3))

### Other Internal Changes

* **@react-md/form:** Added tests for `useIndeterminateChecked` ([cc2a422](https://github.com/mlaursen/react-md/commit/cc2a4220a964fe128c020bdea058316081092a87))

## [2.8.4](https://github.com/mlaursen/react-md/compare/v2.8.3...v2.8.4) (2021-06-10)

### Bug Fixes

* **@react-md/form:** Pass checked prop to component ([bffae6f](https://github.com/mlaursen/react-md/commit/bffae6f6186f9bb1a9c219d8c3f728fa469b1471))
* **@react-md/form:** Fixed controlled behavior for `Switch` components ([8c65df6](https://github.com/mlaursen/react-md/commit/8c65df67d72c73df759e1a27d9472d9f708bd81f)), closes [#1175](https://github.com/mlaursen/react-md/issues/1175)

### Other Internal Changes

* ran `prettier` after upgrading to v2.3.0 ([3ce236a](https://github.com/mlaursen/react-md/commit/3ce236a6008ff3d57f16cf3f6ab8e85fcce1dd4d))

## [2.8.3](https://github.com/mlaursen/react-md/compare/v2.8.2...v2.8.3) (2021-05-18)

### Documentation

* **react-md.dev:** updated tsdoc to work with `typedoc` ([cf54c35](https://github.com/mlaursen/react-md/commit/cf54c359268332245d1dad8a8d91e0476cd8cb33))

## [2.8.2](https://github.com/mlaursen/react-md/compare/v2.8.1...v2.8.2) (2021-04-23)

**Note:** Version bump only for package @react-md/form

## [2.8.1](https://github.com/mlaursen/react-md/compare/v2.8.0...v2.8.1) (2021-04-23)

### Bug Fixes

* **@react-md/form:** `MenuItemSwitch` spacing styles ([8ac8299](https://github.com/mlaursen/react-md/commit/8ac82999841c87aef307c56266fd29095e36c868)), closes [#1126](https://github.com/mlaursen/react-md/issues/1126)
* **@react-md/form:** Checkbox, Radio, and `Switch` color ([9315eff](https://github.com/mlaursen/react-md/commit/9315efffa1a6f9b1e4e5d4a7932995467d626bc9))

# [2.8.0](https://github.com/mlaursen/react-md/compare/v2.7.1...v2.8.0) (2021-04-22)

### Features

* **@react-md/form:** Implemented `Form` `Menu` Item Components ([fed2b9f](https://github.com/mlaursen/react-md/commit/fed2b9f737810ed2d14bc48a291882653ac565c9))
* **@react-md/transition:** Updated `useFixedPositioning` to merge style objects ([1ab84d7](https://github.com/mlaursen/react-md/commit/1ab84d7e86ed911cb263bb1b25e1085fab3fc2e5))
* **typescript:** bump `typescript` version to v4.2.3 ([b094b36](https://github.com/mlaursen/react-md/commit/b094b364cb43c4db33a112db3feab6e138a3c41c))

### Documentation

* **@react-md/form:** Updated form menu components for better documentation and examples in code ([d9695b7](https://github.com/mlaursen/react-md/commit/d9695b7f548adf867ad89e069da1459361149bfc))

### Other Internal Changes

* **@react-md/form:** Added new for menu item tests ([5cf4f8a](https://github.com/mlaursen/react-md/commit/5cf4f8a0f8a2f5f097198c20a3caae8615a159bd))
* **@react-md/form:** Created `SwitchTrack` and `InputToggleIcon` components ([d9278b3](https://github.com/mlaursen/react-md/commit/d9278b3d8a92920d5bd58edff573f6d575ef3a25))
* **@react-md/form:** moved some toggle styles into separate mixins ([517f199](https://github.com/mlaursen/react-md/commit/517f199efbb08e96b5aee69526b581453874195c))
* **@react-md/form:** simplified toggle icon styles ([adb6b06](https://github.com/mlaursen/react-md/commit/adb6b0607218520ba5de362f07662b8fbe26a680))
* **@react-md/form:** Updated `MenuItemRadio` usage to be wrapped in a group for a11y ([01caa0b](https://github.com/mlaursen/react-md/commit/01caa0bc95a7e1984f141cad4d435d59dfbb4cf2))
* **@react-md/form:** Updated SliderValue to use non-portalled tooltip for existing test ([b41136f](https://github.com/mlaursen/react-md/commit/b41136f6cf6d4bfc58a2c688b28a38c911cba29d))
* **tsconfig:** separate tsconfig by package instead of a single root ([b278230](https://github.com/mlaursen/react-md/commit/b2782303b2a2db07eeaa25b6a3d04337976cffaa))

## [2.7.1](https://github.com/mlaursen/react-md/compare/v2.7.0...v2.7.1) (2021-03-23)

### Bug Fixes

* **@react-md/form:** `Select` correctly respects the `readOnly` prop ([d9a0262](https://github.com/mlaursen/react-md/commit/d9a0262d24eaac49127092f2b6df3eb71bdf8843)), closes [#1089](https://github.com/mlaursen/react-md/issues/1089)
* **@react-md/form:** `Select` correctly updates for the `dense` spec ([2930595](https://github.com/mlaursen/react-md/commit/29305959f0a128376895b6106700226856c7b78b)), closes [#1089](https://github.com/mlaursen/react-md/issues/1089)

### Other Internal Changes

* **ts:** stopped using FC type ([c5daa47](https://github.com/mlaursen/react-md/commit/c5daa47d73516e075c036fd745e7228d7f155a62))

# [2.7.0](https://github.com/mlaursen/react-md/compare/v2.6.0...v2.7.0) (2021-02-28)

### Bug Fixes

* **@react-md/form:** fixed listbox color when dark theme elevation is enabled ([b68ac04](https://github.com/mlaursen/react-md/commit/b68ac04e781787269293e5f63cc8032e2a4382f9)), closes [#1075](https://github.com/mlaursen/react-md/issues/1075)

### Documentation

* **tsdoc:** fixed remaining tsdoc syntax warnings ([946f4dd](https://github.com/mlaursen/react-md/commit/946f4dddf380b9f2313fb76d54d969aa2adbff53))
* **tsdoc:** fixed some tsdoc annotations and styling ([0449b86](https://github.com/mlaursen/react-md/commit/0449b86e4e51793710b35a452b7ebcbb6e7b5b2e))
* **tsdoc:** updated \@since annotations ([c62027e](https://github.com/mlaursen/react-md/commit/c62027ebf2223167a2fde0378882e4b934d61971))

### Other Internal Changes

* updated test coverage to not include conditional component PropTypes ([24e5df1](https://github.com/mlaursen/react-md/commit/24e5df14c731411d7691253383435036326407b5))
* **@react-md/utils:** added `tryToSubmitRelatedForm` util to help with additional a11y ([0566e14](https://github.com/mlaursen/react-md/commit/0566e1497f2ab6f23f7e5acb86464c37d3ee0d44))

# [2.6.0](https://github.com/mlaursen/react-md/compare/v2.5.5...v2.6.0) (2021-02-13)

**Note:** Version bump only for package @react-md/form

## [2.5.5](https://github.com/mlaursen/react-md/compare/v2.5.4...v2.5.5) (2021-01-30)

**Note:** Version bump only for package [@react-md/form](../form)

## [2.5.4](https://github.com/mlaursen/react-md/compare/v2.5.3...v2.5.4) (2021-01-27)

**Note:** Version bump only for package [@react-md/form](../form)

## [2.5.3](https://github.com/mlaursen/react-md/compare/v2.5.2...v2.5.3) (2021-01-12)

### Bug Fixes

- [@react-md/form](../form): fixed floating label behavior for `TextArea`
  ([80c22ba](https://github.com/mlaursen/react-md/commit/80c22ba841fc5370165d659a4c9b0e01a0f41017)),
  closes [#1043](https://github.com/mlaursen/react-md/issues/1043)

## [2.5.2](https://github.com/mlaursen/react-md/compare/v2.5.1...v2.5.2) (2021-01-12)

### Bug Fixes

- [@react-md/form](../form): Added missing containerProps to `TextArea`
  ([695fd2a](https://github.com/mlaursen/react-md/commit/695fd2a589c0b2c8ebc4f17aa71a20346c4591e1))
- [@react-md/form](../form): Fixed floating state for controlled text fields
  ([338d768](https://github.com/mlaursen/react-md/commit/338d76823eea919b3cca3689119306a73002f4f2)),
  closes [#1043](https://github.com/mlaursen/react-md/issues/1043)

## [2.5.1](https://github.com/mlaursen/react-md/compare/v2.5.0...v2.5.1) (2020-12-16)

**Note:** Version bump only for package [@react-md/form](../form)

# [2.5.0](https://github.com/mlaursen/react-md/compare/v2.4.3...v2.5.0) (2020-12-15)

### Bug Fixes

- [@react-md/form](../form): better blur error cases for useNumberField
  ([8b927ab](https://github.com/mlaursen/react-md/commit/8b927ab93ddb5256d384c626c048748262a34642))
- [@react-md/form](../form): fixed FormMessage counter prop-type validation
  ([9ece3e1](https://github.com/mlaursen/react-md/commit/9ece3e1199342a972d7079bd36de7f0ab849fc6c))
- [@react-md/form](../form): fixed messageProps error from react when
  disableMessage is enabled
  ([e452aff](https://github.com/mlaursen/react-md/commit/e452aff2fd5bd8f8b75769a6a38bbe5378214be6))
- [@react-md/form](../form): Floating Label for controlled value Invalid numbers
  ([ef1d764](https://github.com/mlaursen/react-md/commit/ef1d76461047b75ae771c442a3f721286a3542a2))
- [@react-md/form](../form): Maintain Floating Label for Invalid Numbers
  ([2443f9a](https://github.com/mlaursen/react-md/commit/2443f9abb459f9100812c37793d3de2ddbcf36c2))
- [@react-md/form](../form): More fixes for number inputs being considered
  valued
  ([1832e69](https://github.com/mlaursen/react-md/commit/1832e697b1eafddec82a9e2dcccc62acc35c6285))
- [@react-md/form](../form): updated `TextField` PropTypes to allow for search
  input type
  ([23d92dd](https://github.com/mlaursen/react-md/commit/23d92dd8449588ba5ea1a2ee99fdbf4de0e7995e))
- [@react-md/utils](../utils): updated nearest to support a custom range for
  sliders
  ([6cfc67e](https://github.com/mlaursen/react-md/commit/6cfc67e728059cc36aa71d942f5966f4371125a3))

### Features

- [@react-md/form](../form): added a new `useTextField` hook to validate the
  `TextField` and `TextArea` values
  ([578257c](https://github.com/mlaursen/react-md/commit/578257c6cf0d875a57a8d16fe8f5fcaf4a6cdc2b))
- [@react-md/form](../form): added a number-recommended type for validation
  ([18c772e](https://github.com/mlaursen/react-md/commit/18c772e48ff8eedba3d1030a708cb3729afabac7))
- [@react-md/form](../form): added a PasswordWithMessage component to be used
  with use`TextField` Hook
  ([f6d84f2](https://github.com/mlaursen/react-md/commit/f6d84f2bf1631b3d0ddf23bbafa6b7845bf892a1))
- [@react-md/form](../form): added a TextAreaWithMessage component to be used
  with use`TextField` Hook
  ([e358799](https://github.com/mlaursen/react-md/commit/e358799379f1a0633b3d7643c37035cba81e4885))
- [@react-md/form](../form): added a TextFieldWithMessage component to be used
  with use`TextField` Hook
  ([f2d7e5d](https://github.com/mlaursen/react-md/commit/f2d7e5d495fe3f117bca689b25ace095bb600ffe))
- [@react-md/form](../form): added a useNumberField hook to control number field
  values
  ([c705f2c](https://github.com/mlaursen/react-md/commit/c705f2c41fa3a6add76a9ef6d3e93f4f9aaeac13))
- [@react-md/form](../form): better defaults for validation
  ([4003a07](https://github.com/mlaursen/react-md/commit/4003a07cb3396f50268bb50ac108a11d50f41a45))

## [2.4.3](https://github.com/mlaursen/react-md/compare/v2.4.2...v2.4.3) (2020-11-14)

**Note:** Version bump only for package [@react-md/form](../form)

## [2.4.2](https://github.com/mlaursen/react-md/compare/v2.4.1...v2.4.2) (2020-10-23)

**Note:** Version bump only for package [@react-md/form](../form)

## [2.4.1](https://github.com/mlaursen/react-md/compare/v2.4.0...v2.4.1) (2020-10-17)

**Note:** Version bump only for package [@react-md/form](../form)

# [2.4.0](https://github.com/mlaursen/react-md/compare/v2.3.1...v2.4.0) (2020-10-17)

### Bug Fixes

- [@react-md/form](../form): added missing scss variables
  ([ec8d675](https://github.com/mlaursen/react-md/commit/ec8d675c5436e92245ea0a8d07b35345ad30794c))

### Features

- [@react-md/form](../form): updated `TextArea` to use the new useResizeObserver
  API
  ([2c2dd27](https://github.com/mlaursen/react-md/commit/2c2dd27576aeeecb2baba12ef616af45197037db))
- [@react-md/theme](../theme): Better Contrast Colors by Default and dev-utils
  refactor ([#955](https://github.com/mlaursen/react-md/issues/955))
  ([519b128](https://github.com/mlaursen/react-md/commit/519b128522de944d55ff96a1e1125447665ed586))

## [2.3.1](https://github.com/mlaursen/react-md/compare/v2.3.0...v2.3.1) (2020-09-15)

**Note:** Version bump only for package [@react-md/form](../form)

# [2.3.0](https://github.com/mlaursen/react-md/compare/v2.2.0...v2.3.0) (2020-09-10)

### Bug Fixes

- [@react-md/form](../form): added missing scss variables
  ([ec8d675](https://github.com/mlaursen/react-md/commit/ec8d675c5436e92245ea0a8d07b35345ad30794c))

### Features

- [@react-md/form](../form): updated `TextArea` to use the new useResizeObserver
  API
  ([2c2dd27](https://github.com/mlaursen/react-md/commit/2c2dd27576aeeecb2baba12ef616af45197037db))

## [2.2.2](https://github.com/mlaursen/react-md/compare/v2.2.1...v2.2.2) (2020-09-02)

**Note:** Version bump only for package [@react-md/form](../form)

## [2.2.1](https://github.com/mlaursen/react-md/compare/v2.2.0...v2.2.1) (2020-09-02)

**Note:** Version bump only for package [@react-md/form](../form)

# [2.2.0](https://github.com/mlaursen/react-md/compare/v2.1.2...v2.2.0) (2020-08-11)

### Bug Fixes

- **listbox:** render `0` as a valid display value
  ([d02b7a9](https://github.com/mlaursen/react-md/commit/d02b7a9042786e4d4c4a46d286b62e6d80afc621))

### Features

- [@react-md/form](../form): Added props to style `Checkbox` and `Radio` input
  element
  ([b6d2318](https://github.com/mlaursen/react-md/commit/b6d23186b7355bacc198d5187d50c10a7186f4ca))
- [@react-md/form](../form): Updated toggle inactive and active colors to be
  configurable
  ([49319e6](https://github.com/mlaursen/react-md/commit/49319e65e7bf29380469b567b893a3cc775b2720))

## [2.1.2](https://github.com/mlaursen/react-md/compare/v2.1.1...v2.1.2) (2020-08-01)

**Note:** Version bump only for package [@react-md/form](../form)

## [2.1.1](https://github.com/mlaursen/react-md/compare/v2.1.0...v2.1.1) (2020-07-21)

**Note:** Version bump only for package [@react-md/form](../form)

# [2.1.0](https://github.com/mlaursen/react-md/compare/v2.0.4...v2.1.0) (2020-07-12)

### Features

- Improved Dark Mode using Raising Elevation
  ([547877c](https://github.com/mlaursen/react-md/commit/547877c51217a544fdaad9c77e2469a45f30336e)),
  closes [#860](https://github.com/mlaursen/react-md/issues/860)

## [2.0.3](https://github.com/mlaursen/react-md/compare/v2.0.2...v2.0.3) (2020-07-07)

### Bug Fixes

- [@react-md/form](../form): `Select` disabled styling
  ([d79d007](https://github.com/mlaursen/react-md/commit/d79d0079307ccc735ebac0730d1d45aabe1419bd))
- [@react-md/form](../form): `TextArea` disabled styles
  ([ef118bf](https://github.com/mlaursen/react-md/commit/ef118bf325e68e9ae8c988f9f93a1e19e1468084))
- [@react-md/form](../form): `TextField` and `Select` disabled behavior
  ([e8f2c57](https://github.com/mlaursen/react-md/commit/e8f2c579a1ee502674bfddbcc10713d4b50d7cc4))

## [2.0.2](https://github.com/mlaursen/react-md/compare/v2.0.1...v2.0.2) (2020-06-30)

### Bug Fixes

- **LICENSE:** Removed the time range from license since it was incorrect
  ([50c9021](https://github.com/mlaursen/react-md/commit/50c9021cedc0d642758b9fd541bb6c93d2fe1786))
- Added `sideEffects` field to `package.json`
  ([31820b9](https://github.com/mlaursen/react-md/commit/31820b9b43705e5849664500a17b6849eb6dc2a9))
- `sideEffects` formatting
  ([78a7b6b](https://github.com/mlaursen/react-md/commit/78a7b6b0e40c7daefb749835670705f21bd21720))

## v2.0.1

No changes.

## v2.0.0

Starting with v2 of react-md, all checkbox and radio inputs will now correctly
work like native `<input type="checkbox" />` and `<input type="radio" />`
without any additional wrappers.

### New Behavior and Features

- all components now correctly forward the `ref` to the DOM element
- implemented the new themes for form controls so that there is now a
  `"underline"`, `"filled"`, and `"outline"` state for `TextField` and `Select`
- changed the default theme for to be `"outline"` instead of `"underline"`
- implemented a new theming API for all the form controls utilizing CSS
  variables and provided mixins.
- changed the "focus" styles for all form controls to use a blue focus
  `box-shadow` by default to match other focused elements
- implemented better native keyboard functionality for all form controls
- added a new `NativeSelect` component to render a `<select>` with text field
  styling
- added a `Form` component that renders a `<form>` element that just prevents
  default form submission for easy "enter submit" functionality
- added a `Fieldset` component to group related form elements together with an
  accessible legend that can be conditionally rendered for screen readers only
- updated the `Checkbox` to support an indeterminate state
- hopefully fixed some styling issues for the `Checkbox` and `Radio` components
  so it is easier to provide custom styles and implementations
- added a new hook for handling indeterminate states with
  `useIndeterminateChecked` (need a better name)
- added a `Label` and `FloatingLabel` component for reusable label styles
- all form controls no longer nest the `<input />` element as a child of the
  `<label>`
- the `FileInput` no longer renders the `<label>` as an `AccessibleFakeButton`
  since it never should have
- the `FileInput` no longer renders with a surrounding `<div>` element`
- added a `Listbox` component to be able to create an accessible custom
  `<select>` component
- added an `Option` component to be able to implement a custom `<option>` widget
  if desired
- fixed the keyboard functionality for the `Select` component so that every
  option can now be "keyboard searched"
- updated the `Listbox`/`Select` options to support a `readOnly` view
- fixed some of the accessibility issues with the `Select` component by adding
  the required `aria-*` attributes and rendering the options with
  `role="option"`
- removed some of the built-in functionality for error and warning states to
  simplify the messaging behavior
- added a new `FormMessage` component that should be able to alert screenreaders
  when new errors or messages are displayed in real time
- added a new `Password` component for handling password fields instead of
  having it built-in to the `TextField` component
- added new components for creating a custom `TextField` with the
  `TextFieldContainer` and `TextFieldAddon` components
- added an `AsyncSwitch` component to be able to render a `CircularProgress`
  indicator within a `Switch` while some asynchronous action is waiting
- added a few hooks that might be helpful for the form control states:
  `useChoice`, `useSelectState`, `useChecked` (might change going forward)
- updated the `Select` component to use fixed positioning instead of relative
  positioning by default so that the menu always appears within the viewport

### Breaking Changes

- there is no longer a concept of "selection control" and instead has been
  changed to a "toggle" concept
- the `SelectionControl` and `SelectionControlGroup` components no longer exists
  and is no longer required
- the `FileUpload` component was removed since it didn't seem extremely helpful

#### New SCSS Variables, Functions, and Mixins

- `$rmd-label-padding: 0.25rem !default` - the amount of horizontal padding to
  use for a floating label
- `$rmd-toggle-border-radius: 50% !default` - the border radius for the checkbox
  and radio components
- `$rmd-toggle-inset: 0.3125rem !default` - The distance the background layer
  for the checkbox and radio components should be inset relative to the
  container element
- `$rmd-toggle-dense-inset: 0.25rem !default` - The distance the background
  layer for the checkbox and radio components should be inset relative to the
  container element when the dense spec i enabled
- `$rmd-checkbox-indeterminate-height: 0.15rem !default` - the height for the
  indeterminate checkbox's state line that covers the icon
- `$rmd-checkbox-indeterminate-dense-height: 0.125rem !default` - the height for
  the indeterminate checkbox's state line that covers the icon when the dense
  spec is enabled
- `$rmd-switch-ball-border-radius: 50% !default` - the border radius for the
  switch's ball
- `$rmd-switch-container-vertical-padding: 0.5rem !default` - the vertical
  padding for the switch's container
- `$rmd-switch-container-horizontal-padding: $rmd-switch-ball-size / 2 !default`
  the horizontal padding for the switch's container
- `$rmd-switch-ball-disabled-color: rmd-theme-get-swatch($rmd-theme-secondary, 200, false, darken($rmd-theme-secondary, 5%), rmd-switch-ball-disabled-color) !default` -
  the color to use for the switch's ball when it is toggled on and disabled
- `$rmd-switch-progress-width: 12 !default` - the width for the circular
  progress bar in the `AsyncSwitch`
- `$rmd-switch-progress-background-color: $rmd-white-base !default` - the
  background color to use for the switch's ball while the `AsyncSwitch` is
  loading
- `$rmd-switch-progress-padding: 0.125rem !default` - the amount of padding to
  apply to the `AsyncSwitch`'s progress bar

#### Renamed SCSS Variables, Functions, and Mixins

- renamed `$md-text-field-error-color` to `$rmd-form-error-color`
- renamed `$md-switch-track-height` to `$rmd-switch-track-height` and changed
  the default value from `16px` to `1rem`
- renamed `$md-switch-track-width` to `$rmd-switch-track-width` and changed the
  default value from `40px` to `2.25rem`
- renamed `$md-switch-thumb-size` to `$rmd-switch-ball-size` and changed the
  default value from `24px` to `1.25rem`
- renamed `$md-switch-track-radius` to `$rmd-switch-track-border-radius` and
  changed the default value from `8px` to `0.5rem`
- renamed `$md-switch-thumb-offset` to `$rmd-switch-ball-offset` and changed the
  default value from `4px` to `0.25rem`

#### Removed SCSS Variables Placeholders, and Mixins

- removed `$md-selection-controls-include-group` since it is no longer required
- removed `$md-selection-controls-include-switches` since they are always
  included
- removed `$md-switch-height` since it is no longer needed
- removed `$md-switch-light-theme-thumb-off`,
  `$md-switch-light-theme-track-off`, `$md-switch-light-theme-thumb-disabled`,
  `$md-switch-light-theme-track-disabled`, `$md-switch-dark-theme-thumb-off`,
  `$md-switch-dark-theme-track-off`, `$md-switch-dark-theme-thumb-disabled`,
  `$md-switch-dark-theme-track-disabled`, `$md-switch-ball-fallback-color` since
  they are no longer required
- removed `$md-text-field-autococompleted-shadow` since it is no longer required

repository: mlaursen/react-md

gha_language: TypeScript

repo_name: mlaursen/react-md


text:
# quaternion-averaging
PyTorch implementation of weighted- and simple-averaging based on Markley, F. Landis, Yang Cheng, John Lucas Crassidis, and Yaakov Oshman. "Averaging quaternions." Journal of Guidance, Control, and Dynamics 30, no. 4 (2007): 1193-1197.

Heavily inspired by Dr. Tolga Birdal's work: https://github.com/tolgabirdal/averaging_quaternions

repository: mertkaraoglu/quaternion-averaging

repo_name: mertkaraoglu/quaternion-averaging


text:
---
description: BC Gov OpenShift networking overview
title: BC Gov OpenShift networking overview
tags:
  - network
  - SDN
  - ingress
  - egress
  - openshift network
---

## Openshift Silver 4.x Networking

The Openshift 4 networking config is protected. You may view it on [documize](https://docs.developer.gov.bc.ca/s/bn6v0ac6f9gue7hhirbg/protected-platform-services/d/bsg9q3nu3u14r4kded80/ocp-4-platform-network-topology) with the appropriate level of access.

## OpenShift Pathfinder 3.11 Networking

Pathfinder OpenShift specific implementation notes:
* SDN uses the ovs-multitenant SDN plug-in for configuring the pod network.
* Pathfinder OpenShift is *not* using the F5 plugin. `Routes`  within OpenShift  (similar to `Ingress`) are using the OpenShift-provided HA Proxy functionality. The frontend, Internet-facing load balancer located outside of OpenShift is an F5 (on IP .209) which is simply configured to forward traffic to the HA Proxy instances. The F5 is not tightly integrated with OpenShift.
* CIDR Range <IP_ADDRESS>/26; Netmask <IP_ADDRESS>; Wildcard Bits <IP_ADDRESS>; First IP <IP_ADDRESS>; Last IP <IP_ADDRESS>
* OpenShift servers are in `VLAN 138` in Kamloops
* Firewall Object: `OCIO-PF-PROD-DMZ` (used as SOURCE)
* Private Network IP Range: <IP_ADDRESS>/16

* Access (ingress) points:
  * console.pathfinder.gov.bc.ca:8443 - (<IP_ADDRESS>) API and web UI
  * .pathfinder.gov.bc.ca:80/443 - (<IP_ADDRESS>) internet accessible application Virtual IP; there is an Entrust wildcard SSL cert for this.
  * .pathfinder.bcgov:80/443 (<IP_ADDRESS>) - Internal facing application Virtual IP; there is currently NO wildcard SSL cert for this.

> **Please note:** A common misconception is that using a *{name}*.pathfinder.bcgov name will secure your application for 'internal to BCGov' traffic.  This is **NOT** the case.  Both of the external VIPs are directing traffic to the *SAME* cluster ingress.  To secure named routes you must add route whitelists. (ref: https://docs.openshift.com/container-platform/3.11/architecture/networking/routes.html#whitelist)

* BCGov IP 142 Subnets (https://whois.arin.net/rest/org/PBC-51-Z/nets):
<IP_ADDRESS>/16 <IP_ADDRESS>/16 <IP_ADDRESS>/16 <IP_ADDRESS>/16 <IP_ADDRESS>/16 <IP_ADDRESS>/16 <IP_ADDRESS>/16 <IP_ADDRESS>/16 <IP_ADDRESS>/16 <IP_ADDRESS>/16 <IP_ADDRESS>/16 <IP_ADDRESS>/16 <IP_ADDRESS>/16 <IP_ADDRESS>/16 <IP_ADDRESS>/16

repository: BCDevOps/openshift-wiki

gha_language: Shell

repo_name: BCDevOps/openshift-wiki


text:
+++
title = "Hatchery vSphere"
weight = 5

+++

CDS build using VMware vSphere infrastructure to spawn each CDS Workers inside dedicated VM.

## Pre-requisites

This hatchery spawns VM which obtains IP from DHCP. So first you have to create a DHCP server on your host with NAT if you want to access to the internet. In order to create you have multiple possibilities like create your own VM with a DHCP server configured or if you are comfortable with the VMware tools you can use the [NSX system](https://www.vmware.com/products/nsx.html). This system will create DHCP gateway for you.

Also we recommend you to create a VM base that the hatchery will use to linked clone your new VM to execute your jobs. For example in our case we create different VM base with a minimal debian installed in different versions. In order to save your host resources we advice you to turn these VMs off.

## Start vSphere hatchery

Generate a token for group:

```bash
$ cds generate  token -g shared.infra -e persistent
fc300aad48242d19e782a37d361dfa3e55868a629e52d7f6825c7ce65a72bf92
```

Edit the CDS [configuration]({{< relref "hosting/configuration.md">}}) or set the dedicated environment variables. To enable the hatchery, just set the API HTTP and GRPC URL, the token freshly generated and the vSphere variables.

This hatchery will now start worker of model 'vsphere' on vSphere infrastructure.

## Setup a worker model

See [Tutorial]({{< relref "hatchery/vsphere.md" >}})

repository: Laymer/cds

repo_name: Laymer/cds


text:
# REACT Context AJAX
[![Build Status](https://travis-ci.org/uhlryk/react-context-ajax.svg)](https://travis-ci.org/uhlryk/react-context-ajax)
[![Downloads](https://img.shields.io/npm/dt/react-context-ajax.svg)](https://www.npmjs.com/package/react-context-ajax)
[![Downloads](https://img.shields.io/npm/dm/react-context-ajax.svg)](https://www.npmjs.com/package/react-context-ajax)
[![NPM version](https://img.shields.io/npm/v/react-context-ajax.svg)](https://www.npmjs.com/package/react-context-ajax)

This is react wrapper on [superagent](https://www.npmjs.com/package/superagent).
It is component which should be at top of component hierarchy. It make ajax calls available in all child components.
It allow to config it globally and/or in each call.

## Installation:

### npm

    npm install react-context-ajax

It needs react to work correctly. It is compiled without react at its source.

## Quick start: How to use it

Simplest usage with pure react, with ES6/ES7 syntax and jsx *(In next sections it will also be proposition how to usage this with redux, react, react-router)*

Main root jsx file **app.jsx** :

    import React from 'react';
    import ReactDOM from 'react-dom';
    import Request from 'react-context-ajax';
    import SomeComponent from './someComponent';
    class App extends React.Component {
      constructor(props) {
        super(props);
      };
      render() {
        return (
          <Request>
            <SomeComponent></SomeComponent>
          </Request>
        );
      }
    }
    ReactDOM.render(
      <App />,
      document.getElementById('app')
    );

As you can see you have to do two steps in main file:

1. import react-context-ajax:

    import Request from 'react-context-ajax';

2. Wrap your render jsx components by 'react-context-ajax'(<Request>)

    class App extends React.Component {
    //...
      render() {
        return (
          <Request>
            //your normal components
          </Request>
        );
      }

Now all components inside 'react-context-ajax' (<Request>) can have access to router.

If your component need access to router you need to set `contextTypes`.

Example component **someComponent.jsx**:

    class SomeComponent extends React.Component {
      static contextTypes = {
        request: React.PropTypes.object
      };
      constructor(props) {
        super(props);
      };
      componentWillMount() {
        this.context.request.getRequest({
          url: 'http://yourUrl.com/someParam',
          query: {
            key: 'value'
          },
          endCallback: (err, req, res)=>{
            //response from server
          }
        });
      }
      //...
    }

As you can see you have to inform component what context take from parent components:

    static contextTypes = {
      request: React.PropTypes.object
    };

And now you can use router

    this.context.request

## Options:

    <Request
      baseUrl={'http://yourDomain.com'}
      headers={this.headerObject}
      endCallback={this.globalCallbackFunction}
    >
    // children components
    </Request>

### baseUrl

 * type: string
 * required: false
 * default: ''

First part of url, where request are send. If all your request have similar part then this part can be set here.

### headers

 * type: object
 * required: false

Allow to set headers for all request methods. There is also possibility to change global headers using request instance.

### readyCallback

Run after component `componentDidMount` phase and pass to callback request instance.

### endCallback

 * type: function
 * required: false

This is global endCallback which is called after ech request from child components. It is not required. You can handle all
requests in local callback (passed as parameter to request call). More about it in section Global endCallback

## Context request methods:

Request object is available in components content:

    this.context.request

And it has methods:

### request()

Return superagent instance.

### addHeader(key, value)

Add next global header (for all request). If user is login you send for each request token in header.

### removeHeader(key)

Remove one global header (for all request). For example after user logout we don't want to send token in header

### getRequest(options)
Load data from the server using a HTTP GET request. Return superagent request object.

### postRequest(options)
Load data from the server using a HTTP POST request. Return superagent request object.

### putRequest(options)
Load data from the server using a HTTP PUT request. Return superagent request object.

### deleteRequest(options)
Load data from the server using a HTTP DELETE request. Return superagent request object.

### available options for request methods

#### options.url

 * type: string
 * required: false

A string containing the URL to which the request is sent. It is concatenate with baseUrl

Example:

    this.context.request.getRequest({
      url: 'someurl',
    })

#### options.query

 * type: object
 * default: {}
 * required: false

Data that is added as query to url

Example:

    this.context.request.postRequest({
      url: 'someurl',
      query: {
        id: '213241421
      }
    })

#### options.body

 * type: object
 * default: {}
 * required: false

Data that is sent to the server with the request. Not in use for get and delete methods.

Example:

    this.context.request.postRequest({
      url: 'someurl',
      body: {
        name: '213241421,
        something: 'fdsfdsds'
      }
    })

#### options.headers

 * type: object
 * default: {}
 * required: false

Set headers for this request. If header has same key as globally set header, then this header will override it.
If you don't want to sent in this request any global header (but you don't want to remove them globally) you can
set this header here with value null

Example:

    this.context.request.postRequest({
      url: 'someurl',
      headers: {
        'access-token', '1212414fsvsvsdsvdsvsd
      },
      body: {
        name: '213241421,
        something: 'fdsfdsds'
      }
    })

#### options.fields

 * type: object
 * default: {}
 * required: false

For Multipart requests. Much like form files inputs in HTML, you can send files to server.

Example:

    this.context.request.postRequest({
      url: 'someurl',
      attachments: {
        file1: 'path/to/myfile.ext',
      },
      fields: {
        field1: 'dsadsa',
        field1: 'vxcxcvxcv'
      }
    })

#### options.attachments

 * type: object
 * default: {}
 * required: false

For Multipart requests. Much like form fields in HTML, you can set field values with the fields = { name1: value1, name2: value2 }

Example:

    this.context.request.postRequest({
      url: 'someurl',
      attachments: {
        file1: 'path/to/myfile.ext',
        file2: {
          path: 'path/to/secondfile.ext',
        },
        file3: {
          path: 'path/to/thirdfile.ext',
          filename: 'newname.ext2'
        },
      }
    })

#### options.endCallback

Callback invoked after response from server, error or timeout. More about it in section Local endCallback

#### options.name

You can set identify string for each call. Then in global callback you can check `req.name` to identify which call is processed.

#### options.*

You can add any custom property. All properties will be available in callbacks `req` parameter.

## Aborting requests

To abort request you have to use superagent request object (this object is returned from all request methods) and invoke its abort() method.

example:

    var request = this.context.request.getRequest({ ... });
    request.abort();

## Global endCallback
This function is passed as prop to Request component. And is invoked at the end of request.

Callback function get three arguments

    globalCallbackFunction(err, req, res, done) {
      done();
    }

### err
if everything is ok this value is null. If server return status code 4xx and 5xx or there are connection errors then this value exist.
This is error object created by superagent. More about it in superagent [documentation](http://visionmedia.github.io/superagent/#error-handling)

### req
All data passed as option to each request.
It has also reference to request instance:

    req.request

### res
All data returned from server.
This is response object created by superagent. More about it in superagent [documentation](http://visionmedia.github.io/superagent/#response-properties)

### done
this is function. If global callback call it, then this will run local callback. Otherwise local callback will not be invoked.
If done is invoked without params it will run local callback with err and res from global callback.
**You can invoke `done` with own error, request and response object after you process original data.**
This is handy to get everything in global calback, check received data, and return only processed part
(or for example if you use router, redirect to error page or login page).

## Local endCallback
This function is passed as last argument in request methods. And is invoked at the end of request (after global callback).
Global callback can prevent local callback from being invoked.

Callback function get two arguments

    localCallbackFunction(err, req, res) {
      done();
    }

### err
Error object. By default it is error object created by superagent. More about it in superagent [documentation](http://visionmedia.github.io/superagent/#error-handling).
But in global callback this object could be changed.

### req
All data passed as option to each request.
It has also reference to request instance:

    req.request

### res
Response object By default this is response object created by superagent. More about it in superagent [documentation](http://visionmedia.github.io/superagent/#response-properties)
But in global callback this object could be changed.

## License
MIT

repository: uhlryk/react-context-ajax

repo_name: uhlryk/react-context-ajax


text:
# How Proxy Reduces the Multiple Search Results?

## Search Results Organized format

For a specified Search request, with nq = 2 and topk = 10, Proxy receives 4 search results from query nodes.

Each Search Result is nq * topk two-dimensional structure, as the illustration below. The result indicates that the user input nq vectors and wanted to obtain the topk similar vectors to these nq vectors respectively.

![search_result_format](./figs/nq_topk_search_results.png)

For each query, the topk hit results are in descending order of score. The larger the score, the more similar the hit result is to the vector to be queried. The hit results of different queries are independent of each other.

Therefore, we will only discuss how Proxy merges the results for one query result. For nq query results, we can loop through nq or process them in parallel.

So the problem degenerates to how to get the maximum number of 10 (topk) results from these four sorted arrays. As shown in the figure below:
![final_result](./figs/reduce_results.png)

## K-Way Merge Algorithm

The pseudocode of this algorithm is shown below:

```golang
n = 4
multiple_results = [[topk results 1], [topk results 2], [topk results 3], [topk results 4]]
locs = [0, 0, 0, 0]
topk_results = []
for i -> topk:
	score = min_score
	choice = -1
	for j -> n:
		choiceOffset = locs[j]
		if choiceOffset > topk:
			// all result from this way has been got, got from other way
			continue
		score_this_way = multiple_results[j][choiceOffset]
		if score_this_way > score:
			choice = j
			score = score_this_way
	if choice != -1:
		// update location
		locs[choice]++
		topk_results = append(topk_results, choice)
```

This algorithm is originated from the merging phase of merge sort. The common point of the two is that the results have been sorted when merging, and the difference is that merge sort merges two-way results, proxy reduces merges multiple results.

In contrast, in merge sort, two pointers are used to record the offsets of the two-way results, and proxy reduces uses multiple pointers `locs` to record the offsets of the `k-way` results.

In our specific situation, n indicates that there are 4 results to be merged, `multiple_results` is an array of four `topk`, and each `choiceOffset` in `locs` records the offset of each way being merged.

The `score_this_way` corresponding to this offset records the maximum value of the current way, so when you take a larger `score`, you only need to pick one of the four maximum values.

This ensures that the result we take each time is the largest among the remaining results.

This algorithm will scan all Search Results linearly at most, hence the time complexity of this algorithm is n \* topk.

repository: milvus-io/milvus

gha_language: Go

repo_name: milvus-io/milvus


text:
# Calculator
A miniature calculator, which helps you solve any arithmetic expression involving addition , subtraction, division, multiplication, and even powers.
This calculator handles all real numbers, and takes input from user through the buttons only. It gives the accurate floating point result as per the input, based on BODMAS rule.
This program is entirely in Python and imports Tkinter
for GUI.
This calculator works best in its original size

repository: parvathikp/Calculator

repo_name: parvathikp/Calculator


text:
---
title: What is a hackathon?
author: Hailey Pate
layout: post
permalink: /what-is-a-hackathon/
main_image:
  -
categories:
  - blog
  - FAQ
tags:
  - New Volunteers
---
Here is a link to a most excellent article about hackathons, published by Dave Fontenot on October 9, 2013. To view the original post on the author’s site, click here.

# W[hat] is a hackathon?

### Sounds scary, right? Don’t worry, it’s not that type of hacking.

Over the past year, hackathons have taken the country by storm. You might have even seen a small one in “The Social Network.” No, we don’t break into your school’s computers. Yes, we do sometimes drink beer.

> “A hackathon, a hacker neologism, is an event when programmers meet to do collaborative computer programming.” -Wikipedia

Hackathons provide a venue for self-expression and creativity through technology. People with technical backgrounds come together, form teams around a problem or idea, and collaboratively code a unique solution from scratch — these generally take shape in the form of websites, mobile apps, and robots…

A notable example of a hackathon “hack,” GroupMe is a group messaging app that was acquired by Skype for over $50 million. Other notable examples include the Facebook “Like” button and Facebook Chat which were both first demoed at internal company hackathons. Tess Rinearson has a great list of “The 8 Kinds of Projects You Meet at a Hackathon.”

Take PennApps and MHacks, the two largest student hackathons, for example. They bring together over 1000 student hackers from universities across the globe for one of the most high-energy weekends of their lives. Students get to the hackathon, and, within a couple hours, are working furiously on a project with a motley group of people that they may have just met. Over the course of the weekend, they learn how to work with new technologies, throw together tons of code, and hopefully finish what they set out to build.

Despite the complete lack of sleep, these events are addicting, and the community building around them is growing faster than ever. Instead of meeting at a coffee shop or conference to discuss the world’s problems every weekend, you’ll find many of these students at a hackathon tackling them head on. To facilitate this fast-growing tidal wave of hackathons, Mike Swift started Major League Hacking which aims to be the NCAA of Hackathons.

Whether we are building a website, mobile app, or even hardware hack, the goal is to start from scratch and end with a working prototype. Generally, these events last from 24-48 hours and are filled with food, caffeine, prizes, and, you guessed it, more caffeine. After time runs out, teams demo what they’ve built and compete for prizes.

To sum it up, at a hackathon, people come together and use technology to transform ideas into reality.

* * *

“The word **hackathon** is a portmanteau of the words **hack** and**marathon**, where **hack** is used in the sense of playful, exploratory programming, not its alternate meaning as a reference to computer crime.” -Wikipedia

* * *

Aside: With an emphasis on finishing something before the deadline, hackathons have received some criticism for their encouragement of poorly-written code and unhealthy sleeping and eating habits.

gha_language: JavaScript


text:
# Lennys' Developer key for Package signing

## To Import in pacman

```sh
# pacman-key --add devkey.pub
```

Check Key ID with
```sh
# pacman-key --list-keys
```

Key ID is: DC3078524947AB88189C7A8B91C147DBB1627F9B

```sh
# pacman-key --lsign-key DC3078524947AB88189C7A8B91C147DBB1627F9B
```

Also set the trust-level of the key

```sh
# pacman-key --edit-key DC3078524947AB88189C7A8B91C147DBB1627F9B
```

Then type `trust` choose trustlevel `4` is okay ;-)
Then type `save`

Cheers!

license: Unlicense

repository: JhonnyJason/lenny-developer-key

repo_name: JhonnyJason/lenny-developer-key