text:
ColReorder

ColReorder adds the ability for the end user to click and drag column headers to reorder a table as they see fit, to DataTables. Key features include:

Very easy integration with DataTables

Tight integration with all other DataTables plug-ins

The ability to exclude the first (or more) column from being movable

Predefine a column order

Save staving integration with DataTables

Installation

To use ColReorder, first download DataTables ( http://datatables.net/download ) and place the unzipped ColReorder package into a extensions directory in the DataTables package. This will allow the pages in the examples to operate correctly. To see the examples running, open the examples directory in your web-browser.

Basic usage

ColReorder is initialised using the $.fn.dataTable.ColReorder constructor. For example:

$(document).ready( function () {
    $('#example').DataTable();

    new $.fn.dataTable.ColReorder( table );
} );

Documentation / support

Documentation: http://datatables.net/extensions/colreorder/

DataTables support forums: http://datatables.net/forums

GitHub

If you fancy getting involved with the development of ColReorder and help make it better, please refer to its GitHub repo: https://github.com/DataTables/ColReorder


text:
# FINAL PROJECT

Title: MAR Investments - Baseball Team
Group Members: Marianne Boerenko, Rebecca Gonzalez, Arun Kara

Group Members Availability:
	Arun: 24/7
	Marianne: M-F: after 5:00 PM ; Saturdays; after class; Sundays, after 1 pm
	Rebecca:  M-F: after 5:00 PM; Sundays after 7:00 PM

Project Description: As part of this year’s annual team building event, to maintain our virtual culture, MAR Investments will be hosting a fantasy baseball league (Miami MARtians Fantasy League) through the end of the year.  Our development team has been busily creating a website where you will be able to use machine learning to choose your team and then compare it against other teams.  Using prior year stats, you will be able to use our machine learning model to predict how well your players will do in the current season.  Using some of the proceeds from our recent success with HotMess Brewery, there will be prizes for the winning teams each week.

Note:  We will be using 2019 datasets to predict the player effectiveness in 2020 and will be able to see if our predictions are correct.

Datasets:

  	https://www.rotowire.com/baseball/stats.php

 	https://www.sports-reference.com/

 	https://cricsheet.org/downloads/

  	https://www.kaggle.com/open-source-sports/baseball-databank

  	https://www.kaggle.com/wduckett/moneyball-mlb-stats-19622012

  	https://www.usatoday.com/sports/mlb/salaries/

  	https://baseballsavant.mlb.com/leaderboard/statcast

Research:

  	https://www.espn.com/fantasy/baseball/story/_/id/29206017/advanced-stats-use-fantasy-baseball

  	https://fantasysixpack.net/creating-fantasy-baseball-player-rater/

  	https://www.wisegeek.com/how-does-fantasy-baseball-work.htm

  	https://www.dummies.com/sports/fantasy-sports/fantasy-baseball/how-to-play-fantasy-baseball/

  	http://m.mlb.com/glossary/statcast

Project Tools (planned):
  Python Pandas,
  Python Matplotlib,
  Postgres,
  Javascript / CSS / HTML,
  Tableau,
  Scikit-Learn,
  Heroku

Project Tasks: (See Project Plan Folder)

Visualization Inspiration (See Images Folder)

license: MIT

repository: MBoerenko/Final-Project

branch_name: refs/heads/main

extension: md

license_type: permissive

repo_name: MBoerenko/Final-Project


text:
# Style
Source file: [packages/component/button/_button.scss](https://github.com/kpn/kpn-style/blob/master/packages/component/button/_button.scss)

---

## HTML/CSS examples

### Primary button
```html*example
<button class="button">Primary button</button>
```

### Buttons in group
Wrap a series of buttons together in a group.

```html*example
<div class="button-group">
  <button class="button">Primary button</button>
  <button class="button button--secondary">Secondary button</button>
  <button class="button button--link">Link button</button>
</div>
```

### Disabled buttons
```html*example
<div class="button-group">
  <button class="button" disabled>Primary button</button>
  <button class="button button--secondary button--disabled">Secondary button</button>
  <button class="button button--link button--disabled">Link button</button>
</button>
```

### Button with icon
```html*example
<button class="button"><i class="ui-delete"></i>Remove item</button>
```

### Button with Progress spinner
See also [Progress spinner](/#/component/progress).

```html*example
<button class="button button--spinner">Loading</button>
```

### Button sizes
On the 12 column grid there is a maximum width of 4/12 you should use for buttons. This is made easy with the helper classes below.

```html*example
<div class="button-group">
  <button class="button button--1">1</button>
  <button class="button button--2">2</button>
  <button class="button button--3">3</button>
  <button class="button button--4">4</button>
</div>
```

There are three different button sizes available.

    Button sizes small and large are deprecated and will be removed in an upcoming major version release of KPN Style. Please avoid using differing button sizes, or override the CSS in your own project.

```html*example
<div class="button-group">
  <button class="button button--small">Small button</button>
  <span class="button">Medium button</span>
  <div class="button button--large">Large button</div>
</div>
```

### Fluid button
Make buttons fill the full width of the containing element. You can add the fluid modifier class to all button variations that you wish to span the full width of its container.

```html*example
<button class="button button--fluid">Fluid button</button>
```

### Advanced group

#### Responsive buttons
Responsive buttons will span the full width of their container (like fluid buttons) automatically on `xs` screen sizes.

```html*example
<div class="button-group button-group--respond">
  <button class="button">Primary</button>
  <button class="button button--secondary">Secondary</button>
</div>
```

#### Right aligned buttons
```html*example
<div class="button-group button-group--right">
  <button class="button">Primary</button>
  <button class="button button--secondary">Secondary</button>
</div>
```

#### Reversed buttons
Reversed buttons will be shown from last to first (based on the HTML definition).

```html*example
<div class="button-group button-group--reverse">
  <button class="button">Primary</button>
  <button class="button button--secondary">Secondary</button>
</div>
```

---

## Sass
### Customizable variables

#### Font size
```scss
$button-font-size-s: [value for small button];
$button-font-size-m: [value for medium button];
$button-font-size-l: [value for large button];
```

#### Height
```scss
$button-height-s: [value for small button];
$button-height-m: [value for medium button];
$button-height-l: [value for large button];
```

repository: gnyers/kpn-style

branch_name: refs/heads/master

repo_name: gnyers/kpn-style


text:
# C# Development in Visual Studio Code

C# can be written in either VS Code or Visual Studio.

### To Use VS Code

- [Install Visual Studio Code](https://code.visualstudio.com/)
  - [Install .Net Core SDK](https://dotnet.microsoft.com/download)
  - [Install C# extension](https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.csharp>)

Visual Studio can handle C# out of the box. Setup recommendations are [here](/ide/VisualStudio/README.md).

## Other Helpful Extensions

- [Auto-Using for C#](https://marketplace.visualstudio.com/items?itemName=Fudge.auto-using) : Auto-imports and provides intellisense for references that were not yet imported in a C# file.
- [.NET Core Test Explorer](https://marketplace.visualstudio.com/items?itemName=formulahendry.dotnet-test-explorer) : Provides visual hierarchy of the tests. This requires NUnit and MSTest requires a dotnet sdk version of >= 2.2.104 and running dotnet tooling
- [NuGet Package Manager](https://marketplace.visualstudio.com/items?itemName=jmrog.vscode-nuget-package-manager) : An extension for Visual Studio Code that lets you easily add or remove .NET Core package references to your project's .csproj or .fsproj files.
- [Visual Studio Keymap](https://marketplace.visualstudio.com/items?itemName=ms-vscode.vs-keybindings) : Ports popular Visual Studio keyboard shortcuts to Visual Studio Code.
- [C# XML Documentation Comments](https://marketplace.visualstudio.com/items?itemName=k--kato.docomment) : Generate XML documentation comments for Visual Studio Code.
- [Code Runner](https://marketplace.visualstudio.com/items?itemName=formulahendry.code-runner) : Run a few lines of code in C# or Javascript inside a code file.
- [Code Spell Checker](https://marketplace.visualstudio.com/items?itemName=streetsidesoftware.code-spell-checker) : A basic spell checker that works well with camelCase code.

## C# Coding Standards

Coding conventions and standards to create consistent and readable code

### Naming Conventions

#### NameSpaces

- When naming namespaces Pascal case should be used
- Use client name as root of namespace, project as second level, technology or descriptor as third and/or fourth level.
  ```
  namespace ABC.SoftwareName.Data.Extensions
  ```

#### Classes

- Use a noun or nounprharse in Pascal case
- Derived classes should be compound noun containing the name of the base class.

```
public class OperationsManager : Manager
{
}
```

# Fields

- Fields should be named using Camel casing.
- Field names should be a noun or phrase descriptive enough to describe its use.
- Hungarian notation should be avoided. I.e. Prefix of `m_` or `_` should be replaced with more descriptive names.

```
private Customer customer;
private ICollection<Customer> Customers;
private decimal productPrice;
private DateTime paymentDate;
```

# Naming Events

- Use Pascal casing.
- Use verb to describe the event. I.e. `stateChanged` or `buttonClicked`
- Name event using a verb to describe the action.
- Use `-ing` if possible to name event

# Naming Properties

- Use Pascal casing.
- Name properties with noun or phrase.
- Hungarian notation should be avoided. I.e. Prefix of `m_` or `_` should be replaced with more descriptive names.

```
public String UserName
{
    get; set;
}
public Customer Customer
{
    get; set;
}
```

# Method Names

- Pascal Casing
- Methods should be named with a verb or phrase that describes the action being performed by the method.
- Each method should perfom on action, making naming simple.

```
public void PerformCalculations()
{
}
public Customer GetCustomer()

{
}
```

# Method Parameters

- Use Camel casing
- Name parameters with a descriptive noun or phrase that can be used to determine the meaning/use.
- Avoid Hungarian notations

```
public decimal GetSalesTax(decimal salePrice, decimal taxRate)
{
}
public Customer GetCustomer(string firstName, int idNumber)
```

- Pascal Casing for Class and Method names. Ex: `GetTaxCalculations`
- Camel Casing for variables and method parameters. Ex: `firstName`
- Prefix `I` with Pascal Casing for interface name. Ex: `IDisposable`
- Descriptive classs, method, and variable names. Ex: `Customer`, `GetCustomerFromDb`, `custFirstName`

### Layout Conventions

Layout shoud emphasize the code structure in a way to make it easy to read

- Use a single statement/declaration per line
- Indent statements that continue to the next line
- One and only one line of whitespace between method/property declerations

## Commenting Conventions

- Code should be written in a self commenting manner, and comments should be used sparingly
  - clarifying comments can add to code smell, and often is a sign that the code should be refined.
- Give the comment its own line, do not add to the end of a line of code
- Write comments with proper grammer, and punctuation
- Add one space between the `//` and the comment

gha_language: JavaScript

gha_license_id: MIT


text:
# Prataprajella Hosag. GENUS

#### Status
ACCEPTED

#### According to
The Catalogue of Life, 3rd January 2011

#### Published in
Nova Hedwigia 55(1-2): 224 (1992)

#### Original name
Prataprajella Hosag.

### Remarks
null

repository: mdoering/backbone

repo_name: mdoering/backbone


text:
# Vagrantfiles

Some practical Vagrantfiles

| Directory| Description |
|----------|-------------|
| [generic](generic) | General purpose base image |

repository: troppens/vagrant-mylinux

repo_name: troppens/vagrant-mylinux


text:
# SSL/TLS Encryption

Normally the process of adding SSL/TLS encryption to your app is tedious and complicated. With Nanobox, we've tried to make it as simple as possible.

## Add a New Certificate
To get started, click on the "Network" tab of your application dashboard and go to "SSL/TLS Certificates". Then click "New SSL/TLS Certificate".

![New SSL/TLS Certificate](/assets/shared/ssl-tls-add.png)

In order to generate a certificate, specific information is required. Provide the necessary information and click "Create Certificate".

![Certificate Information](/assets/shared/ssl-tls-required-info.png)

## Create a Bundle
With the information provided, you can now create a certificate "bundle". A bundle consists of a Private Key, a Certificate, and a Certificate Authority (CA) - all the files required to install a certificate on a server.

To create a new bundle, click "New Bundle".

![Create New Bundle](/assets/shared/ssl-tls-new-bundle.png)

There are different bundle types to choose from when creating a new bundle. Descriptions of each and details instructions are provided for each in the [Adding SSL/TLS documentation](https://docs.nanobox.io/domains-networking/ssl-tls/adding/).

- [LetsEncrypt](https://docs.nanobox.io/domains-networking/ssl-tls/adding/#letsencrypt)
- [Self-Signed](https://docs.nanobox.io/domains-networking/ssl-tls/adding/#self-signed)
- [Third-Party New](https://docs.nanobox.io/domains-networking/ssl-tls/adding/#third-party-new)
- [Third-Party Import](https://docs.nanobox.io/domains-networking/ssl-tls/adding/#third-party-import)

## Activate the Bundle
Once your bundle is complete, click the "Activate" button next to your bundle. The bundle will be installed in your app's router and your app will be able to accept HTTPS connections.

![Activate Bundle](/assets/shared/ssl-tls-bundle-activate.png)

## Detecting Request Protocols
Your app's load balancer appends the `X-Forwarded-Proto` header to all incoming requests. This is the HTTP header that should be to detect the protocols of incoming requests in webserver redirect/rewrite logic.

repository: nanobox-io/nanobox-guides

gha_language: Pug

repo_name: nanobox-io/nanobox-guides


text:
# DSCI 554 Survey Design and Experiment Study:

# Hours Spent On Labs

## Contributors

|Name|Github.com User Id|
|--|--|
|Betty Zhou|[bettybhzhou](https://github.com/bettybhzhou)|
|Juno Chen|[huijuechen](https://github.com/huijuechen)|
|Orphelia Ellogne|[ellognea](https://github.com/ellognea)|
|Olivia Lin |[olivia-lin](https://github.com/olivia-lin)|

## Research Question

In an accelerated program, such as the Master of Data Science (MDS), students are often limited on time. As MDS students, we are highly interested in investigating whether attending office hours helped MDS students complete their lab assignments in a shorter amount of time.

Therefore, the main question addressed by our study is:

How does the number of times a Master of Data Science (MDS) student goes to office hours affect the average number of hours they spend working on labs per week?

This survey can be found [here](https://ubc.ca1.qualtrics.com/jfe/form/SV_6JSd6n3qKwaU4yp).

## Important Files

- Milestone 1: [Research Proposal](docs/1_Proposal.md)
- Milestone 2: [EDA](docs/2.2_Survey_Response_EDA.ipynb) and [Stat Analysis](docs/2.1_Survey_Response_Regression.ipynb) on the survey response [data](https://github.ubc.ca/bettybhz/Hours_Spent_On_Labs_Survey_Data)
- Milestone 3: [Final Report](docs/3_Final_Report.md)

## Future Directions
If we could conduct our study further in the future, we would try to increase the number of respondents. It would be more informative if we could include previous MDS cohorts. Also, as we are focusing on the relationship between "attending office hours" and "time spent on labs(assignments)", while our confounding variables are highly academic related, we could extend our surveys to post graduate students in related programs.

For self-evaluated questions, we could utilize some courses or certificate exams that all respondents would have experienced, such as "do you find DSCI 512 to be difficult" rather than "rate your programming skills". It should bring the responses to be on the same scale.


text:
# LDS Timeline #

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

### About ###

LDS Timeline was created for Prof. Sweat's Foundations of the Restoration class at BYU. This app provides information about key events in the early history of the Church of Jesus Christ of Latter Day Saints.

Features:
- Over a dozen events covered
- View events on a map
- View images and read a short description for each event
- Easily access sources for more information

All sources and images are property of their respective creators. Credit was given when possible. This app is not endorsed by the LDS Church in any form.

------------
This application took 18 hours to build from start to finish. Including planning and writing the information presented.

Created by Jacob Davis


text:
### Command Line Options

It's also possible to change the default behaviour of the plugin by using the command line options:

Option | Description
---|---
`--level`|Specifies the level we want to increment. Allowed values for this option are the standard `major`, `minor`, `patch`, and `prerelease`. In addition to these values, a further value is supported: if for any reason you need to totally change the version number, just pass to this option the wanted version number which must be a valid SemVer version number. **This option will have precedence over the one defined into the configuration file**.

repository: Ragnarokkr/grunt-bumpx

repo_name: Ragnarokkr/grunt-bumpx


text:
# TLDR - PHP client for TLDR man pages #

[![Build Status](https://travis-ci.org/garethellis36/tldr-php.svg?branch=master)](https://travis-ci.org/garethellis36/tldr-php)
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/garethellis36/tldr-php/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/garethellis36/tldr-php/?branch=master)
[![Code Coverage](https://scrutinizer-ci.com/g/garethellis36/tldr-php/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/garethellis36/tldr-php/?branch=master)
[![Code Climate](https://codeclimate.com/github/garethellis36/tldr-php/badges/gpa.svg)](https://codeclimate.com/github/garethellis36/tldr-php)

This is a PHP client for the [TLDR man pages project](https://github.com/tldr-pages/tldr).

## Requirements ##

- Internet connectivity (pages will be cached for faster retrieval and offline usage)
- PHP >= 7

## Usage ##

This client is still in development. At this time, to use the client, you should clone this repo and
run the following:

`bin/tldr <command>`

### Options ###

`tldr <command> --os=osx`
Filter for man pages relating to the given operating system. Without this option set, the application will attempt to determine your OS and use that. Valid operating system values are `osx`, `linux` and `sunos`.

`tldr <command> --refresh-cache`
Forces the application to reload the given man page from the remote source and refreshes the local cache.

`tldr --flush-cache`
Delete all man pages from the local cache.

## More ##

[Contributing](CONTRIBUTING.md)
[License](LICENSE.md)


text:
# dda-test
Two simple games to demonstrate the use of the Partially Ordered Set Master algorithm for dynamic difficulty adjustment in games.

The algorithm is first described in:

Missura, O., & Gärtner, T. (2011). Predicting dynamic difficulty. In Advances in Neural Information Processing Systems (pp. 2007-2015).

The implementation is in https://github.com/nrobb/dda-test/blob/gh-pages/posm/Posm.js

Known issues:
1. This version always starts with the middle value in the difficulty settings array. It would be better if the index of the starting setting could be specificed when initializing the posm object.
2. The algorithm works by multiplying each setting's belief by the learning rate. This version always uses a learning rate of 0.75. Eventually, this will produce very small numbers, which might not be efficient or robust.

repository: weipeng/dda-test

branch_name: refs/heads/gh-pages

repo_name: weipeng/dda-test


text:
![Build status](https://github.com/bhigginsuk/discord-rss-fetcher/actions/workflows/validate.yml/badge.svg?branch=master)

**I am no longer maintaining this project. It should continue to work just fine, but if it breaks I won't be interested in fixing it.**
You are welcome to fork and update the code yourself. I'm happy to answer any questions you may have in this regard.

# Discord RSS fetcher
A Discord bot to post the latest articles from an RSS feed into a channel, optionally mentioning a role when posting.

## Features
- Multiple feeds per server
- Commands to configure feeds in different channels
- Optional role to be mentioned when a feed article is posted
- Detects if a user "beats me to it" by posting the URL before the bot can (useful for slow feeds)
- Specific handling for YouTube links, detects both long and short YouTube URLs

## Use cases
- You want to stay up to date with an RSS feed
- You want your Discord server to be notified of events via an RSS feed

## Community instance
A community member, [Oliver4888](https://github.com/oliver4888), is kindly offering public hosts of my Discord bots for other community members. If you are interested in using this community-provided instance, you can find more at https://bots.ol48.uk/.
Please note that I cannot personally verify or take responsibility for the integrity of a community-provided bot instance.

## Getting started
RSS Fetcher needs to be deployed before you can invite it to your Discord server. Please see [my written deployment guide](./deployment.md) or [video tutorial](https://www.youtube.com/watch?v=DjQayKgcjGM) which can guide you through deployment even if you are a beginner.
Once you have deployed RSS Fetcher then return here to follow the Discord setup instructions below.

This button can be used for following the Heroku deployment steps.

[![Deploy to Heroku](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/bhigginsuk/discord-rss-fetcher)

## Discord Setup

Follow these instructions once you have deployed the RSS Fetcher and added it to your Discord server.
Use `@RSS Fetcher help` to view available commands.

**Admin only**
These commands require administrator permission in the Discord server.
- `@RSS Fetcher add-feed <url> <#channel> [@role]` to add a new feed
- `@RSS Fetcher view-feeds` to view configured feeds for this server
- `@RSS Fetcher remove-feed <feed-id>` to remove a feed by it's ID (found using the `view-feeds` command)

Example:
`@RSS Fetcher add-feed http://lorem-rss.herokuapp.com/feed?unit=second&interval=30 #rss-posts @subscribers`

## Permissions
The bot requires certain permissions, which you are prompted for on the invite screen.
Each permission has a reason for being required, explained below.

| Permission           | Reason                                                              |
|----------------------|---------------------------------------------------------------------|
| Read messages        | Detect when you use commands                                        |
| Send messages        | Respond when you use commands; post new RSS links                   |
| Read message history | Check if any new RSS links have been posted during downtime         |
| Embed links          | Responses to 'help' requests use message embeds for nice formatting |

## Troubleshooting

- Test RSS Fetcher's ability to reply by using the version command `@RSS Fetcher version`
- Double check that RSS Fetcher has both *read* and *write* permissions in the channel you're using
- Make sure you're actually mentioning the bot and *not the role with the same name*
- Make sure you have the 'Administrator' permission if you're trying to use an admin command
- Double check that you've given RSS Fetcher all the necessary [permissions](#permissions)
- If you want RSS Fetcher to mention a role when it posts a new feed, make sure this role is mentionable
- Make sure your RSS feed is valid by testing it on an RSS feed validator website
- If you delete a channel and recreate it with the same name, you will need to delete and re-create the feed also

## Built With
- [Node.js](https://nodejs.org/en/) - *Runtime*
- [discord.js](https://github.com/discordjs/discord.js) - *Discord library*
- [disharmony](https://github.com/bhigginsuk/disharmony) - *Bot framework*
- [rss-parser](https://github.com/bobby-brennan/rss-parser) - *RSS parsing library*

## Versioning
[SemVer](http://semver.org/) is used for versioning; view available versions on the [tags page](https://github.com/your/project/tags)

## License
This project is licensed under the MIT License - see the [LICENSE](./LICENSE) file for details

repository: PatMagroin/discord-rss-fetcher

repo_name: PatMagroin/discord-rss-fetcher


text:
---
uid: crmscript_ref_NSSelectionMemberEditValues_SetChangeCompanyBusiness_Bool_p_0
title: NSSelectionMemberEditValues.SetChangeCompanyBusiness(Bool p_0)
intellisense: NSSelectionMemberEditValues.SetChangeCompanyBusiness
keywords: SetChangeCompanyBusiness(Bool)
so.topic: reference
---

# NSSelectionMemberEditValues.SetChangeCompanyBusiness(Bool p_0)

If true, the business of the company will change.

repository: stianol/crmscript

repo_name: stianol/crmscript


text:
# Manage
A lightweight application manager for runtime micro-frontends.

## Requirements:
- Simple interface
- Lifecycle methods
- Lazy loading modules
- Cross-app communication
  - Consider "plugins" prop
- Refetch and mount new versions of apps
  For example, app v1.0 is loaded but then want to dynamically replace it with app v1.1

## Implementation brainstorming:
- Middleware to communicate with subapps
- Most of the work depends on the router
- Internal state machine showing mounted apps

## References:
https://single-spa.js.org/docs/getting-started-overview
- Use multiple frameworks on the same page without page refreshing (React, AngularJS, Angular, Ember, or whatever you're using)
- Deploy your microfrontends independently
- Write code using a new framework, without rewriting your existing app
- Lazy load code for improved initial load time

https://netflixtechblog.com/how-we-build-micro-frontends-with-lattice-22b8635f77ea

repository: mskalandunas/Manage

repo_name: mskalandunas/Manage


text:
---
title: Vim
---

#### Open a file to a specific line

```
vim /path/to/file -c <line number>
```

#### Go to a specific line in vim

```
:<line number>
```

#### Temporarily disable inserting spaces when tab key is pressed

```
:set noexpandtab
```

#### Enable hex editing mode

```
:%!xxd
```

Open a file directly into hex edit mode (**warning:** this will first read the entire file into memory)

```
xxd system.raw.img | vim -
```

#### Turn off auto indent when pasting

[http://stackoverflow.com/a/2514520/399105](http://stackoverflow.com/a/2514520/399105)

```
:set paste
```

Turn auto indent back on

```
:set nopaste
```

repository: bmaupin/wiki

gha_language: CSS

repo_name: bmaupin/wiki


text:
NetlifyCMS Custom Widgets

A collection of custom widgets for netlify-cms

---

⚠ Unstable: Under active development

## What's inside

npm package | description
---|---
@ncwidgets/id | Generate an unique ID for new entries in a folder collection
@ncwidgets/file-relation | Dropdown select widget for a field inside a file collection (the default relation widget only works for folder collections)
@ncwidgets/reorder | Drag & drop to order entries in a folder collection

## How to use

```js
import cms from 'netlify-cms-app'
import { Widget as IdWidget } from '@ncwidgets/id'
import { Widget as ReorderWidget } from '@ncwidgets/reorder'
import { Widget as FileRelationWidget } from '@ncwidgets/file-relation'

cms.registerWidget(IdWidget)
cms.registerWidget(ReorderWidget)
cms.registerWidget(FileRelationWidget)

cms.init()
```

### With Gatsby
[TBH]

### With Hugo
[TBH]

## Contribute

Has an idea for a widget? Please feel free to send over a PR, or open an issue with the `idea` tag.

### Build
This is a monorepo with yarn workspace & lerna.

```bash
# Setup
yarn
yarn bootstrap

# Launch the playground with
# all the custom widgets at localhost:
yarn playground:dev

# Build widgets
yarn build
```

repository: gurkodil/netlify-cms-widgets

repo_name: gurkodil/netlify-cms-widgets


text:
# avro-schema-registry

Confluent Schema Registry implementation to easily serialize and deserialize kafka messages with only one peer depencency.

# Quickstart

```
const registry = require('avro-schema-registry')('https://host.com:8081');

const schema = {type: 'string'};
const message = 'test message';

registry.encodeMessage('topic', schema, message)
  .then((msg) => {
    console.log(msg);   // <Buffer 00 00 00 00 01 18 74 65 73 74 20 6d 65 73 73 61 67 65>

    return registry.decode(msg);
  })
  .then((msg) => {
    console.log(msg);  // test message
  });

registry.encodeById(1, message)
  .then((msg) => {
    console.log(msg);   // <Buffer 00 00 00 00 01 18 74 65 73 74 20 6d 65 73 73 61 67 65>

    return registry.decode(msg);
  })

```

# Install

```
npm install avsc // if not already installed
npm install avro-schema-registry
```

# Doc

The module exports one function only, which expects a `url` parameter, which is a Confluent Schema Registry endpoint and an optional auth object. The function returns an object .

Every method returns a Promise.
Every method uses an internal cache to store already retrieved schemas and if the same id or schema is used again it won't perform another network call. Schemas are cached with their parsing options.

## Authentication with the Schema Registry

You can set username and password in the url object:
```
require('avro-schema-registry')('https://username:password@host.com:8081');
```

You can pass in an optional second parameter for the registry, with the username and password:
```
require('avro-schema-registry')('https://host.com:8081', {username: 'username', password: 'password'});
```

If both the url contains the authencation information and there's an authentication object parameter then the object takes precedence.

## decode
Parameters:
- msg: object to decode
- parseOptions: parsiong options to pass to `avsc.parse`, default: `null`

Decodes an avro encoded buffer into a javascript object.

## decodeMessage
Same as **decode**, only exists for backward compatibility reason.

## encodeKey
Parameters:
- topic: the topic to register the schema, if it doesn't exist already in the registry. The schema will be put under the subject `${topic}-key`
- schema: object representing an avro schema
- msg: message object to be encoded
- parseOptions: parsiong options to pass to `avsc.parse`, default: `null`

Encodes an object into an avro encoded buffer.

## encodeMessage
Parameters:
- topic: the topic to register the schema, if it doesn't exist already in the registry. The schema will be put under the subject `${topic}-value`
- schema: object representing an avro schema
- msg: message object to be encoded
- parseOptions: parsiong options to pass to `avsc.parse`, default: `null`

Encodes a message object into an avro encoded buffer.

## encode
Parameters:
- topic: the topic to register the schema, if it doesn't exist already in the registry. The schema will be put under the subject `${topic}-${schema.namespace}.${schema.name}`
- schema: object representing an avro schema
- msg: message object to be encoded
- parseOptions: parsiong options to pass to `avsc.parse`, default: `null`

Encodes a message object into an avro encoded buffer.

## encodeById
Parameters:
- id: schema id in the registry
- msg: message object to be encoded
- parseOptions: parsiong options to pass to `avsc.parse`, default: `null`

Encodes a message object into an avro encoded buffer by fetching the schema from the registry.

## encodeMessageByTopicName

Try to get already existing schema from the schema registry and encode message with obtained schema. Please note, that the latest schema will be obtained.

This may be useful when topic consumer is on duty of providing the schema for the topic's messages.

Parameters:

- topic: topic name to fetch schema for
- msg: message object to be encoded
- parseOptions: parsiong options to pass to `avsc.parse`, default: `null`

## getSchemaByTopicName

This method tries to get already existing schema from the schema registry. Please note, that the latest schema will be obtained.

Parameters:

- topic: topic name to fetch schema for
- parseOptions: parsiong options to pass to `avsc.parse`, default: `null`

# Peer dependency

The module has no dependency, only one peer dependency: [avsc](https://github.com/mtth/avsc)

repository: lookio/avro-schema-registry

repo_name: lookio/avro-schema-registry


text:
# homebridge-cmdswitch2 [![npm version](https://badge.fury.io/js/homebridge-cmdswitch2.svg)](https://badge.fury.io/js/homebridge-cmdswitch2)
CMD Plugin for [HomeBridge](https://github.com/nfarina/homebridge) (API 2.0)

Older version using API 1.0: [homebridge-cmdswitch](https://github.com/luisiam/homebridge-cmdswitch) (deprecated)

### Switching from homebridge-cmdswitch (API 1.0)
Users switching from homebridge-cmdswitch will need to remove their old config in `config.json` and use the new config. Hence, switch will show up as brand new device. This is due to the fact that API 2.0 only supports platform plugins and homebridge-cmdswitch was implemented as an accessory plugin. This means any configurations, alarms, scenes, etc to which the switch was associated will need to be updated with the new switch device.

### What this plugin does
This plugin allows you to run Command Line Interface (CLI) commands via HomeKit. This means you can run a simple commands such as `ping`, `shutdown`, or `wakeonlan` just by telling Siri to do so. An example usage for this plugin would be to turn on your PS4 or HTPC, check if it’s on, and even shut it down when finished.

### How this plugin works
1. `on_cmd`: This is the command issued when the switch is turned ON.
2. `off_cmd`: This is the command issued when the switch is turned OFF.
3. `state_cmd`: This is the command issued when HomeBridge checks the state of the switch.
  1. If there is no error, HomeBridge is notified that the switch is ON.
  2. If there is an error, HomeBridge is notified that the switch is OFF.

### Things to know about this plugin
This plugin can only run CLI commands the same as you typing them yourself. In order to test if your `on_cmd`, `off_cmd`, or `state_cmd` are valid commands you need to run them from your CLI. Please keep in mind you will want to run these commands from the same user that runs (or owns) the HomeBridge service if different than your root user.

# Installation
1. Install homebridge using `npm install -g homebridge`.
2. Install this plugin using `npm install -g homebridge-cmdswitch2`.
3. Update your configuration file. See configuration sample below.

# Configuration
Edit your `config.json` accordingly. Configuration sample:
 ```
"platforms": [{
    "platform": "cmdSwitch2"
}]
```

### Advanced Configuration (Optional)
This step is not required. HomeBridge with API 2.0 can handle configurations in the HomeKit app.
 ```
"platforms": [{
    "platform": "cmdSwitch2",
    "name": "CMD Switch",
    "synchronous": true,
    "switches": [{
        "name" : "HTPC",
        "on_cmd": "wakeonlan XX:XX:XX:XX:XX:XX",
        "off_cmd": "net rpc shutdown -I XXX.XXX.XXX.XXX -U user%password",
        "state_cmd": "ping -c 2 -W 1 XXX.XXX.XXX.XXX | grep -i '2 received'"
    }, {
        "name" : "Playstation 4",
        "on_cmd": "ps4-waker",
        "off_cmd": "ps4-waker standby",
        "state_cmd": "ps4-waker search | grep -i '200 Ok'",
        "polling": true,
        "interval": 5,
        "timeout": 2000,
        "manufacturer": "Sony Corporation",
        "model": "CUH-1001A",
        "serial": "XXXXXXXXXXX"
    }, {
        "name" : "My Dimmer",
        "on_cmd": "set-light on",
        "off_cmd": "set-light off",
        "state_cmd": "get-light dim | grep -E '\d+'",
        "dim_cmd": "set-light dim $HB_BRIGHTNESS",
        "manufacturer": "Custom dimmer"
    }]
}]
```

| Fields             | Description                                           | Required |
|--------------------|-------------------------------------------------------|----------|
| platform           | Must always be `cmdSwitch2`.                          | Yes      |
| name               | For logging purposes.                                 | No       |
| synchronous        | No parallell execution.                               | No       |
| switches           | Array of switch config (multiple switches supported). | Yes      |
| \|- name\*         | Name of your device.                                  | Yes      |
| \|- on_cmd         | Command to turn on your device.                       | No       |
| \|- off_cmd        | Command to turn off your device.                      | No       |
| \|- state_cmd      | Command to detect an ON state of your device. Should return a number if used as state for dim_cmd        | No       |
| \|- dim_cmd\*\*        | Command to detect an ON state of your device.         | No       |
| \|- polling        | State polling (Default false).                        | No       |
| \|- interval       | Polling interval in `s` (Default 1s).                 | No       |
| \|- timeout\*\*\*    | Commands execution timeout in `s` (Default 1s).       | No       |
| \|- manufacturer   | Manufacturer of your device.                          | No       |
| \|- model          | Model of your device.                                 | No       |
| \|- serial         | Serial number of your device.                         | No       |

\*Changing the switch `name` in `config.json` will create a new switch instead of renaming the existing one in HomeKit. It's strongly recommended that you rename the switch using a HomeKit app only.

\*\*Adding/removing this command will change accessory type form Light Bulb to Switch.

\*\*\*Command execution is assumed 'Successful' if timeout occures.


text:
---
layout: post
title:  "Inflict Pain"
date:   2017-01-01
source: Dark Arts Player's Companion
tags: [bard, cleric, level1, necromancy, hb, fan]
---

**1st-level necromancy (hemomancy)**

**Casting Time**: 1 action

**Range**: Touch

**Components**: V, S

**Duration**: Instantaneous

You attempt to touch a creature, inflicting them with negative energy and racking them with excruciating pain. Make a melee spell attack against the target. On a hit, the target takes 2d6 necrotic damage and becomes incapacitated with pain until the start of your next turn.

repository: Teamdael/spellbook

extension: markdown

repo_name: Teamdael/spellbook


text:
---
url: https://jtway.co/simple-benchmarking-rack-web-server-abe6a6f974f6
canonical_url: https://jtway.co/simple-benchmarking-rack-web-server-abe6a6f974f6
title: Simple Benchmarking Rack Web Server
subtitle: Before each project we check new versions of favorite Ruby web servers and
  choose which is the best.
slug: simple-benchmarking-rack-web-server
description: ""
tags:
- ruby
author: Michael Nikitochkin
username: miry
cover: ./assets/images/1*YOUkdsXQp0Y6vnzTN0d8WA.jpeg
class: post-template
layout: post
---

Before each project we check new versions of favorite Ruby web servers and choose which is the best.

Let’s use, for example, [Geminabox](http://tomlea.co.uk/posts/gem-in-a-box/) application to distribute gems in the local network for our company. [Geminabox](http://tomlea.co.uk/posts/gem-in-a-box/) is a very tiny Rack application and it is easy to configure. You can get the sample [here](https://github.com/miry/geminabox_web_server).

There are a lot of Ruby Web Servers. More details you can get from Digital Ocean article [A Comparison of (Rack) Web Servers for Ruby Web Applications](https://www.digitalocean.com/community/tutorials/a-comparison-of-rack-web-servers-for-ruby-web-applications). I excluded **Passenger** because it requires to compile Nginx module and **Thin** — it could not use all CPU cores.

# Test environment:

* Hardware: MacMini Late 2012 (16 GB 1333 MHz DDR3, 2.5 GHz Intel Core i5)

* OS: OS X 10.9.4 (13E28)

* Ruby versions: ruby-2.2.0-dev, jruby-1.7.9

* Benchmark tool: [Siege](http://linux.die.net/man/1/siege)

* Web servers: [Puma](http://puma.io), [Unicorn](http://unicorn.bogomips.org), [TorqueBox](http://torquebox.org)

# Benchmarking

Before we go we should install all ruby versions and required gems. I use [rbenv](http://rbenv.org) to manage multiple ruby versions in one host.

```
$ rbenv install 2.2.0-dev
$ rbenv shell 2.2.0-dev
$ gem install bundler puma unicorn
$ rbenv install jruby-1.7.9
$ rbenv shell jruby-1.7.9
$ gem install bundler puma torquebox
```

Prepare the application:

```
$ git clone http://github.com/miry/geminabox_web_server
$ cd geminabox_web_server
```

# Unicorn + Ruby

Run Rack application:

```
$ rbenv shell 2.2.0-dev
$ sudo WEB_CONCURRENCY=5 unicorn -c config/unicorn.rb
```

*Siege report for 5 concurrencies:*

```
Transactions:		          50 hits
Availability:		      100.00 %
Elapsed time:		       15.83 secs
Data transferred:	       30.93 MB
Response time:		        0.86 secs
Transaction rate:	        3.16 trans/sec
Throughput:		        1.95 MB/sec
Concurrency:		        2.72
Successful transactions:          50
Failed transactions:	           0
Longest transaction:	        1.20
Shortest transaction:	        0.58
```

*Siege report for 25 concurrencies:*

```
Transactions:		         250 hits
Availability:		      100.00 %
Elapsed time:		       63.15 secs
Data transferred:	      154.66 MB
Response time:		        5.49 secs
Transaction rate:	        3.96 trans/sec
Throughput:		        2.45 MB/sec
Concurrency:		       21.73
Successful transactions:         250
Failed transactions:	           0
Longest transaction:	        6.58
Shortest transaction:	        1.36
```

# Puma + Ruby

# With 5 workers

Run Rack application:

```
$ rbenv shell 2.2.0-dev
$ sudo puma config.ru -t 4:32 -p 80 -w 5
```

CPU was loaded at near 360%.

*Siege report for 5 concurrencies:*

```
Transactions:		          50 hits
Availability:		      100.00 %
Elapsed time:		       15.30 secs
Data transferred:	       30.93 MB
Response time:		        0.81 secs
Transaction rate:	        3.27 trans/sec
Throughput:		        2.02 MB/sec
Concurrency:		        2.65
Successful transactions:          50
Failed transactions:	           0
Longest transaction:	        1.64
Shortest transaction:	        0.46
```

*Siege report for 25 concurrencies:*

```
Transactions:		         250 hits
Availability:		      100.00 %
Elapsed time:		       61.02 secs
Data transferred:	      154.66 MB
Response time:		        4.78 secs
Transaction rate:	        4.10 trans/sec
Throughput:		        2.53 MB/sec
Concurrency:		       19.59
Successful transactions:         250
Failed transactions:	           0
Longest transaction:	       16.57
Shortest transaction:	        0.52
```

# Puma + Ruby

# Without workers

Run Rack application:

```
$ rbenv shell 2.2.0-dev
$ sudo bundle exec puma config.ru -t 4:32 -p 80
```

CPU was loaded at 100% only

*Siege report for 5 concurrencies:*

```
Transactions:		          50 hits
Availability:		      100.00 %
Elapsed time:		       21.18 secs
Data transferred:	       30.93 MB
Response time:		        1.41 secs
Transaction rate:	        2.36 trans/sec
Throughput:		        1.46 MB/sec
Concurrency:		        3.34
Successful transactions:          50
Failed transactions:	           0
Longest transaction:	        2.37
Shortest transaction:	        0.38
```

*Siege report for 25 concurrencies:*

```
Transactions:		         250 hits
Availability:		      100.00 %
Elapsed time:		      111.67 secs
Data transferred:	      154.66 MB
Response time:		       10.55 secs
Transaction rate:	        2.24 trans/sec
Throughput:		        1.38 MB/sec
Concurrency:		       23.62
Successful transactions:         250
Failed transactions:	           0
Longest transaction:	       11.19
Shortest transaction:	        7.34
```

# Puma + JRuby

Run Rack application:

```
$ rbenv shell jruby-1.7.9
$ sudo bundle exec puma config.ru -t 4:32 -p 80
```

For first requests a response time was huge. But after the second experiment, it was decreased. During the experiments the CPU was loaded at near 350%.

*Siege report for 5 concurrencies:*

```
Transactions:		          50 hits
Availability:		      100.00 %
Elapsed time:		       10.61 secs
Data transferred:	       30.93 MB
Response time:		        0.44 secs
Transaction rate:	        4.71 trans/sec
Throughput:		        2.92 MB/sec
Concurrency:		        2.09
Successful transactions:          50
Failed transactions:	           0
Longest transaction:	        0.66
Shortest transaction:	        0.25
```

*Siege report for 25 concurrencies:*

```
Transactions:		         250 hits
Availability:		      100.00 %
Elapsed time:		       41.97 secs
Data transferred:	      154.66 MB
Response time:		        3.46 secs
Transaction rate:	        5.96 trans/sec
Throughput:		        3.68 MB/sec
Concurrency:		       20.61
Successful transactions:         250
Failed transactions:	           0
Longest transaction:	        5.83
Shortest transaction:	        0.35
```

# TorqueBox + JRuby

Run Rack application:

```
$ rbenv shell jruby-1.7.9
$ torquebox deploy
$ torquebox run
```

*Siege report for 5 concurrencies:*

```
Transactions:		          50 hits
Availability:		      100.00 %
Elapsed time:		       15.18 secs
Data transferred:	       30.93 MB
Response time:		        0.72 secs
Transaction rate:	        3.29 trans/sec
Throughput:		        2.04 MB/sec
Concurrency:		        2.37
Successful transactions:          50
Failed transactions:	           0
Longest transaction:	        1.07
Shortest transaction:	        0.39
```

*Siege report for 25 concurrencies:*

```
Transactions:		         250 hits
Availability:		      100.00 %
Elapsed time:		       63.80 secs
Data transferred:	      154.66 MB
Response time:		        5.76 secs
Transaction rate:	        3.92 trans/sec
Throughput:		        2.42 MB/sec
Concurrency:		       22.59
Successful transactions:         250
Failed transactions:	           0
Longest transaction:	        7.48
Shortest transaction:	        2.52
```

# Conclusion

After current investigation, I see that [Puma](http://puma.io) is cross platform and fast web server. So if you have not decided what ruby to choose, [Puma](http://puma.io) will be the best solution. More about benchmarking and web servers:

* [The Ruby Web Benchmark Report](http://www.madebymarket.com/blog/dev/ruby-web-benchmark-report.html)

* [A Simple Webserver Comparison](https://gist.github.com/cespare/3793565)

* [Benchmarking TorqueBox](http://torquebox.org/news/2011/02/23/benchmarking-torquebox/)

* [High Performance Ruby Part 3: non-blocking IO and web application scalability](http://blog.gregweber.info/posts/2011-06-16-high-performance-rb-part3)

repository: jetthoughts/blog

gha_language: HTML

repo_name: jetthoughts/blog


text:
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Unreleased

For a full diff see [`0.3.0...master`](https://github.com/localheinz/composer-normalize-action/compare/0.3.0...master).

## [`0.3.0`](https://github.com/localheinz/composer-normalize-action/releases/tag/0.3.0)

For a full diff see [`0.2.5...0.3.0`](https://github.com/localheinz/composer-normalize-action/compare/0.2.5...0.3.0).

### Changed

* Updated `localheinz/composer-normalize` ([#6](https://github.com/localheinz/composer-normalize-action/pull/6)), by [@localheinz](https://github.com/localheinz)

## [`0.2.5`](https://github.com/localheinz/composer-normalize-action/releases/tag/0.2.5)

For a full diff see [`0.2.3...0.2.4`](https://github.com/localheinz/composer-normalize-action/compare/0.2.4...0.2.5).

### Fixed

* Started copying global `.composer` directory from Docker image into GitHub home directory in `entrypoint.sh` ([#18](https://github.com/localheinz/composer-normalize-action/pull/18)), by [@localheinz](https://github.com/localheinz)

## [`0.2.4`](https://github.com/localheinz/composer-normalize-action/releases/tag/0.2.4)

For a full diff see [`0.2.3...0.2.4`](https://github.com/localheinz/composer-normalize-action/compare/0.2.3...0.2.4).

### Fixed

* Switched to installing `localheinz/composer-normalize` when building the Docker image ([#10](https://github.com/localheinz/composer-normalize-action/pull/10)), by [@localheinz](https://github.com/localheinz)

## [`0.2.3`](https://github.com/localheinz/composer-normalize-action/releases/tag/0.2.3)

For a full diff see [`0.2.2...0.2.3`](https://github.com/localheinz/composer-normalize-action/compare/0.2.2...0.2.3).

### Fixed

* Switched back to deploying via Travis ([#9](https://github.com/localheinz/composer-normalize-action/pull/9)), by [@localheinz](https://github.com/localheinz)

## [`0.2.1`](https://github.com/localheinz/composer-normalize-action/releases/tag/0.2.1)

For a full diff see [`0.2.0...0.2.1`](https://github.com/localheinz/composer-normalize-action/compare/0.2.0...0.2.1).

### Fixed

* Switched to using auto-builds on Docker hub instead of deploying from Travis ([#7](https://github.com/localheinz/composer-normalize-action/pull/7)), by [@localheinz](https://github.com/localheinz)

## [`0.2.0`](https://github.com/localheinz/composer-normalize-action/releases/tag/0.2.0)

For a full diff see [`0.1.0...0.2.0`](https://github.com/localheinz/composer-normalize-action/compare/0.1.0...0.2.0).

### Fixed

* Switched to using the `root` user in `Dockerfile` to allow access to the GitHub workspace ([#6](https://github.com/localheinz/composer-normalize-action/pull/6)), by [@localheinz](https://github.com/localheinz)

## [`0.1.0`](https://github.com/localheinz/composer-normalize-action/releases/tag/0.1.0)

For a full diff see [`afa2393...0.1.0`](https://github.com/localheinz/composer-normalize-action/compare/afa2393...0.1.0).

repository: begrafx/composer-normalize-action

repo_name: begrafx/composer-normalize-action


text:
Pattern: Malformed end of line

Issue: -

## Description

This rule checks for Windows-style line endings in the source code.

## Default configuration

Attribute | Value
--- | ---
EnforcedStyle | native
SupportedStyles | native, lf, crlf

## Further Reading

* [RuboCop - Layout/EndOfLine](https://docs.rubocop.org/rubocop/cops_layout.html#layoutendofline)
* [https://github.com/bbatsov/ruby-style-guide#crlf](https://github.com/bbatsov/ruby-style-guide#crlf)

repository: Adroiti/docs-for-code-review-tools

repo_name: Adroiti/docs-for-code-review-tools


text:
# MDT_Final_Project

This is the final project for Managing Disruptive Technologies.

In order to execute the project the following needs to be done-
1. Download the entire package to your local desktop
2. Open the folders MarkerImages and QRCodes
3. Take a printout of the images and QRCodes
4. Open the individual apps via the android studio and install the same
5. Trigger the app called Pop Shop
6. Point to a QR Code and scan it
7. On scanning the app will open a camera window, at this point focus your camera on the markers. The augmented reality images will be displayed on those markers

PLEASE NOTE: Due to gradle versioning issues it is possible that android studio may not be able to compile the project. The individual apps need to be imported in Android Studio using ADT. Please avoid Gradle for this project.

Citations-

The above work has been taken/build upon works done from the following websites-
1. QR Code Scanner - https://examples.javacodegeeks.com/android/android-barcode-and-qr-scanner-example/
2. Creating and deploying Unity assets in Android - https://www.youtube.com/watch?v=HnjbTytHH6U&t=757s

Technologies Used-
1. Android SDK - https://developer.android.com/studio/index.html
2. Vufori - https://vuforia.com/
3. Unity - https://unity3d.com/


text:
# ExperimentalStlLoader
A simple class to load STL for JavaFX. There is no opensource STL loader for JavaFX simple to include in your projects. You could use the [interactivemesh](http://www.interactivemesh.org/) jars (they work great) but they are closed source.

This is my approach to cover that gap.

To test the STLLoader I used several Thingiverse models:
* [Fantasy castle](https://www.thingiverse.com/thing:862724): a 116 MB beast to make it suffer (it loads in an average of 17.25 seconds with my i5-5200U)
* [Slack Lack - The Lack Enclosure](https://www.thingiverse.com/thing:3485510)
* [Battery_Dispenser - 24x AA - Stackable](https://www.thingiverse.com/thing:1894851)
* [Modular castle](https://www.thingiverse.com/thing:1930665)
* And some more (my tests included 95 different thingiverse models)

repository: alejandrocarcamo/STLLoader

repo_name: alejandrocarcamo/STLLoader


text:
[![Build Status](https://travis-ci.org/trolldbois/python-clang.svg?branch=master)](https://travis-ci.org/trolldbois/python-clang)
[![pypi](https://img.shields.io/pypi/dm/clang.svg)](https://pypi.python.org/pypi/clang)
[![Coverage Status](https://coveralls.io/repos/trolldbois/python-clang/badge.svg)](https://coveralls.io/r/trolldbois/python-clang)

OBSOLETE. LLVM-CLANG NOW PUBLISHES PYTHON PACKAGE.
JUST ADD THE OFFICIAL llvm-3.7 repo in your apt.

//===----------------------------------------------------------------------===//
// Clang Python Bindings
//===----------------------------------------------------------------------===//

This is the python bindings subdir of llvm clang repository.
https://github.com/llvm-mirror/clang/tree/master/bindings/python

This is a non-official fork. Mainly for Pypi packaging purposes.
The pypi package is not official either.

Test:
-----
You may need to alter LD_LIBRARY_PATH so that the Clang library can be
found. The unit tests are designed to be run with 'nosetests'. For example:
--
$ env PYTHONPATH=$(echo ~/llvm/tools/clang/bindings/python/) \
      LD_LIBRARY_PATH=$(llvm-config --libdir) \
  nosetests -v
tests.cindex.test_index.test_create ... ok
...

license: NCSA

gha_language: Python

gha_license_id: NOASSERTION


text:
# TRANSPORT: Nexon to Build Vacuum Train Railway

Posted by: new_nexon

Nations involved: Nexon

In an effort to reduce travelling speed within the Empire, Nexon has announced that it will be building an experimental VacTrain system in the mainland. The railway will initially run from Shanghai to Nexon City, and then later on expanded to Hangzhou and Nanjing. The VacTrains will travel at a speed of up to 1,200 km/h, allowing people from Shanghai to reach the imperial capital in tens of minutes. If the experiment proves to be successful, VacTrains will be replacing hyperloop trains as the primary form of inter-city rail transportation.


text:
# Linux software vulnerabilities {#concept_akr_grq_32b .concept}

This topic describes how to view and manage Linux software vulnerabilities in Security Center.

**Note:** Security Center **Basic** only supports vulnerability detection. To fix vulnerabilities, you need to activate **Security Center Enterprise**. For more information about the features provided by Security Center Basic and Enterprise, see [Features](../../../../reseller.en-US/Product Introduction/Features.md#).

## Procedure {#section_lst_wsc_ygb .section}

1.  Choose **Precaution** \> **Vulnerabilities** \> **Linux Software Vulnerabilities**.

    On the **Linux Software Vulnerabilities** page, you can view security bulletins about the Linux vulnerabilities detected by Security Center. Each security bulletin has a title that starts with USN, RHSA, or CVE.

    You can click a security bulletin to view details of the corresponding vulnerabilities.

    ![](http://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/assets/img/15298/156454145439856_en-US.png)

2.  On the Linux Software Vulnerabilities page, you can perform the following operations: view security bulletins about the vulnerabilities detected by Security Center, view vulnerability details, fix vulnerabilities, verify whether a vulnerability has been fixed, search vulnerabilities by severity level and status, add vulnerabilities to the whitelist, and ignore vulnerabilities.
    -   **View vulnerability details**

        Click a vulnerability name to view details. On the vulnerability details page, you can view a description of this vulnerability, its severity level, assets affected by this vulnerability, and the vulnerability status. You can also choose to fix this vulnerability, verify whether it has been fixed, or ignore it.

        ![](http://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/assets/img/15298/156454145539857_en-US.png)

        The vulnerability details page also displays information about **correlated vulnerabilities** and assets that are affected by these vulnerabilities. You can easily analyze and handle these vulnerabilities on this page.

        ![](http://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/assets/img/15298/156454145539858_en-US.png)

        On the vulnerability details page, click an **affected asset** to view all vulnerabilities that are correlated with the asset. You can also choose **Assets** \> **Vulnerabilities** to open this page. ![](http://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/assets/img/15298/156454145539876_en-US.png)

    -   **Vulnerability priorities \(urgency levels\)**

        Vulnerability priorities are color coded for easy identification.

        -   Red indicates **high** priority.
        -   Orange indicates **medium** priority.
        -   Gray indicates **low** priority.
        ![](http://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/assets/img/118684/156454145539814_en-US.png)

        **Note:** We recommend that you immediately fix high priority vulnerabilities.

    -   **Alibaba Cloud vulnerability library**

        On the vulnerability details page, select a vulnerability and click its **Vulnerability Number** to go to the Alibaba Cloud vulnerability library.

        ![](http://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/assets/img/15298/156454145639873_en-US.png)

        On the Alibaba Cloud vulnerability library page, you can view more details about this vulnerability, including the detailed description, severity level, time of discovery, and mitigations.

        ![](http://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/assets/img/15298/156454145639874_en-US.png)

    -   **Vulnerability severity levels \(emergency degrees\)**

        Severity levels are color coded for easy identification. Red indicates **important \(high severity\)**. Orange indicates **moderate \(medium severity\)**. Gray indicates **low \(low severity\)**.

    -   **Verify vulnerabilities**

        On the vulnerability details page, you can select one or multiple vulnerabilities and click **Verify** to verify whether the selected vulnerabilities have been fixed.

        After you click **Verify**, the vulnerability **status** is changed to **Verifying**. It takes several seconds to verify vulnerabilities.

        ![](http://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/assets/img/15298/156454145639859_en-US.png)

    -   **Fix vulnerabilities**

        On the vulnerability details page, you can select one or multiple vulnerabilities and click **Fix** to fix the selected vulnerabilities.

    -   **Search vulnerabilities**

        On the Linux Software Vulnerabilities page, you can search vulnerabilities by vulnerability name, severity level \(high, medium, and low\), or vulnerability status \(handled, unhandled\).

        ![](http://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/assets/img/15298/156454145639860_en-US.png)

        **Note:** You can also fuzzy search vulnerabilities by name.

    -   **Add vulnerabilities to the whitelist**

        On the Linux Software Vulnerabilities page, you can select one or multiple vulnerabilities and click **Add to Whitelist** to add the selected vulnerabilities to the whitelist. After a vulnerability is added to the whitelist, Security Center does not send alarms when this vulnerability is detected.

        ![](http://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/assets/img/15298/156454145739861_en-US.png)

        Whitelisted vulnerabilities are removed from the vulnerability list on the Linux Software Vulnerabilities page. You can click [Settings](reseller.en-US/User Guide/Vulnerabilities/Vulnerability management settings and whitelist configuration.md#) in the upper-right corner and view these vulnerabilities in the **Whitelisted Vulnerabilities** table.

        If you want Security Center to detect and send alarms on whitelisted vulnerabilities again, select a vulnerability and click **Remove** to remove this vulnerability from the whitelist on the Settings page.

        ![](http://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/assets/img/118684/156454145739827_en-US.png)

    -   **Ignore vulnerabilities**

        On the Linux Software Vulnerabilities page, you can select one or more vulnerabilities and click **Ignore** to ignore the selected vulnerabilities.

        **Note:** After you **ignore** a vulnerability, the vulnerability status is changed to **Handled**. If you want Security Center to notify you of this vulnerability again, select this vulnerability in the **Handled** vulnerability list and click **Unignore**.

    -   **Export vulnerabilities**

        On the Linux Software Vulnerabilities page, you can click the **Export** icon to export records of all vulnerabilities to your local computer. The exported file is in Excel format.

        **Note:** It may take a few minutes to export the records of vulnerabilities depending on the data size.

    -   On the vulnerability details page, you can click ![](http://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/assets/img/118684/156454145739821_en-US.png) to save multiple vulnerabilities to a group. This allows you to track vulnerabilities by group.

        ![](http://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/assets/img/15298/156454145739862_en-US.png)

## Vulnerability details {#section_dhc_1vq_32b .section}

|Item|Description|
|----|-----------|
|Vulnerability number|The Common Vulnerabilities and Exposures \(CVE\) ID of the vulnerability. The Common Vulnerabilities and Exposures \(CVE\) system provides a reference-method for publicly known information-security vulnerabilities and exposures. You can use CVE IDs, such as CVE-2018-1123, to quickly search for information about vulnerability fixes in any CVE-compatible databases to resolve security issues.|
|Severity score \(CVSS score\)|The CVSS score follows the widely accepted industry standard, Common Vulnerability Scoring System, and is calculated based on multiple attributes of the vulnerability. This score is used to quantify the severity of vulnerabilities. In the CVSS v3.0 rating system, the severity level indicated by each score is as follows:

-   0.0: None.
-   0.1-3.9: Low
    -   Vulnerabilities that can cause denial of service.
    -   Vulnerabilities that have minor impacts.
-   4.0-6.9: Medium
    -   Vulnerabilities that can impact users during system and user interactions.
    -   Vulnerabilities that can be exploited to perform unauthorized activities.
    -   Vulnerabilities that can be exploited after attackers change local configurations or obtain important information.
-   7.0-8.9: High
    -   Vulnerabilities that can be exploited to indirectly obtain user permissions to your server and application systems.
    -   Vulnerabilities that can be exploited to read, download, write, or delete arbitrary files.
    -   Vulnerabilities that can cause sensitive data leaks.
    -   Vulnerabilities that can cause business disruption or remote denial of service.
-   9.0-10.0: Critical
    -   Vulnerabilities that can be exploited to directly obtain permissions to the operating system of your server.
    -   Vulnerabilities that can be exploited to directly obtain sensitive data and cause data leaks.
    -   Vulnerabilities that can cause unauthorized access to sensitive information.
    -   Vulnerabilities that can cause large-scale impacts.

 |
|Vulnerability name|The name of the vulnerability, which typically starts with CVE. For example, CVE-2018-1123 on Ubuntu 14.04 LTS \(trustly\).|
|Affected assets|The server assets that are exposed to this vulnerability, including the servers' public and internal IP addresses.|
|Priority \(Urgency level\)|The priority of the vulnerability, including -   **High**:

We recommend that you fix high priority vulnerabilities as soon as possible.

-   **Medium**:

You can fix medium priority vulnerabilities based on your business needs.

-   **Low**:

You may fix low priority vulnerabilities based on your needs.

 For more information about fixing vulnerabilities, see [Vulnerability fix prioritization](reseller.en-US/User Guide/Vulnerabilities/Vulnerability fix prioritization.md#).

 |
|Details|You can select a vulnerability and click **Details** under the Actions column to view details of this vulnerability. -   **Commands**: The commands you can use to fix this vulnerability.
-   **Impact description**:
    -   **Software**: Version information about the software in the current server.
    -   **Cause**: The reason why the software is exposed to this vulnerability. Typically, the reason is that the current version is outdated.
    -   **Path**: The path of the software on the server.
-   **Caution**: Important notes, prevention tips, and links to reference documents about this vulnerability.

 |

repository: hkglue/sas

path: /intl.en-US/User Guide/Vulnerabilities/Linux software vulnerabilities.md

filename: Linux software vulnerabilities.md

repo_name: hkglue/sas


text:
# mobx-cart
Simple shopping cart example app using MobX

# Usage
Open in your favorite editor (like Visual Studio Code) and start development server (like Live server)

Inspired by https://github.com/kherox/shoppingcart

repository: josipklaric/mobx-cart

repo_name: josipklaric/mobx-cart


text:
# vue-cli-plugin-electron-builder-notarize

> Notarize Electron applications using vue-cli-plugin-electron-builder

## Install

```
# npm
npm i @oshell/vue-cli-plugin-electron-builder-notarize --save-dev

# yarn
yarn add @oshell/vue-cli-plugin-electron-builder-notarize --dev
```

## Usage

In your electron-builder config:

```json
{
	"afterSign": "@oshell/vue-cli-plugin-electron-builder-notarize",
	"mac": {
		"hardenedRuntime": true,
		"entitlements"<EMAIL_ADDRESS>	}
}
```

You can replace the entitlements file with your own, as long as those properties are included as well.

You will also need to authenticate yourself, either with your Apple ID or using an API key. This is done by setting the corresponding environment variables.

### Apple ID

- `APPLE_ID`: The username of your Apple developer account.
- `APPLE_ID_PASSWORD`: An app-specific password. You can create one at [appleid.apple.com](https://appleid.apple.com).

Make sure you generate an application password if you have 2FA enabled. The tool can't handle 2FA and you will end up with an error while trying to upload.
Go to https://appleid.apple.com/ and generate an app specific password.

### API Key

- `API_KEY_ID`: The ID of your App Store Connect API key, which can be generated [here](https://appstoreconnect.apple.com/access/api).
- `API_KEY_ISSUER_ID`: The issuer ID of your API key, which can be looked up on the same site.

You will also need the API key `.p8` file at the correct location on your file system. See [`electron-notarize`](https://github.com/electron/electron-notarize)'s docs for details on this setup.

### Multiple Teams

If your developer account is a member of multiple teams or organizations, you might see an error. In this case, you need to provide your [Team Short Name](https://github.com/electron/electron-notarize#notes-on-your-team-short-name) as an environment variable:

```sh
export TEAM_SHORT_NAME=XXXXXXXXX
```

## Credits

This package is a fork of [electron-builder-notarize](https://github.com/oshell/electron-builder-notarize)

## License

MIT


text:
# Non Player Characters

::: warning WIP ⚠

This guide is still a work in progress!

:::

## What is an NPC?

Non Player Characters (NPCs) are entities that represent other characters besides the player that live in The Cloud. These characters have their own avatars and names to give them unique identities. The primary way that players interact with NPCs is via conversations.

![NPC Cedric standing in the Fog Owl cockpit](./images/npc_cedric_fog_owl.png)

## What is a conversation?

When a player uses their interaction button on an NPC a conversation screen will launch. It looks like the screen below, and has a few different parts. An entire conversation is composed of one or more of these screens in a row.

![NPC Cedric first conversation screen](./images/npc_cedric_conversation_screen.png)

### Portrait

This is a close up picture of the NPC that is participating in the conversation. This image can be adjusted throughout the conversation to change the character's emotions.

### Statement

The text that the NPC is speaking to the player. This text uses HTML so it can be styled with highlights, italics, or other styles. If a character has voice over files, they'll be narrated to the player alongside this text.

### Display Name

This is the name of the NPC your player is conversing with. This is not tied to a specific conversation file, so it can change when a conversation is launched if needed.

### Reponses

This is a list of options the player receives for how they'd like to respond to the NPC they're talking to. When the player chooses a response, a new conversation screen displays and the conversation continues. Responses can be chosen by clicking or pressing the corresponding number.

### Response

Every individual response is best constructed as a short line of text from the perspective of the player speaking.

### End Conversation Response

At the end of every conversation screen's responses, an `<end conversation>` response option is appended. If this option is chosen then the conversation will be terminated.

## Creating an NPC and conversation

There are two main aspects to creating an NPC that a player interacts with in TwilioQuest, the object itself and its conversation file(s).

### Creating the NPC object

An NPC object is a [built-in TwilioQuest object](/api/objects.html#non-player-characters-npcs) with a special property that corresponds to a conversation name.

An NPC object can be placed into a level of TwilioQuest like any other game object. Check out the [guide on map editing](/guide/maps.html) to learn more.

### Create a conversation file

The conversation file contains all of the information needed to describe the sequences of conversation screens a player will navigate through while talking to an NPC.

The name of this file base name is important. Conventionally, we title these after the name of the NPC that will speak the file. If an NPC has more than one conversation file, we'd called them something like `cedric_welcome` and `cedric_congratulations`.

### Conversation HTML

TwilioQuest conversations are created using [Conversation HTML](/api/conversations.html#conversation-html). Conversation HTML is made of a variety of tags that describe a conversation screen. If you look at the list of [conversation tags](/api/conversations.html#conversation-tags) in the API documentation you'll see they correspond to the sections of [the conversation screen above](/guide/npcs.html#what-is-a-conversation).

### Playing a conversation

There are a couple different ways to launch into a conversation.

#### Link a conversation file in Tiled

Use the `conversation` property of an [NPC object](/api/objects.html#non-player-characters-npcs) in Tiled and set it to the basename of the conversation file you want to play when a player interacts with that NPC.

#### Use the world API to dynamically converse

You can dynamically play conversations using the [startConversation](/api/events.html#startconversation) function on the world API inside of a custom object or events.js file.

## Voice Overs

Voice over files are pulled from the `vo` directory inside of a level's `conversations` directory.

Each statement in a conversation file should have it's own voice over audio file. When a statement is "spoken" by an NPC conversation partner, TwilioQuest will look up the appropriate audio file.

TwilioQuest uses the conversation file name and statement id to look up voice over audio files. The basename of the file and the id of the statement are concatenated with an underscore.

For example:

`levels/cool_level/conversations/cool_npc.pug`

```pug
conversation
  statement#cool_speech
    responses

  statements
    statement#cool_speech
      text.
        I have a cool thing to say!
```

For the statement `id`'d as `cool_speech` given by the `cool_npc` conversation we would find the voice over audio file at the following file path:

`levels/cool_level/conversation/vo/cool_npc_cool_speech.mp3`

repository: JoelRSimpson/extension-docs

repo_name: JoelRSimpson/extension-docs


text:
# WebExtension `browser` API Polyfill

This library allows extensions that use the Promise-based WebExtension/BrowserExt API being standardized by the
[W3 Browser Extensions][w3-browserext] group to run on Google Chrome with minimal or no changes.

[![CircleCI](https://circleci.com/gh/mozilla/webextension-polyfill.svg?style=svg)](https://circleci.com/gh/mozilla/webextension-polyfill)
[![codecov](https://codecov.io/gh/mozilla/webextension-polyfill/branch/master/graph/badge.svg)](https://codecov.io/gh/mozilla/webextension-polyfill)
[![devDependency Status](https://david-dm.org/mozilla/webextension-polyfill/dev-status.svg)](https://david-dm.org/mozilla/webextension-polyfill#info=devDependencies)
[![npm version](https://badge.fury.io/js/webextension-polyfill.svg)](https://badge.fury.io/js/webextension-polyfill)

> This library doesn't (and it is not going to) polyfill API methods or options that are missing on Chrome but natively provided
> on Firefox, and so the extension has to do its own "runtime feature detection" in those cases (and then eventually polyfill the
> missing feature on its own or enable/disable some of the features accordingly).

[w3-browserext]: https://www.w3.org/community/browserext/

Table of contents
=================

* [Supported Browsers](#supported-browsers)
* [Installation](#installation)
* [Basic Setup](#basic-setup)
  * [Basic Setup with ES6 module loader](#basic-setup-with-es6-module-loader)
  * [Basic Setup with module bundlers](#basic-setup-with-module-bundlers)
  * [Usage with webpack without bundling](#usage-with-webpack-without-bundling)
* [Using the Promise-based APIs](#using-the-promise-based-apis)
* [Examples](#examples)
* [Usage with TypeScript](#usage-with-typescript)
* [Known Limitations and Incompatibilities](#known-limitations-and-incompatibilities)
* [Contributing to this project](#contributing-to-this-project)

Supported Browsers
==================

| Browser                   | Support Level                                                                                |
| ------------------------- | -------------------------------------------------------------------------------------------------- |
| Chrome                    | *Officially Supported* (with automated tests)                                                        |
| Firefox                   | *Officially Supported as a NO-OP* (with automated tests for comparison with the behaviors on Chrome) |
| Opera / Edge (>=79.0.309) | *Unofficially Supported* as a Chrome-compatible target (but not explicitly tested in automation)     |

The polyfill is being tested explicitly (with automated tests that run on every pull request) on **officially supported**
browsers (that are currently the last stable versions of Chrome and Firefox).

On Firefox, this library is actually acting as a NO-OP: it detects that the `browser` API object is already defined
and it does not create any custom wrappers.
Firefox is still included in the automated tests, to ensure that no wrappers are being created when running on Firefox,
and for comparison with the behaviors implemented by the library on Chrome.

## Installation

A new version of the library is built from this repository and released as an npm package.

The npm package is named after this repo: [webextension-polyfill](https://www.npmjs.com/package/webextension-polyfill).

For the extension that already include a package.json file, the last released version of this library can be quickly installed using:

```
npm install --save-dev webextension-polyfill
```

Inside the `dist/` directory of the npm package, there are both the minified and non-minified builds (and their related source map files):

- node_modules/webextension-polyfill/dist/browser-polyfill.js
- node_modules/webextension-polyfill/dist/browser-polyfill.min.js

For extensions that do not include a package.json file and/or prefer to download and add the library directly into their own code repository, all the versions released on npm are also available for direct download from unpkg.com:

- https://unpkg.com/webextension-polyfill/dist/

and linked to the Github releases:

- https://github.com/mozilla/webextension-polyfill/releases

## Basic Setup

In order to use the polyfill, it must be loaded into any context where `browser` APIs are accessed. The most common cases
are background and content scripts, which can be specified in `manifest.json` (make sure to include the `browser-polyfill.js` script before any other scripts that use it):

```javascript
{
  // ...

  "background": {
    "scripts": [
      "browser-polyfill.js",
      "background.js"
    ]
  },

  "content_scripts": [{
    // ...
    "js": [
      "browser-polyfill.js",
      "content.js"
    ]
  }]
}
```

For HTML documents, such as `browserAction` popups, or tab pages, it must be
included more explicitly:

```html
<!DOCTYPE html>
<html>
  <head>
    <script type="application/javascript" src="browser-polyfill.js"></script>
    <script type="application/javascript" src="popup.js"></script>
  </head>
  <!-- ... -->
</html>
```

And for dynamically-injected content scripts loaded by `tabs.executeScript`,
it must be injected by a separate `executeScript` call, unless it has
already been loaded via a `content_scripts` declaration in
`manifest.json`:

```javascript
browser.tabs.executeScript({file: "browser-polyfill.js"});
browser.tabs.executeScript({file: "content.js"}).then(result => {
  // ...
});
```

### Basic Setup with ES6 module loader

The polyfill can also be loaded using the native ES6 module loader available in
the recent browsers versions.

Be aware that the polyfill module does not export the `browser` API object,
but defines the `browser` object in the global namespace (i.e. `window`).

```html
<!DOCTYPE html>
<html>
  <head>
    <script type="module" src="browser-polyfill.js"></script>
    <script type="module" src="background.js"></script>
  </head>
  <!-- ... -->
</html>
```

```javascript
// In background.js (loaded after browser-polyfill.js) the `browser`
// API object is already defined and provides the promise-based APIs.
browser.runtime.onMessage.addListener(...);
```

### Basic Setup with module bundlers

This library is built as a **UMD module** (Universal Module Definition), and so it can also be used with module bundlers (and explicitly tested on both **webpack** and **browserify**) or AMD module loaders.

**src/background.js**:
```javascript
var browser = require("webextension-polyfill");

browser.runtime.onMessage.addListener(async (msg, sender) => {
  console.log("BG page received message", msg, "from", sender);
  console.log("Stored data", await browser.storage.local.get());
});

browser.browserAction.onClicked.addListener(() => {
  browser.tabs.executeScript({file: "content.js"});
});
```

**src/content.js**:
```javascript
var browser = require("webextension-polyfill");

browser.storage.local.set({
  [window.location.hostname]: document.title,
}).then(() => {
  browser.runtime.sendMessage(`Saved document title for ${window.location.hostname}`);
});
```

By using `require("webextension-polyfill")`, the module bundler will use the non-minified version of this library, and the extension is supposed to minify the entire generated bundles as part of its own build steps.

If the extension doesn't minify its own sources, it is still possible to explicitly ask the module bundler to use the minified version of this library, e.g.:

```javascript
var browser = require("webextension-polyfill/dist/browser-polyfill.min");

...
```

### Usage with webpack without bundling

The previous section explains how to bundle `webextension-polyfill` in each script. An alternative method is to include a single copy of the library in your extension, and load the library as shown in [Basic Setup](#basic-setup). You will need to install [copy-webpack-plugin](https://www.npmjs.com/package/copy-webpack-plugin):

```sh
npm install --save-dev copy-webpack-plugin
```

**In `webpack.config.js`,** import the plugin and configure it this way. It will copy the minified file into your _output_ folder, wherever your other webpack files are generated.

```js
const CopyWebpackPlugin = require('copy-webpack-plugin');

module.exports = {
  /* Your regular webpack config, probably including something like this:
  output: {
    path: path.join(__dirname, 'distribution'),
    filename: '[name].js'
  },
  */
  plugins: [
    new CopyWebpackPlugin({
      patterns: [{
        from: 'node_modules/webextension-polyfill/dist/browser-polyfill.js',
      }],
    })
  ]
}
```

And then include the file in each context, using the `manifest.json` just like in [Basic Setup](#basic-setup).

## Using the Promise-based APIs

The Promise-based APIs in the `browser` namespace work, for the most part,
very similarly to the callback-based APIs in Chrome's `chrome` namespace.
The major differences are:

* Rather than receiving a callback argument, every async function returns a
  `Promise` object, which resolves or rejects when the operation completes.

* Rather than checking the `chrome.runtime.lastError` property from every
  callback, code which needs to explicitly deal with errors registers a
  separate Promise rejection handler.

* Rather than receiving a `sendResponse` callback to send a response,
  `onMessage` listeners simply return a Promise whose resolution value is
  used as a reply.

* Rather than nesting callbacks when a sequence of operations depend on each
  other, Promise chaining is generally used instead.

* The resulting Promises can be also used with `async` and `await`, rather
  than dealt with directly.

## Examples

The following code will retrieve a list of URLs patterns from the `storage`
API, retrieve a list of tabs which match any of them, reload each of those
tabs, and notify the user that is has been done:

```javascript
browser.storage.local.get("urls").then(({urls}) => {
  return browser.tabs.query({url: urls});
}).then(tabs => {
  return Promise.all(
    Array.from(tabs, tab => browser.tabs.reload(tab.id))
  );
}).then(() => {
  return browser.notifications.create({
    type: "basic",
    iconUrl: "icon.png",
    title: "Tabs reloaded",
    message: "Your tabs have been reloaded",
  });
}).catch(error => {
  console.error(`An error occurred while reloading tabs: ${error.message}`);
});
```

Or, using an async function:

```javascript
async function reloadTabs() {
  try {
    let {urls} = await browser.storage.local.get("urls");

    let tabs = await browser.tabs.query({url: urls});

    await Promise.all(
      Array.from(tabs, tab => browser.tabs.reload(tab.id))
    );

    await browser.notifications.create({
      type: "basic",
      iconUrl: "icon.png",
      title: "Tabs reloaded",
      message: "Your tabs have been reloaded",
    });
  } catch (error) {
    console.error(`An error occurred while reloading tabs: ${error.message}`);
  }
}
```

It's also possible to use Promises effectively using two-way messaging.
Communication between a background page and a tab content script, for example,
looks something like this from the background page side:

```javascript
browser.tabs.sendMessage(tabId, "get-ids").then(results => {
  processResults(results);
});
```

And like this from the content script:

```javascript
browser.runtime.onMessage.addListener(msg => {
  if (msg == "get-ids") {
    return browser.storage.local.get("idPattern").then(({idPattern}) => {
      return Array.from(document.querySelectorAll(idPattern),
                        elem => elem.textContent);
    });
  }
});
```

or:

```javascript
browser.runtime.onMessage.addListener(async function(msg) {
  if (msg == "get-ids") {
    let {idPattern} = await browser.storage.local.get("idPattern");

    return Array.from(document.querySelectorAll(idPattern),
                      elem => elem.textContent);
  }
});
```

Or vice versa.

## Usage with TypeScript

There are multiple projects that add TypeScript support to your web-extension project:

| Project | Description |
| ------------- | ------------- |
| [webextension-polyfill-ts](https://github.com/Lusito/webextension-polyfill-ts) | Types and JS-Doc are automatically generated from the mozilla schema files, so it is always up-to-date with the latest APIs. It also bundles the webextension-polyfill for very simple usage. |
| [web-ext-types](https://github.com/kelseasy/web-ext-types) | Manually maintained types based on MDN's documentation. No JS-Doc included. |
| [@types/chrome](https://www.npmjs.com/package/@types/chrome) | Manually maintained types and JS-Doc. Only contains types for chrome extensions though! |

## Known Limitations and Incompatibilities

This library tries to minimize the amount of "special handling" that a cross-browser extension has to do to be able to run on the supported browsers from a single codebase, but there are still cases when polyfillling the missing or incompatible behaviors or features is not possible or out of the scope of this polyfill.

This section aims to keep track of the most common issues that an extension may have.

### No callback supported by the Promise-based APIs on Chrome

While some of the asynchronous API methods in Firefox (the ones that return a promise) also support the callback parameter (mostly as a side effect of the backward compatibility with the callback-based APIs available on Chrome), the Promise-based APIs provided by this library do not support the callback parameter (See ["#102 Cannot call browser.storage.local.get with callback"][I-102]).

### No promise returned on Chrome for some API methods

This library takes its knowledge of the APIs to wrap and their signatures from a metadata JSON file:
[api-metadata.json](api-metadata.json).

If an API method is not yet included in this "API metadata" file, it will not be recognized.
Promises are not supported for unrecognized APIs, and callbacks have to be used for them.

Chrome-only APIs have no promise version, because extensions that use such APIs
would not be compatible with Firefox.

File an issue in this repository for API methods that support callbacks in Chrome *and*
Firefox but are currently missing from the "API metadata" file.

### Issues that happen only when running on Firefox

When an extension that uses this library doesn't behave as expected on Firefox, it is almost never an issue in this polyfill, but an issue with the native implementation in Firefox.

"Firefox only" issues should be reported upstream on Bugzilla:
- https://bugzilla.mozilla.org/enter_bug.cgi?product=WebExtensions&component=Untriaged

### API methods or options that are only available when running in Firefox

This library does not provide any polyfill for API methods and options that are only available on Firefox, and they are actually considered out of the scope of this library.

### tabs.executeScript

On Firefox `browser.tabs.executeScript` returns a promise which resolves to the result of the content script code that has been executed, which can be an immediate value or a Promise.

On Chrome, the `browser.tabs.executeScript` API method as polyfilled by this library also returns a promise which resolves to the result of the content script code, but only immediate values are supported.
If the content script code result is a Promise, the promise returned by `browser.tabs.executeScript` will be resolved to `undefined`.

### MSEdge support

MSEdge versions >= 79.0.309 are unofficially supported as a Chrome-compatible target (as for Opera or other Chrome-based browsers that also support extensions).

MSEdge versions older than 79.0.309 are **unsupported**, for extension developers that still have to work on extensions for older MSEdge versions, the MSEdge `--ms-preload` manifest key and the [Microsoft Edge Extension Toolkit](https://docs.microsoft.com/en-us/microsoft-edge/extensions/guides/porting-chrome-extensions)'s Chrome API bridge can be used to be able to load the webextension-polyfill without any MSEdge specific changes.

The following Github repository provides some additional detail about this strategy and a minimal test extension that shows how to put it together:

- https://github.com/rpl/example-msedge-extension-with-webextension-polyfill

## Contributing to this project

Read the [contributing section](CONTRIBUTING.md) for additional information about how to build the library from this repository and how to contribute and test changes.

[PR-114]: https://github.com/mozilla/webextension-polyfill/pull/114
[I-102]: https://github.com/mozilla/webextension-polyfill/issues/102#issuecomment-379365343


text:
CarND-Controls-MPC

Vehicle Model

The model I used in this MPC project is a kinematic bicycle model which neglects the complex interactions between the tires and road.
The equations of the model are shown below:
x[t] = x[t-1] + v[t-1] * cos(psi[t-1]) * dt
y[t] = y[t-1] + v[t-1] * sin(psi[t-1]) * dt
psi[t] = psi[t-1] + v[t-1] / Lf * delta[t-1] * dt
v[t] = v[t-1] + a[t-1] * dt
cte[t] = f(x[t-1]) - y[t-1] + v[t-1] * sin(epsi[t-1]) * dt
epsi[t] = psi[t] - psides[t-1] + v[t-1] * delta[t-1] / Lf * dt
Here x and y are the position of the car on the track, psi is the direction in which the car is headed, v is velocity of the car, cte is the cross-track error & epsi is the orientation error. These values are considered the state of the model. In addition to that, Lf is the distance between the center of mass of the car and the front wheels.
The model input (actuators) are the car's acceleration(throttle) a, and the steering angle delta.
The goal of MPC method is to find throttle acceleration and steering angle which minimizes the cost function while minimizing cross track, heading, and velocity errors. A further improvement is to make the turns as smooth as possible. Additionally, the vehicle velocity should not change too radically. The goal of this final loop is to make control decisions smoother. The next control input should be like the current one
Timestep Length and Elapsed Duration
The number of points N and the time interval dt define the prediction horizon T = N * dt. The number of points impacts the performance of controller, short prediction horizon lead to more responsive controllers, but are less accurate and lead to more instable when chosen too short. Long prediction horizon generally leads to smoother controls. For a given prediction horizon shorter time step dt although lead to more accurate controls, it will slow down the computation latency.
In this project, I start to try N =25 and dt =0.05, but it became erratic. After trying many times, finally I chose N =10 and dt = 0.1 as it displayed much better results over other values.
 Polynomial Fitting and MPC Preprocessing
The waypoints provided by the simulator are transformed to the car’s coordinate system. First shifting the origin to the current position of the car, then a 2D rotation is applied on the relative waypoints, finally transfer into car coordinate system.

X' =   cos(psi) * (ptsx[i] - x) + sin(psi) * (ptsy[i] - y);
Y' =  -sin(psi) * (ptsx[i] - x) + cos(psi) * (ptsy[i] - y);
Here X' and Y' are the waypoints in the vehicle coordinate system.
A 3rd polynomial is fitted to the transformed waypoints. The coefficients are used to calculate the cte and epsi.
Model Predictive Control with Latency
There are two common approaches to handle the delays in control problem.
1. Latency is considered by constraining the controls to the values of the previous iteration for the duration of the latency. Thus, the optimal trajectory is computed starting from the time after the latency period. So, the dynamics during the latency period is still calculated according to the vehicle model.
2. The position of the car is estimated based on its current speed and heading direction by propagating the position of the car forward until the expected time when actuations are expected to have an effect. This approach is intuitionistic, and easy to handle.
So to handle the actuator latency, I used the state values which are calculated by the model and delay interval replace the initial one.
x_delay = x0 + (v* cos(psi0) * delay);
y_delay = y0 + (v* sin(psi0) * delay);
psi_delay = psi0 + (v*delta/Lf *delay);
v_delay = v + a* delay;
cte_delay = cte0 + (v*sin(epsi0)*delay);
epsi_delay = epsi0 + (v * delta* delay/Lf);

repository: rout-sarthak/MPC

repo_name: rout-sarthak/MPC


text:
# error handling and debugging

## order of execution

function greetUser() {
    return 'Hello ' + getName();
}
function getName() {
    var name = 'Molly';
    return name;
}
var greeting = greetUser();
alert(greeting);

1,2,3,2,1,4. This is the order of operations for that operation
1 the greeting variable gets its value from the greetUser() function.
2 greetUser creates the message by combining the string 'Hello ' with the result of getName().
3 getName() returns the name to greetUser().
2greetUser() now knows the name, and combines it with the string. It then returns the message to the statement that called it in step 1.
1 the value of the greeting is stored in memory.
4 this greeting variable is written to an alert box.

## execution contexts

every statement in a script lives in one of three execution contexts:
global context code that is in the script, but not in a function. there is only one global context in any page.

function context code that is being run within a function. each function has its own function context.

eval context (not shown) Text is executed like code in an internal function called eval() (not covered in the book).

variable scope the first two execution contexts correspond with the notion of scope
the global scope if a variable is declared outside of a function, it can be used anywhere because it has a global scope. if you do not use a var keyword when declaring a variable then it is given a gobal scope.

function-level scope when a variable is declared within a function, it can only be used within that function, This is because ir has function-level scope.

## the stack

the javascript interpreter processes one line of code at a time. when a statement needs data from another function, it stacks the new function on top of the current task.

## understanding errors (very important)

if a javascript statement generates an error, then it throws an exception. At that point, the interpreter stops and looks for exception-handling code.

error - generic error the other errors are based off of this error.
syntaxerror - syntax has not been followed
referenceerror- tried to reference a variable that is not declared/within scope
typeerror- an unexpected data type that cannot be coerced
rangeerror - numbers not in acceptable range
URIerror - encodeURI(), decodeURI(), and similar methods used incorrectly.
evalerror - eval() function used incorrectly.
READ PAGE 460 AND 461 FOR MORE DEETS

## dealing with errors

1 debug the script to fix errors(dev tools and console logs, baby)
2handle errors gracefully. sometimes errors happen outside of your control(requesting data from third parties) so you need to write error handling code

look at the error message to figure out what and where
console.log at where and use breakpoints(breakpoints are the blue errors in dev console on chrome) where things are going wrong

after breakpoints are set you can check data for correct values
break down your code to test it in pieces to find whats wrong.
rinse repeat until debugged(or just outsource your code writing at your 110k google job to someone in another country for 25% and not actually do work).

page 471 for a little bit of structure on creating console logs
you can make groups of console logs with console.group followed by the individual console logs and console.groupEnd after

you can set breakpoints in your code using the "debugger" keyword

if you suspect buddy use try catch finally.
specify the code you think might throw an error in try
if the try code throws an exception catch steps in with an alternative set of code
(this is where youd have the webpage display an error to the user on a live website)
and finally runs last no matter what and uses .done() .fail() and .always() in JQuery


text:
# OpenShop
[![CI Status](https://travis-ci.org/SMTOpenSource/OpenShop.svg?branch=master)](https://travis-ci.org/SMTOpenSource/OpenShop)
[![Version](https://img.shields.io/cocoapods/v/OpenShop.svg?style=flat)](http://cocoapods.org/pods/OpenShop)
[![License](https://img.shields.io/cocoapods/l/OpenShop.svg?style=flat)](http://cocoapods.org/pods/OpenShop)
[![Platform](https://img.shields.io/cocoapods/p/OpenShop.svg?style=flat)](http://cocoapods.org/pods/OpenShop)

OpenShop is an Open Source framework designed to simplify creation of eCommerce solutions.

This framework is a set of tools designed to provide a busines logic for things like:
* Customer management
* Orders
* Products
* etc

To create an application based on the framework, a developer should focus on writing a presentation layer, and providing data for the services.

## Features

* TBD

## Requirements

- iOS 8.0+ / tvOS 9.0+

## Installation

OpenShop is available through [CocoaPods](http://cocoapods.org). To install
it, simply add the following line to your Podfile:

```ruby
pod "OpenShop"
```

## Usage

To run the example project, clone the repo, and run `pod install` from the Example directory first.

## Author

Jakub Długosz<EMAIL_ADDRESS>
## License

OpenShop is available under the MIT license. See the LICENSE file for more info.

repository: SMTOpenSource/OpenShop

repo_name: SMTOpenSource/OpenShop