text:
# Changelog

These are the changes to each version that have been released
on the official Visual Studio extension gallery.

## 1.25

**Not yet released. Release date TBD.**

- Speed improvements: a previous optimization to create a map for project names after linting was slow with individual files.  This has been removed and replaced where appropriate with a similar map being created before linting as we identify files to lint. Other more minor speed optimizations have also been made.  These include speeding things up by always using backslash as the file separator where we can, instead of trying to use forwardslash in Node.  Also clearing down of old errors where a file no longer has errors has been made faster.
- .d.ts files are now ignored in linting.  This can be overridden by removing the .d.ts entry from Tools/Options/TypeScript Analyzer/Ignore Patterns.
- Some bugs have been fixed when settings are reset with Tools/TypeScript Analyzer/Reset TypeScript Analyzer settings... Previously the settings didn't always save correctly, and the 'Lint .js and .jsx files' option didn't always reset correctly.
- We now show a sensible message if we try to edit the default config file after it has been deleted.  The default config file is tslint.json in the user profile folder, usually c:\Users\{username}\tslint.json.
- Behavior of ignore options when running with tsconfig.json has been improved. The ignore options now consistently apply to the tsconfig.json files, not individual files.  Individual files can be ignored in the tsconfig.json files themselves.
- Behavior has been improved where a config change means an open file with linting errors is no longer lintable.  Now any errors will clear on the next run.
- Benchmarking code is now available in build.  To use this set a BENCHMARK compilation flag in the projects and run a release build.

## 1.24

**2022-06-24**

- No functionality changes.  Patch release to upgrade versions of dependent packages with vulnerabilities:
- NewtonSoft.Json was upgraded to v13.0.1.
- All npm packages were updated to latest SemVer version, whilst keeping TSLint at 6.1.3 and TypeScript at 4.0.3 as at previous release
- Specifically this updated minimalist to 1.2.6, path-parse to 1.0.7
- Released from ProductionPatch240622 branch

## 1.23

**2020-05-06**

- Underlying TSLint upgraded to 6.1.3 (final release), TypeScript 4.0.3.  Version of node used to run these upgraded to 12.18.3.
- Added colored underlining for warnings and errors in codefiles, added hover to show error.  Can be disabled in Tools/Options.
- Disabling the TypeScript Analyzer in Tools/Options now clears warnings and errors.  Disabling JavaScript linting in Tools/Options now clears JavaScript warnings and errors.
- Fixed bug where Analyzer got confused by lowercase filepaths returned from TSLint, which can happen in certain error situations.  All filepaths are now treated as case-insensitive.
- Source column in Error List window now shows linting errors generated from a build as 'Build'.
- Fixed some bugs re renaming files and including new files in a project.
- Simplified threading: removed some locks by invoking onto UI thread earlier when updating error list.  Made some other internal code simplifications.

## 1.22

**2020-04-12**

- Underlying TSLint upgraded to 6.1.1, TypeScript 3.8.3.

## 1.21

**2020-01-09**

- Underlying TSLint upgraded to 5.20.1, TypeScript 3.7.4.

## 1.20

**2019-08-12**

- Underlying TSLint upgraded to 5.18.0, TypeScript 3.5.3.

## 1.19

**2019-05-31**

- Underlying TSLint upgraded to 5.17.0, TypeScript 3.5.1.
- Upgrade so will work in Visual Studio 2019 as well as Visual Studio 2017.
- As part of upgrade, make launch of extension asynchronous.  This will improve Visual Studio startup time.  The active open .ts file in the solution should be linted on solution open more reliably than previously.  Inactive open .ts files are not linted at startup (they never were).
- Install node files as part of extension install, rather than doing an npm install on the first run (or sooner) of the extension.  This makes the VSIX download slightly larger, but again means Visual Studio startup is less impacted by the extension.
- Fix unit tests so they work with the two versions of Visual Studio.  Note that Visual Studio 2017 has to be installed on the machine for the tests to work at all.  The tests should run reliably if the solution is opened in Visual Studio 2017.  They will also run in Visual Studio 2019 if Visual Studio 2017 is installed, but can get confused about library references (a 'Run All' can fail for certain tests).

## 1.18

**2019-02-03**

- Underlying TSLint upgraded to 5.13.1, TypeScript 3.3.3333.

## 1.17

**2018-08-08**

- Underlying TSLint upgraded to 5.11.0, TypeScript 3.0.1.
- Support for linting .js and .jsx files added, controlled by 'Lint .js and .jsx files' flag in Tools/Options/TypeScript Analyzer.

## 1.16

**2018-07-05**

- Underlying TSLint upgraded to 5.10.0, TypeScript 2.9.2.
- Improved error handling when the call to TSLint fails.  Messages are placed in the Error List as well as under TypeScript Analyzer in the Output window.  Also improved handling of status bar messages slightly.
- Increased timeouts for synchronous calls made on a build to the Analyzer, particularly for local ng lint calls.  Stopped timeouts crashing the extension.

Thanks to @lukeowlclaw for the Error List improvements.

## 1.15

**2018-04-19**

- Underlying TSLint upgraded to 5.9.1, TypeScript 2.8.1.

## 1.14

**2017-11-29**

- Underlying TypeScript upgraded to TypeScript 2.6.2.
- Fixed bug causing intermittent errors at startup if multiple code windows are open (root cause of error in [#23](https://github.com/rich-newman/typescript-analyzer/issues/23)).
- Fixed bug that could cause same file to be linted multiple times if multiple code windows open at startup.

## 1.13

**2017-10-30**

- Underlying TSLint upgraded to 5.8.0, TypeScript 2.5.3.
- Better exception handling for errors when cleaning the Error List ([#23](https://github.com/rich-newman/typescript-analyzer/issues/23)).
- Tried to make it clearer that this extension needs a Visual Studio Solution: it will not work in a folder view.

## 1.12

**2017-09-23**

- Bugfix release only.  No new functionality.
- Fixed bug causing error when the same file is linked into two Visual Studio projects and has errors ([#20](https://github.com/rich-newman/typescript-analyzer/issues/20)).
- Upgraded all Nuget Visual Studio and Newtonsoft NuGet dependencies to latest, some refactoring.

## 1.11

**2017-09-03**

- Underlying TSLint upgraded to 5.7.0, TypeScript 2.5.2.

## 1.10

**2017-08-22**

- Fixed bug in 'Use local ng lint' option when combined with the 'Run on build' and 'Show errors' options.  Previously the build was not halting if there were errors.
- Provided feedback in the Output window under TypeScript Analyzer dropdown when an attempt to use local ng lint is made.  You get a message saying whether it succeeded or failed and why.

## 1.9

**2017-08-15**

- Underlying TSLint upgraded to 5.6.0, TypeScript 2.4.2.
- Fixed the web links for codelyzer/angular errors in the Error List so you can click in the 'Code' column and go to the appropriate web page.
- Added a 'Use local ng lint' option in Tools/Options/TypeScript Analyzer.  This allows codelyzer linting for Angular CLI projects with older versions of codelyzer.

Many thanks to Chris Plewright (@zewpo) for these enhancements.

## 1.8

**2017-08-07**

- Bugfix release: fix bug when linting unloaded projects, defend better against exceptions when iterating projects and project items.  No new functionality.

## 1.7

**2017-07-29**

- Optimization release only.  No new functionality.
- Fixed: analysis was slow when analyzing a solution with a very large number of files (tens of thousands) in a complex folder structure (thousands of folders).  This was the case even if the files were not in the solution, and even if the folder was being ignored in Tools/Options.  The most common scenario where this could occur was with a complex node_modules folder and **not** using tsconfig.json files.
- Fixed: the analyzer could hang up Visual Studio trying to update the Error List with a large number of errors (thousands) if these were not in a project. It was repeatedly scanning the entire solution hierarchy to try to find the project name for each file.  The most common scenario where this could happen was including a complex node_modules folder in a tsconfig.json file in error, even if it was not in the solution. Note that if there are thousands of errors the analyzer is still not what you would call speedy: with 3000 errors in a node_modules folder with 20,000 files it is taking about 8 seconds to lint, parse and display the results on my not-very-fast machine.
- Improved general speed for ignored items in Tools/Options/TypeScript Analyzer/Ignore patterns.

## 1.6

**2017-07-15**

- Underlying TSLint upgraded to 5.5.0, TypeScript 2.4.1.
- Option to use tsconfig.json files for linting added to Tools/Options ([#11](https://github.com/rich-newman/typescript-analyzer/issues/11)).  If this is true the analyzer passes tsconfig.json files to tslint, rather than individual TypeScript files, which allows the [tslint 'semantic' rules](https://palantir.github.io/tslint/usage/type-checking/) to be used.  More details and the exact rules for how the analyzer finds tsconfig.json files are in the [readme](https://github.com/rich-newman/typescript-analyzer).
- Option to run the analyzer only if explicitly requested from the Solution Explorer added to Tools/Options ([#12](https://github.com/rich-newman/typescript-analyzer/issues/12)).  If true the default behavior of running the analyzer whenever a file is opened or saved is disabled.
- Files now only ever get analyzed if they are in a Visual Studio project in a loaded Visual Studio solution.  Previously a file might or might not get analyzed depending on how it was accessed if it was in the folder tree but not in a project.
- Introduced more robust error handling.
- Fixed bug with resetting options to default values ([#9](https://github.com/rich-newman/typescript-analyzer/issues/9)).
- The options on Tools/Options/TypeScript Analyzer screen are grouped more logically.
- Debug: Changes made to allow for simpler debugging of node calls.

## 1.5

**2017-06-24**

- Underlying TSLint upgraded to 5.4.3.
- Bugfixes for initialization when running a build with 'run on build' enabled.
- Improved exception handling for parsing of tslint results

## 1.4

**2017-06-06**

- Underlying TSLint upgraded to 5.4.2, TypeScript 2.3.4.
- Option to run the linter before any build added to Tools/Options.  This will stop the build if any TSLint errors show as Visual Studio errors in the Visual Studio Error List.  This can only happen if 'Show errors' is also set to true.
- Default tslint.json updated to comply with current schema.  This is the tslint.json made available on an initial install or on Tools/Reset TypeScript Analyzer Settings.

## 1.3

**2017-05-20**

- Added menu option to allow TSLint to try to fix errors using its fixers
- Allowed linting on entire projects and solutions in Solution Explorer
- Message shown in status bar if try to run linting and it's disabled in Tools/Options

## 1.2

**2017-05-12**

- Underlying TSLint upgraded to version 5.2.0
- All recommended rules included individually in the default tslint.json, including new ones
- TSLint errors shown as errors in the Error List, warnings as warnings, but only if new Show Errors option in Tools/Options is set to true (default is false)
- ReadMe updated to discuss the issues above
- Can now use a tslint.json that has the 'extends' configuration property (#3)
- defaultSeverity can now be set in tslint.json.  TSLint errors and warnings will show correctly in the Error List if the new Show Errors option in Tools/Options is set to true (#1)

## 1.1

**2017-05-02**

- Correct links to help files

## 1.0

**2017-05-01**

- Initial upgraded version of Mad Kristensen's Web Analyzer
- ESLint, CSSLint, CoffeeLint removed, telemetry removed
-  Menu items for 'TypeScript Analyzer' added

repository: rich-newman/typescript-analyzer

gha_language: C#

repo_name: rich-newman/typescript-analyzer


text:
{:new_window: target="_blank"}

# About {{site.data.keyword.blockstorageshort}}
{: #about-block-storage}

Last updated: 07 September 2016
{: .last-updated}

The IBM {{site.data.keyword.blockstorageshort}} service allows you to attach persistent storage to a virtual server.  To use the storage, you attach the block volumes to your virtual servers, as depicted in the following image. The data in block storage volumes persists beyond the lifecycle of your virtual server. This means that you can detach the volumes from a server instance and reattach to another server instance, without any changes to your data. {{site.data.keyword.blockstorageshort}} uses OpenStack Cinder to manage the volume lifecycle.

The storage is accessed on a block device that you can partition, format, and mount to, such as /dev/vdb. The data persists until you delete it. The ephemeral storage used by virtual servers persists across restarts, but is not retained after you delete the virtual server.

![{{site.data.keyword.blockstorageshort}}](images/block_storage_storagetypes.png)

*Figure 1. {{site.data.keyword.blockstorageshort}} Diagram*

## Volumes
{: #using-volumes-concept}

{{site.data.keyword.blockstorageshort}} volumes are created through a {{site.data.keyword.blockstorageshort}} service instance. You can attach the volumes to a virtual server in the following ways:

* Specify a particular device that you provide.
* Specify that the system automatically selects an available device name.

The virtual server performs its I/O operations directly with the specified device and its associated backend.  Volume read/write data does not pass through the {{site.data.keyword.blockstorageshort}} service.

## Snapshots
{: #using-snapshots-concept}

You can also create block-level snapshots of volumes. A snapshot captures data on the block storage volume at a specific point in time. You can use snapshots to perform incremental backups of your data. That said, the snapshots exist on the same storage as the original volume. Therefore, snapshots are not a sufficient disaster recovery strategy.

**Note**: You cannot create snapshots while a volume is attached to a server instance.

When you create a volume from a snapshot, a new volume is created that exists in the same state the original volume was in at the time you took the snapshot.

Creating a volume from a snapshot has the following impact:

* The existing volume that is used for the snapshot is not removed.
* Data that is created, modified, or deleted after the relevant snapshot is taken is not included in the new volume.

What's next?

Create a volume. For more information, see [Creating volumes](../BlockStorage/blockstorage_creatingvolume.html).

repository: kKronstainBrown/docs

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: kKronstainBrown/docs


text:
# GoCore

A Golang solution of tools for building a full stack web application.

## Goals of the Project ##

Below are some targeted goals:

* Http & Https Redirection & HTTP 2.0 with Golang 1.8 and [gin-gonic/gin](https://github.com/gin-gonic/gin)
* Extension packages for common functions including:
	* File IO Management & Manipulation
	* Zip File Compression & Decompression

----------

* Database extensions and drivers for the following:
	* Supported databases:
		* MongoDB
		* BoltDB
	* Create SQL Schema (DDL) from JSON Configuration.
	* Create Golang ORM packages for RDBMS Transactions & Queries.

----------
## Getting Started ##

### Install Homebrew ###

`/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"`

### Install MongoDB ###

`brew tap mongodb/brew`

`brew install mongodb-community`

`brew services start mongodb/brew/mongodb-community`

### Install NPM and Node JS ###

https://nodejs.org/en/download/

### Install Golang

[Setup](https://golang.org/doc/install/ "Setup")

### Add your gopath bin directory to your PATH and set NODE_ENV=development

`vim ~/.bash_profile`

Add lines
`
export PATH="$PATH:/Users/davidrenne/go/bin"
export NODE_ENV=development
`

Source it:

`source ~/.bash_profile`

### Get GoCore
1.  To start a new project with go modules (1.13) GoCore run the following steps in a new console window.

	`go mod init github.com/your_example/repo_project`

	`go get github.com/DanielRenne/GoCore`

1.5.  To start a new project with a version prior to go modules.

	`go get github.com/DanielRenne/GoCore...`

### Add to your Operating Systems Path the ~/go/bin directory

### Build GoCore App

1.  A sample project generator is available to build a GoCore project.

	`go install github.com/DanielRenne/GoCore/core/goCoreCreateApp`

	And install the binary for fetching the project template files

	`go install github.com/DanielRenne/GoCore/getAppTemplate`

Then run

    goCoreCreateApp

Follow the prompts to generate your app and it will copy the templates found in GoCore/tools/appFiles into your project directory github.com/username/appName.  Note you probably should install nodejs, npm and nvm before generating an app.

GoCore has built in functions to read json configuration files to generate SQL Tables, indexes, primary & foreign keys, NOSQL Collections & Buckets, auto-generated Golang model code files, auto-generated REST web api code files, and swagger.io schema files application.  See [BuildCore Readme](https://github.com/DanielRenne/GoCore/blob/master/buildCore/README.md) for details.

### Run Your GoCore App

1.  Run the following to start your app

	`bash bin/start_app`

Open a web browser to:  [http://<IP_ADDRESS>:8080](http://<IP_ADDRESS>:8080)

Login as admin/admin and setup application roles etc.  More documentation to come later on application specific setup.

#### How to build your own web project in GoCore

See [Application Settings](https://github.com/DanielRenne/GoCore/blob/master/doc/Application_Settings.md) within docs for information on what webConfig.json allows for.

## IMPORTANT NOTE for HTTPS (TLS) Security
GoCore comes default with an open ssl generated Cert and PEM files that are **NOT** secret as they are available via the open source repository.  Make sure you replace both these files located in the `keys` directory.  To do this we recommend in Linux running the following command and copying the output files to the `keys` directory.  Alternatively cert and pem files generated by a valid Certificate Authority like GoDaddy or Verisign when you reach production with an online domain.

	openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout key.pem -out cert.pem

NOTE:  We also recommend **NOT** to store your secret key files in source control.  We recommend ignoring the keys directory for source control.

NOTE:  key files are ingored when running `getCore` as to not overwrite your keys.

Additional Info on Golang https:  [https://www.kaihag.com/https-and-go/](https://www.kaihag.com/https-and-go/ "HTTPS&GO")

## Building a Database Model with SQLite3

####NOTE: Because SQLite3 requires gcc externally we separated the driver for compiling reasons.  Windows users we recommend installing gcc as a prerequisite for the sqlite3 golang module to compile via [tdb-gcc](http://tdm-gcc.tdragon.net/download).  Be sure to install 64 bit for 64 bit machines.

####More SQLite tools to verify your data in Windows [SQLite Studio](http://sqlitestudio.pl/)

To create a SQLite3 Database schema and model package for your application run the following:

	go install github.com/DanielRenne/GoCore/buildCoreLite

Then run

	buildCoreLite

## References

* [NOSQL Database Schema Model API](https://github.com/DanielRenne/GoCore/blob/master/doc/NOSQL_Schema_Model.md)

license: MIT

repository: panduit-joeb/GoCore

repo_name: panduit-joeb/GoCore


text:
## [0.1.4] - 20-JAN-2010

* Maintenance release with support for Provider library version 4.0.2

## [0.1.3] - 20-DEC-2019

* Fixed bug where setting showSelectedItemShadow = false in the theme did not hide the shadow on the navbar
* Demo app updated to a taller bar height and cleaner style for better display across devices

## [0.1.2] - 27-NOV-2019

* Added support for selectedItemBorderColor in the theme options

## [0.1.1] - 16-NOV-2019

* Fixed example code and tidied deployment structure

## [0.1.0] - 16-NOV-2019

* Included example code

## [0.0.1] - 15-NOV-2019

* First release of the package


text:
# Node Todo App running in Docker

A Node app built with MongoDB and Angular running in containers (Docker). For demonstration purposes and a tutorial.

## Requirements

- [Docker](http://www.docker.com)
- [MongoDB](http://mongodb.org)
- [Node and npm](http://nodejs.org)

## Installation

Follow instructions given by instructor during the PaaS Academy session.

## Appplication Screenshot

![Imgur](http://i.imgur.com/JB17Uv6.png)

repository: cheyry/docker-activity-base

repo_name: cheyry/docker-activity-base


text:
**Note from Ryan:**
This directory is an exact copy of uikit/src/images/.
Uikit is looking for its images in this directory and I end up with 404s
if I don't place it here. Perhaps this is a bug in the Uikit beta version,
or perhaps I've missed some configuration setting that corrects this.

Until this directory is no longer necessary, it must be updated with any
changes made to the uikit/src/images/ directory.

repository: noelboss/AdminThemeBoss

gha_language: CSS

gha_license_id: MIT

repo_name: noelboss/AdminThemeBoss


text:
---
title: Viking Robotics
layout: page.hbs
hide-title: true
styles:
  - index
---

![Team 2984](/images/team/team-photo-2018.jpg)

- [Sign up form](https://goo.gl/forms/SaWoLMADZkbF0iLp1)

We are a student run team from La Jolla High school.

Many people believe you have to have experience building or programming to join our club. That couldn’t be further from the truth!

Most of our members have no prior knowledge when they join our team; the skills that people learn through FIRST Robotics can’t be easily taught in a classroom or learned at home. Because our robot is built entirely from the ground up we machine our own parts, do our own wiring, and write our own code.

Most team members continue to use what they have learned into college, going on to pursue STEM degrees at engineering focused colleges such as Cal Tech, MIT, UC Berkeley, and Cal Poly SLO.

Our team gives back to the community by volunteering to get kids interested in robotics.

 [Community Outreach](/community/)

# What Do We Do?

Every year we participate in the [First Robotics Competition](http://www.firstinspires.org/robotics/frc), in which teams have 6 weeks to design and build a robot that competes in a sport-like event. At the end of the build season we attend regional competitions with teams from around the world in San Diego. At the 2018 San Diego Regional we competed with teams from Chile, Denmark, Netherlands and Brazil.

Our entire season is planned out to the day. We hold an entire meeting just to determine our strategy for the annual game.

Mechanical focuses on creating the parts of the robot as well as parts of the field for practice.

Electrical and software create our code that drives the robot as well as all the wiring the robot needs to function.

Communications deals with all our fundraising and website development.

Logistics handles budgeting and travel arrangements.

Robotics isn't just for STEM oriented students, we need a variety of people...including you!

# Why not Join?

All you need to join is a want to have fun and a drive to learn. While our season starts early January and goes until late February, there are off-season meetings that are required members are required to attend to gain the skills necessary for the season. During the season we meet everyday except for Sundays. On weekdays we meet from 2:50pm to 6:00pm and on Saturdays from 10am-6pm. It is not necessary to be at every meeting to be part of the team.

We meet in Room 908 every Wednesday. Feel free to come after this season ends if you have any interest in joining.

We work on fundraising and recruiting new members year round! Our team hosts a table at Club Day and Welcome to LJHS events. We also visit local our local elementary and middle schools to provide information and foster an interest in engineering in younger students.

repository: Hexotical/website

repo_name: Hexotical/website


text:
# Part 2: Continuous Delivery to Docker Swarm

First, setup a 2-node Docker swarm.  These instructions assume that systemd is used to manage services.

## Docker Swarm Manager Setup

1. Install Docker Swarm
```
curl -sSL https://get.docker.com/ | sh
```

2. Initialize Docker Swarm.  Make note of the `docker swarm join` instructions that are listed (this can be accessed at any time by running `docker swarm join-token worker` on a swarm manager.
```
docker swarm init
```

3. Expose Docker TCP Socket.  Run `sudo systemctl edit docker` and paste the following: (replace `<IP_ADDRESS>` with internal IP address if this node has a public IP address)
```
[Service]
ExecStart=
ExecStart=/usr/bin/dockerd -H tcp://<IP_ADDRESS>:2375 -H unix:///var/run/docker.sock
```

4. Restart Docker service and check that it is running
```
sudo systemctl restart docker
sudo systemctl status docker
```

## Docker Swarm Worker Setup

1. Install Docker Swarm
```
curl -sSL https://get.docker.com/ | sh
```

2. Join the Swarm using the instructions from the swarm manager.
```
docker swarm join --token [token] [swarm manager ip]:2377
```

## Initialize the Docker Swarm

From the repository root, run the following:

```
cd cd/swarm/
export DOCKER_HOST=tcp://[swarm manager ip]:2375
./init.sh
```

## Continuous Deployment through Jenkins

1. Switch to the `cd-docker-swarm` branch in the repository

2. Login to your Jenkins Build Agent and authenticate to your Docker registry using `docker login [registry]`

3. Edit the `Jenkinsfile` - under the `Deploy to Docker Swarm` stage, update the registry URL to point at your Docker registry and update the `DOCKER_HOST` to point at your Docker Swarm manager.

4. Run Jenkins Blue Ocean against the `cd-docker-swarm` branch to deploy to your Docker Swarm

branch_name: refs/heads/cd-docker-swarm


text:
## Shallow water application

This is a research application that provides a set of tools for oceanographic and hydrographic simulations over shallow domains.

### Implemented models

|               | BDF                | Crank-Nicolson     | Adams-Moulton      |
|---------------|:------------------:|:------------------:|:------------------:|
| Gravity waves | :heavy_check_mark: | :heavy_check_mark: |                    |
| Boussinesq    | :heavy_check_mark: |                    | :heavy_check_mark: |
| Shallow water | :heavy_check_mark: |                    |                    |

### Dependencies

This application does not have dependencies at compile time.

If the coupling with a Navier-Stokes is required, add the following applications to compilation:
- PfemFluidDynamicsApplication
- HDF5Application
- MappingApplication

### References

- M. Masó, I. De-Pouplana, E. Oñate. A FIC-FEM stabilized formulation for the shallow water equations over partially dry domains. Computer Methods in Applied Mechanics and Engineering, 389C (2022) 114362.

repository: e-dub/Kratos

gha_license_id: NOASSERTION

repo_name: e-dub/Kratos


text:
# Face Tracking Demo

Detect and track faces from a webcam (required).

### Image Detection for Real-Time Apps

We can lower detector requirements for real-time applications by heuristically or adaptively using tracking after we've obtained an initial set of bounding boxes from detection.

Many modern deep learning detectors can be computationally expensive, and often times there is a tradeoff between precision and performance. Some of them rely on region proposal - this can result in detectors to be "jumpy" and appear to be unstable.

For face detection in front of a webcam, we can run detector periodically, as the object of interest doesn't change semantically (still the same face), and then follow the trajectory of the face as it moves across the screen using trackers.

In this demo, we use Blue and Green colored boxes to demonstrate detection / tracking to get a smooth trajectory of the bounding box as my face moves across the screen.

Green = Detected face

Blue = Box from previous detection, updated via tracking.

### Pipeline

1. Run detector, get boxes (Green)
2. Track boxes for each frame (Blue)
3. Update detector periodically or on-demand, and re-create trackers for each box.

## Install

`pip install -r requirements.txt`

## Run

Run main program, you should see webcam screen, with Green or Blue box for faces detected.

Green = Detected face

Blue = Box from previous detection, updated via tracking.

````
python face_tracking.py`
````

Optionally use `-i` argument to set different detection intervals, in seconds. Default=6.

````
python face_tracking.py -i 3
````

## Sample

![sample](./sample.gif)

# LICENSE

MIT

repository: samuel-code/faceTracking

repo_name: samuel-code/faceTracking


text:
# mongofile:usage:/how/to/use/this.lib
=======
This library use a different approach to accessing files and is more Java centric than the GridFS implementation is in the mongo-java-driver. Rather than having to cast the file objects, I made the decision to prefer static compile time type-checking and simplified object APIs over what is currently available from GridFS(2.11).

The reading, and writing functions are separated from the main store code to keep usage more simple for the most common read and writes.

Gzip compression is automatically detected based on media type of the file unless turned off in the configuration. Most media types will be stored compressed to save bytes ( even whole chunks ) in the store. This is handled transparently and the user does not need to know when compression is involved.

Optional encryption is also supported by providing the Encryption class to perform the encryption and decryption of file chunks while storing and reading the file. The use of encryption will automatically detected from the storage format store with the file, however the correct decryption algorithm is required to be provided with the configuration in order to succesfully.

Also TTL file expiration ( deletion ) will allow for usage as a cache to store objects that have a finite lifespan.

## URL
A mongofile URL protocol has also been implemented to allow a single string to to represent all the info need to fetch the file back as well as give some metadata to the user wihtout having to query the store for basic metadata. Several examples look like this

```
mongofile:/home/me/foo/filename.zip?52fb1e7b36707d6d13ebfda9#application/zip
mongofile:gz:/mypath/fileName.pdf?52fb1e7b36707d6d13ebfda9#application/pdf
mongofile:enc:/mypath/fileName2.pdf?52fb1e7b36707d6d13ebfda9#application/pdf
```

For the second example above, the parts of the URL represent :

| Part | Meaning |
| ----:|:--- |
| mongofile | the protocol |
| gz | compression was used to save space storing the file |
| /mypath/fileName.pdf | the file path and name |
| 52fb1e7b36707d6d13ebfda9 | a UUID id generated by the MongoDB driver for this object |
| application/pdf | the media type for the data |

## The API
The API for this library has changed a bit from the 0.7.x version to allow for migration to the new objects that are present in the upcoming Mongo-Java-Driver 3.0.x. It will require some minro refactoring of your existing code that should not be too painful.

This library now uses surrogate objects to conform it to the same objects used by the 3.0.x driver so that when the 3.0.x driver is released, this library will be ready to work with it. I plan for this library to go 1.0.x shortly after the 3.0.x driver is released.

# Standing up a MongoFileStore

## MongoClient and the database
Configure the connection to the MongoDB server and database in whatever fashion is available to you. Consult the MongoClient class from the driver for more Info.

The database object below is a normal com.mongodb.DB or org.mongodb.MongoDatabase object.

## Configuration
```Java
MongoFileStoreConfig config = MongoFileStoreConfig.builder()// start builder
        .bucket(bucket) // <bucket>.files and <bucket>.chunks
        .chunkSize(ChunkSize.medium_256K) // default
        .enableCompression(true) //  default
        .enableEncryption(null) // provide an encryption/decryption instance
        .writeConcern(WriteConcern.SAFE) // default
        .readPreference(ReadPreference.primary()) // default
        .build(); // generate the configuration

MongoFileStore store = new MongoFileStore(database, config);
```

Keep the store handy, it is the core of all operations with file stored in MongoFS. If you are using Spring, use Java or XML configuration to make it a singleton Spring bean and inject this object where you need to access files.

> NOTE : Compression and encryption are allowed to be used at the same time and you can choose one, the other, or both on a per file store basis.

> NOTE : IF both are enabled, compression will be applied first, then the compressed bytes will be encrypted9 before chunking and saving.

## GridFS compatable configuration
```Java
MongoFileStoreConfig config = MongoFileStoreConfig.builder().gridFSCompatible('test');

MongoFileStore store = new MongoFileStore(database, config);
```

## File expiration
A file expriation timestamp can be placed on the file if storage in the file store is temporary. This expiration utilizes the MongoDB TTL index feature so the removal of file is dependant on the server side background process being enabled on the server. Expired files still in the file store will still be served up if requested before the server process can remove the files and chunks.

```Java
// When a file is created
Date expiresAt = TimeMachine.from(0).forward(3).days().inTime();

MongoFileWriter writer = store.createNew(filename, mediaType, expiresAt, true);
writer.write(new ByteArrayInputStream(LoremIpsum.LOREM_IPSUM.getBytes()));

// after a file is created
MongoFile first = store.find("/foo/bar.txt").next();
store.expireFile(first,  expiresAt);

```

> NOTE : A simple Date manipulation DSL exists in the library called TimeMachine. It has its limits but should be sufficient for most needs. You can also combine different units of measure ( days, hours, minutes, ...) to come up with some unique situations. For example :

```Java
TimeMachine.now().backward(2).days().forward(5).hours().backward(10).minutes().inTime();
```

# File I/O

##Writing files into the store

```Java
MongoFileWriter writer = store.createNew("README.md", "text/plain", true);
writer.write(new ByteArrayInputStream(LOREM_IPSUM.getBytes()));
MongoFile file = writer.getMongoFile();
URL url = file.getURL();

System.out.println(url);
```
would print the following to stdout

```
mongofile:gz:README.md?52fb1e7b36707d6d13ebfda9#text/plain
```
where the parts represent :

| Part | Meaning |
| ----:|:--- |
| mongofile | the protocol |
| gz | compression was used to save space storing the file |
| README.md | the file path and name |
| 52fb1e7b36707d6d13ebfda9 | a UUID id generated by the MongoDB driver for this document |
| text/plain | the media type for the data |

Store the url string how you like and use it to fetch the file back from the store when its needed.

> REMEMBER : Filenames are *NOT* unique in the system, you can have many files with the same path and file name.

## Zip Archive Expansion
Support is available to have a zip archive automatically expanded into individual files during the upload process and return a Manifest with a list of all the files in the zip archive.

```
MongoFileWriter writer = store.createNew(filename, "application/pdf");

MongoManifest manifest = writer.uploadZipFile(new FileInputStream(filename));

assertEquals(filename, manifest.getZip().getFilename());
assertEquals(3, manifest.getFiles().size());

MongoFile file1 = manifest.getFiles().get(0);
assertEquals("file1.txt", file1.getFilename());

```

Both compression and encryption will be applied if configured and applicable for each file read from the zip archive. No data will be stored on the archvie file itself so the data is only stored once.

Expanding the zip archive will results in unique files being added to the file store and currently, there is no support to read the original archive back out of the store. You can obtain a manifest from the original file as follows:

```
MongoManifest manifest2 = store.getManifest(mongoFileUrl);

assertTrue(manifest2.getZip().isExpandedZipFile());
assertEquals(3, manifest2.getFiles().size());

MongoFile file1 = manifest2.getFiles().get(0);
```

Each file can then be read from the file store individually.

## Finding and reading files
Using a stored URL string

```Java
MongoFileUrl url = MongoFileUrl.construct("mongofile:gz:README.md?52fb1e7b36707d6d13ebfda9#text/plain");
MongoFile mongoFile = store.findOne(url); // lookup the file by its url

ByteArrayOutputStream out = new ByteArrayOutputStream(32 * 1024);
mongoFile.readInto(ByteArrayOutputStream, true); // true == flush output stream when done

String fileText = out.toString();
```

You can still read files by file name from the store as well.

```Java
ByteArrayOutputStream out = new ByteArrayOutputStream(32 * 1024);

MongoFileCursor cursor = store.find("/foo/bar1.txt");
int count = 0;
for (MongoFile mongoFile : cursor) {
    ++count;
    assertNotNull(mongoFile.getURL());
    assertEquals("/foo/bar1.txt", mongoFile.getFilename());
    InputStream in = new MongoFileReader(store, mongoFile).getInputStream();
    new BytesCopier(in, out).transfer(true); // append more than one file together
}
assertEquals(2, count);
assertEquals(LoremIpsum.LOREM_IPSUM.length() * 2, out.toString().length());
```

## Removing files from the store

```Java
String storedSomewhereElse = "mongofile:gz:README.md?52fb1e7b36707d6d13ebfda9#text/plain";

MongoFileUrl url = MongoFileUrl.construct(storedSomewhereElse);

boolean async = true;
store.remove(url, async); // mark the file for deletion
```

You can asynchronously delete files if the store is configured for that or express it explicilty as in the code above. This feature utilizes the TTL index feature on MongoDb collecitons to delete the files, so it may take 60 seconds or longer to actually delete the file.

> NOTE : Evne if a file has been deleted but not removed by the server, the MongoFS will not return the file object to the use so it is effectively treated as if it was already removed from the repository.

##Where to find more
Check out the integration tests in the source code, there are many examples of how to do things with mongoFS. I am trying to all of the features in the library with an integration test.

gha_language: Java


text:
---
author: Aashni
comments: true
date: 2016-08-20 23:39:25+00:00
description: 'AngularJS: An Introduction'
layout: post
link: http://blog.aashni.me/2016/08/angularjs-an-introduction/
slug: angularjs-an-introduction
title: 'AngularJS: An Introduction'
wordpress_id: 209
categories:
- AngularJS
- Javascript
- LSH
- Tutorial
- Women In Tech
- Workshop
---

Hey there! Welcome to this multi-part introduction to [AngularJS](https://angularjs.org/), a Javascript based framework to make some kickass websites. I've broken down this tutorial into five sections that build on top of each other, and hope to add some more sections in the future. I originally taught this as a virtual class as part of the [Ladies Storm Hackathons Tutorial](https://github.com/Ladies-Storm-Hackathons/Tutorials) series, and decided to convert it into a written tutorial for anyone looking to start learning AngularJS.

I'm hoping you're a fan of Star Wars, or at least know a little about it. I'll be making use of the [Star Wars API](http://swapi.com) to help create a Star Wars Fan Site. At the end of each section, I'll also provide a link to a commit in a github repo that should match all the code upto that section of the tutorial.

Let me begin with a little bit about AngularJS, and my experience with it.
AngularJS is a javascript framework that's backed by Google. It's been used to create websites like [Join.Me](https://www.join.me/) and [virginamerica.com](https://www.virginamerica.com/). You can check out more Angular-based websites at this nifty [Built With Angular](https://builtwith.angularjs.org/) website.

It works as a router that serves up either a controller or a view. I like to say that the controller is where all the Javascript logic goes, while the view is how you display the information to the visitor. There are some other powerful parts to AngularJS, namely the directives and services. These let you replace potentially repetitive or somewhat complex code in your controllers and views. But we'll talk more about them later on with examples.

I first used AngularJS for a couple of weeks during an Internship at [Amazon](http://www.amazon.com). I then used it much more in-depth at another internship at [OANDA](http://www.oanda.com). At OANDA, we used AngularJS as the core framework for the front-end portion of the new registration system we were releasing. Once I returned back to school, I've used AngularJS for a couple of super quick [hackathon projects](http://blog.aashni.me/2015/09/that-one-time-i-hacked-the-north/), as well as a much more complicated project course I took. I find it really easy to setup, and that you can connect it with a lot of other technologies like [Firebase](https://www.firebase.com/) really easily.

Before we begin writing any code, I'd like to make sure you have all the basics setup and ready. From personal preference, I'll be using [Sublime Text](https://www.sublimetext.com) for editing my code.
I am using a Mac to do my development, and will will be using the bash terminal to run a Python command that creates a simpleHTTPServer. I'll be doing my testing on a Google Chrome browser to view the changes as we go.

If everyone is ready, then let's get started!

[Part 1 - Hello World](http://blog.aashni.me/2016/08/angularjs-tutorial-part-1-hello-world)

[Part 2 - Introducing the Star Wars API and Angular Services](http://blog.aashni.me/2016/08/angularjs-tutorial-part-2-introducing-the-star-wars-api-and-angular-services)

[Part 3 - Using the Star Wars API Data through the Controller and Views](http://blog.aashni.me/2016/08/angularjs-tutorial-part-3-using-star-wars-api-data-through-angular-controllers-and-views)

[Part 4 - Introducing Bootstrap](http://blog.aashni.me/2016/08/angularjs-tutorial-part-4-introducing-bootstrap)

[Part 5 - Creating Individual Pages for Characters and Movies](http://blog.aashni.me/2016/08/angularjs-tutorial-part-5-creating-individual-pages-for-characters-and-movies)

repository: aashnisshah/aashnime

branch_name: refs/heads/main

gha_language: JavaScript

repo_name: aashnisshah/aashnime


text:
---
layout: "unit"
title: "Guide Entry 12.01.09"
path: "/curriculum/guides/2012/1/12.01.09.x.html"
unitTitle: "Interpreting the Imagery of War"
unitAuthor: "Leszek Ward"
keywords: ""
recommendedFor: "Recommended for English, grades 9-12"
---

Guide Entry to 12.01.09:

This unit aims to explore the various contradictions expressed in the poetry and painting of war. It also aims to help students substantiate interpretive claims using evidence and analysis from a variety of texts.  It begins with the analysis of mystery cartoons, a strategy suggested by George Hillocks Jr. in his book, Teaching Argument Writing. After students have learned to make claims of fact and substantiate them with evidence from the cartoons, they begin to study paintings of war and to make interpretive claims about their meaning. The unit concludes with a study of three poems, by which point students should be able to analyze and argue independently. The paintings and poems selected for this unit express a variety of conflicting perspectives regarding the experience and meaning of war in order to help students understand that the unique experience of war allows for many seemingly contradictory ideas to coexist.

(Recommended for English, grades 9-12)

gha_language: HTML


text:
---
layout: page
subheadline:  "The organization of the project"
title:  "Developer's guide"
teaser:
categories:
tags:
header: no
permalink: "/developers-guide/"
---

## Configuration Management

### Source Code

Public repository on Github [github.com/cedesk/data-exchange](https://github.com/cedesk/data-exchange)

### Branching

The `master` branch keeps the stable, released versions.

There is a `development` branch, where some global improvements were done. Feature development is done in branches. Mature features are merged back to the `development` branch.

### Releasing

Making a release is made in several steps.

1) First eventually added/remove OSS libraries are reflected in the file `about.html`.

2) The `development` branch is merged on to the `master` branch, and the new version number is modified in the build file (`pom.xml`). If the data entities have changed the schema version needs to be modifed as well (also in the `pom.xml`).

3) Set a tag on the last commit on the master branch with the version number in the format `v##.##`, e.g. `v1.25`.

4) Push commits and tags to the central repository.

## Build System

For managing the dependencies of the software on third-party libraries and defining the build process, the project uses Maven 3, see `pom.xml`.

### Client installer packages

Packaging native installers (win: _.exe_, mac: _.dmg_, linux: _.deb_),
using the [javafx-maven-plugin](http://javafx-maven-plugin.github.io/), which is a wrapper of the [JavaFX packaging utility](http://docs.oracle.com/javafx/2/deployment/self-contained-packaging.htm).

The build phase `package` produces the installer for the platform on which the build is running. The resulting artifact is found int build directory `target/jfx/native`.

***Pre-requisites***
In order to assemble platform specific installer packages the following tools are required by the [javafx-maven-plugin](http://javafx-maven-plugin.github.io/).

* for Windows: Inno Setup 5 or later from [http://www.jrsoftware.org](http://www.jrsoftware.org)

* for MacOS: Xcode

* for Linux: RPMBuild or Debian packaging tools

## Automated Tests

JUnit4 is used for defining and running tests.

There are different kinds of tests.

- most of the tests are real unit tests;
- others were written as proof of concept code for developing certain functionality, in particular for the use of certain libraries. These often use a static void main method as entry point.


text:
# howto

**Getting Started**

A quora experiment. Quora clone written in Django.

start the env

	source bitoraenv/bin/activate

install the requirements

	pip install -r requirements.txt

Now run the database migrations

	python manage.py migrate

Now run the server

	python manage.py runserver

Head to `http://<IP_ADDRESS>:8000/`

**Admin Site**

Create superuser for admin site

	python manage.py createsuperuser

Head to `http://<IP_ADDRESS>:8000/admin`

repository: anilkumarmeena/Bitora

repo_name: anilkumarmeena/Bitora


text:
# Oidium phyllanthi var. phyllanthi VARIETY

#### Status
ACCEPTED

#### According to
Index Fungorum

#### Published in
Cahiers Pacif. 11: 106 (1967)

#### Original name
Oidium phyllanthi var. phyllanthi

### Remarks
null

repository: mdoering/backbone

repo_name: mdoering/backbone


text:
# Cloudify Nodecellar Example

This is a fork of the Cloudify Nodecellar Example.

It's main purpose is to demonstrate scaling a Node JS Webserver Backend with a Node JS Frontend.

### Step 1: Upload the blueprint

`cfy blueprints upload -b <choose_blueprint_id> -p <blueprint_filename>`

### Step 2: Create a deployment

Every one of these blueprints have inputs, which can be populated for a deployment using input files.

Example input files are located inside the *inputs* directory.

Note that these files only contain the **mandatory** inputs, i.e, one's that the blueprint does not define a default value for.

After you filled the input file corresponding to your blueprint, run:

`cfy deployments create -b <blueprint_id> -d <choose_deployment_id> -i inputs/<inputs_filename>`

### Step 4: Install

Once the deployment is created, we can start running workflows:

`cfy executions start -w install -d <deployment_id>`

This process will create all the cloud resources needed for the application:

- VM's
- Floating IP's
- Security Groups

and everything else that is needed and declared in the blueprint.

### Step 5: Verify installation

Once the workflow execution is complete, we can view the application endpoint by running:

`cfy deployments outputs -d <deployment_id>`

Hit that URL to see the application running.

### Step 6: Demo the Auto Scale Example

Using the IP & PORT that are in the output of the command in Step 5, you can run:

`ab -n 1000000 -c 200 http://$IP:$PORT/`

This will increase the number of requests to the application. As a result the CPU used by the node process on the nodejs_host VMs will spike above the scale up threshold. This metric is monitored by the Diamond plugin, and the Riemann auto-scale policy calls the scale workflow trigger.

Killing this command should cause the CPU to drop below the scale down threshold, and the application will scale down.

### Step 7:

You can simulate a failed host by stopping or suspending a running nodejs_host VM. The Riemann failed host policy will recognize the lack of system cpu metrics reporting on the host and will trigger the heal workflow.

### Step 7: Uninstall

Now lets run the `uninstall` workflow. This will uninstall the application,
as well as delete all related resources.

`cfy executions start -w uninstall -d <deployment_id>`

### Step 8: Delete the deployment

Its best to delete deployments we are no longer using, since they take up memory on the management machine.
We do this by running:

`cfy deployments delete -d <deployment_id>`

repository: tamirko/cfyApps

repo_name: tamirko/cfyApps


text:
# *ATTENTION*: NETFLIX HAS CLOSED THE PUBLIC API. ALL FURTHER DEVELOPMENT ON THIS GEM HAS CEASED

# Netflix API for Ruby
Copyright (c) 2012 Dean Holdren

To install: `gem install netflix`

This gem uses Netflix's OAuth REST API, you first need to register an application with Netflix at http://developer.netflix.com/apps/register/

This will provide you with a "consumer key", "consumer secret", and "application name"

### To use authenticated features (i.e. queue management):
* Set the consumer/developer config:
  ```ruby
  Netflix::Client.consumer_key = <your consumer/developer key>
  Netflix::Client.consumer_secret = <your consumer/developer secret>
  ```

* Do OAuth dance: (This is a one-time per user step, save the result somewhere.)
  1. Interactive (commandline/irb):
    This will open a netflix.com web page to ask the user to authenticate, and provide a pin.
    ```ruby
    access_token = Netflix::Client.new.oauth
    ```

  2. or Web application (Rails/Sinatra/etc), define a URL that can handle the callback
    ```ruby
    request_token, auth_url = Netflix::Client.new.oauth_via_callback(my_callback_url)
    session[:request_token] = request_token
    redirect_to auth_url
    ```

    Then in the handler for "my_callback_url" (i.e. a Rails controller action) retrieve the :oauth_verifier out of the request params
    ```ruby
    oauth_verifier = params[:oauth_verifier]
    request_token = session[:request_token]
    access_token = Netflix::Client.new.handle_oauth_callback(request_token, oauth_verifier)
    ```

* After OAuth credentials are established:
  ```ruby
  access_token = access_token.token
  access_secret = access_token.secret
  user_id = access_token.params["user_id"]
  ```

(Record these, for example in a User table in a database)
  ```ruby
  client = Netflix::Client.new(access_token, access_token_secret)
  user = client.user(user_id)
  queue = user.available_disc_queue
  discs = queue.discs
  disc_one = discs[0]
  puts "#{disc_one.title} #{disc_one.id}"
  queue.remove(1) #queue is 1-based, so this is first disc
  ```

### TODO
  * unauthenticated features (catalog search)

### Credits
This work is based on: REST API documentation of Netflix (http://developer.netflix.com),
with some help from twitter gem for OAuth ideas https://github.com/jnunemaker/twitter/

repository: dholdren/netflix-ruby

gha_language: Ruby

repo_name: dholdren/netflix-ruby


text:
- [http://en.wikipedia.org/wiki/Consistency_model](Consistency_model)
      * L1: Strict Consistency: strict timelined accross servers at all time
      * L2: Sequential consistency: make sure all servers agree on one sequence, but it might not be how the orignal event was generated
      * L3: Causal Consistency: make sure all events that are related are consistent
      * L?: (skipped) Processor, PRAM, Cache, Slow, ...

repository: realfun/rnotes

repo_name: realfun/rnotes


text:
## bandwhich

![demo](demo.gif)

This is a CLI utility for displaying current network utilization by process, connection and remote IP/hostname

### How does it work?
`bandwhich` sniffs a given network interface and records IP packet size, cross referencing it with the `/proc` filesystem on linux or `lsof` on macOS. It is responsive to the terminal window size, displaying less info if there is no room for it. It will also attempt to resolve ips to their host name in the background using reverse DNS on a best effort basis.

### Installation

#### Arch Linux

```
yay -S bandwhich
```

#### Nix/NixOS

`bandwhich` is available in [`nixpkgs`](https://github.com/nixos/nixpkgs/blob/master/pkgs/tools/networking/bandwhich/default.nix), and can be installed, for example, with `nix-env`:

```
nix-env -iA nixpkgs.bandwhich
```

#### macOS

```
brew install bandwhich
```

#### Other Linux flavours

`bandwhich` can be installed using the Rust package manager, cargo. If it's not in your distro repositories or the available version is too old, you can install it via [rustup](https://rustup.rs/). You can find additional installation instructions [here](https://doc.rust-lang.org/book/ch01-01-installation.html).

The minimum supported Rust version is **1.39.0**.

```
cargo install bandwhich
```

This installs `bandwhich` to `~/.cargo/bin/bandwhich` but you need root priviliges to run `bandwhich`. To fix that, there are a few options:
- Give the executable elevated permissions: `sudo setcap cap_net_raw,cap_net_admin=+ep ~/.cargo/bin/bandwhich`
- Run `sudo ~/.cargo/bin/bandwhich` instead of just `bandwhich`
- Create a symlink: `sudo ln -s ~/.cargo/bin/bandwhich /usr/local/bin/` (or another path on root's PATH)
- Set root's PATH to match your own `sudo env "PATH=$PATH" bandwhich`
- Pass the desired target directory to cargo: `sudo cargo install bandwhich --root /usr/local/bin/`

#### Download a prebuilt binary
If you're on linux, you could also get the generic binary from the releases.

#### Windows
Unfortunately, windows is not supported at the moment - if you'd like to contribute a windows port, it would be very much welcome.

### Usage
```
USAGE:
    bandwhich [FLAGS] [OPTIONS]

FLAGS:
    -h, --help          Prints help information
    -n, --no-resolve    Do not attempt to resolve IPs to their hostnames
    -r, --raw           Machine friendlier output
    -V, --version       Prints version information

OPTIONS:
    -i, --interface <interface>    The network interface to listen on, eg. eth0
```

**Note that since `bandwhich` sniffs network packets, it requires root privileges** - so you might want to use it with (for example) `sudo`.

On Linux, you can give the `bandwhich` binary a permanent capability to use the required privileges, so that you don't need to use `sudo bandwhich` anymore:

```bash
sudo setcap cap_net_raw,cap_net_admin=+ep "$HOME/.cargo/bin/bandwhich"
```

### raw_mode
`bandwhich` also supports an easier-to-parse mode that can be piped or redirected to a file. For example, try:
```
bandwhich --raw | grep firefox
```
### Contributing
Contributions of any kind are very welcome. If you'd like a new feature (or found a bug), please open an issue or a PR.

To set up your development environment:
1. Clone the project
2. `cargo run`, or if you prefer `cargo run -- -i <network interface name>` (you can often find out the name with `ifconfig` or `iwconfig`). You might need root privileges to run this application, so be sure to use (for example) sudo.

To run tests: `cargo test`

Note that at the moment the tests do not test the os layer (anything in the `os` folder).

If you are stuck, unsure about how to approach an issue or would like some guidance, you are welcome to contact<EMAIL_ADDRESS>
### License
MIT

repository: jcgruenhage/bandwhich

repo_name: jcgruenhage/bandwhich


text:
[TOC]

# Overview

systemd-networkd is a system daemon that manages network
configurations.
- It detects and configures network devices as they
appear.
- It can also create virtual network devices.
- This service can be especially useful to set up complex network
configurations for a container managed by systemd-nspawn or for virtual
machines.

# Basic usage

## Required services and setup

To use systemd-networkd, start the following two services and enable
them to run on system boot:
- `systemd-networkd.service`
- `systemd-resolved.service`: this service is required only if you are
specifying DNS entries in `.network` files or if you want to obtain DNS
addresses from networkd's DHCP client.
    + For compatibility with resolv.conf, delete or rename the existing
    file and create the following symbolic link:
    + `# ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf`

## Configuration examples

- All configurations in this section are stored as `foo.network` in
`/etc/systemd/network`. For a full listing of options and processing
order, see [Configuration files](#configuration-files) and
`systemd-network(5)`.
- Systemd/udev automatically assigns predictable, stable network
interface
names for all local Ethernet, WLAN, WWAN interfaces. Use `networkctl
list` to list the devices on the system.
- After making changes to a configuration file, restart
`systemd-networkd.service`.

### Wired adapter using DHCP

`/etc/systemd/network/wired.network`

```
[Match]
Name=enp1s0

[Network]
DHCP=ipv4
```

### Wired adapter using a static IP

`/etc/systemd/network/wired.network`

```
[Match]
Name=enp1s0

[Network]
Address=<IP_ADDRESS>/24
Gateway=<IP_ADDRESS>
```

- You may specify multiple IP addresses.
- Add an IPv6 address with another Address= line.
- See the `systemd.network(5)` man page for more network options such as
specifying DNS servers and a broadcast address.

### Wireless adapter

- In order to connect to a wireless network with systemd-networkd, a
wireless adapter configured with another service such as wpa_supplicant
is required.
- In this example, the corresponding systemd service file that needs to
be enabled is<EMAIL_ADDRESS>This service will run
wpa_supplicant with the configuration file
`/etc/wpa_supplicant/wpa_supplicant-wlp2s0.conf`. If this file does not
exist, the service will not start.

`/etc/systemd/network/wireless.network`

```
[Match]
Name=wlp2s0

[Network]
DHCP=ipv4
```

If the wireless adapter has a static IP address, the configuration is
the same as in a wired adapter.

### Wired and wireless adapters on the same machine

- The setup will enable a DHCP for both a wired and wireless connection
making use of the metric directive to allow the kernel to decide
on-the-fly which one to use. This way, no connection downtime is
observed when the wired connection is unplugged.
- The kernel's route metric (same as configured with ip) decides which
route to use for outgoing packets, in cases when several match. This
will be the case when both wireless and wired devices on the system have
active connections. To break the tie, the kernel uses the metric. If one
of the connections is terminated, the other automatically wins without
there being a gap with nothing configured.

`/etc/systemd/network/wired.network`

```
[Match]
Name=enp1s0

[Network]
DHCP=ipv4

[DHCP]
RouteMetric=10
```

`/etc/systemd/network/wireless.network`

```
[Match]
Name=wlp2s0

[Network]
DHCP=ipv4

[DHCP]
RouteMetric=20
```

### Renaming an interface

- Instead of editing udev rules, a .link file can be used to rename an
interface.
- A useful exapmle is to set a predictable interface name for a
USB-to-Ethernet adapter based on its MAC address, as those adapters are
usually given different names depending on which USB port they are
plugged into.

`/etc/systemd/network/10-ethusb0.link`

```
[Match]
MACAddress=12:34:56:78:90:ab

[Link]
Description=USB to Ethernet Adapter
Name=ethusb0
```

Any user-supplied .link must have a lexically earlier file name than the
default config `99-default.link` in order to be considered at all. For
example, name the file `10-ethusb0.link` and not `ethusb0.link`.

# Configuration files

There are three types of configuration files. They all use a format
similar to systemd unit files.
- `.network` files. They will apply a network configuration for a
matching device.
- `.netdev` files. They will create a virtual network device for a
matching environment.
- `.link` files. When a network device appears, udev will look for the
first matching .link file.

Configuration files are located in `/usr/lib/systemd/network`, the
volatile runtime network directory `/run/systemd/network` and the local
administration network directory `/etc/systemd/network`.
- All configuration files are collectively sorted and processed in
  lexical order, regardless of the directory in which they live.
- However, files with identical name replace each other. Files in /etc
  have the highest priority, files in /run take precedence over files
  with the same name in /usr/lib. This can be used to override a system-
  supplied configuration file withh a local file if needed. As a special
  case, an empty file (file size 0) or symlink with the same name
  pointing to `/dev/null` disables the configuration file entirely (it
  is "masked").
- If all conditions in the `[Match]` section are matched, the profile
  will be activated.
- An empty `[Match]` section means the profile will apply in any case
  (can be compared to the `*` joker)
- Along with the main configuration file, a **drop-in** directory (e.g.
  `/etc/systemd/network/foo.network.d/`) may exist. All files with the
  suffix **.conf** from this directory will be parsed after the file
  itself is parsed. This is useful to alter or add configuration
  settings, without having to modify the main configuration file. Each
  drop-in file must have appropriate section headers.

## Tips
- To override a system-supplied file in `/usr/lib/systemd/network` in a
  permanent manner (i.e. even after upgrade), place a file with same
  name in `/etc/systemd/network` and symlink it to `/dev/null`.
- The `*` joker can be used in `VALUE` (e.g. `en*` match any Ethernet
  device).
- Following this [arch-general thread][thread], the best practice is to
  setup specific container network settings **inside the container**
  with **networkd** configuration files.

## network files

These files are aimed at setting network configuration variables,
especially for servers and containers. `.network` files have the
following sections: `[Match]`, `[Link]`, `[Network]`, `[Address]`, `
[Route]` and `[DHCP]`. Below are commonly configured keys for each
section. See `systemd.network(5)` man page for more information and
examples.

### [Match]

A network file is said to match a device if each of the entries in the
"[Match]" section matches, or if the section is empty.

- `Name=` the device name
- `Host=` the machine hostname
- `Virtualization=` check whether the system is executed in a
virtualized environment or not. A `Virtualization=no` key will only
apply on your host machine, while `Virtualization=yes` apply to any
container or VM.

### [Link]

- `MACAddress=` useful for [MAC address spoofing][spoofing]
- `MTUBytes=` setting a larger MTU value ([jumbo frames][jumbo]) can
significantly speed up your network transfers

### [Network]

- `DHCP=` enables the DHCP client. Accepts "yes", "no", "ipv4" and
"ipv"6
- `DNS=` DNS server address
- `Bridge=` the bridge name
- `IPForward=` enables IP packet forwarding
- `Domains=` a list of domains to be resolved on this link

### [Address]

Specify several "[Address]" sections to configure several addresses.

`Address=` this option is **mandatory** unless DHCP is used

### [Route]

Specify several "[Route]" sections to configure several routes

`Gateway=` this option is mandatory unless DHCP is used

> **Tip**: you can put the `Address=` and `Gateway=` keys in the `
[Network]` section as a short-hand if `[Address]` section contains only
an Address key and `[Gateway]` contains only a Gateway key.

### [DHCP]

The "[DHCP]" section configures the DHCPv4 and DHCPv6 client, if it is
enabled with the `DHCP=` setting.

- `UseDomain=true`

## netdev files

These files will create virtual network devices. See `systemd.netdev(5)`
for more information and examples.

### Kinds of virtual network devices

| Kind      | Description                                                                                |
| -         | -                                                                                |
| bond      | A bond device is an aggregation of all its slave devices. See [Linux Ethernet Bonding Driver HOWTO][bonding] for details.                |
| bridge    | A bridge device is a software switch, and each of its slave devices and the bridge itself are ports of the switch.                       |
| dummy     | A dummy device drops all packets sent to it.                                                                                |
| gre       | A level 3 GRE tunnel over IPv4. See RFC 2784 for details.                                                                                |
| gretap    | A level 2 GRE tunnel over IPv4.                                                                                |
| ip6gre    | A level 3 GRE tunnel over IPv6.                                                                                |
| ip6tnl    | An IPv4 or IPv6 tunnel over IPv6.                                                                                |
| ip6gretap | A level 2 GRE tunnel over IPv6.                                                                                |
| ipip      | An IPv4 over IPv4 tunnel.                                                                                |
| ipvlan    | An ipvlan device is a stacked device which receives packets from its underlying device based on IP address filtering.                    |
| macvlan   | A macvlan device is a stacked device which receives packets from its underlying device based on MAC address filtering.                   |
| sit       | An IPv6 over IPv4 tunnel.                                                                                |
| tap       | A persistent level 2 tunnel between a network device and a device node.                                                                  |
| tun       | A persistent level 3 tunnel between a network device and a device node.                                                                  |
| veth      | An Ethernet tunnel between a pair of network devices.                                                                                |
| vlan      | A VLAN is a stacked device which receives packets from its underlying device based on VLAN tagging. See [IEEE 802.1Q][vlan] for details. |
| vti       | An IPv4 over IPSec tunnel.                                                                                |
| vti6      | An IPv6 over IPsec tunnel.                                                                                |
| vxlan     | A virtual extensible LAN, for connecting Cloud computing deployments.                                                                    |
| vcan      | The virtual CAN driver. Similar to the network loopback devices, vcan offers a virtual local CAN interfaces.                             |

### [Match]

- `Host=`
- `Virtualization=`
- `KernelCommandLine=`
- `Architecture=`

### [Netdev]

- `Name=`: the interface name. This option is compulsory (mandatory)
- `Kind=`: the netdev kind (e.g. bond, bridge, vlan, etc.). This option
is mandatory.

## link files

These files are an alternative to custom udev rules and will be applied
by udev as the device appears. See `systemd.link(5)` for more
information and examples.

### [Match]

- `MACAddress=`
- `Host=`
- `Virtualization=`
- `Type=`

### [Link]

- `MACAddressPolicy=` persistent or random addresses
- `MACAddress=` a specific address

# Usage with containers

# Management and desktop integration

# References

[awiki-systemd-networkd]: https://wiki.archlinux.org/index.php/Systemd-networkd "Arch Wiki: systemd-networkd"
[man-page]: https://www.freedesktop.org/software/systemd/man/systemd-networkd.service.html "Systemd-networkd man page"
[thread]: https://lists.archlinux.org/pipermail/arch-general/2014-March/035381.html "[arch-general] tap device"
[spoofing]: https://wiki.archlinux.org/index.php/MAC_address_spoofing "Arch Wiki - MAC address spoofing"
[jumbo]: https://wiki.archlinux.org/index.php/Jumbo_frames "Arch Wiki - Jumbo Frame"
[bonding]: https://www.kernel.org/doc/Documentation/networking/bonding.txt "Linux Ethernet Bonding driver HOWTO"
[vlan]: http://www.ieee802.org/1/pages/802.1Q.html "Virtual LANs"


text:
# Getting Started

```{.python .input  n=1}
#@hide
%load_ext autoreload
%autoreload 2
%matplotlib inline

from IPython import display
import pandas as pd

display.set_matplotlib_formats('svg')
pd.set_option('precision', 2)
```

This tutorial explains how to get a built-in image classification datasets and how to construct a customized one.

## Getting a Built-in Dataset

Let's first import the `Dataset` class from the `object_detection`. Calling its class method `list` will return the list of build-in dataset names.

A object detection dataset should contain at least two components, the raw images stored on a folder or a zip/tar file, a DataFrame containing the labels. Let's print an example DataFrame:

You can see that it must contain 6 columns ...

Next, here is a list of examples how to prepare various detection datasets,mm

```{.python .input  n=2}
from d8.object_detection import Dataset

names = Dataset.list()
len(names), names[:5]
```

```{.python .input  n=4}
ds = Dataset.get('sheep')
ds.summary()
```

```{.python .input}
ds.show()
```

```{.python .input}
Dataset.summary_all(quick=True)
```


text:
---
description: >-
  In this tutorial, we'll be writing a simple application to make sure we have
  CFWheels installed properly and that everything is working as it should.
---

# Beginner Tutorial: Hello World

### Testing Your Install

Let's make sure we're all on the same page. I'm going to assume that you've followed the [Getting Started](https://app.gitbook.com/o/ZCJLW1aBatPAwpmEV7ux/s/bJHOVUkiNubRJ8g5VX0E/) guide and have CommandBox all setup. If you haven't done that, stop and read that guide get everything setup. It's okay, this web page will wait for you.

Okay, so you have CFWheels installed and can see the CFWheels "Congratulations!"\
page as shown below. That wasn't that hard now, was it?

![Figure 1: Wheels congratulations screen](../../.gitbook/assets/a1f5810-Screen\_Shot\_2022-03-25\_at\_8.59.25\_AM.png)

### Hello World: Your First CFWheels App

Okay, let's get to some example code. We know that you've been dying to get your\
hands on some code!

To continue with Programming Tutorial Tradition, we'll create the ubiquitous _Hello World!_ application. But to keep things interesting, let's add a little CFWheels magic along the way.

### Setting up the Controller

Let's create a controller from scratch to illustrate how easy it is to set up a\
controller and plug it into the CFWheels framework.

First, create a file called `Say.cfc` in the `controllers` directory and add the\
code below to the file.

{% code title="controllers/Say.cfc" %}
```javascript
component extends="Controller"{
}
```
{% endcode %}

Congratulations, you just created your first CFWheels controller! What does this\
controller do, you might ask? Well, to be honest, not much. It has no methods\
defined, so it doesn't add any new functionality to our application. But because\
it extends the base `Controller` component, it inherits quite a bit of powerful\
functionality and is now tied into our CFWheels application.

So what happens if we try to call our new controller right now? Lets take a\
look. Open your browser and point your browser to the new controller. Because my\
local server is installed on port 60000, my URL is `http://<IP_ADDRESS>:60000/say`.\
You may need to enter a different URL, depending on how your web server is\
configured. In my case, I'm using [CommandBox](https://guides.cfwheels.org/docs/commandbox).

![Figure 2: Wheels error after setting up your blank say controller](../../.gitbook/assets/660aaf3-cfwheels-tutorial\_0005\_2.png)

The error says "Could not find the view page for the 'index' action in the 'say'\
controller." Where did "index" come from? The URL we typed in only specified a\
controller name but no action. When an action is not specified in the URL,\
CFWheels assumes that we want the default action. Out of the box, the default\
action in CFWheels is set to `index`. So in our example, CFWheels tried to find\
the `index` action within the `say` controller, and it threw an error because it\
couldn't find its view page.

### Setting up an Action

But let's jump ahead. Now that we have the controller created, let's add an\
action to it called `hello`. Change your `say` controller so it looks like the\
code block below:

{% code title="controllers/Say.cfc" %}
```javascript
component extends="Controller" {
    function hello() {
    }
}
```
{% endcode %}

As you can see, we created an empty method named `hello`.

Now let's call our new action in the browser and see what we get. To call the\
`hello` action, we simply add `/hello` to the end of the previous URL that we\
used to call our `say` controller:

`http://<IP_ADDRESS>:60000/say/hello`

Once again, we get a ColdFusion error. Although we have created the controller\
and added the `hello` action to it, we haven't created the view.

### Setting up the View

By default, when an action is called, CFWheels will look for a view file with\
the same name as the action. It then hands off the processing to the view to\
display the user interface. In our case, CFWheels tried to find a view file for\
our `say/hello` action and couldn't find one.

Let's remedy the situation and create a view file. View files are simple CFML\
pages that handle the output of our application. In most cases, views will\
return HTML code to the browser. By default, the view files will have the same\
name as our controller actions and will be grouped into a directory under the\
view directory. This new directory will have the same name as our controller.

Find the `views` directory in the root of your CFWheels installation. There will\
be a few directories in there already. For now, we need to create a new\
directory in the `views` directory called `say`. This is the same name as the\
controller that we created above.

Now inside the `say` directory, create a file called `hello.cfm`. In the\
`hello.cfm` file, add the following line of code:

{% code title="views/say/hello.cfm" %}
```html
<h1>Hello World!</h>
```
{% endcode %}

Save your `hello.cfm` file, and let's call our `say/hello` action once again.\
You have your first working CFWheels page if your browser looks like _Figure 3_\
below.

![Figure 3: Your first working CFWheels action.](../../.gitbook/assets/5298d15-cfwheels-tutorial\_0004\_3.png)

You have just created your first functional CFWheels page, albeit it is a very\
simple one.

### Adding Dynamic Content to Your View

We will add some simple dynamic content to our `hello` action and add a second\
action to the application. We'll then use some CFWheels code to tie the 2\
actions together. Let's get get to it!

#### The Dynamic Content

The first thing we are going to do is to add some dynamic content to our\
`say/hello` action. Modify your `say` controller so it looks like the code block\
below:

{% code title="controllers/Say.cfc" %}
```javascript
component extends="Controller" {
    function hello() {
        time = Now();
    }
}
```
{% endcode %}

All we are doing here is creating a variable called `time` and setting its value\
to the current server time using the basic ColdFusion `Now()` function. When we\
do this, the variable becomes immediately available to our view code.

Why not just set up this value directly in the view? If you think about it,\
maybe the logic behind the value of time may eventually change. What if\
eventually we want to display its value based on the user's time zone? What if\
later we decide to pull it from a web service instead? Remember, the controller\
is supposed to coordinate all of the data and business logic, not the view.

#### Displaying the Dynamic Content

Next, we will modify our `say/hello.cfm` view file so that it looks like the\
code block bellow. When we do this, the value will be displayed in the browser.

{% code title="views/say/hello.cfm" %}
```html
<h1>Hello World!</h1>
<p>Current time: <cfoutput>#time#</cfoutput></p>
```
{% endcode %}

call your `say/hello` action again in your browser. Your browser should look\
like _Figure 4_ below.

![Figure 4: Hello World with the current date and time](../../.gitbook/assets/9f1a966-cfwheels-tutorial\_0003\_4.png)

This simple example showed that any dynamic content created in a controller\
action is available to the corresponding view file. In our application, we\
created a `time` variable in the `say/hello` controller action and display that\
variable in our `say/hello.cfm` view file.

### Adding a Second Action: Goodbye

Now we will expand the functionality of our application once again by adding a\
second action to our `say` controller. If you feel adventurous, go ahead and add\
a `goodbye` action to the `say` controller on your own, then create a\
`goodbye.cfm` view file that displays a "Goodbye" message to the user. If you're\
not feeling that adventurous, we'll quickly go step by step.

First, modify the the `say` controller file so that it looks like the code block\
below.

{% code title="controllers/Say.cfc" %}
```javascript
component extends="Controller" {
    function hello() {
        time = Now();
    }

    function goodbye() {
    }
}
```
{% endcode %}

Now go to the `views/say` directory and create a `goodbye.cfm` page.

Add the following code to the `goodbye.cfm` page and save it.

{% code title="views/say/goodbye.cfm" %}
```
Goodbye World!
```
{% endcode %}

If we did everything right, we should be able to call the new `say/goodbye`\
action using the following URL:

`http://<IP_ADDRESS>:60000/say/goodbye`

Your browser should look like _Figure 5_ below:

![Figure 5: Your new goodbye action](../../.gitbook/assets/4d9523e-cfwheels-tutorial\_0002\_5.png)

### Linking to Other Actions

Now let's link our two actions together. We will do this by adding a link to the\
bottom of each page so that it calls the other page.

#### Linking Hello to Goodbye

Open the `say/hello.cfm` view file. We are going to add a line of code to the\
end of this file so our `say/hello.cfm` view file looks like the code block\
below:

{% code title="views/say/hello.cfm" %}
```html
<h1>Hello World!</h1>
<p>Current time: <cfoutput>#time#</cfoutput></p>
<p>Time to say <cfoutput>#linkTo(text="goodbye", action="goodbye")#?</cfoutput></p>
```
{% endcode %}

The [linkTo()](https://api.cfwheels.org/controller.linkto.html) function is a built-in CFWheels function. In this case, we are passing 2 named parameters to it. The first parameter, `text`, is the text\
that will be displayed in the hyperlink. The second parameter, `action`, defines the action to point the link to. By using this built-in function, your application's main URL may change, and even controllers and actions may get shifted around, but you won't suffer from the dreaded dead link. CFWheels will\
always create a valid link for you as long as you configure it correctly when you make infrastructure changes to your application.

Once you have added the additional line of code to the end of the\
`say/hello.cfm` view file, save your file and call the `say/hello` action from\
your browser. Your browser should look like _Figure 6_ below.

![Figure 6: Your say/hello action with a link to the goodbye action](../../.gitbook/assets/f600144-cfwheels-tutorial\_0001\_6.png)

You can see that CFWheels created a link for us and added an appropriate URL for\
the `say/goodbye` action to the link.

#### Linking Goodbye to Hello

Let's complete our little app and add a corresponding link to the bottom of our\
`say/goodbye.cfm` view page.

Open your `say/goodbye.cfm` view page and modify it so it looks like the code\
block below.

CFML: views/say/goodbye.cfm

{% code title="views/say/goodbye.cfm" %}
```html
<h1>Goodbye World!</h1>
<p>Time to say <cfoutput>#linkTo(text="hello", action="hello")#?</cfoutput></p>
```
{% endcode %}

If you now call the `say/goodbye` action in your browser, your browser should\
look like _Figure 7_ below.

![ Look out! But there are many\
more powerful features to cover. You may have noticed that we haven't even\
talked about the M in MVC.

No worries. We will get there. And we think you will enjoy it.

repository: cfwheels/cfwheels

branch_name: refs/heads/develop

gha_language: ColdFusion

repo_name: cfwheels/cfwheels


text:
Determine if the given number is a power of some non-negative integer.

Example

-   For  `n = 125`, the output should be
    `isPower(n) = true`;
-   For  `n = 72`, the output should be
    `isPower(n) = false`.

Input/Output

-   **[execution time limit] 0.5 seconds (cpp)**

-   **[input] integer n**

    A positive integer.

    _Guaranteed constraints:_
    `1 ≤ n ≤ 400`.

-   **[output] boolean**

    -   `true`  if  `n`  can be represented in the form  `ab`(`a`  to the power of  `b`) where  `a`  and  `b`  are some non-negative integers and  `b ≥ 2`, false otherwise.

repository: M-Ekrim/codeSignal

repo_name: M-Ekrim/codeSignal


text:
---
layout: default
title: Delete Node in a BST
parent: Leetcode
grand_parent: Problem Solving
date: 2020-04-15
---

# Delete Node in a BST

[leetcode/delete-node-in-a-bst](https://www.leetcode.com/problems/delete-node-in-a-bst/)

## Code

- Runtime: 80 ms, faster than 38.76% of Python3

```python
class Solution:
    def deleteNode(self, root: TreeNode, key: int) -> TreeNode:
        if root == None:
            return None
        if root.val > key:
            root.left = self.deleteNode(root.left, key)
        elif root.val < key:
            root.right = self.deleteNode(root.right, key)
        else:
            if root.left == None and root.right == None:
                return None
            elif root.left == None:
                return root.right
            elif root.right == None:
                return root.left
            minNode = root.right
            while minNode.left:
                minNode = minNode.left
            root.val = minNode.val
            root.right = self.deleteNode(root.right, minNode.val)
        return root
```


text:
# 33 - [Receive Function](Receive%20Function.md)
A contract can have at most one `receive` function, declared using `receive() external payable { ... }` without the function keyword.

This [function](Functions.md) cannot have arguments, cannot return anything and must have external visibility and payable [state mutability](State%20Mutability.md).

1. The receive function is executed on a call to the contract with empty [calldata](../1.%20Ethereum101/Calldata.md). This is the function that is executed on plain Ether transfers via `.send()` or `.transfer()`.

2. In the worst case, the receive function can only rely on 2300 gas being available (for example when send or transfer is used), leaving little room to perform other operations except basic logging

3. A contract without a [receive Ether function](Receive%20Function.md) can receive Ether as a [recipient](../1.%20Ethereum101/Recipient.md) of a *coinbase transaction* (aka miner block reward) or as a destination of a `selfdestruct`. A [Contract](Contract.md) cannot react to such Ether transfers and thus also cannot reject them. This means that `address(this).balance` can be higher than the sum of some manual accounting implemented in a contract (i.e. having a counter updated in the receive Ether function).

___
## Slide Screenshot
![033.png](../../images/2.%20Solidity%20101/033.png)
___
## Slide Deck
- Ether Transfers: send/transfer
	- Empty [Calldata](../1.%20Ethereum101/Calldata.md)
- One, No Parameters/Return, External, Payable
- send/transfer -> 2300 Gas
- Security: ETH Balance -> Assumptions
___
## References
- [Youtube Reference](https://youtu.be/TCl1IcGl_3I?t=1126)

path: /content/2. Solidity 101/Receive Function.md

filename: Receive Function.md


text:
Fluent CQL (fcql)
====

Allows fluent syntax for Cassandra Query Language (cql). Basically it creates CQL string queries from JavaScript code.

**NOTE! Only [CQL3](http://cassandra.apache.org/doc/cql3/CQL.html#createKeyspaceStmt) is supported.**

Example:
```js
var stringQuery = fcql.select(['key', 'email', 'last_name'])
.from('user_profiles')
.where( { key: 'my_user' }).build();
```
results with
```sql
SELECT key, email, last_name
FROM user_profiles
WHERE key = 'my_user';
```

Also raw strings work:
```js
var stringQuery = fcql.select('key, email, last_name')
.from('user_profiles')
.where('key="my_user"').build();
```
results the same as above.

## For whom?
* The library validates given parameters so that you do less mistakes and code faster.
* The library helpful for CQL newbies. JSDoc supported functions will show you available options.
* The library allows partial query reuse (DRY). You can store 'SELECT...FROM...' and then add 'WHERE' as new query needed.

## Usage
```js
var fcql = require('fcql');
```
### Creating tables
```js
fcql.create().table('my_mega_table', {
  name: fcql.text, // allows usage of both hardcoded ('text') and/or fcql-provided CQL types
  eventDate: 'timestamp',
  device: fcql.uuid,
  sensor: 'int',
  description: 'text',
  PRIMARY_KEY: [ ['name', 'eventDate'], 'device', 'sensor' ]
}).build();
```
results with
```sql
CREATE TABLE my_mega_table (
  name text,
  eventDate timestamp,
  device uuid,
  sensor int,
  description text,
  PRIMARY KEY ((name, eventDate), device, sensor)
);
```
### Querying for data
```js
fcql.select('something').from('somewhere').where({
  aStringKey: {GT: '0', LE: '9'},
  anIntKey: 123,
  aDateKey: [new Date(3141592653589), new Date(2141592653589)]
});
```
results with
```sql
SELECT something FROM somewhere WHERE
aStringKey > '0' AND aStringKey <= '9'
AND anIntKey = 123
AND aDateKey IN ('2069-07-21T00:37:33.589Z', '2037-11-11T22:50:53.589Z');
```

## Want to contribute?
It is [Open Open Source](http://openopensource.org/). Whoever sends a PR, which gets accepted, receives the write permissions.

repository: koresar/fcql

repo_name: koresar/fcql


text:
# Test cases for build inclusion

### Points in time

* now: current date and time
* start: inclusive beginning of selection range
* end: exclusive end of selection range

### Event types:

* `[#####]`: Finished build that should be included
* `{#####}`: Finished build that should not be included
* `[*****]`: Running build that should be included
* `{*****}`: Running build that should not be included
* `[=====]`: Scheduled build that should be included
* `{=====}`: Scheduled build that should not be included

## Case 1: now < start < end

```
--- time --------------------------------------------------------->
           :       |                      |
{#####} 1  :       |                      |
           :       |                      |
   {*********} 2   |                      |
           :       |                      |
      {************} 3                    |
           :       |                      |
        [*************] 4                 |
           :       |                      |
           {***} 5 |                      |
           :       |                      |
           [**********] 6                 |
           :       |                      |
           : {===} 7                      |
           :       |                      |
           : {=====} 8                    |
           :       |                      |
           :  [===========] 9             |
           :       |                      |
           :       [===========] 10       |
           :       |                      |
           :       |       [=========] 11 |
           :       |                      |
           :       |                [===========] 12
           :       |                      |
           :       |                      {===========} 13
           :       |                      |
           :       |                      |      {===========} 14
           :       |                      |
          now    start                   end
```

Includes:
* `4`,`6`: Running builds estimated to end in the selection range
  * `running(start, end)`
* `9`: Scheduled builds that start before the selection range but are estimated to end in the selection range
  * `scheduled-backwards(now + 1min, start - 1min)`
* `10`,`11`,`12`: Scheduled builds that start within the selection range
  * `scheduled-forwards(start, end)`

Does not include:
* `1`: All finished builds (since they cannot have finished in the future and the selection range is entirely in the future)
* `2`,`3`,`5`: Running builds that start before the selection range but are not estimated to end within the selection range
* `7`,`8`: Scheduled builds that start before the selection range but are not estimated to end within the selection range
* `13`,`14`: Scheduled builds that start after the selection range

## Case 2: now = start < end

```
--- time --------------------------------------------------------->
           !                              |
{#####} 1  !                              |
           !                              |
     {#####} 2                            |
           !                              |
   {*******} 3                            |
           !                              |
      [**********] 4                      |
           !                              |
           [**********] 5                 |
           !                              |
           !          [===========] 6     |
           !                              |
           !                        [===========] 7
           !                              |
           !                              {===========} 8
           !                              |
           !                              |      {===========} 9
           !                              |
         start                           end
          now
```

Includes:
* `4`,`5`: Running builds estimated to end in the selection range
  * `running(start, end)`
* `6`,`7`: Scheduled builds that start within the selection range
  * `scheduled-forwards(now + 1min, end)`

Does not include:
* `1`: All finished builds (since they cannot have finished in the selection range)
* `3`: Running builds that start before the selection range but are not estimated to end within the selection range
* `8`,`9`: Scheduled builds that start after the selection range

## Case 3: start < now < end

```
--- time --------------------------------------------------------->
           |              :                |
{#####} 1  |              :                |
           |              :                |
     {#####} 2            :                |
           |              :                |
        [#####] 3         :                |
           |              :                |
           [#####] 4      :                |
           |              :                |
           |   [#####] 5  :                |
           |              :                |
       [*********************] 6           |
           |              :                |
           |          [*******] 7          |
           |              :                |
           |              [*******] 8      |
           |              :                |
           |              :   [========] 9 |
           |              :                |
           |              :          [===========] 10
           |              :                |
           |              :                {===========} 11
           |              :                |
           |              :                |      {===========} 12
           |              :                |
         start           now              end
```

Includes:
* `3`,`4`,`5`: Finished builds that start or end in the selection range
  * `finished(start, now + 1min)`
* `6`: Running builds started before the selection range
  * `running(start, now + 1min)`
* `7`,`8`: Running builds started in the selection range
  * `running(start, now + 1min)`
* `9`,`10`: Scheduled builds that start within the selection range
  * `scheduled-forwards(now + 1min, end)`

Does not include:
* `1`,`2`: Finished builds that don't start or end in selection range
* `11`,`12`: Scheduled builds that start after the selection range

## Case 4: start < end = now

```
--- time --------------------------------------------------------->
           |                               !
{#####} 1  |                               !
           |                               !
     {#####} 2                             !
           |                               !
        [#####] 3                          !
           |                               !
           [########] 4                    !
           |                               !
           |           [########] 5        !
           |                               !
       [*************************************] 6
           |                               !
           |                           [*******] 7
           |                               !
           |                               {*******} 8
           |                               !
           |                               !    {========} 9
           |                               !
           |                               !
         start                            end
                                          now
```

Includes:
* `3`,`4`,`5`: Finished builds that start or end in the selection range
  * `finished(start, end)`
* `6`: Running builds started before the selection range
  * `running(start, end)`
* `7`: Running builds started in the selection range
  * `running(start, end)`

Does not include:
* `1`,`2`: Finished builds that don't start or end in selection range
* `8`,`9`: Scheduled builds that start after the selection range

## Case 5: start < end < now

```
--- time --------------------------------------------------------->
           |                       |       :
{#####} 1  |                       |       :
           |                       |       :
     {#####} 2                     |       :
           |                       |       :
        [#####] 3                  |       :
           |                       |       :
           [########] 4            |       :
           |                       |       :
           |       [########] 5    |       :
           |                       |       :
           |                [########] 6   :
           |                       |       :
           |                       {###} 7 :
           |                       |       :
           |                       | {###} 8
           |                       |       :
        [************************************] 9
           |                       |       :
           |                     [************] 10
           |                       |       :
           |                       |   {*********} 11
           |                       |       :
           |                       |       {*********} 12
           |                       |       :
           |                       |       :    {========} 13
           |                       |       :
         start                    end     now
```

Includes:
* `3`,`4`,`5`,`6`: Finished builds that start or end in the selection range
  * `finished(start, end)`
* `9`: Running builds started before the selection range
  * `running(start, end)`
* `10`: Running builds started in the selection range
  * `running(start, end)`

Does not include:
* `1`,`2`: Finished builds that don't start or end in selection range
* `7`,`8`: Finished builds start after the selection range
* `11`,`12`: Running builds that start after the selection range
* `13`: Scheduled builds that start after the selection range

repository: jenkinsci/calendar-view-plugin

repo_name: jenkinsci/calendar-view-plugin


text:
---
layout: default
---

# [][3]My first blog

Rough winds do shake the darling buds of May, but your tenderness will always soften my heart. Thank you, my dearest Fenglin!

[link to another page][1]

[Hello GFM][2]
---
Introductions of markdown
Text can be bold, italic, or ~~strikethrough~~.

There should be whitespace between paragraphs. We recommend including a README, or a file with information about your project.

This is a normal paragraph following a header. GitHub is a code hosting platform for version control and collaboration. It lets you and others work together on projects from anywhere.

[More][2]

[From gravity to the Higgs we’re still waiting for new physics][3]
---
Annual physics jamboree Rencontres de Moriond has a history of revealing exciting results from colliders, and this year new theories and evidence abound

[More][3]

[Does China play fair?][4]
---
来自中国的竞争只会愈演愈烈，冷静的头脑，睿智的决策显得尤为必要。

如果唐纳德•川普履行自己的诺言，对中国对美国的所有贸易出口实行惩罚性关税，他将会开启一场贸易战。幸运的是，这位总统有所顾虑，部分是因为他希望借助中国的 帮助来抑制朝鲜发展核能的野心。但一切并没有结束。中国工业市场的紧张局势正四处蔓延，时至今日，甚至对全球经济产生了威胁。这周，美国的贸易代表声称，中国是 一个前所未有的威胁，完全不受现有的贸易规则约束。大量的中国收购也让欧盟十分担心，为此欧盟正在起草更严格的对外投资规则。于此同时，中国的经济现代化政策也 对未来经济带来了更大的压力。

[More][4]

[Fenglin's present to dearest Lingqi][5]
---
Happy Birthday to Lingqi!
:smile::birthday::tada::birthday::tada::birthday::smile:

[More][5]

[1]:	another-page
[2]:	intro-of-markdown
[3]:	from-gravity-to-the-Higss-we’re-still-waiting-for-new-physics
[4]:	does-China-play-fair
[5]:	Fenglin-present-Lingqi


text:
---
'@keystonejs/demo-project-meetup': patch
---

Updated usage of Apollo based on Next.js [example](https://github.com/vercel/next.js/blob/canary/examples/with-apollo).

The **key changes** are:
- Less boilerplate code for setting/initializing Apollo Client
- Update home, events and about page to opt in for SSG
- Removed MyApp.getIntialProps as it will stop the [Auto Static optimization](https://nextjs.org/docs/api-reference/data-fetching/getInitialProps#caveats).
- Handle the authentication in client-side only.

repository: KudMath/keystone

repo_name: KudMath/keystone