text:
AddressableTrait for Laravel 5
==============================

This adds methods to format addresses and phone numbers to an Eloquent model in [**Laravel 5**](http://laravel.com/).  It also adds geocoding functionality using [GeocoderLaravel](https://github.com/geocoder-php/GeocoderLaravel).

The AddressableTrait file is pretty simple and easy to understand so modify it to suit your needs.  If you have additional functionality that you would like to see added please let me know.

Composer Install
----------------

It can be found on [Packagist](https://packagist.org/packages/craigzeaross/addressable-model).
The recommended way is through [composer](http://getcomposer.org).

Edit `composer.json` and add:

```json
{
    "require": {
        "craigzearfoss/addressable-model": "dev-master"
    }
}
```

And install dependencies:
```bash
$ composer update
```

If you do not have [**Composer**](https://getcomposer.org) installed, run these two commands:

```bash
$ curl -sS https://getcomposer.org/installer | php
$ php composer.phar install
```

Configuration
-------------

In your model add the AddressableTrait.

```php
<?php

// ...
use Craigzearfoss\AddressableModel\AddressableTrait;

class MyModel extends Model
{
    use AddressableTrait;
```

Usage
-----

The AddressableTrait assumes that your model has the following fields.  You are not required to have all of the fields, only the fields that that are needed for the methods you want to use.

* `firstname` (string) - used by `fullname` and `reversename` methods
* `lastname` (string) - used by `fullname` and `reversename` methods
* `address` (string)
* `address2` (string)
* `city` (string)
* `state_id` (integer) - references the field `abbrev` in a `states` table
* `postcode` (string)
* `country_id` (integer) - references the field `abbrev` in a `countries` table
* `lat` (float) nullable - stores the latitude retrieved from GeocoderLaravel
* `lng` (float) nullable - stores the longitude retrieved from GeocoderLaravel
* `phone` (string)
* `fax` (string)

Formatting Methods:

* `fullname`
* `reversename`
* `formattedAddress`
* `formattedPhone`
* `formattedFax`

Geocoder Methods

* `fetchGeocode` - returns the geocode array  for the current record
* `fetchCoordinates` - returns an array with the latitude and longitude for the current record
* `updateGeocode` - updates the `lat` and `lng` fields for the current model
* `lookupGeocode` - makes a call to Google maps for the specified address and return the geocode array
* `loopupCoordinates` - makes a call to Google maps for the specified address and returns an array with the latitude and longitude
* `distance` - calculates the distance between the current record and the specified latitude and longitude
* `scopeDistance` - adds a location coordinate and distance to a query

Changelog
---------

[See the CHANGELOG file](https://github.com/craigzearfoss/bullets/blob/master/CHANGELOG.md)

Support
-------

[Please open an issue on GitHub](https://github.com/craigzearfoss/bullets/issues)

Contributor Code of Conduct
---------------------------

Please note that this project is released with a Contributor Code of Conduct.
By participating in this project you agree to abide by its terms.

License
-------

AddressableModel is released under the MIT License. See the bundled
[LICENSE](https://github.com/craigzearfoss/bullets/blob/master/LICENSE)
file for details.

repository: craigzearfoss/addressable-trait

repo_name: craigzearfoss/addressable-trait


text:
## Readme Stats for Github

### Features
- Totally accurate result
- Refresh result in 700 seconds
- Support customization

### Endpoints

```
https://github-stats-alpha.vercel.app/api/?username={your-github-username}

// ex
https://github-stats-alpha.vercel.app/api/?username=cachecleanerjeet
```

Customization:

```
https://github-stats-alpha.vercel.app/api/?username=cachecleanerjeet&cc=000&tc=fff&ic=fff&bc=000

Where cc = Card Color
      tc = Text Color
      ic = Icon Color
      bc = Border Color
```

[![Example](https://github-stats-alpha.vercel.app/api/?username=cachecleanerjeet "Example")](https://github.com/cachecleanerjeet/readme-stats-github "Example")

### Credits
- Idea from [github-readme-stats](https://github.com/anuraghazra/github-readme-stats "github-readme-stats") by [Anurag Hazra](https://github.com/anuraghazra "Anurag Hazra")
- Thanks to [SpecHide](https://github.com/SpEcHiDe "SpecHide") for many helps

### Note
Due to almost no contribution from community, this project will not be maintained for now.
### Contribution
Contributors are welcome

### Want to contact ?
-<EMAIL_ADDRESS>"Mail")
- [Telegram](http://telegram.dog/cachecleanerjeet "Telegram")
- [Telegram Channel](http://telegram.dog/tprojects "Telegram Channel")

branch_name: refs/heads/main

extension: md

license_type: permissive


text:
# Benchmark tool for CycleORM

## Benchmark tool for CycleORM

```
// Run all projects with default settings
$ php bench run

// Run each project in a separate process (Recommended)
$ php bench run -p

// Run a specific project or multiple projects
$ php bench run v1
$ php bench run v1 v2
$ php bench run eloquent8

// Run with number of iterations (Overrides the value in the benchmark itself)
$ php bench run -i 2

// Run with a number of runs of each subject (Overrides the value in the benchmark itself)
$ php bench run -r 200

// Benchmark filtering on startup
$ php bench run -f 200
$ php bench run -f benchFoo
$ php bench run -f HashBench::benchFoo
$ php bench run -f Hash.*

// Benchmark filtering by group on startup
$ php bench run -g select -g persist

// phpbench configuration change
$ php bench run -c phpbench-dev.json

// Run parameters can be combined
$ php bench run -p -r 200 -i 2 -f HashBench::benchFoo -c phpbench-dev.json v1 v2
```

## Benchmark project generation

Projects are generated based on the `config/projects.php` config

```php
return [
    // Project name can begin with "-", the project will be ignored in .gitignore
    'project_name' => [
        'boilerplate' => 'default', // default project template (optional)
        // composer requires
        'require' => [
            'cycle/orm' => '^1.5'.
        ],
        'locked_paths' => [ // files and directories that should not be removed by regeneration (optional)
            'vendor',
            'composer.json',
            'composer.lock'
        ],
        // Bindings for container for all benchmarks
        'bindings' => [
            \Cycle\Benchmarks\Base\DatabaseDrivers\DriverInterface::class => \Cycle\Benchmarks\Base\DatabaseDrivers\SqliteDriver::class,
            \Butschster\EntityFaker\EntityFactoryInterface::class => \Cycle\Benchmarks\Base\EntityFactory\CycleORMV1EntityFactory::class,
            'Cycle\ORM\MapperInterface' => 'Cycle\ORM\Mapper\Mapper',
        ],
        'benchmarks' => [
            \Cycle\Benchmarks\Base\Benchmarks\HasOnePersist::class => [
                // Bindings for specific benchmarks
                \Cycle\Benchmarks\Base\DatabaseDrivers\DriverInterface::class => \Cycle\Benchmarks\Base\DatabaseDrivers\NullDriver::class,
            ],
            \Cycle\Benchmarks\Base\Benchmarks\SingleEntityPersist::class,
            \Cycle\Benchmarks\Base\Benchmarks\SingleEntitySelect::class,
            \Cycle\Benchmarks\Base\Benchmarks\HasManyPersist::class,
            \Cycle\Benchmarks\Base\Benchmarks\HasManySelect::class
        ],
    ]
];
```

### Generate benchmarks

```
// Creation of projects and benchmarks which have not yet been created.
$ php bench generate

// All generated projects will be generated anew (all files of the project will be deleted, except those listed in the locked_paths)
$ php bench generate -o

// Generate only the listed projects
$ php bench generate v1 v2
```

### View reports

```
// Retrieve last run report
$ php bench report
$ php bench report latest

// Retrieve the previous report relative to the current one
$ php bench report latest-1
$ php php bench report latest-2
$ php php bench report latest-n

// Retrieve report by ID
$ php bench report 1346426b575f15ce2a67562db9170e9fb54f3ec6
```

license: MIT

repository: cycle/benchmarks

branch_name: refs/heads/master

gha_language: PHP

gha_license_id: MIT

repo_name: cycle/benchmarks


text:
---
title: The Hello World of Blogs
tags: [Technology, Blogging]
style: fill
color: secondary
description: This is a blog post to get you started.
---

Source: [portfolYOU](https://github.com/YoussefRaafatNasry/portfolYOU)

This is me writing an intro to this blog post.  So introlicioius.

## 1. Here is one thing I want to say

This is maybe an important thing, and, at the very least it is first.

## 2. Another thing

I am now talking about a second thing, probably also good.

## 3. A third thing

We are now getting into the weeds of things that I am saying.  It is probably unlikely someone has made it thus far.

## 4. Thing #4.

At this point, you are probably no longer into me listing off things.  Let's put in an image to placate the reader:

![corg](https://media.istockphoto.com/photos/welsh-corgi-picture-id962032196?k=20&m=962032196&s=170667a&w=0&h=NhIyQdJgVw0cw_EeLtP3LcLExLuiAWPwzL6_WsRKUfQ=)

## 5. The last thing

This is my final thing, probably would be great if this was a TL;DR or summary.  But I don't have that for you.  I have given you so little already, why start saying anything useful now?

Besides, all anybody wants is the DERP:

![MAXIMUM DERP](http://3.bp.blogspot.com/-AXnXOPZgqMk/Un-xCBAa4gI/AAAAAAAAsWA/z_lZsvDoCRk/s1600/derpstages.jpg)

gha_language: HTML


text:
# **Real-time Stereo Visual Odometry with Local Non-Linear Least Square Optimisation**

## **About**

This project implements 6-DOF camera pose estimation from a calibrated stereo camera (with local non-linear least square optimisation) for various scenarios in KITTI dataset

![Result on 00](assets/KITTI_VO_00_cut.gif)

## **Installation**

```bash
$ conda env create -f setup/environment.yml
$ pip install -e .
```

## **Usage**

For simulation of visual odometry, run the followig command

```bash
$ python main.py --config_path configs/params.yaml
```

The `params.yaml` needs to be edited to configure the sequence to run the simulation.

## **About the Problem !**

**1. What is Visual Odometry ?**

**2. Problem Formulation**

**3. Algorith Implemented**

### **Visual Odometry**

Visual Odometry is the process of incrementally estimating the pose and trajectory of a robot or a vehicle (orientation and translation of a camera configuration rigidly attached to it) using video stream from the camera.

### **Problem Formulation**

An agent is moving through an environment and taking
images with a rigidly attached camera system at discrete
time instants. Let the stream of images coming from the pair of camera
(assumed stereo configuration) be denoted by IL, k and IR, k at time instant *k* . We assume that we have prior knowledge of all the intrinsic as well as extrinsic calibration parameters of the stereo rig.

We need to estimate the relative rotation *R* and translation *t* between stereo configuration at time instants *k-1* and *k* and then to concatenate the transformation to incrementally recover the full trajectory Ck of the camera

### **Algorithm Implemented**
3D-to-2D: Structure to feature correspondences (Source : [1])

-  Compute the first stereo image frames IL,K and IR,K

-  Extract and match stereo features fL,K and fR,K

-  Triangulate features to build point cloud Xk

-  Set initial camera pose Ck

-  Store information from the first frame as IL,k-1, IR,k-1, fL,k-1, fR,k-1, Xk-1

 While exists a new image frame:

    - Compute the new stereo image pair IL,K and R,K

    - Extract and match stereo features fL,K and fR,K

    - Triangulate features to build point cloud Xk

    - Track 2D features fL,k-1 at IL,k-1 to fL,k at IL,K and thus obtain tfk-1,k

    - Compute correspondence for the tracked features tfk-1,k
 and Xk-1

    - Compute camera pose estimation (P3P), thus T = [R|t]
    - Concatenate transformation by Ck = Ck-1 Tk
    - If Optimisation is enabled, do non-linear least squares optimisation of T
    - Store informaton from first frame as IL,k-1, IR,k-1, fL,k-1, fR,k-1, Xk-1 and Ck-1

  Relative Camera Pose and Concatenation of Transformations (Source: E. F. Aguilar Calzadillas [1] )

## Future Work
- [ ] Implement Windowed Bundle Adjustment
- [ ] Implement Graph Based Optimisation in Visual SLAM
- [ ] Visualise 3D point cloud of scene using Point Cloud Library (PCL)

## **References**

[1]  ****E. F. Aguilar Calzadillas****, **"Sparse Stereo Visual Odometry with Local Non-Linear Least-Squares Optimization for Navigation of Autonomous Vehicles"**,  M. A. Sc. Thesis, Department of Mechanical and Aerospace Engineering, Carleton University, Ottawa ON, Canada, 2019

[2]  **D. Scaramuzza, F. Fraundorfer**, *"Visual Odometry: Part I - The First 30 Years and Fundamentals"*,  IEEE Robotics and Automation Magazine, Volume 18, issue 4, 2011

[3]  **F. Fraundorfer, D. Scaramuzza**, *"Visual odometry: Part II - Matching, robustness, optimization, and applications"*, IEEE Robotics and Automation Magazine, Volume 19, issue 2, 2012

[4] **Avi Singh**, *Visual Odmetry from scratch - A tutorial for beginners*, Avi Singh's Blog

## Contact
Saksham Jindal (saksham.jindal@outlook.com)

gha_language: Python


text:
## Unreleased

## v3.0.0 - 2018-12-20

- Drop support for any Ruby < 2.3 and Rails < 4.2.
- Add support for Rails 5.2
- Resolve Rubocop lint violations
- Test combinations of Ruby and Rails versions in CI

## v2.1.0

- Add `enable_all_index` option to allow disabling the `all` keys. [#7](https://github.com/ileitch/modis/pull/7)

## v2.0.0

- Support MRI 2.2.2+ and JRuby 9k+ [#5](https://github.com/ileitch/modis/pull/5)
- Remove YAML (de)serialization support [#5](https://github.com/ileitch/modis/pull/5)

repository: AkiraMD/modis

repo_name: AkiraMD/modis


text:
# setmy-info-scripts

## Information

## Installation and usage

### CentOS

### Fedora

### FreeBSD

    make clear && rm -Rf CMakeFiles/ Makefile

    echo DEVELOPER=yes >> /etc/make.conf

    sudo make dist

    make makesum

    sudo make install-dist

    sudo make dist makesum install-dist

    sudo make

    sudo make clean-dist

    sudo make clean-dist dist makesum install-dist && sudo make && sudo make install

    sudo make deinstall

### OpenIndiana

## Configuration

## TODO

1. Makefile build without C/C++ check, add bash check instead
2. Add FreeBSD package build.
3. pre scripts to add for install and uninstall
4. DONE: Add Changelog file. Add some other fields too for RPM information.
5. DONE: clean target
6. DONE: etc profile.d
7. Try .term then in installation location profiles
8. make remove or deinstall to uninstall files
9. Set of commands

smi-init
smi-network-add
Network segments: Networks addresses and routers, short name
smi-domain-add
DNS, DHCP, xyx.ee, xyz.lan, zones,
https://www.quackit.com/domain-names/reserved_top-level_domains.cfm
smi-company-add
name, reg, code and other, contacts: certs generation, NFS pools, qotas,etc etc,
smi-node-add
machine name, network(s), domain name(s), IPs/DHCP, MAC, software and sw.groups (dev, office, minimal), services
smi-jail-create
smi-backup
smi-timestamp
smi-uuid
uuidgen
smi-person-add
first, last, birth, email, GPG, etc

smi-vcs-type or -command
smi-vcs-pull
smi-vcs-update
smi-vcs-add
smi-vcs-commit

term -> smi-term
Kubernetes
Docker
Docker compose

Fix man pages: /opt/xyz/share/man

10.

https://www.openca.org/
https://www.openca.org/projects/ocspd/
kerberos

## Usage, tips and tricks

## See also

[xxxx](http://yyyyy)


text:
Select State.gov Data iOS SDK - Example App
====================

This is an example iPhone app that demonstrates how to use the [Select State.gov Data SDK](https://github.com/AcuityInfoMgt/DOSDataAPI "Select State.gov iOS SDK"). The app utilizes the SDK to access information on State.gov about official travel of the U.S. Secretary of State.

View the project on Github for more information about the SDK:

####[Select State.gov iOS SDK](https://github.com/AcuityInfoMgt/DOSDataAPI "Select State.gov iOS SDK")

##Requirements

* iPhone, iPod Touch
* iOS 7+

##Credits

The Select State.gov Data iOS SDK was developed by [Acuity Inc.](http://www.myacuity.com "Acuity Inc.")

##License

The Select State.gov Data iOS SDK Example App is provided under the MIT License. See the LICENSE file for more info.

##Acknowledgements

This application uses image assets from the following sources:

* [State.gov](http://www.state.gov)
* [NASA.gov](http://www.nasa.gov)
* [Andrew Dunn](http://www.andrewdunnphoto.com)
* [PixelLove.com](http://www.pixellove.com)
* [VisualPharm](http://www.visualpharm.com)

repository: AcuityInfoMgt/DOSDataAPIExampleApp

repo_name: AcuityInfoMgt/DOSDataAPIExampleApp


text:
# Raspberry Pi Components

This Gem is a collection of ruby classes made to easily control common components on the Raspberry Pi.
Many examples on how to use them are available in the example directory.

Currently available components are :
 * Led & RGB Led
 * LCD with or without I2C interface
 * Push button
 * Rotary encoder
 * Shift register
 * BME280 & BMP280 (temperature, humidity and atmospheric pressure sensor)
 * HY-SRF05 & HY-SRF04 (Ultrasonic sensor)

### Some quick examples

Before using components, you should do :
```ruby
RpiComponents::setup
```

Make a Led blink or plusate asynchronously :
```ruby
led = RpiComponents::Led.new(11)
led.blink :fast
sleep 5 # Some processing there
led.pulse :slow
sleep 5 # Some processing there
led.off
```

Display a message on a Lcd using I2C bus :

```ruby
lcd = RpiComponents::LcdI2c.new(0x3f)
lcd.message 'Hello'
lcd.message 'World', 2
```

Display data from a BME280 sensor :

```ruby
bme280 = RpiComponents::Bme280.new(0x76)
puts "Temperature: #{'%.2f' % bme280.temp} °C"
puts "Humidity: #{'%.2f' % bme280.humidity} %"
puts "Temperature: #{'%.2f' % bme280.pressure} hPa"
```

Display distance from an object using a HY-SRF05 ultrasonic distance sensor :

```ruby
distance_sensor = RpiComponents::Hysrf05.new(29, 31)
puts "Distance: #{'%.2f' % distance_sensor.accurate_measure} cm"
```

### Dependencies

 * [rpi_gpio](https://github.com/ClockVapor/rpi_gpio) for manipulating Raspberry Pi gpios.
 * [i2c-devices](https://github.com/cho45/ruby-i2c-devices) for i2c bus interface.


text:
# Simple Bible API

Restful Bible API built using Rust and DynamoDB.

## Data Source

Json files sourced from [here](https://github.com/rkazakov/usfm2json/tree/master/json)

## DyanmoDB setup

I prefer using local DynamoDB for testing purposes. To setup your local DynamoDB, follow the [instructions](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DynamoDBLocal.DownloadingAndRunning.html)

## Preparing the environment

Create a `.env` in your project root and add `endpoint` for your Local DynamoDB

```text
endpoint=http://localhost:9090/
```

Build the project

```shell
cargo build
```

## Creating tables for translations and loading the text

The api is designed for one table per translation.

To create the table

```shell
cargo run --bin create <translation_id>

# Creating for KJV
# cargo run --bin create kjv
```

Load the data

```shell
cargo run --bin load <translation_id> <file_path>

# Loading KJV
# cargo run --bin load bibles/kjv.json
```

## Running the api

```shell
cargo run --bin bible_api
```

## Quering the API

### Get complete chapter

```shell
# curl http://<IP_ADDRESS>:9000/search/<translation_id>/<book_id>/<chapter>

curl http://<IP_ADDRESS>:9000/search/asv/Gen/1
```

```json
[
    {
        "chapter": 1,
        "verse": 1,
        "text": "In the beginning God created the heavens and the earth.",
        "translation_id": "ASV",
        "book_id": "Gen",
        "book_name": "Genesis"
    },
    {
        "chapter": 1,
        "verse": 2,
        "text": "And the earth was waste and void; and darkness was upon the face of the deep: and the Spirit of God moved upon the face of the waters",
        "translation_id": "ASV",
        "book_id": "Gen",
        "book_name": "Genesis"
    },
    {
        "chapter": 1,
        "verse": 3,
        "text": "And God said, Let there be light: and there was light.",
        "translation_id": "ASV",
        "book_id": "Gen",
        "book_name": "Genesis"
    },
    ...
]
```

### Filtering verses

#### All verses starting from

```shell
# curl http://<IP_ADDRESS>:9000/search/<translation_id>/<book_id>/<chapter>?from=starting_verse_number

curl http://<IP_ADDRESS>:9000/search/asv/Gen/1?from=2
```

#### All verses until

```shell
# curl http://<IP_ADDRESS>:9000/search/<translation_id>/<book_id>/<chapter>?to=ending_verse_number

curl http://<IP_ADDRESS>:9000/search/asv/Gen/1?to=4
```

#### All verses between

```shell
# curl http://<IP_ADDRESS>:9000/search/<translation_id>/<book_id>/<chapter>?from=starting_verse_number&to=ending_verse_number

curl http://<IP_ADDRESS>:9000/search/asv/Gen/1?from=4&to=8
```


text:
# Abapgit

## Link

Links existing package to remote repository in abapgit

```bash
sapcli abapgit link [--remote-user USER] [--remote-password PASSWORD] [--branch BRANCH] [--corrnr CORRNR] PACKAGE URL
```

If the parameter `--branch` is not present, the `refs/heads/master` value is used.

## Pull

Pulls content from remote repositopry to a package.

After the operation completes, repository status is reported. If status is Error or Aborted, errors and warning from repository are printed.

```bash
sapcli abapgit pull [--remote-user USER] [--remote-password PASSWORD] [--branch BRANCH] [--corrnr CORRNR] PACKAGE
```

If the parameter `--branch` is not present, the `refs/heads/master` value is used.

repository: jfilak/sapcli

repo_name: jfilak/sapcli


text:
# Pokedex

### Getting Started

There are two methods for getting started with this repo.

#### Familiar with Git?
Checkout this repo, install dependencies, then start the gulp process with the following:

```
> git clone https://github.com/durgesh0001/pokedex.git
> cd pokedex
> npm install
> npm start
```


text:
# rdpcmd
script commands over RDP connection

## installation

You need to import registry file in order to disable confirmation RDP prompts (faster and safer):

`
reg import disable-confirmations.reg
`

## usage

Simple usage:
`
rdpcmd <ip> <user> <password> <command> <sleep-after-running>
`

## examples

Run ipconfig, do not close command prompt (you will need to reconnect to RDP to see the output):

`
rdpcmd <IP_ADDRESS> user password "ipconfig" 0
`

Enable winrm, close command prompt after 5000 ms (5 s):

`
rdpcmd <IP_ADDRESS> user password "winrm quickconfig -quiet -force" 5000
`


text:
# Contributing To The Neodroid Platform
These guidelines are universal for the entire [Neodroid](https://github.com/sintefneodroid) Platform

## Pull Requests
We welcome pull requests.

1. Fork the repo and create your branch from `develop`, we are using the git flow branching model.
2. If you've added code that should be tested, add tests.
3. If you've changed APIs, update the documentation.

## Issues
We use GitHub issues to track public bugs. Please ensure your description is
clear and has sufficient instructions to be able to reproduce the issue.

## Coding Style
...

## License
By contributing to the [Neodroid](https://github.com/sintefneodroid) platform, you agree that your contributions will be licensed under the LICENSE file in the root directory of this repository.

repository: sintefneodroid/droid

gha_language: C#

repo_name: sintefneodroid/droid


text:
# tonic

 * [Diablo Tequila N Tonic](../../index/d/diablo-tequila-n-tonic-200539.json)
 * [Gin And Tonic With Cointreau](../../index/g/gin-and-tonic-with-cointreau-201218.json)
 * [Gin Gimlet And Tonic](../../index/g/gin-gimlet-and-tonic-230560.json)
 * [Lenin And Lime Gin And Tonic Sorbetto](../../index/l/lenin-and-lime-gin-and-tonic-sorbetto-51187110.json)
 * [Overeaters Tonic](../../index/o/overeaters-tonic.json)
 * [Tequila And Tonic](../../index/t/tequila-and-tonic-200768.json)
 * [Turmeric Ginger Tonic With Chia Seeds](../../index/t/turmeric-ginger-tonic-with-chia-seeds.json)
 * [Gin And Tonic](../../index/g/gin-and-tonic.json)
 * [Lavender Lemon Vodka Tonic](../../index/l/lavender-lemon-vodka-tonic.json)
 * [Montana Tonic](../../index/m/montana-tonic.json)
 * [Prickly Pear Tonic And Lime](../../index/p/prickly-pear-tonic-and-lime.json)
 * [Watermelon Gin And Tonic](../../index/w/watermelon-gin-and-tonic.json)
 * [Christmas Tonic 200908](../../index/c/christmas-tonic-200908.json)
 * [Diablo Tequila N Tonic 200539](../../index/d/diablo-tequila-n-tonic-200539.json)
 * [Gin And Tonic With Cointreau 201218](../../index/g/gin-and-tonic-with-cointreau-201218.json)
 * [Lenin And Lime Gin And Tonic Sorbetto 51187110](../../index/l/lenin-and-lime-gin-and-tonic-sorbetto-51187110.json)
 * [Overeaters Tonic](../../index/o/overeaters-tonic.json)
 * [Tequila And Tonic 200768](../../index/t/tequila-and-tonic-200768.json)
 * [Turmeric Ginger Tonic With Chia Seeds](../../index/t/turmeric-ginger-tonic-with-chia-seeds.json)


text:
---
templateKey: blog-post
title: Destroy Actor on Overlap
image: https://res.cloudinary.com/dz09rnbhe/image/upload/unrealcpp/destory-on-overlap_b7f8b3.jpg
video: W-vP-tCQcDY
tags: ["beginner"]
uev: 4.18.3
date: 2018-01-27T12:00:00.226Z
description: In this tutorial we'll use the destroy method to remove actors from the game world.
---
**Github Link: [https://github.com/Harrison1/unrealcpp/tree/master/DestroyActorOnOverlap](https://github.com/Harrison1/unrealcpp/tree/master/DestroyActorOnOverlap)**

*For this tutorial we are using the standard first person C++ template with starter content.*

In this tutorial we will use the destroy method to remove actors from the game world. Create a new **actor** class and call it whatever you want, in this tutorial I will call it `DestroyActorOnOverlap`.

First, in the `.h` file we will create an `OnOverlapBegin` function, a `float` variable, a `UStaticMeshComponent`, and a `USphereComponent`. Add the elements to the `public` section of the header file.

#### add to the header file
```cpp
...
// declare collision component
UPROPERTY(VisibleAnywhere)
class USphereComponent* MyCollisionSphere;

// declare mesh component
UPROPERTY(VisibleAnywhere)
class UStaticMeshComponent* MyMesh;

float SphereRadius;

// declare overlap begin function
UFUNCTION()
void OnOverlapBegin(class UPrimitiveComponent* OverlappedComp, class AActor* OtherActor, class UPrimitiveComponent* OtherComp, int32 OtherBodyIndex, bool bFromSweep, const FHitResult& SweepResult);
```

Now let's move into the **actor's** `.cpp` file. In the `constructor` function we will set our default values. Set `SphereRadius` to `100.0f` and setup the static mesh by using `CreateDefaultSubobject` and attach it to the `RootComponent`. Next, we'll setup the collision sphere, `MyCollisionSphere`. Create the component with `CreateDefaultSubobject`, initialize its size with `InitSphereRadius`, set the collision settings with `SetCollisionProfileName`, and then set it as the `RootComponent`. Finally, in the constructor connect the actor to the overlap function with `OnComponentBeginOverlap.AddDynamic`. Below is the code for the default value.

#### Constructor default value
```cpp
ADestroyActorOnOverlap::ADestroyActorOnOverlap()
{
	PrimaryActorTick.bCanEverTick = true;

	SphereRadius = 100.0f;

	MyCollisionSphere = CreateDefaultSubobject<USphereComponent>(TEXT("My Sphere Component"));
	MyCollisionSphere->InitSphereRadius(SphereRadius);
	MyCollisionSphere->SetCollisionProfileName("Trigger");
	RootComponent = MyCollisionSphere;

	MyMesh = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("My Mesh"));
	MyMesh->SetupAttachment(RootComponent);

	MyCollisionSphere->OnComponentBeginOverlap.AddDynamic(this, &ADestroyActorOnOverlap::OnOverlapBegin);

}
```

Include `DrawDebugHelpers.h` at the top of the file so we can visualize our collision sphere.

#### include debug helpers
```cpp
#include "DestroyActorOnOverlap.h"
// include draw debug helpers header file
#include "DrawDebugHelpers.h"
```

In the `Tick` function we'll draw a debug sphere so we can see where the collision is on the actor.

#### Tick function
```cpp
void ADestroyActorOnOverlap::Tick(float DeltaTime)
{
	Super::Tick(DeltaTime);
	DrawDebugSphere(GetWorld(), GetActorLocation(), SphereRadius, 20, FColor::Purple, false, -1, 0, 1);
}
```

Next, create the overlap function that will destroy the actor when an overlap is triggered. We will check if the `OtherActor` is not `null`, and if the `OtherActor` is not the same actor, and if the `OtherComp` is not null. If everything passes, we will call `Destroy()`. Below is the overlap function.

#### overlap function
```cpp
void ADestroyActorOnOverlap::OnOverlapBegin(class UPrimitiveComponent* OverlappedComp, class AActor* OtherActor, class UPrimitiveComponent* OtherComp, int32 OtherBodyIndex, bool bFromSweep, const FHitResult& SweepResult)
{
	if ( (OtherActor != nullptr ) && (OtherActor != this) && ( OtherComp != nullptr ) )
	{
		Destroy();
	}
}
```

Compile the code. Drag and drop the actor into the game world. Add a mesh in the details panel. Now when you push play the actor will be destroyed when you get near it. Below is the final code.

### DestroyActorOnOverlap.h
```cpp
#pragma once

#include "CoreMinimal.h"
#include "GameFramework/Actor.h"
#include "DestroyActorOnOverlap.generated.h"

UCLASS()
class UNREALCPP_API ADestroyActorOnOverlap : public AActor
{
	GENERATED_BODY()

public:
	// Sets default values for this actor's properties
	ADestroyActorOnOverlap();

protected:
	// Called when the game starts or when spawned
	virtual void BeginPlay() override;

public:
	// Called every frame
	virtual void Tick(float DeltaTime) override;

	// declare collision component
	UPROPERTY(VisibleAnywhere)
	class USphereComponent* MyCollisionSphere;

	// declare mesh component
	UPROPERTY(VisibleAnywhere)
	class UStaticMeshComponent* MyMesh;

	float SphereRadius;

	// declare overlap begin function
	UFUNCTION()
	void OnOverlapBegin(class UPrimitiveComponent* OverlappedComp, class AActor* OtherActor, class UPrimitiveComponent* OtherComp, int32 OtherBodyIndex, bool bFromSweep, const FHitResult& SweepResult);

};
```

### DestroyActorOnOverlap.cpp
```cpp
#include "DestroyActorOnOverlap.h"
// include draw debug helpers header file
#include "DrawDebugHelpers.h"

// Sets default values
ADestroyActorOnOverlap::ADestroyActorOnOverlap()
{
 	// Set this actor to call Tick() every frame.  You can turn this off to improve performance if you don't need it.
	PrimaryActorTick.bCanEverTick = true;

	SphereRadius = 100.0f;

	MyCollisionSphere = CreateDefaultSubobject<USphereComponent>(TEXT("My Sphere Component"));
	MyCollisionSphere->InitSphereRadius(SphereRadius);
	MyCollisionSphere->SetCollisionProfileName("Trigger");
	RootComponent = MyCollisionSphere;

	MyMesh = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("My Mesh"));
	MyMesh->SetupAttachment(RootComponent);

	MyCollisionSphere->OnComponentBeginOverlap.AddDynamic(this, &ADestroyActorOnOverlap::OnOverlapBegin);

}

// Called when the game starts or when spawned
void ADestroyActorOnOverlap::BeginPlay()
{
	Super::BeginPlay();

}

// Called every frame
void ADestroyActorOnOverlap::Tick(float DeltaTime)
{
	Super::Tick(DeltaTime);

	DrawDebugSphere(GetWorld(), GetActorLocation(), SphereRadius, 20, FColor::Purple, false, -1, 0, 1);

}

void ADestroyActorOnOverlap::OnOverlapBegin(class UPrimitiveComponent* OverlappedComp, class AActor* OtherActor, class UPrimitiveComponent* OtherComp, int32 OtherBodyIndex, bool bFromSweep, const FHitResult& SweepResult)
{
	if ( (OtherActor != nullptr ) && (OtherActor != this) && ( OtherComp != nullptr ) )
	{
		Destroy();
	}
}
```

repository: tiepdotme/unrealcpp-com

repo_name: tiepdotme/unrealcpp-com


text:
# PopART Recomputing demo

> Copyright 2019 Graphcore Ltd.

This example runs generated data through a seven layer DNN.
It shows how to use manual and automatic recomputation in popART.

Manual recomputing allows the user to choose which ops to recompute.

Automatic recomputing uses an heuristic technique.
See https://arxiv.org/abs/1604.06174

## Usage

1) Prepare the environment.

   Install the Poplar SDK following the instructions in the [Getting Started guide](https://docs.graphcore.ai/en/latest/getting-started.html) for your IPU system.

2) Install the required packages.

```cmd
pip install -r requirements.txt
```

3) Run the program. Note that the PopART Python API only supports Python 3.

```cmd
python3 recomputing.py
```

## Options

The program has a few command-line options:

`--help` Show usage information

`--export FILE` Export the model created to FILE

`--recomputing STATUS` Choice amongst ON (default), AUTO and OFF

* ON recomputes activations for all but checkpointed layers
* AUTO uses popART auto recomputation
* OFF deactivate recomputing altogether

`--show-logs` show execution logs

## Profiling

The Poplar SDK can generate report files during the compilation and execution of applications.
The following enables report generation, and specifies a directory to generate reports in.

```
export POPLAR_ENGINE_OPTIONS='{"autoReport.all":"true", "autoReport.directory":"."}'
```

After running an application, the resulting report files can be opened using the PopVision Graph Analyser.
See the PopVision user guide for more information:
[PopVision User Guide](https://docs.graphcore.ai/projects/graphcore-popvision-user-guide/en/latest/index.html).

## Run the tests

Install the required packages, then use pytest to run the example in all three recomputation modes.

```cmd
pip install -r requirements.txt
python -m pytest
```

repository: Adamage/tutorials

gha_license_id: NOASSERTION

repo_name: Adamage/tutorials


text:
---
layout: default
---

# 1997-01-01 - benefits of EAR (not)?

## Header Data

From: Adam Back<EMAIL_ADDRESS>To<EMAIL_ADDRESS>Message Hash: 625fb62838e5d5ebc552c4d7edca7e0f36e29fd8ca0925731f623f8f4621317f

Message ID<EMAIL_ADDRESS>Reply To: _N/A_

UTC Datetime: 1997-01-01 22:01:09 UTC

Raw Date: Wed, 1 Jan 1997 14:01:09 -0800 (PST)

## Raw message

```
{% raw  %}From: Adam Back<EMAIL_ADDRESS>Date: Wed, 1 Jan 1997 14:01:09 -0800 (PST)
To<EMAIL_ADDRESS>Subject: benefits of EAR (not)?
Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

Reading through "http://jya.com/bxa123096.txt":

>     1. This interim rule has been determined to be significant for
> purposes of E.O. 12866. A cost benefit analysis has been prepared and
> is available upon request by contacting James A. Lewis at (202) 482-
> 0092.

Anyone availed themselves of this offer of a CBA for EAR?  Just
curious as to what the supposed benefits are :-)

Adam
--
print pack"C*",split/\D+/,`echo "16iII*o\U@{$/=$z;[(pop,pop,unpack"H*",<>
)]}\EsMsKsN0[lN*1lK[d2%Sa2/d0<X+d*lMLa^*lN%0]dsXx++lMlN/dsM0<J]dsJxp"|dc`

{% endraw %}
```

## Thread

+ Return to [January 1997](/archive/1997/01)

+ Return to "[Adam Back <aba@dcs.ex.ac.uk>](/authors/adam_back_aba_at_dcs_ex_ac_uk_)"
+ Return to "[Adam Shostack <adam@homeport.org>](/authors/adam_shostack_adam_at_homeport_org_)"
+ Return to "[Clinton Weiss <Chipper@cris.com>](/authors/clinton_weiss_chipper_at_cris_com_)"
+ Return to<EMAIL_ADDRESS>(Dr.Dimitri Vulis KOTM)](/authors/dlv_at_bwalk_dm_com_dr_dimitri_vulis_kotm_)"

+ 1997-01-01 (Wed, 1 Jan 1997 14:01:09 -0800 (PST)) - benefits of EAR (not)? - _Adam Back<EMAIL_ADDRESS>  + 1997-01-02 (Thu, 2 Jan 1997 08:39:57 -0800 (PST)) - [Re: benefits of EAR (not)?](/archive/1997/01/9faf74a5e150ea484c8f4dca35c6b81c2cc82b57dfbb7a27fa01d036706e1d29) - _Adam Shostack<EMAIL_ADDRESS>    + 1997-01-02 (Thu, 2 Jan 1997 10:09:22 -0800 (PST)) - [Re: benefits of EAR (not)?](/archive/1997/01/2003d019c7afd0ea41390d4e05d3feb6be5c1f95d62614cc5968a25b586f9b1f) - _Clinton Weiss<EMAIL_ADDRESS>      + 1997-01-03 (Thu, 2 Jan 1997 18:40:15 -0800 (PST)) - [Re: benefits of EAR (not)?](/archive/1997/01/330255bb36dab5e2222f922e1da25359cda15223c6064d6e0befef23cb561b7b) -<EMAIL_ADDRESS>(Dr.Dimitri Vulis KOTM)_


text:
# glickorank

A simple implementation of the Glicko-2 rating system.

Input is on stdin and output is on stdout.

Ratings are of the form:

```
   [timestamp] [game/class] [rating] [player] rd=[ratingdeviation] v=[volatility]
```

Match results are of the form:

```
   [timestamp] [game/class] [1-0/0-1/1-1] [player1] [player2]
```

Input consists of an optional section of pre-existing ratings,
followed by a section of match results.

Output consists of ratings.

The `game/class` feature allows one to track several parallel games at once;
for instance chess and go, or different game modes in a video game.
At any rate, the ratings for the different game classes will be completely
independent.

repository: steinarvk/glickorank

repo_name: steinarvk/glickorank


text:
# PySARTS

PySARTS is a Python package I developed during my undergraduate dissertation
while working with interferometric synthetic aperture radar (InSAR) data. The
package implements methods for working with timeseries of interferograms and
making atmospheric corrections. There's also a variety of plotting methods.

The atmospheric corrections were the focus of my dissertation. I investigated
the use of weather radar for atmospheric corrections. Two of the implemented
corrections were developed during my dissertation: a correction for the liquid
delay using radar data and a correction for the wet and dry delays using the
ERA-interim weather model and radar data. An additional "pure" weather model
correction is also implemented with an implementation based off [TRAIN][train]
(with some differences).

[train]: http://www.davidbekaert.com/

# Intended Audience

I don't expect anyone to use the project for anything professional in its
current form.  If I get time, I'll
try to document the package more thoroughly but otherwise, I don't foresee any
further development.

# Installation

Clone the repository and put it with your other Python packages. Or update your
`PYTHONPATH` environment variable to point at another location where you've
stored the repository.

The file `requirements.txt` lists the project's requirements. You can run `pip
install -r requirements.txt` from the repository to install everything. The main
requirements are the [SciPy stack][scipy], [Numba][numba] and [netCDF][netcdf]
bindings. PySARTS has only been tested with Python 3 but might work with Python
2 too.

[scipy]: https://www.scipy.org/
[numba]: http://numba.pydata.org/
[netcdf]: https://unidata.github.io/netcdf4-python/

# Usage

## The Project Directory

PySARTS works with a project directory. This is a directory containing a file
called `config.yml` that tells PySARTS:

1. The study region.
2. The resolution to work at.
3. The location of your data (if it isn't in the project directory).
4. The master study date.

Check out the `example_config.yml` file in the repository to see what the
configuration looks like. The data paths in the example file are the default
paths. If you put those directories/files in the project directory, you don't
need to configure anything.

## Required Files

As a bare minimum, you'll need the following files:

- A directory containing unwrapped interferograms named
  `SLAVEDATE_MASTERDATE.nc` where dates are formatted as `%Y%m%d`.
- A text file containing the perpendicular baselines for the
  interferograms. This should have three columns: the slave date, master date
  and the perpendicular baseline.

To do anything with weather radar data you'll need

- A directory containing weather radar images (Cartesian, not radial) named
  `%Y%m%d%H%M.nc`.

For any atmospheric corrections, you're going to need

- A DEM of the target region.
- A directory containing weather model output named `%Y%m%d%H%M.nc`.

## Data Formats

PySARTS works with NetCDF 4 files. Everything in the previous section needs to
be in NetCDF format (except the baselines file). 2D data (interferograms, radar
images) needs three variables in the NetCDF:

- Two 1D arrays containing longitudes and latitudes.
- A 2D array containing the data.

These variables can be called either `x`, `y` and `z` OR `lon`, `lat` and
`Band1`. If those variables aren't found, you'll get some cryptic error from
NetCDF.

Weather model output should contain 7 variables. Three of those variables should
be the modelled temperature, relative humidity and geopotential. The variable
names should be the same as those produced by ERA-interim. If you download
output from ERA-interim containing the aforementioned modelled variables, you
should be good to go. **Note**: Only the first time in the model output will be
read. You should store separate model times in separate files.

## Command Line Interface

PySARTS exposes a command line interface from the `pysarts` and `pysarts.plot`
modules. Assuming your `PYTHONPATH` is set correctly, you can run

``` sh
python -m pysarts -h
python -m pysarts.plot -h
```

to get help with the command line interfaces. The help isn't great but it should
be enough to get you going. For more details on how things work, check out the
documentation strings in the source.

# API

All modules under `pysarts` except the `workflow`, `plot` and `config` modules
are designed to be usable from other programs or scripts. They make no
assumptions about the existence of a project directory or any files. You should
read the docstrings of the methods to see how to use them.

# License

MIT. Go wild.

repository: nameji/pysarts

repo_name: nameji/pysarts


text:
# Wrapper.Controllable Module
This module contains the CONTROLLABLE class.

##### 1) [CONTROLLABLE](#controllable-class-) class, extends [POSITIONABLE](#positionable-class-)

The [CONTROLLABLE](#controllable-class-) class is a wrapper class to handle the DCS Controllable objects:

* Support all DCS Controllable APIs.
* Enhance with Controllable specific APIs not in the DCS Controllable API set.
* Handle local Controllable Controller.
* Manage the "state" of the DCS Controllable.

##### 1.1) CONTROLLABLE constructor

The CONTROLLABLE class provides the following functions to construct a CONTROLLABLE instance:

* [CONTROLLABLE:New()](#controllable-new-controllablename): Create a CONTROLLABLE instance.

##### 1.2) CONTROLLABLE task methods

Several controllable task methods are available that help you to prepare tasks.
These methods return a string consisting of the task description, which can then be given to either a CONTROLLABLE-PushTask- or @{Controllable#SetTask} method to assign the task to the CONTROLLABLE.
Tasks are specific for the category of the CONTROLLABLE, more specific, for AIR, GROUND or AIR and GROUND.
Each task description where applicable indicates for which controllable category the task is valid.
There are 2 main subdivisions of tasks: Assigned tasks and EnRoute tasks.

#####  1.2.1) Assigned task methods

Assigned task methods make the controllable execute the task where the location of the (possible) targets of the task are known before being detected.
This is different from the EnRoute tasks, where the targets of the task need to be detected before the task can be executed.

Find below a list of the **assigned task** methods:

* [CONTROLLABLE:TaskAttackGroup()](#controllable-taskattackgroup-attackgroup-weapontype-weaponexpend-attackqty-direction-altitude-attackqtylimit): (AIR) Attack a Controllable.
* [CONTROLLABLE:TaskAttackMapObject()](#controllable-taskattackmapobject-vec2-groupattack-weaponexpend-attackqty-direction-altitude-weapontype): (AIR) Attacking the map object (building, structure, e.t.c).
* [CONTROLLABLE:TaskAttackUnit()](#controllable-taskattackunit-attackunit-groupattack-weaponexpend-attackqty-direction-altitude-visible-weapontype): (AIR) Attack the Unit.
* [CONTROLLABLE:TaskBombing()](#controllable-taskbombing-vec2-groupattack-weaponexpend-attackqty-direction-altitude-weapontype): (AIR) Delivering weapon at the point on the ground.
* [CONTROLLABLE:TaskBombingRunway()](#controllable-taskbombingrunway-airbase-weapontype-weaponexpend-attackqty-direction-controllableattack): (AIR) Delivering weapon on the runway.
* [CONTROLLABLE:TaskEmbarking()](#controllable-taskembarking-point-duration-embarkingcontrollable): (AIR) Move the controllable to a Vec2 Point, wait for a defined duration and embark a controllable.
* [CONTROLLABLE:TaskEmbarkToTransport()](#controllable-taskembarktotransport-point-radius): (GROUND) Embark to a Transport landed at a location.
* [CONTROLLABLE:TaskEscort()](#controllable-taskescort-escortcontrollable-vec3-lastwaypointindex-engagementdistancemax-targettypes): (AIR) Escort another airborne controllable.
* [CONTROLLABLE:TaskFAC_AttackGroup()](#controllable-taskfac_attackgroup-attackgroup-weapontype-designation-datalink): (AIR + GROUND) The task makes the controllable/unit a FAC and orders the FAC to control the target (enemy ground controllable) destruction.
* [CONTROLLABLE:TaskFireAtPoint()](#controllable-taskfireatpoint-vec2-radius-ammocount): (GROUND) Fire some or all ammunition at a VEC2 point.
* [CONTROLLABLE:TaskFollow()](#controllable-taskfollow-followcontrollable-vec3-lastwaypointindex): (AIR) Following another airborne controllable.
* CONTROLLABLE-TaskHold-: (GROUND) Hold ground controllable from moving.
* [CONTROLLABLE:TaskHoldPosition()](#controllable-taskholdposition-duration): (AIR) Hold position at the current position of the first unit of the controllable.
* CONTROLLABLE-TaskLand-: (AIR HELICOPTER) Landing at the ground. For helicopters only.
* [CONTROLLABLE:TaskLandAtZone()](#controllable-tasklandatzone-zone-duration): (AIR) Land the controllable at a @{Zone#ZONE_RADIUS).
* [CONTROLLABLE:TaskOrbitCircle()](#controllable-taskorbitcircle-altitude-speed): (AIR) Orbit at the current position of the first unit of the controllable at a specified alititude.
* [CONTROLLABLE:TaskOrbitCircleAtVec2()](#controllable-taskorbitcircleatvec2-point-altitude-speed): (AIR) Orbit at a specified position at a specified alititude during a specified duration with a specified speed.
* CONTROLLABLE-TaskRefueling-: (AIR) Refueling from the nearest tanker. No parameters.
* [CONTROLLABLE:TaskRoute()](#controllable-taskroute-points): (AIR + GROUND) Return a Misson task to follow a given route defined by Points.
* CONTROLLABLE-TaskRouteToVec2-: (AIR + GROUND) Make the Controllable move to a given point.
* CONTROLLABLE-TaskRouteToVec3-: (AIR + GROUND) Make the Controllable move to a given point.
* [CONTROLLABLE:TaskRouteToZone()](#controllable-taskroutetozone-zone-randomize-speed-formation): (AIR + GROUND) Route the controllable to a given zone.
* CONTROLLABLE-TaskReturnToBase-: (AIR) Route the controllable to an airbase.

#####  1.2.2) EnRoute task methods

EnRoute tasks require the targets of the task need to be detected by the controllable (using its sensors) before the task can be executed:

* CONTROLLABLE-EnRouteTaskAWACS-: (AIR) Aircraft will act as an AWACS for friendly units (will provide them with information about contacts). No parameters.
* CONTROLLABLE-EnRouteTaskEngageControllable-: (AIR) Engaging a controllable. The task does not assign the target controllable to the unit/controllable to attack now; it just allows the unit/controllable to engage the target controllable as well as other assigned targets.
* [CONTROLLABLE:EnRouteTaskEngageTargets()](#controllable-enroutetaskengagetargets-distance-targettypes-priority): (AIR) Engaging targets of defined types.
* CONTROLLABLE-EnRouteTaskEWR-: (AIR) Attack the Unit.
* [CONTROLLABLE:EnRouteTaskFAC()](#controllable-enroutetaskfac-radius-priority): (AIR + GROUND) The task makes the controllable/unit a FAC and lets the FAC to choose a targets (enemy ground controllable) around as well as other assigned targets.
* CONTROLLABLE-EnRouteTaskFAC_EngageControllable-: (AIR + GROUND) The task makes the controllable/unit a FAC and lets the FAC to choose the target (enemy ground controllable) as well as other assigned targets.
* CONTROLLABLE-EnRouteTaskTanker-: (AIR) Aircraft will act as a tanker for friendly units. No parameters.

#####  1.2.3) Preparation task methods

There are certain task methods that allow to tailor the task behaviour:

* [CONTROLLABLE:TaskWrappedAction()](#controllable-taskwrappedaction-dcscommand): Return a WrappedAction Task taking a Command.
* [CONTROLLABLE:TaskCombo()](#controllable-taskcombo-dcstasks): Return a Combo Task taking an array of Tasks.
* [CONTROLLABLE:TaskCondition()](#controllable-taskcondition-time-userflag-userflagvalue-condition-duration-lastwaypoint): Return a condition section for a controlled task.
* [CONTROLLABLE:TaskControlled()](#controllable-taskcontrolled-dcstask-dcsstopcondition): Return a Controlled Task taking a Task and a TaskCondition.

#####  1.2.4) Obtain the mission from controllable templates

Controllable templates contain complete mission descriptions. Sometimes you want to copy a complete mission from a controllable and assign it to another:

* [CONTROLLABLE:TaskMission()](#controllable-taskmission-taskmission): (AIR + GROUND) Return a mission task from a mission template.

##### 1.3) CONTROLLABLE Command methods

Controllable **command methods** prepare the execution of commands using the [CONTROLLABLE:SetCommand()](#controllable-setcommand-dcscommand) method:

* [CONTROLLABLE:CommandDoScript()](#controllable-commanddoscript-doscript): Do Script command.
* [CONTROLLABLE:CommandSwitchWayPoint()](#controllable-commandswitchwaypoint-fromwaypoint-towaypoint): Perform a switch waypoint command.

##### 1.4) CONTROLLABLE Option methods

Controllable **Option methods** change the behaviour of the Controllable while being alive.

#####  1.4.1) Rule of Engagement:

* CONTROLLABLE-OptionROEWeaponFree-
* CONTROLLABLE-OptionROEOpenFire-
* CONTROLLABLE-OptionROEReturnFire-
* CONTROLLABLE-OptionROEEvadeFire-

To check whether an ROE option is valid for a specific controllable, use:

* CONTROLLABLE-OptionROEWeaponFreePossible-
* CONTROLLABLE-OptionROEOpenFirePossible-
* CONTROLLABLE-OptionROEReturnFirePossible-
* CONTROLLABLE-OptionROEEvadeFirePossible-

#####  1.4.2) Rule on thread:

* CONTROLLABLE-OptionROTNoReaction-
* CONTROLLABLE-OptionROTPassiveDefense-
* CONTROLLABLE-OptionROTEvadeFire-
* CONTROLLABLE-OptionROTVertical-

To test whether an ROT option is valid for a specific controllable, use:

* CONTROLLABLE-OptionROTNoReactionPossible-
* CONTROLLABLE-OptionROTPassiveDefensePossible-
* CONTROLLABLE-OptionROTEvadeFirePossible-
* CONTROLLABLE-OptionROTVerticalPossible-

## CONTROLLABLE Class

Inheritance : The CONTROLLABLE Class inherits from the following parents :
BASE
	`-- OBJECT
		`-- IDENTIFIABLE
			`-- POSITIONABLE
				`-- CONTROLLABLE

 Attributes

* Dcs.DCSWrapper.Controllable#Controllable DCSControllable : The DCS controllable class.
* String ControllableName : The name of the controllable.

### CONTROLLABLE:New(ControllableName)
Create a new CONTROLLABLE from a DCSControllable

 Parameters

* [CONTROLLABLE](#controllable-class-)
self
* Dcs.DCSWrapper.Controllable#Controllable ControllableName : The DCS Controllable name

 Returns

* [CONTROLLABLE](#controllable-class-)

### CONTROLLABLE:GetUnits()
Returns the UNITs wrappers of the DCS Units of the Controllable (default is a GROUP).

 Parameters

* [CONTROLLABLE](#controllable-class-)
self

 Returns

* #list<Wrapper.Unit#UNIT>  The UNITs wrappers.

### CONTROLLABLE:GetLife()
Returns the health. Dead controllables have health <= 1.0.

 Parameters

* [CONTROLLABLE](#controllable-class-)
self

 Returns

* Number  The controllable health value (unit or group average).
* Nil  The controllable is not existing or alive.

### CONTROLLABLE:ClearTasks()
Clear all tasks from the controllable.

 Parameters

* [CONTROLLABLE](#controllable-class-)
self

 Returns

* [CONTROLLABLE](#controllable-class-)

### CONTROLLABLE:PopCurrentTask()
Popping current Task from the controllable.

 Parameters

* [CONTROLLABLE](#controllable-class-)
self

 Returns

* [CONTROLLABLE](#controllable-class-)

### CONTROLLABLE:PushTask()
Pushing Task on the queue from the controllable.

 Parameters

* [CONTROLLABLE](#controllable-class-)
self

 Returns

* [CONTROLLABLE](#controllable-class-)

### CONTROLLABLE:SetTask()
Clearing the Task Queue and Setting the Task on the queue from the controllable.

 Parameters

* [CONTROLLABLE](#controllable-class-)
self

 Returns

* [CONTROLLABLE](#controllable-class-)

### CONTROLLABLE:TaskCondition(time, userFlag, userFlagValue, condition, duration, lastWayPoint)
Return a condition section for a controlled task.

 Parameters

* [CONTROLLABLE](#controllable-class-)
self
* [Time](#time-class-) time
* String userFlag
* Boolean userFlagValue
* String condition
* [Time](#time-class-) duration
* Number lastWayPoint

 Returns

### CONTROLLABLE:TaskControlled(DCSTask, DCSStopCondition)
Return a Controlled Task taking a Task and a TaskCondition.

 Parameters

* [CONTROLLABLE](#controllable-class-)
self
* Dcs.DCSTasking.Task#Task DCSTask
* #DCSStopCondition DCSStopCondition

 Returns

* Dcs.DCSTasking.Task#Task

### CONTROLLABLE:TaskCombo(DCSTasks)
Return a Combo Task taking an array of Tasks.

 Parameters

* [CONTROLLABLE](#controllable-class-)
self
* Dcs.DCSTasking.Task#TaskArray DCSTasks : Array of @{DCSTasking.Task#Task}

 Returns

* Dcs.DCSTasking.Task#Task

### CONTROLLABLE:TaskWrappedAction(DCSCommand)
Return a WrappedAction Task taking a Command.

 Parameters

* [CONTROLLABLE](#controllable-class-)
self
* [Command](#command-class-) DCSCommand

 Returns

* Dcs.DCSTasking.Task#Task

### CONTROLLABLE:SetCommand(DCSCommand)
Executes a command action

 Parameters

* [CONTROLLABLE](#controllable-class-)
self
* [Command](#command-class-) DCSCommand

 Returns

* [CONTROLLABLE](#controllable-class-)

### CONTROLLABLE:CommandSwitchWayPoint(FromWayPoint, ToWayPoint)
``` lua
 This test demonstrates the use(s) of the SwitchWayPoint method of the GROUP class.
HeliGroup = GROUP:FindByName( "Helicopter" )

 Route the helicopter back to the FARP after 60 seconds.
-- We use the SCHEDULER class to do this.
SCHEDULER:New( nil,
function( HeliGroup )
local CommandRTB = HeliGroup:CommandSwitchWayPoint( 2, 8 )
HeliGroup:SetCommand( CommandRTB )
end, { HeliGroup }, 90
)
```
Perform a switch waypoint command

 Parameters

* [CONTROLLABLE](#controllable-class-)
self
* Number FromWayPoint
* Number ToWayPoint

 Returns

* Dcs.DCSTasking.Task#Task

### CONTROLLABLE:CommandStopRoute(StopRoute)
Create a stop route command, which returns a string containing the command.
Use the result in the method [CONTROLLABLE:SetCommand()](#controllable-setcommand-dcscommand).
A value of true will make the ground group stop, a value of false will make it continue.
Note that this can only work on GROUP level, although individual UNITs can be commanded, the whole GROUP will react.

Example missions:

* GRP-310

 Parameters

* [CONTROLLABLE](#controllable-class-)
self
* Boolean StopRoute : true if the ground unit needs to stop, false if it needs to continue to move.

 Returns

* Dcs.DCSTasking.Task#Task

### CONTROLLABLE:TaskAttackGroup(AttackGroup, WeaponType, WeaponExpend, AttackQty, Direction, Altitude, AttackQtyLimit)
(AIR) Attack a Controllable.

 Parameters

* [CONTROLLABLE](#controllable-class-)
self
* [CONTROLLABLE](#controllable-class-) AttackGroup : The Controllable to be attacked.
* Number WeaponType : (optional) Bitmask of weapon types those allowed to use. If parameter is not defined that means no limits on weapon usage.
* [AI.Task.WeaponExpend](#ai.task.weaponexpend-class-) WeaponExpend : (optional) Determines how much weapon will be released at each attack. If parameter is not defined the unit / controllable will choose expend on its own discretion.
* Number AttackQty : (optional) This parameter limits maximal quantity of attack. The aicraft/controllable will not make more attack than allowed even if the target controllable not destroyed and the aicraft/controllable still have ammo. If not defined the aircraft/controllable will attack target until it will be destroyed or until the aircraft/controllable will run out of ammo.
* [Azimuth](#azimuth-class-) Direction : (optional) Desired ingress direction from the target to the attacking aircraft. Controllable/aircraft will make its attacks from the direction. Of course if there is no way to attack from the direction due the terrain controllable/aircraft will choose another direction.
* [Distance](#distance-class-) Altitude : (optional) Desired attack start altitude. Controllable/aircraft will make its attacks from the altitude. If the altitude is too low or too high to use weapon aircraft/controllable will choose closest altitude to the desired attack start altitude. If the desired altitude is defined controllable/aircraft will not attack from safe altitude.
* Boolean AttackQtyLimit : (optional) The flag determines how to interpret attackQty parameter. If the flag is true then attackQty is a limit on maximal attack quantity for "AttackGroup" and "AttackUnit" tasks. If the flag is false then attackQty is a desired attack quantity for "Bombing" and "BombingRunway" tasks.

 Returns

* Dcs.DCSTasking.Task#Task  The DCS task structure.

### CONTROLLABLE:TaskAttackUnit(AttackUnit, GroupAttack, WeaponExpend, AttackQty, Direction, Altitude, Visible, WeaponType)
(AIR) Attack the Unit.

 Parameters

* [CONTROLLABLE](#controllable-class-)
self
* [UNIT](#unit-class-) AttackUnit : The UNIT.
* Boolean GroupAttack : (optional) If true, all units in the group will attack the Unit when found.
* [AI.Task.WeaponExpend](#ai.task.weaponexpend-class-) WeaponExpend : (optional) Determines how much weapon will be released at each attack. If parameter is not defined the unit / controllable will choose expend on its own discretion.
* Number AttackQty : (optional) This parameter limits maximal quantity of attack. The aicraft/controllable will not make more attack than allowed even if the target controllable not destroyed and the aicraft/controllable still have ammo. If not defined the aircraft/controllable will attack target until it will be destroyed or until the aircraft/controllable will run out of ammo.
* [Azimuth](#azimuth-class-) Direction : (optional) Desired ingress direction from the target to the attacking aircraft. Controllable/aircraft will make its attacks from the direction. Of course if there is no way to attack from the direction due the terrain controllable/aircraft will choose another direction.
* Number Altitude : (optional) The altitude from where to attack.
* Boolean Visible : (optional) not a clue.
* Number WeaponType : (optional) The WeaponType.

 Returns

* Dcs.DCSTasking.Task#Task  The DCS task structure.

### CONTROLLABLE:TaskBombing(Vec2, GroupAttack, WeaponExpend, AttackQty, Direction, Altitude, WeaponType)
(AIR) Delivering weapon at the point on the ground.

 Parameters

* [CONTROLLABLE](#controllable-class-)
self
* [Vec2](#vec2-class-) Vec2 : 2D-coordinates of the point to deliver weapon at.
* Boolean GroupAttack : (optional) If true, all units in the group will attack the Unit when found.
* [AI.Task.WeaponExpend](#ai.task.weaponexpend-class-) WeaponExpend : (optional) Determines how much weapon will be released at each attack. If parameter is not defined the unit / controllable will choose expend on its own discretion.
* Number AttackQty : (optional) This parameter limits maximal quantity of attack. The aicraft/controllable will not make more attack than allowed even if the target controllable not destroyed and the aicraft/controllable still have ammo. If not defined the aircraft/controllable will attack target until it will be destroyed or until the aircraft/controllable will run out of ammo.
* [Azimuth](#azimuth-class-) Direction : (optional) Desired ingress direction from the target to the attacking aircraft. Controllable/aircraft will make its attacks from the direction. Of course if there is no way to attack from the direction due the terrain controllable/aircraft will choose another direction.
* Number Altitude : (optional) The altitude from where to attack.
* Number WeaponType : (optional) The WeaponType.

 Returns

* Dcs.DCSTasking.Task#Task  The DCS task structure.

### CONTROLLABLE:TaskAttackMapObject(Vec2, GroupAttack, WeaponExpend, AttackQty, Direction, Altitude, WeaponType)
(AIR) Attacking the map object (building, structure, e.t.c).

 Parameters

* [CONTROLLABLE](#controllable-class-)
self
* [Vec2](#vec2-class-) Vec2 : 2D-coordinates of the point to deliver weapon at.
* Boolean GroupAttack : (optional) If true, all units in the group will attack the Unit when found.
* [AI.Task.WeaponExpend](#ai.task.weaponexpend-class-) WeaponExpend : (optional) Determines how much weapon will be released at each attack. If parameter is not defined the unit / controllable will choose expend on its own discretion.
* Number AttackQty : (optional) This parameter limits maximal quantity of attack. The aicraft/controllable will not make more attack than allowed even if the target controllable not destroyed and the aicraft/controllable still have ammo. If not defined the aircraft/controllable will attack target until it will be destroyed or until the aircraft/controllable will run out of ammo.
* [Azimuth](#azimuth-class-) Direction : (optional) Desired ingress direction from the target to the attacking aircraft. Controllable/aircraft will make its attacks from the direction. Of course if there is no way to attack from the direction due the terrain controllable/aircraft will choose another direction.
* Number Altitude : (optional) The altitude from where to attack.
* Number WeaponType : (optional) The WeaponType.

 Returns

* Dcs.DCSTasking.Task#Task  The DCS task structure.

### CONTROLLABLE:TaskOrbitCircleAtVec2(Point, Altitude, Speed)
(AIR) Orbit at a specified position at a specified alititude during a specified duration with a specified speed.

 Parameters

* [CONTROLLABLE](#controllable-class-)
self
* [Vec2](#vec2-class-) Point : The point to hold the position.
* Number Altitude : The altitude to hold the position.
* Number Speed : The speed flying when holding the position.

 Returns

* [CONTROLLABLE](#controllable-class-)

### CONTROLLABLE:TaskOrbitCircle(Altitude, Speed)
(AIR) Orbit at the current position of the first unit of the controllable at a specified alititude.

 Parameters

* [CONTROLLABLE](#controllable-class-)
self
* Number Altitude : The altitude to hold the position.
* Number Speed : The speed flying when holding the position.

 Returns

* [CONTROLLABLE](#controllable-class-)

### CONTROLLABLE:TaskHoldPosition(Duration)
(AIR) Hold position at the current position of the first unit of the controllable.

 Parameters

* [CONTROLLABLE](#controllable-class-)
self
* Number Duration : The maximum duration in seconds to hold the position.

 Returns

* [CONTROLLABLE](#controllable-class-)

### CONTROLLABLE:TaskBombingRunway(Airbase, WeaponType, WeaponExpend, AttackQty, Direction, ControllableAttack)
(AIR) Delivering weapon on the runway.

 Parameters

* [CONTROLLABLE](#controllable-class-)
self
* [AIRBASE](#airbase-class-) Airbase : Airbase to attack.
* Number WeaponType : (optional) Bitmask of weapon types those allowed to use. If parameter is not defined that means no limits on weapon usage.
* [AI.Task.WeaponExpend](#ai.task.weaponexpend-class-) WeaponExpend : (optional) Determines how much weapon will be released at each attack. If parameter is not defined the unit / controllable will choose expend on its own discretion.
* Number AttackQty : (optional) This parameter limits maximal quantity of attack. The aicraft/controllable will not make more attack than allowed even if the target controllable not destroyed and the aicraft/controllable still have ammo. If not defined the aircraft/controllable will attack target until it will be destroyed or until the aircraft/controllable will run out of ammo.
* [Azimuth](#azimuth-class-) Direction : (optional) Desired ingress direction from the target to the attacking aircraft. Controllable/aircraft will make its attacks from the direction. Of course if there is no way to attack from the direction due the terrain controllable/aircraft will choose another direction.
* Boolean ControllableAttack : (optional) Flag indicates that the target must be engaged by all aircrafts of the controllable. Has effect only if the task is assigned to a controllable, not to a single aircraft.

 Returns

* Dcs.DCSTasking.Task#Task  The DCS task structure.

### CONTROLLABLE:TaskRefueling()
(AIR) Refueling from the nearest tanker. No parameters.

 Parameters

* [CONTROLLABLE](#controllable-class-)
self

 Returns

* Dcs.DCSTasking.Task#Task  The DCS task structure.

### CONTROLLABLE:TaskLandAtVec2(Point, Duration)
(AIR HELICOPTER) Landing at the ground. For helicopters only.

 Parameters

* [CONTROLLABLE](#controllable-class-)
self
* [Vec2](#vec2-class-) Point : The point where to land.
* Number Duration : The duration in seconds to stay on the ground.

 Returns

* [CONTROLLABLE](#controllable-class-)

### CONTROLLABLE:TaskLandAtZone(Zone, Duration)
(AIR) Land the controllable at a @{Zone#ZONE_RADIUS).

 Parameters

* [CONTROLLABLE](#controllable-class-)
self
* [ZONE](#zone-class-) Zone : The zone where to land.
* Number Duration : The duration in seconds to stay on the ground.

 Returns

* [CONTROLLABLE](#controllable-class-)

### CONTROLLABLE:TaskFollow(FollowControllable, Vec3, LastWaypointIndex)
(AIR) Following another airborne controllable.
The unit / controllable will follow lead unit of another controllable, wingmens of both controllables will continue following their leaders.
If another controllable is on land the unit / controllable will orbit around.

 Parameters

* [CONTROLLABLE](#controllable-class-)
self
* [CONTROLLABLE](#controllable-class-) FollowControllable : The controllable to be followed.
* [Vec3](#vec3-class-) Vec3 : Position of the unit / lead unit of the controllable relative lead unit of another controllable in frame reference oriented by course of lead unit of another controllable. If another controllable is on land the unit / controllable will orbit around.
* Number LastWaypointIndex : Detach waypoint of another controllable. Once reached the unit / controllable Follow task is finished.

 Returns

* Dcs.DCSTasking.Task#Task  The DCS task structure.

### CONTROLLABLE:TaskEscort(EscortControllable, Vec3, LastWaypointIndex, EngagementDistanceMax, TargetTypes)
(AIR) Escort another airborne controllable.
The unit / controllable will follow lead unit of another controllable, wingmens of both controllables will continue following their leaders.
The unit / controllable will also protect that controllable from threats of specified types.

 Parameters

* [CONTROLLABLE](#controllable-class-)
self
* [CONTROLLABLE](#controllable-class-) EscortControllable : The controllable to be escorted.
* [Vec3](#vec3-class-) Vec3 : Position of the unit / lead unit of the controllable relative lead unit of another controllable in frame reference oriented by course of lead unit of another controllable. If another controllable is on land the unit / controllable will orbit around.
* Number LastWaypointIndex : Detach waypoint of another controllable. Once reached the unit / controllable Follow task is finished.
* Number EngagementDistanceMax : Maximal distance from escorted controllable to threat. If the threat is already engaged by escort escort will disengage if the distance becomes greater than 1.5 * engagementDistMax.
* [AttributeNameArray](#attributenamearray-class-) TargetTypes : Array of AttributeName that is contains threat categories allowed to engage.

 Returns

* Dcs.DCSTasking.Task#Task  The DCS task structure.

### CONTROLLABLE:TaskFireAtPoint(Vec2, Radius, AmmoCount)
(GROUND) Fire at a VEC2 point until ammunition is finished.

 Parameters

* [CONTROLLABLE](#controllable-class-)
self
* [Vec2](#vec2-class-) Vec2 : The point to fire at.
* [Distance](#distance-class-) Radius : The radius of the zone to deploy the fire at.
* Number AmmoCount : (optional) Quantity of ammunition to expand (omit to fire until ammunition is depleted).

 Returns

* Dcs.DCSTasking.Task#Task  The DCS task structure.

### CONTROLLABLE:TaskHold()
(GROUND) Hold ground controllable from moving.

 Parameters

* [CONTROLLABLE](#controllable-class-)
self

 Returns

* Dcs.DCSTasking.Task#Task  The DCS task structure.

### CONTROLLABLE:TaskFAC_AttackGroup(AttackGroup, WeaponType, Designation, Datalink)
(AIR + GROUND) The task makes the controllable/unit a FAC and orders the FAC to control the target (enemy ground controllable) destruction.
The killer is player-controlled allied CAS-aircraft that is in contact with the FAC.
If the task is assigned to the controllable lead unit will be a FAC.

 Parameters

* [CONTROLLABLE](#controllable-class-)
self
* [CONTROLLABLE](#controllable-class-) AttackGroup : Target CONTROLLABLE.
* Number WeaponType : Bitmask of weapon types those allowed to use. If parameter is not defined that means no limits on weapon usage.
* [AI.Task.Designation](#ai.task.designation-class-) Designation : (optional) Designation type.
* Boolean Datalink : (optional) Allows to use datalink to send the target information to attack aircraft. Enabled by default.

 Returns

* Dcs.DCSTasking.Task#Task  The DCS task structure.

### CONTROLLABLE:EnRouteTaskEngageTargets(Distance, TargetTypes, Priority)
(AIR) Engaging targets of defined types.

 Parameters

* [CONTROLLABLE](#controllable-class-)
self
* [Distance](#distance-class-) Distance : Maximal distance from the target to a route leg. If the target is on a greater distance it will be ignored.
* [AttributeNameArray](#attributenamearray-class-) TargetTypes : Array of target categories allowed to engage.
* Number Priority : All enroute tasks have the priority parameter. This is a number (less value - higher priority) that determines actions related to what task will be performed first.

 Returns

* Dcs.DCSTasking.Task#Task  The DCS task structure.

### CONTROLLABLE:EnRouteTaskEngageTargets(Vec2, Radius, TargetTypes, Priority)
(AIR) Engaging a targets of defined types at circle-shaped zone.

 Parameters

* [CONTROLLABLE](#controllable-class-)
self
* [Vec2](#vec2-class-) Vec2 : 2D-coordinates of the zone.
* [Distance](#distance-class-) Radius : Radius of the zone.
* [AttributeNameArray](#attributenamearray-class-) TargetTypes : Array of target categories allowed to engage.
* Number Priority : All en-route tasks have the priority parameter. This is a number (less value - higher priority) that determines actions related to what task will be performed first.

 Returns

* Dcs.DCSTasking.Task#Task  The DCS task structure.

### CONTROLLABLE:EnRouteTaskEngageGroup(AttackGroup, Priority, WeaponType, WeaponExpend, AttackQty, Direction, Altitude, AttackQtyLimit)
(AIR) Engaging a controllable. The task does not assign the target controllable to the unit/controllable to attack now; it just allows the unit/controllable to engage the target controllable as well as other assigned targets.

 Parameters

* [CONTROLLABLE](#controllable-class-)
self
* [CONTROLLABLE](#controllable-class-) AttackGroup : The Controllable to be attacked.
* Number Priority : All en-route tasks have the priority parameter. This is a number (less value - higher priority) that determines actions related to what task will be performed first.
* Number WeaponType : (optional) Bitmask of weapon types those allowed to use. If parameter is not defined that means no limits on weapon usage.
* [AI.Task.WeaponExpend](#ai.task.weaponexpend-class-) WeaponExpend : (optional) Determines how much weapon will be released at each attack. If parameter is not defined the unit / controllable will choose expend on its own discretion.
* Number AttackQty : (optional) This parameter limits maximal quantity of attack. The aicraft/controllable will not make more attack than allowed even if the target controllable not destroyed and the aicraft/controllable still have ammo. If not defined the aircraft/controllable will attack target until it will be destroyed or until the aircraft/controllable will run out of ammo.
* [Azimuth](#azimuth-class-) Direction : (optional) Desired ingress direction from the target to the attacking aircraft. Controllable/aircraft will make its attacks from the direction. Of course if there is no way to attack from the direction due the terrain controllable/aircraft will choose another direction.
* [Distance](#distance-class-) Altitude : (optional) Desired attack start altitude. Controllable/aircraft will make its attacks from the altitude. If the altitude is too low or too high to use weapon aircraft/controllable will choose closest altitude to the desired attack start altitude. If the desired altitude is defined controllable/aircraft will not attack from safe altitude.
* Boolean AttackQtyLimit : (optional) The flag determines how to interpret attackQty parameter. If the flag is true then attackQty is a limit on maximal attack quantity for "AttackGroup" and "AttackUnit" tasks. If the flag is false then attackQty is a desired attack quantity for "Bombing" and "BombingRunway" tasks.

 Returns

* Dcs.DCSTasking.Task#Task  The DCS task structure.

### CONTROLLABLE:EnRouteTaskEngageUnit(EngageUnit, Priority, GroupAttack, WeaponExpend, AttackQty, Direction, Altitude, Visible, ControllableAttack)
(AIR) Search and attack the Unit.

 Parameters

* [CONTROLLABLE](#controllable-class-)
self
* [UNIT](#unit-class-) EngageUnit : The UNIT.
* Number Priority : (optional) All en-route tasks have the priority parameter. This is a number (less value - higher priority) that determines actions related to what task will be performed first.
* Boolean GroupAttack : (optional) If true, all units in the group will attack the Unit when found.
* [AI.Task.WeaponExpend](#ai.task.weaponexpend-class-) WeaponExpend : (optional) Determines how much weapon will be released at each attack. If parameter is not defined the unit / controllable will choose expend on its own discretion.
* Number AttackQty : (optional) This parameter limits maximal quantity of attack. The aicraft/controllable will not make more attack than allowed even if the target controllable not destroyed and the aicraft/controllable still have ammo. If not defined the aircraft/controllable will attack target until it will be destroyed or until the aircraft/controllable will run out of ammo.
* [Azimuth](#azimuth-class-) Direction : (optional) Desired ingress direction from the target to the attacking aircraft. Controllable/aircraft will make its attacks from the direction. Of course if there is no way to attack from the direction due the terrain controllable/aircraft will choose another direction.
* [Distance](#distance-class-) Altitude : (optional) Desired altitude to perform the unit engagement.
* Boolean Visible : (optional) Unit must be visible.
* Boolean ControllableAttack : (optional) Flag indicates that the target must be engaged by all aircrafts of the controllable. Has effect only if the task is assigned to a controllable, not to a single aircraft.

 Returns

* Dcs.DCSTasking.Task#Task  The DCS task structure.

### CONTROLLABLE:EnRouteTaskAWACS()
(AIR) Aircraft will act as an AWACS for friendly units (will provide them with information about contacts). No parameters.

 Parameters

* [CONTROLLABLE](#controllable-class-)
self

 Returns

* Dcs.DCSTasking.Task#Task  The DCS task structure.

### CONTROLLABLE:EnRouteTaskTanker()
(AIR) Aircraft will act as a tanker for friendly units. No parameters.

 Parameters

* [CONTROLLABLE](#controllable-class-)
self

 Returns

* Dcs.DCSTasking.Task#Task  The DCS task structure.

### CONTROLLABLE:EnRouteTaskEWR()
(GROUND) Ground unit (EW-radar) will act as an EWR for friendly units (will provide them with information about contacts). No parameters.

 Parameters

* [CONTROLLABLE](#controllable-class-)
self

 Returns

* Dcs.DCSTasking.Task#Task  The DCS task structure.

### CONTROLLABLE:EnRouteTaskFAC_EngageGroup(AttackGroup, Priority, WeaponType, Designation, Datalink)
(AIR + GROUND) The task makes the controllable/unit a FAC and lets the FAC to choose the target (enemy ground controllable) as well as other assigned targets.
The killer is player-controlled allied CAS-aircraft that is in contact with the FAC.
If the task is assigned to the controllable lead unit will be a FAC.

 Parameters

* [CONTROLLABLE](#controllable-class-)
self
* [CONTROLLABLE](#controllable-class-) AttackGroup : Target CONTROLLABLE.
* Number Priority : All en-route tasks have the priority parameter. This is a number (less value - higher priority) that determines actions related to what task will be performed first.
* Number WeaponType : Bitmask of weapon types those allowed to use. If parameter is not defined that means no limits on weapon usage.
* [AI.Task.Designation](#ai.task.designation-class-) Designation : (optional) Designation type.
* Boolean Datalink : (optional) Allows to use datalink to send the target information to attack aircraft. Enabled by default.

 Returns

* Dcs.DCSTasking.Task#Task  The DCS task structure.

### CONTROLLABLE:EnRouteTaskFAC(Radius, Priority)
(AIR + GROUND) The task makes the controllable/unit a FAC and lets the FAC to choose a targets (enemy ground controllable) around as well as other assigned targets.
The killer is player-controlled allied CAS-aircraft that is in contact with the FAC.
If the task is assigned to the controllable lead unit will be a FAC.

 Parameters

* [CONTROLLABLE](#controllable-class-)
self
* [Distance](#distance-class-) Radius :  The maximal distance from the FAC to a target.
* Number Priority : All en-route tasks have the priority parameter. This is a number (less value - higher priority) that determines actions related to what task will be performed first.

 Returns

* Dcs.DCSTasking.Task#Task  The DCS task structure.

### CONTROLLABLE:TaskEmbarking(Point, Duration, EmbarkingControllable)
(AIR) Move the controllable to a Vec2 Point, wait for a defined duration and embark a controllable.

 Parameters

* [CONTROLLABLE](#controllable-class-)
self
* [Vec2](#vec2-class-) Point : The point where to wait.
* Number Duration : The duration in seconds to wait.
* [CONTROLLABLE](#controllable-class-)
EmbarkingControllable : The controllable to be embarked.

 Returns

* Dcs.DCSTasking.Task#Task  The DCS task structure

### CONTROLLABLE:TaskEmbarkToTransport(Point, Radius)
Move to a defined Vec2 Point, and embark to a controllable when arrived within a defined Radius.

 Parameters

* [CONTROLLABLE](#controllable-class-)
self
* [Vec2](#vec2-class-) Point : The point where to wait.
* Number Radius : The radius of the embarking zone around the Point.

 Returns

* Dcs.DCSTasking.Task#Task  The DCS task structure.

### CONTROLLABLE:TaskMission(TaskMission)
(AIR + GROUND) Return a mission task from a mission template.

 Parameters

* [CONTROLLABLE](#controllable-class-)
self
* List[] TaskMission : A table containing the mission task.

 Returns

* Dcs.DCSTasking.Task#Task

### CONTROLLABLE:TaskRoute(Points)
Return a Misson task to follow a given route defined by Points.

 Parameters

* [CONTROLLABLE](#controllable-class-)
self
* List[] Points : A table of route points.

 Returns

* Dcs.DCSTasking.Task#Task

### CONTROLLABLE:RouteToVec2(Point, Speed)
(AIR + GROUND) Make the Controllable move to fly to a given point.

 Parameters

* [CONTROLLABLE](#controllable-class-)
self
* [Vec3](#vec3-class-) Point : The destination point in Vec3 format.
* Number Speed : The speed to travel.

 Returns

* [CONTROLLABLE](#controllable-class-)

### CONTROLLABLE:RouteToVec3(Point, Speed)
(AIR + GROUND) Make the Controllable move to a given point.

 Parameters

* [CONTROLLABLE](#controllable-class-)
self
* [Vec3](#vec3-class-) Point : The destination point in Vec3 format.
* Number Speed : The speed to travel.

 Returns

* [CONTROLLABLE](#controllable-class-)

### CONTROLLABLE:Route(GoPoints)
Make the controllable to follow a given route.

 Parameters

* [CONTROLLABLE](#controllable-class-)
self
* List[] GoPoints : A table of Route Points.

 Returns

* [CONTROLLABLE](#controllable-class-)

### CONTROLLABLE:TaskRouteToZone(Zone, Randomize, Speed, Formation)
(AIR + GROUND) Route the controllable to a given zone.
The controllable final destination point can be randomized.
A speed can be given in km/h.
A given formation can be given.

 Parameters

* [CONTROLLABLE](#controllable-class-)
self
* [ZONE](#zone-class-) Zone : The zone where to route to.
* Boolean Randomize : Defines whether to target point gets randomized within the Zone.
* Number Speed : The speed.
* [FORMATION](#formation-class-) Formation : The formation string.

 Returns

### CONTROLLABLE:CommandDoScript(DoScript)
Do Script command

 Parameters

* [CONTROLLABLE](#controllable-class-)
self
* String DoScript

 Returns

* #DCSCommand

### CONTROLLABLE:GetTaskMission()
Return the mission template of the controllable.

 Parameters

* [CONTROLLABLE](#controllable-class-)
self

 Returns

* List[]  The MissionTemplate

### CONTROLLABLE:GetTaskRoute()
Return the mission route of the controllable.

 Parameters

* [CONTROLLABLE](#controllable-class-)
self

 Returns

* List[]  The mission route defined by points.

### CONTROLLABLE:CopyRoute(Begin, End, Randomize, Radius)
Return the route of a controllable by using the [DATABASE](#database-class-) class.

 Parameters

* [CONTROLLABLE](#controllable-class-)
self
* Number Begin : The route point from where the copy will start. The base route point is 0.
* Number End : The route point where the copy will end. The End point is the last point - the End point. The last point has base 0.
* Boolean Randomize : Randomization of the route, when true.
* Number Radius : When randomization is on, the randomization is within the radius.

 Returns

### CONTROLLABLE:GetDetectedTargets(DetectVisual, DetectOptical, DetectRadar, DetectIRST, DetectRWR, DetectDLINK)
Return the detected targets of the controllable.
The optional parametes specify the detection methods that can be applied.
If no detection method is given, the detection will use all the available methods by default.

 Parameters

* [CONTROLLABLE](#controllable-class-) self
* Boolean DetectVisual : (optional)
* Boolean DetectOptical : (optional)
* Boolean DetectRadar : (optional)
* Boolean DetectIRST : (optional)
* Boolean DetectRWR : (optional)
* Boolean DetectDLINK : (optional)

 Returns

* List[]

### CONTROLLABLE:OptionROEHoldFirePossible()
Can the CONTROLLABLE hold their weapons?

 Parameters

* [CONTROLLABLE](#controllable-class-)
self

 Returns

* Boolean

### CONTROLLABLE:OptionROEHoldFire()
Holding weapons.

 Parameters

* [CONTROLLABLE](#controllable-class-) self

 Returns

* [CONTROLLABLE](#controllable-class-)

### CONTROLLABLE:OptionROEReturnFirePossible()
Can the CONTROLLABLE attack returning on enemy fire?

 Parameters

* [CONTROLLABLE](#controllable-class-)
self

 Returns

* Boolean

### CONTROLLABLE:OptionROEReturnFire()
Return fire.

 Parameters

* [CONTROLLABLE](#controllable-class-)
self

 Returns

* [CONTROLLABLE](#controllable-class-)

### CONTROLLABLE:OptionROEOpenFirePossible()
Can the CONTROLLABLE attack designated targets?

 Parameters

* [CONTROLLABLE](#controllable-class-)
self

 Returns

* Boolean

### CONTROLLABLE:OptionROEOpenFire()
Openfire.

 Parameters

* [CONTROLLABLE](#controllable-class-)
self

 Returns

* [CONTROLLABLE](#controllable-class-)

### CONTROLLABLE:OptionROEWeaponFreePossible()
Can the CONTROLLABLE attack targets of opportunity?

 Parameters

* [CONTROLLABLE](#controllable-class-)
self

 Returns

* Boolean

### CONTROLLABLE:OptionROEWeaponFree()
Weapon free.

 Parameters

* [CONTROLLABLE](#controllable-class-)
self

 Returns

* [CONTROLLABLE](#controllable-class-)

### CONTROLLABLE:OptionROTNoReactionPossible()
Can the CONTROLLABLE ignore enemy fire?

 Parameters

* [CONTROLLABLE](#controllable-class-)
self

 Returns

* Boolean

### CONTROLLABLE:OptionROTNoReaction()
No evasion on enemy threats.

 Parameters

* [CONTROLLABLE](#controllable-class-)
self

 Returns

* [CONTROLLABLE](#controllable-class-)

### CONTROLLABLE:OptionROTPassiveDefensePossible()
Can the CONTROLLABLE evade using passive defenses?

 Parameters

* [CONTROLLABLE](#controllable-class-)
self

 Returns

* Boolean

### CONTROLLABLE:OptionROTPassiveDefense()
Evasion passive defense.

 Parameters

* [CONTROLLABLE](#controllable-class-)
self

 Returns

* [CONTROLLABLE](#controllable-class-)

### CONTROLLABLE:OptionROTEvadeFirePossible()
Can the CONTROLLABLE evade on enemy fire?

 Parameters

* [CONTROLLABLE](#controllable-class-)
self

 Returns

* Boolean

### CONTROLLABLE:OptionROTEvadeFire()
Evade on fire.

 Parameters

* [CONTROLLABLE](#controllable-class-)
self

 Returns

* [CONTROLLABLE](#controllable-class-)

### CONTROLLABLE:OptionROTVerticalPossible()
Can the CONTROLLABLE evade on fire using vertical manoeuvres?

 Parameters

* [CONTROLLABLE](#controllable-class-)
self

 Returns

* Boolean

### CONTROLLABLE:OptionROTVertical()
Evade on fire using vertical manoeuvres.

 Parameters

* [CONTROLLABLE](#controllable-class-)
self

 Returns

* [CONTROLLABLE](#controllable-class-)

### CONTROLLABLE:WayPointInitialize(WayPoints)
Retrieve the controllable mission and allow to place function hooks within the mission waypoint plan.
Use the method @{Controllable#CONTROLLABLE:WayPointFunction} to define the hook functions for specific waypoints.
Use the method @{Controllable@CONTROLLABLE:WayPointExecute) to start the execution of the new mission plan.
Note that when WayPointInitialize is called, the Mission of the controllable is RESTARTED!

 Parameters

* [CONTROLLABLE](#controllable-class-)
self
* List[] WayPoints : If WayPoints is given, then use the route.

 Returns

* [CONTROLLABLE](#controllable-class-)

### CONTROLLABLE:GetWayPoints()
Get the current WayPoints set with the WayPoint functions( Note that the WayPoints can be nil, although there ARE waypoints).

 Parameters

* [CONTROLLABLE](#controllable-class-)
self

 Returns

* List[]  WayPoints If WayPoints is given, then return the WayPoints structure.

### CONTROLLABLE:WayPointFunction(WayPoint, WayPointIndex, WayPointFunction)
Registers a waypoint function that will be executed when the controllable moves over the WayPoint.

 Parameters

* [CONTROLLABLE](#controllable-class-)
self
* Number WayPoint : The waypoint number. Note that the start waypoint on the route is WayPoint 1!
* Number WayPointIndex : When defining multiple WayPoint functions for one WayPoint, use WayPointIndex to set the sequence of actions.
* Function() WayPointFunction : The waypoint function to be called when the controllable moves over the waypoint. The waypoint function takes variable parameters.

 Returns

* [CONTROLLABLE](#controllable-class-)

### CONTROLLABLE:WayPointExecute(WayPoint, WaitTime)
Executes the WayPoint plan.
The function gets a WayPoint parameter, that you can use to restart the mission at a specific WayPoint.
Note that when the WayPoint parameter is used, the new start mission waypoint of the controllable will be 1!

 Parameters

* [CONTROLLABLE](#controllable-class-)
self
* Number WayPoint : The WayPoint from where to execute the mission.
* Number WaitTime : The amount seconds to wait before initiating the mission.

 Returns

* [CONTROLLABLE](#controllable-class-)

repository: FlightControl-User/slate

repo_name: FlightControl-User/slate


text:
# Submitting Patches

As this is an open source project, anyone can contribute code. This can be submitting in the form of patches. Anyone can upload a patch. Patches are evaluated by project team members and either Applied or Declined.

To submit a patch, click on the **Source Code** tab and click on **Upload Patch**.

repository: bsimser/Gold-Box-Explorer

path: /docs/Submitting Patches.md

filename: Submitting Patches.md

repo_name: bsimser/Gold-Box-Explorer


text:
# PSID.jl

[![Build Status](https://travis-ci.com/aaowens/PSID.jl.svg?branch=master)](https://travis-ci.com/aaowens/PSID.jl)
[![codecov](https://codecov.io/gh/aaowens/PSID.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/aaowens/PSID.jl)

The Panel Study of Income Dynamics (PSID) is a longitudinal public dataset which has been following a collection of families and their descendants since 1968. It provides a breadth of information about labor supply and life-cycle dynamics. More information is available at https://psidonline.isr.umich.edu/.

This package produces a labeled panel of individuals with a consistent individual ID across time. You provide a JSON file describing the variables you want. An example input file can be found at [examples/user_input.json.](https://github.com/aaowens/PSID.jl/blob/master/examples/user_input.json). Currently only variables in the family files can be added, but in the future it should be possible to support variables in the individual files or the supplements.

# Example

An example workflow can be found on my blog post [here](https://aaowens.github.io/julia/2020/02/11/Using-the-Panel-Study-of-Income-Dynamics.html).

# Instructions

To add this package, use
```
(@v1.6) pkg> add PSID
```

Next, download the PSID data files yourself. The package can't automatically fetch them because the PSID requires you to register for a free account before using the data.

The list of data files required to be in the current directory can be found [here](https://github.com/aaowens/PSID.jl/blob/master/src/allfiles_hash.json). These files are

1. The PSID codebook in XML format. You used to be able to download this from the PSID here https://simba.isr.umich.edu/downloads/PSIDCodebook.zip , but the link is broken. I put it in my Google Drive here https://drive.google.com/file/d/1CPwM5tsphdezi4RqlHGMkS1hiLLRZIT7/view .
2. The zipped PSID family files and cross-year individual file, which can be downloaded here https://simba.isr.umich.edu/Zips/ZipMain.aspx. Do not extract the files--leave them zipped. You need to download every family file from 1968 to 2019, and you also need to download the cross-year individual file.
3. The XLSX cross-year index for the variables, which can be downloaded here https://psidonline.isr.umich.edu/help/xyr/psid.xlsx.

After acquiring the data, run
```
julia> using PSID
julia> makePSID("user_input.json")
# to not code missings, makePSID("user_input.json", codemissings = false)
```
It will verify the required files exist and then construct the data. If successful, it will print `Finished constructing individual data, saved to output/allinds.csv` after about 5 minutes.

This will use about 15 GB of RAM. It may not work on machines without much memory.

## The input JSON file
The file passed to `makePSID` describes the variables you want.
```
{
    "name_user": "hours",
    "varID": "V465",
    "unit": "head"
  },
  ```
  There are three fields, `name_user`, `varID`, and `unit`. `name_user` is a name chosen by you. `varID` is one of the codes assigned by the PSID to this variable. These can be looked up in the PSID [cross-year index](https://simba.isr.umich.edu/VS/i.aspx). For example, hours above can be found in the crosswalk at `	Family Public Data Index 01>WORK 02>Hours and Weeks 03>annual in prior year 04>head 05>total:`. Clicking on the variable info will show the the list of years and associated IDs when that variable is available. Choose any of the IDs for `varID`, it does not matter. `PSID.jl` will look up all available years for that variable in the crosswalk. You must also indicate the unit, which can be `head`, `spouse`, or `family`. This makes sure the variable is assigned to the correct individual.

# Features

This package provides the following features:
1. Automatically labels missing values by searching the value labels from the codebook for strings like "NA", "Inap.", or "Missing".
2. Tries to produce consistent value labels across years for categorical variables. This is difficult because the labels in the PSID sometimes change between years. This package uses an algorithm to try to harmonize the labels when possible by removing common subsets. For example, in one year race is labeled as "Asian" but in the next year it is "Asian, Pacific Islander". The first is a subset of the second, so the final label will be "Asian, Pacific Islander". When this is not possible, the final label will be "A or B or C" for however many incomparable labels were found.
3. Matches the individuals across time to produce a panel with consistent (ID, year) keys and their associated variables.
4. Produces consistent individual or spouse variables for individuals. In the input JSON file, you must indicate whether a variable is family level, household head level, or household spouse level. The final output will have variables of the form `VAR_family`, `VAR_ind`, or `VAR_spouse`. When the individual is a household head, `VAR_ind` will come from the household head version of that variable, and `VAR_spouse` will come from the household spouse version. If the individual is a household spouse, it is the reverse. Both individuals will get all family level variables.
5. It's easiest to track individuals, but this package also produces a consistent family ID by treating a family as a combination of head and spouse (if spouse exists). If you keep only household heads and drop years before 1970, (famid, year) should be an ID.

# Notable Omissions

Certain variables are not in the family files. For example, the wealth data are in separate files, and there is some unique information in the individual file directly. In the future I plan to add support for these data, but you can manually add them by constructing the unique individual ID yourself as (ER30001 * 1000) + ER30002, and then joining your data on that ID with the dataset produced by PSID.jl.

Please file issues if you find a bug.

# Donate your input JSON

If you've made an input JSON file containing variables useful for some topic, feel free to file an issue or make a PR to add your file to the examples.

gha_language: Julia