text:
# 1. PL0-compiler
> A compiler for c-like programming language **based on** PL0, which is a dynamic, strong typing language.

>小组成员: 朱河勤, 张世聪, 徐瑞, 詹慧悠

**分工**
* 朱河勤（整体框架设计与实现包括词法分析,语法分析代码生成等）
* 张世聪（do-while、switch语句的实现）
* 詹慧悠（do-while、switch语句的实现及实验报告撰写）
* 徐瑞（实现传值调用）

# 2. operations and features
![](features.jpg)

# 3. Grammar
```scala
program =  body "."
body = {varDeclaration ";" |  constDeclaration ";" |  "func" ident "(" arg_list  ")" body ";"}  sentence

varDeclaration = "var"  varIdent { "," varIdent}
varIdent  = ident ["=" number] | ident  { "[" number "]" }
constDeclaration = "const" ident "=" number {"," ident "=" number}

sentence = [ ident ":=" { ident ":=" } sentenceValue
                |  "begin" sentence { ";" sentence}  "end"
                |  "if" sentenceValue "then" sentence {"elif" sentence} ["else" sentence]
                |  "while" sentenceValue "do" sentence
                |  "break"
                |  "continue"
                |  ["return"] sentenceValue
                |  "print" "(" real_arg_list ")" ]

sentenceValue =   condition

arg_list =  ident { "," ident}

real_arg_list = sentenceValue {"," sentenceValue }

condition = condition_or [ "?" sentenceValue ":" sentenceValue ]
condition_or  = condition_and { "||" condition_or }
condition_and = condition_not { condition_not "&&" condition_and}
condition_not = {"!"} condition_unit
condiiton_unit = ["odd"] expression
                        | expression ("<" | ">" | "<=" | ">=" | "=" | "!=") expression

expression =  level1 { ("<<"| ">>" | "&" | "|") level1 }
level1  = level2 { ( "+" | "-" ) level2 }
level2 = level3 { "*" | "/" | "/%" | "%" ) level3 }
level3 = level4 {"^" level4}
level4 = item {"!"}          (*  factorial *)
item =  number  |ident { "(" real_arg_list ")" }| "(" sentenceValue" )" | ("+" | "-" | "~" ) item
```

# 4. Instruction generation
We designed several instructions that can be generated for the target machine.
To simplify this problem, we will emulate this virtual machine and execute instructions in python.
## 4.1. register
This machine has three registers:
* `b` is the base register that contains the base pointer to locate a varible in the data stack
* `reg` is the return register that contains the  return value of latest function call
* `pc` is the pc register that points to the instruction
## 4.2. stack
There are two stack in this virtual machine.
One contains the instructions, visited by register `pc`. It won't change when executing instructions, so we can assume it's readonly
The other is data stack. It dynamiclly changes when running the program.

For each level, the first is the base address of this level. The second place is the static chain to visit the upper level's varibles. The third place contains the return address of the upper level.
And the other places in one level contains local varibles and real time data for calculation.
![](src/data_stack.jpg)

Each time we call a function, the level increases 1. Also, the level decreases 1 when we return from a function.

## 4.3. instruction
Every instruction consists of three parts. The first is the name of the instruction. Generally, the second is the level diifference of a identifier(if it has). And the third part is the address.

name | levelDiff | address | explanation
:-:|:-:|:-:|:-:
INT|-|n|allocate n space for one level
LIT|-|constant value| push a constant value to the top of the data stack
LOD | levelDiff|addr | load a varible value to the top of the data stack. The var can be found use levelDiff and addr
STO|levelDiff|addr| store the stack top value to a varible, top decreases.
CAL|levelDiff|addr|call a function
JMP |-|addr|jmp to addr, namely set addr to pc
JPC|-|addr| pop stack, if the value is not True, jmp addr
MOV|n1|n2|  stk[top-n2] = stk[top-n1]
OPR |-| RET| return to the upper level, use current level's first three value to change pc, data stack, base register.
OPR | -|POP| pop the data stack, store the value in `reg` register
OPR|-|PUSH| push `reg` to stack top
OPR|n|BACK|  rewind stk.top backward n steps
OPR|-|operator type| variout operation on value

# 5. Design
We can generate instruction when analysing grammar.
Some keypoints is the control structures' instruction traslation.
## 5.1. if elif else
![](../src/elseif_ins_stack.jpg)
## 5.2. while/break
![](../src/while_ins_stack.jpg)
`continue`, `for`  can be translated in the same way.
## 5.3. function arguments pass
When analysing the function's defination, we can store the formal arguments as function's local varibles.
As soon as we call this function, we should calculate the real arguments in the level upper the function, and then pass value to the function's formal varibles one by one.

I use an instruction `MOV` to achive this goal. `MOV  addr1, addr2` will store value stk[top-n2] in stk[top-n1].
Let's have a look at how to call a function and pass args value.

Before we call a function, its real args will be calculated in the level upper this function. Note function level is n+1, and we call this function in level n.
In level n, we calculated function's args, all values are stored in the data stack of level n. Now call function and enter it. Data stack reaches level n+1 and grows three spaces for `DL`,`SL`,`RA`. The following space are for function's local varibles. So we can mov level n's real args value to these places according to function's argument num and varible num.

For example, function has n1 args, n2 local varibles(excluding args), then
```python
for i in [0,1..,n1-1]:
    mov , n2+n1+3+i, n2 + i
```
The moment we returned level n, we should rewind top for n1 spaces, `OPR,n1,'BACK'` can make it.

![](../src/argument_pass.jpg)

## 5.4. function return
Also, mark function level as n+1, and outer(upper) is level n.
To implement `return` sentence, we just need to do two things:
* calculate `return` sentence value **in level n+1**
* pass this value to level n
It seems that it's hard to pass level n+1 's value to level n. Once we returned to level n, level n+1 's data in  data stack will be cleared.

I use a extra register `reg` to achive this. Before we return,
* calculate return value
* `OPR ,0,'POP'`  will pop the value and store it in reg
* return level n
* `OPR,0,'PUSH'` will push reg value to stack top

Now the return value has be passed from level n+1 to level n

## 5.5. instruction fillback
Taking `while` block as an example, Note that we don't know the `JPC` instruction's target addr until we finish analysing the whole block.The Solution is that after we analyse while condition, we generate an instruction with no target address, just take a place. We note down this instruction's address. As soon as we finish analysing the whole  `while` block, the instruction pointer, namely `ip`, pointing to the target address of `JPC`. Then we fill back the `JPC` instruction with the target address along to ip.

## 5.6. symbol table
When analysing and translating, we want to get the symbol which including level, address,(value for constant) according to its name. The following shows how to achive it elegantly

There are three types of symbols:
* constant
* varible
* function name
Every function has an environment that contains this level's symbols, and an outer environment(except main function). Every environment has the three symbols mentioned above.

Defaultly, we are in the main function in the beginning of this program.

In an enviroment, when we meet a symbol, we should seek it in current environment. If not found, go for the outer environment recursively until we found it.

It gurantees that every environment has no same names for different symbols but may have same names in different environment.

So there won't be conflits when different functions have same local varibles or arguments.

I create class `closure` to describe this kind of environment and varible `curClosure` to  mark down current environment. Every time when calling a function, we enter a more inner environment. We do the following things to make sure that environment changes creately.
```python
saved = curClosure
curClosure = function.closure
call function
curClosure = saved

repository: eltsai/USTC-CS-Courses-Resource

repo_name: eltsai/USTC-CS-Courses-Resource


text:
---
layout: post
title: Finding out the dependencies of a CMake project
tags: [CMake, dependencies, c++]
---
I’m not at all proud of this. In fact I think it is horrific. But it will do a reasonable job of pulling out the first argument of all the `find_package` calls in your CMake code.

``` bash
find . -iname "CMakeLists.txt" -o -iname "*.cmake*" | xargs grep -Eih "^\s*find_package\s*\(" | tr '[:upper:]' '[:lower:]' | sed -e "s/.*find_package.*([^a-z0-9]*\([a-z0-9]*\).*).*/\1/" | sort | uniq
```

license: MIT

branch_name: refs/heads/master

extension: md

license_type: permissive


text:
# A new way to map health check

Use `IEndpointRouteBuilder.MapHealthChecks` to configure health check instead of `IApplicationBuilder.UseHealthChecks`. [This is how it's done in ASP.NET Core 2.2](/practical-aspnetcore/blob/master/projects/2-2/health-check/src/Program.cs).

repository: dodyg/practical-aspnetcore

gha_language: C#

gha_license_id: MIT

repo_name: dodyg/practical-aspnetcore


text:
# Papers on Knowledge-based Machine Reading Comprehension.

A list of recent papers about **Knowledge-based Machine Reading Comprehension** (**KMRC**).

Contributed by [Luxi Xing](https://github.com/XingLuxi) and [Yuqiang Xie](https://github.com/IndexFziQ).

Institute of Information Engineering, Chinese Academy of Sciences, Beijing, China.

Update on **Oct. 23, 2019**.

(the current version only contains the works published on the conferences or journals, we will continuously update this list.)

***Because of some mistakes, this version can not be updated. For the latest version, please jump to [KMRC-Research-Archive](https://github.com/XingLuxi/KMRC-Research-Archive).***

-------

## [Content](#content)

1. [Survey](#survey-papers)
2. [Cloze Style Tasks](#cloze-style-tasks)
3. [Span Extraction Tasks](#span-extraction-tasks)
4. [Multiple Choice Tasks](#multiple-choice-tasks)
5. [Generation Tasks](#generation-tasks)
6. [Datasets](#benchmark-datasets)

## [Survey Papers](#content)

1. **Commonsense Reasoning for Natural Language Understanding: A Survey of Benchmarks, Resources, and Approaches**. 2019. [[paper](https://arxiv.org/abs/1904.01172) / [note](https://zhuanlan.zhihu.com/p/80883568)]

    Authors: *Shane Storks, Qianzi Gao, Joyce Y. Chai*

1. **Neural Machine Reading Comprehension: Methods and Trends**. 2019. [[paper](https://arxiv.org/abs/1907.01118)]

    Authors: *Shanshan Liu, Xin Zhang, Sheng Zhang, Hui Wang, Weiming Zhang*

1. **Machine Reading Comprehension: a Literature Review**. 2019. [[paper](https://arxiv.org/abs/1907.01686)]

    Authors: *Xin Zhang, An Yang, Sujian Li, Yizhong Wang*

## [Cloze Style Tasks](#content)

| Title | Publish | Tasks | Links |
| :---- | :---: | :---- | :---:|
| Reasoning with Heterogeneous Knowledge for Commonsense Machine Comprehension | ACL
2017 | SCT | [paper](http://aclweb.org/anthology/D17-1216) |
| World Knowledge for Reading Comprehension: Rare Entity Prediction with Hierarchical LSTMs Using External Descriptions | EMNLP
2017 | Rare Entity Prediction | [paper](https://www.aclweb.org/anthology/D17-1086) |
| Knowledgeable Reader: Enhancing Cloze-Style Reading Comprehension with External Commonsense Knowledge | ACL
2018 | Common Nouns | [paper](http://aclweb.org/anthology/P18-1076)
 [note](http://xingluxi.github.io/2019/01/09/paper-knreader/) |
| A Multi-Attention based Neural Network with External Knowledge for Story Ending Predicting Task | COLING
2018 | SCT | [paper](http://www.aclweb.org/anthology/C18-1149) |
| Incorporating Structured Commonsense Knowledge in Story Completion | AAAI
2018 | SCT | [paper](https://arxiv.org/abs/1811.00625) |
| Story Ending Prediction by Transferable BERT | IJCAI
2019 | SCT | [paper](https://arxiv.org/abs/1905.07504) |

## [Span Extraction Tasks](#content)

| Title | Publish | Tasks | Links |
| :---- | :---: | :---- | :---:|
| Dynamic Integration of Background Knowledge in Neural NLU Systems | 2018 | SQuAD/
TriviaQA | [paper](https://arxiv.org/pdf/1706.02596.pdf)
[note](http://xingluxi.github.io/2019/03/06/paper-2018-refinewordemb/) |
| Explicit Utilization of General Knowledge in Machine Reading Comprehension | ACL
2019 | SQuAD | [paper](https://www.aclweb.org/anthology/P19-1219)
 [note](http://xingluxi.github.io/2019/07/17/paper-acl2019-kar/) |
| Enhancing Pre-Trained Language Representations with Rich Knowledge for Machine Reading Comprehension | ACL
2019 | SQuAD/
ReCoRD | [paper](https://www.aclweb.org/anthology/P19-1226/)
 [note](http://xingluxi.github.io/2019/07/29/paper-acl2019-kt-net/) |

## [Multiple Choice Tasks](#content)

| Title | Publish | Tasks | Links |
| :---- | :---: | :---- | :---:|
| Yuanfudao at SemEval-2018 Task 11: Three-way Attention and Relational Knowledge for Commonsense Machine Comprehension | SemEval
2018 | SemEval-2018 Task 11 | [paper](https://www.aclweb.org/anthology/S18-1120/)
 [code](https://github.com/intfloat/commonsense-rc) |
| Improving Question Answering by Commonsense-Based Pre-Training | AAAI
2019 | ARC/
OpenBookQA/
SemEval-2018 Task 11 | [paper](https://arxiv.org/abs/1809.03568) |
| Improving Machine Reading Comprehension with General Reading Strategies | NAACL
2019 | ARC/ OpenBookQA/ MCTest/
SemEval-2018 Task 11/ SCT/ MultiRC | [paper](https://www.aclweb.org/anthology/N19-1270/)
 [code](https://github.com/nlpdata/strategy/) |
| Ranking and Selecting Multi-Hop Knowledge Paths to Better Predict Human Needs | NAACL
2019 | story commonsense | [paper](https://www.aclweb.org/anthology/papers/N/N19/N19-1368/)
 [code](https://github.com/debjitpaul/Multi-Hop-Knowledge-Paths-Human-Needs) |
| Incorporating Relation Knowledge into Commonsense Reading Comprehension with Multi-task Learning | CIKM
2019 | SemEval-2018 Task 11 / SCT | [paper](https://arxiv.org/abs/1908.04530) |
| Explain Yourself! Leveraging Language Models for Commonsense Reasoning | ACL
2019 | CommonsenseQA | [paper](https://www.aclweb.org/anthology/P19-1487.pdf)
 [code](https://github.com/salesforce/cos-e)
 [note](http://xingluxi.github.io/2019/07/10/paper-acl2019-cos-e/) |
| Careful Selection of Knowledge to solve Open Book Question Answering | ACL
2019 | OpenBookQA | [paper](https://arxiv.org/abs/1907.10738) |
| Improving Question Answering with External Knowledge | EMNLP
MRQA
2019 | ARC/
OpenBookQA | [paper](https://arxiv.org/pdf/1902.00993.pdf)
 [note](http://xingluxi.github.io/2019/08/26/paper-2019-edl-md/) |
| KagNet: Knowledge-Aware Graph Networks for Commonsense Reasoning | EMNLP
2019 | CommonsenseQA | [paper](https://arxiv.org/abs/1909.02151)
 [code](https://github.com/INK-USC/KagNet)
 [note](https://zhuanlan.zhihu.com/p/81917730) |
| What’s Missing: A Knowledge Gap Guided Approach for Multi-hop Question Answering | EMNLP
2019 | OpenBookQA | [paper](https://arxiv.org/abs/1909.09253)
 [note](https://zhuanlan.zhihu.com/p/85852386) |
| BIG MOOD: Relating Transformers to Explicit Commonsense Knowledge | EMNLP
COIN
2019 | MCScripts v2 | [paper](http://arxiv.org/abs/1910.07713) |

## [Generation Tasks](#content)
Also known as **Free-form Answer Tasks**

| Title | Publish | Tasks | Links |
| :---- | :---: | :---- | :---:|
| Commonsense for Generative Multi-Hop Question Answering Tasks | EMNLP
2018 | NarrativeQA/
WikiHop | [paper](https://www.aclweb.org/anthology/D18-1454/)
 [code](https://github.com/yicheng-w/CommonSenseMultiHopQA)
 [note](http://xingluxi.github.io/2019/02/21/paper-emnlp2018-mhpgm/) |
| COMET: Commonsense Transformers for Automatic Knowledge Graph Construction | ACL
2019 | Atomic | [paper](https://arxiv.org/abs/1906.05317)
[code](https://github.com/atcbosselut/comet-commonsense)
[note](https://indexfziq.github.io/2019/07/03/COMET/) |
| Incorporating External Knowledge into Machine Reading for Generative Question Answering | EMNLP
2019 | MS MARCO | [paper](http://arxiv.org/abs/1909.02745)
[note](http://xingluxi.github.io/2019/10/13/paper-emnlp2019-keag/) |

## [Benchmark Datasets](#content)

1. [**COPA**] Choice of Plausible Alternatives: An Evaluation of Commonsense Causal Reasoning. AAAI,2011. [[paper](http://ict.usc.edu/~gordon/publications/AAAI-SPRING11A.PDF) / [data](http://people.ict.usc.edu/~gordon/copa.html)]

    Authors: *Melissa Roemmele, Cosmin Adrian Bejan, Andrew S. Gordon*

    * Type: Multiple-Choice;

1. [**WSC**] The Winograd Schema Challenge. AAAI,2011. [[paper](https://www.aaai.org/ocs/index.php/KR/KR12/paper/download/4492/4924) /[data](https://cs.nyu.edu/faculty/davise/papers/WinogradSchemas/WS.html)]

    Authors: *Hector J. Levesque, Ernest Davis, Leora Morgenstern*

* Type: Multiple-Choice;

2. [**ROCStories**; **SCT**] A Corpus and Cloze Evaluation for Deeper Understanding of Commonsense Stories. NAACL,2016. [[paper](https://www.aclweb.org/anthology/N16-1098/) / [data](https://www.cs.rochester.edu/nlp/rocstories/)]

    Authors: *Nasrin Mostafazadeh, Nathanael Chambers, Xiaodong He, Devi Parikh, Dhruv Batra, Lucy Vanderwende, Pushmeet Kohli, James Allen*

    * Type: Cloze;

1. [**NarrativeQA**] The NarrativeQA Reading Comprehension Challenge. TACL,2018. [[paper](https://arxiv.org/abs/1712.07040) / [data](https://github.com/deepmind/narrativeqa)]

    Authors: *Tomáš Kočiský, Jonathan Schwarz, Phil Blunsom, Chris Dyer, Karl Moritz Hermann, Gábor Melis, Edward Grefenstette*

    * Type: Generation;

1. [**SemEval-2018 Task 11**] MCScript: A Novel Dataset for Assessing Machine Comprehension Using Script Knowledge. LERC,2018. [[paper](https://arxiv.org/abs/1803.05223) / [data](http://www.sfb1102.uni-saarland.de/?page_id=2582)]

    Authors: *Simon Ostermann, Ashutosh Modi, Michael Roth, Stefan Thater, Manfred Pinkal*

    * Type: Multiple-Choice;

1. [**story-commonsense**] Modeling Naive Psychology of Characters in Simple Commonsense Stories. ACL,2018. [[paper](https://www.aclweb.org/anthology/P18-1213/) / [data](http://uwnlp.github.io/storycommonsense)]

    Authors: *Hannah Rashkin, Antoine Bosselut, Maarten Sap, Kevin Knight, Yejin Choi*

    * Type: Multiple-Choice;

1. **Event2Mind**: Commonsense Inference on Events, Intents, and Reactions. ACL,2018. [[paper](https://www.aclweb.org/anthology/P18-1043/) / [data](https://uwnlp.github.io/event2mind/)]

    Authors: *Hannah Rashkin, Maarten Sap, Emily Allaway, Noah A. Smith, Yejin Choi*

    * Types: Generation;

1. **ATOMIC**: An Atlas of Machine Commonsense for If-Then Reasoning. AAAI,2019. [[paper](https://homes.cs.washington.edu/~msap/atomic/data/sap2019atomic.pdf) / [data](https://homes.cs.washington.edu/~msap/atomic/)]

    Authors: *Maarten Sap, Ronan LeBras, Emily Allaway, Chandra Bhagavatula, Nicholas Lourie, Hannah Rashkin, Brendan Roof, Noah A. Smith, Yejin Choi*

    * Types: Generation;

1. [**ARC**] Think you have Solved Question Answering? Try ARC, the AI2 Reasoning Challenge. 2018. [[paper](http://ai2-website.s3.amazonaws.com/publications/AI2ReasoningChallenge2018.pdf) / [data](http://data.allenai.org/arc/)]

    Authors: *Peter Clark, Isaac Cowhey, Oren Etzioni, Tushar Khot, Ashish Sabharwal, Carissa Schoenick, Oyvind Tafjord*

    * Type: Multiple-Choice;

1. [**OpenBookQA**] Can a Suit of Armor Conduct Electricity? A New Dataset for Open Book Question Answering. EMNLP,2018. [[paper](https://www.aclweb.org/anthology/D18-1260/) / [data](https://leaderboard.allenai.org/open_book_qa)]

    Authors: *Todor Mihaylov, Peter Clark, Tushar Khot, Ashish Sabharwal*

    * Type: Multiple-Choice;

1. **ReCoRD**: Bridging the Gap between Human and Machine Commonsense Reading Comprehension. 2018. [[paper](https://arxiv.org/abs/1810.12885) / [data](https://sheng-z.github.io/ReCoRD-explorer/)]

    Authors: *Sheng Zhang, Xiaodong Liu, Jingjing Liu, Jianfeng Gao, Kevin Duh, Benjamin Van Durme*

    * Type: Cloze;

1. **CommonsenseQA**: A Question Answering Challenge Targeting Commonsense Knowledge. NAACL,2019. [[paper](https://www.aclweb.org/anthology/N19-1421/) / [data](https://www.tau-nlp.org/commonsenseqa)]

    Authors: *Alon Talmor, Jonathan Herzig, Nicholas Lourie, Jonathan Berant*

    * Type: Multiple-Choice;

1. **ChID**: A Large-scale Chinese IDiom Dataset for Cloze Test. ACL,2019. [[paper](https://www.aclweb.org/anthology/P19-1075) / [data](https://github.com/chujiezheng/ChID-Dataset)]

    Authors: *Chujie Zheng, Minlie Huang, Aixin Sun*

    * Type: Cloze;

1. [**sense-making**] Does it Make Sense? And Why? A Pilot Study for Sense Making and Explanation. ACL,2019. [[paper](https://www.aclweb.org/anthology/P19-1393/) / [data]( https://github.com/wangcunxiang/SenMaking-and-Explanation)]

    Authors: *Cunxiang Wang, Shuailong Liang, Yue Zhang, Xiaonan Li, Tian Gao*

    * Type: Multiple-Choice;

1. **HellaSwag**: Can a Machine Really Finish Your Sentence? ACL,2019. [[paper](https://arxiv.org/abs/1905.07830) / [data](https://rowanzellers.com/hellaswag/)]

    Authors: *Rowan Zellers, Ari Holtzman, Yonatan Bisk, Ali Farhadi, Yejin Choi*

    * Type: Multiple-Choice;

1. **SocialIQA**: Commonsense Reasoning about Social Interactions. EMNLP,2019. [[paper](https://arxiv.org/abs/1904.09728) / [data](https://maartensap.github.io/social-iqa/)]

    Authors: *Maarten Sap, Hannah Rashkin, Derek Chen, Ronan LeBras, Yejin Choi*

    * Type: Multiple-Choice;

1. [**ANLI**] Abductive Commonsense Reasoning. 2019. [[paper](https://arxiv.org/abs/1908.05739) / [data](https://leaderboard.allenai.org/anli/submissions/get-started)]

    Authors: *Chandra Bhagavatula, Ronan Le Bras, Chaitanya Malaviya, Keisuke Sakaguchi, Ari Holtzman, Hannah Rashkin, Doug Downey, Scott Wen-tau Yih, Yejin Choi*

    * Type: Multiple-Choice;

1. **Cosmos QA**: Machine Reading Comprehension with Contextual Commonsense Reasoning. EMNLP,2019. [[paper](https://arxiv.org/abs/1909.00277) / [data](https://wilburone.github.io/cosmos/)]

    Authors: *Lifu Huang, Ronan Le Bras, Chandra Bhagavatula, Yejin Choi*

    * Type: Multiple-Choice;

Note: *Only consider the benchmark datasets/tasks which require knowledge to complete.*

## Other Paper List About MRC

[thunlp/RCPapers](https://github.com/thunlp/RCPapers)

repository: IndexFziQ/KMRC-Papers

repo_name: IndexFziQ/KMRC-Papers


text:
# Changelog

All notable changes to this project will be documented in this file.

## [4.0.0] - 2020-04-21

### Added

- RMHCovid19ScreeningT_2020-04-21_1252.REDCap.xml
- A 'PLEASE SCROLL DOWN AND HIT SUBMIT!' message on final survey screen. This text changes the 'scroll' variable.
- A new SMS alert to patients summarising their screening assessment to show clinical staff on request (stops clinical staff having to visit a pc to check their basic details).

### Changed
- Logic of who requires a swab test updated to latest Victorian guidelines
- Updated travel question to include cruise ships
- Patients with any of the symptoms Fever, Chills, Cough, Sore Throat, Shortness of Breath will now trigger a test
- Patients with who have travelled or been in contact with a known case and who have any of these symptoms Diarrhoea, Muscle Ache, Runny or Stuffy Nose, Loss of smell, Nausea, Vomiting, Diarrhea will now trigger a test

## [3.1.0] - 2020-03-29

### Added

- RMHCovid19ScreeningT_2020-03-29_1435.REDCap.xml
- A 'PLEASE SCROLL DOWN AND HIT SUBMIT!' message on final survey screen. This text changes the 'scroll' variable.
- A new SMS alert to patients summarising their screening assessment to show clinical staff on request (stops clinical staff having to visit a pc to check their basic details).

### Fixed
- Bug in quarantine days remaining calculation that left the 'you have N more days of quarantine' text incomplete. The calculation variable 'quarantine_days_into' was altered.

## [3.0.1] - 2020-03-22

### Added
- RMHCovid19ScreeningT_2020-03-22_2259.REDCap.xml

### Fixed
- Edge case where user could incorrectly be told they did not require quarantine/testing. If the user had contact with a confirmed Covid-19 case, but neglected to enter a 'Date of last contact with Covid-19 patient' the assessment could be wrong. Altered 'contact_time' to be a Required field.

## [3.0.0] - 2020-03-22

#### Added
- RMHCovid19ScreeningT_2020-03-22_1504.REDCap.xml
- First public release of the tool via GitHub

[unreleased]: https://github.com/rmhcovid/screentool/compare/v1.1.0...HEAD
[3.1.0]: https://github.com/rmhcovid/screentool/compare/v3.0.1...v3.1.0
[3.0.1]: https://github.com/rmhcovid/screentool/compare/v3.0.0...v3.0.1
[3.0.0]: https://github.com/rmhcovid/screentool/releases/tag/v3.0.0

repository: rmhcovid/screentool

repo_name: rmhcovid/screentool


text:
# Markdown Previewer

A simple mardown converter-visualizer app made for freeCodeCamp's Front-end development certification.

## Demo
Check [this](https://jesuodz.github.io/markdown-previewer) out!

## Installation and usage

Clone the repository
```
git clone https://github.com/jesuodz/markdown-previewer.git
cd markdown-previewer
```
Install dependencies
```
npm install
```

Start development server
```
npm run start
```
or build
```
npm run build
```

## Built with
* [React.js]() - Library used for creating the UI.
* [Redux.js]() - To manage component's state.
* [Bootstrap]() and [FontAwesome]() - For grid, styles and icons.s
* [gh-pages]() - Used for deployment.
* [marked]() - Light-weight markdown compiler

## License
This project is licensed under the MIT License - see the [LICENSE.md](https://github.com/jesuodz/markdown-previewer/blob/master/LICENSE.md) file for details

## Author
Jesús Ordosgoitty - [jesuodz](https://jesuodz.github.io)

repository: jodaz/markdown-previewer

gha_language: JavaScript

repo_name: jodaz/markdown-previewer


text:
# YAML

Deployer supports recipes written in YAML. For validating structure, Deployer uses
JSON Schema declared in [schema.json](https://github.com/deployphp/deployer/blob/master/src/schema.json).

Here is an example of YAML recipe:

```yaml
import:
  - recipe/laravel.php

config:
  repository: "git@github.com:example/example.com.git"
  remote_user: deployer

hosts:
  example.com:
    deploy_path: "~/example"

tasks:
  build:
    - cd: "{{release_path}}"
    - run: "npm run build"

after:
  deploy:failed: deploy:unlock
```

YAML recipes can include recipes written in PHP. For example, some tasks maybe written in PHP and imported in YAML.

Also, other way around is possible: import YAML recipe from PHP. Use [import()](api.md#import) function for that.


text:
Download
========

The binaries are available [here] (https://github.com/HarryPehkonen/winsw/downloads "Harry's Download Area") for download. That’s compiled from this version, and is probably newer.  Use `winsw version` to see when it was compiled.

Usage
=====

During your development…

* Take winsw.exe from the distribution, and rename it to your taste (such as `myapp.exe`)
* Write `myapp.xml` (see Configuration Syntax for more details)
* Place those two files side by side when you deploy your application, because that’s how winsw.exe discovers its configuration.

At runtime…

* To install a service, run myapp.exe install
* To start a service, run myapp.exe start
* To stop a service, run myapp.exe stop
* To restart a service, run myapp.exe restart
* To uninstall a service, run myapp.exe uninstall

When there’s a problem, these commands also report an error message to stderr. On a successful completion, these commands do not produce any output, and exit with 0.

In addition, you can also run `myapp.exe` status to have it print out the current status of the service to stdout. Again, any error encountered during the processing would cause output to be reported to stderr.

All these commands use the same set of exit code to indicate its result.

Configuration Syntax
====================

```xml
<service>
  <id>NginxTest</id>
  <name>NginX</name>
  <description>Just testing</description>
  <executable>"C:\Program Files\NginX\nginx.exe"</executable>
  <stopexecutable>"C:\Program Files\NginX\nginx.exe"</stopexecutable>
  <logpath>"C:\Whatever\"</logpath>
  <logmode>roll</logmode>
  <startargument>-p "C:\Whatever"</startargument>
  <stopargument>-p "C:\Whatever"</stopargument>
  <stopargument>-s stop</stopargument>
  <env name="Name" value="The Value" />
  <beeponshutdown />
  <depend>Apache2.2</depend>
  <download from="http://www.google.ca/" to="c:\temp\deleteme.html" />
</service>
```

id
==

A unique id for the service.

name
====

This appears in the "Name" column in the Services list.

description
===========

This appears in the "Description" column in the services list.

executable
==========

Path and filename to the executable that starts the service.  Quotes get removed.

stopexecutable
==============

Optional.  If this is specified, it (along with the stop-arguments) is used to shut down the service.

logpath
=======

Optional.  Defaults to same path as `executable`.  Directory name where log files are created.

logmode
=======

Defaults to `append`.

rotate
------

Size-based log roller

reset
-----

Resets the log file every time the service is started.  Doesn't roll.

roll
----

Rolls the log file every time the service is started.

roll-by-time
------------

Must specify `pattern`.  May specify `period` (defaults to one).

I have no idea what kind of patterns to use.

roll-by-size
------------

You may specify `sizeThreshold` in kilobytes (defaults to 10 kB).

You may specify number of `keepFiles`.  Defaults to 8.

append
------

Always appends to the end of a log file.

depend
======

startargument
=============

Arguments that will be supplied to `executable`.  You can specify multiple startarguments -- they will be concatenated.

stopargument
============

Arguments that will be supplied to `stopexecutable`, or `executable` if it wasn't specified.  You can specify multiple stoparguments -- they will be concatenated.

env
===

Specify the name and value of one environment value as attributes.  Example:

`<env name="PATH" value="C:\TEMP" />`

beeponshutdown
==============

The wrapper makes a beep when the service has shut down.  It doesn't beep on restart.

download
========

Use this to automatically download any files when the service is started.

Deferred File Operations
========================

To support self updating services, winsw offers a mechanism to perform file operations before a service start up. This is often necessary because Windows prevents files from overwritten while it’s in use.

To perform file operations, write a text file (in the UTF-8 encoding) at `myapp.copies` (that is, it’s in the same directory as `myapp.xml` but with a different file extension), and for each operation add one line:

To move a file, write “src>dst”. If the ‘dst’ file already exists it will be overwritten.
The success or failure of these operations will be recorded in the event log.

Once done, the myapp.copies file will be deleted.

repository: HarryPehkonen/winsw

repo_name: HarryPehkonen/winsw


text:
---
date: '2017-04-13'
layout: rafaga
rafagas:
- desc: 'Map of a mud flood in Mocoa, Colombia '
  keyw: mud
  link: https://gkudos.carto.com/u/kudosg/builder/b2604ac2-1c44-11e7-b24c-0e3ebc282e83/embed
  microlink:
    desc: 'Potentially affected zones by the mudflow in Mocoa, Colombia Data:

      OSM - Mocoa - 2017-04-08

      UNITAR http://www.unitar.org/unosat/node/44/2567 Satellite detected potentially
      affected zones by the mudflow in Mocoa, Colombia. Map created by Kudos SAS in
      CARTO'
    image: https://cartocdn-gusc.global.ssl.fastly.net/kudosg/api/v1/map/static/named/tpl_b2604ac2_1c44_11e7_b24c_0e3ebc282e83/1200/630.png
    logo: https://cartodb-libs.global.ssl.fastly.net/cartodbui/assets/1.0.0-assets.27/favicons/favicon.ico
    title: Satellite detected potentially affected zones by the mudflow in Mocoa,
      Colombia
- desc: 'Catalonia rent and purchase houses prices: unaffordable for most of the population'
  keyw: dwellings
  link: https://sibilaremapes.carto.com/builder/2f9782aa-1e05-11e7-b3f0-0ef7f98ade21/embed
  microlink:
    desc: Map created by sibilaremapes in CARTO
    image: https://cartocdn-gusc.global.ssl.fastly.net/sibilaremapes/api/v1/map/static/named/tpl_2f9782aa_1e05_11e7_b3f0_0ef7f98ade21/1200/630.png
    logo: https://cartodb-libs.global.ssl.fastly.net/cartodbui/assets/1.0.0-assets.30/favicons/favicon.ico
    title: On llogar? On comprar?Habitatges de venda i lloguer a Catalunya
- desc: Map of parking prices at Amsterdam downtown
  keyw: amsterdam
  link: http://www.parkeren-amsterdam.com/parkeertarieven
  microlink:
    desc: Op méér dan 20 ParkBee parkeerlocaties in Amsterdam parkeer je al vanaf
      € 1,50 per uur en € 10,- per 24 uur. De parkeergarages zijn alleen toegankelijk
      met de Parkmobile app! Lees verder...
    image: https://www.parkeren-amsterdam.com/images/tips/parkeertip7.jpg
    logo: https://www.parkeren-amsterdam.com/images/favicon/android-chrome-192x192.png
    title: Parkeertarieven Amsterdam
- desc: California recovering of water reservoirs observed with a year difference
    of satellite imagery
  keyw: california
  link: http://www.sfgate.com/news/article/reservoirs-California-full-end-drought-shasta-lake-11048817.php
  microlink:
    desc: As the state moves out of the drought with a rainy season marked by ceaseless
      moisture-packed storms, the reservoirs are now brimming with water and a symbol
      of the state’s recovery.
    image: https://s.hdnux.com/photos/60/34/01/12697666/7/rawImage.jpg
    logo: https://www.sfgate.com/apple-touch-icon-152x152.png
    title: See California reservoirs fill up in these before-and-after images
rid: 586
---

repository: geoinquiets/rafagas

branch_name: refs/heads/gh-pages

gha_language: SCSS

gha_license_id: NOASSERTION

repo_name: geoinquiets/rafagas


text:
<b>THIS IS JUST A FORK TEST...</b>

PLEASE USE THE ORIGINAL ONE IN

https://github.com/katzer/cordova-plugin-background-mode

## License

This software is released under the [Apache 2.0 License][apache2_license].

Made with :yum: from Leipzig

? 2017 [appPlant GmbH][appplant] & [meshfields][meshfields]

[cordova]: https://cordova.apache.org
[CLI]: http://cordova.apache.org/docs/en/edge/guide_cli_index.md.html#The%20Command-line%20Interface
[NPM]: ???
[changelog]: CHANGELOG.md
[apache2_license]: http://opensource.org/licenses/Apache-2.0
[appplant]: http://appplant.de
[meshfields]: http://meshfields.de


text:
---
layout: post
title: Day 3
categories: [100daysofcode, node]
tags: [100daysofcode, yargs, node]
fullview: true
comments: true
---

## Today's Progress
I have refined my notes app and I have learned some of the methods of 'yargs'.

I have also managed to set up and configure this blog, however I had to set the post date of 'New Blog!' to the 20th to keep things in order.

## Thoughts

I am finding node packages a little intimidating at the moment.  I am also failing to see how I'm supposed to know that a package exists.  For example, if I didn't learn of the existence of yargs through a video I watched, how would I know about it and how would I know it's something I needed?

Time will tell, I presume!

### Link(s)

[yargs](https://www.npmjs.com/package/yargs)

[yargs .command()](https://github.com/yargs/yargs/blob/HEAD/docs/api.md#commandcmd-desc-module)


text:
# System setup

This page describes using the new, simpler, NPM-based [crosswalk-app-tools](/documentation/crosswalk-app-tools.html) to build and debug. The [deprecated instructions for make_apk.py](make_apk_docs.html) are still available.

These steps will enable you to develop Crosswalk applications to run on Android.

## Install tools
The following tools are needed on your development system to build Android apps. The same tools are needed on Linux and Windows. Download and install the appropriate version for your platform.

* [Java JDK](#Java)
* [Apache Ant](#Ant)
* [Android SDK](#Android)
* [NPM](#NPM)
* [Crosswalk App Tools](#Crosswalk)

### Install the Oracle Java Development Kit (JDK)

   Download and install the Oracle JDK: http://www.oracle.com/technetwork/java/javase/downloads/  (Java 7 and 8 are known to work)

### Install Apache Ant

   Download and install the Apache Ant build tool: http://www.apache.org/dist/ant/binaries/ (Version 1.9.3 is known to work)

### Install the Android SDK

   * Download and install Android Studio from http://developer.android.com/sdk/index.html.

   * Start the *SDK Manager*, from the command-line or inside Android Studio:

In Windows:
     ```cmdline
     > "SDK Manager.exe"
	 ```

In Linux:
	 ```cmdline
	 > android
	 ```

or

   * In the SDK Manager window, install the Platform tools, Build tools, and SDK Platform for the version(s) you are interested in:

### Install node.js and npm

   Download and install node.js for your platform: https://nodejs.org/en/download/.  This will also install npm.

### Install crosswalk-app-tools
From a cmd shell use npm to install crosswalk-app-tools

```cmdline
> npm install -g crosswalk-app-tools
```

   Note: If you are developing behind a proxy, see [this page](/documentation/npm-proxy-setup.html)

## Verify your environment
Check that you have installed the tools properly by running these commands:

Example on Windows:
```cmdline
C:\dev>crosswalk-app check android
  + Checking host setup for target android
  + Checking for android... C:\dev\android\sdk\tools\android.bat
  + Checking for ant... C:\dev\apache-ant-1.9.4\bin\ant
  + Checking for java... C:\ProgramData\Oracle\Java\javapath\java.exe
  + Checking for ANDROID_HOME... C:\dev\Android\
  ...
```
If any items report missing, add the directory to the program binaries in your PATH.
*Note:* Currently the tool reports an ERROR if lzma is not found. You can safely ignore this for now.
```cmdline
ERROR: Checking for lzma... null
```

## Next Steps
Your system is ready for Android development with Crosswalk.


text:
# HashParser
C++ Configuration files Parser

Prerequisite:
-gcc compiler
-cmake builder
-python 3
-linux-based OS (tested on Ubuntu) or Windows

Build instructions:
-run builder.py
-project demo executable will be built in ./build folder as an example
    and the library will be in ./lib FOR LINUX
-Visual Studio Project will be built in ./build/project folder FOR WINDOWS

Usage:
-build the project
-include the header (include/ConfigParser.hpp)
-link the library(from lib folder)
-instantiate a ConfigParser(namespace HashParser) with a .ini file path as an argument
-call the parse() method
-use GetConfigValue(std::string key) function with the desireds property as parameter which will return the value of it as a string

E.G.:
#include "../include/ConfigParser.hpp"
using namespace HashParser;

int main(int argc, char** argv){

    ConfigParser parser("../testToParse.ini"); /* or give it as commandLine argument */
    parser.parse();
    std::cout<<parser; /* print all the properties and their values */
    std::string value = parser.GetConfigValue("server");
    std::cout<<value;
    return 0;
}

Advice: Build the project as a static/dynamic library and use it in your projects

.ini file rules:
-provide valid property=value pairs (properties with no values are not accepted)
        e.g.: server="<IP_ADDRESS>"
-each value will be interpreted as string and the user has to convert it to its type: e.g. port=80, 80 has to be converted to int after the parsing is done.
-whitespaces: --all of the whitespaces(' ', '\t', '\r', etc.) will be ignored, EXCEPT when they are between double quotes.
                 e.g. server="   <IP_ADDRESS>"; the value of this will be exactly "   <IP_ADDRESS>"
                        port =     80        ; the value of this will be 80
-comments:  --each line which has its first character either ';' or '#' will be treated as a comment line
            --comments are not allowed to be on the same line as a property-value pair: e.g. port=80 #my port : this is not allowed
-property names are not case sensitive, so 'server' property is equal with 'SERVER'
-in case of double property definition, just the first value will be retained
-property separated with whitespace character will be concatanated: e.g.: some property="some value" will be someproperty="some value"

repository: AlexHas/HashParser

repo_name: AlexHas/HashParser


text:
awesome-angular-components
===

[![Awesome](https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg)](https://github.com/sindresorhus/awesome)

Yet another curated List of Angular 2+ Components & Libraries.

:arrow_double_down: - Low maintenance repository
:coffin: - Archived repository

## Table of Contents
- [Official resources](#official-resources)
- [Projects using Angular](#projects-using-angular)
- [UI Components](#ui-components)
  - [Calendar](#calendar)
  - [Form](#form)
  - [Table](#table)
  - [Tooltip](#tooltip)
  - [Notification](#notification)
  - [Loader](#loader)
  - [Overlay](#overlay)
  - [Parallax](#parallax)
  - [Icons](#icons)
  - [Menu](#menu)
  - [Minus Plus Input](#minus-plus-input)
  - [Carousel](#carousel)
  - [Charts](#charts)
  - [Time](#time)
  - [Map](#map)
  - [Audio / Video](#audio--video)
  - [Infinite Scroll](#infinite-scroll)
  - [Pull-to-refresh](#pull-to-refresh)
  - [Markdown](#markdown)
  - [PDF](#pdf)
  - [Tree](#tree)
  - [Social Sharing](#social-sharing)
  - [QR Code](#qr-code)
- [Services](#services)

## Official resources
- [angular/components](https://github.com/angular/components) - Component infrastructure and Material Design components for Angular

## Projects using Angular

- [crafted/crafted](https://github.com/crafted/crafted) - Utilities and components to build apps
- [ngxtools/ngx.tools](https://github.com/ngxtools/ngx.tools) - ⚡Discover any Angular module/library/schematic/package hosted on NPM⚡
- [oppia/oppia](https://github.com/oppia/oppia) - Tool for collaboratively building interactive lessons.

## Tools

- [Jefiozie/ngx-aws-deploy](https://github.com/Jefiozie/ngx-aws-deploy) - ☁🚀 Deploy your Angular app to Amazon S3 directly from the Angular CLI 🚀☁

## UI Components

### Calendar

*Display non-editable events in a Calendar*

- [mattlewis92/angular-calendar](https://github.com/mattlewis92/angular-calendar) - A flexible calendar component for angular 6.0+ that can display events on a month, week or day view.

### Form

*Let the user create & edit data*

#### Date Picker

*Date / datetime / time Picker*

- [akmittal/angular2-datepicker](https://github.com/akmittal/angular2-datepicker) - Angular2 date time picker
- [adibro500/ngx-adibro-datetime-picker](https://github.com/adibro500/ngx-adibro-datetime-picker)
- [albertnadal/ng2-daterange-picker](https://github.com/albertnadal/ng2-daterange-picker) - Light and simple date range picker component for Angular2 based on Material
- [asdftu/ng-time-picker](https://github.com/asdftu/ng-time-picker) - IOS style time-picker for angular
- [ashishgkwd/ngx-mat-daterange-picker](https://github.com/ashishgkwd/ngx-mat-daterange-picker) - Date range picker component based of Angular Material Calendar component and configurable date presets. Packaged using ng-packagr.
- [BhavinPatel04/ngx-datetime-range-picker](https://github.com/BhavinPatel04/ngx-datetime-range-picker) - Angular material datetime range picker with daily, weekly, monthly, quarterly & yearly levels
- [changhuixu/date-range-picker](https://github.com/changhuixu/date-range-picker) - An angular component for Date Range Picker using ng-bootstrap
- [cswarb/ngx-aircal](https://github.com/cswarb/ngx-aircal) - ngx-aircal is a modern, configurable and lightweight Angular date range picker.
- [dalelotts/angular-bootstrap-datetimepicker](https://github.com/dalelotts/angular-bootstrap-datetimepicker) - Native Angular date/time picker component styled by Twitter Bootstrap
- [DanielYKPan/date-time-picker](https://github.com/DanielYKPan/date-time-picker) - Angular Date Time Picker (Responsive Design)
- [djsiddz2/djsiddz-dtp](https://github.com/djsiddz2/djsiddz-dtp) - Date Time Picker module for your Angular 5 apps
- [fingerpich/jalali-angular-datepicker](https://github.com/fingerpich/jalali-angular-datepicker) - Highly configurable jalali (shamsi, khorshidi, persian) date picker built for Angular ( 2 or more ) applications
- [h2qutc/ngx-mat-datetime-picker](https://github.com/h2qutc/ngx-mat-datetime-picker) - Angular Material Datetime Picker
- [jkuri/ng-daterangepicker](https://github.com/jkuri/ng-daterangepicker) - Angular Date Range Picker inspired by PayPal's one
- [kekeh/angular-mydatepicker](https://github.com/kekeh/angular-mydatepicker) - Angular datepicker and date range picker 📅
- [kekeh/mydatepicker](https://github.com/kekeh/mydatepicker) - Angular 2+ date picker
- [kekeh/ngx-mydatepicker](https://github.com/kekeh/ngx-mydatepicker) - Angular 2+ attribute directive datepicker
- [martre3/ngx-dates-picker](https://github.com/martre3/ngx-dates-picker) - Angular 2+ datepicker component with no JQuery dependency.
- [NilavPatel/np-ui-time-picker-package](https://github.com/NilavPatel/np-ui-time-picker-package) - angular 8 custom time picker component
- :coffin: [nkalinov/ng2-datetime](https://github.com/nkalinov/ng2-datetime) - Datetime picker plugins wrapper for Angular2+
- [owsolutions/amazing-time-picker](https://github.com/owsolutions/amazing-time-picker) - Timepicker (Clock Picker) for Angular 2, Angular 4 and Angular 5, Angular 6, Angular 7 - Compatible with Angular Material
- [qqnc/ngx-daterangepicker](https://github.com/qqnc/ngx-daterangepicker) - the date range picker mimic from daterangepicker.js in Angular 2+/6/7 way
- [redplane/ngx-datetime-picker](https://github.com/redplane/ngx-datetime-picker) - Collection of tools which can be used in Angular 4
- [RenovoSolutions/ngx-datetimepicker](https://github.com/RenovoSolutions/ngx-datetimepicker) - An Angular component for a customizable date and time picker
- [RezaT1994/ir-datetimepicker](https://github.com/RezaT1994/ir-datetimepicker) - Angular 6 persian datetime picker
- [yannickebongue/ngx-material-time-select](https://github.com/yannickebongue/ngx-material-time-select) - The time select allows users to enter a time either through text input, or by choosing a time from the select panel
- [vlio20/angular-datepicker](https://github.com/vlio20/angular-datepicker) - Highly configurable date picker built for Angular applications

#### Emoji Picker
- [TypeCtrl/ngx-emoji-mart](https://github.com/TypeCtrl/ngx-emoji-mart) - Customizable Slack-like emoji picker for Angular

#### Phone Number Input Formatter

#### Generator

#### Select

#### Slider

- [Bogdan1975/ng2-slider-component](https://github.com/Bogdan1975/ng2-slider-component) - Angular 2 slider component

#### Drag and Drop

#### Autocomplete

*Autosuggest / autocomplete / typeahead*

#### Type Select

*Let the user select a tag / something while typing*

#### Color Picker

- :warning: [Alberplz/angular2-color-picker](https://github.com/Alberplz/angular2-color-picker) - Angular 2 Color Picker Directive, no dependences required.
- [AndyMeps/ng2-color-picker](https://github.com/AndyMeps/ng2-color-picker) - Simple color picker for Angular 2
- [zefoy/ngx-color-picker](https://github.com/zefoy/ngx-color-picker) - Color picker widget for the Angular (version 2 and newer)

#### Switch

*Switch / on/off toggle / checkbox*

#### Masked Input

#### Rich Text Editing

#### Image Manipulation

*Edit images*

*Display images*

#### Video Manipulation

#### File Upload

#### Context Menu

#### Miscellaneous

#### Wizard

#### CSV

#### Comment System

### Table

*Tables / data grids*

- [ag-grid/ag-grid](https://github.com/ag-grid/ag-grid) - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components
- :arrow_double_down: [akveo/ng2-smart-table](https://github.com/akveo/ng2-smart-table) - Angular Smart Data Table component
- [marinantonio/angular-mat-table-crud](https://github.com/marinantonio/angular-mat-table-crud) - CRUD operations for the Angular Material Table
- :arrow_double_down: [jdjuan/ng-notyf](https://github.com/jdjuan/ng-notyf) - 👻 A dead simple notification library for Angular 👻
- :arrow_double_down: [mariuszfoltak/angular2-datatable](https://github.com/mariuszfoltak/angular2-datatable) - DataTable - Simple table component with sorting and pagination for Angular2
- [ssuperczynski/ngx-easy-table](https://github.com/ssuperczynski/ngx-easy-table) - The Easiest Angular Table. 8.8kb gziped! 60fps! Tree-shakeable. 53 features and growing!
- [swimlane/ngx-datatable](https://github.com/swimlane/ngx-datatable) - ✨ A feature-rich yet lightweight data-table crafted for Angular
- :arrow_double_down: [valor-software/ng2-handsontable](https://github.com/valor-software/ng2-handsontable) - Angular 2 directive for Handsontable
- :arrow_double_down: [valor-software/ng2-table](https://github.com/valor-software/ng2-table) - Simple table extension with sorting, filtering, paging... for Angular2 apps

### Tooltip

*Tooltips / popovers*

- [cloukit/tooltip](https://github.com/cloukit/tooltip) - A simple tooltip component
- [drozhzhin-n-e/ng2-tooltip-directive](https://github.com/drozhzhin-n-e/ng2-tooltip-directive) - The tooltip is a pop-up tip that appears when you hover over an item or click on it.
- [farengeyt451/ngx-tippy-wrapper](https://github.com/farengeyt451/ngx-tippy-wrapper) - Angular 8+ wrapper for Tippy.js
- [gustafguner/angular-tooltip](https://github.com/gustafguner/angular-tooltip) - An easy-to-use Angular (6+) component for displaying tooltips
- [joejordanbrown/popover](https://github.com/joejordanbrown/popover) - Angular CDK Popover, no default style, examples using @angular/material
- :coffin: [pleerock/ngx-tooltip](https://github.com/pleerock/ngx-tooltip) - Simple tooltip control for your angular2 applications using bootstrap3. Does not depend of jquery.
- [MrFrankel/ngx-popper](https://github.com/MrFrankel/ngx-popper) - An angular wrapper for popper.js, great for tooltips and positioning popping elements
- [tamilarasu100/ngx-smart-popper](https://github.com/tamilarasu100/ngx-smart-popper) - ngx-smart-popper
- [vitaliy-bobrov/angular-popper](https://github.com/vitaliy-bobrov/angular-popper) - Popover component for Angular 2+ based on Popper.js library.

### Notification

*Toaster / snackbar — Notify the user with a modeless temporary little popup*

- :arrow_double_down: [akserg/ng2-toasty](https://github.com/akserg/ng2-toasty) - Angular2 Toasty component shows growl-style alerts and messages for your app.
- :arrow_double_down: [alexcastillo/ng2-notifications](https://github.com/alexcastillo/ng2-notifications) - Angular 2 Component for Native Push Notifications [Looking for New Maintainers]
- :arrow_double_down: [artemsky/ng-snotify](https://github.com/artemsky/ng-snotify) - Angular 2+ Notification Center
- [Augustpi/angular2-notifier](https://github.com/Augustpi/angular2-notifier) - Angular notifier
- :arrow_double_down: [cloukit/notification](https://github.com/cloukit/notification) - Show success, error, info and warn notifications on the page
- :arrow_double_down: [cornflourblue/angular-8-alert-notifications](https://github.com/cornflourblue/angular-8-alert-notifications) - Angular 8 - Alert (Toaster) Notifications
- [BenevidesLecontes/ngx-bootstrap-alert-notification](https://github.com/BenevidesLecontes/ngx-bootstrap-alert-notification) - Angular bootstrap alerts as notifications
- [dank/ngx-snackbar](https://github.com/dank/ngx-snackbar) - Snackbar / Toast notifications for Angular
- [dominique-mueller/angular-notifier](https://github.com/dominique-mueller/angular-notifier) - A well designed, fully animated, highly customizable, and easy-to-use notification library for your Angular application.
- [flauc/angular2-notifications](https://github.com/flauc/angular2-notifications) - A light and easy to use notifications library for Angular.
- [JanMalch/ngx-mat-sw-update](https://github.com/JanMalch/ngx-mat-sw-update) - Angular library to setup a notification for Service Worker updates.
- [LenonLopez/angular-notice](https://github.com/LenonLopez/angular-notice) - Native notifications for your Angular application using the Web Notification API. Works on chrome, firefox, edge, and safari.
- :arrow_double_down: [ngrx/notify](https://github.com/ngrx/notify) - Web Notifications Powered by RxJS for Angular
- :arrow_double_down: [ng-semantic-toast](https://github.com/ojji/ng-semantic-toast) - Angular toast notification module built with Semantic UI.
- [notiflix/Notiflix-Angular](https://github.com/notiflix/Notiflix-Angular) - Notiflix is a JavaScript library for client-side non-blocking notifications, popup boxes, loading indicators, and more to that makes your Angular projects much better.
- [pascaliske/ngx-notifications](https://github.com/pascaliske/ngx-notifications) - Notification module for Angular v6+.
- [scttcper/ngx-toastr](https://github.com/scttcper/ngx-toastr) - 🍞 Angular Toastr
- [Stabzs/Angular2-Toaster](https://github.com/stabzs/Angular2-Toaster) - Angular2-toaster is an asynchronous, non-blocking Angular Toaster Notification library
- :arrow_double_down: [stanvanheumen/ngx-notifications](https://github.com/stanvanheumen/ngx-notifications) - A simple library that allows you to notify your users in your Angular 5+ app.
- :arrow_double_down: [vanthaiunghoa/Angular2-Toaster](https://github.com/vanthaiunghoa/Angular2-Toaster) - Angular2-toaster is an asynchronous, non-blocking Angular Toaster Notification library

### Loader

*Loaders / spinners / progress bars — Let the user know that something is loading*

- :arrow_double_down: [akserg/ng2-slim-loading-bar](https://github.com/akserg/ng2-slim-loading-bar) - Angular 2 component shows slim loading bar at the top of the page.
- [devyumao/angular2-busy](https://github.com/devyumao/angular2-busy) - Show busy/loading indicators on any promise, or on any Observable's subscription.
- [moff/angular2-ladda](https://github.com/moff/angular2-ladda) - Angular 2 Ladda module
- [MurhafSousli/ngx-progressbar](https://github.com/MurhafSousli/ngx-progressbar) - Angular progress bar ☄
- [WoltersKluwerPL/ng-spin-kit](https://github.com/WoltersKluwerPL/ng-spin-kit) - SpinKit (http://tobiasahlin.com/spinkit/) spinners for Angular

### Overlay

*Overlay / modal / alert / dialog / lightbox / popup*

- [biig-io/ngx-smart-modal](https://github.com/biig-io/ngx-smart-modal) - Modal/Dialog component crafted for Angular
- :arrow_double_down: [dougludlow/ng2-bs3-modal](https://github.com/dougludlow/ng2-bs3-modal) - Angular Bootstrap 3 Modal Component
- [mattlewis92/angular-confirmation-popover](https://github.com/mattlewis92/angular-confirmation-popover) - An angular 5.0+ bootstrap confirmation popover
- :arrow_double_down: [shlomiassaf/ngx-modialog](https://github.com/shlomiassaf/ngx-modialog) - Modal / Dialog for Angular

### Parallax

- [ng2-ui/parallax-scroll](https://github.com/ng2-ui/parallax-scroll) - Angular2 parallax background scroll directive

### Icons

- [ant-design/ant-design-icons](https://github.com/ant-design/ant-design-icons) - ⭐ Ant Design SVG Icons
- [czeckd/angular-svg-icon](https://github.com/czeckd/angular-svg-icon) - Angular component for inlining SVGs allowing them to be easily styled with CSS.
- [FortAwesome/angular-fontawesome](https://github.com/FortAwesome/angular-fontawesome) - Official Angular component for Font Awesome 5

### Menu

- [arkon/ng-sidebar](https://github.com/arkon/ng-sidebar) - Angular sidebar component.
- [isaacplmann/ngx-contextmenu](https://github.com/isaacplmann/ngx-contextmenu) - An Angular component to show a context menu on an arbitrary component
- [MurhafSousli/ngx-gallery](https://github.com/MurhafSousli/ngx-gallery) - Angular Gallery, Carousel and Lightbox

### Minus Plus Input

### Carousel

- [bfwg/ngx-drag-scroll](https://github.com/bfwg/ngx-drag-scroll) - A lightweight responsive Angular carousel library
- [sheikalthaf/ngu-carousel](https://github.com/sheikalthaf/ngu-carousel) - Angular Universal carousel
- [zefoy/ngx-swiper-wrapper](https://github.com/zefoy/ngx-swiper-wrapper) - Angular wrapper library for Swiper

### Charts

- [carbon-design-system/carbon-charts](https://github.com/carbon-design-system/carbon-charts) - 📊 📈 Robust dataviz framework implemented using D3 & typescript
- [gevgeny/angular2-highcharts](https://github.com/gevgeny/angular2-highcharts) - 📊 📈 Highcharts for your Angular project
- [swimlane/ngx-charts](https://github.com/swimlane/ngx-charts) - 📊 Declarative Charting Framework for Angular

### Time

*Display time / date / age*

- [AndrewPoyntz/time-ago-pipe](https://github.com/AndrewPoyntz/time-ago-pipe) - An Angular pipe for converting a date string into a time ago
- [ihym/ngx-timeago](https://github.com/ihym/ngx-timeago) - ⏰ Live updating timestamps in Angular 6+

### Map

- [ng2-ui/map](https://github.com/ng2-ui/map) - Angular Google Maps Directives
- [SebastianM/angular-google-maps](https://github.com/SebastianM/angular-google-maps) - Angular 2+ Google Maps Components

### Audio / Video

- [orizens/ngx-youtube-player](https://github.com/orizens/ngx-youtube-player) - (ngx) A youtube component wrapped with Angular (typescript)

### Infinite Scroll

- [ashwin-sureshkumar/angular-infinite-scroller](https://github.com/ashwin-sureshkumar/angular-infinite-scroller)
- [orizens/ngx-infinite-scroll](https://github.com/orizens/ngx-infinite-scroll) - Infinite Scroll Directive for Angular

### Pull-to-refresh

### Markdown

- [dimpu/ngx-md](https://github.com/dimpu/ngx-md) - Angular(ngx) directive for parsing markdown content in your web application.
- [jfcere/ngx-markdown](https://github.com/jfcere/ngx-markdown) - Angular markdown component/directive/pipe/service to parse static, dynamic or remote content to html with syntax highlight
- [yisraelx/ngx-showdown](https://github.com/yisraelx/ngx-showdown) - Angular (>=2) integration for Showdown

### PDF

- [VadimDez/ng2-pdf-viewer](https://github.com/VadimDez/ng2-pdf-viewer) - 📄 PDF Viewer Component for Angular 5+

### Tree
- [500tech/angular-tree-component](https://github.com/500tech/angular-tree-component) - A simple yet powerful tree component for Angular (>=2)
- [valor-software/ng2-tree](https://github.com/valor-software/ng2-tree) - Angular tree component

### Social Sharing

- [MurhafSousli/ngx-sharebuttons](https://github.com/MurhafSousli/ngx-sharebuttons) - Angular Share Buttons ☂

### QR Code

- [armanfatahi/ngx-qr](https://github.com/armanfatahi/ngx-qr) - Angular 8 qr scanner
- [Cordobo/angularx-qrcode](https://github.com/Cordobo/angularx-qrcode) - Angular4/5/6/7/8/9 QRCode generator Component library for QR Codes (Quick Response) with AOT support based on qrcodejs
- [werthdavid/ngx-kjua](https://github.com/werthdavid/ngx-kjua) - Angular QR-Code generator component using kjua.
- [zxing-js/ngx-scanner](https://github.com/zxing-js/ngx-scanner) - Angular (2+) QR code, Barcode, DataMatrix, scanner component using ZXing.

### Search

### Tabs

### Canvas

### Link Preview

- [angular-material-extensions/link-preview](https://github.com/angular-material-extensions/link-preview) - Angular open source UI library to preview web links
- [btxtiger/ngx-link-preview](https://github.com/btxtiger/ngx-link-preview) - The Open Graph link preview component for Angular

### Tour

### Miscellaneous
- [angulartics/angulartics2](https://github.com/angulartics/angulartics2) - Vendor-agnostic analytics for Angular2 applications.
- [FrancescoBorzi/ngx-duration-picker](https://github.com/FrancescoBorzi/ngx-duration-picker) - Angular component for ISO_8601 durations
- [NiyazNz/ng-favicon](https://github.com/NiyazNz/ng-favicon) - A simple angular service to change favicon or display unread messages and notifications on top of favicon

## UI Layout

*Layout for the overall / main view*

## Frameworks

### Responsive

*Set of components + responsive layout system*

### Mobile

*UI frameworks for mobile*

*Set of components for mobile*

### Component Collections

*Set of components without layout system*

### Admin Template

*Set of admin template*

- [akveo/ngx-admin](https://github.com/akveo/ngx-admin) - Customizable admin dashboard template based on Angular 8+

### Server-side rendering

### Static website generator

### Other

## UI Utilities

## Services

- [brtnshrdr/angular2-hotkeys](https://github.com/brtnshrdr/angular2-hotkeys) - Keyboard shortcuts for Angular 2 apps


text:
Portability
===========

### Brainfuck Commands
From wikipedia[1] and implemented as follows:

| \> | 	increment the data pointer (to point to the next cell to the right).

| \< |	decrement the data pointer (to point to the next cell to the left).

| \+ |	increment (increase by one) the byte at the data pointer.

| \- |	decrement (decrease by one) the byte at the data pointer.

| \. |	output the byte at the data pointer.

| \, |	accept one byte of input, storing its value in the byte at the data pointer.

| \[ |	if the byte at the data pointer is zero, then instead of moving the instruction pointer forward to the next command, jump it forward to the command after the matching ] command.

| \] |	if the byte at the data pointer is nonzero, then instead of moving the instruction pointer forward to the next command, jump it back to the command after the matching [ command.

Unless the '-d' or '--debug' flag is turned on, all other characters are ignored by the interpreter.

### Debugging Commands
Only enabled when the '-d' or '--debug' flag is set except when in interactive mode where 'q' quits the program and 'c' clears the screen.

| q |	Exit the interpretor with the exit code zero.

| d |	Dumps all memory that has a value that isn't zero, treats data as a char.

| D |	Dumps all memory that has a value that isnt zero, treats data as an int.

| C |	Clears the memory and returns the memory pointer to zero.

### Cells
Each cell is the size of an int, being OS specific.
If the cell's value is greater (or absolute less than) its max size, the cell's number wraps around which is consistant with a typical C interger.

### Array
By default, the memory is a dynamically allocated, zeroed-out, array of ints with 10,000 members.
Memory can be expanded and shortened via the '-m <nmemb>' or '--memory <nmemb>' arg.
When the program goes behond the bounds set to the right, 10 more members are dynamically allocated and set to zero. If the memory cannot be increased, an error is displayed.
When the program tries to go behond the bounds to the left, the command is ignored and the memory pointer stays at zero. An error will also be displayed.

### End-of-file Behavior
When a brainfuck program uses the ',' command, the intperpretor uses getchar() which returns EOF (or -1) when it reaches the end of file or has an error.

### Square Brackets
If the brainfuck program is missing any bracket, the interpretor will warn the user and halt, unless the missing brace is a '[' and the memory pointer is pointing to zero, in that case the ']' is instead ignored.

### Conforming to
- "nice" (Portable Brainfuck)[2]

### Citations
[1] https://en.wikipedia.org/wiki/Brainfuck

[2] http://www.muppetlabs.com/~breadbox/bf/standards.html


text:
---
name: Add MicroByte
about: This template could be used to create an issue regarding adding a MicroByte.
title: ''
labels: ''
assignees: ''

---

**MicroByte Title:** <title>

**Domain:** <add what domains this MicroByte will cover>

**Scope of learning for learners:** <give a brief description of what learners will be able to learn from the MicroByte>

**Activities:** <give a brief idea about what sort of activities this MicroByte will contain>

repository: Crio-Bytes/Security

branch_name: refs/heads/main

repo_name: Crio-Bytes/Security


text:
## ignite kernel import

Import an uncompressed kernel image for VM use

### Synopsis

Import a new kernel for VMs. This command takes in an existing uncompressed
kernel (vmlinux) file. Used in conjunction with "export" (not yet implemented).

```
ignite kernel import <path> [flags]
```

### Options

```
  -h, --help          help for import
  -n, --name string   Specify the name
```

### Options inherited from parent commands

```
  -q, --quiet   The quiet mode allows for machine-parsable output, by printing only IDs
```

### SEE ALSO

* [ignite kernel](ignite_kernel.md)	 - Manage VM kernels

###### Auto generated by spf13/cobra on 10-Jun-2019


text:
# DynamoDB Storage provider
This is a simple abstraction layer between Amazon's DynamoDB and our local storage interface.

### Configuration
To run the tests, create a .env file in the dynamodb directory with the following vars:

```
AWS_ACCESS=my-access-id
AWS_SECRET=my-access-secret
AWS_REGION=us-east-1
DYNAMO_DB_TABLE=my_test_table
```

### Running Local
Amazon provides a convenient java executable for running a mock DynamoDB server locally. Read all
about it here:
http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Tools.DynamoDBLocal.html.

repository: kyani-inc/storage

gha_language: Go

repo_name: kyani-inc/storage


text:
# OpenShift Pipelines Tutorial

Welcome to the OpenShift Pipelines tutorial!

OpenShift Pipelines is a cloud-native, continuous integration and delivery (CI/CD) solution for building pipelines using [Tekton](https://tekton.dev). Tekton is a flexible, Kubernetes-native, open-source CI/CD framework that enables automating deployments across multiple platforms (Kubernetes, serverless, VMs, etc) by abstracting away the underlying details.

OpenShift Pipelines features:
  * Standard CI/CD pipeline definition based on Tekton
  * Build images with Kubernetes tools such as S2I, Buildah, Buildpacks, Kaniko, etc
  * Deploy applications to multiple platforms such as Kubernetes, serverless and VMs
  * Easy to extend and integrate with existing tools
  * Scale pipelines on-demand
  * Portable across any Kubernetes platform
  * Designed for microservices and decentralized teams
  * Integrated with the OpenShift Developer Console

This tutorial walks you through pipeline concepts and how to create and run a simple pipeline for building and deploying a containerized app on OpenShift, and in this tutorial, we will use `Triggers` to handle a real GitHub webhook request to kickoff a PipelineRun.

In this tutorial you will:
* [Learn about Tekton concepts](#concepts)
* [Install OpenShift Pipelines](#install-openshift-pipelines)
* [Deploy a Sample Application](#deploy-sample-application)
* [Install Tasks](#install-tasks)
* [Create a Pipeline](#create-pipeline)
* [Trigger a Pipeline](#trigger-pipeline)

## Prerequisites

You need an OpenShift 4 cluster in order to complete this tutorial. If you don't have an existing cluster, go to http://try.openshift.com and register for free in order to get an OpenShift 4 cluster up and running on AWS within minutes.

You will also use the Tekton CLI (`tkn`) through out this tutorial. Download the Tekton CLI by following [instructions](https://github.com/tektoncd/cli#installing-tkn) available on the CLI GitHub repository.

## Concepts

Tekton defines a number of [Kubernetes custom resources](https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/) as building blocks in order to standardize pipeline concepts and provide a terminology that is consistent across CI/CD solutions. These custom resources are an extension of the Kubernetes API that let users create and interact with these objects using `kubectl` and other Kubernetes tools.

The custom resources needed to define a pipeline are listed below:
* `Task`: a reusable, loosely coupled number of steps that perform a specific task (e.g. building a container image)
* `Pipeline`: the definition of the pipeline and the `Tasks` that it should perform
* `TaskRun`: the execution and result of running an instance of task
* `PipelineRun`: the execution and result of running an instance of pipeline, which includes a number of `TaskRuns`

![Tekton Architecture](docs/images/tekton-architecture.svg)

In short, in order to create a pipeline, one does the following:
* Create custom or install [existing](https://github.com/tektoncd/catalog) reusable `Tasks`
* Create a `Pipeline` and `PipelineResources` to define your application's delivery pipeline
* Create a `PersistentVolumeClaim` to provide the volume/filesystem for pipeline execution or provide a `VolumeClaimTemplate` which creates a `PersistentVolumeClaim`
* Create a `PipelineRun` to instantiate and invoke the pipeline

For further details on pipeline concepts, refer to the [Tekton documentation](https://github.com/tektoncd/pipeline/tree/master/docs#learn-more) that provides an excellent guide for understanding various parameters and attributes available for defining pipelines.

The Tekton API enables functionality to be separated from configuration (e.g.
[Pipelines](https://github.com/tektoncd/pipeline/blob/master/docs/pipelines.md)
vs
[PipelineRuns](https://github.com/tektoncd/pipeline/blob/master/docs/pipelineruns.md))
such that steps can be reusable.

Triggers extends the Tekton
architecture with the following CRDs:

- [`TriggerTemplate`](https://github.com/tektoncd/triggers/blob/master/docs/triggertemplates.md) - Templates resources to be
  created (e.g. Create PipelineResources and PipelineRun that uses them)
- [`TriggerBinding`](https://github.com/tektoncd/triggers/blob/master/docs/triggerbindings.md) - Validates events and extracts
  payload fields
- [`Trigger`](https://github.com/tektoncd/triggers/blob/master/docs/triggers.md) - combines TriggerTemplate, TriggerBindings and interceptors.
- [`EventListener`](https://github.com/tektoncd/triggers/blob/master/docs/eventlisteners.md) -  provides an
  [addressable](https://github.com/knative/eventing/blob/master/docs/spec/interfaces.md)
  endpoint (the event sink). `Trigger` is referenced inside the EventListener Spec. It uses the extracted event parameters from each
  `TriggerBinding` (and any supplied static parameters) to create the resources
  specified in the corresponding `TriggerTemplate`. It also optionally allows an
  external service to pre-process the event payload via the `interceptor` field.
- [`ClusterTriggerBinding`](https://github.com/tektoncd/triggers/blob/master/docs/clustertriggerbindings.md) - A cluster-scoped
  TriggerBinding

Using `tektoncd/triggers` in conjunction with `tektoncd/pipeline` enables you to
easily create full-fledged CI/CD systems where the execution is defined
**entirely** through Kubernetes resources.

You can learn more about `triggers` by checking out the [docs](https://github.com/tektoncd/triggers/blob/master/docs/README.md)

In the following sections, you will go through each of the above steps to define and invoke a pipeline.

## Install OpenShift Pipelines

OpenShift Pipelines is provided as an add-on on top of OpenShift that can be installed via an operator available in the OpenShift OperatorHub. Follow [these instructions](install-operator.md) in order to install OpenShift Pipelines on OpenShift via the OperatorHub.

![OpenShift OperatorHub](docs/images/operatorhub.png)

## Deploy Sample Application

Create a project for the sample application that you will be using in this tutorial:

```bash
$ oc new-project pipelines-tutorial
```

OpenShift Pipelines automatically adds and configures a `ServiceAccount` named `pipeline` that has sufficient permissions to build and push an image. This
service account will be used later in the tutorial.

Run the following command to see the `pipeline` service account:

```bash
$ oc get serviceaccount pipeline
```

You will use the simple application during this tutorial, which has a [frontend](https://github.com/openshift/pipelines-vote-ui) and [backend](https://github.com/openshift/pipelines-vote-api)

You can also deploy the same applications by applying the artifacts available in k8s directory of the respective repo

If you deploy the application directly, you should be able to see the deployment in the OpenShift Web Console by switching over to the **Developer** perspective of the OpenShift Web Console. Change from **Administrator** to **Developer** from the drop down as shown below:

![Developer Perspective](docs/images/developer.png)

Make sure you are on the `pipelines-tutorial` project by selecting it from the **Project** dropdown menu. Either search for `pipelines-tutorial` in the search bar or scroll down until you find `pipelines-tutorial` and click on the name of your project.

![Projects](docs/images/projects.png)

<!--
On the **Topology** view of the **Developer** perspective, you will be able to see the resources you just created.

![Projects](docs/images/application-deployed.png)
-->

## Install Tasks

Tasks consist of a number of steps that are executed sequentially. Tasks are executed/run by creating TaskRuns. A TaskRun will schedule a Pod. Each step is executed in a separate container within the same pod. They can also have inputs and outputs in order to interact with other tasks in the pipeline.

Here is an example of a Maven task for building a Maven-based Java application:

```yaml
apiVersion: tekton.dev/v1beta1
kind: Task
metadata:
  name: maven-build
spec:
  workspaces:
   -name: filedrop
  steps:
  - name: build
    image: maven:3.6.0-jdk-8-slim
    command:
    - /usr/bin/mvn
    args:
    - install
```

When a task starts running, it starts a pod and runs each step sequentially in a separate container on the same pod. This task happens to have a single step, but tasks can have multiple steps, and, since they run within the same pod, they have access to the same volumes in order to cache files, access configmaps, secrets, etc. You can specify volume using workspace. It is recommended that Tasks uses at most one writeable Workspace. Workspace can be secret, pvc, config or emptyDir.

Note that only the requirement for a git repository is declared on the task and not a specific git repository to be used. That allows tasks to be reusable for multiple pipelines and purposes. You can find more examples of reusable tasks in the [Tekton Catalog](https://github.com/tektoncd/catalog) and [OpenShift Catalog](https://github.com/openshift/pipelines-catalog) repositories.

Install the `apply-manifests` and `update-deployment` tasks from the repository using `oc` or `kubectl`, which you will need for creating a pipeline in the next section:

```bash
$ oc create -f https://raw.githubusercontent.com/openshift/pipelines-tutorial/master/01_pipeline/01_apply_manifest_task.yaml

$ oc create -f https://raw.githubusercontent.com/openshift/pipelines-tutorial/master/01_pipeline/02_update_deployment_task.yaml
```

You can take a look at the tasks you created using the [Tekton CLI](https://github.com/tektoncd/cli/releases):

```
$ tkn task ls

NAME                AGE
apply-manifests     10 seconds ago
update-deployment   4 seconds ago
```

We will be using `buildah` clusterTasks, which gets installed along with Operator. Operator installs few ClusterTask which you can see.

```bash
$ tkn clustertasks ls
NAME                       DESCRIPTION   AGE
buildah                                  1 day ago
buildah-v0-14-3                          1 day ago
git-clone                                1 day ago
s2i-php                                  1 day ago
tkn                                      1 day ago
```

## Create Pipeline

A pipeline defines a number of tasks that should be executed and how they interact with each other via their inputs and outputs.

In this tutorial, you will create a pipeline that takes the source code of the application from GitHub and then builds and deploys it on OpenShift.

![Pipeline Diagram](docs/images/pipeline-diagram.png)

Here is the YAML file that represents the above pipeline:

```yaml
apiVersion: tekton.dev/v1beta1
kind: Pipeline
metadata:
  name: build-and-deploy
spec:
  workspaces:
  - name: shared-workspace
  params:
  - name: deployment-name
    type: string
    description: name of the deployment to be patched
  - name: git-url
    type: string
    description: url of the git repo for the code of deployment
  - name: git-revision
    type: string
    description: revision to be used from repo of the code for deployment
    default: master
  - name: IMAGE
    type: string
    description: image to be build from the code
  tasks:
  - name: fetch-repository
    taskRef:
      name: git-clone
      kind: ClusterTask
    workspaces:
    - name: output
      workspace: shared-workspace
    params:
    - name: url
      value: $(params.git-url)
    - name: subdirectory
      value: ""
    - name: deleteExisting
      value: "true"
    - name: revision
      value: $(params.git-revision)
  - name: build-image
    taskRef:
      name: buildah
      kind: ClusterTask
    params:
    - name: IMAGE
      value: $(params.IMAGE)
    workspaces:
    - name: source
      workspace: shared-workspace
    runAfter:
    - fetch-repository
  - name: apply-manifests
    taskRef:
      name: apply-manifests
    workspaces:
    - name: source
      workspace: shared-workspace
    runAfter:
    - build-image
  - name: update-deployment
    taskRef:
      name: update-deployment
    params:
    - name: deployment
      value: $(params.deployment-name)
    - name: IMAGE
      value: $(params.IMAGE)
    runAfter:
    - apply-manifests
```
Once you deploy the pipelines, you should be able to visualize pipeline flow  in the OpenShift Web Console by switching over to the **Developer** perspective of the OpenShift Web Console. select pipeline tab, select project as `pipelines-tutorial` and click on pipeline `build-and-deploy`

![Pipeline-view](docs/images/pipeline-view.png)

This pipeline helps you to build and deploy backend/frontend, by configuring right resources to pipeline.

Pipeline Steps:

  1. Clones the source code of the application from a git repository by referring (`git-url` and `git-revision` param)
  2. Builds the container image of application using the `buildah` clustertask
  that uses [Buildah](https://buildah.io/) to build the image
  3. The application image is pushed to an image registry by refering (`image` param)
  4. The new application image is deployed on OpenShift using the `apply-manifests` and `update-deployment` tasks.

You might have noticed that there are no references to the git
repository or the image registry it will be pushed to in pipeline. That's because pipeline in Tekton
are designed to be generic and re-usable across environments and stages through
the application's lifecycle. Pipelines abstract away the specifics of the git
source repository and image to be produced as `PipelineResources` or `Params`. When triggering a
pipeline, you can provide different git repositories and image registries to be
used during pipeline execution. Be patient! You will do that in a little bit in
the next section.

The execution order of task is determined by dependencies that are defined between the tasks via inputs and outputs as well as explicit orders that are defined via `runAfter`.

`workspaces` field allow you to specify one or more volumes that each Task in the Pipeline requires during execution. You specify one or more Workspaces in the `workspaces` field.

Create the pipeline by running the following:

```bash
$ oc create -f https://raw.githubusercontent.com/openshift/pipelines-tutorial/master/01_pipeline/04_pipeline.yaml
```

Alternatively, in the OpenShift Web Console, you can click on the **+** at the top right of the screen while you are in the **pipelines-tutorial** project:

![OpenShift Console - Import Yaml](docs/images/console-import-yaml.png)

Upon creating the pipeline via the web console, you will be taken to a **Pipeline Details** page that gives an overview of the pipeline you created.
<!-- >

![OpenShift Console - Pipeline Details](docs/images/pipeline-details.png)

-->

Check the list of pipelines you have created using the CLI:

```
$ tkn pipeline ls

NAME               AGE            LAST RUN   STARTED   DURATION   STATUS
build-and-deploy   1 minute ago   ---        ---       ---        ---
```

## Trigger Pipeline

Now that the pipeline is created, you can trigger it to execute the tasks
specified in the pipeline.

> **Note** :-
>
>If you are not into the `pipelines-tutorial` namespace, and using another namespace for the tutorial steps, please make sure you update the
frontend and backend image resource to the correct url with your namespace name like so :
>
>`image-registry.openshift-image-registry.svc:5000/<namespace-name>/pipelines-vote-api:latest`

A `PipelineRun` is how you can start a pipeline and tie it to the persistentVolumeClaim and params that should be used for this specific invocation.

Lets start a pipeline to build and deploy backend application using `tkn`:

```bash
$ tkn pipeline start build-and-deploy \
    -w name=shared-workspace,volumeClaimTemplateFile=https://raw.githubusercontent.com/openshift/pipelines-tutorial/master/01_pipeline/03_persistent_volume_claim.yaml \
    -p deployment-name=pipelines-vote-api \
    -p git-url=https://github.com/openshift/pipelines-vote-api.git \
    -p IMAGE=image-registry.openshift-image-registry.svc:5000/pipelines-tutorial/pipelines-vote-api \
    --use-param-defaults

Pipelinerun started: build-and-deploy-run-z2rz8

In order to track the pipelinerun progress run:
tkn pipelinerun logs build-and-deploy-run-z2rz8 -f -n pipelines-tutorial
```

Similarly, start a pipeline to build and deploy frontend application:

```bash
$ tkn pipeline start build-and-deploy \
    -w name=shared-workspace,volumeClaimTemplateFile=https://raw.githubusercontent.com/openshift/pipelines-tutorial/master/01_pipeline/03_persistent_volume_claim.yaml \
    -p deployment-name=pipelines-vote-ui \
    -p git-url=https://github.com/openshift/pipelines-vote-ui.git \
    -p IMAGE=image-registry.openshift-image-registry.svc:5000/pipelines-tutorial/pipelines-vote-ui \
    --use-param-defaults

Pipelinerun started: build-and-deploy-run-xy7rw

In order to track the pipelinerun progress run:
tkn pipelinerun logs build-and-deploy-run-xy7rw -f -n pipelines-tutorial
```
As soon as you start the `build-and-deploy` pipeline, a pipelinerun will be instantiated and pods will be created to execute the tasks that are defined in the pipeline.

```bash
$ tkn pipeline list
NAME               AGE             LAST RUN                     STARTED          DURATION   STATUS
build-and-deploy   6 minutes ago   build-and-deploy-run-xy7rw   36 seconds ago   ---        Running
```

Above we have started `build-and-deploy` pipeline, with relevant pipeline resources to deploy backend/frontend application using single pipeline

```bash
$ tkn pipelinerun ls
NAME                         STARTED         DURATION     STATUS
build-and-deploy-run-xy7rw   36 seconds ago   ---          Running
build-and-deploy-run-z2rz8   40 seconds ago   ---          Running
```

Check out the logs of the pipelinerun as it runs using the `tkn pipeline logs` command which interactively allows you to pick the pipelinerun of your interest and inspect the logs:

```
$ tkn pipeline logs -f
? Select pipelinerun:  [Use arrows to move, type to filter]
> build-and-deploy-run-xy7rw started 36 seconds ago
  build-and-deploy-run-z2rz8 started 40 seconds ago
```

After a few minutes, the pipeline should finish successfully.

```bash
$ tkn pipelinerun list

NAME                         STARTED      DURATION     STATUS
build-and-deploy-run-xy7rw   1 hour ago   2 minutes    Succeeded
build-and-deploy-run-z2rz8   1 hour ago   19 minutes   Succeeded
```

Looking back at the project, you should see that the images are successfully built and deployed.

![Application Deployed](docs/images/application-deployed.png)

You can get the route of the application by executing the following command and access the application

```bash
$ oc get route pipelines-vote-ui --template='http://{{.spec.host}}'
```

If you want to re-run the pipeline again, you can use the following short-hand command to rerun the last pipelinerun again that uses the same workspaces, params and service account used in the previous pipeline run:

```
$ tkn pipeline start build-and-deploy --last
```

Whenever there is any change to your repository we need to start pipeline explicity to see new changes to take effect

# Triggers

Triggers in conjuntion with pipelines enable us to hook our Pipelines to respond to external github events (push events, pull requests etc).

## Prerequisites

You need an latest OpenShift 4 cluster running on AWS in order to complete this tutorial. If you don't have an existing cluster, go to http://try.openshift.com and register for free in order to get an OpenShift 4 cluster up and running on AWS within minutes.

>***NOTE:*** Running cluster localy [crc](https://github.com/code-ready/crc/releases) won't work, as we need `webhook-url` to be accessable to `github-repos`

### Adding Triggers to our Application:

Now let’s add a TriggerTemplate, TriggerBinding, and an EventListener to our project.

####  Trigger Template

A `TriggerTemplate` is a resource which have parameters that can be substituted anywhere within the resources of template.

The definition of our TriggerTemplate is given in `03_triggers/02-template.yaml`.

```yaml
apiVersion: triggers.tekton.dev/v1beta1
kind: TriggerTemplate
metadata:
  name: vote-app
spec:
  params:
  - name: git-repo-url
    description: The git repository url
  - name: git-revision
    description: The git revision
    default: master
  - name: git-repo-name
    description: The name of the deployment to be created / patched

  resourcetemplates:
  - apiVersion: tekton.dev/v1beta1
    kind: PipelineRun
    metadata:
      generateName: build-deploy-$(tt.params.git-repo-name)-
    spec:
      serviceAccountName: pipeline
      pipelineRef:
        name: build-and-deploy
      params:
      - name: deployment-name
        value: $(tt.params.git-repo-name)
      - name: git-url
        value: $(tt.params.git-repo-url)
      - name: git-revision
        value: $(tt.params.git-revision)
      - name: IMAGE
        value: image-registry.openshift-image-registry.svc:5000/pipelines-tutorial/$(tt.params.git-repo-name)
      workspaces:
      - name: shared-workspace
        volumeClaimTemplate:
          spec:
            accessModes:
              - ReadWriteOnce
            resources:
              requests:
                storage: 500Mi
```

* Run following command to apply Triggertemplate.

```bash
$ oc create -f https://raw.githubusercontent.com/openshift/pipelines-tutorial/master/03_triggers/02_template.yaml
```

####  Trigger Binding
TriggerBindings is a map enable you to capture fields from an event and store them as parameters, and replace them in triggerTemplate whenever an event occurs.

The definition of our TriggerBinding is given in `03_triggers/01_binding.yaml`.

```yaml
apiVersion: triggers.tekton.dev/v1beta1
kind: TriggerBinding
metadata:
  name: vote-app
spec:
  params:
  - name: git-repo-url
    value: $(body.repository.url)
  - name: git-repo-name
    value: $(body.repository.name)
  - name: git-revision
    value: $(body.head_commit.id)
```
The exact paths (keys) of parameter we need can be found by examining the event payload (eg: GitHub events).

Run following command to apply TriggerBinding.

```bash
$ oc create -f https://raw.githubusercontent.com/openshift/pipelines-tutorial/master/03_triggers/01_binding.yaml
```

####  Trigger
`Trigger` combines TriggerTemplate, TriggerBindings and interceptors. They are used as ref inside the EventListener.

The definition of our Trigger is given in `03_triggers/03_trigger.yaml`.

```yaml
apiVersion: triggers.tekton.dev/v1beta1
kind: Trigger
metadata:
  name: vote-trigger
spec:
  serviceAccountName: pipeline
  interceptors:
    - ref:
        name: "github"
      params:
        - name: "secretRef"
          value:
            secretName: github-secret
            secretKey: secretToken
        - name: "eventTypes"
          value: ["push"]
  bindings:
    - ref: vote-app
  template:
    ref: vote-app
```
The secret is to verify events are coming from correct source code management
```yaml
---
apiVersion: v1
kind: Secret
metadata:
  name: github-secret
type: Opaque
stringData:
  secretToken: "1234567"
```
Run following command to apply Trigger.

```bash
$ oc create -f https://raw.githubusercontent.com/openshift/pipelines-tutorial/master/03_triggers/03_trigger.yaml
```

#### Event Listener

This component sets up a Service and listens for events. It also connects a TriggerTemplate to a TriggerBinding, into an
[addressable](https://github.com/knative/eventing/blob/master/docs/spec/interfaces.md)
endpoint (the event sink)

The definition for our EventListener can be found in
`03_triggers/04_event_listener.yaml`.

```yaml
apiVersion: triggers.tekton.dev/v1beta1
kind: EventListener
metadata:
  name: vote-app
spec:
  serviceAccountName: pipeline
  triggers:
    - triggerRef: vote-trigger
```
* Run following command to create EventListener.

```bash
$ oc create -f https://raw.githubusercontent.com/openshift/pipelines-tutorial/master/03_triggers/04_event_listener.yaml
```

>***Note***: EventListener will setup a Service. We need to expose that Service as an OpenShift Route to make it publicly accessible.

* Run below command to expose eventlistener service as a route

```bash
$ oc expose svc el-vote-app
```

## Configuring GitHub WebHooks

Now we need to configure webhook-url on [backend](https://github.com/openshift/pipelines-vote-api) and [frontend](https://github.com/openshift/pipelines-vote-ui) source code repositories with the Route we exposed in the previously.

* Run below command to get webhook-url
```bash
$ echo "URL: $(oc  get route el-vote-app --template='http://{{.spec.host}}')"
```

>***Note:***
>
>Fork the [backend](https://github.com/openshift/pipelines-vote-api) and [frontend](https://github.com/openshift/pipelines-vote-ui) source code repositories so that you have sufficient privileges to configure GitHub webhooks.

### Configure webhook manually

Open forked github repo (Go to Settings > Webhook)
click on `Add Webhook` > Add
```bash
$ echo "$(oc  get route el-vote-app --template='http://{{.spec.host}}')"
```
to payload URL > Select Content type as `application/json` > Add secret eg: `1234567` > Click on `Add Webhook`

![Add webhook](docs/images/add-webhook.png)

- Follow above procedure to configure webhook on [frontend](https://github.com/openshift/pipelines-vote-ui) repo

Now we should see a webhook configured on your forked source code repositories (on our
GitHub Repo, go to Settings>Webhooks).

![Webhook-final](docs/images/webhooks.png)

***Great!, We have configured webhooks***

#### Trigger pipeline Run

When we perform any push event on the [backend](https://github.com/openshift/pipelines-vote-api) the following should happen.

1.  The configured webhook in vote-api GitHub repository should push the event payload to our route (exposed EventListener Service).

2. The Event-Listener will pass the event to the TriggerBinding and TriggerTemplate pair.

3. TriggerBinding will extract parameters needed for rendering the TriggerTemplate.
Successful rendering of TriggerTemplate should create 2 PipelineResources (source-repo-vote-api and image-source-vote-api) and a PipelineRun (build-deploy-vote-api)

We can test this by pushing a commit to vote-api repository from GitHub web ui or from terminal.

Writing objects: 100% (1/1), 190 bytes | 190.00 KiB/s, done.
Total 1 (delta 0), reused 0 (delta 0)
To github.com:<github-username>/pipelines-vote-api.git
   72c14bb..97d3115  master -> master
```

Watch OpenShift WebConsole Developer perspective and a PipelineRun will be automatically created.

![pipeline-run-api](docs/images/pipeline-run-api.png
)

repository: openshift/pipelines-tutorial

gha_language: Shell

repo_name: openshift/pipelines-tutorial


text:
---
date: 2019-05-03T10:35:13+0200
layout: rafaga
rafagas:
- desc: 'Visualizing and understanding USA critical issues like employment, education,
    and industries '
  keyw: usa
  link: https://datausa.io/
  microlink:
    desc: The most comprehensive visualization of U.S. public data. Data USA provides
      an open, easy-to-use platform that turns data into knowledge.
    image: https://datausa.io/images/share.jpg
    logo: https://datausa.io/images/favicon.ico?v=3
    title: Data USA
- desc: Using the Mapbox SDK and Unity to develop a relief visualization website
  keyw: relief
  link: http://barankahyaoglu.com/map/
  microlink:
    desc: Relief Map Viewer
    logo: https://i1.wp.com/barankahyaoglu.com/dev/wp-content/uploads/2015/07/favicon.png?fit=16%2C16
    title: brnkhy - Relief Map Viewer
- desc: 'Spanish depopulation: how it affects to infrastructures, investments, and
    essential services'
  keyw: depopulation
  link: https://ethic.es/2019/04/el-mapa-de-la-espana-vacia/
  microlink:
    desc: La España vacía gana cada vez más territorio. Presentamos algunos de los
      últimos datos y mapas sobre los movimientos demográficos del país.
    image: https://ethic.es/wp-content/uploads/2019/04/abandonment-4061698_1920.jpg
    logo: https://42zf47184c393k1ujb2s5yuk-wpengine.netdna-ssl.com/wp-content/uploads/2018/05/cropped-favicon-192x192.png
    title: El mapa de la España vacía
- desc: Facebook did the most detailed population map of Africa using deep learning,
    available for download by country
  keyw: africa
  link: https://data.humdata.org/organization/facebook
  microlink:
    desc: Related Platforms
    image: https://data.humdata.org/images/hxl_fb-01.png
    logo: https://data.humdata.org/images/icons/hdx.ico
    title: Facebook - Humanitarian Data Exchange
- desc: An open crowdsourced project to encourage plastic litter recycling, reporting
    about street litter, and giving away "littercoins" (valueless blockchain)
  keyw: litter
  link: https://openlittermap.com
  microlink:
    logo: https://openlittermap.com/favicon.ico
- desc: An application built using Python, CesiumJS and Google Maps API to present
    estimated travel times and directions using a 3D map
  keyw: 3d
  link: https://github.com/willgeary/Wayfinder3D
  microlink:
    desc: Application for comparing estimated travel times and directions on a 3D
      map - willgeary/Wayfinder3D
    image: https://avatars3.githubusercontent.com/u/13033978?s=400&v=4
    logo: https://github.githubassets.com/favicon.ico
    title: willgeary/Wayfinder3D
rid: 1086
---