text:
# Selling Partner API for Catalog Items

## Overview
The Selling Partner API for Catalog Items provides programmatic access to information about items in the Amazon catalog.

For more information, see the [Catalog Items API Use Case Guide](https://github.com/amzn/selling-partner-api-docs/blob/main/guides/en-US/use-case-guides/catalog-items-api-use-case-guide/catalog-items-api-use-case-guide_2020-12-01.md).

### Version information
*Version* : 2020-12-01

### Contact information
*Contact* : Selling Partner API Developer Support
*Contact URL* : https://sellercentral.amazon.com/gp/mws/contactus.html

### License information
*License* : Apache License 2.0
*License URL* : http://www.apache.org/licenses/LICENSE-2.0

### URI scheme
*Host* : sellingpartnerapi-na.amazon.com
*Schemes* : HTTPS

### Consumes

* `application/json`

### Produces

* `application/json`

### Operations
[searchCatalogItems](#searchcatalogitems)
[getCatalogItem](#getcatalogitem)

## Paths

### GET /catalog/2020-12-01/items
**Operation: searchCatalogItems**

#### Description
Search for and return a list of Amazon catalog items and associated information.

**Usage Plans:**

| Plan type | Rate (requests per second) | Burst |
| ---- | ---- | ---- |
|Default| 1 | 5 |
|Selling partner specific| Variable | Variable |

The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://github.com/amzn/selling-partner-api-docs/blob/main/guides/en-US/usage-plans-rate-limits/Usage-Plans-and-Rate-Limits.md).

#### Parameters

|Type|Name|Description|Schema|Default|
|---|---|---|---|---|
|**Query**|**keywords**
*required*|A comma-delimited list of words or item identifiers to search the Amazon catalog for.|< string > array(csv)|-|
|**Query**|**marketplaceIds**
*required*|A comma-delimited list of Amazon marketplace identifiers for the request.
**Max count** : 1|< string > array(csv)|-|
|**Query**|**includedData**
*optional*|A comma-delimited list of data sets to include in the response. Default: summaries.|< enum ([IncludedData](#includeddata-subgroup-1)) > array(csv)|-|
|**Query**|**brandNames**
*optional*|A comma-delimited list of brand names to limit the search to.|< string > array(csv)|-|
|**Query**|**classificationIds**
*optional*|A comma-delimited list of classification identifiers to limit the search to.|< string > array(csv)|-|
|**Query**|**pageSize**
*optional*|Number of results to be returned per page.
**Maximum** : 20|integer|`10`|
|**Query**|**pageToken**
*optional*|A token to fetch a certain page when there are multiple pages worth of results.|string|-|
|**Query**|**keywordsLocale**
*optional*|The language the keywords are provided in. Defaults to the primary locale of the marketplace.|string|-|
|**Query**|**locale**
*optional*|Locale for retrieving localized summaries. Defaults to the primary locale of the marketplace.|string|-|

#### Responses

|HTTP Code|Description|Schema|
|---|---|---|
|**200**|Success.
**Headers** :
`x-amzn-RateLimit-Limit` (string) : Your rate limit (requests per second) for this operation.
`x-amzn-RequestId` (string) : Unique request reference identifier.|[ItemSearchResults](#itemsearchresults)|

For error status codes, descriptions and schemas, see [Error responses and schemas](#error-responses-and-schemas).
#### Consumes

* `application/json`

#### Produces

* `application/json`

### GET /catalog/2020-12-01/items/{asin}
**Operation: getCatalogItem**

#### Description
Retrieves details for an item in the Amazon catalog.

**Usage Plans:**

| Plan type | Rate (requests per second) | Burst |
| ---- | ---- | ---- |
|Default| 5 | 5 |
|Selling partner specific| Variable | Variable |

The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://github.com/amzn/selling-partner-api-docs/blob/main/guides/en-US/usage-plans-rate-limits/Usage-Plans-and-Rate-Limits.md).

#### Parameters

|Type|Name|Description|Schema|
|---|---|---|---|
|**Path**|**asin**
*required*|The Amazon Standard Identification Number (ASIN) of the item.|string|
|**Query**|**marketplaceIds**
*required*|A comma-delimited list of Amazon marketplace identifiers. Data sets in the response contain data only for the specified marketplaces.|< string > array(csv)|
|**Query**|**includedData**
*optional*|A comma-delimited list of data sets to include in the response. Default: summaries.|< enum ([IncludedData](#includeddata-subgroup-2)) > array(csv)|
|**Query**|**locale**
*optional*|Locale for retrieving localized summaries. Defaults to the primary locale of the marketplace.|string|

#### Responses

|HTTP Code|Description|Schema|
|---|---|---|
|**200**|Success.
**Headers** :
`x-amzn-RateLimit-Limit` (string) : Your rate limit (requests per second) for this operation.
`x-amzn-RequestId` (string) : Unique request reference identifier.|[Item](#item)|

For error status codes, descriptions and schemas, see [Error responses and schemas](#error-responses-and-schemas).
#### Consumes

* `application/json`

#### Produces

* `application/json`

### Error Responses and Schemas
This table contains HTTP status codes and associated information for error responses.

|HTTP Code|Description|Schema|
|---|---|---|
|**400**|Request has missing or invalid parameters and cannot be parsed.
**Headers**:
`x-amzn-RateLimit-Limit` (string):Your rate limit (requests per second) for this operation.
`x-amzn-RequestId` (string):Unique request reference identifier.|[ErrorList](#errorlist)|
|**403**|Indicates that access to the resource is forbidden. Possible reasons include Access Denied, Unauthorized, Expired Token, or Invalid Signature.
**Headers**:
`x-amzn-RequestId` (string):Unique request reference identifier.|[ErrorList](#errorlist)|
|**404**|The resource specified does not exist.
**Headers**:
`x-amzn-RateLimit-Limit` (string):Your rate limit (requests per second) for this operation.
`x-amzn-RequestId` (string):Unique request reference identifier.|[ErrorList](#errorlist)|
|**413**|The request size exceeded the maximum accepted size.
**Headers**:
`x-amzn-RateLimit-Limit` (string):Your rate limit (requests per second) for this operation.
_Note:_ For this status code, the rate limit header is deprecated and no longer returned.
`x-amzn-RequestId` (string):Unique request reference identifier.|[ErrorList](#errorlist)|
|**415**|The request payload is in an unsupported format.
**Headers**:
`x-amzn-RateLimit-Limit` (string):Your rate limit (requests per second) for this operation.
_Note:_ For this status code, the rate limit header is deprecated and no longer returned.
`x-amzn-RequestId` (string):Unique request reference identifier.|[ErrorList](#errorlist)|
|**429**|The frequency of requests was greater than allowed.
**Headers**:
`x-amzn-RateLimit-Limit` (string):Your rate limit (requests per second) for this operation.
_Note:_ For this status code, the rate limit header is deprecated and no longer returned.
`x-amzn-RequestId` (string):Unique request reference identifier.|[ErrorList](#errorlist)|
|**500**|An unexpected condition occurred that prevented the server from fulfilling the request.
**Headers**:
`x-amzn-RateLimit-Limit` (string):Your rate limit (requests per second) for this operation.
_Note:_ For this status code, the rate limit header is deprecated and no longer returned.
`x-amzn-RequestId` (string):Unique request reference identifier.|[ErrorList](#errorlist)|
|**503**|Temporary overloading or maintenance of the server.
**Headers**:
`x-amzn-RateLimit-Limit` (string):Your rate limit (requests per second) for this operation.
_Note:_ For this status code, the rate limit header is deprecated and no longer returned.
`x-amzn-RequestId` (string):Unique request reference identifier.|[ErrorList](#errorlist)|

## Definitions

### Error
Error response returned when the request is unsuccessful.

|Name|Description|Schema|
|---|---|---|
|**code**
*required*|An error code that identifies the type of error that occurred.|string|
|**message**
*required*|A message that describes the error condition.|string|
|**details**
*optional*|Additional details that can help the caller understand or fix the issue.|string|

### ErrorList
A list of error responses returned when a request is unsuccessful.

|Name|Schema|
|---|---|
|**errors**
*required*|< [Error](#error) > array|

### Item
An item in the Amazon catalog.

|Name|Description|Schema|
|---|---|---|
|**asin**
*required*|Amazon Standard Identification Number (ASIN) is the unique identifier for an item in the Amazon catalog.|[ItemAsin](#itemasin)|
|**attributes**
*optional*|A JSON object that contains structured item attribute data keyed by attribute name. Catalog item attributes are available only to brand owners and conform to the related product type definitions available in the Selling Partner API for Product Type Definitions.|[ItemAttributes](#itemattributes)|
|**identifiers**
*optional*|Identifiers associated with the item in the Amazon catalog, such as UPC and EAN identifiers.|[ItemIdentifiers](#itemidentifiers)|
|**images**
*optional*|Images for an item in the Amazon catalog. All image variants are provided to brand owners. Otherwise, a thumbnail of the "MAIN" image variant is provided.|[ItemImages](#itemimages)|
|**productTypes**
*optional*|Product types associated with the Amazon catalog item.|[ItemProductTypes](#itemproducttypes)|
|**salesRanks**
*optional*|Sales ranks of an Amazon catalog item.|[ItemSalesRanks](#itemsalesranks)|
|**summaries**
*optional*|Summary details of an Amazon catalog item.|[ItemSummaries](#itemsummaries)|
|**variations**
*optional*|Variation details by marketplace for an Amazon catalog item (variation relationships).|[ItemVariations](#itemvariations)|
|**vendorDetails**
*optional*|Vendor details associated with an Amazon catalog item. Vendor details are available to vendors only.|[ItemVendorDetails](#itemvendordetails)|

### ItemAsin
Amazon Standard Identification Number (ASIN) is the unique identifier for an item in the Amazon catalog.

*Type* : string

### ItemAttributes
A JSON object that contains structured item attribute data keyed by attribute name. Catalog item attributes are available only to brand owners and conform to the related product type definitions available in the Selling Partner API for Product Type Definitions.

*Type* : object

### ItemIdentifiers
Identifiers associated with the item in the Amazon catalog, such as UPC and EAN identifiers.

*Type* : < [ItemIdentifiersByMarketplace](#itemidentifiersbymarketplace) > array

### ItemIdentifiersByMarketplace
Identifiers associated with the item in the Amazon catalog for the indicated Amazon marketplace.

|Name|Description|Schema|
|---|---|---|
|**marketplaceId**
*required*|Amazon marketplace identifier.|string|
|**identifiers**
*required*|Identifiers associated with the item in the Amazon catalog for the indicated Amazon marketplace.|< [ItemIdentifier](#itemidentifier) > array|

### ItemIdentifier
Identifier associated with the item in the Amazon catalog, such as a UPC or EAN identifier.

|Name|Description|Schema|
|---|---|---|
|**identifierType**
*required*|Type of identifier, such as UPC, EAN, or ISBN.|string|
|**identifier**
*required*|Identifier.|string|

### ItemImages
Images for an item in the Amazon catalog. All image variants are provided to brand owners. Otherwise, a thumbnail of the "MAIN" image variant is provided.

*Type* : < [ItemImagesByMarketplace](#itemimagesbymarketplace) > array

### ItemImagesByMarketplace
Images for an item in the Amazon catalog for the indicated Amazon marketplace.

|Name|Description|Schema|
|---|---|---|
|**marketplaceId**
*required*|Amazon marketplace identifier.|string|
|**images**
*required*|Images for an item in the Amazon catalog for the indicated Amazon marketplace.|< [ItemImage](#itemimage) > array|

### ItemImage
Image for an item in the Amazon catalog.

|Name|Description|Schema|
|---|---|---|
|**variant**
*required*|Variant of the image, such as MAIN or PT01.
**Example** : `"MAIN"`|enum ([Variant](#variant))|
|**link**
*required*|Link, or URL, for the image.|string|
|**height**
*required*|Height of the image in pixels.|integer|
|**width**
*required*|Width of the image in pixels.|integer|

### ItemProductTypes
Product types associated with the Amazon catalog item.

*Type* : < [ItemProductTypeByMarketplace](#itemproducttypebymarketplace) > array

### ItemProductTypeByMarketplace
Product type associated with the Amazon catalog item for the indicated Amazon marketplace.

|Name|Description|Schema|
|---|---|---|
|**marketplaceId**
*optional*|Amazon marketplace identifier.|string|
|**productType**
*optional*|Name of the product type associated with the Amazon catalog item.
**Example** : `"LUGGAGE"`|string|

### ItemSalesRanks
Sales ranks of an Amazon catalog item.

*Type* : < [ItemSalesRanksByMarketplace](#itemsalesranksbymarketplace) > array

### ItemSalesRanksByMarketplace
Sales ranks of an Amazon catalog item for the indicated Amazon marketplace.

|Name|Description|Schema|
|---|---|---|
|**marketplaceId**
*required*|Amazon marketplace identifier.|string|
|**ranks**
*required*|Sales ranks of an Amazon catalog item for an Amazon marketplace.|< [ItemSalesRank](#itemsalesrank) > array|

### ItemSalesRank
Sales rank of an Amazon catalog item.

|Name|Description|Schema|
|---|---|---|
|**title**
*required*|Title, or name, of the sales rank.|string|
|**link**
*optional*|Corresponding Amazon retail website link, or URL, for the sales rank.|string|
|**rank**
*required*|Sales rank value.|integer|

### ItemSummaries
Summary details of an Amazon catalog item.

*Type* : < [ItemSummaryByMarketplace](#itemsummarybymarketplace) > array

### ItemSummaryByMarketplace
Summary details of an Amazon catalog item for the indicated Amazon marketplace.

|Name|Description|Schema|
|---|---|---|
|**marketplaceId**
*required*|Amazon marketplace identifier.|string|
|**brandName**
*optional*|Name of the brand associated with an Amazon catalog item.|string|
|**browseNode**
*optional*|Identifier of the browse node associated with an Amazon catalog item.|string|
|**colorName**
*optional*|Name of the color associated with an Amazon catalog item.|string|
|**itemName**
*optional*|Name, or title, associated with an Amazon catalog item.|string|
|**manufacturer**
*optional*|Name of the manufacturer associated with an Amazon catalog item.|string|
|**modelNumber**
*optional*|Model number associated with an Amazon catalog item.|string|
|**sizeName**
*optional*|Name of the size associated with an Amazon catalog item.|string|
|**styleName**
*optional*|Name of the style associated with an Amazon catalog item.|string|

### ItemVariations
Variation details by marketplace for an Amazon catalog item (variation relationships).

*Type* : < [ItemVariationsByMarketplace](#itemvariationsbymarketplace) > array

### ItemVariationsByMarketplace
Variation details for the Amazon catalog item for the indicated Amazon marketplace.

|Name|Description|Schema|
|---|---|---|
|**marketplaceId**
*required*|Amazon marketplace identifier.|string|
|**asins**
*required*|Identifiers (ASINs) of the related items.|< string > array|
|**variationType**
*required*|Type of variation relationship of the Amazon catalog item in the request to the related item(s): "PARENT" or "CHILD".
**Example** : `"PARENT"`|enum ([VariationType](#variationtype))|

### ItemVendorDetails
Vendor details associated with an Amazon catalog item. Vendor details are available to vendors only.

*Type* : < [ItemVendorDetailsByMarketplace](#itemvendordetailsbymarketplace) > array

### ItemVendorDetailsByMarketplace
Vendor details associated with an Amazon catalog item for the indicated Amazon marketplace.

|Name|Description|Schema|
|---|---|---|
|**marketplaceId**
*required*|Amazon marketplace identifier.|string|
|**brandCode**
*optional*|Brand code associated with an Amazon catalog item.|string|
|**categoryCode**
*optional*|Product category associated with an Amazon catalog item.|string|
|**manufacturerCode**
*optional*|Manufacturer code associated with an Amazon catalog item.|string|
|**manufacturerCodeParent**
*optional*|Parent vendor code of the manufacturer code.|string|
|**productGroup**
*optional*|Product group associated with an Amazon catalog item.|string|
|**replenishmentCategory**
*optional*|Replenishment category associated with an Amazon catalog item.|enum ([ReplenishmentCategory](#replenishmentcategory))|
|**subcategoryCode**
*optional*|Product subcategory associated with an Amazon catalog item.|string|

### ItemSearchResults
Items in the Amazon catalog and search related metadata.

|Name|Description|Schema|
|---|---|---|
|**numberOfResults**
*required*|The estimated total number of products matched by the search query (only results up to the page count limit will be returned per request regardless of the number found).

Note: The maximum number of items (ASINs) that can be returned and paged through is 1000.|integer|
|**pagination**
*required*|If available, the nextToken and/or previousToken values required to return paginated results.|[Pagination](#pagination)|
|**refinements**
*required*|Search refinements.|[Refinements](#refinements)|
|**items**
*required*|A list of items from the Amazon catalog.|< [Item](#item) > array|

### Pagination
When a request produces a response that exceeds the pageSize, pagination occurs. This means the response is divided into individual pages. To retrieve the next page or the previous page, you must pass the nextToken value or the previousToken value as the pageToken parameter in the next request. When you receive the last page, there will be no nextToken key in the pagination object.

|Name|Description|Schema|
|---|---|---|
|**nextToken**
*optional*|A token that can be used to fetch the next page.|string|
|**previousToken**
*optional*|A token that can be used to fetch the previous page.|string|

### Refinements
Search refinements.

|Name|Description|Schema|
|---|---|---|
|**brands**
*required*|Brand search refinements.|< [BrandRefinement](#brandrefinement) > array|
|**classifications**
*required*|Classification search refinements.|< [ClassificationRefinement](#classificationrefinement) > array|

### BrandRefinement
Description of a brand that can be used to get more fine-grained search results.

|Name|Description|Schema|
|---|---|---|
|**numberOfResults**
*required*|The estimated number of results that would still be returned if refinement key applied.|integer|
|**brandName**
*required*|Brand name. For display and can be used as a search refinement.|string|

### ClassificationRefinement
Description of a classification that can be used to get more fine-grained search results.

|Name|Description|Schema|
|---|---|---|
|**numberOfResults**
*required*|The estimated number of results that would still be returned if refinement key applied.|integer|
|**displayName**
*required*|Display name for the classification.|string|
|**classificationId**
*required*|Identifier for the classification that can be used for search refinement purposes.|string|

### Variant
Variant of the image, such as MAIN or PT01.

*Type* : enum

|Value|Description|
|---|---|
|**MAIN**|Main image for the item.|
|**PT01**|Other image #1 for the item.|
|**PT02**|Other image #2 for the item.|
|**PT03**|Other image #3 for the item.|
|**PT04**|Other image #4 for the item.|
|**PT05**|Other image #5 for the item.|
|**PT06**|Other image #6 for the item.|
|**PT07**|Other image #7 for the item.|
|**PT08**|Other image #8 for the item.|
|**SWCH**|Swatch image for the item.|

### VariationType
Type of variation relationship of the Amazon catalog item in the request to the related item(s): "PARENT" or "CHILD".

*Type* : enum

|Value|Description|
|---|---|
|**PARENT**|The Amazon catalog item in the request is a variation parent of the related item(s) indicated by ASIN.|
|**CHILD**|The Amazon catalog item in the request is a variation child of the related item identified by ASIN.|

### ReplenishmentCategory
Replenishment category associated with an Amazon catalog item.

*Type* : enum

|Value|Description|
|---|---|
|**ALLOCATED**|Indicates non-automated purchasing of inventory that has been allocated to Amazon by the vendor.|
|**BASIC_REPLENISHMENT**|Indicates non-automated purchasing of inventory.|
|**IN_SEASON**|Indicates non-automated purchasing of inventory for seasonal items.|
|**LIMITED_REPLENISHMENT**|Holding queue replenishment status before an item is NEW_PRODUCT.|
|**MANUFACTURER_OUT_OF_STOCK**|Indicates vendor is out of stock for a longer period of time and cannot backorder.|
|**NEW_PRODUCT**|Indicates a new item that Amazon does not yet stock in inventory.|
|**NON_REPLENISHABLE**|Indicates assortment parent used for detail page display, not actual items.|
|**NON_STOCKUPABLE**|Indicates drop ship inventory that Amazon does not stock in its fulfillment centers.|
|**OBSOLETE**|Indicates item is obsolete and should not be ordered.|
|**PLANNED_REPLENISHMENT**|Indicates active items that should be automatically ordered.|

### IncludedData
*Type* : enum

**For use with the operation(s): [searchCatalogItems](#searchcatalogitems)**

|Value|Description|
|---|---|
|**identifiers**|Identifiers associated with the item in the Amazon catalog, such as UPC and EAN identifiers.|
|**images**|Images for an item in the Amazon catalog. All image variants are provided to brand owners; a thumbnail of the "MAIN" image variant is provided otherwise.|
|**productTypes**|Product types associated with the Amazon catalog item.|
|**salesRanks**|Sales ranks of an Amazon catalog item.|
|**summaries**|Summary details of an Amazon catalog item.|
|**variations**|Variation details of an Amazon catalog item (variation relationships).|
|**vendorDetails**|Vendor details associated with an Amazon catalog item. Vendor details are available to vendors only.|

**For use with the operation(s): [getCatalogItem](#getcatalogitem)**

|Value|Description|
|---|---|
|**attributes**|A JSON object containing structured item attribute data keyed by attribute name. Catalog item attributes are available only to brand owners and conform to the related Amazon product type definitions available in the Selling Partner API for Product Type Definitions.|
|**identifiers**|Identifiers associated with the item in the Amazon catalog, such as UPC and EAN identifiers.|
|**images**|Images for an item in the Amazon catalog. All image variants are provided to brand owners. Otherwise, a thumbnail of the "MAIN" image variant is provided.|
|**productTypes**|Product types associated with the Amazon catalog item.|
|**salesRanks**|Sales ranks of an Amazon catalog item.|
|**summaries**|Summary details of an Amazon catalog item.|
|**variations**|Variation details of an Amazon catalog item (variation relationships).|
|**vendorDetails**|Vendor details associated with an Amazon catalog item. Vendor details are available to vendors only.|

repository: mu-suke/selling-partner-api-docs

repo_name: mu-suke/selling-partner-api-docs


text:
---
date: 2014-2-23 23:10:32+00:00
layout: post
title: How to develop a theme app for Android launchers
thread: 11
categories: Code
tags:  Code
---

Here I am going to guide you through all the steps to build your favourite theme.

>① . What is the Launcher and the Theme?

>② . Steps to build your favorite theme

__What is the Launcher and the Theme?__
--------

Android Launcher aka Home Replacement,presents the main view of your phone,and is responsible for launching almpost all [apps](http://en.wikipedia.org/wiki/Mobile_apps) and hosting [widgets](http://en.wikipedia.org/wiki/Software_widget).

Just give it an analogy:A Launcher is like your house,you can place your furnishing(apps) as you like,you can open the refrigerator(launching the apps) when you need to find something to eat.

Here are some of the listed launchers available in market:

>* [Solo Launcher](https://play.google.com/store/apps/details?id=home.solo.launcher.free)

>* [Go Launcher](https://play.google.com/store/apps/details?id=com.gau.go.launcherex
)

>* [Nova Launcher](https://play.google.com/store/apps/details?id=com.teslacoilsw.launcher)

>* [Smart Launcher](https://play.google.com/store/apps/details?id=ginlemon.flowerfree)

>* [Aviate](https://play.google.com/store/apps/details?id=ginlemon.flowerfree)

The theme is the decoration of your house(launcher),so rightnow you must have many ideas to decorate your room,diy your own style:

![Mou icon](https://lh6.ggpht.com/l8rup8brAtymf7WF0jjBi7B6dWrieHf6ydLPxfByZS0RbIiHLjKd0D7nqMPlvsBT4cs=h300-rw)
![Mou icon](https://lh6.ggpht.com/hM2uEFNUkWUwzd3kTpGCsSrDDqecfSnLg1d-AlXr4tthqjYLcUFLJZ4UELYBvMJc9mM=h300-rw)

Got it?These are two different style of icons,just like the two types of house,that is the Theme.

I have designed some icons and released two theme apps in Market

>[Colorful Flat Theme](https://play.google.com/store/apps/details?id=com.solo.theme.colorfulflat)

>[Colorful Circle Theme](https://play.google.com/store/apps/details?id=com.solo.theme.colorfulcircle)

For you guys,If you are a designer,I will guide you how to turn your designed icons into a app in store,if you are a developer,I will guide you how to design your own style icons,if you aren't none of them,congratulation!You will learn a lot,and mayne earn a lot :)

__Steps to build your favorite theme__
--------

[Solo Theme Template In Github](https://github.com/Geek4IT/SoloTheme_Template)

license: MIT

branch_name: refs/heads/master

extension: md

gha_language: JavaScript

license_type: permissive


text:
## Release Notes for GlusterFS 3.6.3

This is a bugfix release. The [Release Notes for 3.6.0](./3.6.0.md) contain a listing of
all the new features that were added and bugs fixed in the GlusterFS 3.6 stable
release.

### Bugs Fixed:

- [1187526](https://bugzilla.redhat.com/1187526): Disperse volume mounted through NFS doesn't list any files/directories
- [1188471](https://bugzilla.redhat.com/1188471): When the volume is in stopped state/all the bricks are down mount of the volume hangs
- [1201484](https://bugzilla.redhat.com/1201484): glusterfs-3.6.2 fails to build on Ubuntu Precise: 'RDMA_OPTION_ID_REUSEADDR' undeclared
- [1202212](https://bugzilla.redhat.com/1202212): Performance enhancement for RDMA
- [1189023](https://bugzilla.redhat.com/1189023): Directories not visible anymore after add-brick, new brick dirs not part of old bricks
- [1202673](https://bugzilla.redhat.com/1202673): Perf: readdirp in replicated volumes causes performance degrade
- [1203081](https://bugzilla.redhat.com/1203081): Entries in indices/xattrop directory not removed appropriately
- [1203648](https://bugzilla.redhat.com/1203648): Quota: Build ancestry in the lookup
- [1199936](https://bugzilla.redhat.com/1199936): readv on /var/run/6b8f1f2526c6af8a87f1bb611ae5a86f.socket failed when NFS is disabled
- [1200297](https://bugzilla.redhat.com/1200297): cli crashes when listing quota limits with xml output
- [1201622](https://bugzilla.redhat.com/1201622): Convert quota size from n-to-h order before using it
- [1194141](https://bugzilla.redhat.com/1194141): AFR : failure in self-heald.t
- [1201624](https://bugzilla.redhat.com/1201624): Spurious failure of tests/bugs/quota/bug-1038598.t
- [1194306](https://bugzilla.redhat.com/1194306): Do not count files which did not need index heal in the first place as successfully healed
- [1200258](https://bugzilla.redhat.com/1200258): Quota: features.quota-deem-statfs is "on" even after disabling quota.
- [1165938](https://bugzilla.redhat.com/1165938): Fix regression test spurious failures
- [1197598](https://bugzilla.redhat.com/1197958): NFS logs are filled with system.posix_acl_access messages
- [1199577](https://bugzilla.redhat.com/1199577): mount.glusterfs uses /dev/stderr and fails if the device does not exist
- [1197598](https://bugzilla.redhat.com/1197598): NFS logs are filled with system.posix_acl_access messages
- [1188066](https://bugzilla.redhat.com/1188066): logging improvements in marker translator
- [1191537](https://bugzilla.redhat.com/1191537): With afrv2 + ext4, lookups on directories with large offsets could result in duplicate/missing entries
- [1165129](https://bugzilla.redhat.com/1165129): libgfapi: use versioned symbols in libgfapi.so for compatibility
- [1179136](https://bugzilla.redhat.com/1179136): glusterd: Gluster rebalance status returns failure
- [1176756](https://bugzilla.redhat.com/1176756): glusterd: remote locking failure when multiple synctask transactions are run
- [1188064](https://bugzilla.redhat.com/1188064): log files get flooded when removexattr() can't find a specified key or value
- [1165938](https://bugzilla.redhat.com/1165938): Fix regression test spurious failures
- [1192522](https://bugzilla.redhat.com/1192522): index heal doesn't continue crawl on self-heal failure
- [1193970](https://bugzilla.redhat.com/1193970): Fix spurious ssl-authz.t regression failure (backport)
- [1138897](https://bugzilla.redhat.com/1138897): NetBSD port
- [1184527](https://bugzilla.redhat.com/1184527): Some newly created folders have root ownership although created by unprivileged user
- [1181977](https://bugzilla.redhat.com/1181977): gluster vol clear-locks vol-name path kind all inode return IO error in a disperse volume
- [1159471](https://bugzilla.redhat.com/1159471): rename operation leads to core dump
- [1173528](https://bugzilla.redhat.com/1173528): Change in volume heal info command output
- [1186119](https://bugzilla.redhat.com/1186119): tar on a gluster directory gives message "file changed as we read it" even though no updates to file in progress
- [1183716](https://bugzilla.redhat.com/1183716): Force replace-brick lead to the persistent write(use dd) return Input/output error
- [1138897](https://bugzilla.redhat.com/1138897): NetBSD port
- [1178590](https://bugzilla.redhat.com/1178590): Enable quota(default) leads to heal directory's xattr failed.
- [1182490](https://bugzilla.redhat.com/1182490): Internal ec xattrs are allowed to be modified
- [1187547](https://bugzilla.redhat.com/1187547): self-heal-algorithm with option "full" doesn't heal sparse files correctly
- [1174170](https://bugzilla.redhat.com/1174170): Glusterfs outputs a lot of warnings and errors when quota is enabled
- [1212684](https://bugzilla.redhat.com/1212684): - GlusterD segfaults when started with management SSL

### Known Issues:

- The following configuration changes are necessary for 'qemu' and 'samba vfs
  plugin' integration with libgfapi to work seamlessly:

  1.  gluster volume set <volname> server.allow-insecure on
  2.  restarting the volume is necessary

      ```
      gluster volume stop <volname>
      gluster volume start <volname>
      ```

  3.  Edit `/etc/glusterfs/glusterd.vol` to contain this line:

      ```
      option rpc-auth-allow-insecure on
      ```

  4.  restarting glusterd is necessary

      ```
      service glusterd restart
      ```

  More details are also documented in the Gluster Wiki on the [Libgfapi with qemu libvirt](https://github.com/gluster/glusterfs-specs/blob/master/done/GlusterFS%203.5/libgfapi%20with%20qemu%20libvirt.md) page.

- For Block Device translator based volumes open-behind translator at the
  client side needs to be disabled.

          gluster volume set <volname> performance.open-behind disable

repository: gluster/glusterdocs

branch_name: refs/heads/main

gha_language: HTML

gha_license_id: MIT

repo_name: gluster/glusterdocs


text:
# RISC-V B-Extension Files

**NOTE: The B-extension is still WIP and yet NOT FROZEN in RISC-V specs.**

* This directory contains the topmodule and Marco's for Bit-Manipulation Instructions(BMI's) which are neccesary for performing BMI operations in Warp-V.
* Some of the verilog module are inherited from Clifford Wolf's draft implementation  as proposed in riscv-bitmanip draft version-0.92 [RISC-V Bitmanip (Bit Manipulation) Extension](https://github.com/riscv/riscv-bitmanip).

* `top_bext_module.tlv` contains TL-Verilog marcos which is inheriting/calling the BMI verilog modules in TL-V context and also contains standalone implementation of some BMI's in pure TL-V.

* Currently, all the 32-bit BMI's are implemented expect the ternary ones like *cmix*, *cmov*, *fsl*, *fsr* and *fsri*.


text:
# better-emmet-plugin<br>[![NPM version][npm-version]][npm-url] [![NPM downloads][npm-downloads]][npm-url] [![Build Status][travis-image]][travis-url] [![Coverage Status][coveralls-image]][coveralls-url] [![Bower version][bower-image]][bower-url]
> Emmet abbreviation parser for [better-dom](https://github.com/chemerisuk/better-dom)

Html strings are annoyingly verbose. Let's fix that with [Emmet](http://emmet.io/). Compare the HTML string:

```js
DOM.create("<ul><li class='list-item'></li><li class='list-item'></li><li class='list-item'></li></ul>");
```

to the equivalent micro template

```js
DOM.create(DOM.emmet("ul>li.list-item*3"));
```
Take a look at the [Emmet cheat sheet](http://docs.emmet.io/cheat-sheet/) for more examples, but be aware about the [differences](#differences-from-emmetio-parser).

## Differences from emmet.io parser
1. Element aliases are not supported
2. Implied tag names are not supported
3. `a{text}` instead of `a>{text}` is not supported
4. Operator `^` is not supported
5. Expandos are not supported
6. Boolean attributes (attributes are boolean by default)
7. Default attributes are not supported
8. Short tags are not supported

## Do not be crazy with microtemplates!
Several recommendations from the [emmet docs](http://docs.emmet.io/):

> Abbreviations are not a template language, they don’t have to be “readable”, they have to be “quickly expandable and removable”.
>
> You don’t really need to write complex abbreviations. Stop thinking that “typing” is the slowest process in web-development. You’ll quickly find out that constructing a single complex abbreviation is much slower and error-prone than constructing and typing a few short ones.

## Browser support
#### Desktop
* Chrome
* Safari 6.0+
* Firefox 16+
* Opera 12.10+
* Internet Explorer 8+ (see [notes](https://github.com/chemerisuk/better-dom#notes-about-old-ies))

#### Mobile
* iOS Safari 6+
* Android 2.3+
* Chrome for Android

[npm-url]: https://www.npmjs.com/package/better-emmet-plugin
[npm-version]: https://img.shields.io/npm/v/better-emmet-plugin.svg
[npm-downloads]: https://img.shields.io/npm/dt/better-emmet-plugin.svg

[travis-url]: http://travis-ci.org/chemerisuk/better-emmet-plugin
[travis-image]: http://img.shields.io/travis/chemerisuk/better-emmet-plugin/master.svg

[coveralls-url]: https://coveralls.io/r/chemerisuk/better-emmet-plugin
[coveralls-image]: http://img.shields.io/coveralls/chemerisuk/better-emmet-plugin/master.svg

[bower-url]: https://github.com/chemerisuk/better-emmet-plugin
[bower-image]: http://img.shields.io/bower/v/better-emmet-plugin.svg

repository: TCIT/webpack-duplication-sample

repo_name: TCIT/webpack-duplication-sample


text:
---
layout:     post
title:      Flattened MITRE ATT&CK Matrix
date:       2017-09-05 00:00:00
time:   5
summary:    MITRE ATT&CK Matrix flattened and mapped by category to threat actor groups and software examples of each attack.

categories: mitre attack matrix flattened threat actor mapping

author: austin_taylor
author_github: austin-taylor
---

Inspired by MITRE

![HTTPMAP]({{ site.base }}/images/mitre_attack_matrix.png){: class="center-image" height="250px"}

This version contains all matrix categories mapped to techniques with examples of application by software or threat actor groups. It also includes visibility sources required to detect the attack, permissions required for the attack to be successful, whether or not network access is required, which defense is bypassed and a vignette on each example.

I find it useful to filter on visibility sources to help determine your organization's strengths and weaknesses in continuous monitoring.

Non-embedded version available

Hope you found this useful and if you have any questions or suggestions, please post them in the comments section below.


text:
# HTTPS and HTTP/2

You can enable HTTPS and HTTP2 support by adding `ssl` section into `http` config.

```yaml
http:
  # host and port separated by semicolon
  address: <IP_ADDRESS>:8080

  ssl:
    # host and port separated by semicolon (default :443)
    address: :8892
    redirect: false
    cert: fixtures/server.crt
    key: fixtures/server.key
    root_ca: root.crt

  # optional support for http2
  http2:
    h2c: false
    max_concurrent_streams: 128
```

### Let's Encrypt

RR starting from the `v2.5.0` can automatically obtain TLS certificates for your domain. The folder with your certs might be moved between servers, RR will check the `certs_dir` and obtain a new certificate if the old one is above to expire.
RR will track your certificate's expiration date and refresh it automatically.

### Configuration

```yaml
http:
  # other HTTP sections are omitted
  # .......

  ssl:
    address: '<IP_ADDRESS>:443'
    # ACME section
    #
    # TLS provider
    acme:
      # directory to store your certificate and key from the LE
      #
      # Default: rr_cache_dir
      certs_dir: rr_le_certs
      # Your email
      #
      # Mandatory. Error on empty.
      email: you-email-here@email
      # Alternate port for the HTTP challenge (make sure, that you redirected traffic to the specified port from 80)
      #
      # Default: 80
      alt_http_port: 80
      # Alternate port for the TLS-ALPN challenge (make sure, that you redirected traffic to the specified port from 443)
      #
      # Default: 443
      alt_tlsalpn_port: 443
      # Challenge type to use
      #
      # Default: http-01
      challenge_type: http-01
      # Use staging or production endpoint
      #
      # Would be a good practice to test your setup, before obtaining a real certificate
      use_production_endpoint: false
      # List of your domains
      #
      # Mandatory. Error on empty
      domains:
        - your-cool-domains.here

 # other HTTP sections are omitted
 # ........
```

### Redirecting HTTP to HTTPS

To enable an automatic redirect from `http://` to `https://` set `redirect` option to `true` (disabled by default).

### HTTP/2 Push Resources

RoadRunner support [HTTP/2 push](https://en.wikipedia.org/wiki/HTTP/2_Server_Push) via virtual headers provided by PHP
response.

```php
return $response->withAddedHeader('http2-push', '/test.js');
```

Note that the path of the resource must be related to the public application directory and must include `/` at the
beginning.

> Please note, HTTP2 push only works under HTTPS with `static` service enabled.

## H2C

You can enable HTTP/2 support over non-encrypted TCP connection using H2C:

```yaml
http:
  http2.h2c: true
```

### FastCGI

There is FastCGI frontend support inside the HTTP module, you can enable it (disabled by default):

```yaml
http:
  # HTTP service provides FastCGI as frontend
  fcgi:
    # FastCGI connection DSN. Supported TCP and Unix sockets.
    address: tcp://<IP_ADDRESS>:6920
```

### Root certificate authority support

Root CA supported by the option in .rr.yaml

```yaml
http:
  ssl:
    root_ca: root.crt
```

repository: aleksandrbrlq/roadrunner-docs

repo_name: aleksandrbrlq/roadrunner-docs


text:
# Tabel - node.js ORM for postgres

### `npm install --save table@1`

## A simple orm for postgres built over [knex.js](http://knexjs.org/) which works with simple javascript objects and arrays. More of a table gateway that can behave like an orm, and scale back down to a a table-gateway when needed.

#### MIT License

`npm install --save tabel`

### Sections

- [Philosophy](#philosophy)
- [Getting Started](#getting-started)
- [Migrations](#migrations)
- [Table Declarations](#table-declarations)
- [Query Building](#query-building)
- [Data Retrieval](#data-retrieval)
- [Data Mutation](#data-mutation)
- [Scopes and Joints and Forking](#scopes-and-joints-and-forking)
- [Relationships and Eagerloading](#relationships-and-eagerloading)

### Philosophy

**Tabel** was born out of the need felt for a simple Object-Relational-Mapper for Postgres, nothing more.

Its salient features are full fledged relation management, while working with simple
_javascript objects and arrays_. This fits right in with postgres' __jsonb__ data type.

It is a thin layer over the really awesome [knex.js](http://knexjs.org/) query builder.
It allows you to define table-gateways which can eager-load and manage relations, while giving you the
ability to drop down to knex, or raw sql when you need to.

This way, **Tabel** helps you with rapid development with relation management, etc, and steps out of your
way when you need to take control of your database.

And since it works with plain javascript objects and arrays, its a breeze to make it work with other data sources like elastic-search etc. **Data is just data**.

### Getting Started

First you need to get an instance of **Tabel** orm. Its best that you define one orm instance(per db), and export `orm.exports` a module
```js
const Tabel = require('tabel');

const orm = new Tabel({
  db: {
    client: 'postgresql',
    connection: {
      database: 'api_dev',
      host: 'localhost',
      port: 5432,
      user: 'dev',
      password: 'dev'
    },
    pool: {
      min: 2,
      max: 10
    },
    migrations: 'knex_migrations'
  },
  // redis config is optional, is used for caching by tabel
  redis: {
    host: 'localhost',
    port: '6379',
    keyPrefix: 'dev.api.'
  }
});

// all the table definitions go here

module.exports = orm.exports;
/**
This is what the exports look like:

this.exports = {
  orm: this,
  table: this.table.bind(this),
  trx: this.trx.bind(this),
  raw: this.raw.bind(this),
  migrator: this.migrator,
  cache: this.cache,
  knex: this.knex,
  isUsableObject
};
**/

```
You need to define your tables for the orm. These tables must already exist in the database. You can use [migrations](#migrations) helper provided by **Tabel** to get a quick cli based migrations tool.
```js
orm.defineTable({
  name: 'users'
});

orm.defineTable({
  name: 'posts'
});

orm.defineTable({
  name: 'photos'
});

orm.defineTable({
  name: 'tags'
});

// you can now use them like this in some other model, like your routes

const app = module.exports = require('express')();

const {table} = require('orm');

app.get('/posts', async (req, res) => {
  const posts = await table('posts').all();
  res.send({posts});
});

```

### Migrations

Tabel provides support for migrations using knex.js.
To use db migrations cli tool in your project, do the following

- Create a file `migrate.js` in your project root
- Paste the following in that file:

```js
const migrate = require('tabel/lib/migrate');
const ormConfig = require('./config'); // same as shown in "Getting Started"

migrate(config);

```
- Now run `node migrate.js` or make `migrate.js` an executable and run `./migrate.js`

__Available commands__

1. `make`: Make a new migration
2. `latest`: Migrate to latest migration
3. `rollback`: Rollback the last batch of migrations
4. `version`: View the number of current batch of migration
5. `reset`: Reset all migrations
6. `refresh`: Reset all migrations and migrate back to the latest

### Table Declarations

Below is an example of a complete table definition with default values.
```js
orm.defineTable({
  // the table's name, is required, should be a string
  name: null,

  // table properties
  props: {
    key: 'id',
    // default key column, can be ['user_id', 'post_id'] for composite keys

    autoId: false,
    // set this to true if you want the orm to generate a 36 character
    // uuid for your inserts. The orm checks for uniqueness of the uuid
    // when its generating it.
    // Can generate composite keys.
    // If using autoId on postgres, use uuid column for your key(s)
    // If using autoId on any other db, use a 36 length varchar

    perPage: 25,
    // standard batch size per page used by `forPage` method
    // table.forPage(page, perPage) method uses offset
    // avoid that and use a keyset in prod (http://use-the-index-luke.com/no-offset)

    timestamps: false
    // set to `true` if you want auto timestamps or
    // timestamps: ['created_at', 'updated_at'] (these are defaults when `true`)
    // will be assigned in this order only
  },

  // predefined scopes on the table. Will talk about them more in scopes and joints section. `this` will be bound to the table instance.
  scopes: {},

  // predefined joints on the table. Will talk about them more in scopes and joints section. `this` will be bound to the table instance.
  joints: {},

  // relations definitions for the table. Will talk about them more in scopes and joints section. `this` will be bound to the table instance.
  relations: {},

  // standard method definitions that you want to define for the table.
  // `this` will be bound to the table instance
  methods: {}
});
```

### Query Building
Query building in **Tabel** is a very thin layer over [**knex.js**](http://knexjs.org), along
with caching and relation eager-loading facilities. Below is a list of all query building methods
offered. All these methods are **chainable**, and return the instance of class `Table`
that they are called on

```js
/**
 * Usage example for query building:
 */
import {table} from './orm'; // refer to "Getting Started" section

const posts = await table('posts').where('title', '=', 'fizz').orWhere('title', '=', 'buzz').all();

const postsTable = table('posts');
postsTable.whereIn('id', ids)
postsTable.where('published_on', '>', lastMonthDateTime);
postsTable.where('is_active', true);

postsTable.all().then((posts) => { /* do things with `posts` here */});

// the || thing here postgres string concatenation dialect
table('tags').whereRaw(`lower(name) like '%'||lower(?)||'%'`, 'foo').all();

// suppose 'post_tag' is a table containing the columns 'post_id' & 'tag_id'
table('post_tag').whereIn(['post_id', 'tag_id'], [{post_id: 1, tag_id: 1}, {post_id: 1, tag_id: 2}]).all()

/**
 * don't scope any rows
 * @return {this} current instance
 */
whereFalse()

/**
 * apply a where condition on the key(s) with scopes as planned
 * @param  {mixed} val value(s) to match the key(s) against
 * @return {this} current instance
 *
 * whereKey(1)
 * whereKey({id: 1})
 * whereKey({post_id: 1, tag_id: 2})
 * whereKey([1,2,3,4]);
 * whereKey([{post_id: 1, tag_id: 2}, {post_id: 1, tag_id:2}])
 */
whereKey(val)

/**
 * apply an orWhere condition on the key(s) with scopes as planned
 * @param  {mixed} val value(s) to match the key(s) against
 * @return {this} current instance
 *
 * orWhereKey(1)
 * orWhereKey({id: 1})
 * orWhereKey({post_id: 1, tag_id: 2})
 * orWhereKey([1,2,3,4]);
 * orWhereKey([{post_id: 1, tag_id: 2}, {post_id: 1, tag_id:2}])
 */
orWhereKey(val)

/**
 * scope a where condition
 * @param  {mixed} args conditions
 * @return {this} current instance
 *
 * where({field1: val1, field2: val2})
 * where(field, val)
 * where(field, operator, val)
 */
where(...args)

/**
 * scope an orWhere condition
 * @param  {mixed} args conditions
 * @return {this} current instance
 *
 * orWhere({field1: val1, field2: val2})
 * orWhere(field, val)
 * orWhere(field, operator, val)
 */
orWhere(...args)

/**
 * scope a whereNot condition
 * @param  {mixed} args conditions
 * @return {this} current instance
 *
 * whereNot({field1: val1, field2: val2})
 * whereNot(field, val)
 * whereNot(field, operator, val)
 */
whereNot(...args)

/**
 * scope an orWhereNot condition
 * @param  {mixed} args conditions
 * @return {this} current instance
 *
 * orWhereNot({field1: val1, field2: val2})
 * orWhereNot(field, val)
 * orWhereNot(field, operator, val)
 */
orWhereNot(...args)

/**
 * scope a whereIn condition
 * @param  {string} field field name
 * @param  {[mixed]} vals values to match against
 * @return {this} current instance
 *
 * whereIn('id', [1,2,3,4])
 * whereIn(['user_id', 'post_id'], [{user_id: 1, post_id: 2}, {user_id: 3, post_id: 5}])
 */
whereIn(field, vals=[])

/**
 * scope an orWhereIn condition
 * @param  {string} field field name
 * @param  {[mixed]} vals values to match against
 * @return {this} current instance
 *
 * orWhereIn('id', [1,2,3,4])
 * orWhereIn(['user_id', 'post_id'], [{user_id: 1, post_id: 2}, {user_id: 3, post_id: 5}])
 */
orWhereIn(field, vals=[])

/**
 * scope a whereNotIn condition
 * @param  {string} field field name
 * @param  {[mixed]} vals values to match against
 * @return {this} current instance
 *
 * whereNotIn('id', [1,2,3,4])
 * whereNotIn(['user_id', 'post_id'], [{user_id: 1, post_id: 2}, {user_id: 3, post_id: 5}])
 */
whereNotIn(field, vals=[])

/**
 * scope a orWhereNotIn condition
 * @param  {string} field field name
 * @param  {[mixed]} vals values to match against
 * @return {this} current instance
 *
 * orWhereNotIn('id', [1,2,3,4])
 * orWhereNotIn(['user_id', 'post_id'], [{user_id: 1, post_id: 2}, {user_id: 3, post_id: 5}])
 */
orWhereNotIn(field, vals=[])

/**
 * scope a whereNull condition
 * @param  {string} field field name
 * @return {this} current instance
 */
whereNull(field)
/**
 * scope an orWhereNull condition
 * @param  {string} field field name
 * @return {this} current instance
 */
orWhereNull(field)

/**
 * scope a whereNotNull condition
 * @param  {string} field field name
 * @return {this} current instance
 */
whereNotNull(field)

/**
 * scope an orWhereNotNull condition
 * @param  {string} field field name
 * @return {this} current instance
 */
orWhereNotNull(field)

/**
 * scope a whereBetween condition
 * @param  {string} field field name
 * @param  {[mixed]} range range of vals
 * @return {this} current instance
 */
whereBetween(field, [min, max])

/**
 * scope a orWhereBetween condition
 * @param  {string} field field name
 * @param  {[mixed]} range range of vals
 * @return {this} current instance
 */
orWhereBetween(field, [min, max])

/**
 * scope a whereNotBetween condition
 * @param  {string} field field name
 * @param  {[mixed]} range range of vals
 * @return {this} current instance
 */
whereNotBetween(field, [min, max])

/**
 * scope a orWhereNotBetween condition
 * @param  {string} field field name
 * @param  {[mixed]} range range of vals
 * @return {this} current instance
 */
orWhereNotBetween(field, [min, max])

/**
 * scope a whereRaw condition
 * @param  {string} condition raw where condition
 * @param  {[mixed]} bindings condition bindings
 * @return {this} current instance
 */
whereRaw(condition, bindings)

/**
 * scope a orWhereRaw condition
 * @param  {string} condition raw where condition
 * @param  {[mixed]} bindings condition bindings
 * @return {this} current instance
 */
orWhereRaw(condition, bindings)

/**
 * scope a transaction
 * @param  {knex.transaction} trx the ongoing transaction
 * @return {this} current instance
 */
transacting(trx)

/**
 * scope for a page number
 * @param  {int} page page number
 * @param  {int} perPage records per page
 * @return {this} current instance
 */
forPage(page, perPage)

/**
 * apply a scope which sets an offset
 * @param  {int} offset offset to be set on the query
 * @return {this} current instance
 */
offset(offset)

/**
 * apply a scope which sets a limit on the query
 * @param  {int} limit limit to be set on the query
 * @return {this} current instance
 */
limit(limit)

/**
 * apply a scope which sets an order on the query
 * @param  {string} field column by which to order
 * @param  {string} direction should be 'asc', 'desc'
 * @return {this} current instance
 */
orderBy(field, direction)

/**
 * apply a scope which sets an orderByRaw on the query
 * @param  {string} sql sql for the order by
 * @param {array} bindings bindings for orderByRaw
 * @return {this} current instance
 */
orderByRaw(sql, bindings)
/**
 * apply a scope which sets a groupBy on the query
 * @param  {...string} args columns to group by
 * @return {this} current instance
 */
groupBy(...args)

/**
 * apply a scope which sets a groupByRaw on the query
 * @param  {string} sql sql for the group by
 * @param {array} bindings bindings for groupBy
 * @return {this} current instance
 */
groupByRaw(sql, bindings)

/**
 * apply a scope which sets a having clause on the query
 * @param  {string} col column
 * @param  {op} op  operator
 * @param  {val} val value
 * @return {this} current instance
 */
having(col, op, val)
/**
 * apply a scope which sets a having clause on the query
 * @param  {string} sql sql string for the having clause
 * @param  {array} bindings bindings for the sql
 * @return {this} current instance
 */
havingRaw(sql, bindings)

/**
 * apply a scope which sets a distinct clause on the query
 * @return {this} current instance
 */
distinct()

/**
 * apply a scope to select some columns
 * @param  {mixed} cols the columns to select
 * @return {this} current instance
 */
select(cols)

/**
 * apply a scope to join a table with this Table
 * @param {string} tableName to join
 * @param {...mixed} args join conditions
 * @return {this} current instance
 */
join(tableName, ...args)
/**
 * apply a scope to leftJoin a table with this Table
 * @param {string} tableName to join
 * @param {...mixed} args join conditions
 * @return {this} current instance
 */
leftJoin(tableName, ...args)

/**
 * apply a scope which enables a cache on the current query
 * @param  {int} lifetime lifetime in milliseconds
 * @return {this} current instance
 */
cache(lifetime)
/**
 * apply a scope which sets the flag for destruction of cache
 * @return {this} current instance
 */
uncache()

/**
 * add a scope to eager-load various relations
 * @param  {...mixed} eagerLoads relations to eager-load with constraints, {} or []
 * @return {this} current instance
 */
eagerLoad(...eagerLoads)
```

### Data Retrieval

There are 4 methods through which you retrieve data using **Tabel**. They are given below.
These methods honor the scopes applied on the table before their call, and can apply other scopes
based on the arguments provided to them.

```js
/**
 * Usage example for `first`. Use others similarly.
 */

 import {table} from './orm'; // refer to "Getting Started"

 table('posts').first();
 table('posts').first('title', 'Foo');
 table('posts').first('published_on', '<', new Date());
 table('posts').first({is_active: true});
 table('posts').where('id', 'in', ids).first();
 table('posts').where('published_on', '<', new Date()).first({is_active: true});

/**
 * get the first row for the scoped query
 * @param  {...mixed} args conditions for scoping the query
 * @return {Promise} promise which resolves the result
 */
first(...args)

/**
 * get all rows from the scoped query
 * @param  {...mixed} args conditions for scoping the query
 * @return {Promise} promise which resolves the result
 */
all(...args)

/**
 * get count of the scoped result set. works well
 * even when you have groupBy etc in your queries
 * as it gives the count of the result of the current query
 * @param  {...mixed} args conditions for scoping the query
 * @return {int} count of the result set
 */
count(...args)

/**
 * find a single model for supplied conditions. similar to first,
 * but you can also just call it with
 * @param  {...mixed} args conditions for finding the model
 * @return {Promise} promise for found model
 *
 * find(id)
 * find({field1: val1, field2: val2})
 */
find(...args)
```

### Data Mutation

There are three ways to mutate data using **Tabel**.
1. Insert
2. Update
3. Delete

All of them return a `Promise`. Details below:
```js

const {table} = require('orm');

// Insert
table('posts').insert({title: 'Foo', body: 'Lorem Ipsum'})
  .then((model) => {
    // inserted object. id will be included if `autoId` is true
    return model
  })
;

table('posts').insert([
  {title: 'Bar', body: 'fizz buzz'},
  {title: 'Baz', body: 'foo bar'}
]).then((models) => {
  // inserted array of objects. ids will be included if `autoId` is true
  return models
});

// ------------------------------------------------------------------------

// Update
table('posts').where('title', 'Foo').update({title: 'Fizz', body: 'foo bar'})
  .then(() => {
    // nothing relevant returned in this sort of update
    // perform next ops here
  })
;

table('posts').update(post.id, {title: 'Bar', body: 'fizz buzz'})
  .then((model) => {
    // updated model returned
    return model;
  })
;

// ------------------------------------------------------------------------

// Delete
table('posts').where('title', 'Foo').delete()
  .then(() => {
    // nothing relevant returned
    // perform next ops here
  })
;

table('posts').delete(post.id);
table('posts').delete('title', 'Foo');
table('posts').delete({title: 'Foo'});
table('posts').delete('title', '=', 'Foo')
```

### Scopes and Joints and Forking

__Tabel__ brings in a few new concepts which help you make a domain-query-language to work with your database in context
of your software. Using these concepts is explained below:

```js

// Scopes
// Use these to create a shorthand for often repeated query conditions
orm.defineTable({
  name: 'posts'
  ...
  scopes: {
    // style of syntax is important, as these functions need to use Function.bind
    // to set the proper value of `this`
    wherePublished() {
      return this.where('is_published', true);
    }
  }
});

// Now you can do
const {table} = orm.exports;
table('posts').wherePublished().all().then((posts) => {
  // do something with posts
});

// ----------------------------------------------------------------------

// Joints
// You'd rarely use this feature, because of the awesome relationships.
// Still, worth going through.
orm.defineTable({
  name: 'posts'
  ...
  joints: {
    joinTagsPivot() {
      return this.joint((q) => {
        // knex.js join syntax works here
        q.join('post_tag', 'post_tag.post_id', '=', 'posts.id');
      });
    },

    joinTags() {
      return this.joinTagsPivot().joint((q) => {
        q.join('tags', 'post_tag.tag_id', '=', 'tags.id');
      });
    }
  }
});

const {table} = orm.exports;

// joints are like scopes, however, they are applied *only once*.
// So you can do this:
table('posts').joinTagsPivot().joinTags().where('tags.id', 'in', ids).all();
// And the table 'post_tag' will only be joined once

// ----------------------------------------------------------------------

// Forking
// best explained by an example

const postsTable = table('posts').where('id', 'in', ids);
const activePostsTable = postsTable.fork().where('is_active', true);
const inactivePostsTable = postsTable.fork().where('is_active', false);

Promise.all([postsTable.all(), activePostsTable.all(), inactivePostsTable.all()])
  .then(([allPosts, activePosts, inactivePosts]) => {
    // do something with this data
  })
;

```

### Relationships and Eagerloading

__Tabel__ supports 8 different types of relationships between tables. The relationships of a table need to be defined
along with table definition. Relationships also provide functionality to join related, pivot, and through tables in the current query.
I seriously advice you to go through the code for relationships [here](https://github.com/fractaltech/tabel/tree/master/src/relations)
to discover the full power they provide.

```js
orm.defineTable({
  name: 'posts'
  ...
  relations: {
    author() {
      return this.belongsTo('users', 'user_id');
    },

    tags() {
      return this.manyToMany('tags', 'post_tag', 'post_id', 'tag_id');
    },

    comments() {
      return this.hasMany('comments', 'post_id');
    }
  }
});

// You can now do this:
table('posts').eagerLoad('author', 'tags', 'comments').all();
table('posts').author().join().where('users.username', '=', 'foo').all();
table('posts').author().leftJoin().where('users.username', '=', 'foo').all();
table('posts').tags().join().where('tags.name', 'in', tagNames).all();
table('posts').tags().joinPivot().where('post_tag.tag_id', 'in', tagIds).all();
table('posts').tags().leftJoinPivot().where('post_tag.tag_id', 'in', tagIds).all();

```

Different relationships given below:

```js
/**
 * get a new hasOne relation
 * @param  {string}  related related table name
 * @param  {string}  foreignKey foreign-key on related table
 * @param  {string}  key key to match with on this table
 * @return {HasOne}  HasOne relation instance
 */
hasOne(related, foreignKey, key) {
  // key = key || this.key();

  return new HasOne(this, this.table(related), foreignKey, key);
}

/**
 * get a new hasMany relation
 * @param  {string}  related related table name
 * @param  {string}  foreignKey foreign-key on related table
 * @param  {string}  key key to match with on this table
 * @return {HasMany} HasMany relation instance
 */
hasMany(related, foreignKey, key) {
  key = key || this.key();

  return new HasMany(this, this.table(related), foreignKey, key);
}

/**
 * get a new hasManyThrough relation
 * @param  {string}  related related table name
 * @param  {string}  through through table name
 * @param  {string}  firstKey foreign-key on through table
 * @param  {string}  secondKey foreign-key on related table
 * @return {HasManyThrough} HasManyThrough relation instance
 */
hasManyThrough(related, through, firstKey, secondKey) {
  return new HasManyThrough(
    this, this.table(related), this.table(through), firstKey, secondKey
  );
}

/**
 * get a new BelongsTo relation
 * @param  {string} related related table name
 * @param  {string} foreignKey foreign-key on this table
 * @param  {string} otherKey key to match on other table
 * @return {BelongsTo} BelongsTo relation instance
 */
belongsTo(related, foreignKey, otherKey) {
  related = this.table(related);
  otherKey = otherKey || related.key();

  return new BelongsTo(this, related, foreignKey, otherKey);
}

/**
 * get a new ManyToMany relation
 * @param  {string} related related table name
 * @param  {string} pivot pivot table name
 * @param  {string} foreignKey foreign-key on this table
 * @param  {string} otherKey other-key on this table
 * @param  {function} joiner extra join conditions
 * @return {ManyToMany} BelongsToMany relation instance
 */
manyToMany(related, pivot, foreignKey, otherKey, joiner=(() => {})) {
  return new ManyToMany(
    this, this.table(related), this.table(pivot), foreignKey, otherKey,
    joiner
  );
}

/**
 * get a new MorphOne relation
 * @param  {string} related related table name
 * @param  {string} inverse inverse relation ship name
 * @return {MorphOne} MorphOne relation instance
 */
morphOne(related, inverse) {
  related = this.table(related);

  return new MorphOne(this, related, related[inverse]());
}

/**
 * get a new MorphMany relation
 * @param  {string} related related table name
 * @param  {string} inverse inverse relation ship name
 * @return {MorphMany} MorphMany relation instance
 */
morphMany(related, inverse) {
  related = this.table(related);

  return new MorphMany(this, related, related[inverse]());
}

/**
 * get a new MorphTo relation
 * @param  {array} tables array of table names this relation morph's to
 * @param  {string} typeField  type-field name
 * @param  {string} foreignKey foreign-key name
 * @return {MorphTo} MorphTo relation instance
 */
morphTo(tables, typeField, foreignKey) {
  tables = tables.map((t) => this.table(t));

  return new MorphTo(this, tables, typeField, foreignKey);
}
```

repository: cuulee/tabel

repo_name: cuulee/tabel


text:
---
layout: default
title: Installing (Dir Studies 2017)
---
# Installing Software on a Mac

Tested on macOS 10, but should work on relatively recent OS X as well.

## Compiler code
   1. Install xcode using the App Store
   1. run `xcode-select --install` from command line
   1. Install [homebrew](http://brew.sh)
   3. install gcc (compilers) `brew install gcc --without-multilib`.
   4. install mpich (multi-core processing) `brew install mpich2`
   5. intstal netcdf (file storage) `brew install netcdf --with-fortran`

## Python

   1. Install [anaconda](https://www.continuum.io/downloads)  I use python 2.7 still, but I think just about everything now works w/ python 3.5
   2. Try `ipython --pylab`.  From that command line try something like `fig,ax=plt.subplots();ax.plot(np.arange(10))`.
   3. Try `jupyter-notebook` and open the webpage they suggest.  See their [website](http://jupyter.org) for demos and I'll give some example python notebooks soon.

## MITgcm

   1. Download the [source code](http://mitgcm.org/public/source_code.html).  Its a good idea to put this in a directory with the name the version you are running to avoid compatibility problems.  i.e. I keep a version at `~/MITgcmc66b/MITgcm` as that is the last version I downloaded.    I always get errors from the CVS snapshots.
   2. Clone my example project

   ```
   git clone https://github.com/jklymak/MITgcmExampleSteadyGauss.git
   ```

  and then follow the instructions at the project [README](https://github.com/jklymak/MITgcmExampleSteadyGauss/blob/master/README.md)


text:
# a2-cp3402-2019-team02
a2-cp3402-2019-team02 created by GitHub Classroom

#CP3402 Assignment 2 & Presentation
May 2019

#Team members:
- Hendrik Nel
- Broderick Thomsen
- Greg McLindon
- Dan Archer
- Kipngetich Kemei

# The Coffee Can
The Coffee Can is a cafe that offers a variety of foods, coffees, and sweet treats. This document outlines the development guidelines for The Coffee Can's website.

# Theme Details

Theme title: Team02

Theme version: 1.0.0

Authors: Hendrik Nel, Broderick Thomsen, Greg McLindon, Dan Archer & Kipngetich Kemei

Theme Description:
Team02 theme is a light theme designed for small business owners that require simple site with a small number of easy-to-maintain static pages and blog posts that aren’t effective dated so that site content has a timeless appeal for the business owner that infrequently updates site posts.

Theme preview:
![](Images/theme_preview.png)

## Getting Started
Coffeecan website consists of a Live site, staging site and several local development site for each team member.
Each team member has established the same development stack on their local pc consisting of the Wordpress installed on a WAMP server with phpMyAdmin database. We are all using PhpStorm IDE and have git version control on the Wordpress content files as well as a full export of both the staging site (located in the main branch) and the production site (located in the production branch).

Each team member also participates in the development of the site locally and pushes their edits to the master branch of the GitHub repository accessed by each team member. At the same time, each team also pushes the updates to the staging database using the ‘All-in-One WP Migration - https://en-au.wordpress.org/plugins/all-in-one-wp-migration/’ plugin via the plugins' import/export functionality, as well as uploading their export of the database onto the main branch of the github repository allowing for version control.

This means the staging site is always up to date and that all team members can then access the main repository, and import the most recent website export file into their local development website and begin their work.

The staging database is then pushed to the live site also using the 'All-in-One WP Migration' plugin as required by a designated team member.

In order to ensure that you are ready to begin contributing to the development of this project, you must ensure that you have downloaded and installed all of the outlined pre-requisite items. Once this has been completed successfully, please move on to the 'Installing' section.

## Prerequisites
What things you need to install and how to install them
1. Install Wampserver - https://sourceforge.net/projects/wampserver/
(Note: This is Window users only. Mac users can install MAMP - https://www.mamp.info/en/)
2. Download wordpress install zip file - https://wordpress.org/download/
3. The 'All-in-One WP Migration' plugin - https://en-au.wordpress.org/plugins/all-in-one-wp-migration/
4. The 'All-in-One WP Migration File Extension' - https://import.wp-migration.com/   Note: Download the one labeled 'Basic'

## Installing
1. Create new folder in WAMP localhost folder www - i.e. C:\wamp64\www\coffeecan_local
Note: this folder name is optional i.e. coffeecan_local1, coffeecan_local2 etc.

2. Extract contents of wordpress zip file to coffeecan_local folder
	a. OPTIONAL: If your folder structure is now: C:\wamp64\www\coffeecan_local\wordpress\ then copy all the content of the wordpress folder and paste it into the the ‘coffeecan_local’ folder. Then delete the ‘wordpress’ folder. This step makes the local url for your development site a little cleaner in later steps.

![](Images/step4a.png)

3. Turn on Wampserver.

![](Images/step5image1.png)![](Images/step5image2.png)![](Images/step5image3.png)

4. Open phpMyAdmin database that is packaged in WAMP server (leave settings at default i.e. root / blank password / mysql).

![](Images/step6image1.png)![](Images/step6image2.png)

5. Create a new database (name optional i.e. cc_local) (we will be syncing this database to the staging server so this is all that is required for now).

![](Images/step7image1.gif)![](Images/step7image2.png)

6. Open local site in browser: (URL: localhost/coffeecan_local/).

7. Complete Wordpress install (database details: cc_local \ root \ no password \ wp_ ).

![](Images/step9image1.png)![](Images/step9image2.png)

8. Complete the installation. Ensure to use a strong password and take note of your password.

![](Images/step10image1.png)
![](Images/step10image2.png)![](Images/step10image3.png)

9. Log into site.

![](Images/step11image1.png)![](Images/step11image2.png)

10.
	a. Install and activate plug-in called ‘All-in-One WP Migration’ (once activated it will be visible in installed plugins section of Wordpress dashboard).
	b. Increase file import limit on local site so can import the staging server backup: Download and install 'All-in-One WP Migration Import' (Basic version) from website (URL: https://import.wp-migration.com/
	For details information on how to do this refer (URL: https://help.servmask.com/knowledgebase/install-instructions-for-file-extension/)

11. Visit main branch of github repository https://github.com/cp3402-students/a2-cp3402-2019-team02 , download the latest website export that can be found there.

12. Via the 'All-in-One WP Migration' plugin, import the downloaded website export.

13. Done, you now have The most recent version of the staging website.

NOTE:
●	Your log in details to your local website may no longer be valid because we just overrode the user details in the local database with the users listed in the staging website.

To fix, log into the site using the admin account details:
- Username: admin
- Password: team2password
Then add yourself back as a user in the WordPress users page. Once you’ve done this, immediately sync your local environment to the staging environment so that your credentials are uploaded to the staging server.

### Deployment
Once finished with your work and all changes are tested and proven to be functional and without errors, export your new version of the website via the 'All-in-One WP Migration' plugin.

2. For Local -> Staging:
	- Export the new version of the website via the 'All-in-One WP Migration' plugin
	- Visit the staging website: http://<IP_ADDRESS>/
	- Access the wp-admin screen with the previously provided admin account details
	- Via the 'All-in-One WP Migration' plugin, import the file obtained during the beginning of the 'Local -> Staging' process
	- Follow the on-screen instructions until the import sucessfully completes
	- Finished, the staging site now contains the most recent version of the website

3. For Staging -> Production:
	Either
	- Visit the staging website at http://<IP_ADDRESS>/
	- Export the website via the 'All-in-One WP Migration' plugin
	- Visit the live website at http://<IP_ADDRESS>/
	- Import the new version of the website via the 'All-in-One WP Migration' plugin

	Or
	- Download the most recent website export file in the main branch of the github repository
	- Visit the live website at http://<IP_ADDRESS>/
	- Import the new version of the website via the 'All-in-One WP Migration' plugin

For accurate version control:
1. Upload the exported file onto the main branch of the github repository.
Note: Do not delete the existing one, as backups are important in case of any issues with new versions.

2. Replace the existing wp-content folder in the main branch of the github repository with the contents of your local websites' wp-content folder

3. Commit your changes to the main branch of the github repository (include all necessary/relevant comments detailing your commit).

## Style guide
- Background color: White (#FFFFFF)
- Header & Footer BG color: Yellow (#FAF245)
- Site font: Trebuchet MS
- Site font size: 16px
- Header font: Ramabhadra
- Header font size: 1.5em
- Site logo provided by client. Instructed not to amend logo design.

## Built With
- Wordpress: https://wordpress.org/
- WAMP: https://orion.managewp.com/
- All-in-One WP Migration plugin: https://en-au.wordpress.org/plugins/all-in-one-wp-migration/
- All-in-One WP Migration File Extension (Basic version): https://en-au.wordpress.org/plugins/all-in-one-wp-migration/

## Versioning
Versioning is largely handled by github via the use of commits to both the main and production branches of the github repository.

## Authors
- Kip Kemei :
	- Github - https://github.com/kkemei
	- LinkedIn - https://www.linkedin.com/in/kipngetich-kemei-b83381117/
- Broderick Thomsen :
	- Github - https://github.com/BroderickWST
	- LinkedIn - https://www.linkedin.com/in/broderick-thomsen-30a28b117/
- Greg McLindon :
	- Github - https://github.com/GregMcLindon
	- LinkedIn - https://www.linkedin.com/in/greg-mclindon-0ab54b186/
- Hendrik Nel :
	- Github - https://github.com/Comedy112
	- LinkedIn - https://www.linkedin.com/in/hendrik-nel-350175b5/
- Dan Archer :
	- Github - https://github.com/danarcher96
	- LinkedIn - https://www.linkedin.com/in/dan-archer-9801bb16b/

## License
This project is licensed under the MIT License - see the LICENSE.md file for details

## Acknowledgments
- All contributing members of the development team, with special thanks to: Kip Kemei, Broderick Thompson, Greg McLindon, Dan Archer, Hendrik Nel
- Sharon (the client - owner of The Coffee Can), for her excellent and expert feedback regarding the development of the website


text:
# Laptop Setup Time!

Run `mac.sh` on your shiney new Mac to get some links to items that still
need to be installed as well as recommended optional installs.

Instead of automatically installing software as some computer setups scripts
do, we instead provide links to the software's websites in case installation
instructions require attention. This has the positive side effect of not having
to rely on potentially third party installation scripts for the applications
you rely on to be secure.

## Testing

You can lint the application scripts by running `bin/lint` after installing
[shellcheck](https://github.com/koalaman/shellcheck).

repository: forklifters/laptop

repo_name: forklifters/laptop


text:
_These notes are from a supplementary meeting to the regular and more general JupyterLab accessibility meetings we've been holding. It was lead by @jasongrout._

# Walkthrough Phosphor Accessibility PRs Meeting Notes - 2020

## Attendees

- Jason Grout @jasongrout
- Martha @marthacryan
- Alex @ajbozarth
- Karla @karlaspuldaro
- Alek @biniona
- Gonzalo @goanpeca
- Isabela @isabela-pf

## Context

This is related to the [Web4All Hackathon](http://www.w4a.info/2019/hackathon/)
on Jupyter from 2019 at the [LightHouse SF](https://lighthouse-sf.org/).

Accessibility standards tend to be written based on HTML forms or
similar standard web use cases. Sometimes it's difficult to figure
out how that impacts JupyterLab since we use lots of things in ways
that weren't intended in the design of such standards.

Some people worked on the "low-hanging fruit" in JupyterLab (like
dialogs) and some people started working on Phosphor since it makes
architectural decisions that interfere accessibility higher up.

- Menus and tabs are the main focuses of the Phosphor work

  - Menus use virtual DOM
  - Menus have been relatively straightforward
  - Tabs have caused some more difficulty

- In menus right now, any menu items can be "checked," but you
  don't have any indication of which menu items can be checked or
  not, it is inferred from the context. Whether or not something can
  have these different states is not accessible information. - This is probably the least controversial change because: - It's backwards compatible - Makes sensible defaults - Small PR - Incremental PR - This might be a good place to start merging. - Should these be the goals we reach for (when relevant) to be
  able to make progress in this area?
  Trying to understand ARIA standards. If/when we talk to experts,
  asking them which tutorials/docs to use (to avoid deprecated ones)
  is a good question.
- There seem to be a few main types of work needed:
  - Additive accessibility work. For example, add ARIA attribute
    and any needed infrastructure to make it possible or consistent
    to call whatever is needed.
  - Reworking existing structure. This tends to be harder and
    create more difficult to resolve discussions.
  - Figuring out what has not been found as an issue yet.
    Exploring other problems.

## WIP Repos

Where a lot of this work lives. Closed issues were pulled upstream.
Open issues hold discussions and work that still needs to be done.

- https://github.com/diagram-codesprint/Web4AllHackathon2019
- https://github.com/diagram-codesprint/jupyterlab
- https://github.com/diagram-codesprint/phosphor

## Relevant PRs and Issues

- https://github.com/phosphorjs/phosphor/pull/404
- https://github.com/phosphorjs/phosphor/pull/405
- https://github.com/phosphorjs/phosphor/pull/406
- https://github.com/jupyter/accessibility/issues/11
- https://inclusive-components.design
- https://github.com/jupyterlab/lumino/issues/81
- https://github.com/phosphorjs/phosphor/pull/406
- https://github.com/jupyterlab/jupyterlab/issues/911#issuecomment-562304755
- https://github.com/jupyter/accessibility
- https://github.com/phosphorjs/phosphor/pull/392

## Miscellaneous Notes

- Lumino needs to be really stable, so will probably need to
  collect changes for a big release to make changes there.
- Things to check:
  - Does this follow Sina's outline of what we need to do?
  - Is this still what we need to do? Has ARIA or other standards
    progressed where we need to reasses?
- When the DOM can reflect what is currently visible on the screen,
  that tends to be a good thing. - If your DOM had an iframe, it used to break enough that it
  made people ask "Maybe we shouldn't be messing with the DOM
  all the time?"" So it was rewrittem the way this works as a
  flat structure. This is terrible for accessibility since there
  is no longer clear indication of what is controlling what. - Semantic versus physical DOM. We're using a semantic DOM to
  address this flat DOM issue.
- Other discussions about tables. DOM as table? Notebooks as
  tables? This would make it easier for screen readers to jump
  around the structure. We don't know where this discussion is
  right now.

## Next steps?

- Split existing PRs between people so that we can make progress
  on problems we already know we have - Get these to be merged or at a state where they could be
  merged and get review from experts/other relevant community
  buy-in
- Get up to speed enough that discussions with experts will not
  waste their time
- Show energy, commitment, and active development on our side so
  that we can gain momentum.
- Collect the lists of issues that have already been found so we
  know what we can d
- Do some reading on relevant standards (ARIA) so we have the
  knoweledge to have meaningful conversations
- Move Phosphor PRs over to Lumino
- Walk through Phosphor https://www.youtube.com/watch?v=GCp4lxOblxg&list=PLFx5GKe0BTjQyCKtiK9TI-ekSuSn_8a3J&index=1
- Is there a way that we can set up a binder image with one of
  these PRs so that it can be easier to help community and/or
  accessibility experts jump in more easily?
- Move all issues we find into the jupyer/accessibility repo so
  that we have an easier list to revisit as we work. https://github.com/jupyter/accessibility/

repository: jupyter/accessibility

gha_language: Python

repo_name: jupyter/accessibility


text:
# data-vs-time

Datavstime (DvT) is a browser based application for visualization of
time-series data. You can use the software directly on the
datavstime.com website, or you
can take a copy of this repository and deploy it locally. Deploying DvT
is as simple as copying all the files to a web server and pointing your
browser at the index.html file. Note that all application state is stored
in cookies / web local storage - there is no server side component.

Currently the most well supported data source is prometheus. There is also basic support for InfluxDb (with comprehensive support planned). You can also write your own custom data source and connect to it with the proxy adapter. For examples of this, see datavstime-examples on github.

## Overview

* DvT is a new tool for visualization of time-varying data.
* The concept is a bit novel. Time series are represented as blocks which can be grouped, re-grouped, moved, aggregated up, expanded out etc. along the axes of the multi-dimensional time-series labels (not all that is implemented yet!).
* This allows you to explore your data with ease - navigation is a defining feature of dvt.
* DvT makes use of WebGL for highly performant rendering, allowing for more than a thousand timeseries to be displayed and interacted with simultaneously.
* Blocks will be able to display different visualizations with different strengths and weaknesses. Currently, blocks can display stepped area charts or a generalization of this - horizon charts - which are a good visualization at smaller scales.
* My starting point for the concept was Mike Bostock's cubism but DvT adds navigation, multiple columns, grouping and additional interactivity.
* This is a preview release. It's still buggy and incomplete.
* All feedback is greatly appreciated. (matt [at] mhowlett [dot] com)

## Development Status

This is the first public release. It's rough around the edges, buggy and
there is a lot of optimization work to do. That said, it is starting to
get useful.

## License

The bundled / minified source is released under a
[3-clause BSD license](LICENSE.txt). Future versions of the software
may be released under different terms.

## Privacy

The data you are visualizing as well as meta-information about this data
(e.g. label names, number of labels etc) **remains private** - does not
leave your browser. DvT does however send some basic usage information
to the datavstime.com website which is stored and at some point will be
analyzed - what features of the software you are using and how often.
This allows me to better understand how people are using DvT so as to
make better decisions about where to direct future development effort.

## Dependencies

It is worth noting that DvT has two dependencies which are (currently)
provided by a CDN on the internet and not included in this distribution:

Font Awesome

Open Sans web font

repository: mhowlett/datavstime

repo_name: mhowlett/datavstime


text:
---
layout: project
title: Water Quality
thumbnail: sonde.png
editbutton: true
eov: Environment
---

# Downloads
Download the protocol documents, field- and laboratory sheets, and data entry spreadsheets from figshare:

| Protocol  | Link |
| ------------- | ------------- |
| Sampling Event and Environmental Monitoring  | https://doi.org/10.25573/serc.14555511 |

## Overview

The abiotic environment governs where and which species can occupy a given habitat. A number of methods exist for monitoring physical parameters such as temperature, salinity, and turbidity, including: continuously-monitoring sondes and loggers, instantaneous probes, and point measurements using physical equipment (eg, thermometers, refractometers, Secchi disks).

MarineGEO seeks to provide the tools to collect and inherit a variety of monitoring data. Here, you will find materials for reporting point measurements.

*If you have continuous data*, such as that from sondes or loggers, please contact us for further instructions.

## Measured parameters
  - Temperature (degrees Celsius)
  - Salinity (psu)
  - Turbidity (Secchi depth in m)


text:
# django-template
My custom django template, using this in case of racing with deadlines

# Getting started
## 1. Prerequisites
Install python distribution (conda), either miniconda or anaconda
```bash
make init conda=miniconda #default
or
make init conda=anaconda

then
export PATH=$PATH:$HOME/miniconda3/bin
or
export PATH=$PATH:$HOME/anaconda/bin
```

## 2. Install requirements
Install requirements with pip (bundled with both of the conda dist)
```bash
make requirements
```

## 3. Starting the DEV server
```bash
make start-dev
```

# Deploying the application
## 1. Build app.service for systemd
```bash
make build
```

## 2. Install and deploy into systemd
```bash
sudo make deploy
```

## 3. Restarting app
Changes to the django code will be automatically reloaded by gunicorn so technically no hard restart is needed to app service. However, just in case:
```bash
sudo make restart
```

### Notes:
If there is an error when using this template in Ubuntu Server, please install the following packages via apt.
```bash
sudo apt-get update && sudo apt-get install build-essential python3-dev
```

repository: sanadhis/django-template

repo_name: sanadhis/django-template


text:
# NanoBASIC

NanoBASIC is a version of the [BASIC](https://en.wikipedia.org/wiki/BASIC) programming language derived from a popular dialect for 1970s microcomputers known as [TinyBASIC](https://en.wikipedia.org/wiki/Tiny_BASIC). NanoBASIC is even simpler (or smaller, if you will) than TinyBASIC, hence the Nano designation.

## BASIC History

BASIC, originally developed in 1964 at Dartmouth College to provide non-science and math students a way to use computers, became the most popular programming language for personal computers in the 1970s through to the mid-1980s. Popular computers of the era, like the Commodore 64 and the Apple II, came with BASIC interpreters built-in. BASIC was therefore the way that many people interacted with early personal computers. For example, BASIC was Linus Torvalds first programming language on the Commodore VIC-20 in 1981.

Interestingly, Microsoft got its start in 1975 when Bill Gates and Paul Allen developed a BASIC interpreter for one of the first personal computers, the Altair 8800. Their company flourished when they ported their interpreter to other machines of the late 1970s. Microsoft BASIC was shipped with many personal computers, and became the de facto standard dialect of BASIC. Eventually Microsoft entered the operating system business with DOS in 1981 on the original IBM PC, but BASIC was the company's start. Now you'll be developing a BASIC interpreter too!

## NanoBASIC is Simple

As you've read, BASIC was intended to be easy to use for non-technical people. Hence, BASIC is a fairly simple programming language. The dialect we're developing, NanoBASIC, is imperative, but we'd barely even call it procedural. While it technically has a way of defining a "call to a subroutine" there is really nothing resembling a modern function in the sense of having parameters and return values.

Some versions of BASIC, like TinyBASIC and NanoBASIC, not only have no sense of a function, they also do not have loops or other modern control structures. Instead, all control is handled with `GOTO`s/`GOSUB`s, which are direct jumps to a specific line number of the program. These, coupled with if-statements, serve as the only way to control a TinyBASIC/NanoBASIC program.

### Comments and Line Numbers

Comments in NanoBASIC start with the `REM` designation and can finish with any string. Comments will not be processed at all by the interpreter.

Every non-comment line in NanoBASIC begins with a line number and is followed by a statement. Line numbers should always be increasing from the top of the source file to the bottom of the source file. So, the following line numbers are valid:

```
10 PRINT "Hello"
REM This is a comment
20 PRINT "Goodbye"
30 PRINT "WOW"
```

But this version is not

```
10 PRINT "Hello"
REM This is a comment
40 PRINT "Goodbye"
30 PRINT "WOW"
```

Its behavior is undefined. Programs that have `GOTO`/`GOSUB` statements and out-of-order line numbers will not function correctly. The programmer can pick arbitrary line numbers, as long as they are all in increasing order.

There are only six ways to start a statement in NanoBASIC: `PRINT`, `IF`, `GOTO`, `GOSUB`, `RETURN`, and `LET`. If you know these six statement types, you basically know the whole language. You can learn NanoBASIC in just a few minutes if you already know another programming language.

### `LET`, Variables, and Mathematical Expressions

`LET` binds a value to a variable. Like TinyBASIC, NanoBASIC is limited to 26 single letter variable names (A-Z) and all variables only have one type—16-bit integers. The following statement sets the variable `A` to `5`.

```
10 LET A = 5
```

`LET` must be followed by a variable name (A-Z) and an equal (`=`) sign. After that, any mathematical expression can appear. NanoBASIC mathematical expressions can be composed of variables, integer literals, and the operators for addition (`+`), subtraction (`-`), multiplication (`*`), division (`/`), and parentheses (`(` and `)`). In addition, one can negate any mathematical value in NanoBASIC with the negative (`-`) sign. Note that all math takes place in the realm of 16-bit signed integers. From this point forward in the guide, we will just refer to mathematical expressions as "expressions." The following are all valid uses of `LET`:

```
20 LET B = A
30 LET C = 23 - A
40 LET D = 5 * (24 + 25)
50 LET E = -(24 + 23 - (2 * (5 + 3)))
```

### `PRINT` Statements

`PRINT` is used for output to the console. Any string literal or expression can be output to the console. As in TINYBasic, NanoBASIC string literals can only contain the characters A-Z, a-z, spaces, and 0-9. String literals are wrapped in double quote characters (`"`).

```
10 PRINT "What a nice program"
20 PRINT "Who said sit down question mark"
30 PRINT "6734 spells HELP upside down sorta"
```

As mentioned, `PRINT` can also print any expression.

```
REM This was the first thing Paul Allen ran on the Altair 8800
70 PRINT 2 + 2
```

You can also supply, a comma-separated list of items (string-literals and expressions) to `PRINT`. All items printed will have tab characters between them. `PRINT` always finishes printing by inserting a newline character.

### `IF` Statements and Boolean Expressions

`IF` statements are like if-statements in other languages, but simpler and more succinct. They can only have a single boolean expression (there is no `&&` or `||` operator for example). They have no else-clause. And finally, they can only execute a single statement if they are true. The statement to execute on truth is always preceded by the literal `THEN`.

```
500 IF N < 10 THEN PRINT "Small Number"
700 IF V >= 34 THEN GOTO 20
```

Boolean expressions are mostly what you would expect. The opreators do differ slightly however from standard C-style operators. For instance, not-equal can be either `<>` or `><` in TinyBASIC/NanoBASIC. And equal is `=` not `==`.

### GOTO, GOSUB, and RETURN statements

A GOTO directly jumps to a line number with no way to go back. A GOSUB jumps to a line number, but a matching RETURN statement will send the program back to the line just after where the GOSUB was originally called.

```
10 GOTO 50
20 LET A = 10
40 RETURN
50 LET A = 5
60 GOSUB 20
REM RETURN returns to here; we expect A to be 10
70 PRINT A
```

## NanoBASIC Style

It is generally good style to write all keywords in BASIC in all capital letters. Because TinyBASIC/NanoBASIC variable names are obtuse, it's a good idea to include comments explaining any unclear variable names.

Unfortunately, it's normal for BASIC code to quickly become so-called "spaghetti code" full of `GOTO` statements. This is par-for-the-course and there's not much you can do about it in NanoBASIC if you want to write a program of any moderate complexity. Eventually, people becoming unhappy with the `GOTO` style of programming created the "structured programming" movement. Edsger Dijkstra famously wrote a letter called ["Go To Statement Considered Harmful"](https://en.wikipedia.org/wiki/Considered_harmful).

## Miscellaneous
- NanoBASIC is case-insensitive. This means that `LET A = 5` is the same as `let a = 5`.
- Behavior not described in this document is undefined.
- NanoBASIC does not properly handle overflows. How overflow calculations result is undefined.

## NanoBASIC is Purposely Damaged Goods

We wanted to give you a sense of what programming in TinyBASIC was like. It would've been arbitrarily easy to support all Swift string literals, or 64-bit integers in NanoBASIC, but instead you're getting the real 1970s experience.

repository: laurencemadsen/Nano-Basic

repo_name: laurencemadsen/Nano-Basic


text:
# Game of Life

[![Latest Release](https://img.shields.io/github/release/vanillaSlice/GameOfLife.svg)](https://github.com/vanillaSlice/GameOfLife/releases/latest)
[![Build Status](https://img.shields.io/travis/com/vanillaSlice/GameOfLife/master.svg)](https://travis-ci.com/vanillaSlice/GameOfLife)
[![Coverage Status](https://img.shields.io/coveralls/github/vanillaSlice/GameOfLife/master.svg)](https://coveralls.io/github/vanillaSlice/GameOfLife?branch=master)
[![License](https://img.shields.io/github/license/vanillaSlice/GameOfLife.svg)](LICENSE)

*The Game of Life* is a cellular automaton devised by mathematician John Conway.

In the game there exists a grid of cells, each of which can be in one of two states, *alive* or *dead*.
Every cell has eight neighbours (adjacent cells) which it interacts with. After each step in the game, the following
rules apply:

1. Any live cell with fewer than two live neighbours dies, i.e. underpopulation.
2. Any live cell with two or three live neighbours lives on to the next generation.
3. Any live cell with more than three live neighbours dies, i.e. overpopulation.
4. Any dead cell with exactly three live neighbours becomes a live cell, i.e. reproduction.

An example of cell interaction:

![Cell Interaction](/images/pattern-1.gif)

See [Wikipedia](https://en.wikipedia.org/wiki/Conway's_Game_of_Life) for more information on *The Game of Life*.

## Screenshot

![Screenshot](/images/screenshot-1.png)

## Getting Started

### Prerequisites

* [Java 8](https://www.oracle.com/technetwork/java/javase/overview/java8-2100321.html)
* [Gradle](https://gradle.org) (optional)

### Building

*If you don't want to build the project yourself, head to
[releases](https://github.com/vanillaSlice/GameOfLife/releases) and download one of the jar files from there.*

To build the project yourself:

1. Clone the project.
2. Navigate to the project directory in your terminal/command prompt.
3. If you have Gradle installed locally, run the Gradle Daemon:

    ```
    gradle clean buildFatJar
    ```

   If you don't have Gradle installed locally and are running on a Unix-like platform such as Linux or macOS, run:

    ```
    ./gradlew clean buildFatJar
    ```

   If you don't have Gradle installed locally and are running on Windows, run:

    ```
    gradlew clean buildFatJar
    ```

    This will create a jar file called `GameOfLife-all-1.1.0.jar` in `build/libs`.

### Running

To run the application double-click `GameOfLife-all-1.1.0.jar` or from your terminal/command prompt run:

```
java -jar GameOfLife-all-1.1.0.jar
```

## Technology Used

For those of you that are interested, the technology used in this project includes:

* [Java 8](https://www.oracle.com/technetwork/java/javase/overview/java8-2100321.html)
* [JavaFX](https://docs.oracle.com/javase/8/javase-clienttechnologies.htm) (for the GUI)
* [JUnit 5](https://junit.org/junit5/), [Mockito](https://site.mockito.org/) and
  [TestFX](https://github.com/TestFX/TestFX) (for testing)
* [Gradle](https://gradle.org) (for building and dependency management)

## Useful Links

Resources useful for the completion of this project:

* [The Game of Life on Wikipedia](https://en.wikipedia.org/wiki/Conway's_Game_of_Life)
* [Silkscreen](https://www.kottke.org/plus/type/silkscreen/index.html) (the font used in the GUI)

## License

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


text:
# COVID-CHATBOT

Provides real time updates and news about the ongoing COVID-19 pandemic. User can get information about the number of new cases on a particular date, deaths, recoveries, tests conducted, cases till a particular date, along witht latest news about the pandemic.
The bot is currently an MVP and other features such booking vaccination slots and looking for covid relief resources in different countries shall be added based on user feedback.


text:
---
layout: post
title: "#RPGaDAY2020 Day 29: Ride"
date: 2020-08-29 11:00:00 -0400
categories:
  - rpgs
  - rpgaday
---

I often handwave over long travel, especially when running games like Dungeons & Dragons. There _can_ be interesting encounters along the way--bandits, ruins, an injured person--but often the point is what happens at the destination. That's fine. However, that doesn't mean you can't have something that's a fun ride and the best example I can think of is the dinosaur race in [Tomb of Annihilation](https://dnd.wizards.com/products/tabletop-games/rpg-products/tomb-annihilation).

![Dinosaur race!](dinosaur-race.png)

This was clearly added purely for fun. The players can earn some benefits and maybe some favor with some wealthy patron, or perhaps they get connected with the right (or wrong) people. However, this is one of those things that can stand entirely on it's own for most people. This is just pure fun as you race a dinosaur through the streets of Port Nyanzaru, potentially having your dinosaur bite the other dinosaurs in an attempt to win first place.

Additionally, I can highly recommend the [Tomb of Annihilation Companion's](https://www.dmsguild.com/product/225854/Tomb-of-Annihilation-Companion) added content for the dinosaur race, in particular the course itself. It's a good--though quick--way to introduce the differences between the various parts of the city while also adding some obstacles and benefits along the way.