text:
Lambda2sql (lambda) -> "sql"
==========

[![](https://jitpack.io/v/ajermakovics/lambda2sql.svg)](https://jitpack.io/#ajermakovics/lambda2sql)

Convert Java 8 lambdas to SQL statements.

For example, the following Predicate<Person>:
```jshelllanguage
 person -> person.getAge() < 100 && person.getHeight() > 200
```

is converted to a string:

```
  age < 100 AND height > 200
```
allowing you to write readable queries in a type safe way.

See [Lambda2SqlTest](https://github.com/ajermakovics/lambda2sql/blob/master/src/test/java/lambda2sql/Lambda2SqlTest.java) for more examples or the [Wiki](https://github.com/ajermakovics/lambda2sql/wiki).

Usage
---------

```jshelllanguage
int age = 100;
int height = 200;
SqlPredicate<Person> predicate = person -> person.getAge() < age && person.getHeight() > height;

String sql = Lambda2Sql.toSql(predicate); // age < 100 AND height > 200
```

How it works
---------

It uses [JaQue](https://github.com/TrigerSoft/jaque) to build an expression tree for a lambda. The expression tree is then traversed and converted to a SQL statement.

Under the hood, JaQue depends on the system property `jdk.internal.lambda.dumpProxyClasses`, if the lambda expression is not serialized:
See [https://bugs.openjdk.java.net/browse/JDK-8023524](https://bugs.openjdk.java.net/browse/JDK-8023524).

When the property is enabled, JVM generated classes for lambdas are saved to disk. JaQue then uses [ASM](http://asm.ow2.org/) to read the .class files and creates expression trees.

Since the interface [`SqlPredicate<T>`](https://github.com/ajermakovics/lambda2sql/blob/master/src/main/java/lambda2sql/SqlPredicate.java) is automatically serialized, there is no need to set this property.

Limitations
---------

Current version only works with predicates and supports the following operators: >, >=, <, <=, =, !=, &&, ||, !

Install
-------

You can get the library using JitPack https://jitpack.io/#ajermakovics/lambda2sql/0.7

```gradle
repositories {
    maven { url "https://jitpack.io" }
}
dependencies {
    compile 'com.github.ajermakovics:lambda2sql:0.7'
}
```

Build
---------

`gradle jar` or `gradle fatjar` to include dependencies.

gha_language: Java


text:
# Livex

A Phoenix + Elm visual playground for [`Phoenix.OSC`](//github.com/zampino/phoenix_osc)
and [TouchOSC](//hexler.net/software/touchosc). Elm code is in `web/elm`.

## Setup

Open `demo.touchosc` with [TouchOSC layout editor](http://hexler.net/docs/touchosc-editor) and upload it to your phone.

![demo.png](demo.png)
![spiro.gif](spiro.gif)

Run Phoenix with `mix phoenix.server` and point your TouchOSC app to your
machine's ip setting UDP port to `8000` (or the configured one).

license: MIT

repository: zampino/livex

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: zampino/livex


text:
### Google Filters

- cache
- filetype
- info
- intitle
- inurl
- site

### Search

filetype:pdf site:[site_name]

### Learn about the website

```bash
www.dnsstuff.com/tools
```

---

### Metagoofil

Metagoofil is an information gathering tool designed for extracting metadata of public documents (pdf,doc,xls,ppt,docx,pptx,xlsx) belonging to a target company. Metagoofil will perform a search in Google to identify and download the documents to local disk.

#### Install Metagoofil

```bash
sudo apt-get install -f metagoofil
```

#### Run Command

```bash
metagoofil -d [site_name] -t [file_type] -o [folder_name] -f [file_name]
metagoofil -d goodhacking.org -t doc -o temp -f goodhacking.html
```

---

### Harvester
theHarvester is a command-line tool included in Kali Linux that acts as a wrapper for a variety of search engines and is used to find email accounts, subdomain names, virtual hosts, open ports / banners, and employee names related to a domain from different public sources (such as search engines and PGP key servers).

```bash
theHarvester -d [site_name] -b [search] -l [limit]
theHarvester -d goodhackingblog.com -b google -l 100
```

### Whois
This package provides a commandline client for the WHOIS (RFC 3912) protocol, which queries online servers for information such as contact details for domains and IP address assignments.

```bash
whois [site_name]
whois ethicalhackingblog.com
```

### DNS Reconnaissance

```bash
fierce -dns [sitename]
fierce --domain [sitename]
fierce -dns [ethicalhackingblog.com]
fierce --domain [ethicalhackingblog.com]
```

### Deepmagic information gathering tool (dmitry)

```bash
dmitry -winsepfbo [site_name]
dmitry -winsepfbo ethicalhackingblog.com
```

### Discover Scripts

```bash
git clone https://github.com/leebaird/discover.git
./discover.sh
```

### Recon-ng

```bash
recong-ng
help
show modules
show keys
marketplace search
marketplace install ipinfodb
keys add [ipinfodb_key]
```

```bash
load ipinfodb
show info
workspace add [name]
add domains [domain_name]
load bing_domain_web
run
show hosts
```

### Built with

```bash
https://builtwith.com
```

gha_language: HTML

gha_license_id: MIT


text:
---
title: WWDC 2019
linktitle: WWDC 2019
toc: true
type: docs
date: "2019-05-05T00:00:00+01:00"
draft: false
diagram: true
menu:
  swift:
    parent: Swift
    weight: 1

# Prev/next pager order (if `docs_section_pager` enabled in `params.toml`)
weight: 1
---

this article is work-in-progress

Here i want to share a bit of what i have learned

this years WWDC had tons of new stuff to sort out.

the hardest thing for me personaly was and is to realy free your mind for some new concepts and not stick to old patterns and try to find them in the new world of SwiftUI Combine and more.

Many of those things are confusing on first sight. Maybe it's my age or the fact that i am not a native speaker :-D ... but honestly i am confused by sentences like :

> "the subscriber calls subcribe **with** the subcriber **to** the publisher... ataching it"

> "then the Publisher will send a subscription to the subcriber which the subcriber will use to make a request from the publisher"

like many things in life it makes most sense when you already got it.

so first have a look at the official apple resource to get a better understaning about those topic. And don't feel ashamed to watch a video twice... try something out... and watch it again after one or two weeks... you'll learn and understand more with each iteration.

# Some good stops to reference

## Modern Swift API Design

[Modern Swift API Design](https://developer.apple.com/videos/play/wwdc2019/415/)

Every programming language has a set of conventions that people come to expect. Learn about the patterns that are common to Swift API design, with examples from new APIs like SwiftUI, Combine, and RealityKit. Whether you're developing an app as part of a team, or you're publishing a library for others to use, find out how to use new features of Swift to ensure clarity and correct use of your APIs

# Some terminology

## Combine

### Operator

an `Operator` converts values from a publisher to a subcriber

an `Operator` again is a Publisher on its own

```swift
# Example of code highlighting
    var name: String {
        didSet {
            tank.name = name
            try! tank.managedObjectContext?.save()
            didChange.send(())
        }
    }
```

{{< highlight Swift >}}
    var name: String {
        didSet {
            tank.name = name
            try! tank.managedObjectContext?.save()
            didChange.send(())
        }
    }
{{< /highlight >}}

### upstream

when subcribers send to a `Publisher`

{{< diagram >}}
graph LR;
    A[subcribers] -->|upstream| B(Publisher)
{{< /diagram >}}

### downstream

when publisher send to a `Subcriber`

{{< diagram >}}
graph LR;
    A[Publisher] -->|downstream| B(subscriber)
{{< /diagram >}}

repository: mimorocks/academic-kickstart

repo_name: mimorocks/academic-kickstart


text:
# Internet of Things ( IoT )
For IoT we will use the **Arduino IDE.**
## What we need to do
1. We have to make proper connection of all the sensors to our **NodeMCU ESP8266 Wifi module.**
2. We need to code in Arduino IDE to fetch data from sensor.
3. We need to code in Arduino IDE to **send the data to Firebase using NodeMCU ESP8266 Wifi module.**

## How will we achieve all this
1. First we have to learn in depth about the **NodeMCU ESP8266 Wifi Module.**[CLick here to learn](https://www.youtube.com/watch?v=5YoyF1-Ff1w)
2. Then we should have knowledge of all the sensors we are using.
3. DHT-11 HUmidity and Temperature sensor.[Click here to learn](https://www.youtube.com/watch?v=reYa_4rh0-w)
4. Soil moisture sensor.[Click here to learn](https://www.youtube.com/watch?v=K_jfj4Krj7M) and [Click here to learn](https://www.youtube.com/watch?v=3beP0ANNUjQ)
5. Rain drop sensor.[Click here to learn](https://www.youtube.com/watch?v=vUxfutrcNUQ) and [Click here to learn](https://www.youtube.com/watch?v=qtqtMLmRqZI)

## Next Steps
1. Learn how to connect all these sensors to NodeMCU ESP8266 Wifi module.
2. DHT-11 Sensor. [Click here to learn](https://www.youtube.com/watch?v=yA5JSoipYTI)
3. Soil moisture sensor. [Click here to learn](https://www.youtube.com/watch?v=yGVCu3eHZP0)
4. Rain drop sensor. [Click here to learn](https://www.youtube.com/watch?v=hSMMQV29Ge0)
5. How to connect Firebase and NodeMCU ESP8266 Wifi Module. [Click here to learn](https://www.youtube.com/watch?v=6ACfl7kdLlY&list=PLrL3q8YFJ8PyWHsgkNkauhIIRw-Xrp4TM)
**THATS IT. WE DONT HAVE TO DO ANYTHING EXTRA. WE ONLY NEED TO SEND THE DATA TO FIREBASE CONTINUOUSLY.**

repository: Mr-Sushant/IoT-AR

branch_name: refs/heads/main

repo_name: Mr-Sushant/IoT-AR


text:
vim-verdict
===========

`vim-verdict` is a simple formatting tool to help you maintain more VCS-friendly
  prose text.
It follows the ideas outlined in this [blog](http://dustycloud.org/blog/vcs-friendly-patchable-document-line-wrapping/).

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

I would recommend using [minpac](https://github.com/k-takata/minpac) which makes extensive use of the package feature
which was added to Vim 8 and Neovim.
```
call minpac#add('https://gitlab.com/mrossinek/vim-verdict')
```
Other package managers work in a similar fashion.

Usage
-----

Since the functionality provided by `vim-verdict` can be seen as rather
  restrictive to some use-cases, it is not enabled by default for any filetype.
Therefore, in order to use it, you must enable it explicitly where appropriate.
You can do so by running
```
:call verdict#Init()
```
You may also deactivate again with the corresponding `Deinit` function.
```
:call verdict#Deinit()
```
This function will initialize some configurable variables (see Configuration
  further down) and set the following options local to your buffer:
```
formatexpr=verdict#Format()
indentexpr=verdict#Indent(v:lnum)
```
This will enable automatic indentation while typing in insert mode.
Furthermore, you will be able to use `gq{motion}` to format the text moved over
  by `motion`.

**Note:** I recommend using the plugin [localvimrc](https://github.com/embear/vim-localvimrc) which allows you to use local
  `.lvimrc` files to specify additional settings on a project-basis.
This will allow you to automatize the initialization of `vim-verdict` where you
  need it on a regular basis.
You could for example add a single `.lvimrc` file to the root of your website,
  notes directory or tex project.

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

`vim-verdict` makes use of the following variables:

* `g:verdict_loaded`: if existing, verdict is not loaded again [Default: `1` (after initial loading)]
* `g:verdict_sentence_delims`: symbols delimiting a sentence [Default: `.!?`]
* `g:verdict_sentence_suffixes`: symbols which may follow a delimiter [Default: `)]}"''`]
* `g:verdict_default_textwidth`: default textwidth used when no other value is specified [Default: `80`]
* `g:verdict_overwrite_shiftwidth`: option to overwrite the shiftwidth with a verdict specific value [no default]

repository: mrossinek/vim-verdict

repo_name: mrossinek/vim-verdict


text:
Using `ActionController::TestCase`` is discouraged and should be replaced by
`ActionDispatch::IntegrationTest``. Controller tests are too close to the
internals of a controller whereas integration tests mimic the browser/user.

# Examples

```ruby
# bad
class MyControllerTest < ActionController::TestCase
end

# good
class MyControllerTest < ActionDispatch::IntegrationTest
end
```

[Source](http://www.rubydoc.info/gems/rubocop/RuboCop/Cop/Rails/ActionControllerTestCase)

repository: codacy/codacy-rubocop

gha_language: Ruby

gha_license_id: NOASSERTION

repo_name: codacy/codacy-rubocop


text:
Website About Me
================

Quick Description
------------------
A lot of the time I hear people complain about how they cannot fit enough info about them on a resume. When it comes down to it I'm absolutely one of those people, so this website serves to show my career aspirations as well as jobs I've taken on in the past. I also plan on adding more to this project then a typical resume would have, such as blogs, past work, etc.

Created using React.js and JSX, with HTML/Bootstrap v4

Installation Instructions
-------------------------
1. clone the repo using ``git clone``
2. navigate to the folder ``my-portfolio-app``
3. run ``npm install`` to install node_modules
4. run ``npm start`` to start the service on ``localhost:3000``

Credit
------
At first I thought of just using a template for a portfolio website since it would be much easier and take less time. Seeing [this](https://colorlib.com/preview/#jackson) template made me realize that although the site looks amazing, the html code was incredibly convoluted. From there I saw the perfect opportunity for a project: to re-create this template under React.js and add some elegance/neatness to the code with JSX.

Coming Soon
-----------
Changes 11/30

* Added a css link for additional glyph icons
* Added download links for resume and certifications
* Filled the site with my own content to remove the template
* Pics are still not of me, coming soon

repository: aasimrajabali/my-portfolio-app

repo_name: aasimrajabali/my-portfolio-app


text:
# Developer Guides and Tutorials

Developers can build a variety of experiences using one or more components of the Maker Protocol. This repo contains guides and tutorials to help you understand various approaches to integrate with the Maker Protocol and our partners by interfacing with smart contracts, SDKs, APIs, and products.

All guides are organized in sections and by proficiency levels within each section.

## Vaults

- [Maker Vault Integration Guide](/vault/vault-integration-guide/cdp-integration-guide.md)

## Dai

- [Dai Token](/dai/dai-token/dai-token.md)
- [Dai in Smart Contracts](/dai/dai-in-smart-contracts/README.md)
- [Dai Savings Rate integration guide](/dai/dsr-integration-guide/dsr-integration-guide-01.md)

## Developer Tools

- [Test Chain Guide](/devtools/test-chain-guide/test-chain-guide.md)
- [Introduction to Seth](/devtools/seth/seth-guide-01/seth-guide-01.md)
- [Working with DSProxy](/devtools/working-with-dsproxy/working-with-dsproxy.md)

## Oasis Exchange

- [Intro to OasisDEX Protocol](/Oasis/intro-to-oasis/intro-to-oasis-maker-otc.md)
- [How to use Oasis Direct Proxy on OasisDEX Protocol](/Oasis/oasis-direct-proxy.md)

## Governance

- [Vote Proxy Setup: Air-gapped Machine](/governance/vote-proxy-setup-airgapped-machine/vote-proxy-setup-airgapped-machine.md)

## Keepers (Automatic CDP/Liquidation/Auction/Arbitraging Functionality)

- [Auctions 101](/keepers/auctions/auctions-101.md)
- [Simple Arbitrage Keeper](/keepers/simple-arbitrage-keeper/simple-arbitrage-keeper.md)

## MCD

- [Introduction and Overview of Multi-Collateral Dai: MCD101](/mcd/mcd-101/mcd-101.md)
- [Using MCD-CLI to create and close a MCD CDP on Kovan](/mcd/mcd-cli/mcd-cli-guide-01/mcd-cli-guide-01.md)
- [Using Seth to create and close a MCD CDP on Kovan](/mcd/mcd-seth/mcd-seth-01.md)
- [Upgrading to MCD - overview for different partners](/mcd/upgrading-to-multi-collateral-dai/upgrading-to-multi-collateral-dai.md)
- [Add a new collateral type to DCS - Kovan](/mcd/add-collateral-type-testnet/add-collateral-type-testnet.md)
- [Intro to the Rate mechanism](/mcd/intro-rate-mechanism/intro-rate-mechanism.md)

## Partners

- [Setting up real money transfers using Wyre API](/partners/wyre-guide-01/wyre-guide-01.md)

## Partner compilations

In order to ensure that integration partners can get up and running quickly, relevant documentation for specific partner types have been compiled in a series of guides.

- [Upgrading to Multi-Collateral Dai](mcd/upgrading-to-multi-collateral-dai/cli-mcd-migration.md)
- [Exchanges](exchanges/)
- [Wallets](wallets/)
- [Remittance services](remittance/)
- [Market Makers](market-makers/)

## Contribution guidelines

We welcome submissions of guides and tutorials that cover new types of integrations! Following these guidelines will help us maintain consistency,

- Include all the sections present in this [sample guide](/sample/sample-guide-01/sample-guide-01.md)
- Create a folder with one markdown file using the same name
- Append a number if a guide needs to be split into multiple parts

## License

```text
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.
```


text:
# PageGuideMvc Fluent Wrapper

jQuery.PageGuide ASP.NET Mvc Brought to you by Grasshoppers dev team.

PageGuideMvc is an interactive visual guide to elements on web pages.
Instead of cluttering your interface with static help message, or explanatory text,
add a pageguide and let your users learn about new features and functions.

You can dynamically load and unload user guides, fine-tune the positioning of each step, and define event handlers on all parts of the guide (including each step individually) to perform actions in concert with the presentation.

![alt tag](http://rlv.zcache.com.au/funny_kung_fu_grasshopper_stickers-rb51cfd1f1e6240b48b4ddb36ee0fa376_v9waf_8byvr_512.jpg =50x50)

### Version
1.0.3

### Installation
To install PageGuideMvc, run the following command in the Package Manager Console
```sh
Install-Package PageGuideMvc
```
Nuget Link
[https://www.nuget.org/packages/PageGuideMvc/]

### Usage
Before the coding, define on _Layout page this references;

```sh
<head>
  ...
  <link href="/path/to/css/pageguide.css" rel="stylesheet">
  ...
</head>

<body>
  ...
  <script src="/path/to/js/jquery.js"></script>
  <script src="/path/to/js/jquery.pageguide.js"></script>
</body>

```

And Let's coding any view,

```sh
@(Html.Grasshoppers()
    .PageGuide()
    .SetName("tlyPageGuide2")
    .SetTitle("Wellcome")
        .NewStep(x => x.Content("Hi I'm content").Target("#tlyPageGuide").Direction(Direction.Top).CreateStep())
        .NewStep(x => x.Content("Hi I'm content too").Target(".round").Direction(Direction.Right).CreateStep())
        .NewStep(x => x.Content("Blablablalbalbalbla").Target(".two").Direction(Direction.Top).CreateStep())
    .Raw() )
```

The point is using every step ends `.CreateStep()` and  defining for html Ids `.Target("#Id")` or class names `.Target(".two")` like this etc...

### Development

Want to contribute? Great!

[Alper Hankendi]:https://github.com/alperhankendi
[Oğuzhan Soykan]:https://github.com/osoykan

### Todo's
 - multi language supports
 - read steps from view folder

License
----

MIT

**Free Software, Hell Yeah!**

repository: alperhankendi/PageGuideMvc

gha_language: C#

repo_name: alperhankendi/PageGuideMvc


text:
---
subcategory: "Security"
---
# databricks_group_member Resource

This resource allows you to attach [users](user.md) and [groups](group.md) as group members.

## Example Usage

After the following example, Bradley would have direct membership in group B and transitive membership in group A.

```hcl
resource "databricks_group" "a" {
    display_name = "A"
}

resource "databricks_group" "b" {
    display_name = "B"
}

resource "databricks_group_member" "ab" {
    group_id = databricks_group.a.id
    member_id = databricks_group.b.id
}

resource "databricks_user" "bradley" {
    user_name =<EMAIL_ADDRESS>}

resource "databricks_group_member" "bb" {
    group_id = databricks_group.b.id
    member_id = databricks_user.bradley.id
}
```

## Argument Reference

The following arguments are supported:

* `group_id` - (Required) This is the id of the [group](group.md) resource.
* `member_id` - (Required) This is the id of the [group](group.md) or [user](user.md).

## Attribute Reference

In addition to all arguments above, the following attributes are exported:

* `id` - The id for the `databricks_group_member` object which is in the format `<group_id>|<member_id>`.

## Import

-> **Note** Importing this resource is not currently supported.


text:
# Contribute Code or Provide Feedback

If you would like to become an active contributor to this project please follow the instructions provided in [Microsoft Azure Projects Contribution Guidelines](http://windowsazure.github.com/guidelines.html).

If you encounter any bugs with Microsoft Azure PowerShell please file an issue in the [Issues](https://github.com/WindowsAzure/azure-sdk-tools/issues) section of the project.

repository: markcowl/azure-powershell

repo_name: markcowl/azure-powershell


text:
---
layout: default
---

# 1993-09-09 - Re: REMAIL: Perl/problems

## Header Data

From: Karl Lui Barrus<EMAIL_ADDRESS>To<EMAIL_ADDRESS>Message Hash: 91901814a4edcb83fe6bad8ebca5c3743251e95327504a4882b9136dfe1bd5af

Message ID<EMAIL_ADDRESS>Reply To<EMAIL_ADDRESS>UTC Datetime: 1993-09-09 19:12:23 UTC

Raw Date: Thu, 9 Sep 93 12:12:23 PDT

## Raw message

```
{% raw  %}From: Karl Lui Barrus<EMAIL_ADDRESS>Date: Thu, 9 Sep 93 12:12:23 PDT
To<EMAIL_ADDRESS>Subject: Re: REMAIL: Perl/problems
In-Reply-To<EMAIL_ADDRESS>Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

Sameer Parekh wrote:

>	Upon repeated tests of my remailers, I noticed that if there's
>more than one blank line between the header and the header-pasting, then
>the pasting doesn't take place. Does this happen with other people's
>remailers? How is your script different from mine? How can this be fixed?

Could you give an example?  I tried a message like the following
(between the cut marks) which I sent to<EMAIL_ADDRESS>
------------8<--cut-->8------------

::
Anon-To<EMAIL_ADDRESS>

testing
------------8<--cut-->8------------

and it came back OK, with the blanks squeezed out.  So I'm probably
misunderstanding what you said.

--
Karl L. Barrus<EMAIL_ADDRESS>
keyID: 5AD633 hash: D1 59 9D 48 72 E9 19 D5  3D F3 93 7E 81 B5 CC 32

"One man's mnemonic is another man's cryptography"
  - my compilers prof discussing file naming in public directories

{% endraw %}
```

## Thread

+ Return to [September 1993](/archive/1993/09)

+ Return to "["Christian D. Odhner" <cdodhner@indirect.com>](/authors/christian_d_odhner_cdodhner_at_indirect_com_)"
+ Return to "[Karl Lui Barrus <klbarrus@owlnet.rice.edu>](/authors/karl_lui_barrus_klbarrus_at_owlnet_rice_edu_)"
+ Return to "[Sameer Parekh <cs60a-qu@po.EECS.Berkeley.EDU>](/authors/sameer_parekh_cs60aqu_at_po_eecs_berkeley_edu_)"

+ 1993-09-09 (Wed, 8 Sep 93 21:07:12 PDT) - [REMAIL: Perl/problems](/archive/1993/09/06a5260dee46e7785e3a2dd79669fa63de71807d9fe0fb0dc3758ea156d2929c) - _Sameer Parekh<EMAIL_ADDRESS>  + 1993-09-09 (Thu, 9 Sep 93 05:28:09 PDT) - [Re: REMAIL: Perl/problems](/archive/1993/09/a30b73f739860290b22d908a8e9444a209c7102a0edb021261accb8829aa8cf1) - _"Christian D. Odhner"<EMAIL_ADDRESS>  + 1993-09-09 (Thu, 9 Sep 93 12:12:23 PDT) - Re: REMAIL: Perl/problems - _Karl Lui Barrus<EMAIL_ADDRESS>


text:
## [5.1.2] - 2021/07/19

* `IList.sortReversed()`.

## [5.1.1] - 2021/07/16

* `ListMap.unsafeFrom()` constructor.

## [5.1.0] - 2021/06/25

* Breaking: Align head and tail to dart convention as getter like first and last

* Introduce the OP typedef.

* `IList.init` Access init part of the list.

* `IList.inits`, `IList.tails` methods.

* `IList.splitAt` Tuples from original list at specified index.

* `IList.whereNot` Reverse predicate for Where.

* `Iterable<Tuple2<U, V>>.unzip()` extension.

* `IList.count(Predicate)` count positive predicates.

* `IList.iterate` generate IList applying OP multiple times.

* `IList.iterateWhile` generate IList applying OP while Predicate stand.

* `IList.span` Tuple2 will contain the longest consecutive positive predicate then the rest of the list.

* `IList.tabulate` Apply function start at 0 on multiples dimensions.

* `IList.corresponds` Check for correspondence between list and applied function on list.

* `IList.lengthCompare` `ISet.lengthCompare` Direct size comparison as convenience for composition.

* Arity property on Abstract Tuple.

## [5.0.5] - 2021/06/27

* MapOfSets.isEmptyForKey() and MapOfSets.isNotEmptyForKey().

## [5.0.4] - 2021/06/24

* Introduce the Predicate typedef.

## [5.0.2] - 2021/06/23

* `List.sortReversed()` extension.

## [5.0.1] - 2021/05/24

* `Iterable.restrict()` restricts some item to one of those present in this iterable.

* Reuse `IList`s and `ISet`s only if they have the exact same generic type.

## [5.0.0] - 2021/05/24

* Const `IList`. Example: `const IList<int> myList = IListConst([1, 2, 3]);`
  Example of empty list: `const IList<String> myList = IListConst([]);`

* Const `ISet`. Example: `const ISet<int> mySet = ISetConst({1, 2, 3});`
  Example of empty set: `const ISet<String> mySet = ISetConst({});`

* Methods `IList.get()`, `IList.getOrNull()` and `IList.getAndMap()`.

* Extensions `List.get()`, `List.getOrNull()` and `List.getAndMap()`.

* Better NNBD for `divideListAsMap()` and `sortedLike()`.

* Better Json serialization for NNBD.

* Small IMapOfSets.fromIterable() improvement: added `ignore` parameter.

* Breaking change: Removed `empty()` constructors from `IList` and `ISet`. You can create empty
  collections using `IList()` and `ISet()`, or `myIList.clear()` and `myISet.clear()`, or
  `IList.withConfig(const [], myConfig)` and `ISet.withConfig(const [], myConfig)`, or
  `const IListConst([])` and `const ISetConst({})`.

* Breaking change: Removed all extensions like `isNullOrEmpty` and similar. This was a good idea
  before NNBD, but now if you use this Dart can't infer nullability anymore.

* Breaking change. Please, add `import "package:collection/collection.dart";` to your project. I
  have removed a few methods, like `Iterable.mapIndexed`, because they are now present in the
  `collection` package.

## [4.0.6] - 2021/04/20

* Extension `List.withNullsRemoved()`.

## [4.0.5] - 2021/04/19

* The `contains()` methods now accept `null`.
* Method `toggle()` now returns the correct bool.

## [4.0.4] - 2021/04/18

* `Iterable.isFirst`, `isNotFirst`, `isLast` and `isNotLast`.

## [4.0.3] - 2021/04/16

* Breaking change. Please, add `import "package:collection/collection.dart";` to your project. I
  have removed the following methods because they are now present in the `collection` package:
    * `Iterable.firstwhereOrNull`
    * `Iterable.whereNotNull`

* Breaking change: `inRange()` of nullable num now returns non-null, and `orElse` is not optional.

* Added `Iterable.mapNotNull` extension. It's similar to `map`, but returns `Iterable<T>`, where `T`
  can be a non-nullable type. This is equivalent to `map` plus `cast`, but has a better name when
  you are just using it to solve NNBD problems.

## [3.0.2] - 2021/04/14

* Json serialization support for json_serializable with @JsonSerializable
  (for IList, ISet, IMap, ListSet, ListSetView).

* Renamed extension `isNotNullOrZero` to `isNotNullNotZero`.

## [2.0.4] - 2021/04/12

* Factories `IList<T>.orNull()`, `ISet<T>.orNull()`, `IMap<K, V>.orNull()`,
  and `IMapofSets<K, V>.orNull()`, that help implement `copyWith` methods.

## [2.0.2] - 2021/20/03

* Breaking changes:
    - `Iterable.removeDuplicates` was renamed to `Iterable.whereNoDuplicates` to indicate it returns
      an Iterable.
    - `Iterable.removeNulls` was renamed to `Iterable.whereNotNull` to indicate it returns an
      Iterable.
    - `List.removeNulls` now is a List extension only. It mutates the `List`, removing nulls.
    - `List.removeDuplicates` now is a List extension only. It mutates the `List`, removing all
      duplicates.
    - `Set.removeNulls` now is a Set extension only. It mutates the `Set`, removing all nulls.

## [2.0.1] - 2021/03/03

* Nullsafety improvements.
* isNotNullOrEmpty getter renamed to isNotNullNotEmpty.
* isEmptyButNotNull getter to isEmptyNotNull.

## [1.0.28] - 2021/02/09

* More efficient Iterable.sortedLike() and List.sortLike() extensions.
* Set.diffAndIntersect(), Iterable.everyIs() and Iterable.anyIs() extensions.

## [1.0.26] - 2021/01/28

* Better generics compatibility for `equalItemsAndConfig`.

## [1.0.18] - 2021/01/19

* `IList.replace()`.
* `ISet.difference()`, `intersection`, `union` now accept iterables.

## [1.0.10] - 2021/01/18

* `areSameImmutableCollection()` and `areImmutableCollectionsWithEqualItems()` functions.

## [1.0.9] - 2021/01/12

* Initial version.


text:
## Table of Contents
- [Introduction](#intro)
- [Version](#ver)
- [Integration details](#integration)
- [Driver files information](#fileinfo)
- [Supported sensor interface](#interface)
- [Copyright](#copy)

### Introduction
- This package contains the Bosch Sensortec MEMS pressure sensor driver (sensor API)
- The sensor driver package includes bmp180.h, bmp180.c and bmp180_support.c files

### Version
- Version of bmp180 sensor driver is:
    * bmp180.c 		- V2.0.3
    * bmp180.h 		- V2.2.2
    * bmp180_support.c 	- V1.0.4

### Integration details
- Integrate bmp180.h and bmp180.c file in to your project.
- The bmp180_support.c file contains only examples for API use cases, so it is not required to integrate into project.

### Driver files information
- bmp180.h
    * This header file has the register address definition, constant definitions, data type definition and supported sensor driver calls declarations.
- bmp180.c
    * This file contains the implementation for the sensor driver APIs.
- bmp180_support.c
    * This file shall be used as an user guidance, here you can find samples of
            * Initialize the sensor with I2C communication
                    - Add your code to the I2C bus read and bus write functions.
                            - Return value can be chosen by yourself
                        - API just passes that value to your application code
                    - Add your code to the delay function
        * Reading the sensor read out data

### Supported sensor interface
- This pressure sensor driver supports I2C and SPI interfaces

### Copyright
- Copyright (C) 2008 - 2015 Bosch Sensortec GmbH


text:
deadlock has following characteristics.

Mutual Exclusion
Hold and Wait
No preemption
Circular wait
Deadlock Prevention
We can prevent Deadlock by eliminating any of the above four conditions.

Eliminate Mutual Exclusion
It is not possible to dis-satisfy the mutual exclusion because some resources, such as the tape drive and printer, are inherently non-shareable.

Eliminate Hold and wait

Allocate all required resources to the process before the start of its execution, this way hold and wait condition is eliminated but it will lead to low device utilization. for example, if a process requires printer at a later time and we have allocated printer before the start of its execution printer will remain blocked till it has completed its execution.

The process will make a new request for resources after releasing the current set of resources. This solution may lead to starvation.

Eliminate No Preemption
Preempt resources from the process when resources required by other high priority processes.

Eliminate Circular Wait
Each resource will be assigned with a numerical number. A process can request the resources increasing/decreasing. order of numbering.
For Example, if P1 process is allocated R5 resources, now next time if P1 ask for R4, R3 lesser than R5 such request will not be granted, only request for resources more than R5 will be granted.

Deadlock Avoidance
Deadlock avoidance can be done with Banker’s Algorithm.

Banker’s Algorithm
Bankers’s Algorithm is resource allocation and deadlock avoidance algorithm which test all the request made by processes for resources, it checks for the safe state, if after granting request system remains in the safe state it allows the request and if there is no safe state it doesn’t allow the request made by the process.

Inputs to Banker’s Algorithm:

Max need of resources by each process.
Currently, allocated resources by each process.
Max free available resources in the system.
The request will only be granted under the below condition:

If the request made by the process is less than equal to max need to that process.
If the request made by the process is less than equal to the freely available resource in the system.

repository: wfnuser/CruelFundamental

repo_name: wfnuser/CruelFundamental


text:
30 Nov 2016
-----------
 - Two additional Dell racks were present to help with the data processing
   requirements.
 - They are using processing.js on their end to do some of the work
 - They are storing data utilizing RGB to store three variables within one
   file.
 - They demonstrated a Tableau around Omaha showing fancy graphics
 - They had a display showing data around crashes within the database
 - There is bluetooth sensors now on the DOT blades, so blade position data
   should be good now.
 - The plow imagery provides a great dataset for looking into crashes
 - Discussion about sources of precip type forecasts and the national blend of
   models does not appear to address this, yet.
 - [x] no units denoted on github README?  gasp, accurate, but I thought I
   wrote more details on this :(

04 Feb 2016
-----------
 - A new format was proferred with it being JSON, we worked through an example
 - They want individual forecast hours in a single file
 - They suggested having the archive data in CSV and current, future in JSON
 - An issue of having excessive zeros in the file was mentioned, I am unsure of
   it and asked to see an example
 - Some Aurora projects were discussed, but they were outside of my area.

 07 Jan 2016
-----------
 - Mike Fowle (DMX SOO) showed a decision support tool for winter wx
   http://weather.gov/wrh/tavel/?wfo=sds
 - It was noted that currently $400b in freight crosses Iowa each year
 - An email list will be established to support this group's work
 - Primary focus is initial investigations on Interstates
 - DOT has an advisory speed project whereby signs will note to slow down
 - Fowle noted that lots of accidents in SD happen in Nov due to deer
 - daryl is the slow cog
 - Arujn has some image processing stuff with deep learning

12 Nov 2015
-----------
- Discussion of the data format and other aux issues
- [ ] Additional variables
  - Gridded NWS Watch Warning Advisory codes
- xml file wrapped with <wx>
- time expressed as ISO
- Discussion of timing of forecasts
- use English units in xml

29 Oct 2015
-----------
- This was the initial meeting to get work kicked off
- NTRANS is interested in anything that impeeds traffic flow
- For realtime purposes, there is some latencies involved with their other
vendors of data.  They need time to collect up enough samples to make for
appropriate statistics.
- They are looking for an XML feed of data
- They use UTMz15, but are likely OK with Lat/Long WGS84
- Decision was to go with 1 Jan 1997 as start date
- 5 minute interval in time
- Timestamps would be presented as UTC
- Express Precipitation in Hourly Rates
- [ ] Variables to deliver
  - Precip type (int flag)
  - 2m Air Temperature
  - 2m Dew Point
  - 10m Wind Speed
  - 10m Wind Direction (no u/v components)
- [ ] Additional Variables that will have lots of caveats
  - Visibility, understanding that I can't go down below 1/8 mile
  - Pavement Temp, very crude regridding of RWIS data
  - Solar Radiation (2014 onward)
  - Snow Depth would be once per day
- MADIS was discussed, but no real conclusion reached about it
- [ ] deliver format example by 20 November
- [ ] stand-up IEM TMS services for these variables
- usage of NDFD grids to drive forecast grids of the above

repository: akrherz/iemgrid

gha_language: Python

repo_name: akrherz/iemgrid


text:
# Data Sharing Platform for a Research Group

This is a dissertation project. For more information see in my portfolio: [http://www.livia.geo-blog.com/msc-thesis.html](http://www.livia.geo-blog.com/msc-thesis.html)

# Installation guide

Tested with Python version 3.6.4

Using a virtual environment for python (e.g. virtualenv) is recommended.

### Clone the repository

```git init```

```git clone https://github.com/liviajakob/data-sharing-platform```

### Change to folder

```cd data-sharing-platform/data-sharing```

### Install dependencies

```pip3 install -r requirements.txt --user```

You might have to follow [this](https://pypi.org/project/GDAL/) (https://pypi.org/project/GDAL/) installation guide to install GDAL.

### Generate configuration file

- Run ```python write_config.py```

**Optional**

- Open ```write_config.py``` file in current folder and change database configuration, data input path, data output path or other settings, run it as described above
- When using Oracle make the changes in ```data-display/models.py``` suggested in the comments

### Ingest Data

The software comes with two example data files in ```data-sharing/data/input/```

**Example for file Greenland_1000DEM.tif located in data input folder**

```python add_dataset.py dem.tif dem 2017-06-26```

**Add another layer to the dataset with id 1:**

```python add_layer.py 1 rate.tif rate 2017-06-27```

### For help type:

```
python add_dataset.py --help
python add_layer.py --help
```

### Run web application:

```
python app.py
```

Access on ```localhost:5000```

### Run web API:

```
python api.py
```

Access on ```localhost:5002```

repository: liviajakob/data-sharing-platform

repo_name: liviajakob/data-sharing-platform


text:
---
layout: page
title: Teaching
description: My teaching experience
hide_hero: true
show_sidebar: false
permalink: /teaching/
hide_footer: true

---

I have experience teaching undergraduate courses in issues related to sociology and technology. I hold a certificate in University Teaching from Syracuse University and twice holder of the Outstanding Graduate Teaching Assistant awards at West Virginia University.

Courses I have taught as:

# Graduate Instructor

- SOCA 101 Introduction to Sociology, Fall 2021 (in-person)
- SOCA 101 Introduction to Sociology, Fall 2021 (online)
- SOCA 101 Introduction to Sociology, Spring 2020  Syllabus
- SOCA 101 Introduction to Sociology, Spring 2020
- SOCA 101 Introduction to Sociology, Fall 2019  Syllabus

# Teaching Assistant

I have been a teaching assistant in several undergraduate courses (see CV)


text:
---
layout: post
title: 一加8T刷crDroid，关联 kebab, android, rom, oneplus
categories: [ ]
tags: []
---

* 参考
  * [ROM OFFICIAL kebab 12.1 **crDroid** V8.4](https://forum.xda-developers.com/t/rom-official-kebab-12-1-crdroid-v8-4.4394373/)
  * []()
  * []()
  * []()

## CrDroid

* 没有自带 Google Apps，刷完系统rom，要刷GApps

## flashing instructions

for first install:

* be on the latest 11 firmware on both slots
* download the file named like this: crDroidAndroid-12.0-XXXXXXXX-kebab-v8.X.zip
* also download recovery
* put it in the same folder where your adb files are
* reboot to bootloader
* fastboot flash recovery recovery.img
* reboot to recovery
* choose "Factory reset"
* choose "Apply update"
* adb sideload "crDroidAndroid-12.0-XXXXXXXX-kebab-v8.X.zip"
* reboot recovery
* choose "Apply update"
* adb sideload "gapps"
* reboot to system

to update:
* download the file named like this: crDroidAndroid-12.0-XXXXXXXX-kebab-v8.X.zip
* put it in the same folder where your adb files are
* reboot to recovery
* choose "Apply update"
* adb sideload "crDroidAndroid-12.0-XXXXXXXX-kebab-v8.X.zip"
* reboot recovery
* choose "Apply update"
* adb sideload "gapps"
* reboot system

some large gapps packages will not install due to lack off space

repository: netmicrobe/witech

repo_name: netmicrobe/witech


text:
# OvertimeDog
A Incredible, Unbelievable, In-fucking-credible APP that statistics overtime working

# Depend on

## Mobile (iOS)
- React Native

## Mobile (Android)
- [GreenDAO](https://github.com/greenrobot/greenDAO) Database
- [EventBus](https://github.com/greenrobot/EventBus) Event Handler
- [Butter Knife](https://github.com/JakeWharton/butterknife) View "injection" library
- [HUGO](https://github.com/JakeWharton/hugo) Annotation-triggered method call logging for your debug builds.

## Web
- React.js

# To Do
- [ ] Location Based Detection
- [ ] Share to SNS
- [ ] Amazing Rank System
- [ ] Unbelievable ugly UI
- [ ] countless dogs
- [ ] Wifi


text:
## Android Voice Activity Detection (VAD)
This VAD library can process audio in real-time utilizing
[Gaussian Mixture Model](http://en.wikipedia.org/wiki/Mixture_model#Gaussian_mixture_model) (GMM)
which helps identify presence of human speech in an audio sample that contains a mixture of speech
and noise. VAD work offline and all processing done on device.

Library based on
[WebRTC VAD](https://chromium.googlesource.com/external/webrtc/+/branch-heads/43/webrtc/common_audio/vad/)
from Google which is reportedly one of the best available: it's fast, modern and free.
This  algorithm has  found  wide adoption and has recently become one of
the gold-standards for delay-sensitive scenarios like web-based interaction.

If you are looking for a higher accuracy and faster processing time I recommend to use Deep Neural
Networks(DNN). Please see for reference the following paper with
[DNN vs GMM](https://www.microsoft.com/en-us/research/uploads/prod/2018/02/KoPhiliposeTashevZarar_ICASSP_2018.pdf)
comparison.

## Parameters
VAD library only accepts 16-bit mono PCM audio.

Valid sample rates are 8000, 16000, 32000 and 48000 Hz.

Frame size can be 80, 160, 240, 320, 480, 640, 960 or 1440 bytes depending on the sample rate.

Classifier supports NORMAL, LOW_BITRATE, AGGRESSIVE and VERY_AGGRESSIVE modes.

Silence duration (ms) - this parameter used in Continuous Speech detector,
the value of this parameter will define the necessary and sufficient
duration of negative results to recognize it as silence.

Voice duration (ms) - this parameter used in Continuous Speech detector,
the value of this parameter will define the necessary and sufficient
duration of positive results to recognize result as speech.

Recommended parameters:
* sample rate - 16KHz,
* frame size - 480,
* mode - VERY_AGGRESSIVE,
* silence duration - 500ms,
* voice duration - 500ms;

## Usage
VAD supports 2 different ways of detecting speech:
1. Continuous Speech detector was designed to detect long utterances
without returning false positive results when user makes pauses between
sentences.
```java
 Vad vad = new Vad(VadConfig.newBuilder()
                .setSampleRate(VadConfig.SampleRate.SAMPLE_RATE_16K)
                .setFrameSize(VadConfig.FrameSize.FRAME_SIZE_480)
                .setMode(VadConfig.Mode.VERY_AGGRESSIVE)
                .setSilenceDurationMillis(500)
                .setVoiceDurationMillis(500)
                .build());

        vad.start();

        vad.isContinuousSpeech(short[] audioFrame, new VadListener() {
            @Override
            public void onSpeechDetected() {
                //speech detected!
            }

            @Override
            public void onNoiseDetected() {
                //noise detected!
            }
        });

        vad.stop();
```

2. Speech detector was designed to detect speech/noise in small audio
frames and return result for every frame. This method will not work for
long utterances.
```java
 Vad vad = new Vad(VadConfig.newBuilder()
                .setSampleRate(VadConfig.SampleRate.SAMPLE_RATE_16K)
                .setFrameSize(VadConfig.FrameSize.FRAME_SIZE_480)
                .setMode(VadConfig.Mode.VERY_AGGRESSIVE)
                .build());

        vad.start();

        boolean isSpeech = vad.isSpeech(short[] audioFrame);

        vad.stop();
```
## Requirements
Android VAD supports Android 4.1 (Jelly Bean) and later.

## Development

To open the project in Android Studio:

1. Go to *File* menu or the *Welcome Screen*
2. Click on *Open...*
3. Navigate to VAD's root directory.
4. Select `setting.gradle`

## Download
[![](https://jitpack.io/v/gkonovalov/android-vad.svg)](https://jitpack.io/#gkonovalov/android-vad)

Gradle is the only supported build configuration, so just add the dependency to your project `build.gradle` file:
1. Add it in your root build.gradle at the end of repositories:
```groovy
allprojects {
   repositories {
     maven { url 'https://jitpack.io' }
   }
}
```

2. Add the dependency
```groovy
dependencies {
    implementation 'com.github.gkonovalov:android-vad:1.0.0'
}
```

You also can download precompiled AAR library and APK files from GitHub's [releases page](https://github.com/gkonovalov/android-vad/releases).

------------
Georgiy Konovalov 2019 (c) [MIT License](https://opensource.org/licenses/MIT)

repository: nghiacv/android-vad

repo_name: nghiacv/android-vad


text:
# PathFill Types

Just a simple sample showing different Path fill types.

Sample taken from:
http://www.devdaily.com/java/jwarehouse/android-examples/platforms/android-2/samples/ApiDemos/src/com/example/android/apis/graphics/PathFillTypes.java.shtml

License
-----
[Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0)


text:
# Inherited Constructors

| Section         | Value                                                      |
|-----------------|------------------------------------------------------------|
| DIP:            | 1004                                                       |
| Author:         | Andrej Mitrović                                            |
| Review Count:   | 1 [Most Recent]                                            |
| Implementation: |                                                            |
| Status:         | Abandoned                                                  |

[Most Recent]: https://github.com/dlang/DIPs/blob/e94c8ae3af08aaabc936e0306894e7fae06e9b71/DIPs/DIP1004.md

## Table of Contents

- [Abstract](#abstract)
- [Rationale](#rationale)
- [Description](#description)
  - [Explanation of the problem](#explanation-of-the-problem)
  - [Existing solutions](#existing-solutions)
- [Proposed changes](#proposed-changes)
  - [Implicit constructor inheritance for derived classes with no constructors](#implicit-constructor-inheritance-for-derived-classes-with-no-constructors)
  - [Syntax for inheriting base class constructors for derived classes](#syntax-for-inheriting-base-class-constructors-for-derived-classes)
    - [Syntax variations](#syntax-variations)
  - [Selective disabling of inherited constructors](#selective-disabling-of-inherited-constructors)
    - [Applicability for this proposal](#applicability-for-this-proposal)
- [Examples from existing projects](#examples-from-existing-projects)
  - [Sociomantic tango/ocean](#sociomantic-tangoocean)
  - [Phobos](#phobos)
- [Breaking changes](#breaking-changes)
- [Links & Previous discussions](#links-&-previous-discussions)

## Abstract

A derived class is currently instantiable by client-code using a base class
constructor only if the base class has a default constructor and the derived class does not define any constructors of its own.

If the implementer of the derived class wants to allow construction of the
derived class by using any of the base class constructors, then this support
must be added manually by writing forwarding constructors.

This DIP attempts to alleviate the problem by introducing three features:

- [Implicit constructor inheritance for derived classes with no constructors](#implicit-constructor-inheritance-for-derived-classes-with-no-constructors)
- [Syntax for inheriting base class constructors for derived classes](#syntax-for-inheriting-base-class-constructors-for-derived-classes)
- [Selective disabling of inherited constructors](#selective-disabling-of-inherited-constructors)

## Rationale

The process of manually writing forwarding constructors is tedious and
error-prone. It's possible to automate it using mixins, but that is not a
reliable solution. Drawbacks are explained in more details in a[dedicated section](#existing-solutions).

## Description

### Explanation of the problem

Currently a derived class is constructible by client code via its base class
constructor only if both of the following are true:

- The derived class does not define any of its own constructors
- The base class constructor has a default constructor

Example:

```D
class Base
{
    this ( ) { }
}

class Derived : Base { }

void main ( )
{
    auto d = new Derived;  // OK. Derived doesn't define custom constructors
}
```

However, if the base class constructor is a non-default constructor it won't
be used:

```D
class Base
{
    this ( int ) { }
}

class Derived : Base { }

void main ( )
{
    // Error: class Derived cannot implicitly generate a default ctor when
    // base class Base is missing a default ctor
    auto d = new Derived(42);
}
```

Even if the base class has a default constructor but derived class defines one of its own, the base constructor also can't be used:

```D
class Base
{
    this ( ) { }
}

class Derived : Base
{
    this (int, int) { }
}

void main ( )
{
    // Error: constructor Derived.this (int _param_0, int _param_1) is not
    // callable using argument types ()
    auto d = new Derived();
}
```

The rationale for the latter limitation: if the `Derived` object was
constructible by calling only the `Base` class constructor then the `Derived`
object itself could be left in an *unexpected* state. This is because the
`Derived` constructors could be skipped and never called and potentially
leaving `Derived`'s own internal fields in an unexpected state.

### Existing solutions

Currently, if the author of the `Derived` class wants to allow construction via
the base class constructor then this support must be added explicitly by
writing forwarding constructors:

```D
class Base
{
    this ( int ) { }
}

class Derived : Base
{
    this ( )
    {
        super(42);
    }

    this ( int x )
    {
        super(x);
    }
}

void main ( )
{
    auto d1 = new Derived();  // ok
    auto d2 = new Derived(43);  // ok
}
```

An example library solution for inheriting constructors via mixins is provided
[here](https://gist.github.com/AndrejMitrovic/72a08aa2c078767ea4c35eb1b0560c8d).

There are a number of drawbacks with the above implementation:

- It relies on string mixins to generate the code, which can slow down
  compilation speed.
- It does not handle default values.
- It does not have the ability to selectively disable inheriting specific
  constructors. The API could be expanded to support this, however it would
  make the API awkward to use.
- Used self-reflection can potentially create semantic analysis cycles and
  thus is very fragile against changes in compiler internals.

## Proposed changes

This document proposes two independent language changes. Combined, they will
fix all of the aforementioned issues in a way that integrates naturally into the existing language definition.

### Implicit constructor inheritance for derived classes with no constructors

When doing semantic analysis of a class, if that class does not define any
constructors of its own then all constructors of its direct base are implicitly
inherited.

Before:

```D
class ParseException : Exception
{
    // Error: class ParseException cannot implicitly generate a default ctor
    // when base class object.Exception is missing a default ctor
}

void parseArgs ( string[] args )
{
    if (args < 2)
    {
        throw new ParseException("Expected at least one argument");
    }
}
```

After:

```D
class ParseException : Exception
{
    // Compiles, inherits constructors defined in Exception class
}

void parseArgs ( string[] args )
{
    if (args < 2)
    {
        throw new ParseException("Expected at least one argument");
    }
}
```

```D
class ParseException : Exception
{
    // Explicit constructor definition, prevents implicit inheriting
    // of constrcutors defined in Explicit class:

    this ( ) { super(""); }
}

void parseArgs ( string[] args )
{
    if (args < 2)
    {
        // Error: constructor ParseException.this () is not callable using
        // argument types (string)
        throw new ParseException("Expected at least one argument");
    }
}
```

**Rationale**: If a derived class does not define any of its own constructors
then there is no danger of leaving the object in an unexpected state.

Side-note: Forwarding constructors are most prominent in exception class
hierarchies.

### Syntax for inheriting base class constructors for derived classes

Uses existing `alias <symbol> this` syntax but allows the symbol to be the `super.this` special sequence. If present, it is interpreted as an explicit request to inherit all direct base class constructors in a similar way as
[the first proposed change](#implicit-constructor-inheritance-for-derived-classes-with-no-constructors)
does implicitly.

Before:

```D
enum ErrorCode
{
    FileNotFound
}

class FileException : Exception
{
    /// introduce overload which takes an error code
    this ( ErrorCode error_code, string file = __FILE__, string line = __LINE__ )
    {
        super(error_code.to!string, file, line);
    }
}

void main ( string[] args )
{
    // Error: constructor FileException.this () is not callable using
    // argument types (string)
    throw new FileException("Something went wrong");

    // OK
    throw new FileException(ErrorCode.FileNotFound);
}
```

After:

```D
enum ErrorCode
{
    FileNotFound
}

class FileException : Exception
{
    /// introduce overload which takes an error code
    this ( ErrorCode error_code, string file = __FILE__, string line = __LINE__ )
    {
        super(error_code.to!string, file, line);
    }

    /// inherit base class constructors
    alias super.this this;
}

void main ( string[] args )
{
    // using Exception's constructor
    throw new FileException("Something went wrong");

    // using FileException's constructor
    throw new FileException(ErrorCode.FileNotFound);
}
```

This feature is similar to D's existing feature for re-introducing base class
methods to allow overloading of a base class method:

```D
class Base
{
    int sum ( int x, int y ) { return x + y; }
}

class Derived : Base
{
    // re-introduces base class method to allow overloading
    alias super.sum sum;

    // overload of the base class sum method
    float sum ( float x, float y ) { return x + y; }
}

void main ( string[] args )
{
    auto d = new Derived;
    d.sum(int(1), int(2));
    d.sum(float(1), float(2));
}
```

#### Syntax variations

This document is written with the `alias super.this this` syntax in mind, but it is not crucial for the purpose of the proposal. There are at least several
possible syntaxes which can be used for this feature:

```D
class FileException : Exception
{
    /// option A: simple syntax which references the ctor via the keyword 'this'
    alias super.this this;

    /// option B: using parentheses to make it explicit we're refering to ctors
    alias super.this() this();

    /// option C: the most simplistic syntax, although it may be confused with
    /// the syntax for subtyping
    alias super this;
```

### Selective disabling of inherited constructors

Extends the `@disable <symbol>` syntax to optionally allow a specific parameter
type list, allowing the disabling of one of many overloads of the same method. If a parameter type list is provided via the `@disable <symbol>(<comma-separated type list>)` syntax, only the matching overload is disabled.

#### Applicability for this proposal

Since the proposed feature for explicitly inheriting base class constructors
actually inherits **all** base-class constructors, there may be a need to allow
disabling the inheritance of specific constructors. For example:

```D
class Base
{
    this ( int x, int y ) { }
    this ( string x, string y ) { }
}

class Derived : Base
{
    alias super.this this;

    @disable this(int, int);  // disable this overload of the inherited constructor
}

void main ( )
{
    new Derived("foo", "bar");  // ok
    new Derived(1, 2);  // error: constructor is disabled
}
```

## Examples from existing projects

The most common example in library code is an exception class hierarchy.
Typically each new inherited class has to define forwading constructors in
order to make it usable.

### Sociomantic tango/ocean

An example of an exception class hierarchy can be found
[here](https://github.com/sociomantic-tsunami/ocean/blob/6500d67e630de1d05adc510e1572bee26fe3985c/src/ocean/core/Exception_tango.d).

Note that this
[wrapped constructor](https://github.com/sociomantic-tsunami/ocean/blob/6500d67e630de1d05adc510e1572bee26fe3985c/src/ocean/core/Exception_tango.d#L91-L97)
definition is actually incorrect and ignores file/line parameters, most likely
because of developers' reluctance to write required boilerplate:

```D
class PlatformException : Exception
{
    this( istring msg )
    {
        super( msg );
    }
}
```

With this DIP features, it would look like this:

```D
class PlatformException : Exception { }
```

That is both shorter and more correct as it is guaranteed to use the same
constructor definition. It also has the benefit of being more future-proof
against base constructor definition changes.

### Phobos

The D standard library also defines a helper mixin to make it easier to define
custom exception classes
[here](https://github.com/dlang/phobos/blob/bf61ad682f3f9c35a16c79180941ffd902ab9758/std/exception.d#L2159), indicating it is a common task.

However, this mixin is not used even within Phobos itself and a quick search
shows many exception classes with incorrect constructor definitions. This is
an incomplete list of such cases:

- [std.concurrency](https://github.com/dlang/phobos/fa54b85dd97598f3cf775a1b36bc0d8944f45f18/master/std/concurrency.d#L224)
- [std.json](https://github.com/dlang/phobos/blob/fa54b85dd97598f3cf775a1b36bc0d8944f45f18/std/json.d#L1295)
- [std.zip](https://github.com/dlang/phobos/blob/fa54b85dd97598f3cf775a1b36bc0d8944f45f18/std/zip.d#L78)
- [std.stdio](https://github.com/dlang/phobos/blob/fa54b85dd97598f3cf775a1b36bc0d8944f45f18/std/stdio.d#L4266)

Examples of such wrong code present even in the standard library prove that it is a very easy mistake to make. This proposal helps to eliminate such cases by
making the right way easy and  the wrong one to require additional manual effort.

## Breaking changes

The vast majority of code should not be affected by the changes in this proposal.

Code which uses introspection to check whether a class is instantiable with a
list of arguments would be the most affected by this change.  For example, an
`is(typeof( new Derived(...) ))` check may currently be false, but would change
to true if constructors were implicitly inherited as per
[feature #1](#implicit-constructor-inheritance-for-derived-classes-with-no-constructors)

## Links & Previous discussions

* [Issue 9066: Add constructor inheritance feature](https://issues.dlang.org/show_bug.cgi?id=9066)
* [Previous discussion about constructor inheritance in<EMAIL_ADDRESS>* [C++11: What is constructor inheritance?](http://stackoverflow.com/a/9979249/279684)
* [C++11: Draft 3337 - Page 269 - Constructor Inheritance (PDF warning)](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3337.pdf)
* [C++11: Object construction improvements](https://en.wikipedia.org/wiki/C%2B%2B11#Object_construction_improvement)

## Copyright & License

Copyright (c) 2016 by the D Language Foundation

Licensed under [Creative Commons Zero
1.0](https://creativecommons.org/publicdomain/zero/1.0/legalcode.txt)

## Reviews

[Preliminary Review Round<EMAIL_ADDRESS>
## Addendum
This DIP never completed the review process. It was marked as "Abandonded" after repeated attempts to communicate with the author failed. The review process may be resumed by anyone willing to take over the DIP as the point of contact. The DIP Manager will provide any such person guidance on how to proceed.

repository: dlang/DIPs

gha_language: D

repo_name: dlang/DIPs


text:
# IntersightClient::CapabilityAdapterUnitDescriptor

## Properties

| Name | Type | Description | Notes |
| ---- | ---- | ----------- | ----- |
| **class_id** | **String** | The fully-qualified name of the instantiated, concrete type. This property is used as a discriminator to identify the type of the payload when marshaling and unmarshaling data. | [default to 'capability.AdapterUnitDescriptor'] |
| **object_type** | **String** | The fully-qualified name of the instantiated, concrete type. The value should be the same as the 'ClassId' property. | [default to 'capability.AdapterUnitDescriptor'] |
| **connectivity_order** | **String** | Order in which the ports are connected; sequential or cyclic. | [optional] |
| **ethernet_port_speed** | **Integer** | The port speed for ethernet ports in Mbps. | [optional] |
| **fibre_channel_port_speed** | **Integer** | The port speed for fibre channel ports in Mbps. | [optional] |
| **fibre_channel_scsi_ioq_limit** | **Integer** | The number of SCSI I/O Queue resources to allocate. | [optional] |
| **is_azure_qos_supported** | **Boolean** | Indicates that the Azure Stack Host QoS feature is supported by this adapter. | [optional][default to true] |
| **is_geneve_supported** | **Boolean** | Indicates that the GENEVE offload feature is supported by this adapter. | [optional][default to true] |
| **num_dce_ports** | **Integer** | Number of Dce Ports for the adapter. | [optional] |
| **prom_card_type** | **String** | Prom card type for the adapter. | [optional] |

## Example

```ruby
require 'intersight_client'

instance = IntersightClient::CapabilityAdapterUnitDescriptor.new(
  class_id: null,
  object_type: null,
  connectivity_order: null,
  ethernet_port_speed: null,
  fibre_channel_port_speed: null,
  fibre_channel_scsi_ioq_limit: null,
  is_azure_qos_supported: null,
  is_geneve_supported: null,
  num_dce_ports: null,
  prom_card_type: null
)
```

repository: xlab-si/intersight-sdk-ruby

repo_name: xlab-si/intersight-sdk-ruby


text:
## Lanacoin is a Pow/PoS personalized cryptocurrency
- Ticker: LANA

- Type: PoW/PoS hybrid

- PoW algorithm: sha256d

- PoS block hashing: sha256d

- Max Coins: 7.506.000.000 (7.5+ bilion)

- PoW reward: 10000 LANA (no halving)

- Last PoW block: 750000 (approx 7 years)

- PoS reward: fixed 1000 LANA + 7% (yearly)

- PoS reward halving: 525600 (approx 5 years, halving only for fixed reward, 7% stays the same)

- Minimum PoS age: 7 hours

- Maximum PoS age: unlimited

- Block time target: 5 minutes

- Difficulty retarget: every block

- Coinbase maturity: 100 blocks

- Transaction recommended minimum confirmations: 5

- Minimal TX fee: 100 Lanoshis (0.00000100 LANA)

P2P port: 7506

RPC port: 5706

Testnet P2P port: 17506

Testnet RPC port: 15706

Estimated coins in existence after end of pow 4.068.900.000 (very very rough estimate, depends on how many people will be staking...etc)

# Bootstrap files / chain states

* LanaCoin mainnet blockchain snapshots/chain states/bootstrap.dat: (pCloud: http://pc.cd/8p8otalK )

* LanaCoin mainnet blockchain snapshots/chain states/bootstrap.da (MS OneDrive https://1drv.ms/u/s!AklKAv1s6c88dxvfcYgwPfvJj6I?e=a6Jnpw )

* LanaCoin testnet blockchain snapshots/chain states/bootstrap.dat (pCloud: http://u.pc.cd/HDOitalKif - you need testnet $LANA email developer contact or ask on Lana telegram)

# Developer contacts

Responsible disclosure and security contact<EMAIL_ADDRESS>
Exchanges and listing contact (digital currency exchange representatives should take note Lana is an open source network with no premine/instamine or any type of crowdfunding and no listing fee budget is awailable<EMAIL_ADDRESS>
Developers contact<EMAIL_ADDRESS>
Development process
===========================

Developers work in their own trees, then submit pull requests when
they think their feature or bug fix is ready.

The patch will be accepted if there is broad consensus that it is a
good thing.  Developers should expect to rework and resubmit patches
if they don't match the project's coding conventions (see coding.txt)
or are controversial.

The master branch is regularly built and tested, but is not guaranteed
to be completely stable. Tags are regularly created to indicate new
stable release versions of Lanacoin.

Feature branches are created when there are major new features being
worked on by several people.

From time to time a pull request will become outdated. If this occurs, and
the pull is no longer automatically mergeable; a comment on the pull will
be used to issue a warning of closure. The pull will be closed 15 days
after the warning if action is not taken by the author. Pull requests closed
in this manner will have their corresponding issue labeled 'stagnant'.

Issues with no commits will be given a similar warning, and closed after
15 days from their last activity. Issues closed in this manner will be
labeled 'stale'.

## Get in touch or stay updated:

- Forum: https://bitcointalk.org/index.php?topic=1448065

- Twitter: https://twitter.com/LanaCoin

- Web: https://lanacoin.com/

- Web2: https://lanacoin.org

- Community web: https://lanacoin.org

- Facebook: https://www.facebook.com/LanaCoins/

- Telegram: https://t.me/LanaCoin

- Discord: https://discord.gg/YHxKAxhk

- Medium: https://medium.com/@LanaCoin/

- CoinmarketCap: https://coinmarketcap.com/currencies/lanacoin/

- Coinpaprika: https://coinpaprika.com/coin/lana-lanacoin/

- CoinGecko: https://www.coingecko.com/en/coins/lanacoin

- Blockexplorer: https://chainz.cryptoid.info/lana/

- Instagram: https://www.instagram.com/lanacoin.cryptocurrency/

- Youtube: https://www.youtube.com/channel/UC23mCMIR7ecKm3cnbOl1laA

- Lbry.tv: https://lbry.tv/$/invite/@LanaCoin:2

- Reddit: https://www.reddit.com/r/BlockmasterSi

- Mobile wallet for android: https://play.google.com/store/apps/details?id=com.cryptowallet.si

## List of wallet commands

￼
* addmultisigaddress <nrequired> <'["key","key"]'> [account]
* addnode <node> <add|remove|onetry>
* addredeemscript <redeemScript> [account]
* backupwallet <destination>
* checkkernel [{"txid":txid,"vout":n},...] [createblocktemplate=false]
* checkwallet
* createrawtransaction [{"txid":txid,"vout":n},...] {address:amount,...}
* decoderawtransaction <hex string>
* decodescript <hex string>
* dumpprivkey <lanacoinaddress>
* dumpwallet <filename>
* getaccount <lanacoinaddress>
* getaccountaddress <account>
* getaddednodeinfo <dns> [node]
* getaddressesbyaccount <account>
* getbalance [account] [minconf=1]
* getbestblockhash
* getblock <hash> [txinfo]
* getblockbynumber <number> [txinfo]
* getblockcount
* getblockhash <index>
* getblocktemplate [params]
* getcheckpoint
* getconnectioncount
* getdifficulty
* getinfo
* getmininginfo
* getnettotals
* getnewaddress [account]
* getnewpubkey [account]
* getpeerinfo
* getrawmempool
* getrawtransaction <txid> [verbose=0]
* getreceivedbyaccount <account> [minconf=1]
* getreceivedbyaddress <lanacoinaddress> [minconf=1]
* getstakesubsidy <hex string>
* getstakinginfo
* getsubsidy [nTarget]
* gettransaction <txid>
* getwork [data]
* getworkex [data, coinbase]
* help [command]
* importprivkey <lanacoinprivkey> [label] [rescan=true]
* importwallet <filename>
* keypoolrefill [new-size]
* listaccounts [minconf=1]
* listaddressgroupings
* listreceivedbyaccount [minconf=1] [includeempty=false]
* listreceivedbyaddress [minconf=1] [includeempty=false]
* listsinceblock [blockhash] [target-confirmations]
* listtransactions [account] [count=10] [from=0]
* listunspent [minconf=1] [maxconf=9999999] ["address",...]
* makekeypair [prefix]
* move <fromaccount> <toaccount> <amount> [minconf=1] [comment]
* ping
* repairwallet
* resendtx
* reservebalance [<reserve> [amount]]
* sendalert <message> <privatekey> <minver> <maxver> <priority> <id> [cancelupto]
* sendfrom <fromaccount> <tolanacoinaddress> <amount> [minconf=1] [comment] [comment-to]
* sendmany <fromaccount> {address:amount,...} [minconf=1] [comment]
* sendrawtransaction <hex string>
* sendtoaddress <lanacoinaddress> <amount> [comment] [comment-to]
* setaccount <lanacoinaddress> <account>
* settxfee <amount>
* signmessage <lanacoinaddress> <message>
* signrawtransaction <hex string> [{"txid":txid,"vout":n,"scriptPubKey":hex,"redeemScript":hex},...] [<privatekey1>,...] [sighashtype="ALL"]
* stop
* submitblock <hex data> [optional-params-obj]
* validateaddress <lanacoinaddress>
* validatepubkey <lanacoinpubkey>
* verifymessage <lanacoinaddress> <signature> <message>
* walletlock
* walletpassphrase <passphrase> <timeout> [stakingonly]
* walletpassphrasechange <oldpassphrase> <newpassphrase>

repository: LanaCoin/lanacoin

repo_name: LanaCoin/lanacoin


text:
+++
title = "google_compute_node_templates resource"
draft = false
platform = "gcp"

[menu]
  [menu.inspec]
    title = "google_compute_node_templates"
    identifier = "inspec/resources/gcp/google_compute_node_templates.md google_compute_node_templates resource"
    parent = "inspec/resources/gcp"
+++

## Syntax

A `google_compute_node_templates` is used to test a Google NodeTemplate resource

## Beta Resource

This resource has beta fields available. To retrieve these fields, include `beta: true` in the constructor for the resource

## Examples

```ruby
describe google_compute_node_templates(project: 'chef-gcp-inspec', region: 'europe-west2') do
  its('names') { should include 'inspec-node-template' }
end
```

## Properties

Properties that can be accessed from the `google_compute_node_templates` resource:

See the [google_compute_node_template](/inspec/resources/google_compute_node_template/#properties) resource for more information.

`creation_timestamps`
: an array of `google_compute_node_template` creation_timestamp

`descriptions`
: an array of `google_compute_node_template` description

`names`
: an array of `google_compute_node_template` name

`node_affinity_labels`
: an array of `google_compute_node_template` node_affinity_labels

`node_types`
: an array of `google_compute_node_template` node_type

`node_type_flexibilities`
: an array of `google_compute_node_template` node_type_flexibility

`server_bindings`
: (Beta only) an array of `google_compute_node_template` server_binding

`regions`
: an array of `google_compute_node_template` region

## Filter Criteria

This resource supports all of the above properties as filter criteria, which can be used
with `where` as a block or a method.

## GCP Permissions

Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project.


text:
### [CVE-2021-20077](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-20077)
![](https://img.shields.io/static/v1?label=Product&message=Tenable%20Nessus%20Agent&color=blue)
![](https://img.shields.io/static/v1?label=Version&message=n%2Fa&color=blue)
![](https://img.shields.io/static/v1?label=Vulnerability&message=Privilege%20Escalation&color=brighgreen)

### Description

Nessus Agent versions 7.2.0 through 8.2.2 were found to inadvertently capture the IAM role security token on the local host during initial linking of the Nessus Agent when installed on an Amazon EC2 instance. This could allow a privileged attacker to obtain the token.

### POC

#### Reference
- https://www.tenable.com/security/tns-2021-07

#### Github
- https://github.com/Live-Hack-CVE/CVE-2021-20077

repository: trickest/cve

repo_name: trickest/cve


text:
# ctdet_coco_dlav0_512

## Use Case and High-Level Description

CenterNet object detection model `ctdet_coco_dlav0_512` originally trained with PyTorch\*.
CenterNet models an object as a single point - the center point of its bounding box
and uses keypoint estimation to find center points and regresses to object size.
For details see [paper](https://arxiv.org/abs/1904.07850), [repository](https://github.com/xingyizhou/CenterNet/).

## Specification

| Metric                          | Value                                     |
|---------------------------------|-------------------------------------------|
| Type                            | Detection                                 |
| GFlops                          | 62.211                                    |
| MParams                         | 17.911                                    |
| Source framework                | PyTorch\*                                 |

## Accuracy

| Metric | Original model | Converted model |
| ------ | -------------- | --------------- |
| mAP    | 44.2%           | 44.28%         |

## Input

### Original Model

Image, name: `input.1`, shape: `1, 3, 512, 512`, format: `B, C, H, W`, where:

- `B` - batch size
- `C` - number of channels
- `H` - image height
- `W` - image width

Expected color order: `BGR`.
Mean values: [104.04, 113.985, 119.85], scale values: [73.695, 69.87, 70.89].

### Converted Model

Image, name: `input.1`, shape: `1, 3, 512, 512`, format: `B, C, H, W`, where:

- `B` - batch size
- `C` - number of channels
- `H` - image height
- `W` - image width

Expected color order: `BGR`.

## Output

1. Object center points heatmap, name: `center_heatmap`. Contains predicted objects center point, for each of the 80 categories, according to [Common Objects in Context (COCO)](https://cocodataset.org/#home) dataset version with 80 categories of objects, without background label, mapping to class names provided in `<omz_dir>/data/dataset_classes/coco_80cl.txt` file.
2. Object size output, name: `width_height`. Contains predicted width and height for each object.
3. Regression output, name: `regression`. Contains offsets for each prediction.

## Download a Model and Convert it into OpenVINO™ IR Format

You can download models and if necessary convert them into OpenVINO™ IR format using the [Model Downloader and other automation tools](../../../tools/model_tools/README.md) as shown in the examples below.

An example of using the Model Downloader:
```
omz_downloader --name <model_name>
```

An example of using the Model Converter:
```
omz_converter --name <model_name>
```

## Demo usage

The model can be used in the following demos provided by the Open Model Zoo to show its capabilities:

* [Object Detection C++ Demo](../../../demos/object_detection_demo/cpp/README.md)
* [Object Detection Python\* Demo](../../../demos/object_detection_demo/python/README.md)
* [Pedestrian Tracker C++ Demo](../../../demos/pedestrian_tracker_demo/cpp/README.md)

## Legal Information

The original model is distributed under the following
[license](https://raw.githubusercontent.com/xingyizhou/CenterNet/master/LICENSE)

```
MIT License

Copyright (c) 2019 Xingyi Zhou
All rights reserved.

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

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

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


text:
# PHP8/Nginx container

This container image contains PHP8 with Nginx as webserver

- [Guide](#guide)
  - [Run a new php8 instance](#run-a-new-php8-instance)
  - [Environment variables](#environment-variables)

## Guide

### Run a new PHP8 instance

The command to run this container is:

```sh
podman run -d --rm --name php8-nginx -v /srv/www/htdocs:/srv/www/htdocs registry.opensuse.org/opensuse/php8-nginx
```

### Environment variables:
```
  DEBUG=[0|1]           Enable debug mode
  TZ=<timezone>         Set timezone
```
Additional Environment variables can be found in the description for the openSUSE nginx container image.

repository: bmwiedemann/openSUSE

repo_name: bmwiedemann/openSUSE


text:
# SwiftyXBee

⚡A Swift library for communicating with XBee (ZigBee Series 2) radios in API mode.

## Summary
This is a [SwiftyGPIO](https://github.com/uraimo/SwiftyGPIO) based library for communicating with XBee radios in **API mode**, with support for Series 2 **only**.

This is a **work in progress**. I started coding the library for a project I am currently working on, so, as of now, it only supports ATCommand, ATCommandResponse, Tx, Rx, and Transmit Status API Frames. If you want to contribute to this noble cause, please submit a PR and I will be more than happy to review it and merge it :smile:.

For more information regarding the RF module, you can consult its [datasheet](https://www.digi.com/resources/documentation/digidocs/pdfs/90002002.pdf).

## API Mode
XBees support two operation modes: API and AT. API mode requires that the device communicate through a structured interface (that is, data is communicated in frames in a defined order). The API specifies how the device sends and receives commands, command responses, and module status messages using a serial port Data Frame. On the other hand, in AT (transparent) mode, the XBee radio simply relays serial data to the receiving XBee, as identified by the DH+DL address.

According to the documentation:
> The XBee firmware supports two API operating modes: without escaped characters and with escaped characters. Use the AP command to enable either mode. To configure a device to one of these modes, set the following AP parameter values:
> -  AP = 1: API operation.
> -  AP = 2: API operation (with escaped characters—only possible on UART).

⚠ This library is designed to work only in API mode,  it **requires** the **AP mode set to 2 (escape bytes)**, as this setting offers the best reliability.

## Hardware Details
- The XBee should be powered using **3.3 V**.
- This library requires the XBee's **UART** to be configured with compatible settings for the baud rate, parity, start bits, stop bits, and data bits.

This is the pin assignment to manually connect (no XBee shield) the device to any of the compatible boards:

| XBee Pin                     | Board UART    |
| ------------------------  | ---------------   |
| VCC = **1**                 | VCC 3.3V        |
| DOUT = **2**              | RX / Receive   |
| DIN / CONFIG = **3** | TX / Transmit   |
| GND = **10**              | GND                |

The UART pins on the RaspberryPi (pin 14 TXD, pin 15 RXD) need to be enabled via `raspi-config` before you can use them (restart required). By enabling the UART pins, you will lose the ability to access the login shell over serial.

## Supported Boards
Every board supported by [SwiftyGPIO](https://github.com/uraimo/SwiftyGPIO): RaspberryPis, BeagleBones, C.H.I.P., etc...

To use this library, you'll need a Linux ARM board running [Swift 5.x](https://github.com/uraimo/buildSwiftOnARM) 🚗.

The examples below will use a Raspberry Pi 3B+  board, but you can easily modify the examples to use one of the other supported boards. Full working demo projects for the RaspberryPi3B+ are available under the **Examples** directory.

## Installation
First of all, makes sure your board is running **Swift 5.x** ⚠!

Since Swift 5.x supports Swift Package Manager, you only need to add SwiftXBee as a dependency in your project's `Package.swift` file:

```swift
let package = Package(
    name: "MyProject",
    dependencies: [
        .package(url: "https://github.com/samco182/SwiftyXBee", from: "1.0.0"),
    ]
    targets: [
        .target(
            name: "MyProject",
            dependencies: ["SwiftyXBee"]),
    ]
)
```
Then run `swift package update` to install the dependency.

## Usage
### Initialization
The first thing is to initialize an instance of `SwiftyXBee` with the same UART configuration as the one you used to setup the XBee devices on the XCTU tool or through the AT command mode. Once you have your `xbee` object initialized, you can send and receive data packets between XBees:

```swift
import SwiftyXBee

let serial = SerialConnection(speed: .S9600, bitsPerChar: .Eight, stopBits: .One, parity: .None)
let xbee = SwiftyXBee(for: .RaspberryPi3, serialConnection: serial)
```
You can also initialize the `XBee` object with the following method:
```swift
import SwiftyXBee

let xbee = SwiftyXBee()
```
This initializer defaults to `.RaspberryPi3` as the selected board and serial connection with `speed: .S9600`, `bitsPerChar: .Eight`, `stopBits: .One`, and `parity: .None)`.

### AT Command Packet
AT-type commands can be sent via API frames to configure your local radio. They can query the settings on the local radio or set parameters. These are all the same commands you typed in transparent/command mode.

For this example, the local radio's *Node Identifier* parameter is been set and read.

Setting AT Command parameter:
``` swift
// The new Node Identifier
let nodeIdentifier = "XBee Test"

xbee.sendATCommand(.addressing(.ni(.write(nodeIdentifier))), frameId: .sendNoACK)
```
Reading AT Command parameter:
```swift
xbee.sendATCommand(.addressing(.ni(.read)))

do {
    let atCommandResponse = try xbee.readATCommandResponse()
    print("AT Command Response received: \(atCommandResponse.frameData.commandData) = \(atCommandResponse.frameData.commandData.string)")
} catch let error {
    print("Error receiving packet: \(error)")
}
```

### Transmit Packets
There a several different types of transmit (TX) packets available. But as mentioned above, as of now, the library only allows **Transmit Request**  packets to be sent. A list of all TX packets can be found in the API [documentation](https://www.digi.com/resources/documentation/digidocs/pdfs/90002002.pdf). All classes that end in "Request" are TX packets.
```swift
// The destination XBee 64-bit serial number
let deviceAddress = DeviceAddress(address: 0x0013A20012345678)

// The destination XBee 16-bit network address
let networkAddress = NetworkAddress(address: 0xFFFE)

// The actual message to be sent
let message = "This is my message to send!"

xbee.sendTransmitRequest(to: deviceAddress, network: networkAddress, message: message)
```
When a Transmit Request completes, if configured on the request's Frame Id, the receiver device will send a **Transmit Status** packet out of the serial interface. This message indicates if the Transmit Request was successful or if it failed. If you want to make sure your packet was correctly delivered, call the following code:
```swift
do {
    let transmitStatus = try xbee.readTransmitStatus()
    print("Status received: \(readingPacket.frameData.deliveryStatus)")
} catch let error {
    print("Error: \(error)")
}
```

### Receive Packet
As with transmit (TX) packets, there are also several different types of receive (RX) packets available. But as of now, the library only allows **Receive Packet** API frame to be read.
```swift
do {
    let readingPacket = try xbee.readRFDataPacket()
    print("Packet received: \(readingPacket.frameData.receivedData)")
} catch let error {
    print("Error: \(error)")
}
```

## Note 🔎
If you want to better understand how ZigBee communication protocol works, or the details (in a more comprehensive way) of the most common API frames XBee counts with, you could try reading [this book](https://www.amazon.com/gp/product/0596807732?ie=UTF8&tag=xbapra-20&linkCode=as2&camp=1789&creative=9325&creativeASIN=0596807732Building).


text:
# Building a web server container

A Docker container image can run any application you like. Let's build one that runs a web server. The web server will run whenever the container image starts up.

The following Python command creates and starts a simple web server:

```
python -m SimpleHTTPServer 8000
```

To build a container that runs this web server we need to change the `CMD` line of the Dockerfile, the line that controls the program that runs when the container starts.

1. Change to new directory and update the following commands in the Dockerfile:

   ```
   FROM ubuntu
   RUN apt-get update
   RUN apt-get -y install python
   EXPOSE 8000
   ENTRYPOINT ["python", "-m", "SimpleHTTPServer", "8000"]
   ```

   The first three lines are familiar. The last two lines introduce the new Dockerfile options.

 * EXPOSE 8000
  The EXPOSE command allows us as developers to "build in" documentation of what ports our application uses. Running this container in future with `-P` will automatically map  any `EXPOSE` ports in the Dockerfile to a dynamic port on our hosts real IP, allowing real remote connections to our service if necessary. You can see what port has been  mapped by using the `docker ps` command as below:

     ```
     docker run -P 86edbfe17927 &
     [1] 18291

     docker ps
     CONTAINER ID        IMAGE                                                      COMMAND                  CREATED             STATUS              PORTS                         NAMES
     7edf98bc653b        86edbfe17927                                               "/app/myApp.py"          3 seconds ago       Up 2 seconds        <IP_ADDRESS>:32768->5000/tcp       jolly_mestorf

     curl localhost:32768
     <IP_ADDRESS> - - [18/Jan/2019 12:40:17] "GET / HTTP/1.1" 200 -
     Hello Cisco
     ```

  * ENTRYPOINT [“python”, “-m”, “SimpleHTTPServer”, “8000”]
    Like CMD, the ENTRYPOINT command runs a program, but it also does something else: it enables us to pass arguments to the program. We use this feature to pass arguments to     Python to start the web server.

2. Build and run the new web server container image using the following command:

    ```
    docker build .
    docker run -P <your new CONTAINER ID> &
    ```

    Why don't we see any output?

    Every time before when we started a container we saw output from the container's application. The reason we see no output this time is that our application, a web server,     doesn't print any message. So how do we know whether it's running correctly?

3. Run the following Docker command to check if the new web server image is running:

    ```
    docker ps
    ```

    The command lists all running containers including the new web server image that we created:

    ![docker ps](assets/images/dockerpsweb.png)

    The web server is running. Now how do we connect to it?

    By default Docker gives each container an internal IP address on the host.
    Make note of the `<CONTAINER ID>` of the new web server image so that you can use it in the next step.

4. Run the following command to find out the container's IP address.
   You can use the `<CONTAINER ID>` of the new web server image that is received from the `docker ps` command output.

    ```
    docker inspect <CONTAINER ID>
    ```
    Running this command displays a great deal of information about the container. Included in the output is the container's address, identified as "IPAddress".

    ![Docker Inspect](assets/images/dockerinspect.png)

    Now that we know the IP address and port on which the web server can be reached, we can make a connection.
    Make note of the `IPAddress` of the container, so that you can use it in the next step.

5. Run the following command to make the connection.
   You can use the IP address of the container that is received from the `docker inspect <CONTAINER ID>` command output.

    ```
    curl http://<CONTAINER IPAddress>:8000
    ```

    The built-in Python web server by default serves the contents of its working directory. Because the Dockerfile copied the Python script to the root of the container, that's the directory that the web server displays:

   ![Success](assets/images/success.png)

Success! We can see the web server running in the container that we created, and when we connect to the web server it shows a list of the files in the container's root directory.

## Extra credit

You now know how to `ADD` files to the Docker build process. If you create a file named "index.html", add some HTML text to it, then use the Dockerfile to add it to the root of the container, guess what the new web server container will serve instead of the directory listing?

Give it a try!

# Summary

In this Learning Lab we have:

* Understood how Docker images are built using Dockerfiles.

* Understood how publicly-available Docker images are built by viewing their Dockerfiles.

* Built and ran our own Docker images.

* Connect to a web server running in a custom Docker container that we built.

Give yourself a pat on the back, grab a coffee and enjoy the related Labs.

That's all folks!

repository: CiscoCloud/mantl-devnet-learninglabs

repo_name: CiscoCloud/mantl-devnet-learninglabs