text:
Queries the subject element with the given CSS selector and forwards it to another assertion.

If the selector doesn't match anything it fails.

```js
var element = createElement(`
  <section>
    <h1>Numbers</h1>
    <hr>
    <ol data-test-id="numbers">
      <li>One</li>
      <li>Two</li>
      <li>Three</li>
    </ol>
  </section>
`);

expect(element, 'queried for', '[data-test-id=numbers] > li', 'to satisfy', [
  '<li>One</li>',
  '<li>Two</li>',
  '<li>Three</li>',
]);

expect(element, 'queried for first', 'hr', 'to have no children');
```

If you use the `first` flag, the first maching element will be forwarded to the next assertion:

```js
expect(element, 'queried for first', '[data-test-id=numbers]', 'to satisfy', {
  children: expect.it('to have length', 3),
});
```

If no matching element can be found you get the following error:

```js
expect(element, 'queried for first', '[data-test-id=emojies]', 'to satisfy', {
  children: expect.it('to have length', 666),
});
```

```output
expected
<section>
  <h1>Numbers</h1>
  <hr>
  <ol data-test-id="numbers">
    <li>One</li>
    <li>Two</li>
    <li>Three</li>
  </ol>
</section>
queried for first [data-test-id=emojies] to satisfy { children: expect.it('to have length', 666) }
  The selector [data-test-id=emojies] yielded no results
```

In case the next assertion fails you will get an error looking like this:

```js
expect(
  element,
  'queried for first',
  '[data-test-id=numbers]',
  'to have no children'
);
```

```output
expected
<section>
  <h1>Numbers</h1>
  <hr>
  <ol data-test-id="numbers">
    <li>...</li>
    <li>...</li>
    <li>...</li>
  </ol>
</section>
queried for first [data-test-id=numbers] to have no children
  expected
  <ol data-test-id="numbers">
    <li>One</li>
    <li>Two</li>
    <li>Three</li>
  </ol>
  to have no children
```

repository: unexpectedjs/unexpected-dom

repo_name: unexpectedjs/unexpected-dom


text:
# SpotsController
Working with the `SpotsController` works very similiar to interacting with any other controller. It inherits from `UIViewController` and `NSViewController` but it sports some core features that makes your everyday mundane tasks a thing of the past.

## The many faces of Spots

Because the framework can be used in a wide variety of ways, we have decided to include more than one example project. If you are feeling adventurous, you should take a peek at the [Examples](https://github.com/hyperoslo/Spots/tree/master/Examples) folder.

license: MIT

repository: harshattray/Spots

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: harshattray/Spots


text:
# Behavioral Cloning Project

Overview
---
This repository contains code and a trained Deep Learning Model that tries to mimic my driving behavior on a simulated track. Hence, the name Behavioral Cloning Project.

A Convolutional Neural Network was built using Keras, and it was trained on images collected while I was driving a simulated car on a simulated track (further details are provided below). It was ensured while driving to collect data that the car stayed in the middle of the road, also images were collected while steering the car into the center of the lane from sides of the road. So, the training images represented my driving behaviour. Also recorded along with the images are velocity, braking and steering angle of the vehicle associated with each image, which were also used in training. And, the network was trained to output steering angle.

The trained network was saved and used in driving the car autonomously around the track (steering angle was controlled by the network).

### Simulator
The simulator mentioned above can be downloaded from here. [Linux](https://s3-us-west-1.amazonaws.com/udacity-selfdrivingcar/Term1-Sim/term1-simulator-linux.zip) [Mac](https://s3-us-west-1.amazonaws.com/udacity-selfdrivingcar/Term1-Sim/term1-simulator-mac.zip) [Windows](https://s3-us-west-1.amazonaws.com/udacity-selfdrivingcar/Term1-Sim/term1-simulator-windows.zip)

+ Extract the downloaded zip file.
+ You will find an executable file inside, on launching the file the simulator will be loaded.

### Collecting Training Data
+ To collect training data on the launched simulator click "Training Mode". Then try driving few laps using arrow keys, to get accustomed with the simulator.
+ Once you are ready to collect the data click on the record button, choose the directory where you want to save, and start driving. The data will be automatically collected - frames of images from your driving.  (Below section has further details).

### Details of collected training data:

+ If the above step of collecting training data went well, you can see a folder with name "IMG" and file named "driving_log.csv" in the directory you chose to record the data.
+ The "IMG" folder has all the collected images (the frames of driving around the track).
+ NOTE: The images are clicked by three cameras mounted on the car simultaneously. There is a camera in the middle, left and right of the car.
+ The "driving_log.csv" file has seven columns, representing path to recorded center camera image, left camera image, right camera image, steering angle, throttle, break and speed respectively. Please note, the images will be present in the "IMG" folder, and other values are collect simultaneously along with the images.

<img src="./images_readme/driving-log-output.png" width="600" height="50" />

NOTE: Collect data in such a way that the network can be trained to work well in different situations - like recovering from the sides to the center of the road, also in opposite direction of the track (as the track is a circular track).

### Included folders and files in the repo:
* video/ (COntains the frames/images collected while driving car in simulator in Autonomous Mode). Details on how to run in Autonomous mode are provided below.
* model.py (script used to create and train the model. If you are training the model on your own data, change the variables pointing to the directory of the training data)
* drive.py (script to drive the car)
* model.h5 (a trained Keras model)
* Behavioral_Cloning_Writeup.pdf (a pdf file with detailed explaination on the network architecture and  more. Please do read the pdf)
* video.mp4 (a video recording of the vehicle driving autonomously around the track)

### Dependencies
This lab requires:

* [CarND Term1 Starter Kit](https://github.com/udacity/CarND-Term1-Starter-Kit)

The lab enviroment can be created with CarND Term1 Starter Kit. Click [here](https://github.com/udacity/CarND-Term1-Starter-Kit/blob/master/README.md) for the details.

## Details About Files In This Directory

### `model.py`

Use `model.py` to train and save the trained model. It saves the model as `model.h5`.
```sh
python model.py
```

### `drive.py`

Usage of `drive.py` requires you have saved the trained model as an h5 file, i.e. `model.h5`.

Once the model has been saved, execute the below command and start the simulator in the Autonomous Mode. The car will drive by itself:

```sh
python drive.py model.h5
```

#### Saving a video of the autonomous agent

```sh
python drive.py model.h5 video
```

The fourth argument, `video`, is the directory in which to save the images seen by the agent. If the directory already exists, it'll be overwritten.

### `video.py`

```sh
python video.py video
```

Creates a video based on images found in the `video` directory. The name of the video will be the name of the directory followed by `'.mp4'`, so, in this case the video will be `video.mp4`.

Optionally, one can specify the FPS (frames per second) of the video:

```sh
python video.py video --fps 48
```

Will run the video at 48 FPS. The default FPS is 60.


text:
# OptiMin

OptiMin is a corpus minimizer that uses a
[MaxSAT](https://en.wikipedia.org/wiki/Maximum_satisfiability_problem) solver
to identify a subset of functionally distinct files that exercise different code
paths in a target program.

Unlike most corpus minimizers, such as `afl-cmin`, OptiMin does not rely on
heuristic and/or greedy algorithms to identify these functionally distinct
files. This means that minimized corpora are generally much smaller than those
produced by other tools.

## Building

To build the `optimin` just execute the `build_optimin.sh` script.

## Running

Running `optimin` is the same as running `afl-cmin`:

```
./optimin -h
OVERVIEW: Optimal corpus minimizer
USAGE: optimin [options] <target program> [target args...]

OPTIONS:

Color Options:

  --color     - Use colors in output (default=autodetect)

General options:

  -C          - Keep crashing inputs, reject everything else
  -O          - Use binary-only instrumentation (FRIDA mode)
  -Q          - Use binary-only instrumentation (QEMU mode)
  -U          - Use unicorn-based instrumentation (unicorn mode)
  -f          - Include edge hit counts
  -i dir      - Input directory
  -m megs     - Memory limit for child process (default=none)
  -o dir      - Output directory
  -p          - Display progress bar
  -t msec     - Run time limit for child process (default=5000)
  -w csv      - Weights file

Generic Options:

  --help      - Display available options (--help-hidden for more)
  --help-list - Display list of available options (--help-list-hidden for more)
  --version   - Display the version of this program
```

Example: `optimin -i files -o seeds -- ./target @@`

### Weighted Minimizations

OptiMin allows for weighted minimizations. For examples, seeds can be weighted
by file size (or execution time), thus preferencing the selection of smaller (or
faster) seeds.

To perform a weighted minimization, supply a CSV file with the `-w` option. This
CSV file is formatted as follows:

```
SEED_1,WEIGHT_1
SEED_2,WEIGHT_2
...
SEED_N,WEIGHT_N
```

Where `SEED_N` is the file name (**not** path) of a seed in the input directory,
and `WEIGHT_N` is an integer weight.

## Further Details and Citation

For more details, please see the paper [Seed Selection for Successful
Fuzzing](https://dl.acm.org/doi/10.1145/3460319.3464795). If you use OptiMin in
your research, please cite this paper.

Bibtex:

```bibtex
@inproceedings{Herrera:2021:FuzzSeedSelection,
  author = {Adrian Herrera and Hendra Gunadi and Shane Magrath and Michael Norrish and Mathias Payer and Antony L. Hosking},
  title = {Seed Selection for Successful Fuzzing},
  booktitle = {30th ACM SIGSOFT International Symposium on Software Testing and Analysis},
  series = {ISSTA},
  year = {2021},
  pages = {230--243},
  numpages = {14},
  location = {Virtual, Denmark},
  publisher = {Association for Computing Machinery},
}
```

repository: HexHive/Evocatio

branch_name: refs/heads/main

gha_language: C

repo_name: HexHive/Evocatio


text:
[![Build Status](https://travis-ci.org/radicalbit/nsdb-kafka-connect.svg)](https://travis-ci.org/radicalbit/nsdb-kafka-connect)
[![codecov](https://codecov.io/github/radicalbit/nsdb-kafka-connect/coverage.svg?branch=master)](https://codecov.io/github/radicalbit/nsdb-kafka-connect?branch=master)
[![License](https://img.shields.io/github/license/radicalbit/nsdb-kafka-connect.svg)](LICENSE)

# NSDb Kafka Connect #

NSDb is a **time-series** database **streaming oriented**
optimized for the serving layer.

This repo contains the connector for sinking data into NSDb using kafka connect.

NSDb Kafka Sink allows you to write events from Kafka to Nsdb.
The connector takes the value from the Kafka Connect SinkRecords and inserts a new bit into NSDb.
Prerequisites

- Apache Kafka 0.10.x or above
- Kafka Connect 0.10.x or above
- NSDb 0.7.0 or above

# Configurations

## General Connector Configuration
The Kafka Connect framework requires the following in addition to any connectors specific configurations:

Name  | Description  | Type  | Value
--|---|---|--
name  |  Name of the connector | String  |  Anything unique across the Connect cluster
topics  | The topics to sink | String | comma separated list of topics used in the connector
tasks.max  | The number of tasks to be created across the connect cluster  | Int | Default value is 1
connector.class  | Connector FQCN  |  String | io.radicalbit.nsdb.connector.kafka.sink.NSDbSinkConnector

## Specific Nsdb Sink Configuration
Name  | Description  | Type  | Value
--|---|---|--
nsdb.host  | Hostname of the NSDb instance to connect to | String | default value is `localhost`
nsdb.port  | Port of the NSDb instance to connect to | Int | default value is `7817`
nsdb.kcql  | Kcql expressions used to map topic data to NSDb bits | String  | semicolon separated Kcql expressions.
Note: It's optional whether `nsdb.mapping.metrics` is set.
nsdb.db  | NSDb db to use in case no mappig is provided in the Kcql | String  |  If a mapping is provided in the Kcql this config will be overridden
nsdb.namespace  | NSDb db to use in case no mappig is provided in the Kcql | String  | If a mapping is provided in the Kcql this config will be overridden
nsdb.defaultValue | default value | Numeric | if a value alias is provided in the Kcql expression this config will be ignored
nsdb.metric.retention.policy | NSDb custom retention policy | String | Custom NSDb retention policy applied to the metric specified in the Kcql statements formatted as a Scala Duration (e.g. 2 d, 2d, 2 days).
If this configuration is not provided, no retention policy will be applied to the metrics.
nsdb.shard.interval | NSDb custom shard interval policy | String | NSDb shard interval applied to the metric specified in the Kcql statements formatted as a Scala Duration (e.g. 2 d, 2d, 2 days).
If this configuration is not provided, the default shard interval will be applied to the metrics.
nsdb.timeout | Timeout used for testing nsdb connection | String | Default value is `10 seconds`
nsdb.semantic.delivery | Semantic delivery for writing data into nsdb | String | Two possible values: `at_most_once` (Default), `at_least_once`
nsdb.at.least.once.retries | Number of maximum writing retries when `at_least_once` semantic is set | Int | Default value is `10`
nsdb.at.least.once.retry.interval | Time to sleep from a retry to another when `at_least_once` semantic is set | String | Default value is `500 milliseconds`
nsdb.mapping.metrics | Comma separated list of metrics for topics | String | Format: `topicA.metricFieldName,topicB.metricFieldName`
Note:
It is mutually exclusive with `nsdb.kcql`

If it is set, `nsdb.db` and `nsdb.namespace` must be defined

nsdb.mapping.values | (Optional) Comma separated list of values for topics | String | Format: `topicA.valueFieldName,topicB.valueFieldName`
nsdb.mapping.tags | (Optional) Comma separated list of tags for topics | String | Format: `topicA.tagFieldName,topicB.tagFieldName`
nsdb.mapping.timestamps | (Optional) Comma separated list of timestamps for topics | String | Format: `topicA.timestampFieldName,topicB.timestampFieldName`

## KCQL Support

The NSDb sink supports KCQL, [Kafka Connect Query Language](https://github.com/Landoop/kafka-connect-query-language).

The following capabilites can be achieved using KCQL:

- Dimensions and tags selection and mapping
- Tags selection among the mapping above
- Value mapping
- Timestamp Mapping
- Target bit selection
- Target db and namespace selection (if not specified, global configurations will be used)

```sql
-- Select field x as dimension a, field y as value and z as the timestamp from topicA to bitA
INSERT INTO bitA SELECT x AS a, y AS value FROM topicA WITHTIMESTAMP z

-- Select field x as dimension a, field z as dimension c, field y as value and the current time as the timestamp from topicB to bitB
INSERT INTO bitB SELECT x AS a, y AS value, z as c FROM topicB WITHTIMESTAMP sys_time()

-- Select field d as the db, field n as the namespace, field x as tag a, field z as tag b, field t as dimension c, field y as value and the current time as the timestamp from topicC to bitC
INSERT INTO bitC SELECT d as db, n as namespace, x AS a, y AS value, z as b, t as c FROM topicC WITHTIMESTAMP sys_time() WITHTAG(a,b)
```

## example kcql
```bash
echo '{"name":"manufacturing-nsdb-sink",
"config": {"connector.class":"io.radicalbit.nsdb.connector.kafka.sink.NSDbSinkConnector",
"tasks.max":"1","nsdb.host":"nsdbhost",
"topics":"topicA, topicB, topicC",
"nsdb.metric.retention.policy": "2d",
"nsdb.shard.interval": "2d",
"nsdb.kcql":
"INSERT INTO bitA SELECT x AS a, y AS value FROM topicA WITHTIMESTAMP z;
 INSERT INTO bitB SELECT x AS a, y AS value, z as c FROM topicB WITHTIMESTAMP sys_time();
 INSERT INTO bitC SELECT d as db, n as namespace, x AS a, y AS value, z as b, t as c FROM topicC WITHTIMESTAMP sys_time() WITHTAG(a,b)"
}}' | curl -X POST -d @- http://kafkaconnecthost:8083/connectors --header "content-Type:application/json"
```
## example mapping
```bash
echo '{"name":"manufacturing-nsdb-sink",
"config": {"connector.class":"io.radicalbit.nsdb.connector.kafka.sink.NSDbSinkConnector",
"tasks.max":"1","nsdb.host":"nsdbhost",
"topics":"topicA, topicB, topicC",
"nsdb.metric.retention.policy": "2d",
"nsdb.shard.interval": "2d",
"nsdb.mapping.metrics": "topicA.bitA,topicB.bitB,topicC.bitC",
"nsdb.mapping.values": "topicA.y,topicB.y,topicC.y",
"nsdb.mapping.tags": "topicC.x,topicC.z",
"nsdb.mapping.timestamps": "topicA.z"
}}' | curl -X POST -d @- http://kafkaconnecthost:8083/connectors --header "content-Type:application/json"
```

## License

NSDb is distributed under the [Apache 2](http://www.apache.org/licenses/LICENSE-2.0) license.

repository: radicalbit/nsdb-kafka-connect

gha_language: Scala

repo_name: radicalbit/nsdb-kafka-connect


text:
##Transmogrifier

Drag and drop audio files into the interface and it will transcode them into 128k, 96k and 64k aac files and then segment those versions and create a variant playlist for http live streaming.

##Requires

Apples HTTP Live Streaming tools to do segmenting and variant playlist creation.

##Other

The HTTPLSTransmogrifier and AACTranscoder classes might be useful their own. They're untested on iOS, but I'd expect they'd work fine.

repository: rustle/Transmogrifier

repo_name: rustle/Transmogrifier


text:
# The Online-Conference/Journal of Software Artifacts, Analysis, and Tools?

# Why?

There are few relevant journals for the ICSME/MSR/ICPC type conferences.

![Topic Analysis of Conferences and Journals in Software Engineering](images/topic-analysis-of-conferences-and-journals.png)


text:
# http-sniffer

A simple implementation of HTTP proxy server in Twisted which applies some transformations for content.

## Requirements

- python (2.6+)

## Usage

```python
$ python httpsniffer.py
```

and enable HTTP proxy in your web browser.

repository: jijicanyu/http-sniffer

repo_name: jijicanyu/http-sniffer


text:
# Changes

## v0.4.1 9/27/17

* Fix callback argument count and shape

## v0.4.0 9/27/17

* Return stale entries (and invoke the generator) when `lru-cache` is configured
  with `stale: true`

## v0.3.0 7/8/16

* Upgrade `lru-cache` (for `cache.set(key, val, ttl)`)

## v0.2.1 7/5/14

* Don't crash when nothing is waiting

## v0.2.0 5/22/14

* Provide a context to generator functions (contains `callback`, since it's not
  passed as an argument)

## v0.1.3 5/22/14

* Upgrade `lru-cache` to 2.5.0
* Attach `locks` and `cache` to the locking function for visibility

## v0.1.2 11/6/13

* Use `JSON.stringify()` on object keys

## v0.1.1 11/3/13

* Support warming calls without callbacks

## v0.1.0 11/3/13

* Initial version

repository: mojodna/node-locking-cache

gha_language: JavaScript

repo_name: mojodna/node-locking-cache


text:
### Modular Code

Every project-whether a plugin, a theme, or a standalone library—should be coded to be reusable and modular. The line between a theme and a plugin is often fuzzy in the WordPress community, but there should be a clear distinction between the two.

#### Themes

Themes should only handle presentation: templates, layouts, styles, and configuration (registering sidebars, menu locations, theme support, etc).

Any site-specific configuration that isn't directly related to a theme should go into a site-specific plugin (e.g. a `mu-plugin`). This doesn't apply to sites on WordPress.com VIP, plugins are usually bundled with the theme and `mu-plugin`s aren't supported.

Any theme dependencies on functionality plugins should be built with the use of `do_action()` or `apply_filters()`. Changing to the default theme should not trigger errors on a site; the theme can function when the functionality plugin is disabled, broken, or missing. Nor should disabling a functionality plugin - every piece of code should be decoupled and use standard WordPress paradigms (hooks) for interacting with one another.

Any logic in the theme's `functions.php` should be simple and directly related to presentation; any other logic should be put into a plugin (e.g. post types, taxonomies, rewrite rules).

Take a look at our [Config-Driven WP](https://github.com/xwp/config-driven-wp) project for some (dated) examples for a common approach we take for normalizing the theme's configuration into a [`config.php`](https://github.com/xwp/config-driven-wp/blob/master/docroot/wp-content/themes/radio/config.php) array. The config array can then be cleanly merged with a child theme's configuration array.

#### Plugins

A site's custom functionality should be provided by plugins. Plugins should be as generic and reusable as possible. Plugins should do one thing and do them well.

Each plugin should operate within its own namespace, both in terms of code isolation and in terms of internationalization.

Any site-specific configuration for a plugin should be added to a special `mu-plugin` that is specifically designated for this purpose.

Plugins should be standalone yet extensible. Plugins should provide extension hooks that allow other plugins to build upon their functionality. As such, plugins can have dependencies, although they should not cause an error if activated without the dependent plugin being active.

Plugins should have unit tests.

Any functions the plugin exposes for use in a theme should be done so through actions and filters - the plugin should contain multiple calls to `add_filter()` and `add_action()` as the hooks themselves will be defined in the theme.

Use our [`wp-foo-bar`](https://github.com/xwp/wp-foo-bar) plugin scaffold for initializing new plugins.

#### General Notes

Each theme/plugin/site repo should include a copy of the [wp-dev-lib](https://github.com/xwp/wp-dev-lib) submodule, along with the config files for PHPCS, JSHint, JSCS, Travis CI, and other tools. Follow the [readme](https://github.com/xwp/wp-dev-lib#readme) for installation and configuration instructions.

Every project, whether it includes Composer-managed dependencies or not, can contain a `composer.json` file defining the project so it can in turn be pulled in to other projects via Composer.  For example:

```json
{
	"name": "xwp/{project name}",
	"type": "wordpress-plugin",
	"minimum-stability": "dev",
	"require-dev": {},
	"require": {},
	"version": "1.0.1",
	"dist": {
		"url": "... stable archive package URI ...",
		"type": "zip"
	}
}
```

When code is being reused between projects, it should be abstracted into a standalone library that those projects can pull in through Composer. Generally, code is client- or project-specific, but if it's abstract enough to be reused we want to capture that and maintain the code in one place rather than copy-pasting it between repositories.

### Dependencies

Projects generally use three different classes of dependency management:

- [npm](http://npmjs.org) is used to manage build dependencies like Grunt and its related plugins
- [Composer](http://getcomposer.org) is used primarily for back-end (i.e. admin or PHP-based) dependencies
- [Bower](http://bower.io) is used to manage front-end (i.e. script and style framework) dependencies

Generally, dependencies pulled in via a manager are _not_ committed to the repository, just the `.json` file defining the dependencies. This allows all developers involved to pull down local copies of each library as needed, and keeps the repository fairly clean.

With some projects, using an automated dependency manager won't make sense. In server environments like VIP, running dependency software on the server is impossible. If required repositories are private (i.e. invisible to the clients' in-house developers), expecting the entire team to use a dependency manager is unreasonable. In these cases, the dependency, its version, and the reason for its inclusion in the project outside of a dependency manager should be documented.

#### Versioning

(*XWP Note:* We actually usually do version-control our external libraries, as this makes it easier to keep track of the external dependencies during testing and to manage the production deployments. )

The key philosophy that drives our repository structure is *we don't version control things that are version controlled elsewhere*. This means we don't version control WordPress core files or third party plugins. If we are building a theme, we version control only the theme and deploy to the themes directory. Similarly, if we are building a plugin, we version control only the plugin and deploy to the plugins directory. Rather than version control third party libraries, we use [package managers](/Engineering-Best-Practices/tools/#package-managers) to include those dependencies. There are of course exceptions to this.

The counter argument to this philosophy is "what if the latest version of ______ breaks the site? How will we revert to a working state if we don't version control WordPress core and plugins?". WordPress core is backwards compatible, and we believe in trusting it the same way we trust PHP or MySQL. Similarly, we only install and recommend plugins that we trust. These best practices coupled with our talented engineers gives us confidence that our code will work with core and plugin updates. We still test major updates to plugins and core on staging first. If we discover code in core or a plugin that has issues, we try our best to correct that code and push the changes upstream giving back to the open source community.

### File Organization

Project structure unity across projects improves engineering efficiency and maintainability. We believe the following structure is segmented enough to keep projects organized—and thus maintainable—but also flexible and open ended enough to enable engineers to comfortably modify as necessary. All projects should derive from this structure:

```
|- bin/ __________________________________ # WP-CLI and other scripts
|- node_modules/ _________________________ # npm/Grunt modules
|- bower_components/ _____________________ # Frontend dependencies
|- vendor/ _______________________________ # Composer dependencies
|- assets/
|  |- images/ ____________________________ # Theme images
|  |- fonts/ _____________________________ # Custom/hosted fonts
|  |- js/
|    |- src/ _____________________________ # Source JavaScript
|    |- project.js _______________________ # Concatenated JavaScript
|    |- project.min.js ___________________ # Minified JavaScript
|  |- css/
|    |- scss/ ____________________________ # See below for details
|    |- project.css
|    |- project.min.css
|    |- project-admin.css
|    |- project-admin.min.css
|    |- editor-style.css
|- includes/ _____________________________ # PHP classes and files
|- templates/ ____________________________ # Page templates
|- partials/ _____________________________ # Template parts
|- languages/ ____________________________ # Translations
|- tests/
|  |- php/ _______________________________ # PHP testing suite
|  |- js/ ________________________________ # JavaScript testing suite
```

The `scss` folder is described separately, below to improve readability:

```
|- assets/css/scss/
|  |- global/ ____________________________ # Functions, mixins, placeholders, and variables
|  |- base/
|    |- reset, normalize, or sanitize
|    |- typography
|    |- icons
|    |- wordpress ________________________ # Partial for WordPress default classes
|  |- components/
|    |- buttons
|    |- callouts
|    |- toggles
|    |- all other modular reusable UI components
|  |- layout/
|    |- header
|    |- footer
|    |- sidebar
|  |- templates/
|    |- home page
|    |- single
|    |- archives
|    |- blog
|    |- all page, post, and custom post type specific styles
|  |- admin/ _____________________________ # Admin specific partials
|  |- editor/ ____________________________ # Editor specific partials (leverage placeholders to use in front-end and admin area)
|  |- admin.scss
|  |- project.scss
|  |- editor-styles.scss
```

### Third-Party Integrations

Any and all third-party integrations need to be documented in an `INTEGRATIONS.md` file at the root of the project repository. This file includes a list of third-party services, which components of the project those services power, how the project interacts with the remote APIs, and when the interaction is triggered.

For example:

```
## CrunchBase
Remote service for fetching funding and other investment data related to tech startups.

### Scheduling
- The CrunchBase API is used via JS in a dynamic product/company search on post edit pages
- Funding data is pulled every 6 hours by WP Cron to update cached data

### Integration Points
- /assets/js/src/crunchbase-autocomplete.js
- /includes/classes/crunchbase.php
- /includes/classes/cron.php

### Development API
- See http://somesitethatrequireslogin.com/credentials-for-project
```

#### API Keys and Credentials

Authentication credentials and API keys should _never_ be hard-coded into a project. Hard-coding production credentials leads to embarrassing eventualities like posting development content to Twitter or emailing such content to clients' mail lists.

Where possible, the project should expose a UI for entering and managing third party credentials.

If a management UI is impossible due to the nature of the project, credentials should be loaded via either PHP constants or WordPress filters. These options can - and should - default to developer credentials in the absence of production data.

```php
<?php
// Production API keys should ideally be defined in wp-config.php
// This section should default to a development or noop key instead.
if ( ! defined( 'CLIENT_MANDRILL_API_KEY' ) && ! ENV_DEVELOPMENT ) {
	define( 'CLIENT_MANDRILL_API_KEY', '1234567890' );
}
```

The `ENV_DEVELOPMENT` constant should always be set to `true` for local development and should be used whenever and wherever possible to prevent production-only functionality from triggering in a local environment.

The location where other engineers can retrieve developer API keys (i.e. Basecamp thread) can and should be logged in the `INTEGRATIONS.md` file to aid in local testing. Production API keys must _never_ be stored in the repository, neither in text files or hard-coded into the project itself.

repository: Decisionary/engineering-best-practices

branch_name: refs/heads/gh-pages

gha_language: CSS

repo_name: Decisionary/engineering-best-practices


text:
## About
Vote based Question & Answer site built using Laravel 5.4, material design, x-editable, jQuery Upvote and email/database notifications.

Registered users can submit questions, answer questions, vote on questions & answers and when an answer is posted to a question the author is notified via email. Users will also be notified about votes, but only viewable in the their profile.

Demo: http://qna.therealjag.com

## Tech
* Laravel: https://github.com/laravel/laravel
* Twitter Bootstrap: http://getbootstrap.com
* jQuery Upvote: https://github.com/janosgyerik/jquery-upvote
* Material Design for Bootstrap: https://mdbootstrap.com/material-design-for-bootstrap/
* bootstrap-tagsinput: https://github.com/bootstrap-tagsinput/bootstrap-tagsinput
* x-editable: https://github.com/vitalets/x-editable

## Install
* Clone project
* Run migrations

## Features

##### General
* Email Notification - When a question is answered an email is sent to the question owner.
* Database Notification - When a question is answered, question voted, answer voted. See your notifications in the user drop down.
* Mobile Friendly UI

##### User
* User Registration
* User Profile

##### Question
* Top & New Pages
* Assign Tag(s)
* Email Notifications
* Upvote / Downvote

##### Answer
* Upvote / Downvote
* Inline Edit
* Rank by Votes

##### Tags
* Newest Questions
* Top Scoring Questions
* Most Answered Questions
* Unanswered Questions

## License
This software is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT).

## Screenshots
The screenshots could be out of date. Check the demo site for the latest.

![Alt text](/public/images/screenshots/ScreenShot1.png?raw=true "Screanshot")
![Alt text](/public/images/screenshots/ScreenShot2.png?raw=true "Screanshot")
![Alt text](/public/images/screenshots/ScreenShot3.png?raw=true "Screanshot")

repository: momozi-coder/Laravel-QuestionAnswer

repo_name: momozi-coder/Laravel-QuestionAnswer


text:
# TRIE - Ordered Tree Map

A type with associated functions for managing association between string keys
and void pointer values.

## Building

Make sure that your binary is built with the files `trie.h` and `trie.c`, which
both reside in this folder.

## Using

Please read [trie.h](trie.h) for function documentation.

### Example usage:

````c
#include "trie.h"
#include <stdlib.h>

int main() {
	trie_t *t = trie_create(16);

    int *values = { 1, 2, 3 };
    trie_put(t, "monkey", &values[0]);
    trie_put(t, "moon", &values[1]);
    trie_put(t, "donut", &values[2]);

    int *v = trie_get(t, "moon");
    // Do something with v.

    const char *suggestion = trie_suggest(t, "moan");
    // 'suggestion' now contains "moon".
    free(suggestion);

    trie_destroy(t);

	exit(EXIT_SUCCESS);
}
````

## Contributing

Contributions are made through [GitHub](http://www.github.com/emanuelpalm/plib).

### Style Guide

The K&R style is used, with soft tabs (using 4 spaces per tab). The AStyle
formatter using the `--style=kr` option is recommended for consistency.

Try to keep lines within a with of 80 characters. A width of more than 100
characters is forbidden.

Comments are as brief as possible and only contain text. Avoid using special
annotations. Comments above function and type declarations in header files use
the `/*! */` pattern, without `*` in the beginning of each new row. The
exclamation mark is omitted for source and test files.

### Bug Fixes

Pull requests for fixing bugs are always welcome. Please submit them with a
description of the fixed bug.

### New Features

Please create an issue with a discussion about the feature you which to add
before making a pull request. The idea is for TRIE to remain minimal. Features
which provide a significant boost in utility, but only require a small increase
in complexity, are most welcome.

repository: emanuelpalm/plib

repo_name: emanuelpalm/plib


text:
# relative-import README

VS Code package to make it super easy to write import or require statements for your JavaScript / TypeScript.

## Features

Just press Ctrl+Shift+C (Mac: Cmd+Shift+C) to copy the file in your Editor (the "target" file) and then move over to the file you will be referencing the "target" file and just press Ctrl+Shift+V (Mac: Cmd+Shift+V) to reference the "target" file.

Alternatively, press Ctrl+Shift+A (Mac: Cmd+Shift+A) and type the file in "Quick Pick" mode to reference the "target" file from the active editor.

### Simple right? Just to recap
- Ctrl+Shift+C to copy the target file, 👌
- Ctrl+Shift+V to paste the target file to the source file, 👍 and its 🤩

Alternatively,
- Ctrl+Shift+A to target the file from your source file, 💪

### Copy/paste path from external directory

![GIF](https://media.giphy.com/media/1yiewvg5VaRfHj33S4/giphy.gif)

### Copy/paste path from same directory

![GIF](https://media.giphy.com/media/3D480vXMMPPhry1PMM/giphy.gif)

## Release Notes

### 1.3.1
Bug fix.

### 1.3.0
Cached project file lookup from Quick pick. Major refactor.

### 1.2.2
Minor updates

### 1.2.1
Show error messages instead of throwing Javascript errors

### 1.2.0
Add Quick Pick in Active Editor

### 1.1.2
Minor documentation changes and add GIPHY for demo

### 1.1.1
Minor documentation changes

### 1.1.0
Add key bindings for extension

### 1.0.0

Initial release of relative-import

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

## Contribute

Feel free to open issues or PRs!

**Enjoy!**

gha_language: TypeScript

gha_license_id: MIT


text:
# Phase 1: User Authentication, Question/Solution Models and JSON API

## Rails
### Models
* User
* Question
* Solution

### Controllers
* UsersController (create, new)
* SessionsController (create, new, destroy)
* Api::QuestionsController (create, destroy, index, show)
* Api::SolutionsController (create, index)

### Views
* users/new.html.erb
* session/new.html.erb
* questions/index.json.jbuilder
* questions/show.json.jbuilder
* solutions/index.json.jbuilder

## Flux
### Views (React Components)

### Stores

### Actions

### ApiUtil

## Gems/Libraries
* BCrypt

repository: patricksandquist/RubyOff

repo_name: patricksandquist/RubyOff


text:
# Upsells & Cross-sells in WooCommerce

WooCommerce includes the configuration of Upsells & Cross-sells inside of each product regardless of product type. Products can be related to each other in three ways: **Up-Sells, Cross-Sells or by having the same tags or categories**.

![Upsells & Cross-sells](../images/upsells.png)

![Product Tags & Categories](../images/product-categories-and-tags.png)

## Adding an Upsell or Cross-Sell to a Product

1. Go to **WooCommerce** > **Products** and select the product on which you’d like to show an up-sell or cross-sell.
2. Scroll down to the Product Data panel. _(see screenshot above)_
3. Select the **Linked Products** tab in the left menu.
4. Add the product(s) you wish to link to by typing the product(s) names into the relevant Upsell or Cross-sell box.
5. Add **TAGS** to link products as being related via tag _(see screenshot above)_
6. Click Update to save the product.

### Upsells

* Upsells are displayed on the **PRODUCT PAGE** for the currently displayed product.

### Cross-sells

Cross-sells are products that you promote in the cart, based on the current product.

* Cross-sells are displayed on the **CART** page prior to a customer checking out.

![WooCommerce  Packing List](../images/cross-sells-example.png)

#### Other Resources

* [WooCommerce Upsells & Cross-sells documentation](https://docs.woocommerce.com/document/related-products-up-sells-and-cross-sells/)


text:
Welcome to Anti-William blocker 👋

> Afraid your local William will hack into your discord bot? Need a fast and efficient solution? Well look no further, I have just the solution for you! This script is so optimized and fast it will LOWER your bot's connection to discord servers' latency by about 30 miliseconds. Best of all? It has been tested thoroughly many times and it works perfectly.

### 🏠 [Homepage](https://github.com/MCUniversity/william-blocker/)

### ✨ [Demo](https://repl.it/github/MCUniversity/william-blocker)

## Install

```sh
npm i
```

## Usage

```sh
node .
```

## Run tests

```sh
npm run test
```

## Author

👤 **@MCUniversity#0859**

* Website: https://github.com/MCUniversity/
* Twitter: [@mcuniversity_](https://twitter.com/mcuniversity_)
* Github: [@MCUniversity](https://github.com/MCUniversity)

## 🤝 Contributing

Contributions, issues and feature requests are welcome!
Feel free to check [issues page](https://github.com/MCUniversity/william-blocker/issues).

## Show your support

Give a ⭐ if this project helped you!

***
_This README was generated with ❤ by [readme-md-generator](https://github.com/kefranabg/readme-md-generator)_

license: ISC

repository: LucAngevare/william-blocker

repo_name: LucAngevare/william-blocker


text:
# API’s

## Model

### External

*The external API for the model includes the Model class and the ImmutableTurtle interface. Model is given codes entered by the user through the view, which are parsed and executed on the turtle by the model’s internal API. The ImmutableTurtle interface passes the updated status values of the turtle to the view so that the display of the turtle may be updated accordingly.*

**Model**
* Public void addTurtleListener(TurtleListener tL)
* Public void addVariableListener(VariableListener sL)
* Public void addCommandListener(StringListener sL)
* Public void execute(String code)

**Interface ImmutableTurtle**
* Public double getX()
* Public double getY()
* Public double getHeading()
* Public boolean getPenDown()
* Public boolean isVisible()
* Public Color getPenColor()

### Internal

*The internal API for the model includes the Turtle class and the Command interface. The Turtle class provides an object for the model to update as it executes commands. Within the setters of Turtle, TurtleListener’s change methods are also called so that the respective turtle in the view may be updated accordingly. Classes that implement Command have an execute method that updates a Turtle parameter or modifies a Collection of commands or variables. These parameters are passed into Command from Model so that these data structures are updated upon the execution of commands. In order to add a new command to the SLogo language, a programmer should add a new class that implements the Command interface and define the execute method so that in enacts the desired changes on the desired data structures. Similar to TurtleListener, StringListener and CommandListener allow the View to see the changes to Model’s command and variable Collections enacted by Command’s execute method.*

**Turtle implements ImmutableTurtle**
* Public Turtle()
* Public Turtle(TurtleListener)
* Public void addTurtleListener(TurtleListener tL)
* Public double getX()
* Public double getY()
* Public double getHeading()
* Public boolean getPenDown()
* Public boolean isVisible()
* Public Color getPenColor()
* Public void setXY(double x, double y)
* Public void setHeading(double heading)
* Public boolean setPenDown(boolean down)
* Public void setVisible(boolean visible)
* Public Color setPenColor(Color color)
* Public void clearScreen()

**Interface Command  (SETXY, SETH, etc)**
* Public double execute(Turtle t, Collection commands, Collection variables)

## View

### External

*The external API for the view includes the View class and the TurtleListener, StringListener, and VariableListener interfaces. The View uses a Consumer of Strings to use Command’s execute method whenever a command is entered by the user. View also uses the listener interfaces to detect changes to the data structure in Model that need to be updated in the display, including the turtle image, the list of commands, and the list of variables and their values.*

**View**
* Public View(Consumer<String> consumer)
* Public TurtleListener getTurtleListener()
* public VariableListener getVariableListener()
* public StringListener getCommandListener()

**Interface TurtleListener**
* Public void setTurtle(ImmutableTurtle)
* Public void locationChange(double dx, double dy)
* Public void headingChange(double dtheta)
* Public void penChange()
* Public void visibilityChange()
* Public void clearScreen()

**Interface StringListener**
* Public void newString(String s)

**Interface VariableListener**
* Public void changedMap(Map<String, Double> vars)

### Internal

*The internal API for the view includes several classes that represent the windows and sections of windows that are displayed on the screen. They all extend Pane and implement the appropriate listener to detect changes in the model. Adding a new window or part of the user interface requires a programmer to create a new class that extends Pane. If the new window or UI component needs to be updated with changes to parts of the model, a new listener interface should be created to detect the changes to those parts of the model and enact those changes on the window or UI component.*

**TurtleView extends Pane implements TurtleListener**
* Public void setBackgroundColor(Color c)

**TextPrompt extends Pane**
* Public TextPrompt(Consumer<String> consumer)
* Public void enter()
* Public void clear()

**ReferenceDisplay extends Pane**
* Public ReferenceDisplay()

**HistoryDisplay extends Pane**
* Public HistoryDisplay()
* Public void updateHistory(String name)
* Public void clearHistory()

**VariableDisplay implements VariableListener extends Pane**
* Public VariableDisplay()
* Public void clearVariables()

**UserDefinedCommandsDisplay implements StringListener extends Pane**
* Public void clearCommands()

## Controller

**Driver**
* Public Driver()
* Public void run()

repository: anpaskin/SLogo

repo_name: anpaskin/SLogo


text:
1.4.4 Release notes (2017-04-06)
===========================================================

### Fixed
* Fix the error type for the PYChordStyle

### Added
* Add missing import in the framework header file

### Updated
* Update README.md files

1.4.3 Release notes (2017-02-24)
===========================================================

### Fixed
* Fix the error name
* Fix not import for PYPolar

### Update
* Update one demo for `Radar`

1.4.2 Release notes (2017-01-18)
===========================================================

### Fixed

* Fix the multipe echarts view in one view controller's bug
* Fix the magnification in echarts view
* Fix the margin bug in echarts.html

1.4.1 Release notes (2017-01-03)
===========================================================

### Added

* Add new property to decide the min percent of the zoom in.
* Add support for `WKWebView`

1.3.4 Release notes (2016-12-12)
===========================================================

### Added

* Add some tiny changes

1.3.3 Release notes (2016-10-15)
===========================================================

### Added

* Add some tiny changes

1.3.2 Release notes (2016-09-06)
============================================================

### Added
* Add some actions support
* Add some `add[Name]` and `add[Name]Arr` for some properties
* Add support for Mac
* Add support for themes

### Changed
* Changed the way of js call oc functions, by using iframe
* Changed the type of data in PYMarkPoint from NSArray into NSMutableArray
* Changed the name of constant in PYAxisPointer
* Changed type of options in `PYOption` into NSMutableArray

### Modify
* Rewrite some demo use new features
* Rewrite action by using iframe

1.3.1 Release notes (2016-08-30)
============================================================

### Added
* Add demos for Tree
* Add demo for EventRiver
* Add initializer for all types
* Add some properties for some object
* Add support for the chainable way

### Fixed
* Restructure the codes by using `@class`

1.2.3 Release notes (2016-08-26)
============================================================

### Added
* Add demos for Gauge
* Add demos for Funnel
* Add demos for Chord
* Add support for Travis
* Add default for all subclasses of PYSeries
* Add all support types for PYSeries
* Add new subclass of PYSeries for Chord named 'PYChordSeries'
* Add all sort const values

### Changed
* Change type PYFunnelSeriesSort into PYSort

### Fixed
* Fixed some property type

1.2.2 Release notes (2016-08-17)
============================================================

* Fix bug if the project contain Chinese character

### Enhancements

* Add support for WordCloud
* Add support for Venn
* Add support for Treemap
* Add obtain image method
* Add method for creation of PYColor
* Add PYEchartActionHandler

1.2.1 Release notes (2016-08-07)
============================================================

* Restructor all the codes

### Enhancements

* Add cocoapods dynamic and static libraries support
* Add mamual import support
* Add some constant for many types
* Add validate for the constant types

1.1.7 Release notes (2016-04-19)
============================================================

* Add PYLoadingOption
* Add PYNoDataLoadingOption
* Update the PYAxis
* Add some method for PYEchartsView

1.1.6 Release notes (2016-04-12)
=============================================================

### Enhancements

* Add PYSplitArea
* Add some missing properties

1.1.5 Release notes (2016-04-07)
=============================================================

### Enhancements

* Add Radar and Map Demos
* Replace js files and support all echarts types
* Add PYZoomEchartsView

repository: Pluto-Y/iOS-Echarts

gha_language: Objective-C

gha_license_id: NOASSERTION

repo_name: Pluto-Y/iOS-Echarts


text:
# What's New? - Updates from the Previous Example

Now all the Blueprints examples have been updated with new Slack platform features. So what are the *diffs* in this updated example?

---
## Changes made in January 2020

### OAuth Scopes and Permission

We’ve made major improvements to the way scopes work for apps. The bot scope used to be very broad and permissive, but now you can request more specific and granular permissions for your app.

This sample app used to need only bot scope, but now you need the `chat:write` to allow the bot to post messages in channels. But no other actions.

We recommend selecting only the scopes your app needs. Requesting too many scopes can cause your app to be restricted by a team’s Admin or App Manager.

Please read [Scopes and permissions](https://api.slack.com/scopes) to figure out which scopes you need.

---
## Changes made in October 2019

### Modals

*Major updates!: This requires to update your code!*

We released [Modals](https://api.slack.com/block-kit/surfaces/modals), which is replacing the existing Dialogs, with more powerful features.

Now, instead of calling an API to open a dialog is replaced with the new view API to open a modal with Block Kit in the code sample.

### Block Kit
We introduced Block Kit UI framework that allows you to create messages with the components called blocks. If you have been creating messages with the legacy "attatchment", please consider switching to Blcok Kit!

Read more at: [Block Kit](https://api.slack.com/block-kit)

---
## Changes made in October 2018

### OAuth Token

Your OAuth access token should begins with `-xoxb` instead of `-xoxp`. The bot tokens will be the default token in future.

### Sigining Secret

*This requires to update your code!*

Previously, you needed to verify a *verificatin token* to see if a request was coming from Slack, not from some malicious place by simply comparing a string with the legacy token with a token received with a payload. But now you must use more secure *sigining secrets*.

Basically, you need to compare the value of the `X-Slack-Signature`, the HMAC-SHA256 keyed hash of the raw request payload, with a hashed string containing your Slack signin secret code, combined with the version and `X-Slack-Request-Timestamp`.

Learn more at [Verifying requests from Slack](https://api.slack.com/docs/verifying-requests-from-slack).

### Token rotation

OAuth refresh tokens are also introduced as a security feature, which allows the app owners to proactively rotate tokens when the tokens are compromised.

Your workspace app can use the new `apps.uninstall` method to uninstall itself from a single workspace, revoking all tokens associated with it. To revoke a workspace token without uninstalling the app, use `auth.revoke`.

Although the example of using the short-lived refresh token is *not* included in this Blurprints example since this tutorial is written for internal integration, if you are distributing your app, use a short-lived OAuth Refresh token. Implementing token rotation is required for all apps that are distributed, whether submitted for the App Directory or not.

To lean more, read [Token rotation for workspace apps](https://api.slack.com/docs/rotating-and-refreshing-credentials).

:gift: If you are using the [Node SDK](https://github.com/slackapi/node-slack-sdk/issues/617), the token refresh feature is available for you already!

repository: meighan/slack-admin-tools

repo_name: meighan/slack-admin-tools


text:
# sync-stream.c [![build status](https://secure.travis-ci.org/thlorenz/sync-stream.c.png)](http://travis-ci.org/thlorenz/sync-stream.c)

synchronous stream implementation in C

```c
FILE *infile, *outfile;
infile = fopen("src/stream.c", "r");

outfile = stdout;

sst_file_t *infs = sst_file_new(infile, NULL);
infs->end_cb = oninfile_end;

sst_t *tx = sst_new();
tx->write = tx_write;
tx->end_cb = ontx_end;

sst_file_t *outfs = sst_file_new(outfile, NULL);
outfs->end_cb = onoutfile_end;

sst_pipe((sst_t*)infs, tx, (sst_t*)outfs);

sst_file_write_init(outfs);
sst_file_read_start(infs);
```

[full example](https://github.com/thlorenz/sync-stream.c/blob/master/examples/file-stream-transform.c)

## Examples

- [pipe-thru-transform](https://github.com/thlorenz/sync-stream.c/blob/master/examples/pipe-thru-transforms.c)
- [file-stream-transform](https://github.com/thlorenz/sync-stream.c/blob/master/examples/file-stream-transform.c)

## Installation

    clib install thlorenz/sync-stream.c

## API

```c
enum sst_encoding {
    UTF8   = 0x0
  , BASE64 = 0x2
  , HEX    = 0x4
  , CUSTOM = 0x1000
};

/*
 * chunk
 */

typedef struct sst_chunk_s sst_chunk_t;

typedef void (*sst_chunk_data_free_cb)(void*);

/*
 * chunk struct
 *
 * @data          the data transmitted with the chunk
 * @enc           (default: UTF8) encoding of the data
 * @free_data     (default: NULL) is invoked when the chunk is freed in order to ensure data is freed properly
 * @error         (default: 0) set this to a non-zero value to signal an error
 * @ctx           set this to anything you need to track
 */
struct sst_chunk_s {
  void                    *data;
  enum sst_encoding       enc;
  void                    (*free_data)(void*);
  int                     error;
  void*                   ctx;
};

/*
 * Initializes new chunk and returns the result.
 *
 * @see chunk struct for more initialization options
 *
 * @data        data to transport with the chunk
 * @free_data   (default: NULL) is invoked when the chunk is freed in order to ensure data is freed properly
 *              since we know best how to free the data when we create the chunk, we provide it here
 *              if the data doesn't need to be freed, i.e. because it isn't allocated pass NULL
 * @return chunk
 */
sst_chunk_t *sst_chunk_new(void* data, void (*free_data)(void*));

/**
 * frees the chunk
 *
 * @chunk the chunk to free
 */
void sst_chunk_free(sst_chunk_t* chunk);

/*
 * stream
 */

typedef struct sst_s sst_t;

/* callbacks */
typedef void ( *sst_write_cb) ( sst_t*, sst_chunk_t*);
typedef void ( *sst_emit_cb)  ( sst_t*, sst_chunk_t*);
typedef void ( *sst_end_cb)   ( sst_t*);

#define SST_FIELDS                                                                          \
  sst_write_cb      write;                                                                  \
  sst_emit_cb       emit_cb;                                                                \
  sst_end_cb        end_cb;                                                                 \
                                                                                \
  /* readonly */                                                                            \
  sst_emit_cb       emit;                                                                   \
  sst_end_cb        end;                                                                    \
                                                                                \
  /* private */                                                                             \
                                                                                \
  /* the stream upstream from this stream and thus the source of all data */                \
  /* we track it here only to be able to free it later */                                   \
  sst_t   *_source;                                                                         \
                                                                                \
  /* the stream downstream from this stream, if set all emitted chunk will be written it */ \
  sst_t   *_destination;

/*
 * stream struct
 *
 * @write         call this with a @see chunk in order to feed data into the stream
 * @emit_cb       if provided, it is called with every chunk emitted by the stream
 * @end_cb        if provided, it is called when the stream ends
 * @emit          call this to emit a chunk
 * @end           call this to signal that no more data will be written to the stream
 */
struct sst_s {
  SST_FIELDS
};

/**
 * Initializes a  stream and returns it
 * @see stream struct for more initializiation options
 *
 * @return stream
 */
sst_t* sst_new();

/**
 * Frees the given stream and walks up the `_source`s to free all streams that are upstream as well
 *
 * @self    the stream to free
 */
void sst_free(sst_t* self);

/**
 * Pipes the source stream into the destination stream(s).
 * All chunks emitted by the source are now written to the destination(s).
 *
 * When source ends, destinations are ended as well.
 *
 * When most downstream destination is freed,
 * all other destinations and the source are freed as well.
 *
 * @source upstream source
 * @...    followed by the downstream destination(s) which get chained together to form one pipe
 */
void sst__pipe(sst_t** streams);
#define sst_pipe(source, ...) {                               \
  sst_t** streams = (sst_t*[]) { source, __VA_ARGS__, NULL }; \
  sst__pipe(streams);                                         \
}

/*
 * file stream
 */

typedef struct sst_file_s  sst_file_t;

/* file stream struct
 *
 * extends stream struct
 *
 * @file      the open file to read from or write to
 * @free_file (default: NULL) is invoked when the file stream is freed in order to free file if needed
 *            if the data doesn't need to be freed, i.e. because it isn't allocated pass NULL
 * @bufsize   (default: BUFSIZ) size of buffers to write
 */
struct sst_file_s {
  SST_FIELDS
  FILE *file;
  void (*free_file)(void*);
  size_t bufsize;
  short free_onend;
};

/**
 * Initializes a file stream from the given file.
 *
 * @file      the file to wrap in a stream
 * @free_file  invoked when the file stream is freed in order to ensure file is freed properly
 *             ensure that the file is closed however
 *             if the file doesn't need to be freed, i.e. because it isn't allocated pass NULL
 * @return  file stream wrapping the file
 */
sst_file_t *sst_file_new(FILE *file, void (*free_file)(void*));

/**
 * Frees the file stream including the FILE it is wrapping.
 * Note: the underlying file handle is assumed to be closed at this point.
 *
 * @self  the file stream
 */
void sst_file_free(sst_file_t* self);

/**
 * Starts reading from the wrapped file.
 * For each read buffer a chunk is `emit`ted.
 * Note: file is assumed to be open at this point.
 *
 * When all chunks were read the stream invokes `end`.
 *
 * @self  file stream
 */
void sst_file_read_start(sst_file_t* self);

/**
 * Initializes file stream for writing.
 * Note: file is assumed to be open at this point and needs to manually be closed before freeing the stream.
 *
 * All values written to the stream wrapper are `fputs`ed to the underlying file.
 * After chunks were written they are freed automatically.
 * @self   the file stream
 */
void sst_file_write_init(sst_file_t* self);

#endif
```

## License

MIT


text:
# labview-grpc-client-using-CSharp
A LabVIEW gRPC Client using C# Example

# Creating gRPC C# Client DLL
1. Open the C# Client folder in VS Code and follow the onscreen prompts to install the dependencies.
2. Do a release build by using the below command in terminal:
dotnet build -c release

# Running the Server
1. The gRPC server code is same as the one created by NI at https://github.com/ni/grpc-labview
2. To run the server, run the Main.vi located at
Server\Servers\Query Server\Query Server Class\Main.vi

# Running the LabVIEW gRPC Client
1. Ensure that you have built the C# gRPC DLL before trying this.
2. Run the example gRPC LabVIEW Client example located at
Client\Example gRPC Client Call.vi


text:
# Feast Test Infrastructure

This folder contains the Feast test infrastructure.

## Components

* docker-images/ - Docker images for running tests
* prow/ - Prow configuration (plugins and jobs)
* infrastructure/ - Terraform modules to provision the base testing infrastructure on GCP

## Set up

These steps will allow you to provision the test infrastructure in an empty GCP project. It is not necessary to rerun these steps once the infrastructure has been provisioned.

1. Make sure you have access to your GCP project and that you Terraform installed.

2. Create a bucket for maintaining Terraform state in your GCP project. This can be done manually. Update all `backend.tf` files to point to this bucket.

3. Import the bucket to manage it's own state

```
mv tf/gcs
terraform import google_storage_bucket.kf-feast-terraform-state kf-feast-terraform-state
```

4. Ensure that all variables are set correctly in `infrastructure/terraform.tfvars`. It is likely that the GCP project will need to be updated.

5. Create the primary Kubernetes cluster which will host Prow and Argo

```
mv ../k8s-cluster
terraform apply -var-file="../terraform.tfvars"
```

6. Create a ci-bot account on GitHub with owner access to your organization. Create and save a personal access token for the bot.

7. Install and run Tackle

```
go get -u k8s.io/test-infra/prow/cmd/tackle
tackle
```

Follow the steps to install Prow in your cluster. If any step fails, follow this [guide](https://github.com/kubernetes/test-infra/blob/master/prow/getting_started_deploy.md) to complete the steps manually.

Prow should now be receiving events from the Feast repository. You should be able to access Prow on an Ingress IP that the cluster exposes.

## Updating Prow Jobs

To update Prow jobs, plugins, or the Docker image used for testing, modify one or more of the following:

- `prow/config.yaml`
- `prow/plugins.yaml`
- `docker-images/test-image/Dockerfile`
- `docker-images/test-image/run.sh`

After making modifications, run `make`. This will update the Prow configuration, build a new test image, and push it to the container registry.

## Installing Argo

Argo is used to run integration tests. It follows the [standard installation process described in the argo quickstart](https://github.com/argoproj/argo/blob/master/demo.md), with the artifact repository [configured to use gcs](https://github.com/argoproj/argo/blob/master/ARTIFACT_REPO.md).


text:
Implementation Notes
--------------------

* start with a single table
  * [done] keep columns with meta data, from load/format
  * [done] keep content of columns
  * derive meta data from content (date or id etc)
  * [done] know some facts about columns (number of unique values), which is sort of statistical data
  * [done] aggregate fact/HBase primary column name idea, use `<table>_<smallest dimension>_<next>` and so on.
  * automatically de-normalise using each table as fact once, "for all tables"

* have a table with a foreign key
  * [done] expand columns of foreign table into table
  * [done] mark new columns as meta data from original table

* table with more (simple) foreign keys
  * recursively

* m2n
  * tbd

* how to export the de-normalised data?
  This is the goal. needs to be pre-aggregated and sorted by different aggregators counts descending
  if any groups are found, then use each group

Dimensions
----------

For larger tables we have different ways to create ID columns because we have different dimensions to aggregate for.

* predict dimensions/auto-detect dimension by variation of column values
* find columns that always change together e.g. "zip and city" or "city and country" (same dimension)
* dimension auto-detect by typical data, e.g. time-stamp, geo-coordinates, city/county name? (need dictionary)
* -> have list of dimensions with group of columns for each dimension each, maybe overlapping,
  i.e. single a column is in more than one dimension, because we can not know for sure.
* sort columns of dimensions by unique values, as already done
* detect if a unique column is a subset of another unique column and sort these into groups (this is more than just ordering by count)

Then

* aggregations following each dimension
* ID Column, reduce for the key, only use what is relevant for the current dimension, in order of # uniqueness
* iterate all dimensions and create ID Columns each
* if there are more non-unique but in not overlapping dimensions, create different variations of id columns = multiple tables

repository: eark-project/denormalize-db

repo_name: eark-project/denormalize-db


text:
# Jen's Epicodus ItP Profile

#### _First Code Review Project, 01.25.19_

#### By **Jen Bruce**

## Description

_This site is a simple overview of my experience, personal hobbies & interests, and a few of the small Intro to Programming projects I have completed thus far. These projects showcase a rudimentary understanding of Markdown, HTML, CSS, and Bootstrap, and how they work together to create simple, functional, and visually appealing web pages._

## Setup/Installation Requirements

* _Clone this repository_
* _Open the HTML and/or Git-Pages link in your web browser_
* _Follow links to see additional repositories_
* _[Link to homepage](https://ampersnad.github.io/code-review-1/)_

## Contact details

_To offer feedback or ask questions about the items found herein, you can reach me at Epicodus in downtown PDX on Monday and Wednesday evenings. Instructors may also reach me via email._

## Technologies Used

* _Markdown_
* _HTML_
* _CSS_
* _Bootstrap_

### License

*This software is licensed under the MIT license.*

Copyright (c) 2019 **_Jen Bruce_**


text:
# React Tube

A minimalistic (basic) video browsing application meant to mimic/clone the basic video browsing functionality just like You Tube based on user’s search term built using **React** only and **You Tube Data API v3**  along with **npm packages like youtube-api-search, lodash** etc.


text:
[core](../../index.md) / [com.github.kacso.androidcommons.core.dialogs](../index.md) / [DialogMessage](index.md) / [getLayout](./get-layout.md)

# getLayout

`fun getLayout(): `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)

Overrides [BaseDialog.getLayout](../-base-dialog/get-layout.md)

This method is being used in order to inflate view for dialog

**Return**
reference to layout resource of current activity

repository: kacso/android-commons

repo_name: kacso/android-commons


text:
# my-curriculum
A cloud-native application for managing the curriculum and syllabi handbooks of degree programs with Spring Boot

## Getting Started
The following steps will take you to the start:
The prerequisite to work on this project is to install JDK 8 (or later) on your system.

Next install the project building tool Maven.

The third program you'll need to participate is the version control tool git.

If you don't have a GitHub-Account yet, create one [here](https://github.com/) and fork this repository.

Clone the repository via `git clone https://github.com/yourgithubname/my-curriculum.git`

Add the remote repository *upstream* via `git remote add upstream https://github.com/turncodr/my-curriculum.git`

Start the application by navigating to the project folder and executing `./mvnw spring-boot:run`

repository: turncodr/my-curriculum

gha_language: HTML

repo_name: turncodr/my-curriculum


text:
# FireflyIII.Model.PiggyBank
## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**CreatedAt** | **DateTime** |  | [optional] [readonly]
**UpdatedAt** | **DateTime** |  | [optional] [readonly]
**Name** | **string** |  |
**AccountId** | **int** | The ID of the asset account this piggy bank is connected to. |
**AccountName** | **string** | The name of the asset account this piggy bank is connected to. | [optional] [readonly]
**CurrencyId** | **int** |  | [optional] [readonly]
**CurrencyCode** | **string** |  | [optional] [readonly]
**CurrencySymbol** | **string** |  | [optional] [readonly]
**CurrencyDecimalPlaces** | **int** | Number of decimals supported by the currency | [optional] [readonly]
**TargetAmount** | **double** |  |
**Percentage** | **float** |  | [optional] [readonly]
**CurrentAmount** | **double** |  | [optional]
**LeftToSave** | **double** |  | [optional] [readonly]
**SavePerMonth** | **double** |  | [optional] [readonly]
**StartDate** | **DateTime** | The date you started with this piggy bank. | [optional]
**TargetDate** | **DateTime** | The date you intend to finish saving money. | [optional]
**Order** | **int** |  | [optional] [readonly]
**Active** | **bool** |  | [optional] [readonly]
**Notes** | **string** |  | [optional]

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

gha_language: C#


text:
# snd (search and destroy)

<b>Table of Contents</b>

1. [Description](#description)
1. [Setup](#setup)
    * [What snd affects](#what-snd-affects)
    * [Beginning with snd](#beginning-with-snd)
1. [Usage](#usage)
1. [Reference](#reference)
1. [Limitations](#limitations)
1. [Development](#development)

## Description

This snd (search and destroy) module can be used to search a string within a file and perform 2 types of actions if found:

- Return true so puppet registers an action has been performed (default).
- Delete the file.

This module can be used to detect problems in a file where deleting it is the easiest fix. I mainly use it for files automatically generated by other programs. By example DUID file for DHCPv6 clients.

## Setup

### What snd affects

The snd module only affects file(s) if specified.

### Beginning with snd

There are 2 ways you can obtain this module.

- Git clone or download the module from the [git repository](https://github.com/steroidg/snd).
- Download from [puppet forge](https://forge.puppet.com).

## Usage

You can use the module by including it:

```
include snd
```

Doing so won't have any effect until data hash is provided via hiera in the following format:

```
snd::params::search_items:
  [file_name]:
    search_str: '[search_string]'
    display_only: true/false
```

By example, to delete the file /tmp/foo if a line contains a line with 'answer is 42':

```
snd::params::search_items:
  /tmp/foo:
    search_str: '^answer is 42$'
    display_only: false
```

## Reference

The reference of this module can be generated by [puppet strings](https://github.com/puppetlabs/puppet-strings). There are 3 ways you can access the content:

- Refer it in the [official documentation](https://steroidg.github.io/snd/).
- Git checkout the [gh-pages branch](https://github.com/steroidg/snd/tree/gh-pages) of the module repository.
- Re-generate the reference locally by running puppet strings within the module directory.

## Limitations

This module is tested on Ubuntu LTS against Puppet 5, but it'll probably work on other Linux distributions.

## Development

Please feel free to clone, use, play, comment and create pull requests. Let's see how it goes.

repository: steroidg/snd

gha_language: Puppet

repo_name: steroidg/snd


text:
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) > [ember-asset-size-report](./ember-asset-size-report.md) > [Spinner](./ember-asset-size-report.spinner.md) > [(constructor)](./ember-asset-size-report.spinner._constructor_.md)

## Spinner.(constructor)

> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
>

Constructs a new instance of the `Spinner` class

<b>Signature:</b>

```typescript
constructor();
```

repository: mike-north/ember-asset-size-report

repo_name: mike-north/ember-asset-size-report


text:
+++
date = "2015-08-25T15:36:56Z"
draft = false
title = "LINQ"
[menu.main]
  parent = "Reference Reading and Writing"
  identifier = "LINQ"
  weight = 15
  pre = "<i class='fa'></i>"
+++

## LINQ

The driver contains an implementation of [LINQ]({{< msdnref "bb397926" >}}) that targets the [aggregation framework]({{< docsref "aggregation" >}}). The aggregation framework holds a rich query language that maps very easily from a LINQ expression tree making it straightforward to understand the translation from a LINQ statement into an aggregation framework pipeline. To see a more complicated uses of LINQ from the driver, see the [AggregationSample]({{< testref "MongoDB.Driver.Tests/Samples/AggregationSample.cs" >}}) source code.

For the rest of this page, we'll use the following class:

```csharp
class Person
{
	public string Name { get; set; }

	public int Age { get; set; }

	public IEnumerable<Pet> Pets { get; set; }

	public int[] FavoriteNumbers { get; set; }

	public HashSet<string> FavoriteNames { get; set; }

	public DateTime CreatedAtUtc { get; set; }
}

class Pet
{
	public string Name { get; set; }
}
```

### Queryable

Hooking into the LINQ provider requires getting access to an [`IQueryable`]({{< msdnref "bb351562" >}}) instance. The driver provides an [`AsQueryable`]({{< apiref "M_MongoDB_Driver_IMongoCollectionExtensions_AsQueryable" >}}) extension method on [`IMongoCollection`]({{< apiref "T_MongoDB_Driver_IMongoCollection_1" >}}).

```csharp
var collection = db.GetCollection<Person>("people");
var queryable = collection.AsQueryable();
```

Once you have an [`IQueryable`]({{< msdnref "bb351562" >}}) instance, you can begin to compose a query:

```csharp
var query = from p in collection.AsQueryable()
            where p.Age > 21
            select new { p.Name, p.Age };

// or, using method syntax

var query = collection.AsQueryable()
    .Where(p => p.Age > 21)
    .Select(p => new { p.Name, p.Age });
```

... which maps to the following aggregation framework pipeline:

```json
[
	{ $match: { Age: { $gt: 21 } } },
	{ $project: { Name: 1, Age: 1, _id: 0 } }
]
```

Also, there is a list of aggregate options that can be applied for the whole pipeline via [`AggregationOptions`]({{< apiref "T_MongoDB_Driver_AggregateOptions" >}}). Below is an example of configuring a [`Collation`]({{< docsref "reference/collation/" >}}):

```csharp
var collation = new Collation("en_US", strength: CollationStrength.Secondary);
var aggregateOptions = new AggregateOptions { Collation = collation };
var query = collection
    .AsQueryable(aggregateOptions)
    .Where(p => p.Name == "tom");
```

### Stages

We'll walk through the supported stages below:

#### $project

To generate a [`$project`]({{< docsref "reference/operator/aggregation/project/" >}}) stage, use the [`Select`]({{< msdnref "bb548743" >}}) method. To see the list of expressions supported in the [`Select`]({{< msdnref "bb548743" >}}) method, see [Aggregation Projections]({{< relref "reference\driver\expressions.md#aggregation-projections" >}}).

```csharp
var query = from p in collection.AsQueryable()
            select new { p.Name, p.Age };

// or

var query = collection.AsQueryable()
    .Select(p => new { p.Name, p.Age });
```
```json
[
	{ $project: { Name: 1, Age: 1, _id: 0 } }
]
```

{{% note %}}When projecting scalars, the driver will wrap the scalar into a document with a generated field name because MongoDB requires that output from an aggregation pipeline be documents.

```csharp
var query = from p in collection.AsQueryable()
            select p.Name;

var query = collection.AsQueryable()
    .Select(p => p.Name);
```
```json
[
	{ $project: { __fld0: "$Name", _id: 0 } }
]
```

The driver will know how to read the field out and transform the results properly.
{{% /note %}}

{{% note %}}[By default]({{< docsref "reference/operator/aggregation/project/#suppress-the-id-field" >}}), MongoDB will include the `_id` field in the output unless explicitly excluded. The driver will automatically add this exclusion when necessary.{{% /note %}}

#### $match

The [`Where`]({{< msdnref "bb535040" >}}) method is used to generate a [`$match`]({{< docsref "reference/operator/aggregation/match/" >}}) stage. To see the list of expressions supported inside a [`Where`]({{< msdnref "bb535040" >}}), see [Filters]({{< relref "reference\driver\expressions.md#filters" >}}).

```csharp
var query = from p in collection.AsQueryable()
            where p.Age > 21
            select p;

// or

var query = collection.AsQueryable()
    .Where(p => p.Age > 21);
```
```json
[
	{ $match: { Age: { $gt: 21 } } }
]
```

#### $redact

The [`$redact`]({{< docsref "reference/operator/aggregation/redact/" >}}) stage is not currently supported using LINQ.

#### $limit

The [`Take`]({{< msdnref "bb300906" >}}) method is used to generate a [`$limit`]({{< docsref "reference/operator/aggregation/limit/" >}}) stage.

```csharp
var query = collection.AsQueryable().Take(10);
```
```json
[
	{ $limit: 10 }
]
```

#### $skip

The [`Skip`]({{< msdnref "bb357513" >}}) method is used to generate a [`$skip`]({{< docsref "reference/operator/aggregation/skip/" >}}) stage.

```csharp
var query = collection.AsQueryable().Skip(10);
```
```json
[
	{ $skip: 10 }
]
```

#### $unwind

The [`SelectMany`]({{< msdnref "bb548748" >}}) method is used to generate an [`$unwind`]({{< docsref "reference/operator/aggregation/unwind/" >}}) stage. In addition, because of how [`$unwind`]({{< docsref "reference/operator/aggregation/unwind/" >}}) works, a [`$project`]({{< docsref "reference/operator/aggregation/project/" >}}) stage will also be rendered. To see the list of expressions supported in the [`SelectMany`]({{< msdnref "bb548748" >}}) method, see [Aggregation Projections]({{< relref "reference\driver\expressions.md#aggregation-projections" >}}).

```csharp
var query = from p in collection.AsQueryable()
            from pet in p.Pets
            select pet;

// or

var query = collection.AsQueryable()
    .SelectMany(p => p.Pets);
```
```json
[
	{ $unwind: "$Pets" }
	{ $project: { Pets: 1, _id: 0 } }
]
```
---
```csharp
var query = from p in collection.AsQueryable()
            from pet in p.Pets
            select new { Name = pet.Name, Age = p.Age};

// or

var query = collection.AsQueryable()
    .SelectMany(p => p.Pets, (p, pet) => new { Name = pet.Name, Age = p.Age});
```
```json
[
	{ $unwind: "$Pets" }
	{ $project: { Name: "$Pets.Name", Age: "$Age", _id: 0 } }
]
```

#### $group

The [`GroupBy`]({{< msdnref "bb534492" >}}) method is used to generate a [`$group`]({{< docsref "reference/operator/aggregation/group/" >}}) stage. In general, the [`GroupBy`]({{< msdnref "bb534492" >}}) method will be followed by the [`Select`]({{< msdnref "bb548743" >}}) containing the accumulators although that isn't required. To see the list of supported accumulators, see [Accumulators]({{< relref "reference\driver\expressions.md#accumulators" >}}).

```csharp
var query = from p in collection.AsQueryable()
            group p by p.Name into g
            select new { Name = g.Key, Count = g.Count() };

//or

var query = collection.AsQueryable()
    .GroupBy(p => p.Name)
    .Select(g => new { Name = g.Key, Count = g.Count() });
```
```json
[
	{ $group: { _id: "$Name", __agg0: { $sum: 1 } } },
	{ $project: { Name: "$_id", Count: "$__agg0", _id: 0 } }
]
```
---
```csharp
var query = collection.AsQueryable()
    .GroupBy(p => p.Name, (k, s) => new { Name = k, Count = s.Count()});
```
```json
[
	{ $group: { _id: "$Name", Count: { $sum: 1 } } },
]
```

#### $sort

The [`OrderBy`]({{< msdnref "bb549264" >}}) and [`ThenBy`]({{< msdnref "bb535112" >}}) methods are used to generate a [`$sort`]({{< docsref "reference/operator/aggregation/sort/" >}}) stage.

```csharp
var query = from p in collection.AsQueryable()
            orderby p.Name, p.Age descending
            select p;

//or

var query = collection.AsQueryable()
    .OrderBy(p => p.Name)
    .ThenByDescending(p => p.Age);
```
```json
[
	{ $sort: { Name: 1, Age: -1 } },
]
```

#### $geoNear

The [`$geoNear`]({{< docsref "reference/operator/aggregation/geoNear/" >}}) stage is not currently supported using LINQ.

#### $out

The [`$out`]({{< docsref "reference/operator/aggregation/out/" >}}) stage is not currently supported using LINQ.

#### $lookup

The [`GroupJoin`]({{< msdnref "bb548539" >}}) method is used to generate a [`$lookup`]({{< docsref "reference/operator/aggregation/lookup/" >}}) stage.

This operator can take on many forms, many of which are not supported by MongoDB. Therefore, only 2 forms are supported.

First, you may project into most anything as long as it is supported by the `$project` operator and you do not project the original collection variable. Below is an example of a valid query:

```csharp
var query = from p in collection.AsQueryable()
            join o in otherCollection on p.Name equals o.Key into joined
            select new { p.Name, AgeSum: joined.Sum(x => x.Age) };
```
```json
[
    { $lookup: { from: "other_collection", localField: 'Name', foreignField: 'Key', as: 'joined' } }",
    { $project: { Name: "$Name", AgeSum: { $sum: "$joined.Age" }, _id: 0 } }
]
```

Second, you may project into a type with two constructor parameters, the first being the collection variable and the second being the joined variable. Below is an example of this:

```csharp
var query = from p in collection.AsQueryable()
            join o in otherCollection on p.Name equals o.Key into joined
            select new { p, joined };
```
```json
[
    { $lookup: { from: "other_collection", localField: 'Name', foreignField: 'Key', as: 'joined' } }"
]
```

{{% note %}}An anonymous type, as above, has a constructor with two parameters as required.{{% /note %}}

Sometimes, the compiler will also generate this two-parameter anonymous type transparently. Below is an example of this with a custom projection:

```csharp
var query = from p in collection.AsQueryable()
            join o in otherCollection on p.Name equals o.Key into joined
            from sub_o in joined.DefaultIfEmpty()
            select new { p.Name, sub_o.Age };
```
```json
[
    { $lookup: { from: "other_collection", localField: 'Name', foreignField: 'Key', as: 'joined' } }",
    { $unwind: "$joined" },
    { $project: { Name: "$Name", Age: "$joined.Age", _id: 0 }}
]
```

### Supported Methods

The method examples are shown in isolation, but they can be used and combined with all the other methods as well. You can view the tests for each of these methods in the [MongoQueryableTests]({{< testref "MongoDB.Driver.Tests/Linq/MongoQueryableTests.cs" >}}).

#### Any

All forms of [`Any`]({{< msdnref "system.linq.queryable.any" >}}) are supported.

```csharp
var result = collection.AsQueryable().Any();
```
```json
[
    { $limit: 1 }
]
```
---
```csharp
var result = collection.AsQueryable().Any(p => p.Age > 21);
```
```json
[
    { $match: { Age: { $gt: 21 } },
    { $limit: 1 }
]
```

{{% note %}} `Any` has a boolean return type. Since MongoDB doesn't support this, the driver will pull back at most 1 document. If one document was retrieved, then the result is true. Otherwise, it's false.{{% /note %}}

#### Average

All forms of [`Average`]({{< msdnref "system.linq.queryable.average" >}}) are supported.

```csharp
var result = collection.AsQueryable().Average(p => p.Age);

// or

var result = collection.AsQueryable().Select(p => p.Age).Average();
```
```json
[
    { $group: { _id: 1, __result: { $avg: "$Age" } } }
]
```

#### Count and LongCount

All forms of [`Count`]({{< msdnref "system.linq.queryable.count" >}}) and [`LongCount`]({{< msdnref "system.linq.queryable.longcount" >}}) are supported.

```csharp
var result = collection.AsQueryable().Count();

// or

var result = collection.AsQueryable().LongCount();
```
```json
[
    { $group: { _id: 1, __result: { $sum: 1 } } }
]
```
---
```csharp
var result = collection.AsQueryable().Count(p => p.Age > 21);

// or

var result = collection.AsQueryable().LongCount(p => p.Age > 21);
```
```json
[
    { $match : { Age { $gt: 21 } } },
    { $group: { _id: 1, __result: { $sum: 1 } } }
]
```

#### Distinct

[`Distinct`]({{< msdnref "bb348456" >}}) without an equality comparer is supported.

```csharp
var query = collection.AsQueryable().Distinct();
```
```json
[
    { $group: { _id: "$$ROOT" } }
]
```

Using a distinct in isolation as shown above is non-sensical. Since each document in a collection contains a unique _id field, then there will be as many groups as their are documents. To properly use distinct, it should follow some form of a projection like $project or $group.

```csharp
var query = collection.AsQueryable()
    .Select(p => new { p.Name, p.Age })
    .Distinct();
```
```json
[
    { $group: { _id: { Name: "$Name", Age: "$Age" } } }
]
```

#### First and FirstOrDefault

All forms of [`First`]({{< msdnref "system.linq.queryable.first" >}}) and [`FirstOrDefault`]({{< msdnref "system.linq.queryable.firstordefault" >}}) are supported.

```csharp
var result = collection.AsQueryable().First();

// or

var result = collection.AsQueryable().FirstOrDefault();
```
```json
[
    { $limit: 1 }
]
```
---
```csharp
var result = collection.AsQueryable().First(p => p.Age > 21);

// or

var result = collection.AsQueryable().FirstOrDefault(p => p.Age > 21);
```
```json
[
    { $match : { Age { $gt: 21 } } },
    { $limit: 1 }
]
```

#### GroupBy

See [`$group`]({{< relref "#group" >}}).

#### GroupJoin

See [`$lookup`]({{< relref "#lookup" >}}).

#### Max

All forms of [`Max`]({{< msdnref "system.linq.queryable.max" >}}) are supported.

```csharp
var result = collection.AsQueryable().Max(p => p.Age);

// or

var result = collection.AsQueryable().Select(p => p.Age).Max();
```
```json
[
    { $group: { _id: 1, __result: { $max: "$Age" } } }
]
```

#### OfType

All forms of [`OfType`]({{< msdnref "system.linq.queryable.oftype" >}}) are supported.

```csharp
// assuSumg Customer inherits from Person
var result = collection.AsQueryable().OfType<Customer>();
```
```json
[
    { $match: { _t: "Customer" } }
]
```

{{% note %}}Based on configuration, the discriminator name `_t` may be different as well as the value `"Customer"`.{{% /note %}}

#### OrderBy, OrderByDescending, ThenBy, and ThenByDescending

See [`$sort`]({{< relref "#sort" >}}).

#### Select

See [`$project`]({{< relref "#project" >}}).

#### SelectMany

See [`$unwind`]({{< relref "#unwind" >}}).

#### Single and SingleOrDefault

All forms of [`Single`]({{< msdnref "system.linq.queryable.single" >}}) and [`SingleOrDefault`]({{< msdnref "system.linq.queryable.singleordefault" >}}) are supported.

```csharp
var result = collection.AsQueryable().Single();

// or

var result = collection.AsQueryable().SingleOrDefault();
```
```json
[
    { $limit: 2 }
]
```
---
```csharp
var result = collection.AsQueryable().Single(p => p.Age > 21);

// or

var result = collection.AsQueryable().SingleOrDefault(p => p.Age > 21);
```
```json
[
    { $match : { Age { $gt: 21 } } },
    { $limit: 2 }
]
```

{{% note %}}The limit here is 2 because the behavior of `Single` is to throw when there is more than 1 result. Therefore, we pull back at most 2 documents and throw when 2 documents were retrieved. If this is not the behavior you wish, then `First` is the other choice.{{% /note %}}

#### Skip

See [`$skip`]({{< relref "#skip" >}}).

#### Sum

All forms of [`Sum`]({{< msdnref "system.linq.queryable.sum" >}}) are supported.

```csharp
var result = collection.AsQueryable().Sum(p => p.Age);

// or

var result = collection.AsQueryable().Select(p => p.Age).Sum();
```
```json
[
    { $group: { _id: 1, __result: { $sum: "$Age" } } }
]
```

#### Take

See [`$limit`]({{< relref "#limit" >}}).

#### Where

See [`$match`]({{< relref "#match" >}}).

repository: mongodb/mongo-csharp-driver

repo_name: mongodb/mongo-csharp-driver


text:
# Odysseus

[![Build Status](https://dev.azure.com/darkraiden/Odysseus/_apis/build/status/darkraiden.odysseus?branchName=master)](https://dev.azure.com/darkraiden/Odysseus/_build/latest?definitionId=2&branchName=master)

Odysseus is your friendly DNS pathfinder.

## Description

Odysseus is designed to update a list of [Cloudflare](https://cloudflare.com) _DNS A Records_ with your ISP Dynamic IP Address. The app reads the config from a `YAML` file, queries the Cloudflare API and if the content of each record has changed (i.e. the content of the DNS record != your IPS public IP), it'll go ahead and update it for you.

If you wrap this tool in a crontab, you might be all set to host your website/blog on a cluster of Raspberry Pis.

## How to use it

### Run it as a binary

First things first, download the `odysseus` binary:

```bash
mdir -p /opt/odysseus && cd /opt/odysseus
wget https://github.com/darkraiden/odysseus/releases/download/<version>/odysseus_<version>_<Linux|Darwin>_<i386|x86_64|armv6>.tar.gz
tar zxvf odysseus_<version>_<Linux|Darwin>_<i386|x86_64|armv6>.tar.gz
rm odysseus_<version>_<Linux|Darwin>_<i386|x86_64|armv6>.tar.gz
```

In the same directory where odysseus was downloaded, create a file called `cloudflare.yml`:

```bash
cat <<EOF > ./cloudflare.yml
cloudflare:
  zone_name: example.com
  email<EMAIL_ADDRESS>  api_key: cloudflareapikeygoeshere
  records:
    - www.example.com
    - api.example.com
EOF
```

To establish a connection with Cloudflare, you need the `email` address you use to log in and the `api_key` which can be found in `My Profile` > `API Tokens` > `Global API Key`. Ensure that the rest of the details (`zone_name` and `records`) are correct too.

Now that your config is ready, simply type:

```bash
./odysseus
```

Alternatively, the config file can be stored elsewhere with a different name; if so, ensure to pass the appropriate flags when running the binary:

```bash
./odysseus -config-name someName.yml -config-path /path/to/config/file
```

### Run it as a Docker container

First things first, create a file called `cloudflare.yml`, as showed in the [Run It as a Binary](#run-it-as-a-binary) section, and save it somewhere in your filesystem;

Finally, run odysseus' Docker container:

```bash
docker run -v /path/to/cloudflare.yml:/app/cloudflare.yml davidedimauro88/odysseus:<version>
```

## Installing from source

Odysseus can be built on Linux, Mac OS or Windows; the build commands might change slightly depending on the OS or Processor Architecture.

### Requirements

* git
* go 1.14+
* a Cloudflare API Key
* docker (optional)
* docker-compose (optional)

### Setting up workspace

Clone the project in your `$GOPATH`:

```bash
cd $GOPATH
mkdir -p src/github.com/darkraiden
git clone https://github.com/darkraiden/odysseus src/github.com/darkraiden/odysseus
cd src/github.com/darkraiden/odysseus
```

### Building

Install the app dependencies using `go mod`:

```bash
export GO111MODULE=on
go mod download
```

Finally, build odysseus:

```bash
env GOOS=<targetOsHere> GOARCH=<targetArchitecture> go build cmd/odysseus/main.go -o odysseus
```

To execute the application, ensure the `cloudflare.yml` file is created; check the [cloudflare.yml.example](cloudflare.yml.example) file for more information.

If you don't want to compile odysseus on your workstation, a `docker-compose.yml` file is provided so that the app can be compiled inside a Docker container:

```bash
docker-compose up --build
```

### Testing

The test suite can be run with `go test`:

```bash
go test ./...
```

## License

Licensed under the MIT License: [https://mit-license.org](https://mit-license.org/)

repository: darkraiden/odysseus

gha_language: Go

repo_name: darkraiden/odysseus


text:
# Bencode decoder in ANSI C

This is a strict steaming parser for [bencode][bencode]. Inputs are
thoroughly validated and invalid inputs are rejected.

The full API is documented in `bencode.h`. Here's the list of functions:

```c
void bencode_init(struct bencode *, const void *, size_t);
void bencode_reinit(struct bencode *, const void *, size_t);
void bencode_free(struct bencode *);
int  bencode_next(struct bencode *);
```

Run the test suite with `make check`.

[bencode]: https://en.wikipedia.org/wiki/Bencode

license: Unlicense

repository: neelchauhan/bencode-c

gha_license_id: Unlicense

repo_name: neelchauhan/bencode-c


text:
# fl-aws (Flaws at AWS)

Use this repo to

* [submit and discuss issues](https://github.com/andreineculau/fl-aws/issues) concerning Amazon Web Services.
* [submit BCP proposals](https://github.com/andreineculau/fl-aws/compare) for working with Amazon Web Services.

**This Repo is NOT affiliated with AWS or Amazon.**

## Stories from the AWS front line

[![I Have No Idea What I'm Doing Here](http://img.memecdn.com/but-it-sounds-fatinstating_o_1295405.webp) **But It Sounds Fatinstating**](http://www.memecenter.com/fun/1295405/but-it-sounds-fatinstating)

May 2016 I've changed jobs, and I ended up working with AWS. Exciting, yes. Greenfield, yes. Powerful, yes. Smooth, no. Logical, no.

So here I am half a year later. I haven't hit rock bottom, and it doesn't seem like I will do so anytime soon,
so I thought I'd better document some of the findings, the workarounds and some of the struggles which I label **flaws** in the hype wagon called AWS.

FWIW I'm [a well-above-average reader of technical documentation](https://github.com/for-GET/http-decision-diagram),
and I have a sound experience in software development, Unix, networking, protocols, virtualization, infrastructure, devops, etc.
This is the reason for choosing **flaws** over personal lacking in motivation/understanding, and not *the customer is always right*.

I know that there's a bunch of "smartness" in and at AWS, but that's beside the point.
This repo is not about throwing rotten tomatoes at AWS, though the number of open issues over time can point in that direction.

Overheard: AWS tagline "Friends don't let friends build data centers,"
— Tony Baer (@TonyBaer) July 21, 2016

There's a discrepancy between what I see AWS delivering in "the not-just-iron department" and
what AWS promises overall, the quality that one expects in these times,
not just from a [AAA class company](http://www.managementtoday.co.uk/aws-cloud-amazon-worlds-biggest-company/article/1393101)
but from the IT sector in general, even when it's marked "beta", MVP, etc.

Customers on the Basic support plan can only ask for help and file issues on [the AWS public forums](https://forums.aws.amazon.com/index.jspa)
and general public sites like [StackOverflow](https://stackoverflow.com/), while the ones paying for Technical Support can do so in a closed environment called "Support Center". NOTE: on top of that, most paying customers still won't get information about AWS decisions, just that behaviour/limitation X is by design (o.O) .
I can't help but think that the split (forums vs support center) is strategic as to keep the noise levels up, in order to disperse any concentration of negative perception.

Maybe that's just me and my conspiracy devil sitting on my left shoulder talking, but that's what I'm addressing with this repo. I'm concentrating all the negative ~~perception~~ facts about the AWS offerings.

**I'd like this repo to keep AWS transparently accountable for the lackings in their offering**.

We will not inflict a change in their reply style "I have +1 you on our internal backlog, but I can't give you any ETA on a fix" (what year is this that I need a proxy to +1 for me?! and +1 on top of which number?!) and surely not get to peak into their development process --- for instance, as it is already possible with [Atlassian](https://www.atlassian.com/) (creators of JIRA, BitBucket, etc), who keep [their issues public](https://jira.atlassian.com) making it trivial to see and judge the quality of their products and of their development process --- but at least next time someone asks what's the quality level of AWS and what are some of the pain points with a specific service, they can read some these war stories from the AWS front line.

## And I'd like to hear yours too!

If you too are working on the AWS platform, feel free to [submit a new issue](https://github.com/andreineculau/fl-aws/issues/new) or [submit a PR with a BCP proposal](https://github.com/andreineculau/fl-aws/compare).

There are plenty and there will be even more people that will want to get their hands dirty with AWS. Help them make an informed decision.

**NOTE**: https://github.com/open-guides/og-aws is great, but it fills a different void.

## License

[Apache 2.0](LICENSE)

repository: andreineculau/fl-aws

repo_name: andreineculau/fl-aws


text:
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: 'BUG'
assignees: ''
---

## Before submitting bug reports
1. Check if your bug is already addressed in the FAQ: https://swharden.com/scottplot/faq/
2. Search the issues to see if the bug has already been addressed: https://github.com/ScottPlot/ScottPlot/issues

_Delete this line and the text above it before submitting this issue_

## Bug Report Template

**ScottPlot Version:** ???

**Operating System:** ???

**Application Type:** (console, WinForms, WPF, or Avalonia)

**Bug Description:** Describe the bug

**Reproducing:** What do others have to do to reproduce the bug? A code sample may be helpful.

```cs
// a code sample may improve communication
var examplePlot = new ScottPlot.Plot();
```

repository: paxtonxuhongzhi/ScottPlot

repo_name: paxtonxuhongzhi/ScottPlot


text:
Vagrant
=========

Quickly start virtual machines for
  - development environment
  - testing infrastructure management scripts (like shell scripts, Chef cookbooks, Puppet modules, Ansible playbooks, ...)

## Quick Start

  ```sh
  mkdir vagrant-demo
  cd ./vagrant-demo

  # Create Vagrantfile, use `hashicorp/bionic64` as the base image
  vagrant init hashicorp/bionic64

  # start the virtual machine
  vagrant up

  # SSH into the machine
  vagrant ssh

  # your project directory on the host is synced to `/vagrant` in the virtual machine,
  # so you can see 'Vagrantfile' here
  ls /vagrant/
  # Vagrantfile
  ```

## Networking

- Forwarded ports

  ```sh
  Vagrant.configure("2") do |config|
    # forward host port 8080 to guest port 80
    config.vm.network "forwarded_port", guest: 80, host: 8080
  end
  ```

- Private network

  Allow you to access guest machines by a private network, multiple machines on the same network can communicate with each other

  ```sh
  Vagrant.configure("2") do |config|
    config.vm.network "private_network", type: "dhcp"
  end
  ```

  Or use a static ip

  ```sh
  Vagrant.configure("2") do |config|
    config.vm.network "private_network", ip: "<IP_ADDRESS>"
  end
  ```

  The you could reach the maching on `<IP_ADDRESS>` and SSH to it in this way:

  ```sh
  vagrant ssh-config
    #   Host default
    #     HostName <IP_ADDRESS>
    #     User vagrant
    #     Port 2222
    #     UserKnownHostsFile /dev/null
    #     StrictHostKeyChecking no
    #     PasswordAuthentication no
    #     IdentityFile /home/gary/downloads/vagrant-demo/.vagrant/machines/default/virtualbox/private_key
    #     IdentitiesOnly yes
    #     LogLevel FATAL

  ssh -i /home/gary/downloads/vagrant-demo/.vagrant/machines/default/virtualbox/private_key<EMAIL_ADDRESS>    ```

## Boxes

```sh
# list base images downloaded
vagrant box list
```

repository: garylirocks/quickrefs

extension: markdown

repo_name: garylirocks/quickrefs