text:
## Title
Neighborhood

## Description
This application allows you as the user to be in the loop about everything happening in your neighbourhood. From contact information to different handyman to meeting announcements or event alerts.

## Author
Juliet Koech

## Date Made
11/8/2019

## User stories
* Sign in with the application to start using.

* Set up a profile about yourself and a general location and your neighborhood name.

* Find a list of different businesses in your neighborhood.

* Find Contact Information for the health department and Police authorities near your neighborhood.

* Create Posts that will be visible to everyone in your neighborhood.

* Change your neighborhood when you decide to move out.

* Only view details of a single neighborhood.

## Installations
Create a folder, Neighbourhood-clone, by running

$ mkdir Neighbourhood-clone
Navigate to Neighbourhood-clone folder(this is where Neighbourhood cloned version will be stored)

$ cd Neighbourhood-clone
Next, we download Neighbourhood repository by running:

$ git clone https://github.com/Julzpeter/Neighborhood.git
Creating a Virtual Environment
Python3.7 and up comes with a tool called venv that allows the creation of a virtual environment.

$ python3.7 -m venv --without-pip virtual
Above we used venv tool to create a virtual environment and called it virtual.

Activating the virtual environment
To activate the virtual environment we run the following command:

$ source virtual/bin/activate
Download the latest version of pip
(virtual)$ curl https://bootstrap.pypa.io/get-pip.py | python
MyNeighbourhood heavily relies on pip to install Django and any other packages that we will need.

Install Django
Next we need to install the latst django release of version 1.11

(virtual)$ pip install django==1.11.17
To avoid issues, I recommend you install to you the exact version used above.

Install database dependency
Django projects come preconfigured to work with sqlite databases which are small dynamic SQL databases. But these prove difficult to scale when our content grows. Django also supports other kinds of databases. We will use our Postgresql Database to store data in our application.

Postgresql Installation
First deactivate virtual environment

(virtual)$ deactivate
Ubuntu To Install Postgres on Ubuntu we need to run the following commands in our terminal.
$ sudo apt-get update
To install Postgres

$ sudo apt-get install postgresql postgresql-contrib libpq-dev
Enter y when prompted “Do you want to continue? [Y/n]” and wait as the installation completes. Postgres uses "roles" to aid in authentication and authorization. By default, Postgres creates a Postgres user and is the only user who can connect to the server.

We want to create our own superuser role to connect to the server.

For those running on elementary or parrot, run the following command first;

$ sudo service postgresql start
$ sudo -u postgres createuser --superuser $USER
Enter your desired password when prompted.

We then have to create a database with that $USER login name, this is what Postgres expects as default.

$ sudo -u postgres createdb $USER
Navigate to your home directory and enter the following command to create the .psql_history in order to save your history:

$ touch .psql_history
You can now connect to the postgres server by typing :

$ psql
Mac Homebrew makes it really easy to install Postgres. Just run:
 $ brew install postgres
After it finishes installing, you'll need to configure your computer a bit. First, you need to tell Postgres where to find the database cluster where your databases will be stored:

$ echo "export PGDATA=/usr/local/var/postgres" >> ~/.bash_profile
This command will help some programs find Postgres more easily:

$ echo "export PGHOST=/tmp" >> ~/.bash_profile
To load these configuration changes, run:

$ source ~/.bash_profile
To start the Postgres server, simply run:

$ postgres
You'll have to leave that window open while you need the server. To stop the server, press Ctrl + C (not Cmd + C). If you want Postgres to boot at startup and run in the background, run:

 $ ln -sfv /usr/local/opt/postgresql/*.plist ~/Library/LaunchAgents
And to start it now (since it won't boot automatically until you restart your computer), run:

$ pg_ctl start
Setting up database
First, we need to create a new database for Neighbourhood. Type in psql to connect to the postgres server.

$ psql
We then use an SQL command to create a database Neighbourhood.Note that all SQL commands end with a semicolon.

james=#  CREATE DATABASE Neighbourhood;
Finally, activate virtual environment.

$ source virtual/bin/activate
To connect Postgres to our project we need to install psycopg2. This is a Postgres dependency to connect and communicate with Django.

(virtual)$ pip install psycopg2
Navigate to the .env file and add configure DB_NAME, DB_USER, DB_PASSWORDand DEBUG

DEBUG=True
DB_NAME=<name of database>
DB_USER=<postgres username>
DB_PASSWORD=<postgres password>
Install Pillow
Django provides an ImageField model field that manages Image uploads. The Images are stored in the file system and not in the database.

The ImageField requires a Python image Library called pillow for it to run.

(virtual) $ pip install pillow
The ImageField stores a reference to where the Image is stored in the file system.

Start Django Server
Last but not least we need to start the Django server. Django comes loaded with a fully functional development server that contains everything from debug settings and also automatic reload when we change something in our code.

(virtual)$ python3.6 manage.py runserver
Performing system checks...

System check identified no issues (0 silenced).
October 04, 2017 - 01:10:12
Django version 1.11.5, using settings 'heyapp.settings'
Starting development server at http://<IP_ADDRESS>:8000/
Quit the server with CONTROL-C.
Django checks if there are any errors in your program then start a development server at localhost port 8000. If everything works you should see the Neighbourhood homepage.

## Technologies used
1) Django 1.11.17
2) Python3.7
3) Html and MDB V4.8.2

## CONTACT
Email<EMAIL_ADDRESS>

##  MIT LiCENSE
[MIT](https://github.com/Julzpeter/Neighborhood/blob/master/LICENSE)

repository: Julzpeter/Neighborhood

repo_name: Julzpeter/Neighborhood


text:
# Tekton resources Bundle

[![Codecov](https://img.shields.io/codecov/c/github/chmouel/tektonbundle/master.svg?style=flat-square)](https://codecov.io/gh/chmouel/tektonbundle)  [![License](https://img.shields.io/pypi/l/tektonbundle.svg?)](https://pypi.python.org/pypi/tektonbundle) [![PYPI](https://img.shields.io/pypi/v/tektonbundle.svg?style=flat-square)](https://pypi.python.org/pypi/tektonbundle)

A CLI to go over a bunch of Tekton yaml resources and bundle them as one in a `Pipelinerun` and `pipelineSpec`/`taskSpec`.
It optionally can get argument to replace in tempalates.

## Install

```shell
pip3 install tektonbundle
```

and you are good to go!

`pyyaml` is really the external depencences here.

## Usage

You only need to point the tool to some yaml files or a directory where it will
collect every `.yaml` or `.yml` files in there and analyze them. It will then
output the 'bundled' yaml file which you can pipe to `kubectl create`, i.e:

```shell
tektonbundle "/path/to/directory"|kubectl create -f-
```

Full help of the CLI is :

```
usage: tektonbundle [-h] [--skip-inlining SKIP_INLINING] [--only-bundled]
                    files [files ...] [parameters [parameters ...]]

positional arguments:
  files                 Files and/or directories where to get all the yaml files.
  parameters            Add parameters to pass to templates.

optional arguments:
  -h, --help            show this help message and exit
  --skip-inlining SKIP_INLINING
                        Skip inlining these tasks, you can add many of them separated by a comma.
  --only-bundled        Print only the files that have been bundled (tekton files) and skip others.
```

## Description

If you have a Pipelinerun that looks like this :

```yaml
---
apiVersion: tekton.dev/v1beta1
kind: Pipelinerun
metadata:
    name: pipeline-run
spec:
    pipelineRef:
        name: pipeline
```

and a `Pipeline` named pipeline1 that looks like this :

```yaml
---
apiVersion: tekton.dev/v1beta1
kind: Pipeline
metadata:
    name: pipeline
spec:
    tasks:
    - name: task
      taskRef:
        name: task
```

and finally a task that looks like this :

```yaml
---
apiVersion: tekton.dev/v1beta1
kind: Task
metadata:
  name: task
spec:
  steps:
    - name: step
      image: scratch
```

It will 'bundle' everything as one, using `pipelineSpec` and `taskSpec`:

```yaml
apiVersion: tekton.dev/v1beta1
kind: PipelineRun
metadata:
  generateName: pipeline-run-
spec:
  pipelineSpec:
    tasks:
    - name: task
      taskSpec:
        steps:
        - image: scratch
          name: step
```

It will change the `name` as `generateName` to be unique.

You can skip some tasks to be inlined and be kept as referenced, you only have
to specify the switch `--skip-inlining` with the name of the task to be
skipped. You can add multiple of them separated by comma, i.e:
`--skip-inlining=task1,task2`

By default `tektonbundle` will print every yaml files from the directory or
files you have given even those that are not bundled (i.e: non tekton files). If
you don't want this behavior you can add the option `--only-bundled` and it will
only print the 'bundle' file.

## Substition support via parameters.

`tektonbundle` support simple template substitions if you need to specify some value before applying.

If you have the string `key: {{value}}` in your template (no spaces in between).

And you launch the CLI with this arguments :

```shell
tektonbundle /path/to/dir value="hello"
```

The value of the template would be substited with the value you have provided.

If no value has been provided, it will be kept as is (you will end up with a `key: {{value}}` in your template).

license: MIT

repository: chmouel/tektonbundle

branch_name: refs/heads/master

extension: md

gha_language: Python

gha_license_id: MIT

license_type: permissive

repo_name: chmouel/tektonbundle


text:
# Exploratory Data Analysis

This course is designed to serve students of the Vanderbilt Data Science Program.

## Overview

This course will teach students how to explore, summarize, and graph data (big and small). Learning topics are broken into three parts over 16 weeks, they include: principles of perception, how to display data, scatterplots, histograms, boxplots, bar charts, proper data summaries, dimensionality reduction, multidimensional scaling, and unsupervised clustering algorithms, such as principal component analysis, k-means clustering, and nearest neighbor algorithms. The course will utilize a variety of data types including text data, network data, survey data and many others.

## Schedule

Component # | Part | Topic | Class Week |
|---|---|---|---|
| - | 1 | EDA in Data Science | 1  |
| 1 | 1 | Summarizing Data | 2 |
| 2 | 1 | Foundations of Graphics |  2 |
| 3 | 1 | ggplot2 fundamentals  | 3  |
| 4 | 1 | Visualize: distributions  | 3  |
| 5 | 1 | Visualize: correlations  | 4  |
| 6 | 1 | Visualize: rankings & other patterns  | 5  |
| 7 | 1 | Visualize: time series  | 6  |
| 8 | 1 | Visualize: multivariate data  | 6  |
| 9 | 1 | EDA in action: apply what we've learned (midterm) | 7  |
| 10 | 2 | Missing Data | 8  |
| 11 | 2 | Introduction to spatial data / maps | 9  |
| 12 | 2 | Unsupervised learning: k-means | 10-11  |
| 13 | 2 | Unsupervised learning: hierarchical cluster analysis | 11  |
| 14 | 2 | Dimension reduction: principal component analysis  | 12 |
| 15 | 3 | Problem space: text-as-data  | 13 |
| 16 | 3 | Problem space: network data  | 14 |
| - | - | Week 15 is a Holiday break | 15 |
| - | 3 | Final project due | 16 |

## Location & time

Class:
Tuesdays & Thursdays
2:35-3:50 PM
Engineering and Science Building, room 048

Office hours:
Tuesdays & Thursdays
4:00-5:00 PM
Engineering and Science Building, room 202

## Instructor

[Cassy Dorff, PhD](https://www.cassydorff.com)

Assistant Professor

Department of Political Science

Commons Center PMB 0505

230 Appleton Place

Nashville, Tennessee 37203-5721

## Teaching assistants

Colin M. Henry

PhD Student

Department of Political Science

Office Hours: Following class for 1 hour!
Contact: [slack](https://vandydatasciencems.slack.com/messages/CM11W8RSB) @ Colin Henry

Yue Gao

Master Student

Department of Biostatistics

Office Hours: Following class for 1 hour!
Contact: [slack](https://vandydatasciencems.slack.com/messages/CM11W8RSB) @ Yue Gao

## Textbook & References

[R for Data Science](https://r4ds.had.co.nz/) by Garrett Grolemund and Hadley Wickham

There are _many_ additional references for this class that you can find listed at the end of each week's `.rmd` file!

## Computing

This course is taught primarily R using Rstudio. Other elements: github, SQL, accre cluster

repository: ok-tsar/eda-class-materials

repo_name: ok-tsar/eda-class-materials


text:
# ActiveTriples::MongoidStrategy

[![Build Status](https://travis-ci.org/ActiveTriples/active_triples-mongoid_strategy.svg?branch=master)](https://travis-ci.org/ActiveTriples/active_triples-mongoid_strategy)
[![Coverage Status](https://coveralls.io/repos/github/ActiveTriples/active_triples-mongoid_strategy/badge.svg?branch=master)](https://coveralls.io/github/ActiveTriples/active_triples-mongoid_strategy?branch=master)
[![Gem Version](https://badge.fury.io/rb/active_triples-mongoid_strategy.svg)](http://badge.fury.io/rb/active_triples-mongoid_strategy)

Provides a graph-based persistence strategy for the [ActiveTriples](https://github.com/ActiveTriples/ActiveTriples) framework.  RDF Sources are persisted to MongoDB natively as Flattened [JSON-LD](https://github.com/ruby-rdf/json-ld) documents.

## Installation

Add this line to your application's Gemfile:

    gem 'active_triples-mongoid_strategy'

And then execute:

    $ bundle install

Or install it yourself as:

    $ gem install active_triples-mongoid_strategy

## Usage

Start by [configuring Mongoid](https://docs.mongodb.org/ecosystem/tutorial/mongoid-installation/#configuration) for your environment or application as per the documentation.

ActiveTriples currently (as of [0.8.1](https://github.com/ActiveTriples/ActiveTriples/tree/v0.8.1)) uses an `RDF::Repository` as the default persistence strategy.  To override this, you have to manually set `MongoidStrategy` on instances at runtime:

```ruby
require 'active_triples/mongoid_strategy'

source = ActiveTriples::Resource.new
source.persistence_strategy # => #<ActiveTriples::RepositoryStrategy:...>

source.set_persistence_strategy(ActiveTriples::MongoidStrategy)
source.persistence_strategy # => #<ActiveTriples::MongoidStrategy:...>
```

[See this gist](https://gist.github.com/elrayle/11898117572445a15c4a) for more information on Persistence Strategies.

### History Tracking

`MongoidStrategy` optionally allows tracking history (aka 'versioning') to store changes in a graph's state over time.  In order to use history tracking, use the `ActiveTriples::MongoidStrategy::Trackable` persistence strategy.

## Contributing

Please observe the following guidelines:

 - Do your work in a feature branch based on ```master``` and rebase before submitting a pull request.
 - Write tests for your contributions.
 - Document every method you add using YARD annotations. (_Note: Annotations are sparse in the existing codebase, help us fix that!_)
 - Organize your commits into logical units.
 - Don't leave trailing whitespace (i.e. run ```git diff --check``` before committing).
 - Use [well formed](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html) commit messages.

gha_language: Ruby


text:
## Create condensing header bars like those seen in the Facebook, Square Cash, and Safari iOS apps.
Ported from [bryankeller/BLKFlexibleHeightBar](https://github.com/bryankeller/BLKFlexibleHeightBar).

`BLKFlexibleHeightBar` allows you to create header bars with flexible heights. Often, this sort of UI paradigm is used to hide chrome and make room for more content as a user is scrolling. This is seen in third party apps like Facebook and Square Cash, as well as first party apps like Safari.

`BLKFlexibleHeightBar` can create bars that look and act any way you'd like:

* Immediate subviews of a flexible height bar define how they want to look and where they want to be depending on the height of the bar. Properties like frame, transform, and alpha can all vary depending on the current height of the bar.
* A bar's behavior can be defined using a behavior definer instance. A behavior definer can be created to emulate Safari's header behavior, Facebook's header behavior, or something entirely new. Behaviors are completely modular and aren't coupled with the appearence of the bar.

Due to this library's modular, extensible nature, you are not limited to any one look or any one feel. *What UICollectionView does for presenting collections of data, `BLKFlexibleHeightBar` does for creating header bars.*

## TODO
* Include a `SafariStyleBehaviorDefiner` (uses velocity, not just scroll position).
* Support for **Auto Layout** based layout attributes would simplify some of the trickier bar designs, removing the need to perform final frame and size calculations yourself when defining layout attributes.

## Let me know what you think!
You can get in touch with me via Twitter
Original Author: [@BKyourway19](http://twitter.com/BKyourway19)
Port to Xamarin.iOS/Mono: [@HoltFlame](http://twitter.com/HoltFlame)

repository: CutFlame/BLKFlexibleHeightBarMono

repo_name: CutFlame/BLKFlexibleHeightBarMono


text:
| [docs](..)  / [contributing](.) / contributing.md
|:---|

# Contributing

Why not give back and help make Squirrel even better? Here is an overview of ways you can become more involved.

* **Contribute Documentation** - improve the documentation or provide additional code examples to benefit others.
* **Subscribe to Issues on GitHub** - have some experience using Squirrel? Help answer questions under issues or post a Pull Request fixing a bug.
* **Contribute Code** -  have a great feature that you feel is a good fit for Squirrel? Send a Pull Request.

## See Also

* [Building Squirrel](building-squirrel.md) - steps to build squirrel for the impatient.
* [VS Solution Overview](vs-solution-overview.md) - overview of the various projects in the Squirrel.Windows Visual Studio solution.

---
| Return: [Table of Contents](../readme.md) |
|----|

branch_name: refs/heads/develop


text:
# Welcome to Auxilium

For some it's a Savior. For others, it's a Messiah. Auxilium is powerful open-source disaster management platform made with Node.js and MongoDB.

Developed by:-
Soham Parekh
Harshil Jhaveri
Pushkar Bhuse
Divyam Sheth
Jugal Mistry

![](https://img.shields.io/badge/license-MIT-green.svg)

## Features

- Sign in through Google account or Auxilium account.
- Register a disaster/event.
- Get updates on the disaster through a dedicated chatroom in realtime.
- All events are divided into following categories
  - Accident
  - Fire
  - Natural
  - Angry Mob
  - Others
- Trigger an SoS for immediate help from a nearby user.
- Dedicated API for developers
- Get information about the safest route to take from Place A to   Place B.
- Stuck in a disaster? Have no internet access? Get information about the nearest Police Station 👮🏻♀, Railway Station 🚉 and Hospital 🏥 with fastest routing.
- Pay toll through the web app.
- An Electron app

And a lot more functionalities to be added soon...

## To Do's

- Dedicated Android and IOS app
- Toll payment via bluetooth.
- Notifications

## Requirements

- [Node.js](https://nodejs.org)
  - expressjs [ExpressJS HTTP middleware](https://npmjs.org/package/express)
  - ejs [Embedded JavaScript templates](https://npmjs.org/package/ejs)
- [MongoDB](http://mongodb.org)

## Installation

Clone the repo locally then install all the dependencies using [NPM](https://npmjs.org/)

```bash
$ git clone https://github.com/AlQaholic007/auxilium.git
$ cd auxilium
$ npm i
```

## Local Development

Before running the app, you will need to add the Google API Credentials to the project. Under the `config` directory of the repo, you will find `google.js`. Replace `<CLIENT_ID>`, `<CLIENT_SECRET>` and `<host>:<port>` with your own API credentials

```javascript
/** REPLACE YOUR API CREDENTIALS HERE **/
var in_client_id = 'XXXXXXXXXXXXXXXXXX', // <CLIENT_ID>
    in_client_secret = 'XXXXXXXXXXXXXXXXXXXX', // <CLIENT_SECRET>
```

Now Replace the `<host>` & `<port>` with the redirect uri specified  [Google API Dashboard](https://developers.google.com). Default is `http://localhost:8080/account/oauth`.

```javascript
var in_redirect_uri = "http://localhost:8080/account/oauth/:service";
```

Finally start the MongoDB server in a seperate bash/pm2

```bash
$ mongod
```

and then start the auxilium server via `npm`.

```bash
$ npm start
```

repository: harshiljhaveri/SIH-Disaster-Management

gha_language: JavaScript

repo_name: harshiljhaveri/SIH-Disaster-Management


text:
### [CVE-2023-3625](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2023-3625)
![](https://img.shields.io/static/v1?label=Product&message=Mountain%20Flood%20Disaster%20Prevention%20Monitoring%20and%20Early%20Warning%20System&color=blue)
![](https://img.shields.io/static/v1?label=Version&message=%3D%2020230706%20&color=brighgreen)
![](https://img.shields.io/static/v1?label=Vulnerability&message=CWE-434%20Unrestricted%20Upload&color=brighgreen)

### Description

A vulnerability classified as critical was found in Suncreate Mountain Flood Disaster Prevention Monitoring and Early Warning System up to 20230706. This vulnerability affects unknown code of the file /Duty/AjaxHandle/Write/UploadFile.ashx of the component Duty Write-UploadFile. The manipulation of the argument Filedata leads to unrestricted upload. The attack can be initiated remotely. The exploit has been disclosed to the public and may be used. VDB-233578 is the identifier assigned to this vulnerability. NOTE: The vendor was contacted early about this disclosure but did not respond in any way.

### POC

#### Reference
- https://github.com/MoeMion233/cve/blob/main/1.md

#### Github
No PoCs found on GitHub currently.

repository: trickest/cve

branch_name: refs/heads/main

gha_language: HTML

repo_name: trickest/cve


text:
# Envoy filter example

This project demonstrates the linking of additional HTTP filters with the Envoy binary.
A new filter `sample` which adds a HTTP header is introduced.
Integration tests demonstrating the filter's end-to-end behavior are
also provided.

## Building

To build the Envoy static binary:

1. `git submodule update --init`
2. `bazel build //:envoy`

## Testing

To run the `sample` integration test:

`bazel test //http-filter-example:http_filter_integration_test`

## How it works

See the [network filter example](../README.md#how-it-works).

## How to write and use an HTTP filter

- The main task is to write a class that implements the interface
 [`Envoy::Http::StreamDecoderFilter`][StreamDecoderFilter] as in
 [`http_filter.h`](http_filter.h) and [`http_filter.cc`](http_filter.cc),
 which contains functions that handle http headers, data, and trailers.
 Note that this is an example of decoder filters,
 and to write encoder filters or decoder/encoder filters
 you need to implement
 [`Envoy::Http::StreamEncoderFilter`][StreamEncoderFilter] or
 [`Envoy::Http::StreamFilter`][StreamFilter] instead.
- You also need a class that implements
 `Envoy::Server::Configuration::NamedHttpFilterConfigFactory`
 to enable the Envoy binary to find your filter,
 as in [`http_filter_config.cc`](http_filter_config.cc).
 It should be linked to the Envoy binary by modifying [`BUILD`][BUILD] file.
- Finally, you need to modify the Envoy config file to add your filter to the
 filter chain for a particular HTTP route configuration. For instance, if you
 wanted to change [the front-proxy example][front-envoy.yaml] to chain our
 `sample` filter, you'd need to modify its config to look like

```yaml
http_filters:
- name: sample          # before envoy.router because order matters!
  config:
    key: via
    val: sample-filter
- name: envoy.router
  config: {}
```

[StreamDecoderFilter]: https://github.com/envoyproxy/envoy/blob/b2610c84aeb1f75c804d67effcb40592d790e0f1/include/envoy/http/filter.h#L300
[StreamEncoderFilter]: https://github.com/envoyproxy/envoy/blob/b2610c84aeb1f75c804d67effcb40592d790e0f1/include/envoy/http/filter.h#L413
[StreamFilter]: https://github.com/envoyproxy/envoy/blob/b2610c84aeb1f75c804d67effcb40592d790e0f1/include/envoy/http/filter.h#L462
[BUILD]: https://github.com/envoyproxy/envoy-filter-example/blob/d76d3096c4cbd647d26b44b3f801c3afbc81d3e2/http-filter-example/BUILD#L15-L18
[front-envoy.yaml]: https://github.com/envoyproxy/envoy/blob/b2610c84aeb1f75c804d67effcb40592d790e0f1/examples/front-proxy/front-envoy.yaml#L28

repository: ArthurHlt/ModSecurity-envoy

repo_name: ArthurHlt/ModSecurity-envoy


text:
# webcrontab

Web based crontab.

Demo page: <http://webcron.herokuapp.com/>

![homepage](scripts/homepage.png)

## Build
```
# Install godep
go get -v github.com/tools/godep

# Build
git clone https://github.com/codeskyblue/webcrontab.git
cd webcrontab
godep go build

# Start
./webcrontab
```

## ChangeLog
- 2015-08-26: First release. Heroku support.

## Contribute
Since the first ok version is released. This really takes me a lot of time, finally get it works. Very happy.

Pull request are welcomed, but make sure code have been tested.

## Thanks
* db engine **xorm**: <https://github.com/go-xorm/xorm>
* <https://github.com/robfig/cron>
* Icon from: <http://www.easyicon.net/516578-schedule_april_icon.html>

## LICENSE
[MIT](LICENSE)

repository: mohitsethi/webcron

repo_name: mohitsethi/webcron


text:
# Feature Tracking

This a Feature Tracking Computer Vision project using openCV. It's intended
to be applied to the *Mapping a new road with senseFly Corridor* data set
available at [senseFly](https://www.sensefly.com/drones/example-datasets.html).

# Dependencies

In order to build the project first install OpenCV 3.3 with support for the
non-free modules from the *OpenCV contrib repository* as specified [here](https://docs.opencv.org/trunk/d7/d9f/tutorial_linux_install.html).

# Input images

You can download the *Mapping a new road with senseFly Corridor* data set from [here](https://senseflycom.s3.amazonaws.com/datasets/rc177-corridor/rgb-jpg.zip).
The data set comes in a `zip` file. Therefore, to use the images first unzip
the archive.

# Build the code

To build the code you'll simply have to run;

```
  cd <project-root-dir>
  mkdir build
  cd build
  cmake ..
  make
```

# Running tests

This project uses *Google Test* for as testing framework. After compiling
you can run our tests by running;

```
  cd <project-root-dir>
  cd build
  ./tests_exec
```

# Feature Tracking Demo

After compiling you can run the tracking demo by running;

```
  cd <project-root-dir>
  cd build
  ./tracking_demo -indir=<path-to-input> [-outdir=<path-to-output> -show -extract -match -v -finder=<org|surf> -help]
```

## Options

* *help* - displays help
* *v* - enable verbose mode.
* *indir* - path to the input data set
* *outdir* - path to where the output will be written
* *show* - enables the GUI and displays images in a pair basis
* *extract* - enable feature extraction. If not specified the features will be
  read from `<project-root-dir>/build/features.yml`. If the `features.yml` file
  doesn't exist then the extraction is automatically enabled.
* *match* - enable feature matching. If not specified the matches will be
  read from `<project-root-dir>/build/features.yml`. If the `features.yml` file
  doesn't exist then the matching is automatically enabled.
* *finder* - specified the feature finder to be used. Only SURF was tested.

## Output GUI

The GUI is enabled by adding the *show* parameter. The GUI will open 4 different
windows described below;

1. *Image 1:* First image with the extracted feature points drawn as rich
   points.
2. *Image 2:* Second image with the extracted feature points drawn as rich
   points.
3. *Matches:* Both images with the extracted feature points drawn as rich
   points and the matches joining the points from one image to the other.
4. *Warped:* First image with the second image with the homography applied
   superposed.

## Output Directory

If the output directory is specified using *outdir* parameter then a separate
directory per image pair will be created named as the first image, but without
the extension. For example the image pair `EP-00-00012_0366_0001.JPG` and
`EP-00-00012_0366_0002.JPG` will create a directory named `EP-00-00012_0366_0001`
for storing their outputs. The directory will contain;

* `homography.yml` - with the obtained homography stored using OpenCV's
  `FileStorage`.
* `decomposedHomography.yml` - with the obtained homography, camera matrix,
  translational and rotational matrix. Also stored using OpenCV's `FileStorage`.
* `<first-image-file-name>` - with the first image file scaled as used in the
  algorithm.
* `<second-image-file-name>` - with the second image file scaled as used in the
  algorithm.
* `features_<first-image-file-name>` - with the first image and the found SIFT
  features drawn as rich points.
* `features_<second-image-file-name>` - with the second image and the found SIFT
  features drawn as rich points.
* `matches_<first-image-file-name>` - with the both image side-by-side, the
  found SIFT features drawn as rich points, and the drawn matches as lines.
* `warped_<first-image-file-name>` - with the superposition of the first image
  and the second with the homography applied.


text:
# Evaluating Regular Expressions

[Here](examples/regex.html) is the example page.

Regular expressions are patterns used to match character combinations in strings. It's a mix of special characters and literal characters that make up the pattern wanted.

## Regular expression special characters

| Symbol | Description                                                                                |
|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ^      | Denotes the beginning of a string                                                                                |
| $      | Denotes the end of a string                                                                                |
| .      | Indicates to match on any character                                                                                |
| [A-Z]  | Alphabet letters indicate to match any alphabetic character. This is case-sensitive. To match lowercase letters, use [a-z]                                                                                |
| \d     | This combination indicates to match any numeric character                                                                                |
| +      | Denotes that the preceding character or character set must match at least once                                                                                |
| *      | Denotes that the preceding character or character set might or might not match. This generates zero or more matches                                                                                |
| [^]    | When included in a character set, the caret denotes a negation. [^a] would match a string that doesn’t have an ‘a’ in it                                                                                |
| ?      | Denotes that the preceding character is optional                                                                                |
| \w     | This combination indicates to match a word character consisting of any alphanumeric character, including an underscore                                                                                |
| \      | The backslash is an escape character. If any special character should be included in the character set to match on literally, it needs to be escaped with a \. For example, to find a backslash in a string, the pattern would include \\ |
| \s     | This combination indicates to match on a space. When it’s combined with + or *, it can match on one or more spaces                                                                                |

This list encompasses the main functions available when string matching with regular expressions. Building regular expressions requires taking the definition of those characters and essentially creating a mask out of them to be used by the regular expression engine to interpret and decide whether there is a match.

 As such, they can be created and can provide methods to evaluate strings. Regular expression objects are created in a similar fashion as strings; however, rather than use “ to encapsulate the expression, use the forward slash ```/<expression>/``` instead. JavaScript knows that text surrounded by forward slashes in this way is a regular expression object.

### Method test

When an regex object is created:

```
  var regExpression = /^[A-Z,a-z]\d[A-Z,a-z][\s{1}]?\d[A-Z,a-z]\d/;
```

It can evaluate a string with the test method:

```
  regExpression.test(str)
```

### Method exec

This method returns the portion of the input string that matches the expression.
The match is returned as a string array. That the return result is a string array is important to note because using regular expressions can result in multiple matches.

The string object also provides regular expression methods. The string could be used directly to evaluate the expression. The string provides the search and match methods. The search method returns the index of the character in the string where the first match occurred.
The match method returns the part of the string that matches the pattern, much like the exec method. In addition to these two methods, many of the other string methods accept a regular expression object, such as indexOf, split, and replace. This provides some advanced functionality for manipulating strings in JavaScript.

### Important!

In the context where a website is expecting specifically formatted data, you can use regular expressions to validate the incoming data and prevent the possible crashing of the website or at least errors being presented to users.

## Sources

[MDN](https://developer.mozilla.org/)

[Exam Ref 70-480 Programming in HTML5 with JavaScript and CSS3 (MCSD)](https://www.microsoft.com/en-us/p/exam-ref-70-480-programming-in-html5-with-javascript-and-css3-mcsd/fgqpf3h0qll7?activetab=pivot%3aoverviewtab)


text:
# Multiple lights

This code shows the use of a shader handling mutliple light sources. Each source has a color, and their power decrease with the distance. The shader also integrates a global fog-like effect.

<img src="pic.jpg" alt="" width="500px"/>


text:
---
title: Making Icons
layout: post
author: timo.eloli
permalink: /making-icons/
source-id: 1FQCxDE26G2PgBbUx1viIzI9RaBN3hY5XbjxHOL9tBxU
published: true
---

    Title
    Making Icons
    Date
    17/10/18

    Starting point:
    Not knowing anything

    Target for this lesson?
    Make an Icon

    Did I reach my target?
    No

    How did you use your learning habits this week?

    Persevering
    I had to keep going

    Questioning?
    I had to question what to do

    Independence

    Reflecting

    Engagement
    I had to stay focused

    What could have gone better in your learning?

    Gone a bit quicker

    What changes do you need to make to improve your learning next time?

    Not look up pixel art of thanos as much


text:
# Cipherise Java SDK
## Version 6.2.1

This SDK is for interacting with a Cipherise server.
## Installation

Add the following to your project's pom.xml.

```<!-- https://developer.cipherise.com/resources/docs/java/ -->```
```<dependency>```
  ```    <groupId>com.forticode.cipherise</groupId>```
  ```    <artifactId>javasdk</artifactId>```
  ```    <version>6.2.1</version>```
```</dependency>```
## Introduction
Cipherise does away with passwords and usernames, giving your customers an easy, secure
login with their mobile device. With a simple, quick scan of a WaveCode, they can achieve
multi-factor authentication in a single action.

 * Move towards a passwordless experience for your customers.
 * No more complicated passwords and usernames.
 * A simple, fast experience that is consistent across multiple services.
 * No more credential sharing.

By design Cipherise decentralises critical information (identity, credentials and critical
data). Each user's credentials are encrypted and stored in a secure enclave on their personal
device. The credentials are never stored elsewhere or transmitted through a browser. This
protects your customers' data and digital identity.

---
## Getting Started
Cipherise key concepts can be summarised into the following sections:

### Service Management

The Service Provider can query a Cipherise Server for information to determine
the supported functionality:

  * [Querying a Cipherise server](#QueryCS)

For users to be able to enrol and authenticate to a Service Provider one or more
services need to be created:

  * [Creating new services](#NewService)
  * [Revoking services](#RevokeService)

### User Management
In order to interact with Cipherise, a user must be enrolled to a service. This
interaction is the key point in which the trust relationship is established. Future authentications
rely on the trust established at enrolment time. For a service that is binding a secure profile to
their Cipherise enrolment, a secure environment must be considered. For example, adding Cipherise
to an existing profile in a site may require the user to be logged in. If Cipherise is being used
for physical access, it could require being present in the physical environment for enrolment
binding to be accepted. Alternatively, an SMS could also be sent from a profile to the owner's
device.

Some services need not require a personalised account, and it may be sufficient to offer the
instantaneous creation of an anonymous account, simply by the scanning of a WaveCode.

  * [Enrolling a user to a service](#EnrolService)
  * [Revoking users from a service](#RevokeUser)

### Authentication

Once a user is enrolled to a Service Provider, they can authenticate themselves.
Cipherise Authentication is bi-directional, meaning that the Service Provider will verify the
user's device and the user's device will verify the Service Provider.
Authentication can be used in a variety of ways. It can be simple access control, physical or
digital but it can also be part of a workflow. Workflows could include financial
transaction approval, manager approval or multiple party approval for example.

There are two types of authentication, WaveAuth and Authentication. A PushAuth is
targeted to a specific user, where WaveAuth is performed by displaying a WaveCode image that can be
scanned by a user. Once authenticated, the Service Provider will be informed of the user's
username.

  * [WaveAuth](#WaveAuth)
  * [PushAuth](#PushAuth)

### Advanced Features

Serialization enables sharing of sessions between separate environments; they can be
serialized and stored by one environment, and then retrieved and deserialized by another
environment. This is most useful for concurrent/cluster environments in which sessions can be
shared between cluster nodes using a central store, such as Redis.

  * [Serialization/Deserialization](#Serialization)

Payload is a feature where a Service Provider can encrypt and send data to a user's device
for storage via an authentication or at enrolment, and then retrieved from user device when
required via an authentication. Each individual payload has a maximum size of 4k bytes.
Ideally, this would be used by a Service, such that any private or sensitive user data that the
server requires could be held at rest on the user's own device rather than held collectively at
the service's storage where the consequences of a hack are far further reaching.
Examples of where payload could be used include credit card payment details for a regularly used
service, address details or other personally identifying details.

  * [Payload](#Payload)

---
## Cipherise Functionality

  * [Querying a Cipherise server](#QueryCS)
  * [Creating new services](#NewService)
  * [Revoking services](#RevokeService)
  * [Enrolling a user to a service](#EnrolService)
  * [Revoking users from a service](#RevokeUser)
  * [WaveAuth](#WaveAuth)
  * [PushAuth](#PushAuth)
  * [Serialization/Deserialization](#Serialization)
  * [Payload](#Payload)

### Querying a Cipherise server
A Cipherise server can be queried for information about itself and what it supports using
`Client.serverInformation`. See [here](Client.html).
This is demonstrated below:
```java
package com.forticode.example;

import com.forticode.cipherise.*;
import java.io.IOException;

public class Main {
public static void main(String[] args) throws CipheriseException, IOException {
  final String cipheriseServer = "https://your.cipherise.server.here";
  Client client = new Client(cipheriseServer);
  // Retrieve information from the server and print it out.
  ServerInformation info = client.serverInformation();
  System.out.println("Server version: " + info.serverVersion);
  System.out.println("Build version: " + info.buildVersion);
  System.out.println("Minimum app version: " + info.appMinVersion);
  System.out.println("Maximum supported payload size: " + info.maxPayloadSize);
}}
```
### Creating new services
The first step to integrating your Service Provider with Cipherise is to create a Cipherise
[service](Service.html). This
[service](Service.html) is the Cipherise
representation of your service, and is used by your Service Provider to communicate with the
Cipherise system and issue requests.

To achieve this, first create a [Client](Client.html) to connect to a Cipherise server.
A Cipherise server can be created at [developer.cipherise.com](https://developer.cipherise.com).

```java
const client = new cipherise.Client("https://your.cipherise.server.here");
```

Next, use the [Client](Client.html) to create a new
[service](Service.html). A
[service](Service.html) is not stored anywhere by default; in order to retrieve the same
[service](Service.html) again, use
[Service.serialize](Service.html)
to store somewhere and
[Client.deserializeService](Client.html) to restore from
storage.

```java
const service = client.createService("Your Service Here");
```
or
```java
const serializedService = <insert code to load from database or filesystem>;
const service = client.deserializeService(serializedService);
```
A complete example using the filesystem follows.
```java
package com.forticode.example;

import com.forticode.cipherise.*;
import java.io.IOException;
import java.io.File;
import java.nio.file.Files;

public class Main {
public static void main(String[] args) throws CipheriseException, IOException {
  final String cipheriseServer = "https://your.cipherise.server.here";
  final String serviceName = "Example Service";
  final String filename = serviceName + ".service";

  Client client = new Client(cipheriseServer);

  Service service = null;
  File file = new File(filename);
  if (file.exists()) {
    // If the service has been saved to disk, load it.
    System.out.println("Loading service from: " + file.toPath());
    byte[] serializedService = Files.readAllBytes(file.toPath());
    service = client.deserializeService(serializedService);
  } else {
    // Otherwise, create the service and store it.
    service = client.createService(serviceName);
    Files.write(file.toPath(), service.serialize());
    System.out.println("New service written to: " + file.toPath());
  }
}}
```
### Revoking services
A service can revoke itself using [Service.revoke](Service.html). This may be done
when, for example, a Cipherise integration is uninstalled. Revoking a service will disable it and
remove it from the list of services on users' devices. It cannot be undone.
A complete example of service revocation follows:
```java
package com.forticode.example;

import com.forticode.cipherise.*;
import java.io.IOException;

public class Main {
public static void main(String[] args) throws CipheriseException, IOException {
  final String cipheriseServer = "https://your.cipherise.server.here";
  final String serviceName = "Example Service";
  Client client = new Client(cipheriseServer);
  Service service = client.createService(serviceName);
  service.revoke();
  // The service can no longer be used.
}}
```
### Enrolling a user to a service
The enrolment process enrols a user to a Cipherise service so that they can use Cipherise to
interact with the service. The enrolment process is multi-step:

1) An enrolment WaveCode is presented to the user
([Service.enrolUser](Service.html),
[Enrolment.getWaveCodeUrl](Enrolment.html)).

2) The user scans the WaveCode, and the service retrieves the result by long-polling on
validation [Enrolment.validate](Enrolment.html). The result is the URL from which
to identicon can be displayed.

3) The service presents the identicon returned from the validation step.

4) The user confirms that it matches the identicon presented on their device. The service presents
buttons that can be used to accept or deny the enrolment. See
[Enrolment.confirm](Enrolment.html).

A complete example of the long-polling workflow follows:
```java
package com.forticode.example;

import java.io.*;
import com.forticode.cipherise.*;
import java.util.Scanner;

public class Main {
public static void main(String[] args) throws CipheriseException, IOException {
  final String cipheriseServer = "https://your.cipherise.server.here";
  final String serviceName = "Example Service";
  final String userName = "Test User";

  Client client = new Client(cipheriseServer);
  Service service = client.createService(serviceName);

  // (1) Start an enrolment and present the QR code to the user.
  Enrolment enrolment = service.enrolUser(userName);
  System.out.println("WaveCode URL:" + enrolment.getWaveCodeUrl());
  // (2) Wait for the user to scan and retrieve the identicon.
  String identiconUrl = enrolment.validate();
  // (3) Display the identicon.
  System.out.println("Identicon URL:" + identiconUrl); // (3)

  System.out.println("Does the Identicon match the image displayed on your device? (Press 'y' if yes) ");
  Scanner scan = new Scanner(System.in);
  String answer = scan.next();

  // Ask the user whether they want to confirm the enrolment or not.
  boolean confirm = answer.toLowerCase().startsWith("y");
  // (4) Confirm the enrolment as appropriate.
  enrolment.confirm(confirm);
}}
```
### Revoking users from a service
A service can revoke enrolled users using [Service.revokeUser](Service.html).
This could be called for a number of reasons. For example, a user leaves an organisation and is no
longer authorised for access. To regain access, the user must re-enrol.

Additionally, the optional `devices` parameter to `revokeUser` can be used to revoke a subset of
the user's devices. A potential use for this parameter is to revoke a device that a user has lost.
A complete example of user revocation follows:
```java
package com.forticode.example;

import com.forticode.cipherise.*;
import java.io.IOException;

public class Main {
public static void main(String[] args) throws CipheriseException, IOException {
  final String cipheriseServer = "https://your.cipherise.server.here";
  final String serviceName = "Example Service";
  final String userName = "Test User";

  Client client = new Client(cipheriseServer);
  Service service = client.createService(serviceName);

  // Automatically enrol the user.
  Enrolment enrolment = service.enrolUser(userName);
  System.out.println("Enrolment WaveCode URL: " + enrolment.getWaveCodeUrl());
  enrolment.validate();
  enrolment.confirm(true);

  // Revoke the user.
  service.revokeUser(userName);
}}
```
### Wave authentication
WaveAuth is where the user 'waves' their device over the presented coded image. It is
ideal to log in with and upon successful authentication, will provide the Service Provider with
the name of the enrolled application user.

The general flow consists of the following steps:

1) An authentication WaveCode is presented to the user. The WaveCode is an image, and its URL is
obtained by initialising the authentication process. Call
[Service.waveAuthenticate](Service.html) and display the image from the
returned data, located at
[Authentication.getWaveCodeUrl](Authentication.html).

2) The service retrieves the authentication result by calling
[Authentication.authenticate](Authentication.html). Note that this
is a blocking call and will not return until a user has scanned the returned image and completed
the authentication challenge, OR until the authentication times out.

3) The user scans the QR code and completes the authentication challenge.

4) The service receives the [authentication result](AuthenticationResult.html). It
contains the actual [result of the authentication](Authentication.html), the username and
an optional payload response (more in the Payload section).
A complete example of the WaveAuth flow is shown (with a preliminary enrolment):
```java
package com.forticode.example;

import com.forticode.cipherise.*;
import java.io.IOException;

public class Main {
public static void main(String[] args) throws CipheriseException, IOException {
  final String cipheriseServer = "https://your.cipherise.server.here";
  final String serviceName = "Example Service";
  final String userName = "Test User";

  Client client = new Client(cipheriseServer);
  Service service = client.createService(serviceName);

  // Automatically enrol the user.
  Enrolment enrolment = service.enrolUser(userName);
  System.out.println("Enrolment WaveCode URL: " + enrolment.getWaveCodeUrl());
  enrolment.validate();
  enrolment.confirm(true);

  // (1) Start and present wave authentication.
  Authentication authentication = service.waveAuthenticate(
    "Description of the authentication, appears in the app",
    "Secondary information, appears in the app",
    null,
    AuthenticationLevel.OneTiCK
  );
  System.out.println("Authentication WaveCode URL: " + authentication.getWaveCodeUrl());

  // (2) Retrieve authentication result.
  AuthenticationResult result = authentication.authenticate();
  System.out.println("Authenticating username: " + result.username);
  System.out.println(
    "Did the authentication succeed? " +
    result.authenticated.equals(Authenticated.Success)
  );
}}
```
### PushAuth
PushAuth is a Cipherise authentication that is sent to a particular user's device. This
can only be used when the Service wants to target a specific user and the username and device id
are known for that user. Ideally, this is suited for workflow related cases, such as authorising a
banking transaction (targeted user is the owner of the transferring account), or seeking permission
for a privileged activity (targeted user is the supervisor of the user seeking permission).

The general flow consists of the following steps:

1) Look up the username (the name the user was enrolled to Cipherise as) of the authenticating
user.

2) Get the device id for the user. This can be determined by calling
[Service.getUserDevices](Service.html). Note that there can be more than one
device registered to a user. In this situation, the Service will need to determine which one(s) to
send the authentication to.

3) Send an authentication to the user's device, by calling
[Service.pushAuthenticate](Service.html). This will return an
[Authentication](Authentication.html).

4) The service retrieves the authentication result by calling
[Authentication.authenticate](Authentication.html). Note that this call is
blocking, awaiting timeouts or the User to complete the authentication on their device.

5) The user responds to the authentication notification on their device and solves the
authentication challenge on their device.

6) The [result of the authentication](Authentication.html) contains the username, what the
user responded with, and an optional payload response (See more in the [Payload](#Payload)
section).
A complete example of the long-polling PushAuth flow is shown (with a preliminary
enrolment):
```java
package com.forticode.example;

import com.forticode.cipherise.*;
import java.io.IOException;
import java.util.List;

public class Main {
public static void main(String[] args) throws CipheriseException, IOException {
  final String cipheriseServer = "https://your.cipherise.server.here";
  final String serviceName = "Example Service";
  final String userName = "Test User";

  Client client = new Client(cipheriseServer);
  Service service = client.createService(serviceName);

  // Automatically enrol the user.
  Enrolment enrolment = service.enrolUser(userName);
  System.out.println("Enrolment WaveCode URL:" + enrolment.getWaveCodeUrl());
  enrolment.validate();
  enrolment.confirm(true);

  // (1) Retrieve a device.
  List<Device> devices = service.getUserDevices(userName);
  // Take the last device returned (the most recent device).
  Device device = devices.get(devices.size() - 1);

  // (2) Send a push authentication to the device.
  System.out.println("Sending authentication to: " + userName);
  System.out.println("Please check your device for an authentication.");
  Authentication auth = service.pushAuthenticate(
    userName,
    device,
    "Description of the authentication, appears in the app",
    "Secondary information, appears in the app",
    "Notification message, appears in the push notification",
    AuthenticationLevel.OneTiCK
  );

  // (3) Retrieve the result of the authentication.
  AuthenticationResult result = auth.authenticate();
  System.out.println("Authenticating username: " + result.username);
  System.out.println(
    "Did the authentication succeed? " +
    result.authenticated.equals(Authenticated.Success)
  );
}}
```

### Serialization/deserialization
All classes with an extended lifetime (sessions, etc) support serialization and deserialization.
Serialization packs the state of the session into a byte buffer, which can then be stored and
transferred as appropriate. As this buffer consists of raw bytes, care must be taken in transport;
consider encoding as Base64 or hex as required.

These classes feature a `serialize` method, while the "parent" class (e.g. the parent for
`WaveAuth` is `Service`) features the counterpart deserialization method. A full list is
supplied below:

* [Service.serialize](Service.html) /
[Client.deserializeService](Client.html)
* [Enrolment.serialize](Enrolment.html) /
[Service.deserializeEnrolment](Service.html)
* [Authentication.serialize](Authentication.html) /
[Service.deserializeAuthentication](Service.html)

For an example of how these methods may be used, please look at the example for
[Creating new services](#creating-new-services).

### Payload

Payload data can be supplied to the user's device during
[enrolment](Enrolment.html) and supplied and fetched during authentication, both
[PushAuth](Authentication.html) and
[WaveAuth](Authentication.html). Payload data is arbitrary and is
controlled by the Service Provider.
A complete example for enrolment follows:
```java
package com.forticode.example;

import com.forticode.cipherise.*;
import java.io.IOException;
import java.util.Map;
import java.util.HashMap;
import java.util.List;
import java.util.ArrayList;

public class Main {
public static void main(String[] args) throws CipheriseException, IOException {
  final String cipheriseServer = "https://your.cipherise.server.here";
  final String serviceName = "Example Service";
  final String userName = "Test User";

  Client client = new Client(cipheriseServer);
  Service service = client.createService(serviceName);

  // Automatically enrol the user.
  Enrolment enrolment = service.enrolUser(userName);
  final Map<String, String> payload1 = new HashMap<>();
  payload1.put("hello", "world");
  System.out.println("Enrolment WaveCode URL:" + enrolment.getWaveCodeUrl());
  enrolment.validate();
  enrolment.confirm(true,
    new PayloadRequestBuilder().withSet(payload1).build()
  );

  // Retrieve a device.
  List<Device> devices = service.getUserDevices(userName);
  // Take the last device returned (the most recent device).
  Device device = devices.get(devices.size() - 1);

  // Send a push authentication to the device.
  Authentication auth = service.pushAuthenticate(
    userName,
    device,
    "Description of the authentication, appears in the app",
    "Secondary information, appears in the app",
    "Notification message, appears in the push notification",
    AuthenticationLevel.OneTiCK
  );

  // Retrieve the result.
  final Map<String, String> payload2 = new HashMap<>();
  payload2.put("testing", "this payload");
  AuthenticationResult result = auth.authenticate(true,
    new PayloadRequestBuilder()
      .withGet(new ArrayList<String>(payload1.keySet()))
      .withSet(payload2)
      .build()
  );
  System.out.println("Authenticating username:" + result.username);
  System.out.println(
    "Did the authentication succeed? " +
    result.authenticated.equals(Authenticated.Success)
  );
  System.out.println("Payload stored? " + result.payload.set);
  System.out.println("Payload retrieved " + result.payload.get);
}}
```

repository: forticode/cipherise-java-sdk

gha_language: Java

repo_name: forticode/cipherise-java-sdk


text:
# Kafka Pro(ducer Simulator)
kafkapro is Kafka Producer simulator tool to help development team to push messages to kafka.

### Prerequisites
- Go v1.12.4
- [dep](https://github.com/golang/dep)

## Getting Started

### Build
1. Make sure the project is inside `$GOPATH/src`
2. execute `dep ensure` to download dependencies
3. run `go test`
4. run `./build.sh` or execute `go build` if you prefer to build it manually
5. if you use `build.sh` in the previous step, executable file for windows, linux, and mac are available in `build/` directory

### Run
1. change the configuration in `config.toml` to suit your needs
2. make sure your input file as defined in `config.toml` is available (default is `input.txt`)
3. make sure your machine is connected to kafka
4. run the file that generated when you build the application

## Built with

* [Go](https://golang.org) - The language for simplicity and concurrency
* [Dep](https://github.com/golang/dep) - Go dependency management tool
* [Viper](https://github.com/spf13/viper) - Go configuration with fangs!
* [Kafka-go](https://github.com/segmentio/kafka-go) - as the name suggets, it's kafka for go

### Version
- 0.1 - ability to send message to kafka based on config

## Authors
- **Kharriz Abiyasa Bhimabrata** - *Initial work* - [Zeedware](https://github.com/Zeedware)

## License
this project is licensed under [MIT License](https://github.com/Zeedware/kafkapro/blob/master/LICENSE)

repository: Zeedware/kafkapro

repo_name: Zeedware/kafkapro


text:
![KeeWeb](./share/icons/hicolor/24x24/KeeWeb.png) KeeWeb.desktop
===============================================================================

Bash script collection to make [KeeWeb](https://github.com/antelle/keeweb) in freedesktop.org (Ubuntu, Debian, CentOS, etc.) looks like:

![KeeWeb](./share/icons/hicolor/256x256/KeeWeb.png)

Usage
-------------------------------------------------------------------------------

```sh
# If you already have GVim icon on your desktop
$ ./install_icons.sh
# If you does not have GVim icon, execute the following line as well
$ ./install_desktop.sh
# Update
$ update-desktop-database
# NOTE: You may need to logout -> login
```

License
-------------------------------------------------------------------------------
Code: MIT license

Icon was downloaded from
http://icooon-mono.com/12598-%E9%8D%B5%E3%81%AE%E3%82%A2%E3%82%A4%E3%82%B3%E3%83%B36


text:
# heineken

[![Build Status](https://travis-ci.org/khanage/heineken.svg?branch=master)](https://travis-ci.org/khanage/heineken)

A general build tool for haskell projects inspired by leiningen. It is intended to be useful for the automation of all project creation tedium, as well as eventually integrate with cloud deployments.

It is intended that this will support arbitrary plugins in the future.

# Usage
## New

Run 'hein new <proj name>' will:
 * create a subdirectory under the current one
 * create a cabal sandbox
 * initialise cabal
 * cabal build
 * create a git repo
 * create an initial commit
 * run your project (which defaults to printing the proj name)

You can also specify additional dependencies by prefixing them with a plus, e.g. `hein new webtest +scotty` will add scotty as a dependency to your build.

# Installation

This assumes you have a recent cabal installed for your platform.

 * cabal update
 * cabal install hein
 * hein new project +dependency

repository: khanage/heineken

gha_language: Haskell

repo_name: khanage/heineken


text:
---
layout: post
title: Chicago Energy Benchmarking - Column Changes
date: '2018-03-01T14:00-06:00'
author: Open Data Portal Team
categories:
- Open Data
- Data Portal
tags:
- g5i5-yz37
- revision
- improvement
---
With today's update of the [Chicago Energy Benchmarking - Covered Buildings](https://data.cityofchicago.org/d/g5i5-yz37) dataset, we have removed one column and added another:

* Removed: `Year` - The year the building is next required to report data. This is the current year for almost every building and the difficultly  of posting the few one-year extensions reliably meant this column was more misleading than helpful.
* Added: `Verification Year` - The year the building next must verify data accuracy. This is generally every three years.


text:
Turn/Token witness scheduling algorithm
---------------------------------------

The algorithm which determines the order of witnesses is referred
to as the *witness scheduling algorithm*.

This was designed by a community bounty in thread
https://whitecointalk.org/index.php/topic,15547.0
however, Graphene has an additional requirement which
is not taken into account by the solutions in the thread:

The membership and length of the list of witnesses may change over
time.

So in this article I'll describe my solution.

Turns and tokens
----------------

The solution is based on terms of *turns* and *tokens*.

- Newly inserted witnesses start out with a turn and a token.
- In order for a witness to be scheduled, it must have a turn and a token.
- The scheduler maintains a FIFO of witnesses without tokens.
- If no witness has a turn, then the scheduler gives a turn to all witnesses.  This is called "emitting a turn."
- While less than half of the witnesses have tokens, give a token to the first witness in the FIFO and remove it from the FIFO.
- Schedule a witness by picking randomly from all witnesses with both a turn and token.
- When a witness is scheduled, it loses its turn and token.

The generic scheduler
---------------------

The generic scheduler implements turns and tokens.  It only depends
on the C++11 stdlib and boost (not even using fc).  Types provided
by Graphene are template parameters.

The generic far future scheduler
--------------------------------

The far future scheduler is implemented with the following rules:

- Run until you emit a turn.
- Record all witnesses produced.
- Run until you emit a second turn.
- The witnesses produced between the emission of the first turn (exclusive)
and emission of the second turn (inclusive) are called the *far future schedule*.

Then the schedule for the rest of time is determined by repeating
the future schedule indefinitely.  The far future scheduler is required
to give the scheduling algorithm bounded runtime and memory usage even
in chains involving very long gaps.

Slots
-----

Due to dynamic block interval, we must carefully keep in mind
the difference between schedule slots and timestamps.  A
*schedule slot number* is a positive integer.  A slot number of `n`
represents the `n`th next block-interval-aligned timestamp after
the head block.

Note that the mapping between slot numbers and timestamps will change
if the block interval changes.

Scheduling blocks
-----------------

When each block is produced, the blockchain must determine whether
the scheduler needs to be run.  If fewer than `num_witnesses` are
scheduled, the scheduler will run until `2*num_witnesses` are scheduled.
A block in which the scheduler runs is called a *scheduling block*.

Changes in the set of active witnesses do not modify the existing
schedule.  Rather, they will be incorporated into new schedule entries
when the scheduler runs in the next scheduling block.  Thus, a witness
that has lost an election may still produce 1-2 blocks.  Such a witness
is called a *lame duck*.

Near vs. far schedule
---------------------

From a particular chain state, it must be possible to specify a
mapping from slots to witnesses, called the *total witness schedule*.
The total witness schedule is partitioned into a prefix, called the
*near schedule*; the remainder is the *far schedule*.

When a block occurs, `n` entries are *drained* (removed) from the head
of the total schedule, where `n` is the slot number of the new block
according to its parent block.

If the block is a scheduling block, the total schedule is further
transformed.  The new near schedule contains `2*num_witnesses` entries,
with the previous near schedule as a prefix.  The rest of the near
schedule is determined by the current blockchain RNG.

The new far schedule is determined by running the far future scheduler,
as described above.  The far future scheduler also obtains entropy
from the current blockchain RNG.

As an optimization, the implementation does not run the far future
scheduler until a far-future slot is actually queried.  With this
optimization, the only circumstance under which validating nodes must
run the far future scheduler is when a block gap longer than `num_witnesses`
occurs (an extremely rare condition).

Minimizing impact of selective dropout
--------------------------------------

The ability of any single malicious witness to affect the results of the
shuffle algorithm is limited because the RNG is based on bit commitment
of the witnesses.  However, a malicious witness *is* able to
refuse to produce a block.  A run of `m` consecutively scheduled
malicious witnesses can independently make `m` independent choices
of whether to refuse to produce a block.  Basically they are able to
control `m` bits of entropy in the shuffle algorithm's output.

It is difficult-to-impossible to entirely eliminate "the last person
being evil" problem in trustless distributed RNG's.  But we can at least
mitigate this vector by rate-limiting changes to the total witness
schedule to a very slow rate.

If every block schedules a witness, our adversary with `m` malicious
witnesses gets `m` chances per round to selectively drop out in order
to manipulate the shuffle order, allowing `m` attacks per round.
If witnesses are only scheduled once per round,
a selective dropout requires the malicious witness to produce the
scheduling block, limiting the probability to `m/n` attacks per round.

repository: Whitecoin-XWC/Whitecoin-core

repo_name: Whitecoin-XWC/Whitecoin-core


text:
# Trivia-Game

## Overview
This is a time-based trivia game for the browser that gives the player 30 seconds to answer a multiple choice question before moving to the next question. After the player makes a choice or if the timer runs out, the player receives feedback telling them if they were correct or incorrect, shown the actual answer along with the rationale explaining it. After the game asks all the questions, the player is scored and shown a percentage they answered correctly and is prompted to play again.

The game runs through an array of question objects that contain all the data for the question including answers, dummy answers, and the rationale. In this way, the game could be fed any series of multiple choice questions, and questions can be expanded/edited easily.

## Technologies
* Javascript
* jQuery
* HTML
* CSS

## Challenges

Coming up with a unique format to ask questions proved challenging. Faced with choosing between displaying all questions at once or multiple on a page, I chose to stick with displaying one question at a time to focus the user on the current question, correct answer and rationale. I felt this was a more engaging way to present the questions and drew the user's eyes to each question/answer as they were displayed.

Styling the game also proved challenging. While I would like to make the UI as beautiful and detailed as possible, I also had to balance that against distracting the player from focusing on the questions themselves. In the end I chose a minimalist format that looked presentable but also focused mainly on the question content.

## Future Plans
* I would like to improve the display on mobile devices, maximizing the question space and increasing the display length of questions and answers.
* I would like to include code that allowed the game to pull questions from an API with Ajax so that any number of questions or perhaps different categores of questions could be displayed.


text:
##### |[Home](https://mitmedialab.github.io/2019-MIT-Computational-Law-Course) | [Agenda](https://mitmedialab.github.io/2019-MIT-Computational-Law-Course/agenda) |

# Working Agenda

> This is a working agenda and will be refined as the week progresses.  Registered students will receive connection information for the online sessions on Day 1 and may participate by hangout in online breakout sessions on Day 2 and 3.

## Day 1 (All Online)

11:00 - 11:30 - 01A - Dazza Greenwood - Overview and launch
infor
11:30 - 12:00 - 01B - Bryan Wilson - Computational Law Overview and Docassemble

12:00 - 12:30 - Break

12:30 - 1:15 - 01D - Bill Rosenblatt - Rights Expression Languages

1:15 - 1:30 Break

1:30 - 2:00	- 01E - Vickie Nauman - Music Industry Value Chain

2:00 - 2:15 - Break

2:15 - 2:45	- 01C - Chris Berendt - Computational Contracts

2:45 - 3:00 - Break

3:00 - 3:30 - 01F - Christian Smith - Security, Cryptography and Protocols

3:30 - 4:00 - Dazza Greenwood - Synthesis and Wrap Up

## Day 2

### Day 2 In-Person Track at MIT Media Lab

11:00 - 11:15 - Dazza: Welcome/Overview

11:15 - 12:15 - George Live Lecture Session (answer flipped CR and engage people in person)

12:15 - 1:00 Break

1:00-2:00 - Redbull Presentation

2:00 - 2:30 Break

2:30-3:30 - IBM Hyperledger Presentation

3:30-4:00 - General Discussion and Wrap Up

### Day 2 Online Track

* NOTE: Day 2 online breakout session topics will be announced on Day 1.

1:00 - 1:45 - Session One (TBA)

2:30 - 3:15 - Session Two (TBA)

## Day 3  (All Online)

11:00-11:15 - Welcome/Overview of Firestarter

11:15-11:30 - Self-Organize into breakout sessions

11:30-2:00 - Concurrent Breakout Sessions

> NOTE: Some sessions may be moved to Day 2 so more people can access more topics.

* Brian Ulicny - VAT Tax / Blockchain Scenario
* Beth McCarthy + Warren Agin - Bankruptcy
* Juan Ramirez e-Discovery and Rapid Prototyping of Legal Tech Apps
* Elizabeth Renieris - Competing Legal Frameworks for Humanity in the Data Driven Age
* Michelle Gitlitz  - Smart Legal Contracts
* Jonny Penn - Labor in the Digital Age

2:00-3:30 - Report Out + Discussion for Each Group

3:30-4:00 - Synthesis Wrap Up

gha_license_id: NOASSERTION


text:
# undici

[![Node CI](https://github.com/nodejs/undici/actions/workflows/nodejs.yml/badge.svg)](https://github.com/nodejs/undici/actions/workflows/nodejs.yml) [![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](http://standardjs.com/) [![npm version](https://badge.fury.io/js/undici.svg)](https://badge.fury.io/js/undici) [![codecov](https://codecov.io/gh/nodejs/undici/branch/main/graph/badge.svg?token=yZL6LtXkOA)](https://codecov.io/gh/nodejs/undici)

An HTTP/1.1 client, written from scratch for Node.js.

> Undici means eleven in Italian. 1.1 -> 11 -> Eleven -> Undici.
It is also a Stranger Things reference.

Have a question about using Undici? Open a [Q&A Discussion](https://github.com/nodejs/undici/discussions/new) or join our official OpenJS [Slack](https://openjs-foundation.slack.com/archives/C01QF9Q31QD) channel.

## Install

```
npm i undici
```

## Benchmarks

The benchmark is a simple `hello world` [example](benchmarks/benchmark.js) using a
number of unix sockets (connections) with a pipelining depth of 10 running on Node 16.
The benchmarks below have the [simd](https://github.com/WebAssembly/simd) feature enabled.

### Connections 1

| Tests               | Samples |        Result | Tolerance | Difference with slowest |
|---------------------|---------|---------------|-----------|-------------------------|
| http - no keepalive |      15 |  4.63 req/sec |  ± 2.77 % |                       - |
| http - keepalive    |      10 |  4.81 req/sec |  ± 2.16 % |                + 3.94 % |
| undici - stream     |      25 | 62.22 req/sec |  ± 2.67 % |             + 1244.58 % |
| undici - dispatch   |      15 | 64.33 req/sec |  ± 2.47 % |             + 1290.24 % |
| undici - request    |      15 | 66.08 req/sec |  ± 2.48 % |             + 1327.88 % |
| undici - pipeline   |      10 | 66.13 req/sec |  ± 1.39 % |             + 1329.08 % |

### Connections 50

| Tests               | Samples |           Result | Tolerance | Difference with slowest |
|---------------------|---------|------------------|-----------|-------------------------|
| http - no keepalive |      50 |  3546.49 req/sec |  ± 2.90 % |                       - |
| http - keepalive    |      15 |  5692.67 req/sec |  ± 2.48 % |               + 60.52 % |
| undici - pipeline   |      25 |  8478.71 req/sec |  ± 2.62 % |              + 139.07 % |
| undici - request    |      20 |  9766.66 req/sec |  ± 2.79 % |              + 175.39 % |
| undici - stream     |      15 | 10109.74 req/sec |  ± 2.94 % |              + 185.06 % |
| undici - dispatch   |      25 | 10949.73 req/sec |  ± 2.54 % |              + 208.75 % |

## Quick Start

```js
import { request } from 'undici'

const {
  statusCode,
  headers,
  trailers,
  body
} = await request('http://localhost:3000/foo')

console.log('response received', statusCode)
console.log('headers', headers)

for await (const data of body) {
  console.log('data', data)
}

console.log('trailers', trailers)
```

## Body Mixins

The `body` mixins are the most common way to format the request/response body. Mixins include:

- [`.formData()`](https://fetch.spec.whatwg.org/#dom-body-formdata)
- [`.json()`](https://fetch.spec.whatwg.org/#dom-body-json)
- [`.text()`](https://fetch.spec.whatwg.org/#dom-body-text)

Example usage:

```js
import { request } from 'undici'

const {
  statusCode,
  headers,
  trailers,
  body
} = await request('http://localhost:3000/foo')

console.log('response received', statusCode)
console.log('headers', headers)
console.log('data', await body.json())
console.log('trailers', trailers)
```

_Note: Once a mixin has been called then the body cannot be reused, thus calling additional mixins on `.body`, e.g. `.body.json(); .body.text()` will result in an error `TypeError: unusable` being thrown and returned through the `Promise` rejection._

Should you need to access the `body` in plain-text after using a mixin, the best practice is to use the `.text()` mixin first and then manually parse the text to the desired format.

For more information about their behavior, please reference the body mixin from the [Fetch Standard](https://fetch.spec.whatwg.org/#body-mixin).

## Common API Methods

This section documents our most commonly used API methods. Additional APIs are documented in their own files within the [docs](./docs/) folder and are accessible via the navigation list on the left side of the docs site.

### `undici.request([url, options]): Promise`

Arguments:

* **url** `string | URL | UrlObject`
* **options** [`RequestOptions`](./docs/api/Dispatcher.md#parameter-requestoptions)
  * **dispatcher** `Dispatcher` - Default: [getGlobalDispatcher](#undicigetglobaldispatcher)
  * **method** `String` - Default: `PUT` if `options.body`, otherwise `GET`
  * **maxRedirections** `Integer` - Default: `0`

Returns a promise with the result of the `Dispatcher.request` method.

Calls `options.dispatcher.request(options)`.

See [Dispatcher.request](./docs/api/Dispatcher.md#dispatcherrequestoptions-callback) for more details.

### `undici.stream([url, options, ]factory): Promise`

Arguments:

* **url** `string | URL | UrlObject`
* **options** [`StreamOptions`](./docs/api/Dispatcher.md#parameter-streamoptions)
  * **dispatcher** `Dispatcher` - Default: [getGlobalDispatcher](#undicigetglobaldispatcher)
  * **method** `String` - Default: `PUT` if `options.body`, otherwise `GET`
  * **maxRedirections** `Integer` - Default: `0`
* **factory** `Dispatcher.stream.factory`

Returns a promise with the result of the `Dispatcher.stream` method.

Calls `options.dispatcher.stream(options, factory)`.

See [Dispatcher.stream](docs/api/Dispatcher.md#dispatcherstreamoptions-factory-callback) for more details.

### `undici.pipeline([url, options, ]handler): Duplex`

Arguments:

* **url** `string | URL | UrlObject`
* **options** [`PipelineOptions`](docs/api/Dispatcher.md#parameter-pipelineoptions)
  * **dispatcher** `Dispatcher` - Default: [getGlobalDispatcher](#undicigetglobaldispatcher)
  * **method** `String` - Default: `PUT` if `options.body`, otherwise `GET`
  * **maxRedirections** `Integer` - Default: `0`
* **handler** `Dispatcher.pipeline.handler`

Returns: `stream.Duplex`

Calls `options.dispatch.pipeline(options, handler)`.

See [Dispatcher.pipeline](docs/api/Dispatcher.md#dispatcherpipelineoptions-handler) for more details.

### `undici.connect([url, options]): Promise`

Starts two-way communications with the requested resource using [HTTP CONNECT](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/CONNECT).

Arguments:

* **url** `string | URL | UrlObject`
* **options** [`ConnectOptions`](docs/api/Dispatcher.md#parameter-connectoptions)
  * **dispatcher** `Dispatcher` - Default: [getGlobalDispatcher](#undicigetglobaldispatcher)
  * **maxRedirections** `Integer` - Default: `0`
* **callback** `(err: Error | null, data: ConnectData | null) => void` (optional)

Returns a promise with the result of the `Dispatcher.connect` method.

Calls `options.dispatch.connect(options)`.

See [Dispatcher.connect](docs/api/Dispatcher.md#dispatcherconnectoptions-callback) for more details.

### `undici.fetch(input[, init]): Promise`

Implements [fetch](https://fetch.spec.whatwg.org/#fetch-method).

* https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/fetch
* https://fetch.spec.whatwg.org/#fetch-method

Only supported on Node 16.8+.

Basic usage example:

```js
import { fetch } from 'undici'

const res = await fetch('https://example.com')
const json = await res.json()
console.log(json)
```

You can pass an optional dispatcher to `fetch` as:

```js
import { fetch, Agent } from 'undici'

const res = await fetch('https://example.com', {
  // Mocks are also supported
  dispatcher: new Agent({
    keepAliveTimeout: 10,
    keepAliveMaxTimeout: 10
  })
})
const json = await res.json()
console.log(json)
```

#### `request.body`

A body can be of the following types:

- ArrayBuffer
- ArrayBufferView
- AsyncIterables
- Blob
- Iterables
- String
- URLSearchParams
- FormData

In this implementation of fetch, ```request.body``` now accepts ```Async Iterables```. It is not present in the [Fetch Standard.](https://fetch.spec.whatwg.org)

```js
import { fetch } from 'undici'

const data = {
  async *[Symbol.asyncIterator]() {
    yield 'hello'
    yield 'world'
  },
}

await fetch('https://example.com', { body: data, method: 'POST', duplex: 'half' })
```

#### `request.duplex`

- half

In this implementation of fetch, `request.duplex` must be set if `request.body` is `ReadableStream` or `Async Iterables`. And fetch requests are currently always be full duplex. More detail refer to [Fetch Standard.](https://fetch.spec.whatwg.org/#dom-requestinit-duplex)

#### `response.body`

Nodejs has two kinds of streams: [web streams](https://nodejs.org/dist/latest-v16.x/docs/api/webstreams.html), which follow the API of the WHATWG web standard found in browsers, and an older Node-specific [streams API](https://nodejs.org/api/stream.html). `response.body` returns a readable web stream. If you would prefer to work with a Node stream you can convert a web stream using `.fromWeb()`.

```js
import { fetch } from 'undici'
import { Readable } from 'node:stream'

const response = await fetch('https://example.com')
const readableWebStream = response.body
const readableNodeStream = Readable.fromWeb(readableWebStream)
```

#### Specification Compliance

This section documents parts of the [Fetch Standard](https://fetch.spec.whatwg.org) that Undici does
not support or does not fully implement.

##### Garbage Collection

* https://fetch.spec.whatwg.org/#garbage-collection

The [Fetch Standard](https://fetch.spec.whatwg.org) allows users to skip consuming the response body by relying on
[garbage collection](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Memory_Management#garbage_collection) to release connection resources. Undici does not do the same. Therefore, it is important to always either consume or cancel the response body.

Garbage collection in Node is less aggressive and deterministic
(due to the lack of clear idle periods that browsers have through the rendering refresh rate)
which means that leaving the release of connection resources to the garbage collector can lead
to excessive connection usage, reduced performance (due to less connection re-use), and even
stalls or deadlocks when running out of connections.

```js
// Do
const headers = await fetch(url)
  .then(async res => {
    for await (const chunk of res.body) {
      // force consumption of body
    }
    return res.headers
  })

// Do not
const headers = await fetch(url)
  .then(res => res.headers)
```

However, if you want to get only headers, it might be better to use `HEAD` request method. Usage of this method will obviate the need for consumption or cancelling of the response body. See [MDN - HTTP - HTTP request methods - HEAD](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/HEAD) for more details.

```js
const headers = await fetch(url, { method: 'HEAD' })
  .then(res => res.headers)
```

##### Forbidden and Safelisted Header Names

* https://fetch.spec.whatwg.org/#cors-safelisted-response-header-name
* https://fetch.spec.whatwg.org/#forbidden-header-name
* https://fetch.spec.whatwg.org/#forbidden-response-header-name
* https://github.com/wintercg/fetch/issues/6

The [Fetch Standard](https://fetch.spec.whatwg.org) requires implementations to exclude certain headers from requests and responses. In browser environments, some headers are forbidden so the user agent remains in full control over them. In Undici, these constraints are removed to give more control to the user.

### `undici.upgrade([url, options]): Promise`

Upgrade to a different protocol. See [MDN - HTTP - Protocol upgrade mechanism](https://developer.mozilla.org/en-US/docs/Web/HTTP/Protocol_upgrade_mechanism) for more details.

Arguments:

* **url** `string | URL | UrlObject`
* **options** [`UpgradeOptions`](docs/api/Dispatcher.md#parameter-upgradeoptions)
  * **dispatcher** `Dispatcher` - Default: [getGlobalDispatcher](#undicigetglobaldispatcher)
  * **maxRedirections** `Integer` - Default: `0`
* **callback** `(error: Error | null, data: UpgradeData) => void` (optional)

Returns a promise with the result of the `Dispatcher.upgrade` method.

Calls `options.dispatcher.upgrade(options)`.

See [Dispatcher.upgrade](docs/api/Dispatcher.md#dispatcherupgradeoptions-callback) for more details.

### `undici.setGlobalDispatcher(dispatcher)`

* dispatcher `Dispatcher`

Sets the global dispatcher used by Common API Methods.

### `undici.getGlobalDispatcher()`

Gets the global dispatcher used by Common API Methods.

Returns: `Dispatcher`

### `undici.setGlobalOrigin(origin)`

* origin `string | URL | undefined`

Sets the global origin used in `fetch`.

If `undefined` is passed, the global origin will be reset. This will cause `Response.redirect`, `new Request()`, and `fetch` to throw an error when a relative path is passed.

```js
setGlobalOrigin('http://localhost:3000')

const response = await fetch('/api/ping')

console.log(response.url) // http://localhost:3000/api/ping
```

### `undici.getGlobalOrigin()`

Gets the global origin used in `fetch`.

Returns: `URL`

### `UrlObject`

* **port** `string | number` (optional)
* **path** `string` (optional)
* **pathname** `string` (optional)
* **hostname** `string` (optional)
* **origin** `string` (optional)
* **protocol** `string` (optional)
* **search** `string` (optional)

## Specification Compliance

This section documents parts of the HTTP/1.1 specification that Undici does
not support or does not fully implement.

### Expect

Undici does not support the `Expect` request header field. The request
body is  always immediately sent and the `100 Continue` response will be
ignored.

Refs: https://tools.ietf.org/html/rfc7231#section-5.1.1

### Pipelining

Undici will only use pipelining if configured with a `pipelining` factor
greater than `1`.

Undici always assumes that connections are persistent and will immediately
pipeline requests, without checking whether the connection is persistent.
Hence, automatic fallback to HTTP/1.0 or HTTP/1.1 without pipelining is
not supported.

Undici will immediately pipeline when retrying requests after a failed
connection. However, Undici will not retry the first remaining requests in
the prior pipeline and instead error the corresponding callback/promise/stream.

Undici will abort all running requests in the pipeline when any of them are
aborted.

* Refs: https://tools.ietf.org/html/rfc2616#section-<IP_ADDRESS>
* Refs: https://tools.ietf.org/html/rfc7230#section-6.3.2

### Manual Redirect

Since it is not possible to manually follow an HTTP redirect on the server-side,
Undici returns the actual response instead of an `opaqueredirect` filtered one
when invoked with a `manual` redirect. This aligns `fetch()` with the other
implementations in Deno and Cloudflare Workers.

Refs: https://fetch.spec.whatwg.org/#atomic-http-redirect-handling

## Workarounds

### Network address family autoselection.

If you experience problem when connecting to a remote server that is resolved by your DNS servers to a IPv6 (AAAA record)
first, there are chances that your local router or ISP might have problem connecting to IPv6 networks. In that case
undici will throw an error with code `UND_ERR_CONNECT_TIMEOUT`.

If the target server resolves to both a IPv6 and IPv4 (A records) address and you are using a compatible Node version
(18.3.0 and above), you can fix the problem by providing the `autoSelectFamily` option (support by both `undici.request`
and `undici.Agent`) which will enable the family autoselection algorithm when establishing the connection.

## Collaborators

* [__Daniele Belardi__](https://github.com/dnlup), <https://www.npmjs.com/~dnlup>
* [__Ethan Arrowood__](https://github.com/ethan-arrowood), <https://www.npmjs.com/~ethan_arrowood>
* [__Matteo Collina__](https://github.com/mcollina), <https://www.npmjs.com/~matteo.collina>
* [__Matthew Aitken__](https://github.com/KhafraDev), <https://www.npmjs.com/~khaf>
* [__Robert Nagy__](https://github.com/ronag), <https://www.npmjs.com/~ronag>
* [__Szymon Marczak__](https://github.com/szmarczak), <https://www.npmjs.com/~szmarczak>
* [__Tomas Della Vedova__](https://github.com/delvedor), <https://www.npmjs.com/~delvedor>

### Releasers

* [__Ethan Arrowood__](https://github.com/ethan-arrowood), <https://www.npmjs.com/~ethan_arrowood>
* [__Matteo Collina__](https://github.com/mcollina), <https://www.npmjs.com/~matteo.collina>
* [__Robert Nagy__](https://github.com/ronag), <https://www.npmjs.com/~ronag>

## License

MIT

repository: nodejs/undici

repo_name: nodejs/undici


text:
# consulexec

[![Build status](https://ci.appveyor.com/api/projects/status/yv7suwukknrohg3y?svg=true)](https://ci.appveyor.com/project/spirit11/consulexec)

```
choco install consulexec -s https://ci.appveyor.com/nuget/spirit11-consulexec
```


text:
---
title: Wise words for brands from Project Voice
date: 2020-06-08T19:51:24.635Z
description: 'It''s less what voice sounds like, and more what it delivers.'
image: /img/open-voice-network-ovn-wise-words-for-brands-from-project-voice.png
---
I attended a superb presentation on the value of voice assistance to brands this past January at Bradley Metrock’s top-shelf Project Voice event in Chattanooga.

The speaker: [Tobias Dengel](https://www.linkedin.com/in/tobiasdengel/), CEO of WillowTree, Inc., the mobile/digital agency out of Charlottesville, Virginia, with a client list that includes General Electric, PepsiCo, Johnson & Johnson, Time Warner, Turner Broadcasting, Wyndham Hotel Group, 21st Century Fox, and Zappos.

One of the best conference break-out sessions I've attended in years.

Let me share with you some highlights from his talk at Project Voice—with a bit of editing and added opinion.

## How do we know that voice assistance is not a tech-driven fad?

Will voice assistance—like the iPhone—change consumer behavior in ways we can't yet envision?

Or, will voice be yet another tech-driven chunk-o-hype? Like 3D television—the darling of a CES not so long ago, but nowhere to be found in today’s US homes. Or, like AR-VR, which for years has forecast a nation in headsets.

In support of the former, Dengel pointed to data that shows that voice assistance to be the fastest-adopted consumer technology in history.

To the latter, he noted that, despite numerous predictions of voice enthusiasts, voice assistance has not yet significantly changed the world of brand-to-consumer connection.

But Dengel believes it will. And in a big way. But only if brands (and the voice development community brands hire) understand the key questions of consumer value creation.

## The big issue for brands and voice is user trust.

There is, Dengel said, **a trough of distrust** that every new consumer technology must slog through.

It’s made up of two parts. The first is cognitive (or rational) trust that asks, “will this do what it promises?”

The second is an equal part of emotional trust that rises or falls according to the actual usage experience. Is it simple to turn on, to engage with, to get something valuable? Or, is it frustrating in its complexity? Or, is it so advanced, so beyond the norm, _that it is a bit unworldly, even downright freaky?_

For voice, Dengel's experience with top-tier brands suggests that _emotional trust_ is today's big issue.

This suggests a significant downside for voice assistance that is ever-more human like, more predictive, and more independent. For most users—at least in the near-term—it will be simply be more freaky. Even scary.

And it will beg questions of always-on listening and intrusion and data use.

## To build consumer trust (and thus, adoption), brands must focus less on technological development and much more on providing users with fast and accurate answers.

Will brands (and developers) pursue an ever-more human experience? Or, will brands (and developers) focus first on solving human problems?

Yes, the futurists and engineers may dream of a personal, AI-enabled digital twin, a Jeevesian voice-enabled virtual assistant. Or even of a human-like representation of a brand.

But that's not why consumers are turning to voice.

Dengel emphasized that today’s and tomorrow’s consumer voice value proposition is all about _**utility and efficiency:**_ accurate, informative and extremely rapid responses to voice-based queries.

In short: answer the questions. Accurately. Rapidly. And, in a brand-right tone.

## Ignore at your peril the critical numbers of voice usage.

Dengel underlined—as he did at the Voice@CES show the week prior—that voice developers and voice-centric brands must understand the basic math of voice.

Here they are:

Broadly stated, users can speak at roughly 130 words per minute. Users can type, on average, about 40 words per minute. There's a 3X advantage to voice.  Which means voice is the efficient means for _**input.**_

On the other side of the interaction, however, there’s a different reality. We can listen at roughly the same speed we can talk—about 130 words per minute. However, we can read and understand at roughly 250 words per minute.  There's a 2X advantage to the visual presentation of content.  Which means a screen is the efficient means for _**output.**_

Which means, think multi-modal. Think voice-enabled smartphone applications. Think of visually-enabled smart speakers.

## Thanks, Tobias. Great brain food for creators of value in voice.


text:
# YSenate.org
Information pages. Explaining what we are trying build, a bit of the theory, etc.
The Generation Y Political Organization.

Vote any time, at any place, for any person, for any idea. Change your choice at will.

Discover your own dynamic neighborhood political party. Meet new people.

Uncover a new generation of leaders, be a leader.

Collaborate on policy opinions and craft open source legislation with Git!

#People
##Development Leaders

Your Name Here! YSenate loves to push and pull with hardcore forkers!

Chuck Short, the architect, is a lawyer/computer engineer fascinated with information theory. He has worked for a couple of law firms, taught statistics courses, and enjoys hacking. He earned a J.D./M.S. Math with distinction from Rutgers University, and BSEE from USC.

Tyler Guidry, the project manager, is partner at  Modifly.com, founder at  DashStack.com, and rally car driver. He has worked as a CTO in the investments industry and directed technology for over 12 years. He earned a B.S. in Computer Science from the Univeristy of Texas at San Antonio.

Joshua Cooper, a YSenate research consultant over the past few years, is a Palmetto Assistant Professor of Mathematics at the University of South Carolina. He also consults for private industry and has worked as a data scientist with ETH Z&#252rich. He earned a Ph.D. from the University of California, San Diego, and is a graduate of MIT.

Your Name Here! If you don't have the time or stomach to contribute code, help us with direction and feedback on design.

 Credits Due

 Paul Miller for open sourcing Ost.io, a basis for the YSenate front-end; as well as all the goodies its built with like Brunch

 Mathias Schaefer,  9elements, and MoviePilot.com for releasing Chaplin.

 Mark Cavage for open sourcing Restify.

Glopphy for the liberal license on vector graphix.

repository: craigerm/ysenate-info

repo_name: craigerm/ysenate-info


text:
---
layout: post
permalink: '/:categories/:year/:month/:day/:title/'
date: '2018-11-14 18:21 +0100'
categories: en event-host audience-interection
tags: [post-on-screen,lottery-picking,glow-stick,audience-engagement]
published: true
title: 'How to increase audience engagement in live event?'
feature_image: /uploads/1_8xGqa1Q9DuhH2MdICLDgiQ.jpeg
description: Today’s story is about audience engagement.
---
![Event photo]({{site.baseurl}}/uploads/1_W2giC8TjletygTa_fV67_A.jpeg)

Today’s story is about audience engagement.

Long time ago… Ok let’s cut it short, how do you make your audience more involved in an event? Give them candies? Send them gifts? Or yell at them: hey, you watch the stage!

Ok apparently these are not good way for it. Event is this weird thing, which you hosted to amaze your audience but only the stage guy who got the loud mic can share their ideas freely. Audience could sit and take some photos.

![Boring audience taking photos]({{site.baseurl}}/uploads/1_8xGqa1Q9DuhH2MdICLDgiQ.jpeg)

So the question arised, how could we give more power to audience and let them truly feel involved?

I’ve been an event planner for several years, this is one of the questions that I always ask myself. Today I want to talk about an audience interactive technology solution here Picpic Live.

## LIVE POLL: Let audience decide result:
We have seen X factor, American idol, where results are all decided by judges. We believe in judges proficiency, but to be honest, if a star is going to win people’s heart, the decision is made by every non privileged audience, so why not give audience more saying. So my suggestion is do a live poll, hear everyone’s voice, reveal the result right away on the screen.

![Live Poll Screen]({{site.baseurl}}/uploads/0_fFJkF7jHoFx5K-X4.png)

## Audience ===== bridge ===== Stage:
Instead of trying to imagine what audience like, what is in their mind, we really need to hear what audience want to say. With live chat room, audience can express their ideas, event host could pick the best ideas out and posted on to the screen so that everyone could see. With this tech solution, a bridge is built between audience and stage, feedback are collected. Audience are fully involved, and feel appreciated.

![Post on screen]({{site.baseurl}}/uploads/0_lCU93dbrdSrt2xpK.png)

## Dreamy way of find the lucky audience:
What is the most exciting part of an event for the audience? No doubt, a lucky draw! How do you pick the lucky one? You are not still using raffle tickets, aren’t you? This is how technology handles the engagement.

![Lucky draw Screen]({{site.baseurl}}/uploads/1_Vc2zNH0cEvzqMuphiCYHyg.png)

Audience can input their information and their wishes onto a lucky lantern, the lantern flies high into the screen. They would blink and the lucky lantern would jump out and reveal itself. Then, we got the lucky audience, isn’t that dreamy?

## Controlable phone glow stick:

![Glow stick view]({{site.baseurl}}/uploads/1_Fj4YIMvFKd_AzZhreqP7Hw.jpeg)
*Photo by Choi Hochit on Unsplash*

Remember the glow stick light effect like Talor Swift concert, where you could control each every glow stick colour and blink frequency? Plastic is not environmental friendly, and expensive. So I use “[Controlable phone glow stick](https://www.youtube.com/watch?v=P7prkCvv0GE)” where Audience phone screen colour would be the same as what you decide, and blink with same frequency. No plastic, just phone.

## Interaction is the key factor for making audience involved. So let’s use it well.

Check if [this technology](https://picpiclive.com) help’s you.

repository: immzz/picpic-blog

repo_name: immzz/picpic-blog