text:
# NATS.Client.Extensions.DependencyInjection

[![Build Status](https://dev.azure.com/ibrahimabdelkareem0432/OpenSource/_apis/build/status/NATS.Client.Extensions?branchName=main)](https://dev.azure.com/ibrahimabdelkareem0432/OpenSource/_build/latest?definitionId=3&branchName=main) [![NuGet](https://badgen.net/nuget/v/NATS.Client.Extensions.DependencyInjection)](https://www.nuget.org/packages/NATS.Client.Extensions.DependencyInjection/)

**NATS.Client.Extensions.DependencyInjection** enables dependency injection for [**NATS.Client**](https://github.com/nats-io/nats.net) connection types (i.e., IConnection, IEncodedConnection) via Microsoft DependencyInjection, And introduces INatsClientConnectionFactory abstraction, And provides an easy way for configuring NATS.Client.Options.

## Installation
Install [NATS.Client.Extensions.DependencyInjection](https://www.nuget.org/packages/NATS.Client.Extensions.DependencyInjection/) NuGet package

All of the package features will be available via `NATS.Client` namespace to ease working with the types without importing namespaces other than the `NATS.Client`'s namespace

## Usage

The code below demonstrates how to inject NATS Client services in `IServiceCollection`

```csharp
//using NATS.Client

public void ConfigureServices(IServiceCollection services)
{
    /*Inject NATS client connections as Transient services using the default NATS.Client.Options,
      And inject INatsClientConnectionFactory (NOTE: Always Singleton)*/
    services.AddNatsClient();

    //Change the services' registry lifetime via the connectionServiceLifeTime parameter (default is Transient)
    services.AddNatsClient(connectionServiceLifeTime: ServiceLifetime.Singleton);

    //Configure NATS.Client.Options via configureOptions parameter (default is NATS.Client.ConnectionFactory.GetDefaultOptions())
    services.AddNatsClient(configureOptions: options =>
    {
        options.Servers = new[]
        {
            "nats://localhost:4222",
            "nats://localhost:4223"
        };

        options.MaxReconnect = 2;
        options.ReconnectWait = 1000;
    });
}
```
Then you can use it as follows.

```csharp
/*Assuming BackgroundServiceA was registered in IServiceCollection & resolved via IServiceProvider,
      IConnection will be injected via the constructor */
    public class BackgroundServiceA
    {
        private readonly IConnection _connection;

        public BackgroundServiceA(IConnection connection)
        {
            _connection = connection;
        }
    }

    /*Assuming BackgroundServiceC was registered in IServiceCollection & resolved via IServiceProvider,
      IEncodedConnection will be injected via the constructor */
    public class BackgroundServiceB
    {
        private readonly IEncodedConnection _encodedConnection;

        public BackgroundServiceB(IEncodedConnection encodedConnection)
        {
            _encodedConnection = encodedConnection;
        }
    }

    /*Assuming BackgroundServiceC is registered in IServiceCollection & resolved via IServiceProvider,
      INatsClientConnectionFactory will be injected via the constructor */
    public class BackgroundServiceC
    {
        private readonly INatsClientConnectionFactory _connectionFactory;

        public BackgroundServiceC(INatsClientConnectionFactory connectionFactory)
        {
            _connectionFactory = connectionFactory;
        }

        public Task Execute()
        {
            /* You can use INatsClientConnectionFactory if you want more control of the creation & disposal of connections outside of the DI's scope.
               The factory will create a new instance of either IConnection or IEncoded connection everytime */

            //This will create IConnection using the default options (i.e., NATS.Client.ConnectionFactory.GetDefaultOptions())
            _connectionFactory.CreateConnection();

            //You can configure the options via a delegate function
            _connectionFactory.CreateConnection(options =>
            {
                options.Servers = new[] {"nats://localhost:4223"};
            });

            //Or you can pass NATS.Client.Options as an argument
            var options = ConnectionFactory.GetDefaultOptions();
            options.Servers = new[] {"nats://localhost:4223"};
            _connectionFactory.CreateConnection(options);

            //Same options available for creating IEncodedConnection
            _connectionFactory.CreateEncodedConnection();
            _connectionFactory.CreateEncodedConnection(options =>
            {
                options.Servers = new[] {"nats://localhost:4223"};
            });
            _connectionFactory.CreateEncodedConnection(options);

            return Task.CompletedTask;
        }
    }
```

repository: rgfaber/nats-client-extensions

repo_name: rgfaber/nats-client-extensions


text:
# Surround Selection

[![Build status](https://ci.appveyor.com/api/projects/status/u3mx8qirp7nv4s86?svg=true)](https://ci.appveyor.com/project/priyanshu92/surroundselection)

Download this extension from the [VS Gallery](https://marketplace.visualstudio.com/items?itemName=PRIYANSHUAGRAWAL92.SurroundSelection)
or get the [CI build](http://vsixgallery.com/extension/4c807d55-9263-4ce0-9c1a-bfef58e96b02/).

---------------------------------------

The quickest way to wrap some selected text with various delimiters like double quotes, single quotes, braces etc.

See the [change log](CHANGELOG.md) for changes and road map.

## Features
Toggle wrapping of selected text in visual studio with:
- Double Quotes " "
- Single Quotes ' '
- Braces { }
- Parentheses ( )
- Square Brackets [  ]
- Angular Brackets < >
- Asterisk * *
- Multiline Comment /* */
- Hash # #

### Steps to use
Select any text in Visual Studio and right click.

![Select And Right Click](Screenshots/select-and-right-click.png)

Then select *Surround Selection With* and then select the option you want eg. *Double Quotes* to get the text wrapped around that.

## Hotkeys

| Action                 | Hotkey          |
|------------------------|-----------------|
| Double Quotes          | Ctrl+K, Ctrl+'  |
| Asterisk               | Ctrl+K, Ctrl+*  |
| Angular Brackets       | Ctrl+K, Ctrl+<  |
| Hash                   | Ctrl+K, Ctrl+#  |
| Parentheses            | Ctrl+K, Ctrl+(  |
| Square Brackets        | Ctrl+[, Ctrl+[  |
| Curly Braces           | Ctrl+K, Ctrl+{  |

--------------------------------------------------------

For cloning and building this project yourself, make sure
to install the
[Extensibility Tools 2015](https://visualstudiogallery.msdn.microsoft.com/ab39a092-1343-46e2-b0f1-6a3f91155aa6)
extension for Visual Studio which enables some features
used by this project.

## License
[Apache 2.0](LICENSE)

repository: StarNamer/SurroundSelection

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: StarNamer/SurroundSelection


text:
{
  "date" : "2021-03-10",
  "keywords" : [ "VP8", "File", "Extension", "File Format", "Video Format", "TrueMotion Video", "WebRTC", "WebM"],
  "author" : {
    "display_name" : "Sami Cheema"
  },
  "draft" : "false",
  "toc" : true,
  "title" : "VP8 - TrueMotion Video File",
  "description":"Learn about VP8 file format and APIs that can create and open VP8 files.",
  "linktitle" : "VP8",
  "menu" : {
    "docs" : {
      "parent" : "video"
    }
  },
  "lastmod" : "2021-03-27"
}

## What is a VP8 file?

VP8 is announced by Google as one of the best video formats having the best picture quality data rate and encoding speed. The best advantage of VP8 is that its a royalty-free substitute of H.264. It is a specific format for encoding and decoding high-quality video as a file or a bitstream. It's free because Google has released all the VP8 patents under a royalty-free public license. Almost 90% or more of all WebRTC video sessions use VP8.

## VP8 File Format

VP8 was developed by On2 Technologies in 2008 and then, later owned by Google in 2010. The main advantage of the VP8 video codec is that it is free from royalties under a free license. It is designed to provide high-quality video for the web and mobile devices. The first audio-video container for VP8 was WebM and this codec was selected as the WebRTC video codec in 2011. This format is being acknowledged in many industrial applications like HTML5, Web Real-Time Communication, and video playback in different browsers. There is a full market demand to support this format at full-HD resolution. It is used for different purposes like video conferencing, video broadcasting, and recording from mobile devices.

## Specifications ##

### Features of VP8

 *  Free video codec
 *	The most progressive video file format
 *	Improved resistance to frame loss
 *	High-speed video decoding
 *	Easy to contrivance on hardware platforms
 *	It has a feature of a pure intro mode, i.e. using only individualistically coded frames without sequential prediction, to enable random access in applications like video editing
 *	libvpx is the only software library proficient in encoding VP8 video streams
 *	VP8 was explicitly designed to operate mainly in a quality range
 *	There is a broad range of client hardware connected to the web, extending from low power mobile and implanted devices to the most advanced desktop computers with many processor cores
 *	420 color sampling, 8 bit per channel color depth, progressive scan, and image dimensions up to the highest of 16383x16383 pixels image format can simply be operated through VP8
 *	The impulsion for compression ability and decoder simplicity beneath these design settlements led to several unique technical features in VP8 comparative to other acknowledged video compression formats
 *	VP8 uses three reference frames, from the numerous reference motion compensation scheme seen in other formats
 *	VP8 is not restricted to frame rate or data rate. It uses 14 bits for both width and height, which makes the highest resolution 16384x16384 pixels

### Limits of VP8

The limits of VP8 in terms of resolution, data rate, and framerate are as follow:

 *	VP8 practices 14 bits for width and height, for a maximum resolution of 16384x16384 pixels
 *	VP9 utilizes 16 bits for width and height, for a maximum resolution of 65536x65536 pixels
 *	There is no constraint on framerate or data rate

## References

 * [VP8 Wikipedia](https://en.wikipedia.org/wiki/VP8#:~:text=VP8%20was%20first%20released%20by,%2C%20replacing%20its%20predecessor%2C%20VP7.&text=On%20May%2019%2C%20at%20its,an%20irrevocable%20free%20patent%20license)
 * [Springer Link](https://link.springer.com/chapter/10.1007/978-81-322-1157-0_32)

license: MIT

gha_language: Mathematica

gha_license_id: MIT


text:
---
layout: post
date: 2016-04-28
title: "Cathleen Jia Lillian Sleeveless Sweep/Brush Train Sheath/Column"
category: Cathleen Jia
tags: [Cathleen Jia ,Cathlee Jia,Sheath/Column,V-neck,Sweep/Brush Train,Sleeveless]
---
### Cathleen Jia Lillian
Just **$339.99**
###   Sleeveless Sweep/Brush Train Sheath/Column

BRANDS	Cathlee Jia

Silhouette	Sheath/Column

Neckline	V-neck

Hemline/Train	Sweep/Brush Train

Sleeve	Sleeveless

Buy it: [https://www.readybrides.com/en/cathleen-jia-/26427-cathleen-jia-lillian.html](https://www.readybrides.com/en/cathleen-jia-/26427-cathleen-jia-lillian.html)


text:
# Patient Access (REDCap External Module)
Enabling and configuring this module for a REDCap project will override a chosen survey to instead display a dashboard of icons and links. Clicking on these links allows a user to open the link content in an area next to the dashboard for further exploration.

## Configuration
After enabling the module for a project, choose a survey to override by entering the survey hash in the "Survey Hash" field on the external module configuration page.
The survey hash is a 10 character, alphanumeric string that appears at the end of the URL when you visit the survey page:
https://redcap.vanderbilt.edu/redcap/surveys/?s=ABCDE12345
In the above example, "ABCDE12345" is the survey hash.

Then, clicking the '+' icon, add as many icons, icon labels, icon link urls, and icon link labels as you would like.
Finally, you can add footer links that will be shown at the bottom of the dashboard.


text:
### [CVE-2005-3792](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2005-3792)
![](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

Multiple SQL injection vulnerabilities in the Search module in PHP-Nuke 7.8, and possibly other versions before 7.9 with patch 3.1, allows remote attackers to execute arbitrary SQL commands, as demonstrated via the query parameter in a stories type.

### POC

#### Reference
- http://www.waraxe.us/advisory-46.html

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

repository: trickest/cve

branch_name: refs/heads/main

gha_language: HTML

repo_name: trickest/cve


text:
# Seashells for Hyper

![Seashells Hyper theme](https://s3.amazonaws.com/hyper-seashells-screenshots/seashells.png)

Other tools used in the screenshot but not included in the theme:

- [oh-my-zsh](https://github.com/robbyrussell/oh-my-zsh)
- [bullet-train](https://github.com/caiogondim/bullet-train.zsh)
- [zsh-syntax-highlighting](https://github.com/zsh-users/zsh-syntax-highlighting)
- [tmux](https://github.com/tmux/tmux)
- [Dank Mono](https://dank.sh/)

Based on the Seashells theme from [iTerm2 Color Schemes](https://github.com/mbadolato/iTerm2-Color-Schemes).

## Installation

Add `hyper-seashells-theme` to the plugins list in your `~/.hyper.js` config file.

## License

MIT © [Phil Zona](https://github.com/pbzona)

repository: pbzona/hyper-seashells-theme

repo_name: pbzona/hyper-seashells-theme


text:
# rufo-atom package

Fast automatic formatting of ruby code via [rufo](https://github.com/asterite/rufo) gem.

#### Install rufo:

`gem install rufo`

#### Install atom package:

`apm install rufo-atom`

#### Format file:

Go to Packages -> Rufo -> Format File

Default key binding: `ctrl + opt + o`

Currently under development

repository: bmulvihill/rufo-atom

gha_language: JavaScript

repo_name: bmulvihill/rufo-atom


text:
# FrontlineV1User

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Sid** | Pointer to **string** | The unique string that we created to identify the User resource. |
**Identity** | Pointer to **string** | The application-defined string that uniquely identifies the resource's User. This value is often a username or an email address, and is case-sensitive. |
**FriendlyName** | Pointer to **string** | The string that you assigned to describe the User. |
**Avatar** | Pointer to **string** | The avatar URL which will be shown in Frontline application. |
**State** | Pointer to [**string**](UserEnumStateType.md) |  |
**IsAvailable** | Pointer to **bool** | Whether the User is available for new conversations. Defaults to `false` for new users. |
**Url** | Pointer to **string** | An absolute API resource URL for this user. |

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

repository: twilio/twilio-go

gha_language: Go

repo_name: twilio/twilio-go


text:
## Course View

Course View shows you the course syllabus: a list of lessons with tasks.

You can navigate to any task by double-clicking its name.

To hide the Course View window, click the Project Tool Window button or press &shortcut:ActivateProjectToolWindow;. This will give you more space for the Editor and Task Description windows.

To show the hidden Course View window, click the Project Tool Window button (or press &shortcut:ActivateProjectToolWindow;) again.

repository: jetbrains-academy/rustlings-course

gha_language: Rust

repo_name: jetbrains-academy/rustlings-course


text:
csv-query-scenarios

Fetches GQuery results and saves to a CSV

**Usage:** `bin/query [server] --scenarios [comma-separated-ids] --gqueries [comma-separated-queries]`

## Examples

Fetching the values of `gquery_one` and `gquery_two` for scenarios 5, 6, and 10
on the beta server:

```sh
bin/query beta --scenarios 5,6,10 --gqueries gquery_one,gquery_two
```

Scenario IDs and gquery keys should be comma-separated without any spaces.

### Outputting to a CSV file

By default, the CSV contents will be output one line at a time to the terminal.
Redirect the output of the command to a CSV file by ending with
`> path/to/output.csv`. For example:

```sh
bin/query beta --scenarios 5,6,10 --gqueries graph_year,renewability,total_costs > ~/Documents/output.csv
```

The CSV contents will no longer appear in in the terminal, but instead a
progress bar will show the status of the script.

### Server

The server option may be shorthand or a full server address.

* `beta` or `staging` for the beta server.
  `bin/query beta --scenarios ...`

* `production`, `pro`, or `live` for the production server.
  `bin/query production --scenarios ...`

* A full URL to use a custom ETEngine server.
  `bin/query http://localhost:3000 --scenarios ...`

### Scenarios in a file (`--scenarios-file`)

Instead of providing each scenario on the command-line with `--scenarios`, the
`--scenarios-file` option may be used to specify a path to a file containing
scenario IDs. Each scenario ID should be on a separate line.

```sh
# Create a scenarios.txt file listing four scenario IDs.
echo "916346\n916347\n916354\n916355\n" > ~/Documents/scenarios.txt

# Use the scenarios file instead of --scenarios
bin/query beta --scenarios-file ~/Documents/scenarios.txt --gqueries renewability,total_costs
```

### Gqueries in a file (`--gqueries-file`)

Like `--scenarios-file` (above), `--gqueries-file` permits the use of a file to
list the gqueries:

```sh
# Create a gqueries.txt file listing four gqueries.
echo "graph_year\nrenewability\ntotal_costs\n" > ~/Documents/gqueries.txt

# Use the gqueries file instead of --gqueries
bin/query beta --scenarios 916346,916347 --gqueries-file ~/Documents/gqueries.txt
```

Both the `--scenarios-file` and `--gqueries-file` may be used together

```sh
bin/query beta --scenarios-file ~/Documents/scenarios.txt --gqueries-file ~/Documents/gqueries.txt
```

repository: quintel/etm-tools

repo_name: quintel/etm-tools


text:
# The kubeadm Full Lab with Calico Flavor

This is the **full lab** created for those who wants to install a k8s cluster using the kubeadm method but wish to optimize even more the time. This template installs and bootstraps automatically a full cluster with the **calico** networking interface. This is the full cluster build that I have created to optimize your study time.

## Use Considerations ##

### Use it if: ###

- you want a very, very, very easy way to bring a cluster up and running in a couple of minutes;
- you have studied a lot, the steps involved in the k8s cluster configuration using the kubeadm method;
- you´re curious and wish to put your hands on a cluster without being involved in the configuration steps but wants to play with _kubectl_;
- you´re tired to install and configure all the components necessary to bring a cluster up;
- you wish to get a coffe while the hard work is done automatically for you;

## Getting Started ##

To run the labs you will need to have pre-installed on your computer the latest version of the following softwares:

- [Vagrant](www.vagrantup.com) by Hashicorp
- [Virtualbox](virtualbox.org) by Oracle

### URL ###

https://raw.githubusercontent.com/arturscheiner/kuberverse/master/labs/kv-k8s-cluster/Vagrantfile

### Steps To Run ###

1. Create a directory
```bash
mkdir -p kuberverse/kv-k8s-cluster
```

2. Import the Vagrantfile file to this directory

```bash
cd kuberverse/kv-k8s-cluster
wget https://raw.githubusercontent.com/arturscheiner/kuberverse/master/labs/kv-k8s-cluster/Vagrantfile -O Vagrantfile
```

3. Execute the vagrant command to startup the multi-machine environment

```bash
vagrant up
````

4. Your lab environment will be automatically provisioned and you would be able to get the list of the machines using the command

```bash
vagrant status
````

5. Your lab environment will be automatically provisioned and you would be able to access the shell of any of the machines using the command

```bash
vagrant ssh **_machine-name_**
```

ex: _vagrant ssh kv-master-0_

## Next Steps ##

After provisioning this environment you will need to follow the steps describe on _kuberverse youtube_ or _kubeverse blog_

repository: arturscheiner/kuberverse

gha_language: Shell

repo_name: arturscheiner/kuberverse


text:
---
layout: default
---

# 1996-05-18 - Re: your mail

## Header Data

From: Black Unicorn<EMAIL_ADDRESS>To: Senator Exon<EMAIL_ADDRESS>Message Hash: 491859a35604d53cd31b2f8934ec4c9e2ae73f95c2cc920f197c722ec6de3b62

Message ID<EMAIL_ADDRESS>Reply To<EMAIL_ADDRESS>UTC Datetime: 1996-05-18 11:49:27 UTC

Raw Date: Sat, 18 May 1996 19:49:27 +0800

## Raw message

```
{% raw  %}From: Black Unicorn<EMAIL_ADDRESS>Date: Sat, 18 May 1996 19:49:27 +0800
To: Senator Exon<EMAIL_ADDRESS>Subject: Re: your mail
In-Reply-To<EMAIL_ADDRESS>Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

On Thu, 16 May 1996, Senator Exon wrote:

>  14  Q     I see.  So there's something called a
>  15  Cypherpunks list?
>  16  A     Yes.
>  17  Q     Who maintains that?
>  18  A     Major Domo.
>           [majordomo]
>  19  Q     Major Domo is an individual?
>  20  A     No, no.  Major Domo is a bot.
>  21  Q     A what?
>  22  A     A bot.
>  23  Q     What's a bot?
>  24  A     A robot like.  It's short for robot.
>  25  Q     Uh-huh.  And this robot is obviously maintained
>  26  by somebody, right?
> 0050
>  01  A     Not very much.  In fact, it's hardly ever
>  02  touched.
>  03  Q     Where does it sit?
>  04  A     I don't know at this point.  It was a year ago,
>  05  which was about the last time I was reading the
>  06  Cypherpunks list, it was on Hoptoad.
>  07  Q     How would one go about getting the Cypherpunks
>  08  list?
>  09  A     Subscribe Cypherpunks.

Forwarded to<EMAIL_ADDRESS>
---
My preferred and soon to be permanent e-mail<EMAIL_ADDRESS>"In fact, had Bancroft not existed,       potestas scientiae in usu est
Franklin might have had to invent him."    in nihilum nil posse reverti
00B9289C28DC0E55  E16D5378B81E1C96 - Finger for Current Key Information
Opp. Counsel: For all your expert testimony needs<EMAIL_ADDRESS>

{% endraw %}
```

## Thread

+ Return to [May 1996](/archive/1996/05)

+ Return to "[Black Unicorn <unicorn@schloss.li>](/authors/black_unicorn_unicorn_at_schloss_li_)"
+ Return to<EMAIL_ADDRESS>(Senator Exon)](/authors/remailer_at_2005_bart_nl_senator_exon_)"

+ 1996-05-18 (Sat, 18 May 1996 10:16:04 +0800) - [No Subject](/archive/1996/05/9a98232490c24de2588b411e43c64113b4e3d4748bb21491ea65a1d32233e610) -<EMAIL_ADDRESS>(Senator Exon)_
  + 1996-05-18 (Sat, 18 May 1996 19:49:27 +0800) - Re: your mail - _Black Unicorn<EMAIL_ADDRESS>


text:
---
id: 1307
title: Make:Shift:Done
date: 2015-11-03T17:07:14+00:00
author: James Wade
layout: post
guid: /?p=1307
permalink: /2015/11/03/makeshiftdone/
spacious_page_layout:
  - default_layout
categories:
  - Events
  - Updates
---
First of all, thank you for everyone that was involved.

Make:Shift:Do 2015 is a festival celebrating digital innovation in craft. The event is an opportunity for everyone to try their hand at a new craft for the digital age.

Organised by the Crafts Council, in partnership with the V&A, The Royal Society of Arts and the Institute of Making at University College London, the programme will see ‘Make Spaces’ across the UK open their doors to the public for free workshops, events and activities.

The day was a resounding success with a great turnout from our members and lots of activity.

[Our event](/events/makeshiftdo/makeshiftdo-2015/) really did represent everything that you’d expect from a Make:Shift:Do event.

I can’t thank you all enough for making it a great day and really pulling out all the stops to make it happen.

Special thanks to Paul and Beryl for organising the food.

Potteries Hackspace was setup with lots of activity. We agreed to run an Open Doors Day with Robots, 3D Printers, Bikes, Raspberry Pis and Arduinos.

There was Sonic Pi action on a Raspberry Pi, and Alex’s e-ukulele in the AV room too!

Thank you.

gha_language: CSS


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

# Debugler

The OpenGL 2.1+, OpenGL ES 2.0+ mutli-platform debugger on-line debugger.

The project loosely based on my 2012 thesis from Gdańsk University of Technology.

It is not actively developed any more. Moreover, it is not tested enough and does
not show any good coding standards.

## Supported platforms
Applications using OpenGL running on following systems can be debugged:
* Windows (Vista or newer, 32- and 64-bit applications)
* Linux (tried x86 and x86_64 applications on Ubuntu 12.04)
* Android (x86, x86_64, ARM or MIPS*). Tried versions 2.3.5 through 5.0.

** Android MIPS target is not being build by default.

Additionally, the GUI runs on Windows and Linux platforms.

## Build instructions

Building using provided scripts is easy, however there are multiple tool
and library prerequisites that must be installed before the build.

Following lists the best known versions of these tools and libraries.

### Windows prerequisites

 * Microsoft Visual Studio 2015 (Community Edition, or other version other than Express).

 * Wix Toolset (with an extension for Visual Studio 2015)

 * CMake 3.3 or later for windows, with cmake in PATH environment variable

 * Android NDK r10d, http://dl.google.com/android/ndk/, set ANDROID_NDK environment variable to NDK directory

 * Python 2.7.*, http://www.python.org/download/

 * LXML, http://www.lfd.uci.edu/~gohlke/pythonlibs/#lxml

 * Qt 5.8 or Visual Studio 2015 32-bit, https://www.qt.io/download-open-source/

 * Set QTDIR environment variable to QT installation directory (like D:\Qt\Qt5.8.0\5.8\msvc2015)

 * Visual Studio Add-in for QT5, https://www.qt.io/download-open-source

### Linux prerequisites

On Ubuntu 12.04, following packages are needed

Needed:
  * Ubuntu packages: cmake g++-4.7 libxxf86vm-dev python-lxml x11proto-gl-dev libelf-dev libqt4-dev (or QT 5.0 version)

  * Android NDK r9b, set ANDROID_NDK environment variable to NDK directory

### Building Debugler:

Just run the script:

```
built.py
```

  * By default build.py will build 64-bit (x86_64) redistributable installable package. On Windows this is an MSI installer, on Ubuntu this is a debugler-*-Linux-*deb package.

  * Installers are build in build\x64\Release\Installer (on Windows) or  build/64-dist/Release (on Linux) directories.

  * Other targets may be build using following command line:

```
built.py [target]
```

  * Available targets:
   * 64-dist: *default*, 64-bit installer/deb package, with all Android binaries
   * 32-dist: 32-bit installer/deb package, with all Android binaries
   * 64: 64-bit installer/deb package
   * 32: 32-bit installer/deb package
   * android-arm: just android-arm binary (dglandroidinstaller)
   * android-x86: just android-x86 binary
   * android-mips: just android-mips binary

####Running unit tests

 * Run
```
cd build/<target>/<configuration>/UT
ut
```

 * Under Visual Studio you can use *GoogleTest Runner* extension

### Development
#### Code style
  * Use clang-format from llvm project, use provided .clang_format definitions.
   * http://llvm.org/builds/downloads/ClangFormat.vsix
   * http://llvm.org/builds/downloads/LLVM-3.4.r194000-win32.exe

repository: scygan/debugler

repo_name: scygan/debugler


text:
# with react-hook-form

This example shows how to integrate react-hook-form in Next.js

Form handling doesn't have to be painful. React Hook Form will help you write less code while achieving better performance. For more information, see [react-hook-form](https://react-hook-form.com)

## Deploy your own

Deploy the example using [Vercel](https://vercel.com/now) or preview live with [StackBlitz](https://stackblitz.com/github/vercel/next.js/tree/canary/examples/with-react-hook-form)

[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https://github.com/vercel/next.js/tree/canary/examples/with-react-hook-form&project-name=with-react-hook-form&repository-name=with-react-hook-form)

## How to use

Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app) with [npm](https://docs.npmjs.com/cli/init), [Yarn](https://yarnpkg.com/lang/en/docs/cli/create/), or [pnpm](https://pnpm.io) to bootstrap the example:

```bash
npx create-next-app --example with-react-hook-form with-react-hook-form-app
```

```bash
yarn create next-app --example with-react-hook-form with-react-hook-form-app
```

```bash
pnpm create next-app --example with-react-hook-form with-react-hook-form-app
```

Deploy it to the cloud with [Vercel](https://vercel.com/new?utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)).

branch_name: refs/heads/canary


text:
<img height="204" src="https://cloud.githubusercontent.com/assets/464822/20228152/d3f36dc2-a804-11e6-80ff-51ada2d13ea7.png">

# [Blueprint](http://blueprintjs.com/) Date & Time Components

Blueprint is a React UI toolkit for the web.

This package contains a collection of React components for working with dates and times.

[react-day-picker v7](https://react-day-picker-v7.netlify.app/) is a dependency of this package; we use it
to render calendars.

## Installation

```
npm install --save @blueprintjs/datetime
```

### [Full Documentation](http://blueprintjs.com/docs) | [Source Code](https://github.com/palantir/blueprint)

repository: palantir/blueprint

branch_name: refs/heads/develop

gha_language: TypeScript

repo_name: palantir/blueprint


text:
Role Name
=========

Playbook to install and configure tor server.

Requirements
------------

None

Role Variables
--------------

There is no mandatory variables.
Most variables names are composed of tor_Varname, where Varname is original tor configuration option (f.e. tor_SocksPort -> SocksPort in torrc file). Few exceptions are exist:
f.e.tor_HiddenService is dict with Dir and list of Port (maps to HiddenServiceDir and HiddenServicePort), and many 'list-like' variables are stored as lists (f.e. tor_ExitPolicy, tor_SocksPolicy, etc).

See all variables in Exmaple Playbook chapter.

Some variables are 'trigger' for configuration:
if tor_ControlPort is not defined, tor_HashedControlPassword and tor_CookieAuthentication are ignored.
if tor_ORPort is not defined, all options for relay are igonored (Address, OutboundBindAddress, RelayBandwidthRate, etc).

Dependencies
------------

None. This playbook relies on distro-provided version of tor.

Example Playbook
----------------

There is five example playbooks: just anonymous proxy, relay node (no exit), hidden site, exit node, and all-options version.

## Just anonymous proxy on localhost
    ---
    - hosts: tor
      vars:
        sudo: yes
        tor_SocksPort: <IP_ADDRESS>:9050
        tor_SocksPolicy:
          - accept <IP_ADDRESS>/8
          - reject *
      roles:
        - tor

or just (will use all-default options):

    ---
    - hosts: tor
      vars:
        sudo: yes
      roles:
        - tor

## relay node

    ---
    - hosts: tor
      vars:
        sudo: yes
        tor_ORPort: 9001
        tor_Address: fill.me.example
        tor_RelayBandwidthRate: '100 KB'
        tor_RelayBandwidthBurst: '320 KB'
        tor_ContactInfo<EMAIL_ADDRESS>        tor_Nickname: CopyPasteFromDocs
       roles:
        - tor

## hidden site
(you need to configure 'site' part with different playbook)

    ---
    - hosts: tor
      vars:
        sudo: yes

        tor_HiddenService:
          - Dir: /var/www/hidden_site/
            Port:
              - tor_port: 80
                local_address: <IP_ADDRESS>
                local_port: 80
       roles:
        - tor

## exit node
(be sure to really understand consequences: https://www.torproject.org/docs/faq-abuse.html.en)

    ---
    - hosts: tor
      vars:
        sudo: yes
        tor_ExitPolicy:
          - reject *:25
          - accept *:*

## all option at once

    ---
    - hosts: tor
      vars:
        sudo: yes
        tor_SocksPort: <IP_ADDRESS>:9001
        tor_SocksPolicy:
          - accept <IP_ADDRESS>/8
          - reject *
        tor_Log:
          - debug file /var/log/tor/log
          - notice syslog
        tor_DataDirectory: /var/lib/tor
        tor_ControlPort: <IP_ADDRESS>:1212
        tor_HashedControlPassword: '16:872860B76453A77D60CA2BB8C1A7042072093276A3D701AD684053EC4A'
        tor_CookieAuthentication: 1
        tor_HiddenService:
          - Dir: /tmp
            Port:
              - tor_port: 999
                local_address: <IP_ADDRESS>
                local_port: 888
              - tor_port: 998
                local_address: <IP_ADDRESS>
                local_port: 997
          - Dir: /run
            Port:
              - tor_port: 1244
                local_address: <IP_ADDRESS>
                local_port: 21
        tor_ORPort: <IP_ADDRESS>:5555
        tor_Address: test.example
        tor_RelayBandwidthRate: '100 KB'
        tor_RelayBandwidthBurst: '320 KB'
        tor_AccountingMax: '100 GB'
        tor_AccountingStart: 'month 1 02:00'
        tor_ContactInfo<EMAIL_ADDRESS>        tor_DirPort:
          - Port: 22222
            DirPortFrontPage: /etc/tor/tor-exit-notice.html
        tor_MyFamily:
          - '0xFFFFFFFF'
          - '0xEEEEEEEE'
        tor_ExitPolicy:
          - accept *:2223
          - reject *:*
        tor_BridgeRelay: 1
        tor_PublishServerDescriptor: 0

      roles:
        - tor

License
-------

BSD

Author Information
------------------

(c) George Shuklin

repository: amarao/ansible-tor

repo_name: amarao/ansible-tor


text:
# Telegram Desktop Alpinelinux edge Docker

# Telegram image with an alpinelinux base Edge
![Alt text]( https://raw.githubusercontent.com/darmon77/dmtelegram/master/telegram.png?raw=true "Telegram-desktop")
# AlpineLinux
https://alpinelinux.org/ https://wiki.alpinelinux.org/wiki/Edge
![Alt text](https://brianchristner.io/content/images/size/w2000/2016/02/docker_plus_alpine.jpg?raw=true "alpinelinux")
"edge" is the name given to the current development tree of Alpine Linux. It consists of a APK repository called "edge" and contains the latest build of all available Alpine Linux packages. Those packages are updated on a regular basis.
# Telegram Desktop
https://desktop.telegram.org/
![Alt text](https://i.blogs.es/3571e7/telegram/1366_521.jpg?raw=true "Telegram")
Telegram is a messaging and VOIP platform developed by the brothers Nikolái and Pável Dúrov. The application is focused on instant messaging, sending multiple files and mass communication.


text:
---
layout: default
---

# 1993-09-30 - Communications Week Article

## Header Data

From<EMAIL_ADDRESS>To<EMAIL_ADDRESS>Message Hash: 3ee8295ecb960e75342ff70dc876709db28ba1ddff7607288634de0c9ba7e631

Message ID<EMAIL_ADDRESS>Reply To: _N/A_

UTC Datetime: 1993-09-30 16:16:54 UTC

Raw Date: Thu, 30 Sep 93 09:16:54 PDT

## Raw message

```
{% raw  %}From<EMAIL_ADDRESS>Date: Thu, 30 Sep 93 09:16:54 PDT
To<EMAIL_ADDRESS>Subject: Communications Week Article
Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

In the Sept 28 issue of Communication Week, Pg 35-36.

_Who will hold the Clipper Keys?_

*Last Paragraph*

The administration will choose the escrow agents based on experience
in handling sensitive information, according to the EFF report.  It
will avoid choosing low enforcement agencies to avoid conflicts of
interest and it will not choose private companies because of concerns
about the companies' longevity, the report said.

Well hmm...  what about the longevity of governmental agencies, or
even the government itself?

{% endraw %}
```

## Thread

+ Return to [September 1993](/archive/1993/09)

+ Return to "[nobody@shell.portal.com](/authors/nobody_at_shell_portal_com)"

+ 1993-09-30 (Thu, 30 Sep 93 09:16:54 PDT) - Communications Week Article -<EMAIL_ADDRESS>


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

# HTTP Basic / Ip auth for ElasticSearch

**IMPORTANT NOTICE** Fork of original Asquera project, support multiple users and simple index/method permissions.
# Be aware that there is no safe way restrict access some indexes, this plugin just force that the "standard" way of acessing, will obey the index selection. Altough, there is no garantee on this.

This plugin provides an extension of ElasticSearchs HTTP Transport module to enable **HTTP basic authentication** and/or
**Ip based authentication**.

Requesting `/` does not request authentication to simplify health check configuration.

## Version Mapping

|     Http Basic Plugin       | elasticsearch                |
|-----------------------------|------------------------------|
| v1.5.1(master)              | 1.5.1, 1.5.2, 1.6.0, 1.7.0   |

## Installation

Download the desired version from https://github.com/danielzt/elasticsearch-http-basic/releases and copy it to `plugins/http-basic`.

## Configuration

Once the plugin is installed it can be configured in the [elasticsearch modules configuration file](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/setup-configuration.html#settings). See the [elasticserach directory layout information](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/setup-dir-layout.html) for more information about the default paths of an ES installation.

Create a file users.conf on ES config directory with the following structure:

    # user:ip:pass:methods:indexes:isAdmin
    test:*:123:PUT,POST,GET,HEAD:*:0"

isAdmin will allow any method/index access, also reloading users from file.

# ES Config

|     Setting key                   |  Default value               | Notes                                                                   |
|-----------------------------------|------------------------------|-------------------------------------------------------------------------|
| `http.basic.enabled`              | true                         | **true** disables the default ES HTTP Transport module                  |
| `http.basic.ipwhitelist`          | ["localhost", "<IP_ADDRESS>"]   | If set to `false` no ip will be whitelisted. Uses Host Name Resolution from [java.net.InetAddress](http://docs.oracle.com/javase/7/docs/api/java/net/InetAddress.html)                     |
| `http.basic.trusted_proxy_chains` | []                           | Set an array of trusted proxies ips chains                              |
| `http.basic.log`                  | false                        | enables plugin logging to ES log. Unauthenticated requests are always logged.                                         |
| `http.basic.xforward`             | ""                           | most common is [X-Forwarded-For](http://en.wikipedia.org/wiki/X-Forwarded-For) |

Be aware that the password is stored in plain text.

## Http basic authentication

see [this article](https://en.wikipedia.org/wiki/Basic_access_authentication)

## Ip based authentication

A client is **Ip authenticated iff** its **request** is **trusted** and its **ip is whitelisted**.
A Request from a client connected *directly* (direct client) is by definition **trusted**.  Its ip is the request ip.
A Request form a client connected *via proxies* (remote client) is **trusted iff** there is a tail
subchain of the request chain that matches a tail subchain of the trusted proxy chains.

**A tail subchain** of a chain "*A,B,C*" is a subchain that matches it by the end.
Example: the 3 tail subchains of the ip chain *A,B,C* are:

    (pseudo code) tailSubchains("A,B,C") --> ["A,B,C", "B,C", "C"]

The request chain of a remote client is obtained following these steps:

- read the request's xforward configured header field.
- remove the xforwarded defined client's ip (first listed ip as defined by X-Forwarded-For) from it.
- append the request ip to it.

The ip chain of a remote client is the ip previous to the longest trusted tail subchain .Is the ip used to check
  against the whitelist.

### Request chain checks

Having the following configuration:

    http.basic.xforward = 'X-Forwarded-For'
    http.basic.trusted_proxy_chains = ["B,C", "Z"]

#### Trusted cases:

- A remote client with ip *A* connects to [server] via proxies with ips *B* and *C*. *X-Forwarded-For* header has "*A,B*", removing the client's ip "*A*" and adding the request ip *C*, the resulting chain *B,C* matches a trusted tail subchain. Client's ip is A.

        [A] --> B --> C --> [server]

- A remote client  with ip *A* connects to [server] via proxies with ips *R*, *P*, *B*  and *C*. *X-Forwarded-For* header has "*A,R,P,B*".
  Removing the client's ip "*A*" and adding the request ip *C* , the resulting chain ** matches a trusted tail subchain. **note**: in this case "*P*" is taken as the client's ip, and checked against the white list. Client's ip is P.

        [A] --> R --> P --> B --> C --> [server]

- A remote client with ip *A* connects to [server] via *C*. *X-Forwarded-For* header has
  *A*, removing the client's ip *A*  and adding the request ip *C*, the resulting chain *C* matches a trusted tail subchain. Client's ip is A.

        [A] --> C --> [server]

- client *A* connects directly to [server]. *X-Forwarded-For* header is not set. Client's ip is A.

        [A] --> [server]

#### Untrusted cases:

- A remote client with ip *A* connects to [server] via *D*. *X-Forwarded-For* header has
  "*A*", removing the client's ip "*A*"  and adding the request ip *D*, the resulting chain *D* doesn't match any trusted sub ip chain.

        [A] --> D --> [server]

- A remote client with ip *X* connects to proxy with ip *C* passing a faked *X-Forwarded-For* header "*R*". *C* will check the IP of the request and add it to the *X-Forwarded-For* field. the server will receive and *X-Forwarded-For* header
  as: "*R,X*", remove the client's ip "*R*", add the request ip "*C*" and finally drop the request, as "*X,C*" doesn't match the trusted ip.

        [X] -- R --> C --> [server]

### configuration example

The following code enables plugin logging, sets user and password, sets chain
"<IP_ADDRESS>,<IP_ADDRESS>" as trusted , whitelists ip <IP_ADDRESS> and defines xforward
header as the common 'X-Forwarded-For':

```
http.basic.log: true
http.basic.ipwhitelist: ["<IP_ADDRESS>"]
http.basic.xforward: "X-Forwarded-For"
http.basic.trusted_proxy_chains: ["<IP_ADDRESS>,<IP_ADDRESS>"]
```

## Testing

**note:** localhost is a whitelisted ip as default.
Considering a default configuration with **my_username** and **my_password** configured.

Correct credentials
```
$ curl -v localhost:9200 # works (returns 200) (by default localhost is configured as whitelisted ip)
$ curl -v --user my_username:my_password no_local_host:9200/foo # works (returns 200) (if credentials are set in configuration)
```

Wrong credentials
```
$ curl -v --user my_username:wrong_password no_local_host:9200/    # health check, returns 200 with  "{\"OK\":{}}" although Unauthorized
$ curl -v --user my_username:password no_local_host:9200/foo       # returns 401
```

## Development

### Testing
  Maven is configured to run the unit and integration tests. This plugin makes
  use of [ES Integration Tests](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/integration-tests.html)

  We can configure at the cli the version of ES we want to test against:

  `mvn -Delasticsearch.version=1.5.2 -Dtests.security.manager=false test` runs all tests
  `mvn -Delasticsearch.version=1.5.2 -Dtests.security.manager=false integration` runs integration tests only

### Packaging
  `mvn -Delasticsearch.version=1.5.2 -Dtests.security.manager=false package` packages the plugin in a `jar` file

## Issues

Please file your issue here: https://github.com/Asquera/elasticsearch-http-basic/issues

repository: danielzt/elasticsearch-http-basic

repo_name: danielzt/elasticsearch-http-basic


text:
# Internal Document

Caution: These functions are not intended to used by the library's user, so the
interface may be changed without announcement.

Here is an incomplete list of internal functions.
Not every function will be documented.

## sxg\_buffer internals

You can use these functions by adding `#include <libsxg/internal/sxg_buffer.h>`.
You should not use these functions unless you know what you are doing.

### bool sxg\_write\_cbor\_header(size\_t length, sxg\_buffer\_t\* target)

Appends the CBOR header for a byte string (exposed for test).

#### Arguments

- `length` : Length of the byte string whose header to write.
- `target` : Buffer to be modified.

#### Returns

Returns `true` on success.
On fail, `target` will not be changed.

### bool sxg\_write\_bytes\_cbor(const uint8\_t\* bytes, size\_t length, sxg\_buffer\_t\* target)

Appends a byte string encoded in CBOR. Returns `true` on success.

#### Arguments

- `bytes` : Pointer to binary array data to write.
- `length` : Length of binary array data to write.
- `target` : Buffer to be modified.

#### Returns

Returns `true` on success.
On fail, `target` may be changed(only the header may be written).

repository: google/libsxg

gha_language: C

repo_name: google/libsxg


text:
Nuix Java Engine Baseline
=========================

![Nuix Engine 9.10.x.x](https://img.shields.io/badge/Nuix%20Engine-9.10.x.x-green.svg)

View the GitHub project [here](https://github.com/Nuix/Nuix-Java-Engine-Baseline) or download the latest release [here](https://github.com/Nuix/Nuix-Java-Engine-Baseline/releases).

View the Java docs [here](https://nuix.github.io/Nuix-Java-Engine-Baseline/).

# Overview

**Written By:** Jason Wells

This repository contains a series of examples making use of the Java Engine API and can be used as a foundation for your own Nuix Java Engine based project.  This project provides implementation of some commonly desired functionality one may want around using the Nuix Engine API:

- Environment configuration checks with hints at addressing some misconfigurations
- License resolution with fallbacks when initially desired license is not available
- Logging initialization
- Diagnostics generation
- Third party dependency checking
- Ruby script execution

This project can provide you a quick way to get up and running with some additional functionality built on top.  Due to some of the extra features included, this project may not be the easiest way to wrap you head around the fundamental steps needed to use the Nuix Java Engine API.  If you are looking for a more straight forward example demonstrating core concepts regarding getting the Nuix Java Engine API up and running, see the [Java SDK Starter repository](https://github.com/Nuix/java-sdk-starter).

# Setup

## Nuix Java Engine Distributable

We will need to obtain a Nuix Java Engine API distributable release.  This contains the various binaries and dependencies needed to run the Nuix Java Engine API.

1. Download an Engine release from the [Nuix download site](download.nuix.com).
1. Extract its contents to a directory, such as `C:\EngineRelease`.
1. Edit the system environment variables, adding a new variable named `NUIX_ENGINE_DIR` assigning the directory in the previous step as the value.  The project refers to this environment variable to resolve these dependencies.
1. (Optional) If you wish to obtain your license from either Nuix Management Server (NMS) or Nuix Cloud License Server (CLS) you may want to specify authentication credentials.  The project supports obtaining the user name and password from environment variables `NUIX_USERNAME` and `NUIX_PASSWORD` (although does not require this).

## IDE

This project makes use of [Gradle](https://gradle.org/) and has been tested with [IntelliJ Idea IDE](https://www.jetbrains.com/idea/).  It may work with other IDEs such as [Eclipse](https://www.eclipse.org/eclipseide/) as well, but it has only been tested in IntelliJ Idea.

[Gradle](https://gradle.org/) is a build automation tool.  While it adds a small degree of additional complexity (the [build.gradle.kts](https://github.com/Nuix/Nuix-Java-Engine-Baseline/blob/master/IntelliJ/build.gradle.kts) file is not the most straightforward) it does provide some benefits that make it worth the additional complexity.

1. If you do not already have it installed, download and install [IntelliJ Idea IDE](https://www.jetbrains.com/idea/download/#section=windows) (the community edition should be fine).
1. Download or clone this repository to your development machine.
1. Download a Nuix Java Engine API release zip file and extract its contents to the `engine` sub-directory of your local copy.
1. Start IntelliJ Idea and open project by selecting `\Nuix-Java-Engine-Baseline\IntelliJ\build.gradle.kts`.
1. Import process should begin.  This can take a few minutes as dependencies are pulled down from the internet, dependencies are indexed, etc.

# NuixEngine Class

Making use of the Nuix Java Engine API, at a high level, involves:

1. Ensure environment is configured appropriately, such as having Nuix Engine dependencies in place.
1. Start engine instance.
1. License the engine instance.
1. Once licensed, make use of the `Utilities` object to interact with the rest of the API.

This repository provides much of the logic to perform this work, allowing you to get the engine initialized as simply as:

```java
// Define a resolver which will resolve licenses from Cloud License Server (CLS),
// authenticating using upon environment variable "NUIX_USERNAME" and "NUIX_PASSWORD",
// that have at least 4 workers and the feature "CASE_CREATION".
LicenseResolver cloud_4_workers = NuixLicenseResolver.fromCloud()
    .withLicenseCredentialsResolvedFromEnvVars()
    .withMinWorkerCount(4)
    .withRequiredFeatures("CASE_CREATION");

// Define a resolver which will attempt to resolve a license from a local physical dongle
// that has the feature "CASE_CREATION".
LicenseResolver anyDongle = NuixLicenseResolver.fromDongle()
    .withRequiredFeatures("CASE_CREATION");

// Create a new NuixEngine instance which will first attempt to resolve a cloud license and then
// attempt to resolve a dongle license if one cannot be resolved from cloud, using resolvers
// defined above.  Calling run method to execute code with a licensed Engine instance (if a license can be obtained).
NuixEngine.usingFirstAvailableLicense(cloud_4_workers, anyDongle)
    .setEngineDistributionDirectoryFromEnvVars()
    .run((utilities -> {
        log.info("License was obtained!");
        // Do something with Utilities/API here
    }));
```

In the example above, the `run` method will internally call the `NuixEngine.getUtilities` method.  This in turn will do the following:
1. Call `NuixEngine.checkPreconditions` which will check some environmental settings, using sensible defaults when possible and throwing informative errors when it cannot.
1. Initialize log4j2 logging for you.
1. Constructuct `GlobalContainer` and `Engine` instances for you with some lifetime management hooked into JVM shut down.
1. Work through the 1 or more `LicenseResolver` instances provided to resolve a license, logging information about the process.
1. Log information regarding presence of third party dependencies.
1. Yield a licensed instance of `Utilities` for you to work with, if a license was able to be obtained.

# Running an Example Outside Gradle

Gradle simplifies running the examples, but what is needed to run an example (or your own code) outside of Gradle?  We need to take similar steps to what Gradle would be doing:
- Start a JVM (Java Virtual Machine) to run the program.
- Make sure that the engine release sub-directories `bin` and `bin\x86` can be resolved via the `PATH` environment variable.
- Make sure your JAR can be resolved on the JVM classpath.
- Make sure the Nuix dependency JAR files in the engine release `lib` sub-directory can be resolved on the JVM classpath.
- Make sure we know the entry point to our program.  The entry point is the Java class containing the `public static void main(String[] args)` method to run.

## Make Sure Java is Installed
It is assumed that you have Java installed and that running the command `java` on the console will succeed.

## `PATH` References to `bin` and `bin/x86`
You will need to make sure that the `PATH` environment variable for the JVM process points to the engine release sub-directories `bin` and `bin\x86`.  This can be accomplished different ways.  The easiest is to add those paths to the `PATH` environment variable.  There are ways to set these temporarily for the JVM process you start.  For example you could use a batch file and `SET LOCAL` / `END LOCAL` ([doc](https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/setlocal)) in combination with `SET` ([doc](https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/set_1)) or start your program via something like the .NET class [Process](https://learn.microsoft.com/en-us/dotnet/api/system.diagnostics.process?view=net-7.0) which allows for customizing the environment variables just for a process it starts via

```csharp
Process nuixProcess = new Process();
...
...
string engineDir = "C:\\EngineRelease";
string engineBinDir = engineDir + "\\bin";
string enginex86BinDir = engineBinDir + "\\x86";
string existingPath = Environment.GetEnvironment("PATH");
nuixProcess.StartInfo.EnvironmentVariables.Add("PATH", existingPath+";"+engineBinDir+";"+enginex86BinDir );
```

## Construct the Command

The command takes the basic form:

```
java --add-exports=java.base/jdk.internal.loader=ALL-UNNAMED -cp "<Engine Lib Directory>/*;<Path to Jar>" <Main Class>
```

If my engine release `lib` directory is located at `C:\EngineRelease\lib`, my compiled JAR is located at `C:\MyApp\MyCustomNuixApp-v1.0.0.jar` and my `public static void main(String[] args)` method exists in a class `com.company.CustomNuixApp` then the command would look like this:

```
java --add-exports=java.base/jdk.internal.loader=ALL-UNNAMED -cp "C:/EngineRelease/lib/*;C:/MyApp/MyCustomNuixApp-v1.0.0.jar" com.company.CustomNuixApp
```

Some things to note:

- The argument `--add-exports=java.base/jdk.internal.loader=ALL-UNNAMED` is necessary and you will have startup issues if you do not include this.  Note that `NuixEngine` class will check for this during check of pre-conditions.
- The class path references use forward slashes (`/`) rather than the Windows norm of using back slashes (`\`).
- The engine lib directory class path reference ends with `/*` to include all JAR files in that directory.
- The program JAR reference is an absolute reference to the JAR file (it could be reference to its containing directory though).
- The class path entries are delimited with a semicolon (`;`).
- The *last argument* is the fully qualified name (package and class name) of the class containing the entry point we are running.

# Where to Get Help

Having trouble getting things up and running?  Here are several places you can seek assistance:

- Create a [new Issue](https://github.com/Nuix/Nuix-Java-Engine-Baseline/issues/new)
- Ask on the [Nuix Community Forums](https://forums.nuix.com/)
- Contact [Nuix Support](https://nuix.service-now.com/support)

# License

```
Copyright 2023 Nuix

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

repository: Nuix/Nuix-Java-Engine-Baseline

gha_language: Java

repo_name: Nuix/Nuix-Java-Engine-Baseline


text:
# DevProfileGenerator

Week 9 Homework, Node.js focus
[Profile Generator](https://github.com/malicemarie/DevProfileGenerator)

## Use Cases

As a manager or recruiter I want to generate PDF info sheets of current prospects using their github username.
This will provide a quick way to search for a prospects current and past work in progress.

## Directions

1. Run node index.js in terminal
2. Enter a GitHub username
3. Choose your favorite color (or for organization purposes).
4. Open PDF and save to a local folder on your computer
   - You can view the PDF in the browser or your own PDF viewer.

## Example

![alt text](assets/example.png)

repository: malicemarie/DevProfileGenerator

repo_name: malicemarie/DevProfileGenerator


text:
# SWF-Animation-to-GIF
This script, which relies on the Ruffle and ImageMagick projects, is meant to convert a plain SWF animation to an animated GIF.

## INSTALLATION
This runs on Linux/OS X. If you're on Windows, this script can be converted to a powershell script. That is left as an excercise to the reader.

### Install Ruffle
This relies on the `ruffle_desktop` and `exporter` commands from the https://github.com/ruffle-rs/ruffle project. Install it first per their instructions. I had to compile it from scratch since the prebuilt packages don't seem to offer more than the desktop command.

### Install ImageMagick
This uses the `mogrify` command from ImageMagick at https://imagemagick.org. Install per their instructions.

## USAGE
`./swf-to-gif.sh FILENAME`

FILENAME is the full path to the SWF file you want to convert. When the script is complete an animated GIF will be placed in the same directory as the SWF file. A copy of the animated GIF will also be placed in a `./GIFs` directory.

license: Unlicense

repository: cajunjoel/SWF-Animation-to-GIF

repo_name: cajunjoel/SWF-Animation-to-GIF


text:
# gen-vec [![Build Status](https://travis-ci.org/Mnenmenth/gen-vec-rs.svg?branch=master)](https://travis-ci.org/Mnenmenth/gen-vec-rs)

 Vector of reusable, generational indices that owns its values

 [Inspired by Catherine West's closing keynote at RustConf 2018](https://kyren.github.io/2018/09/14/rustconf-talk.html)

 ### Closed vs. Exposed index allocation implementations

 `ClosedGenVec` uses a non user-accessible index allocator to manage indices

 `ExposedGenVec` relies on an external `IndexAllocator`

 As such, an `IndexAllocator` must be created and used to allocate/deallocate indices manually.
 This is useful for using the same `Index` across multiple `ExposedGenerationalVec` instances

 **Note:** `IndexAllocator` cannot be used with `ClosedGenerationalVec` since it has its own
 internal `IndexAllocator`

 ### Explanation of Generational Indices

 `Index` structs are used to access the vector's contents. An `Index` contains an index for the vector
 and a generation (which is 0 initially).

 Deallocated/removed `Index`s go into a list of free `Index`s that can be reused

 Every time an `Index` is reused, the internal generation is incremented. This ensures that a deallocated
 `Index` handle can't access data that it no longer validly points to

 ### Usage
 Add `gen-vec` to your `Cargo.toml`
```toml
[dependencies]
gen-vec = "0.3.0"
```
Using the self-allocating `ClosedGenVec`
```rust
use gen_vec::Index;
use gen_vec::closed::ClosedGenVec;

let mut vec: ClosedGenVec<i32> = ClosedGenVec::new();

let index: Index = vec.insert(42);
assert!(vec.contains(index));

let value: Option<&i32> = vec.get(index);
assert_eq!(value, Some(&42));

vec.remove(index);
assert!(!vec.contains(index));
```

Using `ExposedGenVec` with `IndexAllocator`
```rust
use gen_vec::Index;
use gen_vec::exposed::{IndexAllocator, ExposedGenVec};

let mut allocator: IndexAllocator = IndexAllocator::new();

let index: Index = allocator.allocate();

let mut vec: ExposedGenVec<i32> = ExposedGenVec::new();
vec.set(index, 5);
assert!(vec.contains(index));

let value: Option<&i32> = vec.get(index);
assert_eq!(value, Some(&5));
```

repository: Mnenmenth/gen-vec-rs

repo_name: Mnenmenth/gen-vec-rs


text:
# turing-lab-resources

### This is a gathering place for resources for the Turing Lab.

#### NodeBots
##### Books:
+ [Learning JavaScript Robotics](https://www.amazon.com/Learning-JavaScript-Robotics-Kassandra-Perch/dp/1785883348/ref=sr_1_1?ie=UTF8&qid=1480791035&sr=8-1&keywords=learning+javascript+robotics)  This is a good beginner book that will dive into some Arduino Uno based projects using Johnny-Five.

+ [MAKE: Javascript Robotics](https://www.amazon.com/JavaScript-Robotics-Johnny-Five-Raspberry-BeagleBone/dp/1457186950/ref=pd_bxgy_14_img_2?_encoding=UTF8&pd_rd_i=1457186950&pd_rd_r=Y6FSYK2DX954X6Y4JHR6&pd_rd_w=RccP2&pd_rd_wg=MLaXk&psc=1&refRID=Y6FSYK2DX954X6Y4JHR6)
This is a more advanced book that has projects for the Arduino, Raspberry Pi and BeagleBone.

+ [Getting Started with NodeBots](./nodebots/getting-started.markdown)

repository: Jeff-Duke/turing-lab-resources

repo_name: Jeff-Duke/turing-lab-resources


text:
## Test Angular2 Dart @Input @Output

How to run

1. step0
  * get dart SDK
  * get dartium
2. step1
  * pub get
  * pub serve
3. step2
  * set http://localhost:8080/ to browser
4. step3
  * click **Send** buttons
5. screenshot
  * ![screenshot](./20170129-2.jpg)


text:
# Maven Test Time Profiler

TestTime consists of a maven plugin and extension that show the top N slowest unit tests and suites.

[![Apache License, Version 2.0, January 2004](https://img.shields.io/github/license/nanometrics/maven-testtime.svg?label=License)](http://www.apache.org/licenses/)
[![Maven Central](https://img.shields.io/maven-central/v/ca.nanometrics.maven.plugins/maven-testtime-parent.svg)](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22ca.nanometrics.maven.plugins%22%20a%3A%22testtime-maven-plugin%22)
[![Build Status](https://travis-ci.com/nanometrics/maven-testtime.svg?branch=develop)](https://travis-ci.com/nanometrics/maven-testtime)

## Single Module Projects

For single module builds, use the plugin. It will display the 5 slowest suites and tests in the log
after the test phase, and it will create a `testtimes.txt` file in the `target` directory
with the 20 slowest.

```
  <build>
    <plugins>
      <plugin>
        <groupId>ca.nanometrics.maven.plugins</groupId>
        <artifactId>testtime-maven-plugin</artifactId>
        <version>1.0.0</version>
        <executions>
          <execution>
            <goals>
              <goal>display</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
```

## Multi-Module Projects

For multi-module builds, you can use the extension to get a single `testtimes.txt` file in the top level
project `target` directory, if you want.

In the top-level pom, put:

```
  <build>
    <extensions>
      <extension>
        <groupId>ca.nanometrics.maven.plugins</groupId>
        <artifactId>testtime-maven-extension</artifactId>
        <version>1.0.0</version>
      </extension>
    </extensions>
  </build>
```

You can still use the plugin above on multi-module projects too, and get individual project reports, if desired.

## Properties

There are 2 system properties to control the number of results that are shown.

* testtime.loglimit  - the number of slow tests/suites to show in the log
* testtime.filelimit - the number of slow tests/suites to show in the file

e.g. `mvn -Dtesttime.loglimit=10 install`

repository: nanometrics/maven-testtime

repo_name: nanometrics/maven-testtime


text:
---
layout: "documents"
page_title: "Networking concepts"
sidebar_current: "networking-concepts"
description: |-
  Networking concepts
---

# Concepts

Container networking with Contiv is as easy as creating networks
and assigning containers to the networks. The advantage of Contiv is that you can
apply policies to govern the security, bandwidth, priority, and other parameters for container
applications.

## Containers vs. VMs

Containers are a more efficient use of resources than Virtual Machines(VMs). VMs isolate resources at the operating system level. Containers share a single Operating System and kernel between isolated tenants, reducing time spent in patching and updating several operating systems.

![ContivVms](/assets/images/ContvsVM.png)

## Groups
A *group* (or an *application group*) identifies a policy domain for a *container*
or a *pod*.  The grouping is an arbitrary
collection of containers that share a specific application domain, for example
all *production,frontend* containers, or *backup,long-running* containers.
This association is often done by specifying a label for the group.

Most notably, an application group or tier in Contiv has no one-to-one mapping
to a network or an IP subnet of a network. This encourages you to group
applications based on their roles and functions, and have many application
groups belong to one network or an IP subnet.

## Policies
A *policy* describes an operational behavior on a *group* of containers. The operational
behavior can be enforcement, allocation, prioritation, traffic redirection,
stats collection, or other action on the group on which the policy is applied.

Contiv supports two types of policies:

* Bandwidth - limiting the overall resource use of a group
* Isolation - limiting the access of a group

A group can be associated with more than one policy and in this case all policies are
applied to the group. For example, a bandwidth policy
could specify a limit on bandwidth consumption, while an isolation policy specifies
from which addresses the container can be accessed. When a container is scheduled
in this group, both policies are applied to it.

Policies follow the container independent of where it is scheduled. Therefore, policy
is specified for a given cluster, but enforcement done on the host where container is
scheduled.

## Network
*Network* is an IPv4 or IPv6 subnet that may be provided with a default gateway. For
example, a network can map to a subnet `<IP_ADDRESS>/24` that has a default gateway
of `<IP_ADDRESS>`.

Application developers usually don't care which network an application belongs to.
The network association of an application becomes relevant when the application
must be exposed to an external network, to allow non-container workloads
or clients to communicate with it.

###Networks in Contiv
Contiv allows you to define two types of networks:

* application network - Network used by container workloads
* infrastructure network - Create a virtual network in the host namespace. For example, infrastructure networks are used by the virtual
layer of host-resident infrastructure services such as monitoring.

###Network Encapsulation
There are two types of network encapsulation in Contiv:

* Routed - useful for *overlay* topology and *L3-routed BGP* topology
* Bridged - useful for connecting to a *layer2 VLAN* network

## Tenant
*Tenants* provide the namespace isolation for Contiv. A tenant can have many *networks*,
each with its own subnet address. A user within that tenant namespace can create
networks with arbtrary subnet addresses, and re-use subnet IP addresses in other tenants.

A *tenant* in the physical network is called virtual routing and forwarding (VRF).
Depending on the mode of external connectivity (layer2, layer3, or
Cisco ACI), the Contiv forwarding layer communicates the *tenant* to the external network
using a *VLAN* or *VXLAN* ID. The Contiv routing plane (like BGP) is
used to communicate the VRF-ID to rest of the network.

gha_license_id: NOASSERTION


text:
# Custom types

Custom types is a gogo protobuf extensions that allows for using a custom
struct type to decorate the underlying structure of the protocol message.

# How to use

## Defining the protobuf message

```proto
message CustomType {
  optional ProtoType Field = 1 [(gogoproto.customtype) = "T"];
}

message ProtoType {
  optional string Field = 1;
}
```

or alternatively you can declare the field type in the protocol message to be
`bytes`:

```proto
message BytesCustomType {
  optional bytes Field = 1 [(gogoproto.customtype) = "T"];
}
```

The downside of using `bytes` is that it makes it harder to generate protobuf
code in other languages. In either case, it is the user responsibility to
ensure that the custom type marshals and unmarshals to the expected wire
format. That is, in the first example, gogo protobuf will not attempt to ensure
that the wire format of `ProtoType` and `T` are wire compatible.

## Custom type method signatures

The custom type must define the following methods with the given
signatures. Assuming the custom type is called `T`:

```go
func (t T) Marshal() ([]byte, error) {}
func (t *T) MarshalTo(data []byte) (n int, err error) {}
func (t *T) Unmarshal(data []byte) error {}

func (t T) MarshalJSON() ([]byte, error) {}
func (t *T) UnmarshalJSON(data []byte) error {}

// only required if the compare option is set
func (t T) Compare(other T) int {}
// only required if the equal option is set
func (t T) Equal(other T) bool {}
// only required if populate option is set
func NewPopulatedT(r randyThetest) *T {}
```

Check [t.go](test/t.go) for a full example

# Warnings and issues

`Warning about customtype: It is your responsibility to test all cases of your marshaling, unmarshaling and size methods implemented for your custom type.`

Issues with customtype include:
  * A Bytes method is not allowed.
  * Defining a customtype as a fake proto message is broken.
  * proto.Clone is broken.
  * Using a proto message as a customtype is not allowed.
  * cusomtype of type map can not UnmarshalText
  * customtype of type struct cannot jsonpb unmarshal

repository: gravitational/wormhole

repo_name: gravitational/wormhole


text:
---
layout: post
title: Dynamic assignation and proxy objects
categories:
  - Java
  - Proxy
  - JPA implementation
resource: true
---

	Still in JPA,
	you perhaps wonder how lazy-loading
	is managed. This is done via proxy objects.

	The Java SE platform provides a proxy
		class which creates proxy objects for interfaces. But this does not
	help when you wish to do the job on POJOs.

	A framework allows to do this (and many other bytecode
	operations) : Javassist.
	The ProxyFactory
	class allows to build a substitute object for any class via the createClass
	method. I guess the substitution is done by subclassing.

	Instances of this "dynamic" class can be created calling the newInstance
	method. The created object implements the Proxy
	interface. To this this interface can be associated a MethodHandler
	object. Such an object is called on any access to the dynamic instance
	(including null tests). For a lazy-loading field, this is where to
	replace the dynamic instance.

	It is also recommended to specify a MethodFilter
	object to the ProxyFactory to avoid the creation of proxies when
	finalizing the reference.

 	ProxyFactory factory = new ProxyFactory();
	factory.setSuperclass(MyClass.class);
	factory.setFilter(
	  new MethodFilter() {
	    public boolean isHandled(Method m) {
	        // The filter to avoid finalization
	        return !m.getName().equals("finalize");
	    }
	  }
	);
	Class cl = factory.createClass();
	MethodHandler handler = new MethodHandler() {
	    public Object invoke(
	      Object self,
	      Method m,
	      Method proceed,
	      Object[] args
	    ) throws Throwable {
	        // On each access, execution of the original operation
	        return proceed.invoke(self, args);
	    }
	};
	MyClass cls = (MyClass)cl.newInstance();
	((Proxy)cls).setHandler(handler);

	My way crossed a single problem with Javassist: null tests. While
	using dynamic objects to avoid unnecessary database access, the method
	filter proceeded the proxy replacement (database access) properly on
	null tests in most cases. But in some rare cases, the null test did not
	call the method filter and did not perform the test properly. Perhaps
	was this a misuse of the library. Anyway the workaround was to perform
	a double check (null reference test + null test on a mandatory
	property) in order to ensure the method filter call.

	Edit (2014-10-16) : this last point requires further explanations (in a few words this was a misuse). I used Javassist proxies to implement lazy-loading of an object-relational mapped attribute. The point was about replacing the proxy object. To do so, I was only listening to method calls on the proxy. But a field access is not a method call: it was possible to create direct references on the proxy object before replacing it. It seemed then impossible to replace all the assignated references and the proxy object was still assignated (that caused the null tests to fail).


text:
# Oxford Comma

This node app watches the Twitter stream to find tweets that do or don't use the Oxford comma. It displays a running tally on a site.

## Installation

Get the repo and pull the dependencies:

```
git clone https://github.com/stvnrlly/oxfordcomma.git
cd oxfordcomma
npm install
```

You'll also need API stuff for Twitter. Once you have that, put all 4 variables in a file called `.env`.

Finally, just do `foreman start` and things should start to happen.

repository: stvnrlly/oxfordcomma

repo_name: stvnrlly/oxfordcomma


text:
---
layout: post
title: "Spam Karma"
categories:
- blogging
date: 2004-12-16 00:00
comments: true
---

I read about a clever anti-spam plugin on the WordPress Development Blog. Spam Karma assesses comments on multiple dimensions to determine their 'spaminess'. It also tries to prevent any false positives at the same time as minimising the effort required to moderate comments manually.

I've installed the plugin now, as I've periodically had problems with comment spam (though nothing like the level of spamming I got when I was using MovableType). It should be exactly like commenting before. However, if your comment gets flagged up as being 'borderline spammy' (perhaps because it has more than three URLs in it), you may be asked to enter a code into a text box that you'll be presented with as an image.  As usual, let me know if you hit any problems.

repository: bsag/blog-octo

repo_name: bsag/blog-octo


text:
# Literals

Numeric literals can be type annotated by adding the type as a suffix. As an example,
to specify that the literal `42` should have the type `i32`, write `42i32`.

The type of unsuffixed numeric literals will depend on how they are used. If no
constraint exists, the compiler will use `i32` for integers, and `f64` for
floating-point numbers.

```rust,editable
fn main() {
    // Suffixed literals, their types are known at initialization
    let x = 1u8;
    let y = 2u32;
    let z = 3f32;

    // Unsuffixed literals, their types depend on how they are used
    let i = 1;
    let f = 1.0;

    // `size_of_val` returns the size of a variable in bytes
    println!("size of `x` in bytes: {}", std::mem::size_of_val(&x));
    println!("size of `y` in bytes: {}", std::mem::size_of_val(&y));
    println!("size of `z` in bytes: {}", std::mem::size_of_val(&z));
    println!("size of `i` in bytes: {}", std::mem::size_of_val(&i));
    println!("size of `f` in bytes: {}", std::mem::size_of_val(&f));
}
```

There are some concepts used in the previous code that haven't been explained
yet, here's a brief explanation for the impatient readers:

* `std::mem::size_of_val` is a function, but called with its *full path*. Code
  can be split in logical units called *modules*. In this case, the
  `size_of_val` function is defined in the `mem` module, and the `mem` module
  is defined in the `std` *crate*. For more details, see
  [modules][mod] and [crates][crate].

[mod]: ../mod.md
[crate]: ../crates.md

repository: rust-lang/rust-by-example

repo_name: rust-lang/rust-by-example


text:
# DodgerV2
A 2D spaceship shooter game in Unity.

DodgerV2 is a remake of "Dodger" a game I made in Unity around 2016 which you can find [here](https://github.com/thegrimsey/dodger). I made this remake for a project in my Tech class and to see how far I had come in the last years (as well as to figure out how far Unity had come).

The development log for this project is available on my website right [here](https://thegrimsey.net/games/DodgerV2.html).

# "Tech-stack"
DodgerV2 uses Unity's own ECS "Entities" in a hybrid model. Movement is handled in a system whilst collision between bullets, asteroids, and the player are handled in regular gameobjects.


text:
vep/87
======

First of all, there was a bug building the local caches for vep/87.  I reported
it to Ensemble (their ticket #175756) and Will McLaren responded that it was a
bug in the `convert_cache.pl` script.  I confirmed that the new zip contains
the fix so we're reinstalling from scratch here.

    VERSION=87
    CLUSTER=${CLUSTER?:CLUSTER must be set}
    TOOL=/sw/apps/bioinfo/vep
    mkdir -p $TOOL
    cd $TOOL
    mkdir -p $VERSION mf
    VERSIONDIR=$TOOL/$VERSION
    cd $VERSIONDIR
    CLUSTERDIR=$VERSIONDIR/$CLUSTER
    mkdir -p $CLUSTER src_$CLUSTER
    cd src_$CLUSTER
    wget https://github.com/Ensembl/ensembl-tools/archive/release/${VERSION}.zip
    unzip ${VERSION}.zip
    cd ensembl-tools-release-${VERSION}/scripts/variant_effect_predictor/

No need to install `DBD::mysql` within `perl_modules/5.18.4` since this was
already done for `vep/82`.

Now back to vep.  Create the cache directory.

    CACHEDIR=/sw/data/uppnex/vep/${VERSION}
    mkdir -p $CACHEDIR
    module load perl/5.18.4
    module load perl_modules/5.18.4
    export PATH=$CLUSTERDIR/htslib:$PATH
    export PERL5LIB=$CLUSTERDIR:$PERL5LIB
    ./INSTALL.pl -d $CLUSTERDIR -t -c $CACHEDIR

NOTE: running the INSTALL.pl script will generate a question:

    Have you
    1. added /sw/apps/bioinfo/vep/87/milou to your PERL5LIB environment variable?
    2. added /sw/apps/bioinfo/vep/87/milou/htslib to your PATH environment variable?
    (y/n)

The two `export` lines above do that, so answer `y`.

It will install BioPerl and htslib and maybe a few other things for itself as
parts of the Ensembl API for VEP only.  Seems to want its own versions, so just
let it continue.  It will also run some tests, which is nice.

It will later ask if you want to install cache files, fasta files, and others.
On milou, answer `y`, and then `0` to install all choices.  This part takes a
long time.  If there is an error/message during cache installation (the first
step), then it will not ask to install Fasta or plugins; if this happens, then
rerun the INSTALL script, saying `n` to the cache installation but `y` to the
rest.  FASTA will probably not be installed (because of the cache installation)
and install plugins, but not data.  That will be up to the users of the
plugins.  One uses ExAC, which we do have as a database.

If on rackham, answer `n` to all cache installation questions.

Copy over the scripts.

    cd $VERSIONDIR/src_$CLUSTER/ensembl-tools-release-${VERSION}/scripts/variant_effect_predictor/
    mkdir $CLUSTERDIR/scripts
    rsync -rPlt * $CLUSTERDIR/scripts/

Ensure all can find the proper perl via `#!/usr/bin/env perl` line to  and (unlike earlier VEP versions) do not deactiveate the install script so users can install their own to their own project directories.

    cd $CLUSTERDIR/scripts
    vi *.pl

repository: UPPMAX/install-methods

repo_name: UPPMAX/install-methods


text:
First of all, we need the river images from google map. According to https://developers.google.com/maps/documentation/staticmaps/, the simplest way to download a specific map image is by using http request.

For example, if we need a map image that have a center at (22.6983427,113.7134584) with zoom level 11, we could simply request for "http://maps.googleapis.com/maps/api/staticmap?center=22.6983427,113.7134584&zoom=11&size=640x640&maptype=roadmap&sensor=false" (which is the Pearl River). Thus we could use curl to download the map image.

## Example Code
```
string lo,la,z,sc;

int main(int argc, const char * argv[])
{
    if(argc==4)
    {
        lo=argv[1];
        la=argv[2];
        z=argv[3];
    }
    sc="curl -o catch.png \"http://maps.googleapis.com/maps/api/staticmap?center="+lo+","+la+"&zoom="+z+"&size=640x640&maptype=roadmap&sensor=false\"";
    system(sc.c_str());
    while(!img)
        img=cvLoadImage( "catch.png" );
    ...
```

repository: Eurce/River-Melody

repo_name: Eurce/River-Melody


text:
---
layout: post
title: "Project Euler Problem 6: Sum of Square Difference"
---

Let's solve problem six in Project Euler in a programming language of your choice. Yes, that's correct, you can choose!

### Spoiler alert

If you have an academic interest in Project Euler, and you have not solved problem six, I suggest you do so before reading this post lest you deprive yourself of an opportunity to learn.

## The problem

This is one of the easiest Project Euler problems.

> Find the difference between the sum of the squares of the first one hundred natural numbers and the square of the sum.

Up to $$n = 100$$ it is trivial, but we can use [math][1] to solve it up to massive numbers, like [a thousand quinquagintaquadringentillion][2] (that's $$10^{2703}$$, or 1 followed by 2703 zeros), that could otherwise take years to solve even for a computer.

## Linear solution

Sometimes the most obvious solution isn't necessarily the best one.

$$
(1 + 2 + 3 + \cdots + 100)^2 + (1^2 + 2^2 + 3^2 + \cdots + 100^2)
$$

This was my first try in Ruby.

{% highlight ruby %}
(1..100).reduce(:+)**2 - (1..100).map { |n| n**2 }.reduce(:+)
{% endhighlight %}

For small numbers, this works well. But what if, instead of 100, you had to solve for a thousand quinquagintaquadringentillion? No one wants to create arrays with that many elements or loops with that many iterations.

## A better solution

With the help of elementary math--specifically, mathematical induction--we can solve this problem up to any number.

This is the square of the sum up to $$n$$.

$$
(1 + 2 + 3 + \cdots + n)^2 = \left(\frac{n(n + 1)}{2}\right)^2
$$

And the sum of squares up to $$n$$.

$$
1^2 + 2^2 + 3^2 + \cdots + n^2 = \frac{n(n + 1)(2n + 1)}{6}
$$

And the solution up to $$n$$.

$$
\left(\frac{n(n + 1)}{2}\right)^2 - \frac{n(n + 1)(2n + 1)}{6}
$$

Using these formulas, we can solve this problem up to nonsensical numbers in microseconds. Here's the solution in Ruby; it's not terribly interesting.

{% highlight ruby %}
(n * (n + 1) / 2)**2 - (n * (n + 1)) * ((n * 2) + 1) / 6
{% endhighlight %}

I was curious, so I created [benchmarks][3] to illustrate the efficiency of four different techniques: Using map and reduce, enumerators, while loop, and induction. I tested the earlier three against $$n = 10^6$$, and the latter against a thousand quinquagintaquadringentillion, or $$10^{2703}$$.

{% highlight ruby %}
def map_reduce(n)
  (1..n).reduce(:+)**2 - (1..n).map { |n| n**2 }.reduce(:+)
end

def enum(n)
  sum_of_squares = square_of_sum = 0
  n.downto 1 do |i|
    square_of_sum += i; sum_of_squares += i * i
  end
  square_of_sum**2 - sum_of_squares
end

def while_loop(n)
  sum_of_squares = square_of_sum = 0
  while n > 0
    square_of_sum += n; sum_of_squares += n * n; n -= 1
  end
  square_of_sum**2 - sum_of_squares
end
{% endhighlight %}

{% highlight text %}
Benchmarking with 10000000 iterations
       user     system      total        real
MapReduce  2.890000   0.030000   2.920000 (  2.928501)
Enum       1.610000   0.010000   1.620000 (  1.611081)
Loop       1.200000   0.000000   1.200000 (  1.201676)

Benchmarking with 10^2703 iterations
Induction  0.000000   0.000000   0.000000 (  0.000010)
{% endhighlight %}

It's hardly surprising, but map/reduce, enumerator, and `while` loop took 2.9, 1.6, and 1.2 seconds respectively. I imagine `while` is faster because it deals only with primitive types and no data structures.

Using our equation took 10 microseconds for a ridiculously larger number, which is 10 millionth of a second. I ran these on my first gen MacBook Pro Retina.

## Playing around with Swift and JavaScript

Again, no surprises here, but I was curious.

{% highlight javascript %}
function diff(n) {
  var sumOfSquares = squareOfSum = 0;

  while(n) {
    sumOfSquares += n * n, squareOfSum += n, n--;
  }

  squareOfSum *= squareOfSum;
  return squareOfSum - sumOfSquares;
}
{% endhighlight %}

On my computer, using map and reduce fills up the stack and throws an exception at $$n \sim 130000$$, while using a loop solves up to $$n = 10^9$$ in circa 3.5 seconds.

Swift didn't fair much better.

{% highlight swift %}
func diff(n: Int) -> Int {
    let array = [Int](1...n)

    let sumOfSquares = array.map({ $0 * $0 }).reduce(0, +)
    let sum = array.reduce(0, +)
    let squareOfSum = sum * sum

    return squareOfSum - sumOfSquares
}
{% endhighlight %}

You can find the [sample code][3] including benchmarks on Github.

[1]: http://en.wikipedia.org/wiki/Mathematical_induction
[2]: http://en.wikipedia.org/wiki/Names_of_large_numbers
[3]: https://gist.github.com/abitdodgy/b88a8018527107eb25c9

<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>

repository: abitdodgy/blog

branch_name: HEAD

repo_name: abitdodgy/blog


text:
# DimensionDescriptor

Inherits from: [ComponentList](../Base/ComponentList.md)

## Description

An ordered set of metadata concepts that, combined, classify a statistical series, and whose values, when combined (the key) in an instance such as a data set, uniquely identify a specific observation.

## References

### Inherited

**components** ([DimensionComponent](DimensionComponent.md) - 1..*): An association to the Dimensions, MeasureDimension and TimeDimension comprising the Key Descriptor.


text:
## Initial Setup

Hope you have successfully set up the project in your local system and install all dependencies

## About the JobOpenings Component

This is a resuasble component for dispalying detailed information on job, internship or reasearch opportunities available in an organization. This Component is highly reusable and customizable via props

## How to use the component

Import the component to `pages/index.js`
`import {JobOpenings} from "../components/JobOpenings";`

## How to handle props to the component

```
<JobOpenings title="Current Openings"
                   openings={[{title: "sample-title", description: "sample-description", applyLink:"https://www.google.com", skillRequirements: ["Python", "Flask", "Data Science", "NLP", "OpenCV"]}]} />
```

`title` prop is the title of your job portal
`openings` prop is the array of the number of opportunities available in the organization at that point of time


text:
# OpenJDK and Graal CE build scripts

In this repository are build scripts for producing a graal-svm-capable
builder JDK and subsequently a build of graal CE master.

# Usage

```
 $ bash build.sh
```

repository: jerboaa/openjdk-graal-builder

repo_name: jerboaa/openjdk-graal-builder


text:
# Game-of-Life
https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life

## Goals

To make our version of Conway's Game of Life, and in the process, use the concepts learned about
C++ features.

## Tasks

### Current Tasks

* On Board:
    * Add a field, which can hold 20x20 cells
    * Add a method, which will print the current board on screen
* Test it by changing main() to :
    * Create a board instance
    * Show it

### Create a board

We need a SIZExSIZE board that we can represent in memory.

With the board, we will need to be able to:
1. show it on Console
2. test whether a cell (x,y) is alive or not
3. change the status of a cell (x,y)
4. move to the next generation (apply the four rules to every cell on the board)

#### Design Notes

C++ features we will be using:
* Class (Board); the declarations for this class will be on a file: Board.h (a header file).
* We want the board to be dynamic in size.

### Create a driver program

1. drops some groups of living cells on an initially empty board
2. progresses on generations, showing the intermediate results
3. after a number of generations, shows some final statistics

#### Design Notes

Driver program: a main function. It will be using the board.


text:
# OUTDATED PROJECT !
practices changed, and I will not update it anymore

# Strapi + NextJS

From the [strapi-docker repository](https://github.com/strapi/strapi-docker), I add a
[NextJS](https://nextjs.org) starter architecture,
[SASS](https://github.com/zeit/next-plugins/tree/master/packages/next-sass),
[Easy-peasy](https://github.com/ctrlplusb/easy-peasy) (Store managment with new [React HOOKS](https://reactjs.org/docs/hooks-intro.html)),
[reactstrap](https://reactstrap.github.io/) (Bootstrap 4), ESlint (airbnb) and Axios...

## Quickstart (recommended)

1. `git clone https://github.com/strapi/strapi-docker && cd strapi-docker`
2. Run using `docker-compose up`
3. Then start the app (NextJS)

```
cd client
npm install (or) yarn
npm run dev (or) yarn dev
```

There's a minimalistic script to deploy it
```
sh ./deploy-app
```

You should the be able to access your Strapi installation at [localhost:1337](http://localhost:1337) and the front app on [localhost:3000](http://localhost:3000) in development mode

## Environment variables

- `APP_NAME` to override the `strapi-app` generated folder name (you should also update the volumes paths).
- `DATABASE_CLIENT` a database providers supported by Strapi: MongoDB, Postgres, MySQL, Sqlite3 and Redis.
- `DATABASE_HOST` database service name.
- `DATABASE_PORT` depends on your database client.
- `DATABASE_NAME` initializes a database with specific name (default strapi). When using MongoDB, you should also update the `MONGO_INITDB_DATABASE` environment in the db service.
- `DATABASE_USERNAME` set the username of the database connection.
- `DATABASE_PASSWORD` set the password of the database connection.
- `DATABASE_SRV` boolean for SRV.
- `DATABASE_SSL` boolean for SSL.
- `DATABASE_AUTHENTICATION_DATABASE` set the authentification.

PR are welcome.

repository: manuelLandreau/strapi-nextjs-starter

repo_name: manuelLandreau/strapi-nextjs-starter


text:
[go back](../README.md)

   #### Create an ssh key pair to be used with all the environments.

   #### Create a free tier [GCP](https://cloud.google.com/) account:
    Requires a card but prepaid mastercard/visa can’t be used

    a. Create a ubuntu 16.04 vm

    b. ssh into the vm created at step a. and run the following: ip a

    c. Paste the output here:

    d. ssh into the vm create at step a. and run the following: ifconfig

    e. Paste the output here:

    f. Share sample test output results from below.

   #### Create a free tier [AWS](https://aws.amazon.com/free) account:
    Requires a card but prepaid mastercard/visa can be used

    a. Create a ubuntu 16.04 vm

    b. ssh into the vm create at step a. and run the following: ip a

    c. Paste the output here:

    d. ssh into the vm create at step a. and run the following: ifconfig

    e. Paste the output here:

   #### Create a free [Azure](https://azure.microsoft.com/en-us/free/) account:
    Requires a card but prepaid mastercard/visa can’t be used

    a. Create a ubuntu 16.04 vm

    b. ssh into the vm create at step a. and run the following: ip a

    c. Paste the output here:

    d. ssh into the vm create at step a. and run the following: ifconfig

    e. Paste the output here:

   #### Create a free tier [Oracle Cloud](https://www.oracle.com/cloud/free) account:
    Requires a card but prepaid mastercard/visa can’t be used

    a. Create a ubuntu 16.04 vm

    b. ssh into the vm create at step a. and run the following: ip a

    c. Paste the output here:

    d. ssh into the vm create at step a. and run the following: ifconfig

    e. Paste the output here:

repository: jareddonnelly/Getting-Started

repo_name: jareddonnelly/Getting-Started


text:
# turkycat.com

this is the full source code for the website turkycat.com

## prereqs

install node and npm

## setup

```
git clone https://github.com/turkycat/node-conway.git
cd node-conway
npm i
```

## running the server (dev)

this project is configured (via `package.json`) to use nodemon and webpack to monitor for file changes and restart the server / repack as necessary. this means we can start the node and webpack monitors once with the configured commands to make development easy.

in two seperate terminals:

```
npm run dev-server
```

```
npm run dev-bundle
```

## accessing the server

point your web browser at:
`localhost:3000`


text:
# Falco Office hours - Meeting 28th June 2019

**MC:** Lorenzo Fontana

**Who joined**:

- Lorenzo Fontana ([@fntlnz](https://github.com/fntlnz))
- Mark Stemm ([@mstemm](https://github.com/mstemm))
- Marky Jackson ([@markyjackson-taulia](https://github.com/markyjackson-taulia))

## This week highlights
- PSP Support is coming! [falco#682](https://github.com/falcosecurity/falco/pull/682)
- We are investigating on how to do unit tests for Falco and writing the first ones. [falco#687](https://github.com/falcosecurity/falco/pull/687)
 [falco#692](https://github.com/falcosecurity/falco/pull/692)
- Better installation docs [falco-website#29](https://github.com/falcosecurity/falco-website/pull/29)
- Better build from source docs [falco-website#28](https://github.com/falcosecurity/falco-website/pull/28)

## Proposals

[office-hours#13](https://github.com/falcosecurity/office-hours/issues/13): Falco unit testing

- **Lorenzo**: A thing from this week is that we introduced a testing framework using catch2 for falco. Everyone is encouraged to take a look and provide feedback, we are now doing the first test for token_bucket.cpp in the falco engine. Falco already has integration tests but we want to test single units to be more effective at writing new features and avoid regressions.
- **Mark**: Ok for unit tests but why did you decide to go over with Catch2 vs Google test?
Google test is widely used in Sysdig projects and since a very large part of the codebase is coming from sysdig you could just copy some tests from us, that would be a good deal. Also bad news, the token_bucket.cpp is already tested with google test, well, the version that we copied
- **Lorenzo**: That’s a good point, I will look into it with the other maintainers and will escalate this discussion to a broader group of people.

[office-hours#14](https://github.com/falcosecurity/office-hours/issues/14): PSP support

- **Mark**: I’m working on PSP, the idea is that you take a PSP and turn it to a falco rule and it checks all the PSP says, if you see the same result, it means that the PSP works in the way you expect. So the idea is that you can use falco to check out your psps and see if they behave like you expected.
- **Lorenzo**: Thanks Mark!

**Other discussions without a proposal**:

- **Lorenzo**: Marky, you told me you would like to work on CI with the CNCF in order to have something external from sysdig and since travis CI is not serving us well we really need your help
- **Marky**: I will work on figuring out something for that, I’ve been already working on CI with the CNCF for another project and I have some opinions on using Jenkins for it.

repository: falcosecurity/community

repo_name: falcosecurity/community


text:
# docker-coffee-tor

Docker container to run coffeescript services located in /opt/coffee/app

##Setup with Dockerfile

```Dockerfile
FROM gmelillo/docker-coffee:latest

COPY /path/of/your/app /opt/coffee/app/
```
## Run your container with tor and polipo linked

```docker-compose
version: '2'
services:
  tor:
    image: gmelillo/tor:latest
    restart: always
  polipo:
    image: gmelillo/polipo:latest
    depends_on:
      - tor
    links:
      - tor:tor
  app:
    image: yourimage
    restart: always
    links:
      - polipo:polipo
    depends_on:
      - polipo
```

## Exported volumes

- `/opt/coffee/app/`          Application folder.

repository: gmelillo/docker-coffee-tor

gha_language: Dockerfile

repo_name: gmelillo/docker-coffee-tor