text:
# Community Theme

Community Theme is a one page website for communities based on the [original Bootstrap theme](//github.com/IronSummitMedia/startbootstrap-agency) by [David Miller](//github.com/davidtmiller). This Hugo theme features several content sections, a responsive resources grid with hover effects, full page amenities item modals, a timeline, and a contact form.

![Hugo Community Theme screenshot](images/screenshot.png)

## Installation

Inside the folder of your Hugo site run:

    $ cd themes
    $ git clone https://github.com/barkerd427/hugo-community-theme

For more information read the official [setup guide](//gohugo.io/overview/installing/) of Hugo.

## Getting started

After installing the Community Theme successfully it requires just a few more steps to get your site running.

### The config file

Take a look inside the [`exampleSite`](exampleSite) folder of this theme. You'll find a file called [`config.toml`](exampleSite/config.toml). To use it, copy the [`config.toml`](exampleSite/config.toml) in the root folder of your Hugo site. Feel free to change the strings in this theme.

### Change the hero background

The hero acts as an eye-catcher for your site. So consider giving it a nice background. You just need to replace the [`header-bg.jpg`](static/img/header-bg.jpg) at [`static/img`](static/img) with your own background image. But it's important that you keep the original filename. You may also want to keep the original aspect ratio.

### Share information

This section should share with visitors valuable resources they should know about. This might include documentation, social media accounts, Slack, or other pertinent information. You can change the resources at `[params.resources.list]` in the [`config.toml`](exampleSite/config.toml).

All icons are part of Fontawesome's icon font. Look at the website of [Fontawesome](//fortawesome.github.io/Font-Awesome/icons/) for more icons. The icons are represented by their corresponding CSS class of Fontawesome. A skill is defined like this example:

```toml
[[params.resources.row.list]]
      icon = "fa-address-book"
      title = "Address Book"
      description = "Lorem ipsum dolor sit amet, consectetur adipisicing elit. Minima maxime quam architecto quo inventore harum ex magni, dicta impedit."
      url = "#"
```

#### Create rows of resources

You can also create rows using this line followed by blocks as above. The provided [`config.toml`](exampleSite/config.toml) uses this method.

```toml
[[params.resources.row]]
```

### Create your amenities

This section is used to present your amenities, features, events with pictures and some text.

Beside the [`config.toml`](exampleSite/config.toml), there is under `data` another subfolder called [`amenities`](exampleSite/data/amenities) which hosts the files that will appear as your amenities in the amenities section.  Sunt ut voluptatum eius sapiente, totam reiciendis temporibus qui quibusdam, recusandae sit vero unde, sed, incidunt et ea quo dolore laudantium consectetur![here](//getdpd.com/cart/hoplink/18076?referrer=bvbo4kax5k8ogc).
```

Copy [`amenities`](exampleSite/data/amenities) inside the `data` folder in the **root** directory of your site. Let's make some changes.

Pay attention to the `modalID`. It must be a unique integer and be incremented with each new amenity you want to add to the amenities. Otherwise, the corresponding modal can't be rendered.

Furthermore, you can use Markdown syntax for URLs like here `[text](//url.to/source)` in the description.

To give your amenities an image, save those under [`static/img/amenities`](static/img/amenities). Don't forget to set the appropriate **filename** under `img` in your amenity. Also, the size should be 400 x 289 to maintain the appropriate layout.

### Show what's happening

This theme features a timeline for important events in your community. You can add a new event by copying the following snippet to the `[params.about]` section in the [`config.toml`](exampleSite/config.toml).

```toml
[[params.about.events]]
      img = "1.jpg"
      date = "September 9th, 2018"
      title = "Meeting 4"
      description = "Lorem ipsum dolor sit amet, consectetur adipisicing elit. Sunt ut voluptatum eius sapiente, totam reiciendis temporibus qui quibusdam, recusandae sit vero unde, sed, incidunt et ea quo dolore laudantium consectetur!"
```

The image set under `img` needs to be stored at [`static/img/about`](static/img/about). The events will be listed from the top to the bottom.

### Introduce your board/organizers

Let visitors and potential members know who you are. To add a board member/organizer paste the code below into the [`config.toml`](exampleSite/config.toml). The `img` field refers to the shown image. Paste those of you or your colleagues into [`static/img/board`](static/img/board).

```toml
[[params.board.members]]
    img = "2.jpg"
    name = "Larry Parker"
    position = "Vice President"
    social = [
        ["fa-twitter", "#"],
        ["fa-facebook", "#"],
        ["fa-linkedin", "#"]
    ]
```

As you can see there's an option to link individual social networks. The first index of the array represents the icon (or CSS class) of [Fontawesome](//fortawesome.github.io/Font-Awesome/icons/). The last index is simply the link to the social network profiles.

### List your sponsors/affiliates

You can also show some of your sponsors/affiliates. To do so, paste the sponsor's logos into [`static/img/logos`](static/img/logos) and add the example below to the [`config.toml`](exampleSite/config.toml).

```toml
[[params.sponsors]]
    logo = "designmodo.jpg"
    link = "#"
```

***The logos require a dimension of 200 x 50 pixels.***

### Add contact form functionality

Since this page will be static, you can use [formspree.io](//formspree.io/) as a proxy to send the actual email. Each month, visitors can send you up to one thousand emails without incurring extra charges. Begin the setup by following the steps below:

1. Enter your email address under 'email' in the [`config.toml`](exampleSite/config.toml)
2. Upload the generated site to your server
3. Send a dummy email yourself to confirm your account
4. Click the confirm link in the email from [formspree.io](//formspree.io/)
5. You're done. Happy mailing!

### Nearly finished

In order to see your site in action, run Hugo's built-in local server.

    $ hugo server

Now enter [`localhost:1313`](http://localhost:1313/) in the address bar of your browser.

## Contributing

Did you find a bug or have an idea for a new feature? Feel free to use the [issue tracker](//github.com/barkerd427/hugo-community-theme/issues) to let me know. Or make a [pull request](//github.com/barkerd427/hugo-community-theme/pulls).

## License

This theme is released under the Apache License 2.0 For more information read the [License](LICENSE).

## Acknowledgements

Thanks to

- [David Miller](//github.com/davidtmiller) for creating this theme
- [Steve Francia](//github.com/spf13) for creating Hugo and the awesome community around the project
- [digitalcraftsman](//github.com/digitalcraftsman) for porting this to Hugo as the Agency theme.


text:
### [CVE-2019-1913](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-1913)
![](https://img.shields.io/static/v1?label=Product&message=Cisco%20Small%20Business%20220%20Series%20Smart%20Plus%20Switches%20&color=blue)
![](https://img.shields.io/static/v1?label=Version&message=n%2Fa&color=blue)
![](https://img.shields.io/static/v1?label=Vulnerability&message=CWE-119&color=brighgreen)

### Description

Multiple vulnerabilities in the web management interface of Cisco Small Business 220 Series Smart Switches could allow an unauthenticated, remote attacker to overflow a buffer, which then allows the execution of arbitrary code with root privileges on the underlying operating system. The vulnerabilities are due to insufficient validation of user-supplied input and improper boundary checks when reading data into an internal buffer. An attacker could exploit these vulnerabilities by sending malicious requests to the web management interface of an affected device. Depending on the configuration of the affected switch, the malicious requests must be sent via HTTP or HTTPS.

### POC

#### Reference
- http://packetstormsecurity.com/files/154667/Realtek-Managed-Switch-Controller-RTL83xx-Stack-Overflow.html

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

license: MIT

repository: trickest/cve

branch_name: refs/heads/main

extension: md

gha_language: HTML

gha_license_id: MIT

license_type: permissive

repo_name: trickest/cve


text:
# Evepraisal
Evepraisal is a bulk-price estimator for Eve Online.

## Docker Instructions (production)
The following was tested on Ubuntu Server 18.10
- Install docker.io
```
  $ sudo apt install docker.io
```
- Install docker-compose
```
  $ sudo curl -L "https://github.com/docker/compose/releases/download/1.24.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
  $ sudo chmod +x /usr/local/bin/docker-compose
```
- Download Dockerfile, docker-compose.yml, and evepraisal.toml to a directory
```
  $ wget https://raw.githubusercontent.com/evepraisal/go-evepraisal/master/Dockerfile
  $ wget https://raw.githubusercontent.com/evepraisal/go-evepraisal/master/docker-compose.yml
  $ wget https://raw.githubusercontent.com/evepraisal/go-evepraisal/master/evepraisal.toml
```
- build, and bring the container up
```
  $ docker-compose up
```

## Instructions (development)
The following was tested on Ubuntu Server 18.10
- Install golang 1.11
```
  ~$ curl https://dl.google.com/go/go1.11.10.linux-amd64.tar.gz | tar xz
  ~$ sudo mv go /usr/local
  ~$ echo 'export GOROOT=/usr/local/go' >>~/.profile
  ~$ echo 'export GOPATH=$HOME/go' >>~/.profile
  ~$ echo 'export PATH=$GOPATH/bin:$GOROOT/bin:$PATH' >>~/.profile
  ~$ echo 'export GO111MODULE=on' >>~/.profile
  ~$ source ~/.profile
```
- Install build requirements
```
  ~$ sudo apt install git gcc musl-dev make
```
- Download and build evepraisal
```
  ~$ mkdir -p $GOPATH/src/github.com/evepraisal/go-evepraisal
  ~$ cd $GOPATH/src/github.com/evepraisal/go-evepraisal
  ~/go/src/github.com/evepraisal/go-evepraisal$ git clone https://github.com/evepraisal/go-evepraisal.git .
  ~/go/src/github.com/evepraisal/go-evepraisal$ make setup
  ~/go/src/github.com/evepraisal/go-evepraisal$ make build
```
- Run evepraisal
```
  ~/go/src/github.com/evepraisal/go-evepraisal$ ./target/evepraisal-linux-amd64
```

repository: evepraisal/go-evepraisal

branch_name: refs/heads/master

gha_language: Go

repo_name: evepraisal/go-evepraisal


text:
# Getting Started

We start at [vuejs.org](https://vuejs.org/) - an official home page, and install `Vuejs`. The easiest way is to do it through CDN.

**HTML**

```html
<script src=="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<div id="app">
<p></p>
</div>
```

In order to manipulate the `html` template we need to create in JS a new `Vue instance`. `Vue instance` is the core of each `Vue` application, of each of piece of code you wanna use `Vuejs` in. We create such instances and then these instances have one major job - controle theis own template of code of `html code` which they render to the screen. In order to do this we need to pass an `argument` in our `Vue()` constructor `function`. The `argument` is a JS `object`. And there we have one very important `property` `Vuejs` will recognise - an `element`. `El` takes a string as a `value`. And with this `string` we setup which part of our html code should be under controle of our `vue instance`. Under control here means - we can change it through `vue instance`.

**JS**

```js
new Vue ({
el : '#app'
})
```
![vue-instance](../vue-instance.png)

Now in order to output something we need some data. `Vuejs` has a special property for this - the `data` property. And this is an `object`. And there we store all the data we wanna use in this `vue instance`.

**JS**

```js
new Vue ({
el : '#app'
data : {
    title : 'Hello World!'
}
})
```

In `html` we should add a special syntax to let `vuejs` recognise the thing we wanna do - this are double curly braces `{{}}` - which is called `interpolation` or `string interpolation`. Vuejs will automatically log into this `data` object : "*Look at this `object`, find the `title` property an oputput it here*".

**HTML**

```html
<script src=="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<div id="app">
<p>{{title}}</p>
</div>
```

![vue-instance2](../vue-instance2.png)

repository: anmud/learntocode

path: /Udemy. Vue/1_Getting Started/001_Getting Started.md

filename: 001_Getting Started.md

repo_name: anmud/learntocode


text:
# Legit HvH

## Legit HvH

Legit HvH, or commonly known as semi-raging, is when two players toggle on their cheats to their full potential, while still trying to avoid an Overwatch ban. This usually consists of the players having legit anti-aim instead of full on rage anti-aim.

## Playstyle

--todo--

Semiragers have to make sure to make good use of grenades, e.g.

repository: csgohacks/master-guide

repo_name: csgohacks/master-guide


text:
# BLOGRAM API SERVER 😎

Rest api for blogram [ or any other apps ] 😉

This project is made using __Node Js, Mongo Db & Much more__

## SETUP 👷♂

> You need __MONGO DB, NODE JS & NPM__ to run this project

INSTALL DEPENDENCIES

```bash
$ npm install
# Or yarn
$ yarn install
```

START SERVER

```BASH
$ npm start
# or yarn
$ yarn start
```

## DOCUMENTATION 📚

### User 👤

FETCH USER  DATA [ GET ]

`/user/:userId`: get user data with ID

> You will get ID of user by login, register or update

REGISTER [ POST ]

`/user/register` : Register user

> This should be a __POST__ request, and include following data on request body .

```json
{
    "username": "username",
    "name": "name",
    "password": "password"
}
```

LOGIN [ POST ]

`/user/login` : Login user

> This should be a __POST__ request, and include following data on request body .

```json
{
    "username": "username",
    "password": "password"
}
```

UPDATE [ POST ]

`/user/update` : Update user

> This should be a __POST__ request, and include old user data & new user data on request body .
>
> If you are updating one entity fille others with old data

```json
{
    // old user data
    "username": "username",
    "name": "name",
    "password": "password",
    // new user data
    "newUsername": "new username",
    "newName": "new name",
    "newPassword": "new password",
}
```

### Blog 📝

GET ALL BLOGS [ GET ]

`/blog`: get all blogs

GET SINGLE BLOG [ GET ]

`/blog/:blogId`: get blog with ID

GET ALL BLOG OF USER [ GET ]

`/blog/:userId`: get all blogs of user with USER ID

NEW BLOG [ POST ]

`/blog/new`: create new blog

> You should include following in request body

```json
{
    "username": "username",
    "password": "userpassword",
    "title": "title of blog",
    "blog": "blog content"
}
```

DELETE BLOG [ DELETE ]

`/blog/delete/:blogId`: delete blog with id

> You need to have following body in request

```json
{
    "username": "username",
    "password": "user password"
}
```

repository: octoi/blogram-server

repo_name: octoi/blogram-server


text:
---
title: Logistic regression
ready: True
---

## Tutorial
Complete the DataCamp project [Predicting credit card approvals](https://www.datacamp.com/projects/558)

## Background material
[Sensitivity and specificity](https://en.wikipedia.org/wiki/Sensitivity_and_specificity)
[Understanding ROC curves with Python](https://stackabuse.com/understanding-roc-curves-with-python/)

## Assignment

Use a logistic regression model to find the factors that were most important in predicting survival on the [titanic](https://www.kaggle.com/biswajee/titanic-dataset/data).

1. Split your data (train.csv) into train and test sets.
2. Get basic descriptive statistics for the training data and check for missing and incorrect values. Replace missing values if this makes sense to do.
3. What are the factors that predict survival? (i.e. which variables significantly predict survival, *p* < 0.05)
4. Create a classification report and confusion matrix of predicted and observed values. What is the accuracy, sensitivity and specificity of the model on the (a) training and (b) test data?
5. Plot a Receiver Operating Characteristic (ROC) curve on the test data.
6. What is overdispersion?

Find the data on [Kaggle](https://www.kaggle.com/biswajee/titanic-dataset/data).

repository: milpontiangwenya/tech-department

repo_name: milpontiangwenya/tech-department


text:
# Data Saver

Takes data from different sources and save in db.

## How to use

```python
import datasaver
datasaver.save("path/to/file")
```

repository: namaggarwal/data-saver

repo_name: namaggarwal/data-saver


text:
Property Widgets {#property_widgets}
===========================================================

[TOC]

\addindex volume_properties_widget
Volume Properties {#property_widgets_volume}
===========================================================

\addindex clipping_widget
Volume Clipping {#property_widgets_volume_clipping}
-----------------------------------------------------------
*Functionality for clipping a volume.*

Define clip planes in a volume. The interactive clipper is attached
to the active tool, and clips the active volume according to a slice
definition.

The current clip can also be saved along with the volume.
This can be done several times.

\addindex cropping_widget
Volume Cropping {#property_widgets_volume_cropping}
-----------------------------------------------------------

*Functionality for cropping a volume.*

Lets you crop a volume by defining a bounding box along the volume
axis. Everything outside the box is not shown.

How to use the bounding box:
 * First click the bounding box to get the control spheres
 * Click and drag a sphere to change the crop area

###Button: Create new cropped volume
To make the crop permanent, press the button to create a new volume from the crop.
This will also hide the original volume and show the new volume.

\addindex shading_widget
Volume Shading {#property_widgets_volume_shading}
-----------------------------------------------------------

Set volume shading properties.

\addindex transfer_function_widget
Volume Transfer Function {#property_widgets_volume_transfer_function}
-----------------------------------------------------------

\addindex transfer_function_3d_widget
### 3D Transfer Function {#property_widgets_volume_transfer_function_3D}
Lets you set a transfer function on a 3D volume. It also lets you set
window width and level, and right click on the bar to bring up
the color selector.

\addindex transfer_function_preset_widget
### Transfer Function Presets {#property_widgets_volume_transfer_function_presets}
Let you select a predefined transfer function.

\addindex volume_info_widget
Volume Information {#property_widgets_volume_information}
-----------------------------------------------------------

Displays information about a selected volume.

\addindex slice_properties_widget
Slice Properties {#property_widgets_slice}
===========================================================
Lets you set properties on a 2d image slice.

Slice Information {#property_widgets_slice_information}
-----------------------------------------------------------
Displays information about a selected volume.
Identical to \ref property_widgets_volume_information.

\addindex color_widget
Slice Color {#property_widgets_slice_color}
-----------------------------------------------------------
Allows setting 2D image properties
by setting colors and window width and level.
Right click on the bar to bring up the color selector.

\addindex transfer_function_2d_widget
### 2D Transfer Function {#property_widgets_slice_transfer_function_2D}
Lets you set a transfer function on a 2D volume.

### Transfer Function Slice Presets {#property_widgets_slice_transfer_function_presets}
Let you select a predefined transfer function.
Identical to \ref property_widgets_volume_transfer_function_presets.

\addindex overlay_widget
Slice 2D Overlay {#property_widgets_slice_overlay}
-----------------------------------------------------------
Allow visualizing several 2D slices  in top of each other
by making them partly transparent (alpha),
or by making parts of the fully transparent (LLR).

Not working on Windows.

\addindex tool_properties_widget
Tool Properties {#property_widgets_tool}
===========================================================
Tool offset: A virtual offset along the tool's local z axis.

Tool matrix: The transformation matrix between the tool tip and the selected space.
Change the matrix to move and/or orient the tool. Tool offset is not applied to the matrix.

See \ref coordinate_systems_specific_spaces for more information on coordinate systems.

\addindex tool_manager_widget
Tool Manager Widget
===========================================================

ToolManager debugging utilities.

Lets you test different aspects of the toolmanager.

Mesh Properties {#property_widgets_mesh}
===========================================================
\subpage mesh_properties

\addindex eraser_widget
Eraser {#property_widgets_eraser}
===========================================================
Functionality for erasing parts of volumes.
By changing the erase value it is also possible to draw.
Using the eraser on meshes is not possible.

repository: SINTEFMedtek/CustusX

branch_name: refs/heads/develop

gha_license_id: NOASSERTION

repo_name: SINTEFMedtek/CustusX


text:
# Token Bundle
Provides support for the use of an external token encoder/decoder

## Installation

First, install it with composer:

    composer require vouchedfor/token-bundle:dev-master

Then, add the following in your **AppKernel** bundles (assuming 'new DataDog\AuditBundle\DataDogAuditBundle(),' has been added previously).

    // app/AppKernel.php
    public function registerBundles()
    {
        $bundles = array(
            ...
            new VouchedFor\TokenBundle\VouchedForTokenBundle(),
            ...
        );
        ...
    }

Add the url of the endpoint responsible for encoding/decoding tokens to `config.yml`. For example:

    // app/config/config.yml
    vouched_for_token:
        url: 'http://token-local.vouchedfor.co.uk/v2/token/'

## License

The Token Bundle is free to use and is licensed under the [MIT license](http://www.opensource.org/licenses/mit-license.php)

repository: vouchedfor/TokenBundle

repo_name: vouchedfor/TokenBundle


text:
## Synopsis

This is the Simplified Staging Transport, a component of v2.0 of the ADIOS I/O system, developed as part of the U.S. Department of Energy Exascale Computing Program.

## License

ADIOS >= 2.0 is licensed under the Apache License v2.0.

## Directory Layout

* cp - Code that implements the control plane
* dp - Code that implements the data plane
* framework - eventually this will be a testing framework, now simple reader
and writer programs
* CMake - Project-specific CMake modules

## Building

- First build and install EVPath.  This code relies upon some recent tweaks
to EVPath installation (in particular the `evpath_config` program which was
added/updated in July 2017).  Best to build the most recent stable release.
There are instructions at http://www.cc.gatech.edu/systems/projects/EVPath/,
but the short form is something like:
1.    cd ~/
2.    mkdir evpath_build
3.    cd evpath_build
4.    wget http://www.cc.gatech.edu/systems/projects/EVPath/chaos_bootstrap.pl
5.    perl ./chaos_bootstrap.pl
6.    perl ./chaos_build.pl

This will install EVPath in ${HOME}/{bin,lib,include}.  If you install
evpath elsewhere, set the EVPATH_ROOT environment variable before the next
step.

To build SST, do:
1.  git clone git@github.com:eisenhauer/sst.git
2.  cd sst;
3.  mkdir build ; cd build
4.  cmake ..
5.  make all

At this point there are 'reader' and 'writer' programs in build/bin.  To
exercise SST, run them each under MPI, starting the writer first.  Verbosity
is turned on right now, so this might be more easily understood running them
in separate windows with small cohort sizes.  `reader` and `writer` only
open a single stream named "test" and contact info is written into and read
from the current working directory, so both must be cd'd to the same
directory for them to find each other.

repository: eisenhauer/sst

repo_name: eisenhauer/sst


text:
# Stock Chart

This is a Stock Charting application made primarily with the p5.js JavaScript library. The program displays
the Open/Close prices of a user inputted stock ticker for the past 15 trading days. The application is
dynamically sized, allowing for the user to adjust their screen size with the chart adjusting accordingly.

## Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

### Prerequisites

The only program needed to run the application is a modern web browser (preferably Google Chrome).

## Deployment

This program can be ran simply by opening the "index.html" file. Alternatively, the application can be deployed on an "atom-live-server" if you're using the Atom text editor. Finally, you can run the app on a node.js server if you wish to set that up yourself.

## Built With

* [p5.js](https://p5js.org/) - The web framework/library used to display and update the canvas
* [Alpha Vantage](https://www.alphavantage.co/) - The API that provided the historical finance data
* [CSS](https://developer.mozilla.org/en-US/docs/Web/CSS) - Stylesheet

## Authors

* **Pearson Buck** - *Initial work* - [pacheights](https://github.com/pacheights)

See also the list of [contributors](https://github.com/your/project/contributors) who participated in this project.

## License

This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details

## Acknowledgments

* Daniel Shiffman - He provided amazing lectures on how to use the p5.js library on his [YouTube Channel](https://youtube.com/shiffman)
* etc


text:
---
layout: page
title: Multiplot
permalink: /multiplot/
parent: Plot data types
---
# Multiplot
{: .no_toc}
The `multiplot` type is the plot several Y set values with the same X values in
the same way as the `plot` type but on the same figure.

- TOC
{:toc}

## Parameters

| Parameter | Description                                    |
| :-----    | :------                                        |
| `marker`  | The marker to display at the data coordinates. |

### Example
{: .no_toc}
```python
from plotter import Plotter, PlotterType

to_plot = [
    {
        "type": PlotterType.MULTIPLOT,
        "data": [[0,1,2,3,4,5], [[15,6,5,3,5,8],[8,6,9,12,3,5]]]
    }
]

pl = Plotter(to_plot)
pl.show()
```

### Result
{: .no_toc}
![Multiplot](/img/multiplot.png)

## Markers
It is possible to add markers to the plot to highlight the points using the
`marker` parameter. The possible values for the markers are the one supported by
Matplotlib ([see doc](https://matplotlib.org/3.3.1/api/markers_api.html)).

### Example
{: .no_toc}
```python
from plotter import Plotter, PlotterType

to_plot = [
    {
        "type": PlotterType.MULTIPLOT,
        "data": [[0,1,2,3,4,5], [[15,6,5,3,5,8],[8,6,9,12,3,5]]],
        "marker": "-o"
    }
]

pl = Plotter(to_plot)
pl.show()
```

### Result
{: .no_toc}
![Multiplot with markers](/img/marked_multiplot.png)

repository: T-TROUCHKINE/plotter

gha_language: Python

repo_name: T-TROUCHKINE/plotter


text:
# sbox-net-types
A collection of network type wrappers for things like System.Collections.Generic.

# How to use

Simple, replace the following types with my wrappers:

- List\<T\> => NetworkedList\<T\>
- Dictionary\<T\> => NetworkedDirectory\<T\>
- NetworkVar\<T\> will automatically call NetworkDirty() and raise an event on change.

# License

Check LICENSE.MD, but basically, do whatever you want with it.
@facepunch if you wanna add this, go ahead, my pleasure.

license: Unlicense

repository: Erlite/sbox-net-types

repo_name: Erlite/sbox-net-types


text:
# Advanced Lane Finding Project

The following project is a part of Udacity Self Driving Nanodegree program. It involves application of techniques like camera calibration, perspective transform, color and gradient thresholding, sliding window and polynomial fitting taught during the lectures

Goal of the project is to correctly identify lane lines, measure the curvature and offset of the camera from lane centre throughout a 50 second video where in the car follows a curved path and goes through different lighting conditions.

The lane detection algorithm is first tested on a set of test images and then applied to the video.

Below are files references to images, videos and folder consisting of the output images.

[//]: # (File References)

[image1]:       ./output_images/undist_camera_cal_image_output.png
[image2]:       ./output_images/undistort_test_image_output.png
[folder1]:      ./output_images/Binary_thresholded_images
[folder2]:      ./output_images/Warped_test_images
[folder3]:      ./output_images/warped_binary_image_fit_polynomial
[folder4]:      ./output_images/Final_output_images
[video1]:       ./test_videos_output/project_video.mp4

### Camera Calibration

In the camera calibration code, with a set of chessboard images, we first try to get the objectpoints and image points(corners) to perform camera calibration using open CV calibrateCamera function.The calibrateCamera function returns camera matrix and distortion coefficients which we then use for undistortion of chessboard images. An example of the application is seen in [image1]

### Pipeline (Test on single frame images)

The pipeline involves series of algorithms applied to reach the final output stage. Code for pipeline is written under test_images_pipeline() function

1) In the first step, we try to undistort the image using the undistort()
First we read the image then convert it to grayscale.
We ran a camera calibration function on the grayscale image shape as this changes with shape.The camera matrix and undistortion coefficients obtained from camera calibration function is used to undistort the image. The output result can be found in [image2]

2) In the second step, color and gradient threshold is applied to get the binary image using threshold() function
For color threshold, we use saturation channel as it is more efficient in identifying lane lines in different road and lighting conditions
For gradient threshold, sobel operator on grayscale image is applied along x direction since the results are less noisier than combined xy.
A combination of both the threshold gives us the final binary threshold. The output images with application of threshold() function is stored in [folder1]

3) In the third step, a perspective tranform is performed over binary thresholded images using warp() function. The source and destination points were drawn on the image to verify that the lines appear parallel in the warped image. For the output images, the warp transformation is shown for non thresholded images but in the pipeline it is done on the binary thresholded image. The examples of transformation on the test images can be found in [folder2]

Below are the hard-coded source and destination points to be used in the perspective transform function

        #source points from the undistorted image
        src=np.float32([[580,460],
                    [700,460],
                    [1100,720],
                    [200,720]])

        #destination points required for perspective transform
        dst= np.float32([[370,0],
                    [980,0],
                    [980,720],
                    [370,720]])

4) In the fourth step, a check is made to see if the lane lines are detected.

If the lane lines pixels are not detected, then we first find the lane pixels using the function find_lane_pixels() by passing on the binary warped image

In the find_lane_pixels() , we first take a histogram of the bottom half image to get peaks which indicate starting point of lane lines. Then we use the technique of sliding windows moving upwards to track the path of the lane lines from bottom to top. This gives us the left and right lane pixel postions. np.polyfit() function is used to get left and right polynomials.
The left and right fit obtained is stored in line class variables so that we can keep track of polynomials fitted to the positions in each frame.The polynomials fitted to the left and right lane positions on binary warped images can be found in [folder3]

If the lane lines are detected, then to avoid longer computation time we have used search_around_poly() function to search in margin around the previous lane line positions and compute new lane positions with new polynomial fitting to them.

Once we have found out the polynomials for the left and right lane positions in the search_around_poly() functions, they are recasted back to get the left and right lane lines which is drawn on blank image and then warped back to original undistorted image so that we can see that the lane area being accurately identified. The application of the algorithm can be found in the set of images stored in [folder4]

5) In the final step, we calculate the radius of curvature using measure_curvature_ real() function for left and right lane positions in world space by using conversion factor(pixel to world space) and then fitting new polynomials and using the equation of radius of curvature presented in lectures to get radius of curvature.

Camera offset is also calculated by taking difference between camera centre (midpoint of lane centre obtained from first frame) and lane centre(average of bottom left and right lane x positions obtained in subsequent frames). Both the radius of curvature and camera offset are mentioned in the set of images stored in [folder4]

### Video
The final project video with application of the pipeline is stored in [video1].

### Project challenges
The pipeline seems to be working for majority of the video but there is little wobbliness when there the car goes up and down and during the change in road conditions. I think to improve on this, I might consider averaging over few frames and then outputting the result


text:
# Introduction

+ To encourage men to be better men in all areas of their lives - including relationships, health, career, money, and style.
+ Making our goals well-meaning intentions.

# Day 1: Define Your Core Values

+ A sense of purpose in the eyes -  the drive, purpose, and ambition
+ Focus on something that we all have the power to control: our core values.
+ living a life in line with your core values brings purpose, direction, happiness, and wholeness.
+ **Core values** are the ideas that you esteem to be of great worth and that give structure to your life.

#### What’s truly important to me as a man?

+ Honesty, Truth, Kindness
+ Discipline and Health
+ Keeping Relations
+ Education and Reason
+ Self-reliance, Independence

# Day 2: Grooming : Shine Your Shoes, Get a Straight Razor Shave, Declutter Your Life

+ Iron Clothes
+ Shine your shoes
+ Get a Straight Razor Shave
+ Clean and Trimmed nails
+ Nice hairstyle

# Day 3: Find a Mentor

+ Mentors have the experience and wisdom to give us sound guidance, direction, and advice.
+ Mentors can also help us expand our point of view on a particular area of our life.
+ Moreover, a mentor can become a good friend and confidant during times when we struggle and falter.

 -- Rumi

#### 10 things I'm grateful for

1.
2.
3.

#### 10 people I'm grateful to

1.
2.
3.

#### Write a letter to your father/Mother and show your gratitude towards them

+ My parents gave me love and education
+ They gave me the habit of being honest, kind and helpful
+ They taught me not to seek to join any particular religion but to respect all and live together in peace.
+ They gave me the knowledge, the  thing that helps us live and confront the challenges of day to day life.

# Day 6: Update Your Resume

+ Brainstorm and eliminate outdated info
+ Update resume format, facelift, appearance - latest trend
+ Use concrete Language and numbers (facts)
+ Check for spelling and grammar mistakes
+ Memorize certain things - Objectives, Goals and Achievements
+ Keep digital copies which can be accessed anywhere

# Day 7: Reconnect with an old friend

+ Friends enrich our lives and make us happier
+ Make the effort to stay in touch

# Day 8: Start a Journal

+ Great men keep **Journal**.
+ Your children and grandchildren want to read
+ It can bring you to your senses
+ It will grant you Immortality
+ It boosts your health by letting go of the things that are bothering or worrying us.

#### How to keep a journal?

+ Pick a medium - My Wordpress blog
+ Schedule a time
+ Write bulleted points
+ Make an entry "I'm not in the mood to write anything today!" incase if you don't want to write.

# Day 9: Take a woman on a date

+ There should be exclusive relationship
+ Make a weekly/monthly date night non-negotiable

#### Remember  3P's of Date

+ Paired off - Who I'm taking out?
+ Planned ahead - What do I plan on doing with her?
+ Paid for - Paid in advance for the plan

# Day 10: Memorize “If”

+ There are many advantages to memorizing information.
+ Without Knowledge, knowing how to apply it is pretty useless.
+ Memorization of something burns the ideals of that thing deep into the souls of the person.
+ The most important benefit is that you’ll be storing up a treasure trove of wisdom and knowledge that you can immediately access when you need extra motivation to man up.
+ There are countless benefits to memorizing great poems and passages.
    + Improved writing
    + Increased vocabulary
    + Makes you a more interesting personality
    + A strengthened backbone -  storing up a treasure trove of wisdom and knowledge into your brain

# Day 11: Create Your Bucket List

+ Building Home, 2017
+ Changing Company by March, 2018
+ Paying Education Loan, 2018
+ Travelling to
    + Egypt
    + Venice
    + Paris
    + Vegas
    + Rio
    + Medina
    + Switzerland
+ Building Eye Hospital / School - 2050

# Day 12: Make a Meal

+ Cooking makes you Self-Sufficient
+ Cooking saves you Money
+ Cooking keeps you Healthy
+ Cooking is an Art and Creative
+ Cooking boosts your Social Skills

# Day 13: Create a Budget

+ Creating budget puts you in control
+ Reduces Stress
+ Increases Confidence
+ Makes you self-reliant

#### How to create a budget:

+ Assess your monthly income (MI)
+ List your Fixed Expenses (FE)
+ Variable Expenses Spending Limit (VE)
+ Total Expenses (TE = FE + VE)
+ Savings(S) = MI - TE

# Day 14: Talk to 3 Strangers

+ Reach out to others and **Expand your Circle Of Influence**
+ ***Make new friends***: All it takes to make a potentially lasting connection is for us to open our mouth.
+ ***Meet a Potential Mate***: There are women everywhere. You just need to go out there and meet them. Just be friendly and approachable.
+ ***Expand your Business Network***: Talking to strangers habit can help you advance your career.
+ ***Increase your social skill***: Talking to strangers provides you ample opportunity to hone your social skills.
+ ***Learn new things***: Learn new things from strangers and broaden your view on the world.
+ ***Boost your confidence***: There something good about talking to strangers that boosts your confidence. You'll feel good so keep it up.

#### How to talk to strangers?

+ let go of your pride
+ dress for success
+ smile and say 'Hi'
+ Break the conversation by finding something you've in common at the moment
+ Talk to the people @ businesses you frequent
+ Ask questions
+ Be Authentic / Original

# Day 15: Find Your N.U.Ts (Non-Negotiable & Unalterable Terms)

+ Being true to myself and others
+ I'm risk taker
+ Keeping my words and promises
+ Respecting  elders
+ Exercising regularly
+ Speaking my Mind
+ Apologizing when it's appropriate and not to simply please others
+ Welcoming feedback
+ Educating myself each day something new!
+ Focusing on what most important to my life
+ What friends have I abandoned?
+ What dreams have I abandoned?
+ What fun activities have I abandoned?
+ What I've to do differently to be the man I wanna be?

# Day 19: Schedule a Physical Activity

+ 30 day challenge workout

# Day 20: Perform Service

> "Sacrifice is arguably the manliest of virtues". Sacrifice of time and resources in service to others. Selfishness cankers our souls.

+ The public service we render is the rent we pay for our place on earth.
+ It makes us happy. " It's giving, not getting, that makes us really happy.
+ It puts your problem in perspective and breaks down prejudices
+ It helps you find your authentic self.

#### How to Perform Service?

+ Volunteer for an organization (VOs), check some NGO websites
+ Start your own volunteering project / charity show etc.

# Day 21: Write Your Own Eulogy

+ We must confront our mortality time to time.
+ Acknowledging this fact can help us concentrate on living each # Day with purpose.
+ What would it be like to die and attend your own funeral?
+ Who would be there?
+ How many people will come?
+ What will people say about me?
+ What will be the scenario? Will the loved ones will becrying/ cursing/ composed/ carried away by dark and will be deeply hurt?

#### Steps - 1:Write an outline

+ Where did you live? Did you stay in the town you were born in? Did you live in a far-flung land? Did you move every few years? Where did you retire?
+ What were you hobbies? What did you enjoy doing in your 20s and 30s? What did you enjoy doing with your family? What kept you busy in retirement?
+ What kind of relationships did you have? Did you get married? How many kids did you have? How many friends did you have? Many? A few really good ones?
+ Where did you go to school? What did you study?
+ What did you do for work? Did you stay with one company or job your whole life or did you change careers many times?
+ Did you win any awards or accomplish any noteworthy feats?
+ What was most memorable about you? Your zany sense of humor? Your delicious cooking? Your insatiable love for adventure? Your passion for the outdoors? Your unshakable faith?
+ What was it about you that people admired most? Your unwavering loyalty to your friends? Your honesty? Your work ethic? Your love for you family? Your patience? Your leadership?
+ What will people miss most about you? Te creative homemade gifts you gave every Christmas? What a good listener you were? Te handwritten letters you sent to friends? The way you could turn every mishap into something to laugh about?

#### Step - 2 :Turn your outline into a eulogy

+ Birth and childhood. Keep this section pretty brief.
+ College and career. Where you went to school, what you majored in, what jobs you had. Include any awards you won or accomplishments you made.
+ Family & Relationships.
+ Your hobbies and interests.
+ The qualities and characteristics that set you apart and made you memorable.
+ What people will miss about you?

# Day 22: Improve Your Posture

+ There are several ways that good posture can improve both mind and body.
    + Improve Organ Function
    + Reduce Tension and Pain in Neck Shoulders and Back
    + Increase Concentration and Mental Performance
    + Prevent Humped Shoulders
    + Increase Height
    + Prevent Beer Belly
    + Increase Confidence

# Day 23: Learn a Manual Skill

+ Men are made to be productive, to create things with our hands.
+ Do some Physical Work -tool making, water filling with bucket, wood chopping etc.

# Day 24: Play!

+ We shouldn't grow out of play. Humans are uniquely designed to play throughout our entire lifetime.
+ Play boosts our optimism and Immune System, Increases our happiness and gives us a sense of belonging and community.

# Day 25: Start a Debt Repayment Plan

+ A man should strive to be self-reliant as possible.
+ It also means that he must live a debt free life.

#### Dave Ramsey's Snowball Plan

+ List your debts in order from Lowest balance to Highest balance
+ Paying off the debt with Lowest Balance
+ Add the money that had been going to that debt to what you've been paying against the next lowest debt.

# Day 26: Take the Marine Corp Fitness Test

+ Exercises for our mind and character are important, but it’s equally important to exercise our bodies.
+ A man’s health is his most important asset
+ The Marine Corps Fitness test consists of three exercises:
    + pull-ups
    + crunches and
    + 3-mile run.
+ The events are “designed to test the strength and stamina of the upper body, midsection, and lower body, as well as the efficiency of the cardiovascular system.”

#### Steps:

1. Pull-Ups : 20 minimum in one go
2. Abdominal Crunches : for 2 minutes as many as possible (target is 100)
3. 3 mile run or 5 km approx (target to complete it in 18 min.)

# Day 27: Start a Book (The Benefits of Reading)

1. Improves your writing
2. Provides fodder for conversation
3. Improves concentration and focus
4. Increases creativity
5. Makes you a better man
6. Broadens your perspective

# Day 28: Write a Love Letter

> One need not wait until they are nigh unto death to make their feelings known. Each day could be your last; tell her how you feel right now.

+ Every man should strive to be a romantic lover.
+ The date is one of a man’s best tools for wooing a lady.
+ A man’s other major tool in the romance is the love letter.
+  It has been the go-to way for millions of men throughout history to confess or reiterate their feelings of love for another.
+  It’s a chance to express your feelings in a more ardent way than you do on a day-to-day basis.

#### Why Write a Love Letter?

+ It’s something tangible that we touch and hold and then pass to another to touch and hold.
+ The love letters you give to someone are testaments in the history of your love.
+ They constitute a record of your relationship.

#### How to Write a Love Letter:

1. Start off by stating the purpose of your letter
2. Recall a romantic memory
3. Now transition to a section about the things you love about her
4. Tell her all the things you love about her
5.  Reaffirm your love and commitment
7. End with a line that sums up your love

The most important rule is to be completely authentic. Write only those things that you truly feel.

# Day 29: Conquer a Fear

> “Many of our fears are tissue-paper-thin, and a single courageous step would carry us clear through them.”   —***Brendan Francis***

+ Fear can be a good thing.
+ It’s a biological instinct that prevents us from doing stupid things that might kill us.
+ Unfortunately, fear is not always rational and not always healthy.
+ It can hold us back from the chance at both the pain of a crushed ego and the exhilaration of victory and success.

#### What Fear is?

1. Fear is irrational
2. Fear is cowardly
3. Fear robs you of your integrity
4. Fear pushes you from the driver’s seat
5. Fear leaves regrets
6. Fear slows our personal growth

#### Overcoming Your Fears

1. Change your perspective on fear
2. Change your perspective on risk
3. Act courageous
4. Think about the great men of history
5. Kill the fear with logic
6. Memorize this quote
7. There’s no need to feel the fear, just do it!

> “Life is either a daring adventure or nothing. Security does not exist in nature, nor do the children of men as a whole experience it. Avoiding danger is no safer in the long run than exposure.”  ***—Helen Keller***

# Day 30: Conclusion: Congratulations!

[THE ART OF MANLINESS](http://www.artofmanliness.com/FCR/AoM-30-Days.pdf)

url: https://raw.githubusercontent.com/sarfarazit08/CodeRepo/a09a406ddb2c51da62db1590486682aba31fc962/Others/Markdown notes/The Art of Manliness.md

filename: The Art of Manliness.md

gha_language: Jupyter Notebook


text:
# Summary
This utility determines other Lego sets you can build based on the Lego sets you own. In order to do so, you need to:
- Create an account at Brickset.com (it's a really nice website anyway if you like Lego)
- Add Lego sets to your collection in Brickset.com
- Get a Brickset.com API key. You can get one at https://brickset.com/tools/webservices/requestkey. They will send you
a key to your email address in a matter of seconds/minutes

# Installation

Clone this repo:
```
git clone https://github.com/amcarvalho/lego-finder
```

Install requirements (it's a good idea to do this within a python virtual environment):
```
pip install -r requirements.txt
```

# Usage
    python set_finder.py <brickset_username> <brickset_password> <brickset_api_key> [-p PERCENTAGE] [-m MIN_PARTS] [-c] [-r]

    Arguments:
        brickset_username       Your account/username on Brickset.com
        brickset_password       Your account password on Brickset.com
        brickset_api_key        Your Brickset.com API key. Get a key at: https://brickset.com/tools/webservices/requestkey

    Options:
        -h --help                                       Show this screen.
        -r --reload_inventory                           Rebuilds inventory DB. Do this once in a while when Lego releases
                                                        new sets [default=False].
        -c --color_match_disabled                       If set, it will return sets where you have all the parts but some
                                                        of them will not match colors [default=False].
        -p PERCENTAGE --percentage_min_match=PERCENTAGE Yields sets where you have at least a percentage of all parts
                                                        [default=95].
        -m MIN_PARTS --min_parts=MIN_PARTS              Filters results by sets with at least MIN_PARTS. [default=10]

repository: amcarvalho/lego-finder

repo_name: amcarvalho/lego-finder


text:
BOWSER, DIY BITCOIN HARDWARE WALLET (BETA)

Building your own hardware wallet is a bit like building a lightsaber, only really necessary if you want to be a Jedi.

Now building hardware wallets is easy with the help of uBitcoin an Arduino library created by Stepan Snigirev.

Building hardware wallets not only gives greater autonomy/liberty, it is an excellent excuse to get a deeper understanding of how bitcoin keys, seeds and signing works.

## Tutorial
https://www.youtube.com/watch?v=DG1zrlAVdys

## SD COMMANDS

Commands to enter into bowser.txt on the SD card.

Wipe device completely, setup new wallet:

```HARD RESET```

Restore from a seed backup:

```RESTORE husband behind shallow promote....```

Sign an Electrum transaction:

```SIGN 45505446ff00020000000001016cb....```

## Installing Arduino
Install Aruino IDE
https://www.arduino.cc/en/Guide/HomePage

Install ESP32 Boards
https://github.com/espressif/arduino-esp32/blob/master/docs/arduino-ide/boards_manager.md

## Libraries Used
- uBitcoin (Download library from github and "Add Zip Library" in Arduino Library Manager)
- M5Stack (Install from "Library Manager" in Arduino)
- [lvgl](https://lvgl.io/) (Install from "Library Manager" in Arduino, search as "lvgl", appears in the list as "lv_arduino")
## Materials
- M5Stack (grey one is better)
- SD card (not sure if size is an issue for larger SD, 16GB works fine)


text:
# MqttIotHubConnection Requirements

## Overview

An MQTT connection between a device and an IoT Hub. The connection talks to various messaging clients to exchange messages between mqtt lower layers and upper layers of the SDK.

## References

## Exposed API

```java
public final class MqttIotHubConnection implements MqttConnectionStateListener, IotHubTransportConnection
{
    public MqttIotHubConnection(DeviceClientConfig config) throws TransportException;

    public void open(Queue<DeviceClientConfig> deviceClientConfigs) throws TransportException;
    public void close() throws TransportException;

    private IotHubTransportMessage receiveMessage() throws TransportException;

    @Override
    public void setListener(IotHubListener listener) throws TransportException;

    @Override
    public IotHubStatusCode sendMessage(Message message) throws TransportException;

    @Override
    public boolean sendMessageResult(Message message, IotHubMessageResult result) throws TransportException;

    @Override
    public void onMessageArrived(int messageId);
}
```

### MqttIotHubConnection

```java
public MqttIotHubConnection(DeviceClientConfig config) throws TransportException;
```

**SRS_MQTTIOTHUBCONNECTION_15_001: [**The constructor shall save the configuration.**]**

**SRS_MQTTIOTHUBCONNECTION_15_003: [**The constructor shall throw a new TransportException if any of the parameters of the configuration is null or empty.**]**

**SRS_MQTTIOTHUBCONNECTION_34_020: [**If the config has no shared access token, device key, or x509 certificates, this constructor shall throw an IllegalArgumentException.**]**

### open

```java
public void open(Queue<DeviceClientConfig> deviceClientConfigs) throws TransportException;
```

**SRS_MQTTIOTHUBCONNECTION_15_004: [**The function shall establish an MQTT connection with an IoT Hub using the provided host name, user name, device ID, and sas token.**]**

**SRS_MQTTIOTHUBCONNECTION_25_018: [**The function shall establish an MQTT WS connection with a server uri as `wss://<hostName>/$iothub/websocket?iothub-no-client-cert=true` if websocket was enabled.**]**

**SRS_MQTTIOTHUBCONNECTION_25_019: [**The function shall establish an MQTT connection with a server uri as `ssl://<hostName>:8883` if websocket was not enabled.**]**

**SRS_MQTTIOTHUBCONNECTION_15_005: [**If an MQTT connection is unable to be established for any reason, the function shall throw a TransportException.**]**

**SRS_MQTTIOTHUBCONNECTION_15_006: [**If the MQTT connection is already open, the function shall do nothing.**]**

**SRS_MQTTIOTHUBCONNECTION_99_017: [**The function shall set DeviceClientConfig object needed for SAS token renewal.**]**

**SRS_MQTTIOTHUBCONNECTION_34_027: [**If this function is called while using websockets and x509 authentication, an UnsupportedOperation shall be thrown.**]**

**SRS_MQTTIOTHUBCONNECTION_34_030: [**This function shall instantiate this object's MqttMessaging object with this object as the listener.**]**

**SRS_MQTTIOTHUBCONNECTION_34_022: [**If the list of device client configuration objects is larger than 1, this function shall throw an UnsupportedOperationException.**]**

### close

```java
public void close() throws TransportException;
```

**SRS_MQTTIOTHUBCONNECTION_15_006: [**The function shall close the MQTT connection.**]**

**SRS_MQTTIOTHUBCONNECTION_15_007: [**If the MQTT connection is closed, the function shall do nothing.**]**

**SRS_MQTTIOTHUBCONNECTION_34_037: [**If an IOException is encountered while closing the mqtt connection, this function shall set this object's state to CLOSED and rethrow that exception.**]**

**SRS_MQTTIOTHUBCONNECTION_34_021: [**If a TransportException is encountered while closing the three clients, this function shall set this object's state to closed and then rethrow the exception.**]**

### sendMessage

```java
public IotHubStatusCode sendMessage(Message message) throws TransportException;
```

**SRS_MQTTIOTHUBCONNECTION_15_008: [**The function shall send an event message to the IoT Hub given in the configuration.**]**

**SRS_MQTTIOTHUBCONNECTION_15_009: [**The function shall send the message payload.**]**

**SRS_MQTTIOTHUBCONNECTION_15_010: [**If the message is null, the function shall return status code BAD_FORMAT.**]**

**SRS_MQTTIOTHUBCONNECTION_15_011: [**If the message was successfully received by the service, the function shall return status code OK_EMPTY.**]**

**SRS_MQTTIOTHUBCONNECTION_15_013: [**If the MQTT connection is closed, the function shall throw an IllegalStateException.**]**

**SRS_MQTTIOTHUBCONNECTION_34_035: [**If the sas token saved in the config has expired and needs to be renewed, this function shall return UNAUTHORIZED.**]**

### receiveMessage
```java
private IotHubTransportMessage receiveMessage() throws TransportException;
```

**SRS_MQTTIOTHUBCONNECTION_15_014: [**The function shall attempt to consume a message from various messaging clients.**]**

**SRS_MQTTIOTHUBCONNECTION_15_015: [**If the MQTT connection is closed, the function shall throw a TransportException.**]**

**SRS_MQTTIOTHUBCONNECTION_34_017: [**If all of the messaging clients fail to receive, the function shall throw a TransportException.**]**

### setListener
```java
public void setListener(IotHubListener listener) throws TransportException;
```

**SRS_MQTTIOTHUBCONNECTION_34_049: [**If the provided listener object is null, this function shall throw an IllegalArgumentException.**]**

**SRS_MQTTIOTHUBCONNECTION_34_050: [**This function shall save the provided listener object.**]**

### sendMessageResult
```java
public boolean sendMessageResult(Message message, IotHubMessageResult result) throws TransportException;
```

**SRS_MQTTIOTHUBCONNECTION_34_051: [**If this object has not received the provided message from the service, this function shall throw a TransportException.**]**

**SRS_MQTTIOTHUBCONNECTION_34_052: [**If this object has received the provided message from the service, this function shall retrieve the Mqtt messageId for that message.**]**

**SRS_MQTTIOTHUBCONNECTION_34_053: [**If the provided message has message type DEVICE_METHODS, this function shall invoke the methods client to send the ack and return the result.**]**

**SRS_MQTTIOTHUBCONNECTION_34_054: [**If the provided message has message type DEVICE_TWIN, this function shall invoke the twin client to send the ack and return the result.**]**

**SRS_MQTTIOTHUBCONNECTION_34_055: [**If the provided message has message type other than DEVICE_METHODS and DEVICE_TWIN, this function shall invoke the telemetry client to send the ack and return the result.**]**

**SRS_MQTTIOTHUBCONNECTION_34_056: [**If the ack was sent successfully, this function shall remove the provided message from the saved map of messages to acknowledge.**]**

**SRS_MQTTIOTHUBCONNECTION_34_057: [**If the provided message or result is null, this function shall throw a TransportException.**]**

###
```java
public void onMessageArrived(int messageId);
```

**SRS_MQTTIOTHUBCONNECTION_34_058: [**This function shall attempt to receive a message.**]**

**SRS_MQTTIOTHUBCONNECTION_34_059: [**If a transport message is successfully received, this function shall save it in this object's map of messages to be acknowledged along with the provided messageId.**]**

**SRS_MQTTIOTHUBCONNECTION_34_060: [**If a transport message is successfully received, and the message has a type of DEVICE_TWIN, this function shall set the callback and callback context of this object from the saved values in config for methods.**]**

**SRS_MQTTIOTHUBCONNECTION_34_061: [**If a transport message is successfully received, and the message has a type of DEVICE_METHODS, this function shall set the callback and callback context of this object from the saved values in config for twin.**]**

**SRS_MQTTIOTHUBCONNECTION_34_062: [**If a transport message is successfully received, and the message has a type of DEVICE_TELEMETRY, this function shall set the callback and callback context of this object from the saved values in config for telemetry.**]**

**SRS_MQTTIOTHUBCONNECTION_34_063: [**If a transport message is successfully received, this function shall notify its listener that a message was received and provide the received message.**]**

repository: kartben/azure-iot-sdk-java

repo_name: kartben/azure-iot-sdk-java


text:
# An Asynchronous Computing Implementation for C

This is a simple asynchronous parallel thread pool implementation for ANSI C that is meant to mimic the user-friendly interface of MATLAB's Parallel Computing Toolbox thread pool implementation. The code is implemented using POSIX Threads but no external dependances. Projects using this code should be compiled with `-lpthread`.

## Interface

`typedef parpool`
- A struct to encapsulate the parallel thread pool.

`typedef future`
- Encapsulates a function that is going to be run on the parpool. Once the function has been run, the output of the function is stored in the `output` field of the future.

`parpool* parpool_init ( int num_threads )`
- Create a parallel thread pool with the inputted number of threads.

`void parpool_eval ( parpool *pool, future *future, void *(fcn)(void *), void* arg )`
- Add a job for the parpool to execute.
- The next available worker will execute the function passed in as `fcn` with the argument `arg`.
- The output of the function is stored in the future when it has completed execution

`void parpool_wait ( future *future )`
- Halt execution of the calling thread until the future has completed.
- Once the future has completed, the output of the function that was run is in `future.output`

`void parpool_wait_all ( future *futures, int num_futures )`
- Halt execution of the calling thread until `num_futures` in `futures` has completed.
- `num_futures` should be equal to the number of futures stored in `futures`

`parpool_delete ( parpool *pool )`
- Deallocate the parpool and kill all of its workers.

## Example Usage

In the following extremely simple example, we will use the parallel pool to multiply an array of integers by 2:

```C

/* Mulitply the number at num_in by 2 and return the pointer*/
void * fcn ( void *num_in )
{
    int *n = (int *) num_in;
    *n = (*n) * 2;

    return num_in;
}

int main ( void )
{
    // start a parpool with 4 threads
    parpool *pool = parpool_init(4);

    // allocate the futures
    future futures[10];

    // use the parpool to multiply integers 0-9 by 2;
    int numbers[10];
    for ( int i = 0; i < 10; i++ )
    {
        numbers[i] = i;
        parpool_eval( pool, &futures[i], fcn, (void *)(&numbers[i]) );
    }

    // block execution until all the jobs have completed
    parpool_wait_all( futures, 10 );

    // print the results
    for ( int i = 0; i < 10; i++ )
    {
        int *result = (int *) futures[i].output;
        printf( "%d ", *result );
    }

    // delete the parpool
    parpool_delete( pool );
}

```

Output:
```
0 2 4 6 8 10 12 14 16 18
```

repository: evanstella/C-Parallel-Computing

repo_name: evanstella/C-Parallel-Computing


text:
# Overpass-Wrapper library
[![Download](https://api.bintray.com/packages/anorak/overpass-wrapper/overpass-wrapper/images/download.svg)](https://bintray.com/anorak/overpass-wrapper/overpass-wrapper/_latestVersion) [![Build Status](https://travis-ci.org/wolfhardfehre/overpass-wrapper.svg?branch=master)](https://travis-ci.org/wolfhardfehre/overpass-wrapper) [![codecov](https://codecov.io/gh/wolfhardfehre/overpass-wrapper/branch/master/graph/badge.svg)](https://codecov.io/gh/wolfhardfehre/overpass-wrapper)

## Get It

Grab it via Maven:

```xml
<dependency>
  <groupId>nice.fontaine</groupId>
  <artifactId>overpass-wrapper</artifactId>
  <version>{VERSION}</version>
  <type>pom</type>
</dependency>
```
or Gradle:

```groovy
repositories {
     jcenter()
 }
```

```groovy
compile 'nice.fontaine:overpass-wrapper:{VERSION}'
```

## Introduction

A Java wrapper library around the [Overpass QL][0] to query the [Overpass API][1]. Overpass is used
to query physical [OpenStreetMap (OSM)][2] [features][3] on the ground (e.g., roads or buildings)
using [tags][4] attached to its basic data structures ([nodes,][5] [ways,][6] [relations][7]). Each
tag describes a geographic attribute of the feature being shown by that specific node, way or
relation.

The building blocks of the query language are **statements** and have imperative semantics, meaning
all statements are processed one after another and change the execution state according to their
semantics. The **execution state** consists of the default set, potentially other named sets, basic
structures, block statements, standalone queries and request/response settings.

## Similar Projects
Other overpass wrappers you should definitely look into...

1) [Overpasser by zsoltk](https://github.com/zsoltk/overpasser)
2) [Overpass by johnjohndoe](https://github.com/johnjohndoe/Overpass)

## Basic Statements

The structure hierarchy is **nodes > ways > relations**. Only nodes contain geometries.

+ **[Basic structures][8]**
    + **NodeQuery** equivalent to nodes - simple point geometries as smallest unit
    + **WayQuery** equivalent to way - line or polygon geometries build of nodes
    + **RelationQuery** equivalent to relation - multigeometry structure describing relationships
    + **ComplexQuery** possible mix of setting, recursion, set, node, way or relation

### Other Statements

+ **[Standalone Queries:][9]** These are complete statements on their own
    + **Recursions** can be used to additionally select base structures up or down the hierarchy
    + **Sets** are created as result sets of statements and are read by subsequent statements as input. A set can contain nodes, ways, relations and areas, also of mixed type and of any number.

+ **[Filters:][10]** They are always part of a query statement and contain the interesting selectors and filters.
    + **SearchRegion** allows to filter by **Type**: *BOUNDING_BOX*, *AROUND*, *POLYGON*, *AREA*
    + **Tags** allows to filter by attribute **Filter**: *EQUAL*, *NOT_EQUAL*, *IS*, *IS_NOT*, *LIKE*, *NOT_LIKE*
    + **Selection** inside **BaseQuery** allows to filter by recurse up or down the structure hierarchy: *FORWARD_NODE*, *FORWARD_WAY*, *FORWARD_RELATION*, *BACKWARD_NODE*, *BACKWARD_WAY*, *BACKWARD_RELATION*

+ **[Block Statements:][11]** They group statements and enable disjunctions as well as loops.
    + in **ComplexQuery** you'll find combined operations: *union*, *difference* and *intersection*

+ **[Settings:][12]** Things like output format that can be set once.
    + **Settings** describes request conditions: *timeout*, *maxsize*, *global bounding box*
    + **Modifier** are single additional information that can be written to each element: *BOUNDING_BOX*, *CENTER*, *GEOM*, *COUNT*
    + **Verbosity** levels of response: *BODY*, *SKELETON*, *META*, *IDS*, *TAGS*

## Examples

* [Here][13] you find a list of API endpoints and
* [here][14] a list of possible map features.

#### Post Box Example

Get all postal boxes around the position (latitude: 52.5, longitude: 13.4) in a 500 m radius.

**Conditions**

+ Server side query timeout at 25 seconds
+ Within a radius of 500 meter of a position
+ Case sensitive equality search

**Overpass QL**

```groovy
[out:json][timeout:25];
node["amenity"="post_box"](around:500.0,52.5,13.4);
out;
```

**Overpass Wrapper**

```java
NodeQuery node = new NodeQuery.Builder()
        .timeout(25)
        .tag("amenity", "post_box")
        .around(52.5, 13.4, 500.0)
        .build();

Call<OverpassResponse> call = Overpass.ask(node);
```
> **Note:** Response format is always JSON

> **Note:** Default timeout is 10 seconds

> **Note:** Default tag operator is always equals

#### ILike Alexanderplatz Example

Make Auto-complete Address Search like with GooglePlacesAPI
taking user position into account limit to 10 results.

**Conditions**

+ Case insensitive regex text search
+ Within a 1000 meter radius of a position
+ Limited to the best 10 results
+ Ascending order by distance

**Overpass QL**

```groovy
[out:json][timeout:10];
node[name~"alex", i](around:1000.0,52.521884,13.413181);
out 10 qt;
```
**Overpass Wrapper**

```java
NodeQuery node = new NodeQuery.Builder()
        .ilike("name", "alex")
        .around(52.521884, 13.413181, 1000.0)
        .sort()
        .limit(10)
        .build();

Call<OverpassResponse> call = Overpass.ask(node);
```

#### Public transport Route
Get all routes containing a specific station.

**Conditions**

+ Case insensitive regex and equility text search
+ Recurse up to get relations by node
+ Get geometries of ways and node within relation

**Overpass QL**

```groovy
[out:json];
(node["name"~"U Boddinstraße", i]
["public_transport"="stop_position"]
["railway"="stop"];
<;);out geom;
```

**Overpass Wrapper**

```java
NodeQuery node = new NodeQuery.Builder()
        .ilike("name", "U Boddinstraße")
        .equal("public_transport", "stop_position")
        .equal("railway", "stop")
        .build();

ComplexQuery complex = new ComplexQuery.Builder()
        .union(node, Recursion.UP)
        .modifier(Modifier.GEOM)
        .build();

Call<OverpassResponse> call = Overpass.ask(node);
```

## Dependencies

* Retrofit2
* OkHttp3
* Moshi

## Tests

Run the following command to execute all tests:

```bash
    $ ./gradlew clean test
```

## Publish

As explained [here](https://github.com/bintray/gradle-bintray-plugin)

    $ ./gradlew bintrayUpload

## Author

* [Wolfhard Fehre][wolfhard]

## License

    Copyright 2018 Wolfhard Fehre

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

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

[wolfhard]: https://github.com/wolfhardfehre

[0]: https://wiki.openstreetmap.org/wiki/Overpass_API/Overpass_QL
[1]: https://wiki.openstreetmap.org/wiki/Overpass_API
[2]: https://www.openstreetmap.org
[3]: https://wiki.openstreetmap.org/wiki/Features
[4]: https://wiki.openstreetmap.org/wiki/Tags
[5]: https://wiki.openstreetmap.org/wiki/Node
[6]: https://wiki.openstreetmap.org/wiki/Way
[7]: https://wiki.openstreetmap.org/wiki/Relation
[8]: https://wiki.openstreetmap.org/wiki/Overpass_API/Language_Guide#Overpass_QL_Basics
[9]: https://wiki.openstreetmap.org/wiki/Overpass_API/Overpass_QL#Standalone_queries
[10]: https://wiki.openstreetmap.org/wiki/Overpass_API/Overpass_QL#Filters
[11]: https://wiki.openstreetmap.org/wiki/Overpass_API/Overpass_QL#Block_statements
[12]: https://wiki.openstreetmap.org/wiki/Overpass_API/Overpass_QL#Settings
[13]: https://wiki.openstreetmap.org/wiki/Overpass_API#Introduction
[14]: https://wiki.openstreetmap.org/wiki/Map_Features

repository: wolfhardfehre/overpass-wrapper

gha_language: Java

repo_name: wolfhardfehre/overpass-wrapper


text:
Deterministic GPG brainwallet keychain generator
=============================

GPG-HD is a deterministic full GPG keychain (CA key + 3 subkeys) generator using an input seed such as a BIP-39 phrase.  It also automates writing this keychain to Yubikeys and generates public SSH keys.  For those who don't want their digital identity to be tied to physical media in case of theft/loss/or electronic failure.  This Idea was prompted by [electrum](https://electrum.org/), DJB's blog [Entropy Attacks](http://blog.cr.yp.to/20140205-entropy.html), and Arttu Kasvio's [ deterministic GPG key project.](https://github.com/arttukasvio/deterministic)

Requirements
------------

* gpg
* monkeysphere
* python3-crypto
* python3-pexpect

Installation
------------

sudo apt-get install gpg monkeysphere python3-crypto python3-pexpect make

Or if you're really lazy:
`make install`  (will need sudo elevation)

How to use
----------

`./gpg-hd -h`

`./gpg-hd "some awesome BIP-39 seed ..."  [--card]`

`./gpg-hd --name="Satoshi Nakamoto"<EMAIL_ADDRESS>[--card] "some awesome BIP-39 seed phrase ..."`

If the argument `--card` is supplied then GPG-HD will attempt to write the three subkeys (Encryption, Auth, Sig) to a card such as a Yubikey.

By default GPG-HD uses 1970-01-1 (Unix epoch of 1 second) to signal a deterministic keychain.  Optionally one can over-ride this with `--date=unix_time_in_secs`
 while key expirations are defaulted to 2 years.

Private and Public GPG keychain files + SSH public key are located in the `keys` sub-directory.

Testing
----------

If on a non-debian system, you can easily test with docker (needs to be installed):

`make docker-test`

Use Cases
----------

On an airgap machine, use a safe brainwallet such as [PortalWallet](https://github.com/Logicwax/PortalWallet) to generate a BIP-39 phrase:

`SEED = portalwallet("satoshi")`

 `SEED="fetch december jazz hood pact owner cloth apart impact then person actual"`

 `./gpg-hd $SEED --name="satoshi"<EMAIL_ADDRESS>
 or

 `./gpg-hd $SEED --name="satoshi"<EMAIL_ADDRESS>--card` will create a yubikey (which you can also use for SSH authentication along with the exported SSH key)

repository: Logicwax/gpg-hd

gha_license_id: Unlicense

repo_name: Logicwax/gpg-hd


text:
## Cash-Shop
This program uses the PayPal IPN system to validate payments.
We utilize 2 web-servers for this. One from a port 80 webserver (since IPN only allows port 80)
and one from a port 82 server. The port 80 webserver
is a webserver provided by 000webhost. The port 82 server is our main Synced Online webserver in the
dedicated server.

## How the server communication works
- The player buys an item from the cashshop, and the PayPal IPN is triggered in port 80
- The PayPal IPN validates the payment in port 80
- Once validated, it will send post variables through CURL to the BillingSuccess.php in port 82
- In the BillingSuccess.php it will update the SQL database with the purchased items in port 82


text:
---
layout: "thunder"
page_title: "thunder: thunder_slb_svm_source_nat"
sidebar_current: "docs-thunder-slb-svm-source-nat"
description: |-
    Provides details about thunder SLB svm source nat resource for A10
---

# thunder\_slb\_svm\_source\_nat

`thunder_slb_svm_source_nat` Provides details about thunder SLB svm source nat
## Example Usage

```hcl
provider "thunder" {
  address  = "<IP_ADDRESS>"
  username = "admin"
  password = "admin"
}

resource "thunder_slb_svm_source_nat" "svm_source" {
	pool = "test"
}
```

## Argument Reference

* `pool` - Specify NAT pool or pool group

repository: DanielAtella/terraform-provider-thunder

extension: markdown

repo_name: DanielAtella/terraform-provider-thunder


text:
Testing
=======

Connect relies on a number of test steps:

 - maven integration tests (unit tests are supported)
 - circleci continuous integration [link](https://circleci.com/gh/emenlu/connect) on commits and pull requests
 - codecov coverage reports [link](https://codecov.io/gh/emenlu/connect) generated with jacoco

In addition to the integration testing and coverage reporting done by circleci developers are also expected to test their changes locally. The maven commands are:

 - run unit tests only: `mvn test`
 - clean `target/`, run unit tests and then integration tests: `mvn clean verify`

During integration testing an included neo4j server will automatically be started. **An error will be thrown if a unit test case tries to access a route that queries the database.** The database is *not* ephemeral, but lives in the `target/` directory. Most tests will create stuff in the database and will run into problems if entries, collections or users already exists. This is why it is recommended to run `clean` before `verify`.

Writing test cases
------------------
The connect backend is tested using the pippo module `pippo-test` ([link](http://www.pippo.ro/doc/testing.html)).

There are some additional modules that are used to facilitate easier testing of expected behaviour.
 - Some API actions will send an email. It is possible to use a mock `MailClient`, such as `Mailbox` to capture and verify mails.
 - A `URLParser` class helps with link extraction.

Detecting test files
--------------------
A test file is run during unit testing if it matches `*Test.java` or `Test*.java`.

Integration tests are matched with `IT*.java` and `*IT.java`.

repository: serpconnect/backend

repo_name: serpconnect/backend


text:
# posh-sdk - the POwerSHell Groovy enVironment Manager
Posh-SDK is a clone of the [SDKMAN CLI](https://sdkman.io). In most aspects its an 1:1 copy of the BASH based version.

This project is a fork from the original posh-sdk project created and maintained by flofreud. It has been forked to try and attempt to take over some maintenance of the project and bring it up to date as the old project has stopped functioning.

For further information about the features of Posh-SDK please the documentation on the [SDKMan Project Page](http://sdkman.io).

Posh-SDK consumes the REST-API of the offical SDKMan CLI and may therefore break if the API will be changed in future.

Please report any bugs and feature request on the [GitHub Issue Tracker](https://github.com/gomorpheus/posh-sdk/issues).

## Differences to the BASH version
- different directory used as default ~\.posh-sdk instead of ~\.sdk -> posh-sdk is not directly able to manage the .sdk-dir of SDK
- command extension are not supported
- different way to configurate data-dir and auto-anwser
- not all installable candidates are useful currently in Powershell (eg the groovyserv 0.13 package is not usable because there is no client app/script in the package)

## Installation

You have multiple choices for installation of posh-sdk:

Requirements:
- Powershell 3.0+ (included in Windows 8+/Windows Server 2012+, for Windows 7 install Windows Management Framework 3.0)

### Via short script
1. Execute `(new-object Net.WebClient).DownloadString('https://raw.githubusercontent.com/gomorpheus/posh-sdk/master/GetPoshSdkMan.ps1') | iex`
2. Execute `Import-Module posh-sdk`(best add it to your profile.ps1)
3. Execute `sdk help` to get started!

### With PsGet
1. Execute `Install-Module posh-sdk`
2. Execute `Import-Module posh-sdk`(best add it to your profile.ps1)
3. Execute `sdk help` to get started!

### Classic way
1. Checkout this repository to your Powershell module-directory.
2. Execute `Import-Module posh-sdk`(best add it to your profile.ps1)
3. Execute `sdk help` to get started!

## Update

Newer versions of posh-sdk will notify you about new versions which can be installed by `sdk selfupdate`. If `sdk version` does not show a version of posh-sdk you have to update manually.

### How to get a update of posh-sdk manually ?
How to update depends on how you installed posh-sdk:

#### With PsGet

	Update-Module posh-sdk

#### Via short Script

	(new-object Net.WebClient).DownloadString('https://raw.githubusercontent.com/gomorpheus/posh-sdk/master/GetPoshSdkMan.ps1') | iex

#### Classic way
Go to the checkout location and pull the repository.

## Usage

For a general overview of the feature please the [SDKMan Project Page](http://sdkman.io) because posh-sdk is designed to work like the original BASH client.

Add `Import-Module posh-sdk` to your powershell profile to be able to use it after each start of Powershell. If you do not know where your profile is located, execute `$Global:profile`.

### Configuration
By default posh-sdk put all the data (inclusive the to be installed executables) into ~/.posh_sdk. You can change the location by setting:

	$Global:PSDK_DIR = <path>

n your profile BEFORE the `Import-Module posh-sdk` line.

Similar to the BASH client you can configure posh-sdk to automatically set new installed versions as default version. You do this by adding:

	$Global:PSDK_AUTO_ANSWER = $true

in your profile.

## Use
All the same commands that are usable in sdkman can be used in the posh-sdk version (SDKMan homepage)[http://sdkman.io/usage.html]

## Uninstall
If you want to remove posh-sdk you need to perform 3 steps:

1. Remove the `Import-Module posh-sdk` statement from your powershell profile (The path can be found with `PS> $PROFILE`).
2. Remove the `posh-sdk` folder from you powershell modules (Most likely posh-sdk is in the first path of `PS> $env:PSModulePath`).
3. Remove the `~\posh_sdk` folder in your home folder.

If you now restart your powershell instance, posh-sdk is gone.

## Troubleshooting
Q: Error "File xxx cannot be loaded because the execution of scripts is disabled on this system. Please see "get-help about_signing" for more details."

A: By default, PowerShell restricts execution of all scripts. This is all about security. To "fix" this run PowerShell as Administrator and call

	Set-ExecutionPolicy RemoteSigned

## Running the Pester Tests

All posh-sdk test are written for Pester. Please see its documentation: https://github.com/pester/Pester

To run the tests in Powershell, load the Pester module and run in posh-sdk dir:

	$ Invoke-Pester

repository: gomorpheus/posh-sdk

gha_language: PowerShell

repo_name: gomorpheus/posh-sdk


text:
Angular-Firebase-Cordova-seed-with-simpleLogin
==============================================

An AngularJS and Firebase (with routing) seed generated by Yeoman, with Facebook simpleLogin

## Getting started
Make sure you have [Yeoman](http://yeoman.io/) installed with the [AngularJS-generator](https://github.com/yeoman/generator-angular) and the [AngularFire-generator](https://github.com/firebase/generator-angularfire). I also use [Cordova/Phonegap](http://cordova.apache.org/docs/en/3.4.0/guide_cli_index.md.html#The%20Command-Line%20Interface) to build my webapp to native mobile platforms.

In this example I use android platform, Facebook login and routing in AngularJS.

## **1\.** Generate a seed and needed tools

```bash
cordova create loginExample com.example.hello AngularFireLogin
cd loginExample
cordova platform add android
mkdir dev && cd dev
yo angular
yo angularfire
```
#### Prompts asked on angularfire

 * `[?] Name of your Firebase instance:`
   (required) from your URL: http://`INSTANCE`.firebaseio.com
 * `[?] Shall I include FirebaseSimpleLogin?`
    Y
 * `[?] Which providers shall I install?`
   Facebook (select from a list of [simple login providers](https://www.firebase.com/docs/security/simple-login-overview.html) you have enabled for your Firebase)
 * `[?] Shall I include routeSecurity?`
    Y (allows you to specify `authRequired` on a route and force user to log in before they can view it)
 * `[?] Shall I create a rudimentary login screen?`
    Y (this creates views/login.html and controllers/login.js, which provide registration (for password auth) and authentication)

## **2\.** Enable authentication with Facebook in your application
 * Go to your forge at Firebase and click simpleLogin at the left bar. Enable Facebook.
 * Make an app at [Facebooks developers site](https://developers.facebook.com/apps). Take note of your App ID and App Secret.
 * In your Facebook application configuration, enable the 'Website with Facebook Login' integration and set your 'Site URL' to: https://auth.firebase.com/auth/facebook/callback

## **3\.** Build on mobile device with Cordova/Phonegap
 * Depending on what version of the generators, you may have to tweak some code and and add a logout button and a controller to it.
 * Remember to include in your index.html:
```javascript
<script src="cordova.js"></script>
```
 * SimpleLogin requires inAppBrowser.
```bash
cordova plugin add org.apache.cordova.inappbrowser
```
 * Build your code with **grunt build** and replace the code in your www folder with the files in your dist folder. Then it should be ready:
```bash
cordova run android
```


text:
[Development Guidelines](../../../../README.md) / [Coding](../../../../README.md#coding) / [PL/SQL](../../../../README.md#coding_pl_sql) / [Coding Style](../../../../doc/coding/pl_sql/coding_style.md)

## [Never `EXIT` or `RETURN` from `WHILE` and `FOR` loops](../../../../doc/coding/pl_sql/coding_style.md#NeverExit)

The `WHILE` and `FOR` loops include "boundary conditions" that determine:

- When and if a loop should execute at all
- When a loop should stop executing

If you use the `EXIT` or `RETURN` statements inside a `WHILE` or `FOR` loop, you cause an unstructured termination from the loop. The resulting code is hard to trace and debug.


text:
* [Register your application](https://www.zoho.com/crm/developer/docs/php-sdk/clientapp.html)
* PHP >= 5.6.4
* Laravel >= 5.4

## Installation

Add Zoho CRM to your composer file via the `composer require` command:

```bash
$ composer require interconnecta/zoho-crm
```

Or add it to `composer.json` manually:

```json
"require": {
    "interconnecta/zoho-crm": "0.6.*"
}
```

Zoho CRM's service providers will be automatically registered using Laravel's auto-discovery feature.

## Configuration

The defaults configuration settings are set in `config/zoho-crm.php`. Copy this file to your own config directory to modify the values. You can publish the config using this command:

```bash
$ php artisan zoho-crm:install
```

You'll need to add the following variables to your .env file. Use the credentials previously obtained registering your application.

```php
ZOHO_CRM_CLIENT_ID=
ZOHO_CRM_CLIENT_SECRET=
ZOHO_CRM_REDIRECT_URI=
ZOHO_CRM_CURRENT_USER_EMAIL=
```

Then, follow the next steps:
1. Go to [Zoho CRM Developer Console](https://accounts.zoho.com/developerconsole).
2. Under the Client previously registered, click the vertical three points then `Self Client`.
3. Enter the default scope , then click `View Code`
```
aaaserver.profile.READ,ZohoCRM.modules.ALL,ZohoCRM.settings.ALL
```
> If you want to apply a different scope, see the [link](https://www.zoho.com/crm//developer/docs/api/oauth-overview.html#scopes)

4. Copy the generated code.

Finally, run the following command:

```bash
$ php artisan zoho-crm:setup
```

Enter the previously generated code.

**Zoho CRM is ready to use.**

## Roadmap

You can find the latest development roadmap for this package [here](docs/roadmap.md). Feel free to open an [issue](https://github.com/InterConnectaOrg/zoho-crm/issues) if you have a feature request.

## License

[MIT License](https://opensource.org/licenses/MIT). Copyright (c) 2012-2019, InterConnecta

## Support

Contact:

[interconnecta.com](https://interconnecta.com)

<EMAIL_ADDRESS>+1-646-760-4090, ext. 205

repository: InterConnectaOrg/zoho-crm

gha_language: PHP

repo_name: InterConnectaOrg/zoho-crm


text:
# handy
some handy git etc commands

## Npm

Check for package updades. Various packages do this, the one I like is npm-check.  Install it from npm and run `npm-check -u`

## Git

### To store credentials within a repo.

This stores the creds locally, un-encrypted within the repo folder (in .git/config).  Its not ideal but it is handy when you want to use https and you can't seem to get the credentials on the repo remembered by windows / your code editor

`git remote set-url origin<EMAIL_ADDRESS>
see https://stackoverflow.com/questions/6565357/git-push-requires-username-and-password

### Handy page on getting / setting git credentials

https://alvinalexander.com/git/git-show-change-username-email-address

### Delete all commit history in github

Its not something you'd want to do lightly, but if you have been playing around and you don't want to expose your vague ramblings in your code to the world, you can delete your commit history (still of course keeping your actual code).  To do this follow the instructions in:
https://stackoverflow.com/questions/13716658/how-to-delete-all-commit-history-in-github

Or if you do this kind of thing a lot and you are using nodejs you could even create a script like:
````json
"scripts": {
    "git-nuke-history" : "git checkout --orphan latest_branch & git add -A & git commit -am \"nuke\" & git branch -D master &  git branch -m master & git push -f origin master"
  },
  ````

  ## Naming things

It is often said that it is more important to be consistant in the way you name things than to be 'right'.  Naming things is largely a matter of convention.  I personally use the below naming conventions:

- Folder names, file names, Lambda function names and urls are named as lowercase-with-hypen.  So `my-folder-name`, `my-file-name.js`, `/check-user-auth`.  The only exceptions are the `LICENSE` file and `README.md`

- If it makes sense to join two words together then do so.  Its one less hypen.  So `lowercase-with-hypen` over `lower-case-with-hyphen`.  But only if the joined word makes sense: don't do `my-reallygood-component`.  This is a subtle one, don't sweat it too much

- In code use camelCase.  So `let myModule = require('my-module.js')`.  Simply camelCase all words, so `htmlPage` not `HTMLPage` `myApi` not `myAPI` and so on.

- Name commands e.g. npm scripts as lower-case-with-hyphen.   Its one less key-stroke than the underscore

- Name environment variables as UPPERCASE_WITH_UNDERSCORE.  Mainly because its just the convention

- Name configuration values (e.g. AWS IAM Users, CloudFormation stacks, API Gateway resources etc) as lowercase-with-hypen.  So `my-iam-user`, `my-cloudformation-stack` etc.  The reason for this is that Voyzu resources are tightly coupled with their component - which will be named using lowercase-with-hypen.  If the field does not allow hypens use underscores, and if underscores are not allowed use MixedCase

- Database naming:
    - For DynamoDB Database table names use lowercase-with-hyphen .  So `contacts`, `order-lines` tables.  This is because Voyzu resources are tightly coupled with their component - which will be named using lowercase-with-hypen
    - For MySql table names use lowercase_with_underscore.  This is because MySQL doesn't like hypens in its table names
    - Use plurals for table names, so `sessions` rather than `session`, `order-lines` over `order-line` and so on
    - For table field names use MixedCase e.g. `Id`, `FirstName` field names etc.

- For everything else (and there is a lot else :-) )  use MixedCase.  In the 'everything else' bucket would be JSON field names, HTML form fields, YAML fields etc.  There is no real reason for this, it just keeps things consistant, and having no non alpha-numeric characters means it wil always be allowed

repository: cjlennon-dev/handy

repo_name: cjlennon-dev/handy


text:
Up to now, we have been discussing the widgets that we will compose to
create our interfaces; the background of this discussion has been the
process of creating GUIs by placing some of the component widgets into
basic widgets (or some other analogous structure). But our applications
cannot consist of a single screen; in this chapter, we will have our
first discussion of having multiple active windows

Dialogs and Windows
===================

Almost every toolkit will give us the ability to create multiple windows
and dialogs at a time. This might seem unusual at first; how does the
system keep track of which windows belong to which applications?

Many operating systems will treat windows as 'system resources' that a
given process can 'own', much like files or memory. In the same way that
an application can request multiple files, the application can request
multiple windows; much like file objects abstract the OS's low-level
file access system, our tool-kit will likely provide us with some high
level class that represents the window resource that the OS gives us.
For convenience, our tool-kits may also provide us with a class that
both manages a window and inherits from `BasicWidget`.

Notice that the event loop as we have developed it can flexibly adapt to
a single application having multiple windows.

What Ends the Application
=========================

Having multiple windows requires us to think about what ends our
application - and how we end our application.

To answer the last question first, we can end our application by telling
the event loop to stop; if the event loop was the last thing in our main
file, then, after program flow leaves the event loop, our main function
will return and our application will end. Many kits will provide us with
a function to tell the event loop to terminate for precisely this
purpose.

To answer the first question, perhaps the most obvious way is to attach
a callback to some event, and to call the end-event-loop function in
that callback. The most obvious time to do so would be when some
privileged window is closed; if our application provides us with an
at\_window\_close event, we can register a callback to this event (on
some particular main window, or possibly for multiple windows) and call
the end-event-loop callback in that function.

Since this is a fairly wrote task, many kits provide us with a
convenience function that automates this process. Windows in java swing,
for example, have the "set\_default\_close\_operation" function, and the
value can be set to "exit\_on\_close"; this allows us to mark one (or
more) windows, and, when those windows are closed, the application will
exit.

Some other kits -- notably WPF -- keep track of how many windows are
open, and exit the event loop when no windows are left. This allows the
kit to have a reasonable policy for managing when our application
terminates, without us having to manage the process at all.

Modality
========

Sometimes, we want to block the user's access to other parts of an
application while a particular screen is being displayed; this might be
the case if, for example, if the user is interacting with a settings
dialog that will affect the primary screen. Most kits provide us with
the ability to mark certain windows as 'modal' with respect to other
windows; if a child window is modal with respect to a given parent
window, then the user will not be able to interact with the parent
window while the child window is being displayed. As the reader may have
guessed, most 'dialog windows' are modal.

Dialogs
=======

Dialogs are special windows; they are used to display alerts to the user
(such as an alert box reporting an application failure), or to ask the
user to make a decision (such as a dialog asking the user if they wish
to save a document or not) or for more detailed interactions (such as a
file selection or color selection dialog). In principle, dialogs are
nothing more than modal windows that display appropriate contents. We
could create them by creating top-level windows, packing those windows
with children, marking them as modal with respect to the application's
main window, and then marking them as visible. We typically will not
build dialogs by hand, however, for two major reason. The first is that
building a dialog by hand is a tedious process, and one that can be
easily automated. The second, more important reason is 'platform
integration'; users have expectations about how familiar dialogs will
behave, based on how the other dialogs on their platforms behave. If we
create our dialogs by hand, we will have to reproduce every behavior of
the platform's default dialog - every keyboard shortcut, ever feature.
If we do not, the user's interaction with our application will be
disrupted when they discover that they cannot trigger our dialog's
'cancel' action by hitting escape, for example - because we would have
had to replicate that behavior in specific code, and perhaps we did not
think to, or did not have time.

Because of the first reason, almost every kit in existence will provide
you with a selection of dialogs, and convenience-functions to display
them. For the second reason, you should use these default dialogs
wherever possible.

Needless to say, this assumes that our kit includes a version of the
dialog that we want. For common dialogs -- like error dialogs, print
dialogs or font dialogs -- this is very likely to be the case. However,
if we need an unusual dialog, we will need to build it ourselves.

Show Functions
==============

Many kits will include a `show` function that will display the given
dialog; for some kits, this will be a member function of a dialog
object, while for others it will be a static class function. In most
cases, these functions will suspend the operation of your code at the
point that they are called, while the dialog is run; they will then
resume at the same point in your callback, and will return the results
of the user's action (for example, by having a `ShowFileDialog` function
return the file path the user picked as a string).

While this is simple in concept, and makes our code simple, the student
should be aware that this is in fact a complex operation internally.
These functions have to start a second main loop to manage the
application while the show function has blocked the original main loop.

repository: htonyn/WindowedProgramming

path: /sec basics/dialogs and windows.md

filename: dialogs and windows.md

repo_name: htonyn/WindowedProgramming


text:
# CopyToClipboard.js

![Killing Flash](https://img.shields.io/badge/killing-flash-brightgreen.svg?style=flat)

> Modern copy to clipboard. No Flash. Just under 1kb gzipped.

## Why

Copying text to the clipboard shouldn't be hard and it should work the same across all device and browsers.
It shouldn't require dozens of steps to configure and most of all, it shouldn't depend on Flash or any bloated framework.

## Setup or Usage

First, either include the script located on the `dist` folder or load it from [a third-party CDN provider](//cdn.jsdelivr.net/Copy2Clipboard/latest/CopyToClipboard.min.js).

```html
<script src="dist/CopyToClipboard.min.js"></script>
or
<script src="//cdn.jsdelivr.net/Copy2Clipboard/latest/CopyToClipboard.min.js"></script>
```

CopyToClipboard.js works using button & input ids `[pattern] - CpnCode_input_* or CpnCode_btn_*` for instance
```html
<p class="code-container" id="CpnCode_input_50FREESHIPPING" contenteditable="False">50FREESHIPPING</p>
<span class="input-group-btn">
    <button id="CpnCode_btn_50FREESHIPPING" class="btn" type="button" data-clipboard-text="50FREESHIPPING" data-clipboard-target="CpnCode_input_50FREESHIPPING">
        <span class="copy">COPY CODE</span>
    </button>
</span>
```

Now, you need to instantiate it by calling InitializeCopyToClipboardTriggers function and pass button & input ids [`CpnCode`]

```js
CopyToClipboard.Events.InitializeCopyToClipboardTriggers("CpnCode");
```

which uses below code to create a the pattern or update js file to create your own pattern.
```js
var buttonId = idPrefix + "_btn_";
var inputId = idPrefix + "_input_";
```

## Browser Support

This library relies on [JQuery .off](http://api.jquery.com/off/), [.on](http://api.jquery.com/on/) and [execCommand](https://developer.mozilla.org/en-US/docs/Web/API/Document/execCommand) APIs. The second one is supported in the following browsers.
There are two different ways you can copy text using CopyToClipboard.js

1. Using click of a button (which copy's text and change button style).
2. Manual selection and copy (which changes button style).

Events|  |  |  |  |  |  |
|:---:|:---:|:---:|:---:|:---:|:---:|:---:|
|1| ✔ | ✔ | ✔ | ✔ | ✔ | ✘ |
|2| ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |

Although copy operations with [execCommand](https://developer.mozilla.org/en-US/docs/Web/API/Document/execCommand) aren't supported on Safari, it gracefully degrades because [Selection](https://developer.mozilla.org/en-US/docs/Web/API/Selection) is supported. That means you can change button to say `Press Command+C to copy` or change it with appropriate text.

repository: sudheerkaku/CopyToClipboard

repo_name: sudheerkaku/CopyToClipboard