text:
json-schema-env-config
======================

This library allows you to define an application's configuration parameters
using JSON schema, and to then load configuration from environment variables
using that schema, without having to explicitly name the parameter's environment
variables.

This library is built using the TypeScript types for JSON Schema drafts 4 and 6
that are provided by the `@types/json-schema` package. Drafts 5, 7 and 2019-09
are probably also compatible. See the section below for details.

This library does not validate that the resulting config actually conforms to
the JSON schema: it's only interested in the data types.

## Usage

The library exports two functions:

```typescript
/**
 * Load config from the given environment variables, identifying relevant
 * variables and performing type conversion according to the given schema and
 * options.
 * @param env The environment variables to load config from.
 * @param schema The configuration object's JSON schema.
 * @param options Options that control how property names are mapped to
 *                environment variable names.
 * @return A configuration object containing values loaded from the given
 *         environment variables.
 */
function loadFromEnv(
  env: NodeJS.ProcessEnv,
  schema: JSONSchema,
  options: EnvVarNamingOptions = {
    case: 'snake_case',
    propertySeparator: '__',
    prefix: undefined
  }
): Record<string, JSONType>

/**
 * Override property values in arrays of homogeneous objects using config loaded
 * from environment variables, performing type conversion according to the given
 * schema and options.
 * @param config The existing config containing the arrays to override.
 * @param env The environment variables to load overriding config from.
 * @param schema The configuration object's JSON schema.
 * @param options Options that control how property names are mapped to
 *                environment variable names.
 * @return A copy of the configuration object that has array values overridden
 *         according to the given environment variables.
 */
export function overrideArrayValues(
  config: Record<string, JSONType>,
  env: NodeJS.ProcessEnv,
  schema: JSONSchema,
  options: EnvVarNamingOptions = {
    case: 'snake_case',
    propertySeparator: '__',
    prefix: undefined,
    truncateTargetArrays: undefined,
    extendTargetArrays: undefined
  }
): Record<string, JSONType>
```

See `tests/environment.test.ts` and `tests/override.test.ts` for many examples
of these function being called with different inputs and outputs.

To see debug logging output, export `DEBUG=json-schema-env-config`.

## Deriving environment variable names

A config property's environment variable name can be derived by:

1. taking the JSON pointer to that option
2. removing the `#/` prefix
3. adding the value of `options.prefix` as a prefix, if set
4. replacing `/` with `_` (or the value of `options.propertySeparator` if set)
5. converting all `camelCase` words to `snake_case` (or the value of
   `options.case` if set).

For example, `#/camelCase/variable1` can be set using the
`camel_case__variable_1` environment variable.

Environment variable values are parsed as JSON, and must be parseable as the
type given in the JSON Schema, e.g. a `boolean` property's environment variable
value must be `true` or `false`. There are two exceptions to this:

* arrays may be given as JSON or CSV. JSON is tried first.
* the `integer` JSON Schema `type` value must be a number with no fractional
  part: unlike earlier JSON Schema specifications, an exponent will be accepted.

If a property can have multiple types (e.g. `type` is set to an array of
strings, or a keyword like `anyOf` is used with different types), then the
environment variable value is parsed as each type in the order that they are
listed: the first successfully parsed value is used to set the value of the
property. Note that because environment variable values are strings, they will
always successfully parse as the `string` type.

If a property's environment variable is not set or its value cannot be
successfully parsed, the property is left unset. Properties are set in the order
they are given in the schema, and objects are set before their properties. If
a property's value can be set and any of its ancestor objects are not already
set, the ancestor objects will first be initialised to empty objects.

### Loading values from the filesystem

Every config property has a second environment variable, which is named as if
the config property had a child property named `file`. For example, in addition
to `camel_case__variable_1`, `#/camelCase/variable1` can be set using the
`camel_case__variable_1__file` environment variable.

While the environment variables without the `__file` suffix have their values
used directly, the `__file`-suffixed variables must be set to the path to a file.
The file content is read as a UTF-8 string and leading and trailing whitespace
is trimmed, and the resulting value is set as the config property's value. If
the file cannot be read or is empty after whitespace is trimmed, the file's
existence is ignored.

If the suffixed and non-suffixed env vars are both defined, the non-suffixed env
var overrides the suffixed env var. For example, `camel_case__variable_1__file`
can be set to the path to a file containing a value, but it will be ignored if
`camel_case__variable_1` is also set.

### Unnamed properties

This library is able to load values for config properties that are defined in
JSON Schema using `patternProperties` and `additionalProperties`. However, as
the names of these properties are not predetermined, they are extracted from
the names of qualifying environment variables.

An environment variable qualifies if its name starts with the expected env var
name for the parent object of the pattern properties. If the `type` of the
pattern property is `null`, `boolean`, `string`, `integer`, `number` or `array`,
the env var name suffix (everything after the parent object's expected env var
name) is used as the property name.

If the `type` of the pattern property is `object` and the env var name suffix
also includes the env var name substring for one of the object's `properties`,
the substring from the start of the env var name suffix to the start of the
property's substring is used as the property name. If none of the object's named
properties appear in the env var name, the whole suffix is used as the property
name, just like for the other `type` values.

For example, given the schema

```json
{
    "type": "object",
    "properties": {
        "book": {
            "type": "object",
            "patternProperties": {
                ".*LENGTH": {
                    "type": "number"
                },
                ".*metadata": {
                    "type": "object",
                    "properties": {
                        "length": {
                            "type": "number"
                        },
                        "author": {
                            "type": "string"
                        }
                    }
                }
            }
        }
    }
}
```

The environment variable `book__metadata__lengthsuffix='{"author":{"Joe"}}'` has
a name starts with `book__`, so it qualifies as potentially configuring a
pattern property. It doesn't match the `.*LENGTH` pattern because patterns are
case-sensitive. It does match the `.*metadata` pattern, and although the
`length` substring matches the `length` property, it's not at the end of the
string and isn't followed by the property separator `__`, so can't set the
`length` property. As such, the env var is used to set the config object below.

```javascript
{
    metadata__lengthsuffix: {
        author: "Joe"
    }
}
```

The process for discovering additional properties is equivalent to discovering
properties for the pattern `.*`.

### Setting properties in array element objects

Given a config property that is an array of homogeneous objects, as well as
setting the value of the whole array, it's possible to do one of the following:

* Set a property to the same value for every element of an array
* Set a property value for each element of an array.

This includes the ability to set the values of nested properties, including
those defined as pattern or additional properties.

It's not possible to combine or nest setting every or each element of arrays,
i.e. you can't set a property in every/each element of an array in every/each
element of another array. However, you can set properties in each and every
element of the same array: properties will be applied to each element before
they are applied to every element.

An array of objects is considered to by homogeneous if its schema satisfies all
of the following conditions:

1. `items` and/or `additionalItems` are defined.
2. If `items` is defined and not an array, its `type` property is set to
   `object`.
3. If `items` is defined and an array, all elements of the array are deeply
   equal and have a `type` property is set to `object`.
4. If `additionalItems` is defined, its `type` property is set to `object`.
5. If `items` and `additionalItems` are both defined and `items` is an array,
   its first element must be deeply equal to the value of `additionalItems`.
6. If `items` and `additionalItems` are both defined and `items` is not an
   array, its value must be deeply equal to the value of `additionalItems`.

#### Setting a single property value for every element

It's possible to set a single value for a property in every element of an array
of homogeneous objects by defining an environment variable that has a name of
the form `<env var name for array>__every__<env var name for property>` and a
value that is of the correct type for the target property.

For example, given a schema like

```json
{
    "type": "object",
    "properties": {
    "array": {
        "type": "array",
        "items": {
        "type": "object",
        "properties": {
            "prop1": {
            "type": "string"
            },
            "prop2": {
            "type": "number"
            }
        }
        }
    }
    }
}
```

and an existing config value of

```javascript
{
    array: [
        { prop1: 'a', prop2: 0 },
        { prop1: 'b' }
    ]
}
```

and setting the environment variable `array__every__prop_2=1` would cause
`overrideArrayValues()` to return

```javascript
{
    array: [
        { prop1: 'a', prop2: 1 },
        { prop1: 'b', prop2: 1 }
    ]
}
```

#### Setting a property value for each element

It's also possible to set a different value for a property in each element of
an array of homogeneous objects by defining an environment variable that has a
name of the form `<env var name for array>__each__<env var name for property>`
and a value that is an array of values that are of the correct type for the
target property.

Each element in the environment variable value array will be applied to the
target property in the corresponding element object in the target array. If
the target and value arrays are of different lengths, changes will only be made
up to the length of the shorter array. This behaviour can be changed by setting
the `truncateTargetArrays` and `extendTargetArrays` to `true`.

For example, given a schema like

```json
{
    "type": "object",
    "properties": {
    "array": {
        "type": "array",
        "items": {
        "type": "object",
        "properties": {
            "prop1": {
            "type": "string"
            },
            "prop2": {
            "type": "number"
            }
        }
        }
    }
    }
}
```

and an existing config value of

```javascript
{
    array: [
        { prop1: 'a', prop2: 0 },
        { prop1: 'b' }
    ]
}
```

and setting the environment variable `array__each__prop_2=1,2` would cause
`overrideArrayValues()` to return

```javascript
{
    array: [
        { prop1: 'a', prop2: 1 },
        { prop1: 'b', prop2: 2 }
    ]
}
```

## JSON Schema compatibility

The input JSON schema must contain no schema references. If a schema contains
references, they can be resolved before the schema is passed to this library:
there are several existing libraries that can resolve JSON references.

As this library is only concerned with config data structures and not with
validation, most JSON schema keywords are irrelevant and ignored. Only the
following keywords are used:

* `type`
* `properties`
* `additionalProperties`
* `patternProperties`
* `items`
* `additionalItems`
* `anyOf`
* `oneOf`
* `allOf`

Other keywords that may be relevant to defining the structure of a JSON document
but which are currently ignored by this library are:

* `if`
* `then`
* `else`
* `dependencies` / `dependentSchemas`
* `unevaluatedItems`
* `unevaluatedProperties`

As the JSON Schema specification evolves, it may also add additional relevant
keywords.

### Limitations

As this library allows properties to be set individually and does not perform
validation against the schema, it may produce invalid config if a property can
have different types depending on its siblings.

For example:

```js
const config = loadFromEnv(
    {
        any_of_property__key_1: '3.14',
        any_of_property__key_2: 'true'
    },
    {
        type: 'object',
        properties: {
            anyOfProperty: {
                anyOf: [
                    {
                        type: 'object',
                        additionalProperties: false,
                        properties: {
                            key1: {
                                type: 'number'
                            }
                        }
                    },
                    {
                        type: 'object',
                        additionalProperties: false,
                        properties: {
                            key1: {
                                type: 'string'
                            },
                            key2: {
                                type: 'boolean'
                            }
                        }
                    }
                ]
            }
        }
    }
);

// This combination of variables would fail schema validation, as the
// value for key1 conforms to the first schema, but the value for key2
// conforms to the second, and the two are incompatible.
expect(config.anyOfProperty.key1).toBe(3.14);
expect(config.anyOfProperty.key2).toBe(true);
```

repository: Ortham/json-schema-env-config

repo_name: Ortham/json-schema-env-config


text:
# SocketSys [![Asyc Actions Status](https://github.com/Asyc/SocketSys/workflows/build/badge.svg)](https://github.com/Asyc/SocketSys/actions)

### Introduction
SocketSys is a modular C++17 socket wrapper, providing a SocketInterface class for interacting <br>
with the Operating System's socket functionality.

This project is licensed under the MIT License.

### Usage
```C++
#include <socketsys/socket.hpp>

using namespace socketsys;

int main() {
    Socket socket;
    socket.connect("<IP_ADDRESS>", 80);

    ServerSocket serverSocket;
    serverSocket.bind("<IP_ADDRESS>", 80);
}
```

#### Alternatively, you can manually specify a custom "provider" or operating system implementation
```C++
SocketInterface<WinSockProvider> socket;
```

The default `Socket` and `ServerSocket` classes are typedefs with a OS-Macro dependant provider specified.

### Building
This project uses CMake to build. Cloning submodules is not required unless you desire testing and do not
have GTest on your path.
```bash
$ git clone https://github.com/Asyc/SocketSys.git
```

It is recommended to use the CMake script to add this library to your project
```cmake
add_subdirectory(socketsys)
target_link_libraries(<Project> <PUBLIC/PRIVATE> SocketSys)
```
Alternatively, you can build the static library manually.

Enter the directory and create a build folder, enter that as well. You can then build the project by using
```bash
$ cmake ../
$ cmake --build . --config release
```

license: MIT

repository: Asyc/SocketSys

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: Asyc/SocketSys


text:
# KustomAndroidThemes
Themes by Monicow and Daffi :)

To install, use Kustom apps like KWGT and KWLP.

Each folder above contains the Theme Files and Screenshots for previews and intended setups.

Send all feedback/requests to @monicowo#5132 and @Daffi#7101 on Discord

repository: monicow/KustomAndroidThemes

branch_name: refs/heads/main

repo_name: monicow/KustomAndroidThemes


text:
---
title: How to View Your NFT in Your Wallet (Part 3/3 of NFT Tutorial Series)
description: This tutorial describes how to view an existing an NFT on MetaMask!
author: "Sumi Mudgil"
tags: ["ERC-721", "Alchemy", "Solidity"]
skill: beginner
lang: en
published: 2021-04-22
---

This tutorial is Part 3/3 in the NFT Tutorial series, where we view our newly minted NFT. However, you can use the general tutorial for any ERC-721 token using MetaMask, including on Mainnet or any testnet. If you’d like to learn how to mint your own NFT on Ethereum, you should check out [Part 1 on How to Write & Deploy an NFT smart contract](/developers/tutorials/how-to-write-and-deploy-an-nft)!

Congrats! You’ve made it to the shortest and simplest part of our NFT tutorial series — how to view your freshly minted NFT on a virtual wallet. We’ll be using MetaMask for this example since it is what we used in the previous two parts.

As a prerequisite, you should already have MetaMask on mobile installed, and it should include the account to which you minted your NFT — you can get the app for free on [iOS](https://apps.apple.com/us/app/metamask-blockchain-wallet/id1438144202) or [Android](https://play.google.com/store/apps/details?id=io.metamask&hl=en_US&gl=US).

## Step 1: Set your network to Sepolia {#set-network-to-sepolia}

At the top of the app, press the “Wallet” button, after which you’ll be prompted to select a network. As our NFT was minted on the Sepolia network, you’ll want to select Sepolia as your network.

![How to set Sepolia as your network on MetaMask Mobile](./goerliMetamask.gif)

## Step 2: Add your collectable to MetaMask {#add-nft-to-metamask}

Once you’re on the Sepolia network, select the “Collectibles” tab on the right and add the NFT smart contract address and the ERC-721 token ID of your NFT — which you should be able to find on Etherscan based on the transaction hash from your NFT deployed in Part II of our tutorial.

![How to find your transaction hash and ERC-721 token ID](./findNFTEtherscan.png)

You may need to refresh a couple times to view your NFT — but it will be there <Emoji text="😄" size={1} />!

![How to upload your NFT to MetaMask](./findNFTMetamask.gif)

Congrats! You have successfully minted an NFT, and you can now view it! We can’t wait to see how you’ll take the NFT world by storm!

repository: ethereum/ethereum-org-website

branch_name: refs/heads/dev

gha_language: Markdown

gha_license_id: MIT

repo_name: ethereum/ethereum-org-website


text:
---
layout: default
---

# 1994-06-09 - Re: PGP in Australia

## Header Data

From<EMAIL_ADDRESS>(Matthew Gream)

To<EMAIL_ADDRESS>Message Hash: 14106d5a87085fe0324568f3278d0d9308a1a2c083c0612f35eac26e2d1bc0cd

Message ID<EMAIL_ADDRESS>Reply To<EMAIL_ADDRESS>UTC Datetime: 1994-06-09 02:02:08 UTC

Raw Date: Wed, 8 Jun 94 19:02:08 PDT

## Raw message

```
{% raw  %}From<EMAIL_ADDRESS>(Matthew Gream)
Date: Wed, 8 Jun 94 19:02:08 PDT
To<EMAIL_ADDRESS>Subject: Re: PGP in Australia
In-Reply-To<EMAIL_ADDRESS>Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

<EMAIL_ADDRESS>wrote:

> Unless Australia forbids _importing_ crypto, not a crime. PGP 6 is the MIT

There are no restrictions on importing crypto into Australia, there are
some on export (hardware only) due to COCOM.

ObBtw, I recently queried our Attorney-General's department on this
topic, along with, inter alia, questions relating to whether Clipper
like systems are of interest to authorities in Australia. The reply,
the AG's Security Division, was that `I understand that encryption is
not an issue' -- but he acknowledged they'd been following the US
controversy.

I'm still waiting for some replies back from another Government Dept
and have a few other avenues to chase up, when I do I'll make available
the information (if this particular geographic oddity is of interest
to anyone ?).

Matthew.

--
Matthew Gream
Consent Technologies
Sydney, (02) 821-2043
<EMAIL_ADDRESS>

{% endraw %}
```

## Thread

+ Return to [June 1994](/archive/1994/06)

+ Return to<EMAIL_ADDRESS>(James A. Donald)](/authors/jamesd_at_netcom_com_james_a_donald_)"
+ Return to "[Joe Thomas <jthomas@access.digex.net>](/authors/joe_thomas_jthomas_at_access_digex_net_)"
+ Return to<EMAIL_ADDRESS>(Matthew Gream)](/authors/mgream_at_acacia_itd_uts_edu_au_matthew_gream_)"
+ Return to "[Richard Johnson <Richard.Johnson@Colorado.EDU>](/authors/richard_johnson_richard_johnson_at_colorado_edu_)"
+ Return to "[rishab@dxm.ernet.in](/authors/rishab_at_dxm_ernet_in)"

+ 1994-06-08 (Wed, 8 Jun 94 06:07:12 PDT) - [PGP in Australia](/archive/1994/06/410a75998768e4e12a5dd7ba44f48046dbf79c98fce9fd4ca11f7601b19e36cb) -<EMAIL_ADDRESS>  + 1994-06-08 (Wed, 8 Jun 94 07:19:49 PDT) - [Re: PGP in Australia](/archive/1994/06/179d7be07742397c227d968a565cd39014e6b66a70ef69f5d8e262e10ffff0df) - _Richard Johnson<EMAIL_ADDRESS>  + 1994-06-08 (Wed, 8 Jun 94 09:15:39 PDT) - [Re: PGP in Australia](/archive/1994/06/1a19208d16e4c28648055511dba6bcd5428abd547df3b8f399befdf280311324) -<EMAIL_ADDRESS>(James A. Donald)_
    + 1994-06-08 (Wed, 8 Jun 94 09:43:52 PDT) - [Re: PGP in Australia](/archive/1994/06/6712dc2e672bc3142065d6a4c31af50135cf66cba0f658fbc63df802be285a3c) -<EMAIL_ADDRESS>(James A. Donald)_
  + 1994-06-09 (Wed, 8 Jun 94 19:02:08 PDT) - Re: PGP in Australia -<EMAIL_ADDRESS>(Matthew Gream)_
    + 1994-06-09 (Thu, 9 Jun 94 07:32:46 PDT) - [Re: PGP in Australia](/archive/1994/06/0a73f4aadd39170e935cf12edf5883b636a044a6a79256a3755cccdf4227e75d) - _Joe Thomas<EMAIL_ADDRESS>


text:
# sketcher

program to convert images to sketch

![Alt text](pig.png?raw=true "original")
![Alt text](pig_sketch.png?raw=true "sketch")

# NOTES

- works only with `*.png` images

# LICENSE

Licensed under `MIT License`

`Copyright (c) 2021 Gaurav Kumar Yadav`


text:
# Installation

```bash
npm i quick-cli --save
#or
yarn add quick-cli
```

# Usage

### This doc is for version 2.x.x, there are multiple breaking changes since 1.0.x

### init

```js
var cli = require('quick-cli'),
```

### out

```js
const {out,dev} = cli;

// choose meaning of your out text, quick-cli will apply colors
out.err('terrible error');
out.warn('bad warning');
out.info('some info');
out.log('important log');
out.success('success msg');
out.form('question');

// you can use multiple strings at once
out.log('some','text','split','into','multiple','strings')

// to display something only in dev/debug mode, use dev instead of out
out.info('lorem ipsum');
dev.info('lorem ipsum');

// activate/deactivate dev, .dev content is being display only if development mode is on

cli.setDevelopmentMode(true);
// --OR--
cli.setDevelopmentMode(false);

// to apply color to string and display it later with another lib use applyColor:
cli.applyColor('lorem ipsum', 'info');

const raw_text="lorem ipsum";
const colorful_text=cli.applyColor(raw_text, 'info');

console.info(colorful_text); // both will display
cli.out(raw_text, 'info');  // formatted text

// you can add own colors with setColor
const chalk = require("chalk");
cli.addColor("cyantext", (...text)=>chalk.cyan(...text))
out.cyantext("it ","works!")
```

### input

There are to ways to request user input with quick-cli: async and sync

They are avaiable in cli.input and cli.syncInput.

- Synchronous methods will block your thread until user finishes entering input and return his input.
- Asynchronous methods will simply return a promise that resolves to user input.

In both cases, avaiable methods are:

* `text(questionText, defaultValue, validator)` - user will be presented with questionText and asked to type his anwser.
* `password(questionText, validator)` - similar to text but anwser won't be displayed and there can't be a default value.
* `list(questionText, choices)` - user will be presented with list of choices and asked to choose only one.
* `checkbox(questionText, choices)` - user will be presented with list of choices and asked to choose as many as he wants.
* `confirm(questionText)` - user will be presented with questionText and asked to anwser yes/no.

### input example

```js
inputSync.text("Enter some random text")
await inputAsync.text("Enter some random text")

inputSync.pass("And some secret password")
inputAsync.pass("And some secret password")

inputSync.confirm("Do you agree?")
await inputAsync.confirm("Do you agree?")

inputSync.list("You prefere ...",["cats","dogs","rabbits"])
await inputAsync.list("You prefere ...",["cats","dogs","rabbits"])

inputSync.checkbox("Multiselect",["a","b","c"])
await inputAsync.checkbox("Multiselect",["a","b","c"])
```

#### click to watch console screen cast for v1.0.5 (everything should look the same on v2.0.0)
http://www.youtube.com/watch?v=9-GJz1Nlb6I

repository: Clechay/quick-cli

repo_name: Clechay/quick-cli


text:
# MacOS-Linux-shortcuts

### Introduction

This repository is for people dealing with two of more among MacOS, Linux/Gnome and Linux/Mate.
Linux/KDE or other OSes not supported yet (but should be easy to add, please contribute).

Dealing with different keyboard shortcuts uses a lot of mental energy, so to maintain focus on
the task at hand (as opposed to which keys to press) one has to change shortcuts for one or
more of these machines. This repository changes some of the
shortcuts for Linux, and this README suggests a few additional changes, including ones for Mac OS.

Best results will be achieved if you use identical keyboards across all your machines.

### Instructions

1. Install autokey on your Linux box(es) with `sudo apt-get install autokey` or `yum install autokey-gtk` or `pip`.
See [autokey instructions](https://github.com/autokey/autokey/wiki/Installing) if you need details.

2. Fork this repository (optional but recommended)

3. Clone your fork (or this repository, if you did not fork)

4. Point autokey to the directory `add-MacOS-shortcuts-to-Linux`, e.g. by putting a hard or symbolic link
to it in `~/.config/autokey/data/`

6. (optional) Point autokey to the directory `remove-Linux-shortcuts/`, as above. This will make sure
the old shortcuts (e.g. CTRL-C in text editors) do not work anymore, so you can not inadvertently use them
and be stuck in the rut.

---

### Additional shortcuts

Unrelated to this repository, but related with having sane shortcuts...

#### On the Mac

1. Install [`iterm2`](https://www.iterm2.com/) and set the
shortcuts for "move one word" as described
[here](https://apple.stackexchange.com/questions/154292/iterm-going-one-word-backwards-and-forwards/293988#293988).
You will also need the "move to begin/end of line" and
the corresponding "select" to work as in the other apps. Unfortunately
this requires manual configuration. If you use the regular
`terminal` application, you will also need to change its shortcuts. In fact (like on Linux) there are some differences
between terminal and non-terminal shortcuts, not sure why anybody thought that was a good idea...

#### On Linux

2. Configure your Virtual Desktop switcher to use `CTRL-arrows` as Spaces do on the Mac
(this will break the move-by-one-word, but that is fixed by autokey with the scripts in this repository).
Also, arrange your Virtual Desktops on a single line, as Space do on the Mac, and set them to the same number.

3. Configure the shortcut to lock the screen from `CTRL-L` to `CTRL-CMD-q`.

On Mate you can do the last two items by opening the
[Control Center](https://screenshots.debian.net/package/mate-control-center) and selecting `Keyboard Shortcuts`.

On Gnome, proceed as described [here](https://help.gnome.org/users/gnome-help/stable/keyboard-shortcuts-set.html)

### Further documentation

See [Autokey documentation](https://github.com/autokey/autokey/wiki/Scripting)

### Problems, questions or suggestions?

Please submit an [issue](https://github.com/davidedelvento/MacOS-Linux-shortcuts/issues) and I will be happy to respond!

Do also submit Pull Requests:
[Pull Requests](https://help.github.com/en/articles/creating-a-pull-request-from-a-fork) are very welcome
to improve anything, especially wrong or incomplete shortcuts, including ones for Linux/KDE or other OSes.

repository: chameleon-lizard/MacOS-Linux-shortcuts

repo_name: chameleon-lizard/MacOS-Linux-shortcuts


text:
# watsonworkspace-ngrok

An [ngrok](https://ngrok.com/) utility to aid local development of Watson Workspace chatbots.

## Usage

Add the utility to your chatbot projects.

`npm install watsonworkspace-ngrok --save-dev`

Update run scripts in your `package.json` to launch both your chatbot and watsonworkspace-ngrok.
For example, the following uses [concurrently](https://github.com/kimmobrunfeldt/concurrently) to launch both.

```
"scripts": {
    "start": "node index.js",
    "test": "jasmine",
    "dev": "concurrently \"node ./node_modules/watsonworkspace-ngrok/index.js\" \"node ./index.js\""
  },
```

The ngrok tunnel will launch with details needed to update your Watson Workspace chatbot's webhook.
This assumes that you are also using the [watsonworkspace-bot](https://github.com/van-ibm/watsonworkspace-bot) framework.

```
[1] [nodemon] 1.14.12
[1] [nodemon] to restart at any time, enter `rs`
[1] [nodemon] watching: *.*
[1] [nodemon] starting `node --debug ./index.js`
[1] Debugger listening on [::]:5858
[0]
[0]     1. Open https://developer.watsonwork.ibm.com/apps/20d70d3c-5ed5-4208-b224-fc73ba0582b1/info
[0]     2. Add the webhook https://ddf483da.ngrok.io/20d70d3c-5ed5-4208-b224-fc73ba0582b1/webhook to you App
```

repository: van-ibm/watsonworkspace-ngrok

repo_name: van-ibm/watsonworkspace-ngrok


text:
---
layout: post
title:  "If $f$ is entire and constant on the closed unit disk, then it is constant"
date:   2019-12-23
author: Hidenori
---

# Proposition
Prove that if $f$ is entire and $\Im(f)$ is constant on the closed unit disk, then $f$ is constant.

# Solution
Let $c$ be the value that $f$ takes on the closed unit disk.
Let $g(z) = c$ for all $z$.
$g$ is clearly entire.
Then $f$ and $g$ agree on the closed unit disk, which has an accumulation point in $\mathbb{C}$.
Then $f = g$ on $\mathbb{C}$ by [the identity theorem](https://en.wikipedia.org/wiki/Identity_theorem).

gha_language: CSS


text:
# SDMM Portal

## Development

* Create a localhost key (https://gist.github.com/oslego/f13e136ffeaa6174289a)
    * Copy `sample.env` into `.env`
    * Put `server.key` and `server.crt` in `<project-root>/ssl/`
    * `docker run -p 27017:27017 mongo` NOTE: WILL WIPE DATA, not for PROD
    * don't forget `-r dotenv/config` in node params if you're running in an IDE
* If you want to debug the db, get on the ubc VPN and forward a port to the machine:
    * `ssh <username>@<host> -L 27017:<IP_ADDRESS>:27017`
    * Then you can connect to the db using `localhost:27017` and the appropriate credentials

## Deployment

This has not been done yet

* Install `certbot` (https://certbot.eff.org/)
* Generate a `localhost` certificate for development.
    * `sudo certbot certonly`
    * Choose option 2 (`temporary webserver`)

## External Steps

0. Get a GitHub organization for your course and configure it. You probably want to:
    * Disable repo access (Uncheck everything under Member Privileges)
    * Change default `Repository Permissions` to `None` under Member Privileges

1. Create a GitHub account you want to serve as your 'frontend'; this account will be making lots of accounts and comments, so you probably don't want it to be a personal account.
    * Create a GitHub personal token (under development in the GitHub profile page) and use this in `.env`:
        * GH_TOKEN_USER=<github account you created>
        * GH_API_TOKEN="token <the github token; leave token and one space to the left of this>"
    * Register this GitHub user as an owner in your organization.

repository: ubccpsc/sdmm-portal-backend

repo_name: ubccpsc/sdmm-portal-backend


text:
Leap Motion Instrument
======================

People:
* Ben Iofel
* Princeton Ferro
* David Maginley
* Zach Kaplan

Todo:
* Make good GUI
* Fix lag: We think this is in `Audio.java` when the `playNote()` function is
being called many times. Therefore we should be able to fix lag at the same
time as making a `pressNote()` function and `releaseNote()` function

repository: benwaffle/Leap-Motion-Instrument

repo_name: benwaffle/Leap-Motion-Instrument


text:
# babel-plugin-jsx-translate [![CircleCI](https://img.shields.io/circleci/project/hrgdavor/babel-plugin-jsx-translate.svg?maxAge=2592011)](https://circleci.com/gh/hrgdavor/babel-plugin-jsx-translate)

> Less visual noise in code for translations inside JSX

Can be combined with [babel-plugin-jsx-simple](https://github.com/hrgdavor/babel-plugin-jsx-simple),
[babel-plugin-jsx-inject](https://github.com/hrgdavor/babel-plugin-jsx-inject)
and probably could be used with other JSX like React or VueJS.

### Plugin

The code for the plugin is so simple, I am pasting it here

``` js
module.exports = function (babel) {
  var t = babel.types
  return {
    visitor: {
      JSXExpressionContainer (path) {
        if(t.isStringLiteral(path.node.expression)){
          path.node.expression = t.callExpression(t.identifier('t'),[path.node.expression]);
        }
      },
    }
  }
}
```

Check an [example](http://astexplorer.net/#/gist/ed60b4743288670c35e5a490e1835b31/1f55992a8284d29b898d0fb85a6caa80ef608f17)
using the very nice tool [ASTExplorer](http://astexplorer.net)

If you have JSX that needs some strings translated and a function `t` in the scope, you can write sth like this

``` js
function render(){
  return <an id="id1" title={'translate_title'}>
    <Component>{'translate_me'}</Component>
  </an>
}
```

and it will be converted to this

``` js
function render(){
  return <an id="id1" title={t('translate_title')}>
    <Component>{t('translate_me')}</Component>
  </an>
}
```

You might say that there is not much difference, but that is your choice for your project.

I find that putting a StringLiteral in a JSX expression something I will not likely use,
so I made this plugin to use instead of the one that I created bofore this one
[babel-plugin-translate-mi2](https://github.com/hrgdavor/babel-plugin-translate-mi2).

In my first plugin attempt [babel-plugin-translate-mi2](https://github.com/hrgdavor/babel-plugin-translate-mi2)
I used a syntax like `[[translation_code]]`, but run into problems keeping sourcemap
info correct due to way the JSXText is parsed in bybylon parser.

repository: hrgdavor/babel-plugin-jsx-translate

repo_name: hrgdavor/babel-plugin-jsx-translate


text:
---
title: "Information Security"
slug: "information-security"
hidden: false
createdAt: "2019-10-31T09:43:03.708Z"
updatedAt: "2020-04-27T07:25:32.777Z"
---
Rapyd handles and maintains sensitive information in accordance with the most stringent industry standards.
[block:api-header]
{
  "title": "PCI Level 1"
}
[/block]
The Payment Card Industry (PCI) has established strict security requirements for the processing, handling, transmission and storage of sensitive data that is required for processing card transactions when the card is not present. The requirements are set forth in the PCI Data Security Standard (DSS). Rapyd has passed stringent independent onsite assessments by a Qualified Security Assessor and is certified as a Level 1 service provider.

Rapyd and PCI-compliant clients can handle the following sensitive personal data:
* Name
* Card number
* Expiration date
* Card security code (CVV)

Clients without PCI certification must not collect any sensitive personal data and cannot use features of the Rapyd platform that require that data. To handle card transactions without PCI certification, use the Rapyd Checkout Page. See [Checkout Page Object](ref:checkout-page-object).
[block:api-header]
{
  "title": "ISO/IEC 27001"
}
[/block]
The International Organization for Standardization (ISO) and the International Electrotechnical Commission have formulated specific requirements for information security management systems. These requirements are contained in the ISO/IEC 27001 standard, as updated in 2013. The British Standards Institution (BSI), an independent, accredited registrar, has audited Rapyd's information security management system and Rapyd has earned the BSI Information Security Certification.
[block:api-header]
{
  "title": "Related Information"
}
[/block]
* [PCI Security Standards Council](https://www.pcisecuritystandards.org/) - PCI standards.
* [International Organization for Standardization](https://www.iso.org/home.html) - ISO standards.
* [International Electrotechnical Commission](https://www.iec.ch/) - IEC standards.
* [British Standards Institution](https://www.bsigroup.com/en-GB/) - BSI certification.

repository: RonenSigan/doks

repo_name: RonenSigan/doks


text:
# [v1.6.0-beta1](https://www.powershellgallery.com/packages/UniversalDashboard/1.6.0-beta1)

**Released: April 18th, 2018**

## Open Source Controls

This release of Universal Dashboard adds **20** new controls. These controls are primarily basics like buttons, checkboxes and headers but also include some bling like modules and preloaders.

All of these controls are built with `New-UDElement` and are open source on [GitHub](https://github.com/ironmansoftware/ud-controls). In addition to the controls, there is also a demo that provides examples.

## Scheduled Endpoints

With scheduled endpoints you can now collect data on an interval. It's easy to specify intervals of seconds, minutes, hours and days. If you want to get fancy, you can also specify a CRON schedule.

Scheduled endpoints are great for collecting data from all your servers and storing it within the Universal Dashboard cache or in a database.

```
$Schedule = New-UDEndpointSchedule -Every 1 -Second

$EverySecond = New-UDEndpoint -Schedule $Schedule -Endpoint {
    $Cache:ModuleCount = (Get-Module -ListAvailable).Count
}
```

## Cache Variable Scope

Cached variables are stored in the ASP.NET memory cache. This allows you to access those variables in any endpoint. This will greatly improve the performance of your dashboards. Use scheduled endpoints to grab performance data from servers and then display data in charts for optimal speed.

```
$CachedModuleCount = New-UDEndpoint -Url "/cached-moduleCount" -Endpoint {
    $Cache:ModuleCount
}
```

## Session Variable Scope

Like cached variables, Session variables use a new scope. Session variables store data that is available per session. This is helpful when developing web forms that require user input. You wouldn't want to share this data between sessions but want to be able to access that data in between endpoints for a particular user.

One great advantage of this would be to create dashboards that allow the user to change values that in turn update the charts and counters on the page.

```
New-UDCheckbox -Label "Wax on" -OnChange {
    $Session:WaxOn = $EventData
}

 New-UDCounter -Title "Wax on\Wax Off" -Endpoint {
    if ($Session:WaxOn) {
        1
    } else {
        0
    }
}
```

## Issues Resolved

* [\#14](https://github.com/ironmansoftware/universal-dashboard/issues/14) - New-UDGrid - Errors when server in a foreach is unavailable
* [\#42](https://github.com/ironmansoftware/universal-dashboard/issues/42) - New-UDGrid/ServerSideProcessing
* [\#43](https://github.com/ironmansoftware/universal-dashboard/issues/43) - Out-UDGridData/DataTable
* [\#46](https://github.com/ironmansoftware/universal-dashboard/issues/46) - -DebugEndpoint is missing on New-UDTable in 1.5.1
* [\#47](https://github.com/ironmansoftware/universal-dashboard/issues/47) - DefaultRunspace is not set in the async task block that runs in the UDElement component
* [\#52](https://github.com/ironmansoftware/universal-dashboard/issues/52) - UDMonitor - Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index
* [\#53](https://github.com/ironmansoftware/universal-dashboard/issues/53) - Error - Microsoft.Extensions.Logging.Filter.dll not being found since on OSX\Linux
* [\#78](https://github.com/ironmansoftware/universal-dashboard/issues/78) - Sync-UDElement


text:
---
layout: page
title:  "Vision and objectives"
lang: en
category: "About"
permalink: "/vision-objectives/"
trans_url: "/vision-et-objectifs/"
---

### Team vision
Talent makes HR stuff easy and intuitive for the CDS team. Our team is focused on providing an amazing experience to past, present and future CDS team members. This allows the CDS team to focus on the work of working with departments to change government to service people better.

This vision guides the objectives we set and key decisions we make.

### Objectives

Each quarter we (like all teams at CDS) set objectives and key results (or OKRs).
Objectives are overarching goals. Key results are concrete manifestations of each objective. Read more about the [origin of OKRs from Google](https://rework.withgoogle.com/guides/set-goals-with-okrs/steps/introduction/).

#### Current quarter objectives

* Hire the right people to make CDS successful.
* Iterate the Talent Function & Set the standard for the Government of Canada.
* Foster a strong, positive, and inclusive CDS culture based on data from the team.
* Research Talent as a Service.

We note progress on key results weekly and score them monthly. Watch our progress in the 🔒[OKR progress tracker](https://docs.google.com/spreadsheets/d/15qK2h9FOPY7I3tXrbf6_OIuDjRUrxsJbiNFJuKnnPQ4/edit#gid=504851476).

#### How we set objectives quarterly

1. At the end of each quarter, we have a team retreat where:
 * we score the last quarter's objectives and key results. As a team, we give each key result a score between 0 and 1.
 * we reflect on (or "retro") the last quarter.
 * team members propose possible objectives for the coming quarter and we vote on them.
 * assign a "lead" to each of our objectives
2. Each objective lead then drafts a set of key results for that objective. They work with Andrea and the team to get feedback and objectives.
3. Then, the whole team meets with Aaron (chief executive officer) and Anatole (chief operating officer). We review last quarter's scores and this quarter's feedback.
4. Andrea then loads up an OKR tracking spreadsheet 🔒 [like this one](https://docs.google.com/spreadsheets/d/15qK2h9FOPY7I3tXrbf6_OIuDjRUrxsJbiNFJuKnnPQ4/edit#gid=504851476) for us to track progress.

_- Last updated by Andrea on Septeber 13, 2019_

repository: cds-snc/talent

repo_name: cds-snc/talent


text:
## makefile.py ##

Automatically generate a Makefile for a C/C++ codebase.
Includes support for [protobuf](https://developers.google.com/protocol-buffers) files,
[gRPC](https://grpc.io/) service definitions, and [CCH](https://github.com/tjps/cch) files.

makefile.py is designed to be run each time you would run `make`.
It determines all relevant source files, parses them to recreate the
dependency graph, and outputs a Makefile that can then be run normally with `make`.

One goal of this project is to have minimal dependencies:

  * GNU Make
  * Python 3.x

Pull requests are welcome.  Some ideas:

  * making the preamble more general
  * support alternative output targets - [Jamfiles](https://www.boost.org/doc/libs/1_33_1/doc/html/bbv2/advanced/jamfiles.html), [Ninja](https://ninja-build.org/), [doit](https://pydoit.org/), etc.


text:
Ruby/Elixir Engineer Coding Challenge - Gui Vieira's entry
=======================

### CircleCI [![CircleCI](https://circleci.com/gh/guialbuk/backend-code-challenge.svg?style=svg)](https://circleci.com/gh/guialbuk/backend-code-challenge)

## Concepts

- My concept is to create a lean Ruby on Rails API app using TDD

- A Ruby implementation of [Dijkstra's algorithm](https://en.wikipedia.org/wiki/Dijkstra%27s_algorithm), with a couple of minor tweaks, was chosen to calculate the shortest distance route between `origin` and `destination`

- In case of invalid requests, the app will send descriptive error messages in order to assist the user

## Considerations

- `origin` and `destination` attributes must contain only uppercase letters. Numbers, accents and special characters are invalid

- The application assumes that distances/routes are bidirectional, i.e. distance from A to B == distance from B to A

## Requirements
- Ruby 2.5.1
- Rails 5.1.6
- PostgreSQL 9 or 10

## How to run

````
git clone https://github.com/guialbuk/backend-code-challenge.git
cd backend-code-challenge
rails db:create db:migrate db:seed
rails s
````

Tests:
```
rspec
open coverage/index.html # opens code coverage report
````

## Original challenge README

Hello!

 In addition, we know your time is valuable, so please feel free to use your completed work as a portfolio piece.

We wish you the best of luck and can't wait to see what you create!

## Overview

Your goal is to develop a system to calculate the shipping cost for products of an order, based on it's weight and distance from origin to destination. The distribution points will be supplied to this system throught an API and the shipping cost will be calculated in another API, always aiming at the lowest cost to the customer.

To populate the database, another system will call the API informing the distance (in kilometers) between *origin* and *destination* of two distribution points. For example:
```
POST /distance
A B 10
```
```
POST /distance
B C 15
```
```
POST /distance
A C 30
```

In a second moment, the shopping system will call the API informing the total weight of the order, the source and destination points. The system should return the lowest shipping cost, using the formula: `cost = distance * weight * 0.15`. For example:

```
GET /cost?origin=A&destination=C&weight=5
18.75
```

Explanation: the shortest path from A to C is A -> B -> C = 25km. `cost = 25 * 5 * 0.15 = 18.75`

## Considerations

* The input format of distance should have the format `A B X`, where *0 < X <= 100000*. Wrong format or data should return an error;
* If a distance point already exists, should be replaced with the new value;
* The cost API should validate the given points and weight, where *0 < wheight <= 50*. If no path was found between *origin*  and *destination*, an error should be returned;
* The solution should be implemented in Ruby or Elixir. You could use the frameworks that you're most used to.
* Both APIs will receive a large amount of requests: choose the design and technology wisely;

## Submission

You can follow the GitHub Fork/Pull Request workflow by [forking this repository](https://github.com/RakutenBrasil/backend-code-challenge/fork), commiting your changes, and submiting a pull request to us, explaning your solution, technical decisions and how configure/use on the README file. For more information about that, you can see this [GitHub article](https://help.github.com/articles/fork-a-repo/#propose-changes-to-someone-elses-project).

## What we are looking for

We are looking for several things with this challenge. First, of course, we're looking for your answer to be technically correct. Beyond that, we're also looking for:

* Is your code easy to read and understand?
* Are you following the usual conventions for Ruby/Elixir development?
* How good are you at writing tests? And how easy are they to read and understand?
* Did you follow these directions?

We will of course **examine your code to see its correctness, readability, general elegance, architectural decisions, and modularity**. If/when you meet with us, be prepared to talk about why and how you design your solution. We also test your system with a large amount of data to mesure the performance and to see if we can break stuff.

That's it. There aren't any hidden gotchas or trick questions. That's really what we're going to do.

## License

We have licensed this project under the MIT license so that you may use this for a portfolio piece (or anything else!).

repository: guialbuk/backend-code-challenge

gha_language: Ruby

repo_name: guialbuk/backend-code-challenge


text:
## WIM Import Automation

This script will do the following
1. Find all the WIM files in the Capures folder of the ImageFactory
2. Examine the WIM file to pull the information about the Installation: Client or Server, Version: example 10.0.18362, and the Created Date
3. Create the Operating System folder structure in the Production MDT deployment share
4. Import the WIM files, if they are already not imported, you can run this script over and over again, nightly even.
5. Rename the WIM files to change the default MDT name, and make them more "calculable" for automating Task Sequence Updates

It has these parameters, which I have defaults for, but you should change:

```
$ProdPath    = "X:\Production$",
$ProdDesc    = "Production",
$ProdPSDrive = "DS003",
$RefPath     = "X:\ImageFactory$",
$RefDesc     = "ImageFactory",
$RefPSDrive  = "DS002",
$LogPathRoot = "X:\ScriptLogs"
```

#Operating System Folder After:
![OSAfter](https://github.com/BronsonMagnan/MDTAutomation/blob/master/WimImportAutomation/OperatingSystemsFolderAfter.png)

## How it Works

1. The WimImportAutomation creates two members of class MDTDeploymentShare, One Production, and One Reference.
2. The WimImportAutomation class asks the Reference instance to send over a collection of class CapturedWim using the GetCapturedWim method. When these CapturedWim objects are instantiated, they contain a composition of the WimInfo class, which is created. When the WimInfo class has ProcessInfo called, it is a wrapper for the DISM executable.
3. The WimImportAutomation class then takes the collection of CapturedWim objects and sends them to Production MDTDeploymentShare using the method ImportOperatingSystem.
4. The WimImportAutomation class then askes the Production instance to rename the operating system with method RenameOperatingSystem.
5. Inside the MDTDeploymentShare class, there is getting, testing, and setting of the operating system folder structure to make it idempotent, and then the MDT OS Import comamnd is called.

# UML Diagram
![UML](https://github.com/BronsonMagnan/MDTAutomation/blob/master/WimImportAutomation/UML.png)

repository: BronsonMagnan/MDTAutomation

repo_name: BronsonMagnan/MDTAutomation


text:
---
title: Rule Config
category: how-to
menu_order: 3
---

# Rule Configuration

## Creating a Configuration File

The linter by default looks for a file named `fsharplint.json` in the current working directory. Typically you would have this file in the root of your project.

At this moment in time the configuration requires every rule to be added to your file, rather than a typical approach where you would override just the rules you want to change from their defaults. This will be addressed in a future version see: [Issue #488](https://github.com/fsprojects/FSharpLint/issues/488).

Check out the [default configuration](https://github.com/fsprojects/FSharpLint/blob/master/src/FSharpLint.Core/fsharplint.json) that the tool comes with to see all possible settings and their default values.

## Global Configuration

In addition to the configuration available for each rule, there are some settings which are defined globally to maintain consistency across
multiple rules. These are defind in the `globals` object in the base of the configuration file. The rule pages below point out any global
setting that each rule depends on. The config is as follows, but can be completely omitted to use defaults:

    {
      "globals": {
        "numIndentationSpaces": 4 // number of spaces used for indentation
      }
    }

## Ignoring Files

In the configuration file paths can be used to specify files that should be included, globs are used to match wildcard directories and files. For example the following will match all files with the file name assemblyinfo (the matching is case insensitive) with any extension:

    { "ignoreFiles": ["assemblyinfo.*"] }

* Directories in the path must be separated using `/`
* If the path ends with a `/` then everything inside of a matching directory shall be excluded.
* If the path does not end with a `/` then all matching files are excluded.

## Rule List

The following rules can be specified for linting.

- [TupleCommaSpacing (FL0001)](rules/FL0001.html)
- [TupleIndentation (FL0002)](rules/FL0002.html)
- [TupleParentheses (FL0003)](rules/FL0003.html)
- [PatternMatchClausesOnNewLine (FL0004)](rules/FL0004.html)
- [PatternMatchOrClausesOnNewLine (FL0005)](rules/FL0005.html)
- [PatternMatchClauseIndentation (FL0006)](rules/FL0006.html)
- [PatternMatchExpressionIndentation (FL0007)](rules/FL0007.html)
- [ModuleDeclSpacing (FL0008)](rules/FL0008.html)
- [ClassMemberSpacing (FL0009)](rules/FL0009.html)
- [TypedItemSpacing (FL0010)](rules/FL0010.html)
- [TypePrefixing (FL0011)](rules/FL0011.html)
- [UnionDefinitionIndentation (FL0012)](rules/FL0012.html)
- [RecursiveAsyncFunction (FL0013)](rules/FL0013.html)
- [RedundantNewKeyword (FL0014)](rules/FL0014.html)
- [NestedStatements (FL0015)](rules/FL0015.html)
- [FailwithWithSingleArgument (FL0016)](rules/FL0016.html)
- [RaiseWithSingleArgument (FL0017)](rules/FL0017.html)
- [NullArgWithSingleArgument (FL0018)](rules/FL0018.html)
- [InvalidOpWithSingleArgument (FL0019)](rules/FL0019.html)
- [InvalidArgWithTwoArguments (FL0020)](rules/FL0020.html)
- [FailwithfWithArgumentsMatchingFormattingString (FL0021)](rules/FL0021.html)
- [MaxLinesInLambdaFunction (FL0022)](rules/FL0022.html)
- [MaxLinesInMatchLambdaFunction (FL0023)](rules/FL0023.html)
- [MaxLinesInValue (FL0024)](rules/FL0024.html)
- [MaxLinesInFunction (FL0025)](rules/FL0025.html)
- [MaxLinesInMember (FL0026)](rules/FL0026.html)
- [MaxLinesInConstructor (FL0027)](rules/FL0027.html)
- [MaxLinesInProperty (FL0028)](rules/FL0028.html)
- [MaxLinesInModule (FL0029)](rules/FL0029.html)
- [MaxLinesInRecord (FL0030)](rules/FL0030.html)
- [MaxLinesInEnum (FL0031)](rules/FL0031.html)
- [MaxLinesInUnion (FL0032)](rules/FL0032.html)
- [MaxLinesInClass (FL0033)](rules/FL0033.html)
- [ReimplementsFunction (FL0034)](rules/FL0034.html)
- [CanBeReplacedWithComposition (FL0035)](rules/FL0035.html)
- [InterfaceNames (FL0036)](rules/FL0036.html)
- [ExceptionNames (FL0037)](rules/FL0037.html)
- [TypeNames (FL0038)](rules/FL0038.html)
- [RecordFieldNames (FL0039)](rules/FL0039.html)
- [EnumCasesNames (FL0040)](rules/FL0040.html)
- [UnionCasesNames (FL0041)](rules/FL0041.html)
- [ModuleNames (FL0042)](rules/FL0042.html)
- [LiteralNames (FL0043)](rules/FL0043.html)
- [NamespaceNames (FL0044)](rules/FL0044.html)
- [MemberNames (FL0045)](rules/FL0045.html)
- [ParameterNames (FL0046)](rules/FL0046.html)
- [MeasureTypeNames (FL0047)](rules/FL0047.html)
- [ActivePatternNames (FL0048)](rules/FL0048.html)
- [PublicValuesNames (FL0049)](rules/FL0049.html)
- [<s>NonPublicValuesNames (FL0050)</s>](rules/FL0050.html) (Removed in `0.20.0`)
- [MaxNumberOfItemsInTuple (FL0051)](rules/FL0051.html)
- [MaxNumberOfFunctionParameters (FL0052)](rules/FL0052.html)
- [MaxNumberOfMembers (FL0053)](rules/FL0053.html)
- [MaxNumberOfBooleanOperatorsInCondition (FL0054)](rules/FL0054.html)
- [FavourIgnoreOverLetWild (FL0055)](rules/FL0055.html)
- [WildcardNamedAsPattern (FL0056)](rules/FL0056.html)
- [UselessBinding (FL0057)](rules/FL0057.html)
- [TupleOfWildcards (FL0058)](rules/FL0058.html)
- [Indentation (FL0059)](rules/FL0059.html)
- [MaxCharactersOnLine (FL0060)](rules/FL0060.html)
- [TrailingWhitespaceOnLine (FL0061)](rules/FL0061.html)
- [MaxLinesInFile (FL0062)](rules/FL0062.html)
- [TrailingNewLineInFile (FL0063)](rules/FL0063.html)
- [NoTabCharacters (FL0064)](rules/FL0064.html)
- [Hints (FL0065)](rules/FL0065.html)
- [NoPartialFunctions (FL0066)](rules/FL0066.html)
- [PrivateValuesNames (FL0067)](rules/FL0067.html)
- [InternalValuesNames (FL0068)](rules/FL0068.html)
- [GenericTypesNames (FL0069)](rules/FL0069.html)
- [FavourTypedIgnore (FL0070)](rules/FL0070.html)
- [CyclomaticComplexity (FL0071)](rules/FL0071.html)
- [FailwithBadUsage (FL0072)](rules/FL0072.html)
- [FavourReRaise (FL0073)](rules/FL0073.html)
- [FavourConsistentThis (FL0074)](rules/FL0074.html)
- [AvoidTooShortNames (FL0075)](rules/FL0075.html)
- [FavourStaticEmptyFields (FL0076)](rules/FL0076.html)

repository: fsprojects/FSharpLint

gha_language: F#

repo_name: fsprojects/FSharpLint


text:
# DynamoDB dump to JSON

Script for formatting `AWS DynamoDB` dump to proper `JSON` file.

## Setup

You should have [NodeJS](https://nodejs.org/en/) and [Sed](https://en.wikipedia.org/wiki/Sed) to be installed.

## Usage

Use `run.sh` script to perform trasnformation of raw `DynamoDB` dump file to `JSON` file:

```
$ ./run.sh <dump_file_name> <output_file_name>
```

You also can run script without parameters, then it will use default values of the parameters, like:

```
$ ./run.sh raw-data output-data.json
```

Where file `raw-data` you can find in this repositories with some examples of `DynamoDB` dump data.

## How to get AWS DynamoDB dump?

To get `DynamoDB` dump from `AWS` you need to setup data pipeline.

How to do it, you can read about it in `AWS` documentation:
[Export Data from DynamoDB](http://docs.aws.amazon.com/datapipeline/latest/DeveloperGuide/dp-importexport-ddb-part2.html)

## How the script works

First with a `sed` command line tool, dump data file will be cleaned up from the unicode characters and formatted to the `JSON` objects. Example of the command:

```
sed -e 's/$/}/' -e $'s/\x02/,"/g' -e $'s/\x03/":/g' -e 's/^/{"/' <dump_file_name> > <output_file_name>
```

Then with small `javascript` script data will be formatted to the proper `JSON` objects representation with correct `JSON` values (instead of `{"key": "string value"}` dump stores `{"key": {"s": "string value"}}`).

Later `JSON` objects will be wrapped in array and put to the output file.

Beaware that currently `javascript` script knows how to work with `numbers` and `strings` values at dump.
To make it handle another types, please tweek the script.

Full list of `DynamoDB` values types you can find in `AWS` documentation:
[http://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_AttributeValue.html](http://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_AttributeValue.html)

## Inspiration and reference

For the inspiration I took the repository [https://github.com/JasonGhent/AWS-DynamoDB-to-MongoDB](https://github.com/JasonGhent/AWS-DynamoDB-to-MongoDB). Thank you [Jason Ghent](https://github.com/JasonGhent) for your help!

# Copyright

Copyright (C) 2016 Pavlo Voznenko.

Distributed under the MIT License.

repository: kallooa/dynamodb-dump-to-json

repo_name: kallooa/dynamodb-dump-to-json


text:
# Search a string in a database

This script search a string in every field of each table of a database.

## Setup the script

Type the string to search for
![](./img/01_Script_setup.JPG)

Because, the search in the database is very slow, you can limit the search in large tables
Whith this two variables, you can control the search in big tables, or tables with a minimun number of rows.
@rowcountmax = x
@rowcountmin = y
To deactivate this filter, just comment this two lines

![](./img/03_rowcount_filter_Inactive.JPG)

Also, you can filter using table name or column name

![](./img/tablenamecolumnnamefilter.JPG)

The script, by default exclude numeric fields and other non string types, but you can activate it just comenting the desired part of code

![](./img/NumericTypeFilter.JPG)

## Executing the script
Just execute the scrip in SQL Server Management Studio or anothe database query tool

The searching progres give you feedback showing then current number of total

![](./img/04_Searching_Process.JPG)

## Result

The final result is a select, with al tables and fields where process has find the given string

![](./img/05_result.JPG)

Just copy the autogenerated sql command, paste in another sql manager tab and execute it. The first field of select, match the search string, it includes also all of the fields.

![](./img/SelectResult.JPG)

Select result
![](./img/ExecuteSelectResult.JPG)

For the examples I used Adventureworks database from Microsoft.
[Download Adventureworks](https://docs.microsoft.com/es-es/sql/samples/adventureworks-install-configure?view=sql-server-ver15&tabs=ssms)


text:
# Day 3 Challenge

## What do I Learn
We will master creating github issues, making issues reference commits , writing good commit messages and
writing commits that span multiple lines. We will also learn about git log and
git status commands.

Writing good and clear commit messages is one of the recommended git best practices.

## Tasks
- Create Github issue for your commit

- Make commits spanning multiple lines

- Write good commit messages

- Push commit to github as PR

## Day 3 Challenge, how to submit
- Create an Issue on this repository. Issue should read Add `<my-name>` to contributors list

- In my case it will read Add Ndubuisi Onyemenam to Contributors list

- Go to Project folder in your computer and Run the `git log` command on your CMD or Terminal

- You will see a blinking colon :, type wq then enter to exit

- Run `git status` command on your CMD or Terminal

- Add screenshot to show both output

- Run git pull origin master to pull in lastest changes from repo

- Add your name to [contributors.md](day3challenge/contributors.md)  file in day3challenge folder

- run `git add .` to add all changes

- run `git commit` command without the -m flag

- Notice that you have a text editor open

- Screenshot the open Editor

- Write Commit message header i.e Add my name to contributors list

- add screenshot of commands made

- Write Fixes Issue #`<the issue number you created>` above in the line following it
 - All in all your commit message will look like
  ```
  Add my name to contributors list

  add screenshot of commands made
  fix issue #27

  ```
- Pro Tip: All commit messages should  be in the present tense

- Also good commit message are in the format ; this commit will "Your commit message in present tense", all our commit messges fit well with this rule i.e this commit will;  fix issue #27 etc

- Since commit messages should not be more than 50 characters long(too), we write extra commit message lines  after the initial message line, see [screenshot](day3challenge/ndubuisi-day3.md#add-editor-screenshot) for example

- Save file by pressing Controlkey + o

- Then press enter

- Press Control + x to exit the editor

- Create a file called <yourname-day3.md> in the [day3challenge](day3challenge) folder

- Add a Screenshot image for git status and git log command

- Add a Screenshot image for the git commit editor

- Make a pull request to submit contributors.md file and your day 3 screenshot file

- Make a Post in the [Facebook group](http://bit.ly/fbowerri) telling us about your Progress and what you have learnt

- Extra -  feel free to send in a Pull request if you see a typo, spelling error anywhere in this codebase

## Day 3 Challenge, I need help
- Read this wonderful post on commit messages https://medium.com/@steveamaza/how-to-write-a-proper-git-commit-message-e028865e5791
- You can also read this too https://chris.beams.io/posts/git-commit/
- Google is your friend, check out Google
- Watch this Video by the Facebook Open Source Team https://youtu.be/c6b6B9oN4Vg
- See my Solution here [day1solution](day1challenge/ndubuisi-day1.md), notice that I uploaded my images on github here https://github.com/fbdevcowerri/git-14days-challenge/issues/5
- Create an issue on github and tell us what challenges you are having, someone would be kind enough to help you out
- Tell us about the challenges you are facing in the [facebook group](http://bit.ly/fbowerri)
- Wait for the solution video which comes out by the end of everyday D:, don't do this

# Day 4 Challenge

## What do I Learn
Using markdown .md files for documentation

A good documentation is the number one reason why developers adopt Software languages and frameworks, as a good documentation allows you to get work done faster. In this task we will be exploring using Github markdowns!

## Tasks
- Create Github issue for your commit

- Create a Github markdown file

- Install VS code text Editor

- Make commits spanning multiple lines

- Push commit to github as PR


text:
# firstPR
> Making your first contribution

In the CONTRIBUTORS file simply add your name in the following format:
`- [Your_Name](https://github.com/<your_github_username>)`

Note that your commit message should include `Fixes issue https://github.com/ayan-b/firstPR/issues/1`.


text:
# JS API

This document describes the Container runtime, which is used internally in the
react-container-query modules.

Support for other UI libraries can be implemented using this.

## Instantiation

```js
new Container(element, meta, options);
```

Where `element` is an HTMLElement, `meta` is a json object from the PostCSS
plugin, and options are extra options about how the instance should behave.

**Default options:**

```js
{
    adjustOnResize: true,
    adjustOnInstantiation: true,
    valuePrecision: 0,
}
```

- **adjustOnResize:** If true, then the container will readjust itself based on the
  element's height automatically. (Using ResizeObserver.)
- **adjustOnInstantiation:** Whether to do an initial adjustment call on instantiation.
- **valuePrecision:** "0" Produces whole values like "1px". Setting it to "3"
  would result in values like "1.234px".

These options may be useful to you, if you want to fine-tune when readjustments
should happen.

_For example_: You could optimise for animations, or only readjust containers on
window resize, if that fits your needs.

## Instance methods

- `adjust(containerDimensions)`: Calling `adjust()` will readjust the container
  based on it's size. You might have the containers size already, in which
  case you can just pass that in, so you can save the browser the layout / repaint
  work: `{ width: <number>, height: <number>}`. This could be useful if you're
  animating the container's size, and you already know the container's size on
  each "tick".
- `observeResize()`: Makes the container observe resize events and readjust
  itself automatically. Passing in the {adjustOnResize: true} option has the same
  effect.
- `unobserveResize()`: Stops a container observing resize events.

---

◀ [Syntax](syntax.md)

▶ [Caveats](caveats.md)

gha_language: JavaScript


text:
# 2.7 Layout

https://www.haskell.org/onlinereport/haskell2010/haskellch2.html#x7-210002.7

Haskell permits the omission of the braces and semicolons used in several grammar productions, by using layout to convey the same information.

This allows both layout-sensitive and layout-insensitive styles of coding, which can be freely mixed within one program.

Because layout is not required, Haskell programs can be straightforwardly produced by other programs.

The effect of layout on the meaning of a Haskell program can be completely specified by adding braces and semicolons in places determined by the layout. The meaning of such augmented program is now layout insensitive.

Informally stated, the braces and semicolons are inserted as follows:

The *layout rule* (or off-side rule) kicks in
whenever the open brace is omitted
after the keywords: `where`, `let`, `do`, `of`.

When this happens,
the indentation of the next lexeme
(whether or not on a new line)
is remembered
and the omitted open brace is inserted
(the whitespace preceding the lexeme may include comments).

For each subsequent line:
- IF    it is indented more (or contains only whitespace),
  THEN    the previous item is continued
  AND     nothing is inserted
- IF    it is indented the same amount,
  THEN    a new item begins
  AND     a semicolon is inserted
- IF    it is indented less,
  THEN    the layout list ends
  AND     a close brace is inserted

If the indentation of the non-brace lexeme
immediately following a `where`, `let`, `do`, `of`
is less than or equal to
the current indentation level,
then, instead of starting a layout,
an empty list "{}" is inserted,
and layout processing occurs
for the current level
(i.e. insert a semicolon or close brace).

A close brace is also inserted
whenever the syntactic category
containing the layout list ends;
that is,
if an illegal lexeme
is encountered at a point
where a close brace would be legal,
then a close brace is inserted.

The layout rule matches only
those open braces that it has inserted;
an explicit open brace must be matched
by an explicit close brace.

Within these explicit open braces,
no layout processing is performed
for constructs outside the braces,
even if a line is indented to the left
of an earlier implicit open brace.

Given these rules, a single newline
may actually terminate several layout lists.

Also, these rules permit:

```hs
f x = let a = 1; b = 2
          g y = exp2
       in exp1
```

making `a`, `b` and `g` all part of the same layout list.

As an example, Figure 2.1 shows a (somewhat contrived) module and Figure 2.2 shows the result of applying the layout rule to it.

Note in particular:
- the line beginning `}};pop`, where the termination of the previous line invokes 3 applications of the layout rule, corresponding to the depth (3) of the nested where clauses,
- the close braces in the `where clause` nested within the tuple and case expression, inserted because the end of the tuple was detected
- the close brace at the very end, inserted because of the column 0 indentation of the end-of-file token.

Figure 2.1: A sample program

```hs
module AStack (Stack, push, pop, top, size ) where

data Stack a = Empty | MkStack a (Stack a)

push :: a -> Stack a -> Stack a
push x s = MkStack x s

size :: Stack a -> Int
size s = length (stkToLst s)
  where
    stkToLst Empty = []
    stkToLst (MkStack x s) = x : xs
      where xs = stkToLst s

pop :: Stack a -> (a, Stack a)
pop (MkStack x s) =
  (x, case s of
    r -> i r
      where
      i x = x
  )
-- (pop Empty) is an error

top :: Stack a -> a
top (MkStack x s) = x
-- (top Empty) is an error
```

Figure 2.2: Sample program with layout expanded (semicolons infested)

```hs
module AStack (Stack, push, pop, top, size ) where
{
  data Stack a = Empty | MkStack a (Stack a);
  push :: a -> Stack a -> Stack a; push x s = MkStack x s;
  size :: Stack a -> Int;
  size s = length (stkToLst s) where
  {
    stkToLst Empty = [];
    stkToLst (MkStack x s) = x:xs where
    {
      xs = stkToLst s
    }
  };
  pop :: Stack a -> (a, Stack a);
  pop (MkStack x s) = (x, case s of { r -> i r where { i x = x } });
  top :: Stack a -> a; top (MkStack x s) = x
}
```


text:
# RtfParse
A ruby miodule wrapping unrtf. The GNU copmmand-line utility, unrtf, uses `.config` file to determine the output format for the parsed RTF. Output can be customized by modifying these files, which you'll find in the config directory of this gem. The `html.config` file includes a complete list of formatting tags.

## Dependencies
- [unrtf](https://www.gnu.org/software/unrtf/)

## Installation
First install unrtf:
- Mac: `brew install unrtf`
- Ubuntu: `apt-get install unrtf`
- Windows: [find installer here](http://gnuwin32.sourceforge.net/packages/unrtf.htm)

Then install the gem:
```ruby
gem install rtf_parse
```

## Use

```ruby
require 'rtf_parse'
```

To convert RTF to text:

```ruby
RtfParse.to_text(rtf_text_or_file_path)
```

To convert RTF to HTML:

```ruby
RtfParse.to_html(rtf_text_or_file_path)
```

To use a custom config file:

```ruby
RtfParse.custom_parse(rtf_text_or_file_path,
  config_path: 'path/to/config/files/',
  tags_file: 'custom_config_file_name'
)
```


text:
# Running #

Running Virgil programs is easy with the included interpreter.
If you've followed the instructions in [GettingStarted](GettingStarted.md), you should simply be able to run the command:

> % `v3i <my virgil files>`

The `v3i` (Virgil III interpreter) command will load and verify your program before running its main method.
If your program has compile errors, the errors will be reported and it will not be executed.

# Compiling #

Running programs in the interpreter is great for experimentation and testing, but is much slower than running production-quality executables.
To compile your programs to the default target platform, simply run:

> % `v3c-host <my virgil files>`

This command first senses the "host" platform and then selects the appropriate compiler backend and runtime code for it.
It then invokes the compiler which will then load and verify your program before producing an executable.
As before, any compile errors will be reported.
If compilation succeeds, an executable will be produced.
The name of the executable is derived from the name of the component in your program that contains the main method.
For example, if that component were named `MyProgram`, then an executable called `MyProgram` would be produced, and it could be executed:

> % `./MyProgram <args>`

# Target Platforms #

If you are running on a platform which the Virgil compiler natively supports, the above commands will produce native binaries.
If not, the command will typically generate a Java archive (JAR) and an associated script.
The JVM is the default target when the host is not supported, because it is the most portable.
To select a specific target platform, use the appropriate `v3c` command directly:

> % `v3c-x86-64-darwin <my virgil files>`

This will produce an executable for the `x86-64-darwin` platform.
The name of the executable is chosen in the same manner as before.
If you have no compile errors, you can execute the produced binary on an appropriate computer:

> % `./MyProgram <args>`

You could could also target `x86-linux` by simply running instead:

> % `v3c-x86-linux <my virgil files>`

> % `./MyProgram <args>`

You will find that most programs run significantly faster on a native platform than on the interpreter or the JVM.

repository: titzer/virgil

gha_language: Shell

repo_name: titzer/virgil


text:
Footpad
=======

Footpad is a gem for rack based systems to help produce custom [Geckoboard](https://developer.geckoboard.com) ready data. With it you can easily take a piece of data, like a number, and have it put in the correct JSON container for a cutom Geckoboard widget to consume.

### Example
```
data = '123'
number_and_secondary_stat(data)
=>
{
  "item": [
    {
      "value": 123
    }
  ]
}
```

Footpad currently supports [number and secondary stat](https://developer.geckoboard.com/#number-and-secondary-stat]), [leaderboards](https://developer.geckoboard.com/#leaderboard), and [line charts](https://developer.geckoboard.com/#line-chart). More methods are coming soon.

## Installation
You can install the gem directly to your system:

`gem install footpad`

or add it to your gemfile if you are using one.

`gem footpad`

Within the module or class you are calling Footpad's methods, include the module:

`include Footpad`

If you are using this within a Rails project, just use the above line in the controller you are using the methods.

## Instructions

After you have added Footpad to you application you can expose data in these formats.

#### Number and Secondary Stat

The first value is required, and the value that will be the primary stat. You can add any of the additional parameters by simply including it after the first.

```
primary_stat = 1000
secondary_info = 'is a lot'

number_and_secondary_stat(primary_stat, text: secondary_info)
```

Will result in

```
{
  "item": [
    {
      "value": 1000,
      "text": "is a lot"
    }
  ]
}
```

Look at the docs to see all the [paramater options](https://developer.geckoboard.com/#parameters-18).

#### Leaderboard

The first provided value is an array or arrays with two or three pieces of data, this will create the label, value, and rank arrows. The order that you list them here will be the order that they display on the Geckoboard element.

```
leaders = [
  ['Tom', 12, 2],
  ['Jon', 10, 1],
  ['Paul', 8, 3]
]
leaderboard(leaders)
```
Will result in
```
{
  "items": [
    {
      "label": "Tom",
      "value": 10,
      "previous_rank": 2
    },
    {
      "label": "Jon",
      "value": 10,
      "previous_rank": 1
    },
    {
      "label": "Paul",
      "value": 8,
      "previous_rank": 3
    }
  ]
}
```

Check out the [paramater options here](https://developer.geckoboard.com/#parameters-8).

#### Line Chart
Line charts are pretty simple, with this you simply provide an array of values to be displayed.

```
values = [15, 23, 56, 67]
linechart(values)
```

Which will result in

```
{
  "item" : [
    15, 23, 56, 67
  ]
}
```

Where having method really helps is with it's additional settings, check this out:

```
MONTHS = Date::MONTHNAMES.compact.map {|m| m[0..2] }
values = [15, 23, 56, 67]
linechart(value, axisx: MONTHS, axisy: [value.min, value.max], color: '#ff00aa')
```

Results in

```
{
  "item" : [
    15, 23, 56, 67
  ],
  "settings" : {
    "axisx" : [
      "JAN",
      "FEB",
      "MAR",
      "APR",
      "MAY",
      "JUN",
      "JUL",
      "AUG",
      "SEP",
      "OCT",
      "NOV",
      "DEC
    ],
    "axisy" : [15, 67],
    "color" : "#ff00aa"
  }
}
```

Check out the [additional params here](https://developer.geckoboard.com/#parameters-10).

repository: KenStipek/Footpad

repo_name: KenStipek/Footpad


text:
---
layout: post
title: Force Line Break in CRM 2011 Ribbon Labels
date: '2012-02-27T15:07:00.001-05:00'
author: Rick Wilson
tags:
- CRM 2011
- Ribbon
modified_time: '2012-03-01T15:14:01.180-05:00'
thumbnail: http://1.bp.blogspot.com/-L8wTmZ7hX1g/T0vwiYiIfrI/AAAAAAAAGds/49bRT-zo3Tk/s72-c/charmap.png
blogger_id: tag:blogger.com,1999:blog-8675696861245191896.post-2661257897157319354
blogger_orig_url: https://www.richardawilson.com/2012/02/force-line-break-in-crm-2011-ribbon.html
---

With really long title on CRM ribbon buttons the text will fill the entire space before going to the next line.  In order to for text to the next line you can use the Zero Width Space.  Encoded these characters look like this.

    ``````

In order to actually enter these characters into a text editor the easier way is the use the charmap.exe utility in windows.

NOTE: If using Windows Server 2008 ensure the Desktop Experience feature installed or the Charmap will not be available.

[![](http://1.bp.blogspot.com/-L8wTmZ7hX1g/T0vwiYiIfrI/AAAAAAAAGds/49bRT-zo3Tk/s320/charmap.png)](http://1.bp.blogspot.com/-L8wTmZ7hX1g/T0vwiYiIfrI/AAAAAAAAGds/49bRT-zo3Tk/s1600/charmap.png)

1. Start->Run->charmap

2. Change the font to Arial Unicode MS

3. Scroll down about 1/6 of the way down and you will see the space characters.

4. Click on the characters until you see that U+200B is selected at the bottom of the screen.

5. Click Select

6. Click Copy


text:
Aura Framework
==============

Unlike every other Aura package, the Aura Framework package *does* have
dependencies. This is because it composes them into a unified framework for
development. You probably don't want to download this directly; more likely,
you want the [system repository](https://github.com/auraphp/system) for a
project skeleton.

This package is compliant with [PSR-0][], [PSR-1][], and [PSR-2][]. If you
notice compliance oversights, please send a patch via pull request.

[PSR-0]: https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md
[PSR-1]: https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-1-basic-coding-standard.md
[PSR-2]: https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md

branch_name: refs/heads/develop

gha_language: PHP


text:
---
title: CPU SLA
category: feature
authors: adahms, kianku, roy
wiki_category: Feature
wiki_title: Features/CPU SLA
wiki_revision_count: 35
wiki_last_updated: 2015-04-14
---

# CPU SLA

**CPU SLA**

## Summary

The CPU SLA feature enables users to limit the CPU usage of a virtual machine.

## Owners

#### Initial design and implementation

*   Name: Kobi Ianko (kianku<EMAIL_ADDRESS>
#### Maintainers

*   Name: Roy Golan (rgolan<EMAIL_ADDRESS>*   Name: Martin Sivak (msivak<EMAIL_ADDRESS>
## Current status

*   Target Release: 3.5
*   Status: completed
*   Last updated: April 14, 2015

## Detailed Description

CPU is one of the important component which each guest has.

Currently RHEV doesn't support SLA features which limits guest's and qemu's cpu resource consumption. Therefore all guests working on the same host may be affected by other guests' cpu workload.

On the other hand, customers expect that virtualized systems work as stably as the systems on bare servers.

To provide same stability in virtualized environment, we need to limit cpu bandwidth of each guest and isolate each guest from others.

To accomplish this target a CPU Profile element will be introduced.
The CPU Profile will be selected by the end user from a predefined list in the Add VM popup window, and will be created in the Cluster level of the system.

Each cluster will contain its own list of CPU Profile that are available for the use of the VMs running in that Cluster.

Each CPU Profile will contain a Qos element.
The Qos element will be defined in the DataCenter level of the system, and will be constructed out of a single field that represent the CPU processing power that is permitted for this VM out of the total CPU Processing capacity.

For representing the CPU qos we have three different approaches:
1. using a percentage number - currently this is the preferred approach

This approach will be consistent over different hosts, when a VM migrate to host with different CPU capabilities.

2. using a fixed MHz number

This is the old school approach, it will be clear to the user what exact input he is giving, but on different host this input could act slightly different.

3. using bogomips

This is an unscientific measurement of CPU speed (http://en.wikipedia.org/wiki/BogoMips)

**The selected approach is the percentage (1).**

## GUI

The user will configure the CPU limitation at the VM popup, our goal is to create a new side-bar for SLA and to place Cpu Profile in it.
The following is a draft using the existing Resource Allocation side-bar, for getting the look and feel of using the CPU limits feature
![](cpuLimit.png "fig:cpuLimit.png")

The administrator will allocate CPU profiles to be used in the Cluster at the Cluster main tab, using the CPU Profile sub tab.
![](CpuLimitClusterSubTab.png "fig:CpuLimitClusterSubTab.png")

## VDSM

**TODO - this section needs update**

In the VDSM we will be using the libvirt API of CPU tuning (http://libvirt.org/formatdomain.html#elementsCPUTuning), and MOM. The Qos entered by the user will be picked by the engine's "Sync MOM Policy", and forward to Libvirt dom xml meta-data section.
For using the metadata section we will define a URI that will serve as a namespace from vm tunable parameters ("[vm/tune/1.0](/documentation/admin-guide/virt/tuning/1.0/)"). A MOM policy will convert Qos value into the libvirt period and quota parameters, and set the value to Libvirt using a MOM controller, ensuring that the CPU limits are enforced.

To do that we will use the following algorithm:

         1. pick a fixed number to be used as anchor [1000 - 1000000], we will use the minimum*100 (because we use percentage)   = 100000 = anchor.
         2. period = anchor / #NumOfCpuInHost
         3. quota = (anchor*(#userSelection/100)) / #numOfVcpusInVm

## DB

The VM_STATIC will introduce a new field of CPU_PROFILE, this field will be a FK to the new table of CPU_PROFILES. CPU_PROFILES table will contain the following fields:
id (PK)
name
qos_id (FK)
cluster_id (FK)

## Rest API

A new element of cpu_profile will be added to the API, and the VM element will extend to contain the new CPU profile property.

    <cpu_profile href="/ovirt-engine/api/cpuprofiles/dd806259-d121-4914-9b32-5998dd40b26f" id="dd806259-d121-4914-9b32-5998dd40b26f">
        <name>gold_profile</name>
        <link href="/ovirt-engine/api/cpuprofiles/dd806259-d121-4914-9b32-5998dd40b26f/permissions" rel="permissions"/>
        <cluster href="/ovirt-engine/api/clusters/3e9dacfa-65bf-4433-b584-07383c50aef6" id="3e9dacfa-65bf-4433-b584-07383c50aef6"/>
    </cpu_profile>

    <vm>
        ...
        ...
        <memory>1073741824</memory>
        <cpu>
            <topology sockets="1" cores="1"/>
            <architecture>X86_64</architecture>
        </cpu>
        <cpu_shares>0</cpu_shares>
        <cpu_limit>25</cpu_limit>
        <os type="other">
            <boot dev="hd"/>
        </os>
        ...
        ...
    </vm>

## Benefit to oVirt

When running a VM, the VM should run as an independent unit and should be affected by other VMs as little as possible.
This feature enable the user to limit the CPU resources of a specific VM, this will ensure that in cases were several VMs are running on the same host, one VM will not cause performance decline in another VMs.
Another good use for this feature is in cases a growth in the number of VMs is expected, the user can limit the CPU resource to a VM leaving enough CPU resources for the future VMs, this way users of the guests will not have an impact on performance once other VMs will join the host.

repository: maorlipchuk/ovirt-site

gha_language: HTML

repo_name: maorlipchuk/ovirt-site


text:
# Kanji RNN

(dataset has been uploaded in the repo)

Using RNN to generate Kanji Characters (vector image).

Example Training Sketches (20 randomly chosen out of 11000 [KanjiVG](http://kanjivg.tagaini.net/) dataset):

![Example Training Sketches](https://cdn.rawgit.com/hardmaru/sketch-rnn/master/example/training.svg)

Generated Sketches (Temperature = 0.1):

![Generated Sketches](https://cdn.rawgit.com/hardmaru/sketch-rnn/master/example/output.svg)

# requirement

```
python 3
tqdm
tensorflow
keras
svgwrite
xml.etree.ElementTree
argparse
cPickle
svg.path
```

# usages

run `python main_entry.py --data_set kanji --mode train` to start training. Or you can load a pre-trained model (which is not uploaded yet) and only want it to generate kanji using `python main_entry.py --mode sample` (if you do not specify mode argument, the default setting is 'sample')

The default values are in `main_entry.py`

## Sampling a Sketch

Running `python main_entry.py --filename output --num_picture 10 --dataset_name kanji`

## More useful links, pointers, datasets

- Alex Graves' [paper](http://arxiv.org/abs/1308.0850) on text sequence and handwriting generation.

- [KanjiVG](http://kanjivg.tagaini.net/). Fantastic Database of Kanji Stroke Order.

# License

MIT

repository: LuxxxLucy/kanjiRNN

repo_name: LuxxxLucy/kanjiRNN


text:
---
title: 'Contribute to Research'
description: We're now collecting anonymous attendee data from past hackathons or any other STEM-related events. Start your submission here!
---

**If you are an event organizer, we need your help!** We're now collecting anonymous attendee data from past hackathons or any other STEM-related events. The submission process is easy, and we're happy to credit you or your event on our report.

{{< button text="Start Submission »" url="https://airtable.com/shrU6CxQW90nF5Jdi" external="true" >}}  {{< button text="Privacy Promise" url="/research/privacy" >}}

{{< announcement content="
Research Update
We're working with prospective organizers to commit their STEM events to contributing useful anonymous attendee data. If you're planning on running a STEM event, we'd love to chat with you to make your event a part of our research project!" button="Schedule a Chat" link="https://calendly.com/megancui/30min" >}}

## Who do we need data from?

If you are an organizer of an event that...

* promoted any STEM-related field including but not restricted to: hackathons, coding competitions, cybersecurity or capture-the-flag challenges, puzzle hunt...
* happened within the past 5 years (online or in-person, anywhere in the world)
* had at least 50 high school or college students in attendance
* did not require a significant amount of payment to register (≤ $20 USD on average)
* **If your event is all-womxn, non-binary, or contains only a limited range of demographic audience in other ways, please indicate that on your submission so we can put you into a special pool.**

We would love to collaborate with your initiative to complete our research!

## What information are we collecting?

We're collecting **Non-Personally Identifiable Information (Non-PII)** from your event's attendance sheet. Specifically, we're looking for metrics like:

* Gender
* Race and Ethnicity
* Age (Grade)
* Skill Level (Beginner/Advanced...)
* Show/No Show (for attrition rate calculations)
* Socioeconomic Status (if you provided any travel reimbursement or hardware rental, for example)

To help ease our data-collection process, we're simply asking you to submit your entire attendee registration sheet **with the PII columns removed**. We will take care of any calculations and statistical analysis.

If your event is missing any of the above information, no worries! Still submit what you can, and we'll take care of the rest.

We only collect your event's name and contact information for verification purposes. None of our released information will be able to be traced back to your event.

Here's a [sample data submission](https://drive.google.com/file/d/1mO7U7zP-RgI0kh0GfUYtfUl4Wyp8o1TN/view) from Hack Chicago with PII columns redacted. Note that you do not need to keep the columns redacted like this sample — feel free to delete them completely.

## What is PII?

Personally identifiable information (PII) is any data that can be used to identify a specific individual. Social Security numbers, mailing or email address, and phone numbers have most commonly been considered PII, but technology has expanded the scope of PII considerably. It can include an IP address, login IDs, social media posts, or digital images. Geolocation, biometric, and behavioral data can also be classified as PII. (CSO Online)

In our case, since a lot of event attendees are minors, it is especially important for us to make sure that your attendee data remains anonymous and secure. If your attendance sheet contains information that can be traced back to a specific individual, please remove that column before submitting your data. If you need help from our team, please do not hesitate to reach out.

Regardless, here’s our commitment to you: even if you submit any sensitive information to us during the data collection process, we will never use them, and we will discard any information that we are not using immediately.

## Why do we need these data?

Never had there been a large enough sample database to allow researchers and future event organizers to realize what the state of the nation is when it comes to innovative events like hackathons. There are organizations that have collected specific sets of information — MLH, who specializes in collegiate events, and CodeDay, who specializes in intimate, beginner-centric event — yet it’s hard to understand what we’re dealing with daily when it comes to generalizing demographic data. The information that these organizations released are often unique to their own platform, yet it can be very different when you look only slightly beyond that.

Execute Big is committed to making sure that our data covers all sorts of events. We want to make it diverse and inclusive in any way — whether it is the geographic location, socioeconomic status, or the demographic of the students that the event accepts.

We will use your event's data to find out the gender balance in attendance of CS events in relation to location, age groups, event sizes, and more, so we can find out better ways to engage underrepresented minorities in the world of technology.

{{< button text="Start Submission »" url="https://airtable.com/shrU6CxQW90nF5Jdi" external="true" >}}

## Who do I contact for this project?

This project is led by co-founders of Execute Big: Megan Cui, a rising sophomore at Harvard, and Mingjie Jiang, an incoming freshman at UC Berkeley. Execute Big is a public charity with the EIN 85-2160468.

If you have questions or suggestions about the research project, please feel free to email<EMAIL_ADDRESS>to get in touch with us.

## With Support From...

These are only some of the amazing events who have shared their data with us, listed in no particular order.

{{< research-events >}}

repository: zachlatta/www

repo_name: zachlatta/www


text:
---
title: EventSourcing
category: OpenPaaS Core
order: 2
---

## Table of contents
{:.no_toc}

* Here is the ToC, this line is needed to generate...
{:toc}

## Events

Almost all actions in the OpenPaaS platform produce events, most of them are published in the [local pubsub channel](/core/pubsub/) to allow extensibility and reactivity. A first implementation stores every event published in any pubsub topic in the Elasticsearch platform instance in the `core.events.idx` index (Data can then be visualized using [Kibana](/devops/kibana/)).

repository: linagora/openpaas-doc

gha_language: SCSS

repo_name: linagora/openpaas-doc


text:
# Pig Game
This is a simple JavaScript Pig Game.

Just Clone the Repo and test it on Browser.

*Note:* Testing was held in  Google Chrome (Version 86.0.4240.183 (Official Build) (64-bit)).


text:
---
description: Default print resolution. Provides a default print resolution in case a particular catalog record does not contain a valid catalog PrintResolution value.
seo-description: Default print resolution. Provides a default print resolution in case a particular catalog record does not contain a valid catalog PrintResolution value.
seo-title: PrintResolution
solution: Experience Manager
title: PrintResolution
topic: Scene7 Image Serving - Image Rendering API
uuid: 6333c630-2df1-4eb1-b2fb-e67692f747eb
---

# PrintResolution{#printresolution}

Default print resolution. Provides a default print resolution in case a particular catalog record does not contain a valid catalog::PrintResolution value.

## Properties {#section-8f3cffb0f3f3406b81bc967366b241d6}

Integer number, larger than 0. Expressed in dots per inch.

## Default {#section-b5d70865fe8d40229d8d91404fdf3244}

Inherited from `default::Resolution` if not defined or if empty.

## See also {#section-54f8797a2b694d91a316f0d7414fac32}

[catalog::PrintResolution](../../../../../is-api/image-catalog/image-serving-api-ref/c-image-catalog-reference/c-image-svg-data-reference/c-image-data-reference/r-printresolution-cat.md#reference-4ebb2e136995470b84b7c5e10cb8e5f5)


text:
SuperToasts Library
=================

The SuperToasts library enhances and builds upon the Android Toast class. Some of the features of this library include context sensitive toasts (SuperActivityToasts), toasts with buttons and icons, non context sensitive toasts (SuperToasts), and a new style of toasts (SuperCardToasts) with many customization options for each. Some of the ideas for this library came from the [UndoBar Library](https://code.google.com/p/romannurik-code/source/browse/misc/undobar)
and the [Crouton Library](https://github.com/keyboardsurfer/Crouton).

###The library is in beta and under active development, expect bugs.

![Screenshot](http://i1016.photobucket.com/albums/af284/Turbopwned/supertoasts_group_screenshot_two.png)

Adding SuperToasts to your project
================
###Eclipse
1) Download the ZIP file

2) Extract the SuperToasts project from the ZIP file

3) In Eclipse: New > Android Project from Existing Code > SuperToasts project > Finish

4) Right click on your project

5) Android > Library: Add > SuperToasts

###IntelliJ
1) Download the ZIP file

2) Extract the SuperToasts project from the ZIP file

3) In IntelliJ: File > Project Structure > Modules > Add > Import Module > SuperToasts

4) Select your project module in project structure > Dependencies > Add > Module dependency > SuperToasts

###Gradle
Add this to your project's build.gradle file
```xml
dependencies {

    compile 'com.github.johnpersano:supertoasts:1.3.4@aar'

}
```

Using the library
================
Check out the Wiki pages [here](https://github.com/JohnPersano/SuperToasts/wiki).

Demo Application
================
A simple demo application is available on Google Play. This demo application does not showcase all of the libraries functions
rather it is a short demonstration of major features/functions of the library.

Developer
=========
[John Persano](https://plus.google.com/+JohnPersano)

License
=======

    Copyright 2014 John Persano

    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: AndroidGears/SuperToasts

repo_name: AndroidGears/SuperToasts


text:
Lua Database Documentation
==========================

Warning: flat type database.

Omg. Why.
Because Lua, that's why. No, it won't be the fastest. I don't know. Maybe this is just to prove what Lua is capable of.

It's like the story of the turtle and the bunny. The bunny is fast, but isn't smart - the turtle isn't fast, but is smart... (Interpret this your own way)

So what can we do?
==================

LDB manager has basically two services:
-> The server (You won't touch this a lot)
-> The client (Yeah you will touch this a lot)

The client can send requests to the LDB server. LDB is another process, so we can create secure environments for the database. We don't want it to get stolen, right?
I will provide a plugin so queries can be sent while preprocessing HTML.

Query Syntax
============

NOTE: These queries are going to be put in a "database" plugin for web pages.
Usage for that will be provided.
In most case the function to call is the plugin method of that function name, plus arguments. This builds a buffer for our database which is released upon request. New requests are created via a function which also has to be called first.

`create <dbname> <collinfo>`
Creates a new database. If it exists, do nothing. dbname can be a path.
Collinfo is in the following format:

create test collinfo: id,name,score main: id;
NO SPACES!
If main: is not preset, choses first specified collumn as main row. This is used as key to find the data.

`insert <insdata> in <database name>`
inserts data into the database
insdata is as following:
rowname = [datalen] data, rowname=[datalen]data ..

--> first open in w to create
--> then open in r+ to set pos and update
---> THIS DOES NOT INSERT, but overwrites raw bytes.

repository: xubingyue/LuaServer-GameKit

repo_name: xubingyue/LuaServer-GameKit