text:
# Deis Minio v2

[![Build Status](https://travis-ci.org/deis/minio.svg?branch=master)](https://travis-ci.org/deis/minio) [![Go Report Card](http://goreportcard.com/badge/deis/minio)](http://goreportcard.com/report/deis/minio) [![Docker Repository on Quay](https://quay.io/repository/deisci/minio/status "Docker Repository on Quay")](https://quay.io/repository/deisci/minio)

Deis (pronounced DAY-iss) is an open source PaaS that makes it easy to deploy and manage
applications on your own servers. Deis builds on [Kubernetes](http://kubernetes.io/) to provide
a lightweight, [Heroku-inspired](http://heroku.com) workflow.

## Work in Progress

![Deis Graphic](https://s3-us-west-2.amazonaws.com/get-deis/deis-graphic-small.png)

Deis Minio v2 is changing quickly. Your feedback and participation are more than welcome, but be
aware that this project is considered a work in progress.

# About

This package provides a [Minio](http://minio.io) S3-compatible object storage system on Kubernetes. It can be used as a [Deis](https://deis.com/) component to provide object storage for various other components, but it is flexible enough to be run anywhere else.

We provide it as a Docker container, and also provide the following manifests to run it inside [Kubernetes](http://kubernetes.io/):

- A [replication controller](http://kubernetes.io/v1.1/docs/user-guide/replication-controller.html) to run a server on a single pod
- A [service](http://kubernetes.io/v1.1/docs/user-guide/services.html) to run in front of the replication controller
- [Secret](http://kubernetes.io/v1.1/docs/user-guide/secrets.html)s for:
  - User credentials
  - Admin credentials
  - SSL (note that the current version does not run with SSL enabled, however)

Note: this component currently does not offer persistent storage from the Docker container.

# Hacking Minio

First, install [helm](http://helm.sh) and [boot up a kubernetes cluster][install-k8s]. Next, add the
`deis` repository to your chart list:

```console
$ helm repo add deis https://github.com/deis/charts
```

Then, install the Deis chart!

```console
$ helm install deis/deis
```

The chart will install the entire Deis platform onto Kubernetes. You can monitor all the pods that it installs by running:

```console
$ kubectl get pods --namespace=deis
```

Once this is done, SSH into a Kubernetes minion, and run the following:

```
$ curl -sSL http://deis.io/deis-cli/install.sh | sh
$ sudo mv deis /bin
$ kubectl get service deis-workflow
$ deis register <IP_ADDRESS> # or the appropriate CLUSTER_IP
$ ssh-keygen -t rsa -b 4096 -C<EMAIL_ADDRESS>$ eval $(ssh-agent) && ssh-add ~/.ssh/id_rsa
$ deis keys:add ~/.ssh/id_rsa.pub
$ deis create --no-remote
Creating Application... done, created madras-radiator
$ deis pull deis/example-go -a madras-radiator
Creating build... ..o
```

If you want to hack on a new feature, re-compile your code, then rebuild the `deis/minio` image and push it to a Docker registry. The `$DEIS_REGISTRY` environment variable must point to a registry accessible to your Kubernetes cluster. If you're using a locally hosted Docker registry, you may need to configure the Docker engines on your Kubernetes nodes to allow `--insecure-registry <IP_ADDRESS>/16` (or the appropriate address range).

```console
$ make build docker-push
```

(note that `docker-push` runs `docker-build` implicitly)

Next, you'll want to remove the `deis-minio` [replication controller](http://kubernetes.io/v1.1/docs/user-guide/replication-controller.html) and re-create it to run your new image.

```console
make kube-clean kube-rc
```

## Installation

The following steps assume that you have the [Docker CLI](https://docs.docker.com/) and [Kubernetes CLI](http://kubernetes.io/v1.1/docs/user-guide/kubectl-overview.html) installed and correctly configured.

```
make deploy kube-service
```

## License

Copyright 2013, 2014, 2015 Engine Yard, Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at <http://www.apache.org/licenses/LICENSE-2.0>

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

[install-k8s]: http://kubernetes.io/gettingstarted/

repository: smothiki/minio

repo_name: smothiki/minio


text:
# Purplest, Inc. Dark Theme - UI [1.0.2]

A dark UI theme for Atom by Purplest, Inc.

[Atom Theme Page](https://atom.io/themes/purplest-inc-dark-ui)

![preview](https://purplest.com/img/purplest-inc-dark-ui-theme-preview.png)

license: MIT

branch_name: refs/heads/master

extension: md

license_type: permissive


text:
HW3
======

### Instructions

Please create an Android app using ListView. The UI should looks like the following screenshot. It should
contain an ImageView and TextView.

![Instructions](screenshots/instructions.png)

### Solution

#### Startup

![Startup](screenshots/startup.png)

#### Item Selection (click)

![Iteml Selection](screenshots/item-selected.png)

### Completed Assignment

[readme.pdf](readme.pdf)

repository: bradyhouse/iit

gha_language: JavaScript

gha_license_id: MIT

repo_name: bradyhouse/iit


text:
# [svg-world-map](https://derhuerst.github.io/svg-world-map/)

**Render a world map with a pin at a specific location.** Fiddle with it on [the website](https://derhuerst.github.io/svg-world-map/).

![map with pin at Berlin](example/berlin.svg)

[![npm version](https://img.shields.io/npm/v/svg-world-map.svg)](https://www.npmjs.com/package/svg-world-map)
[![build status](https://img.shields.io/travis/derhuerst/svg-world-map.svg)](https://travis-ci.org/derhuerst/svg-world-map)
[![dependency status](https://img.shields.io/david/derhuerst/svg-world-map.svg)](https://david-dm.org/derhuerst/svg-world-map)
[![dev dependency status](https://img.shields.io/david/dev/derhuerst/svg-world-map.svg)](https://david-dm.org/derhuerst/svg-world-map#info=devDependencies)
![ISC-licensed](https://img.shields.io/github/license/derhuerst/svg-world-map.svg)
[![chat on gitter](https://badges.gitter.im/derhuerst.svg)](https://gitter.im/derhuerst)
[![support me on Patreon](https://img.shields.io/badge/support%20me-on%20patreon-fa7664.svg)](https://patreon.com/derhuerst)

`svg-world-map` returns a [virtual-dom](https://github.com/Matt-Esch/virtual-dom#dom-model) `<svg>` node. You can either stringify it into a file or embed it into your Frontend stack.

Note that because shapes of all countries are quite a lot of data, this module weighs **roughly `43k`** when [browserified](http://browserify.org), [minified](https://github.com/mishoo/UglifyJS2#uglifyjs-2) and gzipped.

The data is from [world.geo.json](https://github.com/johan/world.geo.json).

## Installing

```shell
npm install svg-world-map
```

## Usage

```js
const map = require('svg-world-map')
const stringify = require('virtual-dom-stringify')

const myMap = map(81.8, 28.4) // Nepal

process.stdout.write(stringify(myMap))
```

## API

```
map(longitude, latitude, [opt])
```

`opt` is optional and has the following default values:

```js
const defaults = {
	ocean: '#8df', // color of the ocean
	land: 'white', // color of the land
	mapWidth: 500, // width of the `<svg>`
	pin, // virtual dom node with the pin
	pinHeight: 8 // relative to map viewBox
}
```

## See also

- [`svg-patterns`](https://github.com/derhuerst/svg-patterns) – Create SVG patterns programmatically to visualize data.
- [`svg-radar-chart`](https://github.com/derhuerst/svg-radar-chart) – A reusable radar chart in SVG.

## Contributing

`npm test` is a regression test: It compares the generated output, to a `example/berlin.svg`, which has been manually checked by me. If you introduce a change that changes the output, *check it manually* and commit it as `example/berlin.svg`.

If you **have a question**, **found a bug** or want to **propose a feature**, have a look at [the issues page](https://github.com/derhuerst/svg-world-map/issues).

license: ISC

repository: vitaly-z/svg-world-map

repo_name: vitaly-z/svg-world-map


text:
# Main

## Ansible

### Config file

In the root directory, exists [`ansible.cfg`](http://docs.ansible.com/ansible/intro_configuration.html) which customizes ansible to use directly the contents of the repo without any further customization.

#### Inventory

The config file sets the ansible [inventory](http://docs.ansible.com/ansible/intro_inventory.html) to be `hosts` located in the root directory.

#### SSH

By default, ansible will use the SSH key under `ssh/id_rsa` for authentication during deployment.

## Deployment variables

Te main most variables already setup within the repo. If it is required, they could be overloaded using regular ansible [variable precedence](http://docs.ansible.com/ansible/playbooks_variables.html#variable-precedence-where-should-i-put-a-variable) rules. Password and similar kind of information is not hardcoded within the repo, but placed within a `secret.yml` which git is configured to ignore. To find out what needs to be configured, search for `secret.sample` within the repo, which will detail the variables that need to be configured before deployment; copy the file in the same directory as `secret.yml` and fill in the values appropriately.

## Deploying with Ansible

```
> ansible-playbook radia.yml
```

repository: radiasoft/ansible-conf

repo_name: radiasoft/ansible-conf


text:
# nsxt_lb_icmp_monitor

[back](../nsxt.md)

### Index

- [Example Usage](#example-usage)
- [Variables](#variables)
- [Resource](#resource)
- [Outputs](#outputs)

### Terraform

```terraform
terraform {
  required_providers {
    nsxt = ">= 3.1.1"
  }
}
```

[top](#index)

### Example Usage

```terraform
module "nsxt_lb_icmp_monitor" {
  source = "./modules/nsxt/r/nsxt_lb_icmp_monitor"

  # data_length - (optional) is a type of number
  data_length = null
  # description - (optional) is a type of string
  description = null
  # display_name - (optional) is a type of string
  display_name = null
  # fall_count - (optional) is a type of number
  fall_count = null
  # interval - (optional) is a type of number
  interval = null
  # monitor_port - (optional) is a type of string
  monitor_port = null
  # rise_count - (optional) is a type of number
  rise_count = null
  # timeout - (optional) is a type of number
  timeout = null

  tag = [{
    scope = null
    tag   = null
  }]
}
```

[top](#index)

### Variables

```terraform
variable "data_length" {
  description = "(optional) - The data size (in bytes) of the ICMP healthcheck packet"
  type        = number
  default     = null
}

variable "description" {
  description = "(optional) - Description of this resource"
  type        = string
  default     = null
}

variable "display_name" {
  description = "(optional) - The display name of this resource. Defaults to ID if not set"
  type        = string
  default     = null
}

variable "fall_count" {
  description = "(optional) - Number of consecutive checks that must fail before marking it down"
  type        = number
  default     = null
}

variable "interval" {
  description = "(optional) - The frequency at which the system issues the monitor check (in seconds)"
  type        = number
  default     = null
}

variable "monitor_port" {
  description = "(optional) - If the monitor port is specified, it would override pool member port setting for healthcheck. A port range is not supported"
  type        = string
  default     = null
}

variable "rise_count" {
  description = "(optional) - Number of consecutive checks that must pass before marking it up"
  type        = number
  default     = null
}

variable "timeout" {
  description = "(optional) - Number of seconds the target has to respond to the monitor request"
  type        = number
  default     = null
}

variable "tag" {
  description = "nested block: NestingSet, min items: 0, max items: 0"
  type = set(object(
    {
      scope = string
      tag   = string
    }
  ))
  default = []
}
```

[top](#index)

### Resource

```terraform
resource "nsxt_lb_icmp_monitor" "this" {
  # data_length - (optional) is a type of number
  data_length = var.data_length
  # description - (optional) is a type of string
  description = var.description
  # display_name - (optional) is a type of string
  display_name = var.display_name
  # fall_count - (optional) is a type of number
  fall_count = var.fall_count
  # interval - (optional) is a type of number
  interval = var.interval
  # monitor_port - (optional) is a type of string
  monitor_port = var.monitor_port
  # rise_count - (optional) is a type of number
  rise_count = var.rise_count
  # timeout - (optional) is a type of number
  timeout = var.timeout

  dynamic "tag" {
    for_each = var.tag
    content {
      # scope - (optional) is a type of string
      scope = tag.value["scope"]
      # tag - (optional) is a type of string
      tag = tag.value["tag"]
    }
  }

}
```

[top](#index)

### Outputs

```terraform
output "display_name" {
  description = "returns a string"
  value       = nsxt_lb_icmp_monitor.this.display_name
}

output "id" {
  description = "returns a string"
  value       = nsxt_lb_icmp_monitor.this.id
}

output "revision" {
  description = "returns a number"
  value       = nsxt_lb_icmp_monitor.this.revision
}

output "this" {
  value = nsxt_lb_icmp_monitor.this
}
```

[top](#index)

repository: chadwickalex/tfwriter

branch_name: refs/heads/main

repo_name: chadwickalex/tfwriter


text:
# Wayward Pines Zoo: Animal Database
#### Angular JS Exercise for Epicodus | 2017.08.18

By Max Scher

For a live view of the deployed application: Click Here.

## Description
This application allows the staff at Wayward Pines Zoo keep track of all of their animals, cataloging, editing, and filtering all pertinent information for each relevant to the residents of the zoo.

![Homepage](/src/assets/homepage.png)

View Screenshots

  Filer by Age:

  Add Animal:

## Planning
  1. Configuration/Dependencies
    * You will need the following things properly installed on your computer.
      * [Git](https://git-scm.com/)
      * [Node.js](https://nodejs.org/) (with NPM)
      * [Angular.js](https://angular.io/)
      * [Typescript](https://www.typescriptlang.org/)
      * [Bower](https://bower.io/)
      * [Angular CLI](https://github.com/angular/angular-cli)

  2. Specifications
    * It can list all animals currently admitted at the zoo.
    * It can filter the list by age (old or young).
    * It can allow users to add a newly-admitted animal to the app, along with the new animal's species, name, age, diet, zoo location, number of needed caretakers, sex, one like and one dislike.
    * It can allow users to edit an animal's name, age, or caretakers.

  3. Architectural/Component Outline
    * Main Page
      * Add-Animal Component
        * Conditional statement displaying an 'Add' button or Animal-Submission Form
      * List-Animal Component
        * Drop-Down Menu to Filter By Age: All, Young, or Old.
        * Loop/List through Each Animal, containing Edit-Animal component, which will display 'Edit' button next to each animal.

  4. UX/UI
    * Bootstrap Styling

  5. Polish
    * Look for opportunities to refactor/DRY-up code
    * Delete any unused templates/components
    * Flesh-out rest of README

## Setup/Installation
In Terminal, type:
  * `git clone https://github.com/maxobaxo/js-zoo-db`
  * `cd js-zoo-db`
  * `npm install`
  * `bower install`
  * `ng serve`

In Browser, type:
  * `Visit the app at http://localhost:4200`

## Desired Functionality to Add in the Future
  * Filter Animals by Species and/or Location
  * Edit additional attributes of each animal

## Known Bugs
  * Adding a new Animal with empty form fields will create an instance of the Animal class whose attributes' values are empty strings.

## Technologies Used
  Git, HTML, CSS, JavaScript, Angular, Angular-CLI, Node & NPM, Bower, Bootstrap

## License information
  This web application is free to use under the MIT License.
  ©
  Max Scher 2017

repository: maxobaxo/js-zoo-db

repo_name: maxobaxo/js-zoo-db


text:
## CARRY tests

This directory contains test for the `v2x_to_model.py` and `v2x_to_pb_type` tools.
Those tests should check the following features:

## Blackbox detection

 - [ ] model of the leaf pb\_type is generated
 - [ ] leaf pb\_type xml is generated
 - [ ] all dependency models and pb\_types are included in the output files

## Combinational connections

 - [ ] automatic inference of combinational connections between input and output ports

## Carry chain inference

 - [ ] carry chains inference - carry chains defined on wires with `carry` attribute should be propagated to pb\_type xml file

## Timings

 - [ ] all the timings defined in Verilog should be propagated to result pb\_type file

repository: tmichalak/symbiflow-arch-defs

gha_license_id: ISC

repo_name: tmichalak/symbiflow-arch-defs


text:
# Contributing

If you wish to contribute a feature or bug fix, please open an issue first. From the issue it will be decided if said feature should be implemented or if the bug can be verified and reproduced. This way you can avoid submiting code for a feature just to have it rejected because the feature isn't wanted. After it is decided the bug fix/feature should be added, make the code changes required and submit a pull request refferencing the issue.

Having proper test cases for your pull request in test/check.pl would be appreciated.

If a new CLI flag is added or some other change that effects user interaction, please update the man page (`sm.1`) and the README.

repository: Robiathin/script-manager

repo_name: Robiathin/script-manager


text:
---
layout: post
title: "Well-Rounded Developers"
date: 2012-11-17 19:32
comments: true
categories:
 - Effective Teamwork
 - Job Satisfaction
 - Self-Improvement
---

I had the opportunity this week to talk with some terrific Computer Science
students nearing graduation and who were beginning to look for employment. It
provided me the chance to put into words the amazing culture and environment
that exists at my workplace. The software development team at [Extend
Health](https://www.extendhealth.com/) is second to none in both talent and
passion for creating clean, modular code that is maintainable because of its
extensibility. Everyone on the team contributes and has a trusted voice. It
truly is an environment I've never seen before and am certainly proud to be
apart of.

One of the main things that hit me while talking to these graduating students
was how well-rounded our developers have come. No, I'm not talking about the
amount of soda and treats we consume. I'm referring to the varying skills each
one of us have developed. From front-end to back-end or web sites to desktop
apps, every single member of the team is capable of jumping into any of our
codebases and tackling new features or bugs with a excellent degree of
competentcy. I find this fascinating because it is not the norm at many medium
to large size companies. It is typical for a developer to be hired to a
position or team where he or she works on a single project and codebase for a
few years until they get bored enough to change positions within the company or
go somewhere else completely. This has not been the case for all of the
developers at Extend Health.

We are currently divided into four teams of about four or five devs each. While
each team may have past experience with a certain project or codebase, they are
not automatically the chosen team to work on it again the next time. Because of
this, there is shared knowledge across teams and team members, instead of all
the knowledge residing in only one person's head. This avoids the "what if
someone gets hit by a bus" problem [my coworker Ryan just blogged
about](http://rhauert.wordpress.com/2012/11/17/the-bus-factor/). The other side
effect is that our developers have all become well-rounded in varying languages
and platforms, solving both front-end and back-end problems. Contrast this with
how I used to classify my dev skill set four or five years ago before working
at Extend Health. I used to consider myself a back-end systems developer,
feeling it was important to have specialization in order to differentiate myself
and provide a chance to develop focused and in-depth experience. I also fooled
myself into thinking that I preferred this designation because web development
was trivial and only the hardest and most worthwhile problems were in the
back-end systems. Instead, I merely lacked some meaningful experience with
front-end web development, which is harder to come by in the typical work
enivronment I described above. However in my current employment, I've become a
much more well-rounded software developer.

I'm not entirely positive if our environment and team dynamic were
intentionally setup to ensure we were all well-rounded developers (though every
other good aspect of our dev culture seems to have been carefully pieced
together by [Corey](http://coreykaylor.com/)). Regardless, I am appreciatevly
taking note of the advantageous results of such a configuration. This is one
very important aspect of true job satisfaction and also in avoiding high
turnover and attrition in workforce.

extension: markdown

gha_language: HTML


text:
# Overview

At a client meeting on 2019-07-19, DEP expressed interest in obtaining Department of Transportation (DOT) permits, which allow noise from certain road-related activity.

The current process for obtaining this information is as follows:
1. Go to https://nycstreets.net/public/permit/search
2. Change the parameters for the search in the right sidebar.
3. Search and select a green polygon overlaid on a street block.
4. Click Details to see information about the permit (example: https://nycstreets.net/Public/Permit/Details/M012019193A39)
5. Click Permits PDF to see the permit PDF (https://nycstreets.net/Public/Document/ViewPermitPDF/?id=M012019193A39)
6. Manually parse the PDF for the information desired (including the dates for work)

This tool is not actually a scraper; it's a short instruction on how to obtain this data for a CSV report

# How to Use
The DOT has an API (https://nycstreets.net/Public/Permit/SearchPermits/) that returns a JSON object with permit information for the query parameters provided.

There is an alternative endpoint (https://nycstreets.net/Public/Permit/SearchPermits/) that returns a CSV-formatted text with the permit information.

Searches on the website are limited to the current search radius. The API request query parameters can be manipulated to return all permits for a given period of time.

You can modify the permit issue date range with the *PermitIssueDateFrom* and *PermitIssueDateTo* parameters.

Parameters are HTML encoded with the date format `MM DD YYYY`. For example, to search from July 1, 2019, use: `07%2F01%2F2019`.

You can hit the resulting endpoint in your web browser. Running three weeks of data took about 9 minutes in my testing. The resulting can be saved to CSV.

Sample URL for two days in July (7/17-7/19):
https://nycstreets.net/Public/Permit/SearchPermitsCSV/?PermitIssueDateFrom=07%2F17%2F2019&PermitIssueDateTo=07%2F19%2F2019&page=1&rows=100&sidx=PermitIssueDateFrom&sord=desc&LocationSearchType=5

# Output
Sample output for 7/1/19 to 7/19/19 is uploaded as output_20190701_20190719.csv.

repository: sunghoonyang/noise-capstone

gha_language: Jupyter Notebook

repo_name: sunghoonyang/noise-capstone


text:
# Bjax

Bjax allows for asynchronous Javascript to trigger jobs to run off of the main Rails application with updates being sent back to the client. The job queue utilizes Workling and Starling, falling back on BackgroundJob if those services are not available. It uses Juggernaut to inform the client of any status updates and return values from the job, falling back on Ajax polling if the service is unavailable.

Please note that this is alpha software! It is currently stable, functional, and in use in production at http://bleacherreport.com in our blog importing wizard. However, the implementation of it is not very pretty... another quick and dirty hack job with an emphasis on the results it has brought!

## Why Bjax?

Bjax allows you to move time or processor intensive tasks off of your Rails application while alerting the client of any status updates and information to be returned. Combining Bjax with clusters of Workling, Starling, and Juggernaut servers allows your Rails application to scale, regardless of what kinds of heavy-duty lifting your Rails application is doing, from image manipulation, to video processing, RSS feed importing, scraping of 3rd-party web sites, or whatever other tasks you can think up that would normally seem insane from a user experience and deployment standpoint.

## Installing Bjax

Get started with Bjax by installing the plugin:

    script/plugin install git://github.com/williamcotton/bjax.git

## Additional Requirements

Bjax is currently designed around Workling, Starling, Juggernaut, and BackgroundJob.

### Workling and Starling

While [Workling](http://github.com/purzelrakete/workling/tree/master) and [Starling](http://github.com/starling/starling/tree/master) are not required and it will degrade to work with BackgroundJob, it is very much recommended. Please install the Workling plugin and browse the README for further instructions related to setting up Starling.

	script/plugin install git://github.com/purzelrakete/workling.git

There is a very good introduction to both of these technologies in the [Workling and Starling Railscast](http://railscasts.com/episodes/128-starling-and-workling).

### BackgroundJob

[BackgroundJob](http://codeforpeople.rubyforge.org/svn/bj/trunk/README) is required, although it is not the default job queue. It is used for redundancy.

    ./script/plugin install http://codeforpeople.rubyforge.org/svn/rails/plugins/bj
    ./script/bj setup

### Juggernaut

[Juggernaut](http://juggernaut.rubyforge.org/) is not required, but it is highly recommended for push notifications. If it is not installed, Bjax will fall back on Ajax polling.

	script/plugin install http://juggernaut.rubyforge.org/svn/trunk/juggernaut

### Prototype

Currently, Bjax is based on the [Prototype](http://www.prototypejs.org/) Javascript library.

## Using Bjax

### View Code

	<%= juggernaut(:channels => ["bjax_" + @current_user.id.to_s]) %>

	<script type="text/javascript">

		getItems = function(page_id) {
			var attributes = {};
			attributes.page_id = page_id;

			new Bjax.Request("/some_controller/get_items", {
				parameters: attributes,
				onSuccess: function(results) { getItemResults(results) },
				onStatusUpdate: function(message) { getItemStatusUpdate(message) }
			});
		}

		getItemResults = function(results) {
			if (results.status) {
				items.each(function(item) {
					alert(item);
				});
			}
		}

		getItemStatusUpdate = function(message) {
			alert(message);
		}

	</script>

### Controller Code

	def get_items
	  respond_to do |format|
	    format.bjax {

	      juggernaut_channel = "bjax_" + @current_user.id.to_s
	      bj = Bjax.new(:juggernaut_channel => juggernaut_channel, :params => params) do

	        render :bjax_status_update => "Getting Page"
	        page = Page.find(params["page_id"])

	        render :bjax_status_update => "Computing Items"
	        page.compute_items

	        render :bjax_status_update => "Updating Client"

	        if page.items_computed?
	          status = true
	        else
	          status = false
	        end

	        render :bjax => { :status => status, :items => page.items }
	      end

	      render :json => bj.id
	    }
	  end
	end

### routes.rb

	map.connect "/bjax_job_polling/:action/:id", :controller => 'bjax_job_polling'

### Seriously!?

Yes! That's it. As long as you have Juggernaut, Starling, Workling, and BackgroundJob properly configured and running, Bjax handles the rest.

That code block is passed off to the Worklings regardless of where they are... in most deployment situations the code will likely be run on a completely different slice. It does this by using a serialized Proc.

### Usage Notes!

Bjax currently has issues with using "render :bjax" more than once in a code block. I recommend that the last line of the code block contains the "render :bjax" method call.

You cannot create the code block as a proc or lambda and use that to call Bjax.new. You MUST pass code as a block during the creation of a Bjax instance.

In order for Bjax to fall back on polling, you MUST return the id of the Bjax instance, ie, render :json => bj.id

## Serialized Procs?

I **REALLY** like the idea of serialized Procs. While RPC, SOAP, and other service oriented architectures are nice, they don't allow trusted resources to integrate is such a seamless way. Also, possibilities are limited to the APIs that each site offer up. With serialized Procs, code written in one environment could be executed in another environment, be it another process, or another server, with no limitations on what could be done, other than the scope it is run in.

## Future Development Ideas

Perhaps some documentation? :)

The library needs to be better organized with proper namespacing and separation of code.

Better integration and support for other background job processors, message queues, and Comet-style persistent client connections. (I'm looking at you, XMPP-BOSH and XMPP-SEP)

Support for additional Javascript libraries.

Make the serialized Proc code way more robust.

---

Copyright (c) 2008 William Cotton, released under the MIT license


text:
---
title: Man vs. Man Problem
author: ajordens
layout: post
permalink: /2005/07/man-vs-man-problem/
categories:
  - General Discussions
---
I just started reading David Cowan and have so far found him to be an interesting read. David’s a VC with [Bessemer Venture Partners][1].

I see that Bessemer has invested in Affymax, a drug discovery firm utilizing peptide-based biochemistry. I wonder what they’re using to manage workflow and data in the lab. [We’ve][2] been talking to a lot of biotech and pharma groups lately and they all seem to share a common data analysis and workflow need.

In this [article][3], David talks about how the security industry will always need a healthy injection of startup-style innovation. In another post, he provides an overview of different security myths and explains how security mechanisms based on user education and multi-factor authorization will not work in the long-term.

I particularily like his test at the movie theatre… would you have been phished?

*So I said: watch this. I stood by the front door, waited for a lull in traffic, and then nonchalantly proferred my hand toward the next approaching bevy of teenagers. “Tickets” I murmured.

Once the first victim handed me his ticket, the rest were cake. Tickets accumulated in my hand as my victims jabbered on about football games and SAT prep. I collected half a dozen and stopped. A good 5 minutes passed before they wafted over to the hallway, encountering another ticket stand (by then I could have sold the tickets to folks standing in line). Another 2 minutes passed as they tried to figure out which of them had the tickets! As it dawned on them that they had been phished, I returned their assets (and thankfully they didn’t kick mine).

Look forward to reading more David.

 [1]: http://www.bvp.com/
 [2]: http://www.genologics.com
 [3]: http://feeds.feedburner.com/WhoHasTimeForThis?m=2


text:
# Lab network setup

My current lab network used in trainings is very small.

I can bring this along and easily get a private - owned by me, sniffable, configurable, breakable network running.

## Hardware

I currently, 2019 use:
* Main router PC-Engines APU2C4 (APU2D4 model was updated by them)
* UniFi UAP Pro 2.4GHz and 5GHz AP
* "Core switch" TP-Link T1500G-10PS - PoE for the AP
* Smaller switch for students TP-Link T1500G-8T powered by PoE

Usually the uplink is Ethernet from the site I am visiting, but I also bring a small TP-Link TL-MR3020 running as Wifi client for wireless uplink when there is no cable.

Core net:
![TP-Link T1500G-10PS](TP-link-T1500G-10PS.jpg)

Distribution switch for students - can be moved easily since only one cable goes in:
![TP-Link T1500G-8T](TP-link-T1500G-8T.jpg)

## Software

Switches run the TP-Link firmware, which never really gets updated, only does SSLv3 and TLS1.0 etc. So this is not an endorsement of TP-Link - they are cheap and light.

UniFi APs have their stock firmware from UBNT.com, updated by the controller software running on my laptop once in a while.

APU2C4 runs OpenBSD from [OpenBSD.org](http://www.openbsd.org). This includes:
* OpenBSD PF firewall and NAT
* Unbound recursive name server
* built-in DHCPD

repository: kramse/kramse-labs

repo_name: kramse/kramse-labs


text:
---
title: Extract form field values in a Power Automate flow
description: Send e-mail notification to the form submitter in a Microsoft Power Automate workflow
solution: Experience Manager, Experience Manager Forms
type: Documentation
role: Developer
level: Beginner, Intermediate
version: Cloud Service
feature: Adaptive Forms
topic: Development
kt: 10828
exl-id: 6e9b91a0-327f-4af1-8308-c938fc9a13b9
---
# Extract form field values in Power Automate flow

Send e-mail notification to an adaptive form submitter with Microsoft Power Automate by extracting field values from the form submission.

>[!VIDEO](https://video.tv.adobe.com/v/345957?quality=12&learn=on)

gha_language: SCSS


text:
---
layout: default
---

# 1996-07-26 - Re: Twenty Bank Robbers -- Game theory:)

## Header Data

From: Frank Willoughby<EMAIL_ADDRESS>To<EMAIL_ADDRESS>Message Hash: 6a9e9508a3630eeeb3c9921e50eba1e96b6fdd4ff0f7a29f9d8ed44cdfbdb442

Message ID<EMAIL_ADDRESS>Reply To: _N/A_

UTC Datetime: 1996-07-26 15:59:58 UTC

Raw Date: Fri, 26 Jul 1996 23:59:58 +0800

## Raw message

```
{% raw  %}From: Frank Willoughby<EMAIL_ADDRESS>Date: Fri, 26 Jul 1996 23:59:58 +0800
To<EMAIL_ADDRESS>Subject: Re: Twenty Bank Robbers -- Game theory:)
Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

>> Twenty cypherpunks robbed a bank. They took 20 million bucks. Here's
>> how they plan to split the money: they stay in line, and the first guy
>> suggests how to split the money. Then they vote on his suggestion. If
>> 50% or more vote for his proposal, his suggestion is adopted.
>> Otherwise they kill the  first robber and now it is the turn of guy #2
>> to make another splitting proposal. Same voting rules apply.

Perhaps I'm missing something, but it seems to me that first person in
line (#1) would say propose that the first 11 people in line each receive
a split of 1/11 of the 20 million and that since this doesn't come out
exactly even, that he (#1) would make up the few cents difference out of
his share (a small price to pay to keep alive).

This would probably get the votes of the first 11 people.
Results:
o First 11 people split the money (last 9 get zip)
o All live.

Best Regards,

Frank
Any sufficiently advanced bug is indistinguishable from a feature.
	-- Rich Kulawiec

<standard disclaimer>
The opinions expressed above are of the author and may not
necessarily be representative of Fortified Networks Inc.

Fortified Networks Inc. - Information Security Consulting
http://www.fortified.com     Phone:<PHONE_NUMBER>     FAX:<PHONE_NUMBER>
Home of the Free Internet Firewall Evaluation Checklist

{% endraw %}
```

## Thread

+ Return to [July 1996](/archive/1996/07)

+ Return to "[Frank Willoughby <frankw@in.net>](/authors/frank_willoughby_frankw_at_in_net_)"

+ 1996-07-26 (Fri, 26 Jul 1996 23:59:58 +0800) - Re: Twenty Bank Robbers -- Game theory:) - _Frank Willoughby<EMAIL_ADDRESS>


text:
---
layout: page
title: "Knowledge"
description: "And the thirst for it"
header-img: "img/red_bridge.jpg"
order: 3
---

[Jekyll]: http://jekyllrb.com/ "Jekyll"
[Jekyll version]: https://github.com/IronSummitMedia/startbootstrap-clean-blog-jekyll "Github: startbootstrap-clean-blog-jekyll"
[Clean Blog]: http://startbootstrap.com/template-overviews/clean-blog/ "startbootstrap.com"
[Github Pages]: https://pages.github.com/ "pages.github.com"

<style>
  .reverse {
    unicode-bidi: bidi-override;
    direction: rtl;
  }
  .atsign::before {
    content: "\0040";    /* Unicode character for @ symbol */
  }
</style>

I thought I would share a select list of reading recommendations. My interests lie at some weird intersection of
economics, politics, and sports, so perhaps such a list would be rare to come by. Like much of the rest of this site,
this list also serves a dual purpose of existing for my personal reference. I didn't want to maintain links, but Google
will serve you well for finding these.

---

## Sports Analytics

There's no harm in leading with the most entertaining category. Silver's book in particular might be the best introductory example I
have of how to blend concepts with data to approach questions that are new to you, as well as how to communicate the
results to a general audience.

| Title                                                                          | Author                                                 | Type  |
|--------------------------------------------------------------------------------|--------------------------------------------------------|-------|
| The Signal and the Noise                                                       | Nate Silver                                            | Book  |
| Scorecasting                                                                   | Tobias J. Moskowitz and L. Jon Wertheim                | Book  |
| Basketball on Paper                                                            | Dean Oliver                                            | Book  |
| Stumbling on Wins                                                              | David J. Berri and Martin B. Schmidt                   | Book  |
| Optimal Drafting in Hockey Pools                                               | Amy E. Summers, Tim B. Swartz, and Richard A. Lockhart | Paper |
| Estimating Player Contribution in Hockey with Regularized Logistic Regresssion | Robert B. Gramacy, Shane T. Jensen, and Matt Taddy     | Paper |

## Political Science, Political Economy, and Development Economics

This is an area that I find very motivating. These authors tackle big quesions, and they do so through careful thought
and quantitative analysis. There are many other great authors and pieces on how we ended up with our world and how we
could make it better, but these are some of my favourites. Reading Scott changed my way of thinking about organized
government.

| Title                                                                  | Author                                              | Type  |
|------------------------------------------------------------------------|-----------------------------------------------------|-------|
| Seeing like a State                                                    | James C. Scott                                      | Book  |
| Poor Economics                                                         | Abhijit V. Banerjee and Esther Duflo                | Book  |
| Empire of Cotton: A Global History                                     | Sven Beckert                                        | Book  |
| The Party: The Secret World of China's Communist Leaders               | Richard McGregor                                    | Book  |
| Why Nations Fail                                                       | Daron Acemoglu and James A. Robinson                | Book  |
| A Randomized Experimental Study of Censorship in China                 | Gary King, Jennifer Pan, and Margaret E. Roberts    | Paper |
| The Economic Costs of Organized Crime: Evidence from Southern Italy    | Paolo Pinotti                                       | Paper |
| Long-run Consequences of Labor Coercion: Evidence from Russian Serfdom | Johannes C. Buggle, and Steven Nafziger             | Paper |
| The Impact of Jury Race in Criminal Trials                             | Shamena Anwar, Patrick Bayer, and Randi Hjalmarsson | Paper |

## Industry Studies

Sometimes we look exclusively at aggregates, to our own loss. Digging into specific situations can reveal a lot of
truth. These papers are all great reads.

| Title                                                           | Author                                                   | Type  |
|-----------------------------------------------------------------|----------------------------------------------------------|-------|
| Buffett's Alpha                                                 | Andrea Frazzini, David Kabiller, and Lasse Heje Pedersen | Paper |
| Citigroup: A Case Study in Managerial and Regulatory Failures   | Arthur E. Wilmarth Jr                                    | Paper |
| Structural Corporate Degradation due to too-big-to-fail Finance | Mark J. Roe                                              | Paper |

## Machine Learning and Model Building

There are many other great references along these lines, but there is something in all of these that I don't want to
forget about.

| Title                                                                                | Author                                             | Type  |
|-----------------------------------------------------------------------------------------|----------------------------------------------------|-------|
| Machine Learning                                                                        | Thomas Mitchell                                    | Book  |
| Deep Learning with Python                                                               | François Chollet                                   | Book  |
| Deep Learning                                                                           | Ian Goodfellow, Yoshua Bengio, and Aaron Courville | Book  |
| Giraffe: Using Deep Reinforcement Learning to Play Chess                                | Matthew Lai                                        | Paper |
| Estimation and Accuracy after Model Selection                                           | Bradley Efron                                      | Paper |
| Local Versus Global Models for Classification Problems: Fitting Models Where it Matters | David J. Hand and Veronica Vinciotti               | Paper |
| Variable Selection in Data Mining: Building a Predictive Model for Bankruptcy           | Dean P. Foster and Robert A. Stine                 | Paper |
| Greedy Function Approximation: A Gradient Boosting Machine                              | Jerome H. Friedman                                 | Paper |
| P values: What they and what they are not                                               | Mark J. Schervish                                  | Paper |
| A Survey of Cross-Validation Procedures for Model Selection                             | Sylvan Arlot                                       | Paper |

## Economic Methods

Last, but close to my heart, here's where I reveal the inner econ nerd. Lucas' paper, so influential that it is known broadly
as the "Lucas critique", was an impassioned and well thought out call to arms for the field. Similarly, but far less
well known, Lehtinen and Kuorikoski's paper struck a cord with me and tackled some questions that I thought only I was
asking.

| Title                                                                                | Author                                               | Type  |
|---------------------------------------------------------------------------------------------------------|------------------------------------------------------|-------|
| Time Series Analysis Forecasting and Controls                                                           | Box & Jenkins                                        | Book  |
| Think Bayes: Bayesian Statistics Made Simple                                                            | Allen B. Downey                                      | Book  |
| The Likelihood Principle                                                                                | James O. Berger, and Robert L. Wolpert               | Book  |
| Econometric Policy Evaluation: A Critique                                                               | Robert Lucas                                         | Paper |
| Computing the Perfect Model: Why do Economists Shun Simulation?                                         | Aki Lehtinen and Jaakko Kuorikoski                   | Paper |
| Why Economists Should Consider Field Experiments and 14 Tips for Pulling them Off                       | John A. List                                         | Paper |
| What are we Weighting for?                                                                              | Gary Solon, Steven J. Haider, and Jeffrey Wooldridge | Paper |
| Introduction to Social Network Theory                                                                   | Charles Kadushin                                     | Paper |
| Measuring the Macroeconomic Impact of Monetary Policy at the Zero Lower Bound                           | Jing Cynthia Wu and Fan Dora Xia                     | Paper |
| Bootstrap Confidence Intervals                                                                          | Thomas J. DiCiccio, and Bradley Efron                | Paper |
| Bootstrap Methods for Standard Errors, Confidence Intervals, and Other Measures of Statistical Accuracy | Bradley Efron and R. Tibshirani                      | Paper |
| Spurious Regressions in Econometrics                                                                    | C.W.J. Granger and P. Newbold                        | Paper |
| Testing for Unit Roots and Cointegration                                                                | Bo Sjö                                               | Paper |

gha_language: CSS


text:
# TalkEasy

> Development env will not work as we have deleted the Firebase project and Cloud translation projects. However, the deployed demo will still work at [https://talk-easy.vercel.app](https://talk-easy.vercel.app)

> To run it locally, follow the instructions in the *Development* section

### Watch the demo

[![TalkEasy Demo](https://img.youtube.com/vi/AiFNjv_QTgI/0.jpg)](https://www.youtube.com/watch?v=AiFNjv_QTgI)

### Try it yourself
[https://talk-easy.vercel.app](https://talk-easy.vercel.app)

### Why?
People face language barriers when it comes to the conference meetings around the globe. TalkEasy allows them to communicate in their own languages.

Currently in the market, there are a few apps like Zoom and Skype that do allow translation. Zoom allows translation in the mode of a physical translator joining the users meeting. Skype shows translated subtitles in the language the user prefers but only for 11 langauges but it does not support speech synthesis on the receiver's end.

TalkEasy provides the following features -
- 70 languages with different accents including Indian languages
- Realtime subtitles just like you are watching a movie
- Users can speak in multi-languages in a call which gets translated too.
- After the speaker completes a sentence, the receiver receives the translated audio in the selected language.
- Once the meeting has ended, the user receives an option to download the entire meeting’s transcript in one of the languages that the meeting was in

## Development

You will need the following env variables in a file called `.env.local`

- We use Agora for WebRTC
- Firebase for Firestore, Auth, and Realtime Database

```
NEXT_PUBLIC_AGORA_APPID
NEXT_PUBLIC_AGORA_APPC

NEXT_AGORA_CUSTOMER_ID
NEXT_AGORA_CUSTOMER_SECRET

NEXT_PUBLIC_FIREBASE_API_KEY
NEXT_PUBLIC_FIERBASE_AUTH_DOMAIN
NEXT_PUBLIC_PROJECT_ID
NEXT_PUBLIC_STORAGE_BUCKET
NEXT_PUBLIC_MESSAGING_ID
NEXT_PUBLIC_APP_ID
NEXT_PUBLIC_FIREBASE_DB
NEXT_PUBLIC_CLIENT_LOCATION=http://localhost:3000
```

Add the `firebase-admin` service account config in the root directory in a file called `firebaseServiceAccount.json`

For realtime subtitles to work, you will need to create a service account on Google Cloud which has access to Cloud Translation API. Create a file called `service-account-key.json` in the root directory

Finally, run the development server:

```bash
npm run dev
# or
yarn dev
```

Open [http://localhost:3000](http://localhost:3000) with your browser to see the website.

## License

MIT

repository: burhanuday/talk-easy

repo_name: burhanuday/talk-easy


text:
# Tauri + Vanilla

This template should help get you started developing with Tauri in vanilla HTML, CSS and Javascript.

## Recommended IDE Setup

- [VS Code](https://code.visualstudio.com/) + [Tauri](https://marketplace.visualstudio.com/items?itemName=tauri-apps.tauri-vscode) + [rust-analyzer](https://marketplace.visualstudio.com/items?itemName=rust-lang.rust-analyzer)

repository: csyuxuan/Ctool

gha_language: Vue

repo_name: csyuxuan/Ctool


text:
# PyTutor

**A short program to walk a student through trying out CS for the first time using python**
___

## How to use PyTutor

It's really easy to get started on a Mac!

1. Click on the Green button that says "Clone or download"
	- Click "Download ZIP"
2. At the bottom of your browser window double click PyTutor-master....zip
3. Now open your Applications folder and go to the folder called "Utilities"
	- Open the app called Terminal
4. Once in Terminal, you'll be presented with a big white box where you can enter text and "talk" to the computer. The first thing you will tell it to do is to change to the folder where you downloaded PyTutor to.
	- To do this, just type `cd ~/Downloads/PyTutor-master` and you should be ready for the last step
5. The final step is to tell the computer to actually run PyTutor, you can do that by simply typing `python PyTutor.py` and then follow along with the instructions

repository: JCHamer/PyTutor

gha_language: Python

repo_name: JCHamer/PyTutor


text:
# K3s

## High Availability (HA)

An installation of K3s on at least 2 EC2 instances.

https://rancher.com/docs/k3s/latest/en/

Typically, a 2 node cluster will utilise an external database.


text:
Banking statistics
========================

= Pre-requisites =

- install bower under /usr/bin/bower

= Installation

- clone repo
- composer install
- app/console sp:bower:install
- app/console assets:install web --symlink
- app/console assetic:dump --force


text:
### --patch-module example

Developers that checkout `java.util.concurrent` classes from Doug Lea's CVS will be used to compiling the source files and deploying those classes with `-Xbootclasspath/p`.
`-Xbootclasspath/p` has been removed from Java, and its module replacement is the option `--patch-module` to override classes in a module. It can also be used to augment the contents of module.
The `--patch-module` option is also supported by `javac` to compile code "as if" part of the module.

See the contents of the respective sources contained in the `src` folder:

- module `java.base` in `mypatches` folder
- module `com.greetings` in `mods` folder
- module `java.base` in `src` folder

    ```
    $ cat src/java.base/java/util/concurrent/ConcurrentHashMap.java
    ```

- module `com.greetings` in `src` folder

    ```
    $ cat src/com.greetings/com/greetings/Main.java
    ```

Both the modules are compiled from the sources into the folders `mypatch` and `mods` respectively with the following command:

    $ javac --patch-module java.base=src \
        -d mypatches/java.base \
        src/java.base/java/util/concurrent/ConcurrentHashMap.java

    $ javac --module-path mods \
        -d mods/com.greetings/ \
        src/com.greetings/module-info.java \
        src/com.greetings/com/greetings/Main.java

And we run the example twice (with and without the patched code) with the following command:

    $ java --module-path mods \
        --module com.greetings/com.greetings.Main

    $ java --module-path mods \
        --patch-module java.base=mypatches/java.base \
        --module com.greetings/com.greetings.Main

See [../01_Greetings/README.md](../01_Greetings/README.md) to learn more about package and module naming conventions and how to avoid confusions between them.


text:
# B+

A game and 3D graphics framework for Julia, using OpenGL 4.6 + bindless textures.

Offers game math, a GL/windowing wrapper, a GLFW input wrapper, scene graph algorithms, and numerous other modules.

## Setup/Dependencies

After downloading the repo, run *scripts/setup.jl*. The directory or Julia project you run from doesn't matter.

The weirdest dependency is "[ModernGLbp](https://github.com/heyx3/ModernGL.jl)", my own fork of [ModernGL](https://github.com/JuliaGL/ModernGL.jl). It adds the necessary components for `ARB_bindless_texture`. It's added to this repo as a git submodule (and this is all handled within *setup.jl*).

## Tests

Unit tests follow Julia convention: kept in the *test* folder, and centralized in *test/runtests.jl*. A short-hand for correctly invoking this script is in *scripts/tests.jl*, so you can most easily run tests with `julia path/to/B-plus/test/tests.jl`.

I never liked how the official Julia Test package does not let you assign messages to tests, so my tests are implemented with my own macros: `@bp_check(condition, msg...)` for normal checks, and a special macro `@bp_test_no_allocations(expr, expected_value, msg...)` to test expressions that need to be completely static and type-stable (game math, scene graph operations, raycast math, etc). A slightly longer version of the last macro is offered in case you need to set up the test with some operations that may allocate: `@bp_test_no_allocations_setup(setup_expr, test_expr, expected_value, msg...)`.

The tests are divided into many individual files. There are also some sample test environments that aren't included in *test/* because they're not automated: *scripts/demo-cam3D.jl* and *scripts/demo-gui.jl* (which is not yet functional).

## Codebase

The code is organized into a number of modules, hierarchically. From lowest-level to highest:

````
---------------
|  Utilities  |
---------------
         |
         |
         |
  ----------------------
  |        Math        |
  ----------------------
    |            |     \
    |            |      \
    |            |       \
--------------- ------  -----------
|  SceneTree  | | GL |  |  Fields  |
--------------- ------  ------------
                / |  \
               /  |   \
              /   |    \
             /    |     \
-------------  -------  -----------
|  Helpers  |  | GUI |  |  Input  |
-------------  -------  -----------
````

Below is a quick overview. A thorough description will be written up elsewhere. You can also refer to the inline doc-strings, comments, and [sample projects](github.com/heyx3/BpExamples).

### Utilities

A dumping ground for all sorts of convenience functions and macros. Here are some of the most interesting ones:

* `PRNG`: An alternative to Julia's various `AbstractRNG`'s which is more suitable for aesthetic, short-term use-cases such as procedural generation (where you might spin up one PRNG for every pixel). An immutable version `ConstPRNG` is also provided, as mutable structs are almost always heap-allocated and therefore bad for tight loops.
* `@bp_check(condition, error_msg...)`, a run-time test that raises `error()` if the expression is false. Is **not** an assert; it always runs.
* `@bp_enum`: A wrapper around Julia's `@enum` that hides the enum values in a submodule, and also provides extra conveniences like parsing.
* `SerializedUnion{Union{...}}`: Can serialize *and deserialize* a union of values through StructTypes/JSON3. Use the macro `@SerializedUnion(T1, T2, ...)` as short-hand.
* `RandIterator{TIdx, TRng}`: Randomly and efficiently iterates through every value in some range `1:n`. Each value will appear exactly once.
* `UpTo{N, T}`: A type-stable, immutable (i.e. stack-allocated) container for up to N values of type T. Implements `AbstractVector{T}`.
* Some neat helper macros that allow you to individually configure each B+ sub=module into a "debug" or "release" mode, mainly to enable/disable asserts respectively. Heavily based on the "ToggleableAsserts" package. You can also set this up in your own project; refer to `@make_toggleable_asserts`
* A number of metaprogramming helpers in *macros.jl*

### Math

Typical game math stuff.

#### Functions

`lerp()`, `inv_lerp()`, `smoothstep()`, `smootherstep()`, `type[min|max]_finite()`, `solve_quadratic()`, `pad_i()`, `square()`.

#### Vec{N, T}

Vectors! Not to be confused with Julia's `Vector` which is a resizable array (much like C++'s `std::vector`). `Vec` can be allocated on the stack, but in Juli this also means they're immutable. So the only way you can "modify" them is to replace them with a copy. Julia's built-in "Setfield" package exists to make this sort of workflow easier.

Below is a lot of the basic info you'll need, but there are more details which you can check out in the file itself.

Numerous convenient aliases exist for `Vec`:
* `Vec2{T}` through `Vec4{T}` to hard-code the dimensionality
* `VecF{N}` (float32), `VecD{N}` (float64), `VecI{N}` (int32), `VecU{N}` (uint32), and `VecB{N}` (bool) to hard-code the component type
* `VecT{T, N}` flips the order of the type parameters, to more easily specify a component with unknown dimensionality
* Short-hand for specific type + size. For example: `v2f`, `v4i`, `v3b`
* Similar short-hand in terms of color. For example: `vRGBu8`, `vRGBAf`

Operations are implemented component-wise (`+`, `-`, `*`, `/`, `&`, `|`, `<`, `>`, `>=`, `<=`). The notable exception is equality and inequality (`==`, `!=`), which return a lone `Bool`.

The easiest way to constuct a Vec is by passing the elements: `Vec(x, y, ...)`. If you want to ensure they're casted to a particular value, specify at least the component type: `VecT{Float32}(-1, 2.5)`. You can also construct it like an ntuple, using a lambda and count: `Vec(i->i*2, 3)` (or `Vec(i->i*2, Val(3))` for compile-time-known constants). Finally, you can append vectors and individual values together with `vappend`: `vappend(Vec(1, 2), 3, Vec(4, 5, 6)) == Vec(1, 2, 3, 4, 5, 6)`.

The actual `Vec` struct has a `data` field which is a tuple of all the values. However, you can also swizzle the values however you want with `xyzw` and `rgba`: `v.x`, `v.xyx`, `v.xxxzw`, `v.rrra`, etc.

You can also use special swizzling characters; `1` to output 1 for that channel, `0` to output 0, `Δ` (\\delta) to output the maximum finite value for the vector's type, and `∇` (\\del) to ouptut the minimum finite value for the vector's type. For example, to set a color value's alpha to 1, you could use `v.rgbΔ` if it's `vRGBAu8`, or `v.rgb1` if it's `vRGBAf`.

An alternative swizzling syntax is with array indices: `v[2, 3, 1] == v.yzx`. However, note that passing a lone index results in a scalar, not a `Vec{1, F}`.

`Vec` implements `AbstractVector`, meaning you can index it and otherwise treat it like a 1D array. Most of the built-in Julia array operations are overloaded to return a `Vec` intead of an array. For example, you can do component-wise equality with `map(==, v1, v2)`.

Standard vector operations are prefixed with a v: `vlength`, `vcross`, `vdot`, `vdist`, etc. Additionally, the operator \\times (`×`) is defined to mean `vcross`, and \\cdot (`⋅`) is defined to mean `vdot`.

You can represent ranges of integer coordinates with Julia's standard colon syntax. For example, `collect(v2i(1, 2) : v2i(3, 3))` yields `[ v2i(1, 2), v2i(2, 2), v2i(3, 2), v2i(1, 3), v2i(2, 3), v2i(3, 3)]`.

Broadcasting does **not** currently have custom behavior; you can use it but you'll get a `Vector{T}` out of it rather than a `Vec{N, T}`.

#### Quaternion{F}

The best way to do 3D rotations. Most functions using quaternions are prefixed with `q_`: `q_apply` (to rotate a `Vec3`), `q_slerp`, `q_is_identity`, `q_axisangle`, etc. Refer to the doc-strings for each function, or the source file *quat.jl*.

Aliases exist for float32 and float64 quaternions: `fquat` and `dquat`, respectively.

#### Mat{C, R, F, Len}

A matrix. Really an alias for Julia's `StaticArrays.SMatrix`, a.k.a. an immutable stack-allocatable 2D array.

Unfortunately, due to Julia's syntax rules, the type parameters for `Mat` must include both the row and column count, and the total number of elements (row * column). For convenience, use the `@Mat(C, R, F)` macro which auto-inserts the element count.

Like `Vec`, there are many aliases for `Mat`:
* Hard-coded component types: `MatF{C, R, Len}` for float32 and `MatD{C, R, Len}` for float64
* Hard-coded dimensions: `Mat3{F}` for 3x3 and `Mat4{F}` for 4x4.
* Hard-coded everything: `fmat2x2`, `fmat4x3`, `dmat3`, etc.

Like `Vec` and `Quaternion`, matrix functions are prefixed with `m_`. `m_apply_point`, `m_apply_vector`, `m_combine`, `m_identity`.

Numerous functions exist for computing particular matrices: `m3_translate`, `m4_translate`, `m_scale`, `m3_rotate`, `m4_world`, `m4_look_at`, `m4_projection`, `m4_ortho`.

#### Ray{N, F}

A N-dimensional ray using components of type F. `ray_at(r, t)` gets a position along the ray. `closest_point(r, p)` gets the closest point on a ray (pass `min_t=-Inf` to solve it for a line instead of a ray).

For raycasting, see **Shapes** below.

#### Noise

`perlin(f::Union{Number Vec})` implements any N-dimensional perlin noise. See the optional arguments for ways to customize it (such as making values wrap around a boundary).

Other noise functions are still to be implemented.

#### Contiguous{T}

An alias for a wide variety of storage of a sequence of `T` that is contiguous in memory. For example, `NTuple{4, v3f}` is a `Contiguous{Float32}`, and also a `Contiguous{Vec{3, Float32}}`.

This is useful for interop; for example, you can upload any `Contiguous` data to a texture's pixels.

Unfortunately, due to Julia language limitations, the contiguous data can only be nested to a certain depth (because each possible nesting has to be listed explicitly). Currently it can be nested 4 layers deep, which should be plenty.

`contiguous_length(c, T)` gets the number of elements.  For example, the contiguous length of an `NTuple{4, v3f}`, for type `Float32`, is 12. While the contiguous length of that ntuple for type `v3f` is 4.

#### AbstractShape{N, F}

Some kind of geometry that can collide with other geometry, or be intersected by rays.

This code is still a WIP, but currently offers the following interface:

* `volume(s)`
* `bounds(s)::Box`
* `center(s)::Vec`
* `is_touching(s, p::Vec)::Bool`
* `closest_point(s, p::Vec)::Vec`
* `intersections(s, r::Ray; ...)::UpTo{M, F}`. Can also return the surface normal at the first intersection if you pass a special flag (and only for 3D shapes).

The most important shape is `Box{N, F}`. Other shapes are:

* `Sphere`
* `Capsule`
* `Plane`
* `Triangle`

#### Box{N, F}

An axis-aligned rectangular region. Along with participating in the above `AbstractShape` interface, it provides lots of functionality for use as a bounding box.

You can construct it by providing some combination of two fields among `min`, `max`, `size`, and `center`. For example, `Box(min=Vec(1, 1), size=Vec(10, 10))`. The `min` and `max` values are inclusive.

You can get the information about a box with the functions `min_inclusive()`, `min_exclusive()`, `max_inclusive()`, `max_exclusive()`, `size()`, and `center()`.

Many aliases are provided, in the same vein as `Vec` and `Mat`'s aliases.

Other important functions:
* `boundary()`: get the bounds of a group of boxes and points.
* `intersect()`: get the intersection of two or morme boxes.
* `union()`: get the union of two or more boxes.

#### Interval{F}

A `Box{1}` can also be thought of as an interval on the number line. However, working with `Vec{1}` instances is cumbersome. You can instead use the helper type `Interval{F}`, which is like a `Box{1, F}` without the need to wrap the numbers in a `Vec{1, F}`.

For example, you can construct an interval with `Interval(min=1, size=10)`. Whereas with a box you would need to do `Box(min=Vec(1), size=Vec(10))`.

### SceneTree

Provides a memory-layout-agnostic implementation of scene graph algorithms. **Still a work-in-progress**, but the architecture is pretty much done.

#### Defining your memory layout

To use this module, you should first decide how you store your nodes. You can see examples of this in the unit test file *test/scene-tree.jl*. In particular, you need:
* A unique ID for each node. Call this data type `ID`.
* [Optional] a "context" that can retrieve the node for an ID. Call this type `TContext`. If you don't need a context to retrieve nodes, use `Nothing`.
* A custom node type which somehow owns an instance of the immutable struct `SceneTree.Node{ID, F}`. You should pick a specific `F` (and, of course, an `ID`). Call this node type `TNode`.

#### Implementing the memory layout interface

Once you have an architecture in mind, you can integrate it with `Bplus.SceneTree` by implementing the following interface with your types:

* `null_node_id(::Type{ID})::ID`: a special ID value representing 'null'.
* `is_null_id(id::ID)::Bool`: by default, compares with `null_node_id(ID)` using `===` (triple-equals, a.k.a. egality).
* `deref_node(id::ID[, context::TContext])::TNode`: gets the node with the given ID. Assume the ID is not null, and the node exists.
* `update_node(id::ID[, context::TContext], new_value::SceneTree.Node{ID})`: should replace your node's associated `SceneTree.Node` with the given new value.
* `on_rooted(id::ID[, context::TContext])` and/or `on_uprooted([same args])` to be notified when a node loses its parent (a.k.a. becomes a "root") or gains a parent (a.k.a. becomes "uprooted"). This is useful if you have a special way of storing root nodes separate from child nodes.

#### Examples

A really simple and dumb representation would be to put each node in a list, assume nodes are never deleted, and use each node's index in the list as its ID. Let's also say the component type used is Float32. In this case, you can define the following architecture:
* `const MyID = Int`
* `const MyContext = Vector{SceneTree.Node{MyID, Float32}}`
* `null_node_id(::Type{MyID}) = 0`
  * This is type piracy, a bad practice in Julia, so in a real scenario maybe wrap your integer ID's in a custom struct.
* `deref_node(i::MyID, context::MyContext) = context[i]`
* `update_node(i::Int, context::Vector, value::SceneTree.Node) = (context[i] = value)`.

Now your list of nodes can participate in a scene graph!

Another example would be to make a custom mutable struct, `MyEntity`, which has the field `node::SceneTree.Node{ID, Float32}` (plus whatever else you want your entity to have, like a list of game components). Then `ID` is simply a reference to `MyEntity` (mutable structs are reference types), and no context is needed! You could simply do `deref_node(id::MyEntity) = id.node`. However, to handle null ID's, you'll want to wrap the ID type in Julia's `Ref` type, which boxes it and allows for null values. So the final implementation looks like:
* `const MyID = Ref{MyEntity}`
* `deref_node(id::MyID) = id[].node`
* `update_node(id::MyID, data::SceneTree.Node) = (id[].node = data)`
* `null_node_id(::Type{MyID}) = MyID()`
* `is_null_id(::Type{MyID})`

NOTE: in practice, the last example is not easy to implement in Julia. The problem is that the `ID` type references `MyEntity`, but `MyEntity` also has to reference the `ID` type (in its `node` field). Check out the unit tests, which handle this by adding an extra layer of indirection via type parameters.

#### Usage

Refer to function definitions for more info on the optional params within each function.

Creating nodes and adding them to the scene graph is something you do yourself, since you defined the memory architecture.

Once you have some nodes, you can parent them to each other with `set_parent(child::ID, parent::ID[, context]; ...)`. To unparent a node, pass a 'null' ID for the parent.

You can get the transform matrix of a node with `local_transform(id[, context])` and `world_transform(id[, context])`. The "world transform" means the transform in terms of the root of the tree.

Functions to *set* transform, or get individual position/rotation/scale values, are still to be implemented.

You can iterate over different parts of a tree:
* `siblings(id[, context], include_self=true)` gets an iterator over a node's siblings in order.
* `children(id[, context])` gets an iterator over a node's direct children (no grand-children).
* `parents(id[, context])` gets an iterator over a node's parent, grand-parent, etc. The last element will be a root node.
* `family(id[, context], include_self=true)` gets an iterator over the entire tree underneath a node. The iteration is Depth-First, and this is the most efficient iteration if you don't care about order.
* `family_breadth_first(id[, context], include_self=true)` gets a breadth-first iterator over the entire tree underneath a node. This implementation avoids any heap allocations, at the cost of some processing overhead. It's recommended for small trees.
* `family_breadth_first_deep(id[, context], include_self=true)` gets a breadth-first iterator over the entire tree underneath a node. This implementation makes heap allocations, but iterates more efficiently than the other breadth-first implementation. It's recommended for large trees.

Some other helper functions:
* `try_deref_node(id[, context])` gets a node, or `nothing` if the ID is null.
* `is_deep_child_of(parent_id, child_id[, context])` gets whether a node appears somewhere underneath another node.

### Fields

A data representation of scalar or vector fields, i.e. functions of some `Vec{N1, F1}` to some `Vec{N2, F2}`. As well as a nifty little language for quickly specifying them.

This is the first of a series of planned modules that will help you play with procedural content generation. For example, you can use a Field to easily fill a texture with interesting noise.

I'm not going to write more about this module for now, but check out the unit tests for examples.

### GL

Wraps OpenGL constructs, and provides a centralized place for a graphics context and its accompanying window. This is the big central module of B+ along with `Math`.

#### Context

The core object tying everything together is `Context`, representing a single OpenGL context and GLFW window. Your entire program logic will likely live within a call to `bp_gl_context()`, whose first argument is a lambda to execute between creating and destroying the context.

By the rules of OpenGL, contexts are a thread-local singleton. So for as long as the context is alive, and from anywhere *within the thread that's running the context*, you can get the current context object with `Bplus.GL.get_context()::Context`. Most `GL` functions don't require you to explicitly provide the context, since they can retrieve it themselves.

The context manages all sorts of rendering state, such as viewports/scissoring, blend mode, depth and stencil modes, and the current render target. Most OpenGL global parameters are controlled by the context, via setter functions and/or special properties defined in the `RenderState` struct. For example, you could call `set_viewport(Box2Di(min::v2i, max::v2i))`, or you could do `get_context().viewport = Box(min=my_min, max=my_max)`.

The context also provides hooks into common GLFW callbacks. For example, to be notified when the window size changes, do:

````
push!(get_context.glfw_callbacks_window_resized, new_size::v2i -> begin
    # [your code here]
end)
````

#### Device

Hardware/OpenGL queried constants are available through `get_context().device::Device`. For example, `get_context().device.gpu_name` gets the name of the GPU being used for this program (a good way to double-check if you're stuck on the integrated card!)

#### Resources

An `AbstractResource` is some kind of OpenGL object: texture, buffer, VAO, FBO, etc. You can get its OpenGL handle with `get_ogl_handle(r)`. You can clean it up with `close(r)`, and check if it's been cleaned up already with `is_destroyed(r)`.

A full overview of resource types will be documented elsewhere, but here is a quick reference of the major ones:
* `Texture`, defined in *GL/textures/texture.jl*
  * Remember that B+ uses bindless textures, and textures are always given to shaders through a `View`, which must be activated with `view_activate(v)` before rendering.
* `Target`, a.k.a. "framebuffers" in OpenGL, defined in *GL/targets/target.jl*
* `Buffer`, defined in *GL/buffers/buffer.jl*
* `Mesh`, a.k.a. "VAO" in OpenGL, defined in *GL/buffers/mesh.jl*
  * The types of data that can be passed from mesh/buffer into vertex shader are laid out by the type hierarchy defined in *GL/buffers/vertices.jl*
* `Program`, a.k.a. shaders, defined in *GL/program.jl*
  * The string macro `bp_glsl"[shader code here]"` can be used to create a shader program from a string literal.

#### Clearing and Drawing

You can clear a render target (or the screen, by passing null) with `render_clear(context, target::GL.Ptr_Target, value[, target_attachment_idx])`. The value should be one of the following types:
* `vRGBA`, to clear color buffers (regardless of the buffer's actual components).
* `GLfloat`, a.k.a. `Float32`, to clear depth buffers
* `GLint`, a.k.a. `Int32`, to clear stencil buffers
* Two values, `GLfloat` then `GLint`, to clear depth-stencil buffers

You can draw a mesh using a given shader program with `render_mesh([context, ]mesh::Mesh, program::Program; args...)`. There are *many* ways to customize this draw call -- indexing, instancing, multi-draw... Refer to the function's documentation for more info.

#### Services

Because the GL context is a sort of singleton, it allows you to register global services with it. Several services are provided by B+; use them as a reference if writing your own.

* `ViewDebuggerService` : double-checks that you're not using a texture view in a shader without activating it. Automatically included if Bplus.GL is configured for debugging (i.e. you've redefined `Bplus.GL.gl_aserts_enabled() = true`).
* `InputService` : provides access to `Bplus.Input` (see **Input** below)
* `GuiService` : provides access to `Bplus.GUI` (see **GUI** below)
* `BasicGraphicsService` : provides access to various common rendering resources (see **Helpers** below)

### Input

Provided through a context service (see **GL**>*Services* above). This module greatly simplifies the use of the GLFW package for reading input, and defines bindings in a data-driven way that you could easily serialize/deserialize. Opt into the service with `service_input_init([context])`. Update the service every frame with `service_input_update([service])`.

#### Buttons

Buttons are binary inputs. A single button can come from more than one source, in which case they're OR-ed together (e.x. you could bind "fire" to right-click, Enter, and Joystick1->Button4).

Create a button with `create_button(name::AbstractString, inputs::ButtonInput...)`. Refer to the `ButtonInput` class for more info on how to configure your buttons. A button can come from keyboard keys, mouse buttons, or joystick buttons.

Get the current value of a button with `get_button(name::AbstractString[, service])::Bool`.

#### Axes

Axes are continuous inputs, represented with `Float32`. Unlike buttons, they can only come from one source.

Create an axis with `create_axis(name::AbstractString, input::AxisInput)`. Refer to the `AxisInput` class for more info on how to configure your axis. An axis can come from mouse position, scroll wheel, joystick axes, or a list of `ButtonAsAxis`.

Get the current value of an axis with `get_axis(name::AbstractString[, service])::Float32`.

### GUI

This module provides a context service (see **GL**>*Services* above) that manages the Dear ImGUI library (exposed though the Julia package `CImGui`).

Opt into the service with `service_gui_init([context])`. Start a frame with     `service_gui_start_frame([context])`. End a frame with `service_gui_end_frame([context])`, which immediately draws the frame's GUI (make sure it draws to the screen and not some render target!).

In between the "start frame" and "end frame" calls, you can use Dear ImGUI as normal.

### Helpers

A dumping ground for useful stuff. Like *Utilities*, but more focused on B+ than on Julia in general.

* `@game_loop`: A macro that makes it easy to run a B+ game.
* `@using_bplus`: A macro that automatically loads all B+ modules with `using` statements.
* *Cam3D*: A basic customizable 3D camera.
  * State is stored in `Cam3D{F}`
  * Settings are stored in `Cam3D_Settings{F}`
  * Frame inputs are stored in `Cam3D_Input{F}`
  * Call `cam_update(state, settings, input, delta_seconds)` to tick and compute updated state/settings
* *BasicGraphicsService*: a context service (see **GL**>*Services* above) which provides important, basic stuff. Such as:
  * Triangle and quad meshes which cover the whole screen
  * A blit shader (used with `resources_blit()`)
  * An empty mesh, for dispatching draw calls with entirely procedural geometry.

# License

Copyright William Manning 2019-2023. Released under the MIT license.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

 IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

gha_language: Julia


text:
# LIBSSH2-LabVIEW: Adds SSH client support to LabVIEW™ using the libssh2 library

A [LabVIEW](http://www.ni.com/labview) add-on and toolkit for communicating with a [SSH](https://en.wikipedia.org/wiki/Secure_Shell) server. This adds SSH client support to LabVIEW by using the [libssh2](http://www.libssh2.org) library and a LabVIEW-friendly wrapper library, [libssh2lv](https://github.com/fieldrndservices/libssh2lv). This only adds client-side SSH support. It does _not_ add SSH server support.

[![VIPM installs](https://www.vipm.io/package/field_rnd_services_libssh2/badge.svg?metric=installs&icon=white&left_color=darkgray&right_color=green)](https://www.vipm.io/package/field_rnd_services_libssh2/)
[![VIPM stars](https://www.vipm.io/package/field_rnd_services_libssh2/badge.svg?metric=stars&icon=white&left_color=darkgray&right_color=green)](https://www.vipm.io/package/field_rnd_services_libssh2/)
[![GitHub issues](https://img.shields.io/github/issues/fieldrndservices/libssh2-labview)](https://github.com/fieldrndservices/libssh2-labview/issues)
[![GitHub forks](https://img.shields.io/github/forks/fieldrndservices/libssh2-labview)](https://github.com/fieldrndservices/libssh2-labview/network)
[![GitHub stars](https://img.shields.io/github/stars/fieldrndservices/libssh2-labview)](https://github.com/fieldrndservices/libssh2-labview/stargazers)

## Table of Contents

- [Example Usage](#example-usage)
- [Dependencies](#dependencies)
  - [Installation](#dependencies-installation)
    - [Desktop](#dependencies-installation-desktop)
    - [CompactRIO](#dependencies-installation-crio)
  - [Development](#dependencies-development)
- [Installation](#installation)
- [Build](#build)
  - [Packaging using VIPM Pro (recommended)](#packaging-using-vipm-pro-recommended)
  - [Packaging using VIPM Free](#packaging-using-vipm-free)
- [Documentation](#documentation)
- [Tests](#tests)
- [License](#license)

## Example Usage

A [VI snippet](http://www.ni.com/tutorial/9330/en/) of downloading a file from a remote SSH server using this toolkit, similar to the [`scp.c`](https://www.libssh2.org/examples/scp.html) [example](https://www.libssh2.org/examples/) from the [libssh2](https://www.libssh2.org) C library project:

![Simple SCP file download](https://github.com/fieldrndservices/libssh2-labview/blob/main/docs/SCP-File-Download.png)

A VI snippet of uploading a file to a remote SSH server using this toolkit, similar to the [`scp_write.c`](https://www.libssh2.org/examples/scp_write.html) example from the libssh2 C library project:

![Simple SCP file upload](https://github.com/fieldrndservices/libssh2-labview/blob/main/docs/SCP-File-Upload.png)

A VI snippet of executing a single command on a remote SSH server and reading the response using this toolkit, similar to the [`ssh2_exec.c`](https://www.libssh2.org/examples/ssh2_exec.html) example from the libssh2 C library project:

![Single Command Execution](https://github.com/fieldrndservices/libssh2-labview/blob/main/docs/Single-Command-Execution.png)

For more examples of using this toolkit and VIs instead of VI snippets, see the VIs in the [Examples](https://github.com/fieldrndservices/libssh2-labview/tree/master/src/Examples) source folder, or (eventually) use the [NI Example Finder](http://www.ni.com/getting-started/labview-basics/examples) in the [LabVIEW](https://www.ni.com/en-us/shop/labview.html) Development Environment after the toolkit has been installed.

## Dependencies

### Installation

- LabVIEW 2009 or newer (All systems)
- [libssh2-nilrt-ipk](https://github.com/fieldrndservices/libssh2-nilrt-ipk/releases) (For CompactRIO only)
- [libssh2lv-nilrt-ipk](https://github.com/fieldrndservices/libssh2lv-nilrt-ipk/releases) (For CompactRIO only)

### Development

- [Caraya](http://sine.ni.com/nips/cds/view/p/lang/en/nid/215909)
- [HTML Help Workshop](https://docs.microsoft.com/en-us/previous-versions/windows/desktop/htmlhelp/microsoft-html-help-downloads) (for compiling the help documentation)
- [JKI State Machine](http://sine.ni.com/nips/cds/view/p/lang/en/nid/209025)
- LabVIEW 2009 or newer (for building)
- LabVIEW 2018 or newer
- Labricator (only for automated builds, private package available upon request)
- [OpenG Array Library](http://sine.ni.com/nips/cds/view/p/lang/en/nid/209027)
- [OpenG File Library](http://sine.ni.com/nips/cds/view/p/lang/en/nid/209027)
- [VIPM Pro](https://vipm.jki.net/get) (only for automated builds)
- [VIPM API](https://support.jki.net/hc/en-us/articles/214136183-VIPM-API) (only for automated builds)

The Caraya, JKI State Machine, OpenG Array Library, OpenG File Library, and VIPM API dependencies must be installed for all versions of LabVIEW (2009 and 2018) to avoid errors during automated builds.

## Installation

### Desktop

A [VI Package (VIP)](https://www.vipm.io/package/field_rnd_services_libssh2/) is available at [VIPM.io](https://www.vipm.io). The recommended installation instructions are to:

1. Navigate to the [LIBSSH2 for LabVIEW package](https://www.vipm.io/package/field_rnd_services_libssh2/) at [VIPM.io](https://www.vipm.io/).
2. Click on the _Install_ button to the right. The [VI Package Manager (VIPM)](https://www.vipm.io/download/) (freely available from [JKI](https://jki.net)) will start automatically.
3. Follow the on-screen instructions to complete the installation.

Alternatively, the toolkit can be installed by: (i) downloading the source code and building the VIP, (ii) downloading a VIP from the [releases](https://github.com/fieldrndservices/libssh2-labview/releases) section of this project, or (iii) manually copying the VIs from the source code into a project.

### Real-Time Target

Communication from a CompactRIO or PXI controller running the NI Linux Real-Time (RT) Operating System (OS) to a remote SSH or SFTP server for a real-time application is possible, but several dependencies must be installed _on the RT target_ in order to work.

1. Follow the [Quick Start](https://github.com/fieldrndservices/libssh2-nilrt-ipk#quick-start) instructions for installing the libssh2 shared object (SO) onto the CompactRIO. This will place the `libssh2.so` file in the correct location on the CompactRIO. This SO is needed for the `libssh2lv.so` file.
2. Follow the [Quick Start](https://github.com/fieldrndservices/libssh2lv-nilrt-ipk#quick-start) instructions for installing the libssh2lv shared object (SO) onto the CompactRIO. This will place the `libssh2lv.so` file in the correct location on the CompactRIO. This SO is needed for this LabVIEW toolkit's VIs to work.
3. Install the [VIP](https://www.vipm.io/package/field_rnd_services_libssh2/) according to the [Desktop installation](#dependencies-installation-desktop) instructions. This will ensure the VIs are available for development. The VIs will be automatically deployed to the CompactRIO when the real-time application is either built and deployed as an RT executable or when running from within the development environment.

## Build

Each component in the LIBSSH2-LabVIEW project has a Source Distribution build specification. The destination of each source distribution build is the `builds` folder relative to the project root, i.e. same folder as the `LIBSSH2.lvproj` file. Additionally, the output for the compiled help documentation is also the `builds` folder. The `builds` folder should _not_ be included in the version control repository. A `Build.vi` script is available in the `Scripts.lvlib` project library that will build all of the components and the help documentation automatically (VIPM Pro is not needed, but the [HTML Help Workshop](https://docs.microsoft.com/en-us/previous-versions/windows/desktop/htmlhelp/microsoft-html-help-downloads) is needed).

The VI Package Build (.vipb) specification, located in the `configs` folder relative to the project root, is configured for the package source to be the `builds` folder. Thus, the Source Distribution for each component must be built **before** opening the `LIBSSH2.vipb` file in the VIPM; otherwise, the package configuration will be lost.

### Packaging using VIPM Pro (recommended)

__Important__, if creating a package for LabVIEW 2009 from LabVIEW 2018, the [VI Server TCP/IP ports](http://zone.ni.com/reference/en-XX/help/371361P-01/lvhowto/configuring_the_vi_server/) must be different for each version of LabVIEW and verified with the [VIPM](https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000000P9YmSAK) application _before_ proceeding. An error will occur when the VIPM is started if both LabVIEW 2009 and 2018 are running at the same time. Basically, VIPM will not know which VI server to use if both versions of LabVIEW are using the same TCP/IP port.

If VIPM Pro is available, then open the `LIBSSH2.lvproj` file in any version of LabVIEW newer than 2009 and run the `Package.vi` located in the `Scripts.lvlib` project library of the Project Explorer window. Ensure all dependencies are installed before running the `Package.vi` script.

Note, the version number for the package is set in the `configs\LIBSSH2.vipb` file. The version number in the VIP build specification file should be modified and saved _before_ running the `Package.vi` script.

### Packaging using VIPM Free

If VIPM Pro is _not_ available, then the following steps can be executed to do essentially the same thing as the `Package.vi` script. Ensure all dependencies, except VIPM Pro and the VIPM API, are installed before completing these steps.

1. Start LabVIEW 2018 or newer and open the `LIBSSH2.lvproj` file.
2. From the Project Explorer window, **File>>Save for Previous Version...**, a new dialog will appear.
3. Select **9.0** from the drop down menu.
4. Click **Save...**. A new dialog will open.
5. Create the `target\9.0` folder hierarchy in the project root, i.e. the same folder as the `LIBSSH2.lvproj` file, if it does not already exists.
6. Click **Save**.
7. Close LabVIEW 2018 or newer and the `LIBSSH2.lvproj` file.
8. Navigate to `<project root>\src`.
9. Copy the `Help` folder to `<project root>\target\9.0\src`.
10. Start LabVIEW 2009.
11. Open the `<project root>\target\9.0\LIBSSH2.lvproj` file. Do NOT open the project in any other version of LabVIEW.
12. Open each Source Distribution build specification under the "Build Specifications" tree item in the Project Explorer and change the _Output Destination_ to `<project root>\target\9.0\builds`. Save and close each build specification.
13. Run the `Build.vi` in the `Scripts` project library to build each Source Distribution under the "Build Specifications" tree item and the compiled help documentation file (`LIBSSH2.chm`). The output of each build will be available in `<project root>\target\9.0\builds`.
14. Open the `<project root>\target\9.0\configs\LIBSSH2.vipb` file in VIPM.
15. Build the VI package with VIPM. The output will be available at `<project root>\target\9.0\packages`. Do NOT modify anything in the package build specification, but ensure the "2009" version of LabVIEW is selected in the upper, right-hand corner of the VIPM application window.
16. Close VIPM.
17. Close LabVIEW 2009 and the `<project root>\target\9.0\LIBSSH2.lvproj` file.

## Documentation

See the in-app LabVIEW Help system for more information and documentation about using the library after it has been installed, or visit the [web-based documentation](https://help.fieldrndservices.com/libssh2-labview). Examples are also available within the LabVIEW development environment using the "Help->Find Examples..." menu item.

## Tests

Tests are written in LabVIEW using the [Caraya](https://github.com/JKISoftware/Caraya) unit testing framework and included in the project via the various `Tests.lvlib` project libraries and the `tests` on-disk folder. To run the tests, open the `LIBSSH2.lvproj` file found in the project root in the LabVIEW Development Environment (32-bit or 64-bit) and run the `Test.vi` script located in the `Scripts.lvlib` project library. This will run all of the tests defined in all of the various `Tests.lvlib` project libraries located in the project.

The tests require a SSH server. The SSH server should support password and public/private key authentication. The SSH test server can be the `localhost`. The tests will prompt for a IP address, username, password, passphrase, etc. as needed. None of the tests are included in the VIP distribution. They are only included with the source code, but they also provide excellent examples for using each of the VIs in the public API of the toolkit.

## License

LIBSSH2-LabVIEW is licensed under either the [BSD-3-Clause](https://opensource.org/licenses/BSD-3-Clause) or the [Apache-2.0 license](http://www.apache.org/licenses/LICENSE-2.0), and it contains statically compiled code from the [libssh2](https://github.com/libssh2/libssh2) and [OpenSSL](https://github.com/openssl/openssl) projects, which are licensed under the [MIT license](https://github.com/libssh2/libssh2/blob/master/COPYING) and [Apache-2.0 license](https://github.com/openssl/openssl/blob/master/LICENSE), respectively. See the `docs` folder for more information about licensing and copyright.

gha_license_id: NOASSERTION


text:
# Delete data sources {#task_v24_4dr_5db .task}

You can view all data sources and delete data sources on the **Data Sources** page.

**Note:** If you have created a dataset based on a data source, the data source cannot be deleted and the system will display an error message if you delete the data source.

1.   Log on to the Quick BI console.
2.  Click **Data Sources** to go to the **Data Sources** page.
3.   Select a data source, and click the **Delete** icon.

url: https://raw.githubusercontent.com/xiao15934831580/bi/a266cc43c3e9f5eb88bab9c630cf28e52a364687/intl.en-US/User Guide/Data modeling/Data source management/Delete data sources.md

filename: Delete data sources.md


text:
NewPlayer
=========

Responsive learning content player by [The New Group](http://www.thenewgroup.com).

#### Dependencies

- git (http://git-scm.com/downloads)
- node / npm (http://nodejs.org/download)
- bower (npm install -g bower)
- grunt (npm install -g grunt-cli)

#### First run

From repository root folder:

1. bower install
1. npm install
1. grunt serve

#### Building & Deploying

1. grunt build
1. Copy dist/\*\* to deploy location

#### Documentation

- [Application Overview](app/)
- [Components Overview](app/scripts/component/)

repository: thenewgroup/elx-newplayer

repo_name: thenewgroup/elx-newplayer


text:
# fabarm
A meArm based project. It was part of the exhibition at the ArduinoDay 2017.

You can read more about the project on the official website of FabLab Bayreuth [https://www.fablab-bayreuth.de/index.php/projekte/144-fabarm](fabArm) (German article!) or in the project description under docs/.

## Hardware Setup

* meArm
* Arduino nano
* Arduino nano to uno r3 shield.
* 3 photoresistors and 3 resistors to build a voltage divider.
* An external button to start the program of the arm.
* Pin location can be found directly in the source code.

license: Unlicense

repository: fablab-bayreuth/fabarm

repo_name: fablab-bayreuth/fabarm


text:
# ServiceApplicationGateways

```text
azure-4/Item/Networking/ServiceApplicationGateways
```

```text
include('azure-4/Item/Networking/ServiceApplicationGateways')
```

| Illustration | ServiceApplicationGateways | ServiceApplicationGatewaysCard | ServiceApplicationGatewaysGroup |
| :---: | :---: | :---: | :---: |
| ![illustration for Illustration](../../../azure-4/Item/Networking/ServiceApplicationGateways.png) | ![illustration for ServiceApplicationGateways](../../../azure-4/Item/Networking/ServiceApplicationGateways.Local.png) | ![illustration for ServiceApplicationGatewaysCard](../../../azure-4/Item/Networking/ServiceApplicationGatewaysCard.Local.png) | ![illustration for ServiceApplicationGatewaysGroup](../../../azure-4/Item/Networking/ServiceApplicationGatewaysGroup.Local.png) |

## ServiceApplicationGateways

### Load remotely
```plantuml
@startuml
' configures the library
!global $LIB_BASE_LOCATION="https://github.com/tmorin/plantuml-libs/distribution"

' loads the library's bootstrap
!include $LIB_BASE_LOCATION/bootstrap.puml

' loads the package bootstrap
include('azure-4/bootstrap')

' loads the Item which embeds the element ServiceApplicationGateways
include('azure-4/Item/Networking/ServiceApplicationGateways')

' renders the element
ServiceApplicationGateways('ServiceApplicationGateways', 'Service Application Gateways', 'an optional tech label')
@enduml
```

### Load locally
```plantuml
@startuml
' configures the library
!global $INCLUSION_MODE="local"
!global $LIB_BASE_LOCATION="../../.."

' loads the library's bootstrap
!include $LIB_BASE_LOCATION/bootstrap.puml

' loads the package bootstrap
include('azure-4/bootstrap')

' loads the Item which embeds the element ServiceApplicationGateways
include('azure-4/Item/Networking/ServiceApplicationGateways')

' renders the element
ServiceApplicationGateways('ServiceApplicationGateways', 'Service Application Gateways', 'an optional tech label')
@enduml
```

## ServiceApplicationGatewaysCard

### Load remotely
```plantuml
@startuml
' configures the library
!global $LIB_BASE_LOCATION="https://github.com/tmorin/plantuml-libs/distribution"

' loads the library's bootstrap
!include $LIB_BASE_LOCATION/bootstrap.puml

' loads the package bootstrap
include('azure-4/bootstrap')

' loads the Item which embeds the element ServiceApplicationGatewaysCard
include('azure-4/Item/Networking/ServiceApplicationGateways')

' renders the element
ServiceApplicationGatewaysCard('ServiceApplicationGatewaysCard', 'Service Application Gateways Card', 'an optional description')
@enduml
```

### Load locally
```plantuml
@startuml
' configures the library
!global $INCLUSION_MODE="local"
!global $LIB_BASE_LOCATION="../../.."

' loads the library's bootstrap
!include $LIB_BASE_LOCATION/bootstrap.puml

' loads the package bootstrap
include('azure-4/bootstrap')

' loads the Item which embeds the element ServiceApplicationGatewaysCard
include('azure-4/Item/Networking/ServiceApplicationGateways')

' renders the element
ServiceApplicationGatewaysCard('ServiceApplicationGatewaysCard', 'Service Application Gateways Card', 'an optional description')
@enduml
```

## ServiceApplicationGatewaysGroup

### Load remotely
```plantuml
@startuml
' configures the library
!global $LIB_BASE_LOCATION="https://github.com/tmorin/plantuml-libs/distribution"

' loads the library's bootstrap
!include $LIB_BASE_LOCATION/bootstrap.puml

' loads the package bootstrap
include('azure-4/bootstrap')

' loads the Item which embeds the element ServiceApplicationGatewaysGroup
include('azure-4/Item/Networking/ServiceApplicationGateways')

' renders the element
ServiceApplicationGatewaysGroup('ServiceApplicationGatewaysGroup', 'Service Application Gateways Group', 'an optional tech label') {
    note as note
        the content of the group
    end note
}
@enduml
```

### Load locally
```plantuml
@startuml
' configures the library
!global $INCLUSION_MODE="local"
!global $LIB_BASE_LOCATION="../../.."

' loads the library's bootstrap
!include $LIB_BASE_LOCATION/bootstrap.puml

' loads the package bootstrap
include('azure-4/bootstrap')

' loads the Item which embeds the element ServiceApplicationGatewaysGroup
include('azure-4/Item/Networking/ServiceApplicationGateways')

' renders the element
ServiceApplicationGatewaysGroup('ServiceApplicationGatewaysGroup', 'Service Application Gateways Group', 'an optional tech label') {
    note as note
        the content of the group
    end note
}
@enduml
```

repository: VinayaSathyanarayana/plantuml-libs

repo_name: VinayaSathyanarayana/plantuml-libs