text:
# Forum Threads
Consider a list of posts in an internet forum divided in pages. In order to keep the pages as aesthetically pleasant as possible, the graphics team came up with the optimal number of posts in every page. Then the user experience team decided that it would be convenient to group posts into threads, this is, list all replies to a post (and the replies to those replies) consecutively, and that a thread should not be split in different pages. Now you should find a layout for the posts such that

1. posts in the same thread are listed consecutively;
2. threads are ordered by the time of the first post;
3. posts in the same thread are in the same page; and
4. the maximum difference between the number of posts per page and the intended number is minimal.

Note: the goal is to minimize how bad the worst page is, not the sum of how bad all of the pages are.

## Input Format
The input consists of a number of test cases.

The first line of each test case contains two integers *a*, *p*, the intended number of posts per page and the number of posts respectively. Then there is a line for each post, in the order they were posted. The *ith* line contains a positive integer *x* if the ith post is a reply to the *xth* post, or 0 if the *ith* post starts a new thread.

## Constraints
```
0 ≤ a, p ≤ 1 000
0 < x < i
```

## Output Format
Output one line per test case with one integer, the maximum difference between the number of posts per page and the intended number in a layout that satisfies the conditions.

## Sample Input
```
3 6
0
1
2
0
4
5
3 6
0
0
0
0
0
3
```

## Sample Output
```
0
1
```

## Explanation
In the first test case there are 6 posts that are to be distributed at a ratio of 3 posts per page. There are 2 threads with 3 posts each, so a layout with the first thread in the first page and the second thread in the second page fits perfectly.

In the second test case there are 2 single posts, a thread with 2 posts, and 2 more single posts. Since the middle thread cannot be split between the 2 pages, a layout with a one post imbalance is optimal. The optimal configuration may not be unique. In fact in this test case, there are three configurations that are optimal:

* Posts 1–3 could be put in the first page, and posts 4 and 5 in the second. In this case, the first page would contain one extra post (6, which is a reply to post 3), and the second page would contain one fewer.

* Posts 1 and 2 could be put in the first page, and posts 3–5 in the second.

* Posts 1 and 2 could be put in the first page, post 3 (with its reply) in the second, and posts 4 and 5 in the third.

path: /Problems/P14 - Forum Threads/Problem.md


text:
# :drop_of_blood: Blood-Bank-Management-System
This website acts like a medium/an intermediate between hospitals/clinics and donors/receivers.

## Basic functionalities:
This project is created for two users: Donors/Receivers and Hospitals/Clinics(Doctors), where a Hospital user can add blood sample to their blood bank, request for blood, check status of their request, update their details, etc. The donor/receiver can also do the same.

## :information_source: Languages/technologies used:
1. Frontend: HTML, CSS, Bootstrap, JavaScript.
2. Backend: Database-MySQL.
3. Frontend-Backend connection: PHP.

## :exclamation: Requirements
1. Xampp Software
2. Sublime text/Visual studio code software or any software supporting php, html, css
3. Java Jdk

## :question: How to start?
1. Download this code as a zip file.
2. Place this entire folder in htdocs, in xampp(xampp path, installed as per your installation).
3. Open Xampp server, start Apache, MySQL.
4. In the MySQL row, select Admin.
5. Create a database with name "bloodbank" in phpmyadmin. Import the sql file from sql folder.
6. Open main.php in Sublime text/Visual studio code, on right click copy file path.
7. Paste it on any web browser and clear everything before folder name, type "localhost".
8. Ready to go!

## :information_source: The file named:
1. 'css' contains the files for the front end pages style.
2. 'file' contains the files for the backend connections.
3. 'image' and 'jastimage' contains images used in the front end.
4. 'sql' contains the database file that has to be imported.

## :family_man_woman_boy_boy: Team:
- Chandana G V - [Chandana](https://github.com/Chandana047)
- Rithish Reddy - [Rithish](https://github.com/Rithish7007)
- Balaji Subash - [Subash](https://github.com/gbsubash)
- SriHarsha - [Harsha](https://github.com/Sriharshajasti123)

## ✉ Have an issues or a bug? Would like to contact?
Report [here](https://github.com/Chandana047/Blood-Bank-Management-System/issues)

## If you liked the project and found it helpful
Give a start 😄:star:

license: MIT

branch_name: refs/heads/main

extension: md

gha_license_id: MIT

license_type: permissive


text:
# revo-calendar

[![bundle size][bundlephobia-image]][bundlephobia-url]

[bundlephobia-url]: https://bundlephobia.com/result?p=revo-calendar
[bundlephobia-image]: https://badgen.net/bundlephobia/minzip/revo-calendar

A modern-looking React Event Calendar component.

Very much inspired on [Evo Calendar](https://github.com/edlynvillegas/evo-calendar/). If you're not using React on your project, I recommend this calendar plugin that runs on jQuery.

## Demo 👀

Live Demo and Playground: [https://gjmolter.github.io/revo-calendar](https://gjmolter.github.io/revo-calendar)

## Install 📦

```bash
#NPM
npm i revo-calendar

#YARN
yarn add revo-calendar
```

## Usage ✍

```jsx
import React, { Component } from 'react'

//Import the component and the stylesheet
import RevoCalendar from 'revo-calendar'
import 'revo-calendar/dist/index.css'

class Example extends Component {
  render() {
    return <RevoCalendar />
  }
}
```

## Available Props 🎛

| Prop                       | Type      | Default                                           | Description                                                                                | Options                                                                                |
| -------------------------- | --------- | ------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------- |
| events                     | array     | `[]`                                              | List of events to be added to the calendar                                                                                | See detailed explanation below                                                            |
| date                       | Date      | `new Date()`                                      | Default current date                                                                                | Any JS Date object                                                                        |
| className                  | string    | `''`                                              | Adds extra CSS classes to the calendar                                                                                | Any class name                                                                            |
| style                      | CSS-in-JS | `{}`                                              | Adds extra CSS using CSS-in-JS                                                                                | Any CSS-in-JS                                                                             |
| highlightToday             | bool      | `true`                                            | If `true`, will show a ring around today's date on calendar                                                                                | `true` or `false`                                                                         |
| lang                       | string    | `'en'`                                            | Calendar's language                                                                                | `en`, `pt`, `es`, `de` or any other if custom `languages` is used                         |
| primaryColor               | string    | `'#4F6995'`                                       | Background color for the side panels and text color for current month name                                                                                | Hex, RGB, RGBA, CSS color name                                                            |
| secondaryColor             | string    | `'#4F6995'`                                       | Calendar background color and side panels text color                                                                                | Hex, RGB, RGBA, CSS color name                                                            |
| todayColor                 | string    | `'#4F6995'`                                       | Color of today's highlight ring (Will only be used if `highlightToday` is `true`                                                                             | Hex, RGB, RGBA, CSS color name                                                            |
| textColor                  | string    | `'#4F6995'`                                       | Text color for weekday names and day numbers                                                                                | Hex, RGB, RGBA, CSS color name                                                            |
| indicatorColor             | string    | `'orange'`                                        | Text color for event indicator                                                                                | Hex, RGB, RGBA, CSS color name                                                            |
| animationSpeed             | number    | `300`                                             | Speed in milliseconds for all transitions and animations                                                                                | Any number                                                                                |
| sidebarWidth               | number    | `180`                                             | Size in pixels of the left panel (month/year selection)                                                                                | Any number                                                                                |
| detailWidth                | number    | `280`                                             | Size in pixels of the right panel (current day's events)                                                                                | Any number                                                                                |
| showSidebarToggler         | bool      | `true`                                            | If `true`, will show left panel's toggling button                                                                                | `true` or `false`                                                                         |
| sidebarDefault             | bool      | `true`                                            | If `true`, will have left panel open by default                                                                                | `true` or `false`                                                                         |
| showDetailToggler          | bool      | `true`                                            | If `true`, will show right panel's toggling button                                                                                | `true` or `false`                                                                         |
| detailDefault              | bool      | `true`                                            | If `true`, will have right panel open by default                                                                                | `true` or `false`                                                                         |
| onePanelAtATime            | bool      | `false`                                           | If `true`, won't allow two panels to be open simultaneously                                                                                | `true` or `false`                                                                         |
| openDetailsOnDateSelection | bool      | `true`                                            | If `true`, will open right panel when date is selected                                                                                | `true` or `false`                                                                         |
| timeFormat24               | bool      | `true`                                            | If `true`, will display dates in 24H format instead of 12 (21:41 instead of 9:41 PM)                                                                         | `true` or `false`                                                                         |
| detailDateFormat           | string    | `'DD/MM/YYYY'`                                    | The way that current selected date will be displayed on right panel                                                                                | Any string. See details below                                                             |
| languages                  | object    | translation object with `en`, `pt`, `es` and `de` | If the current supported languages are not enough or you want to modify one of the translations, you can add your own translations object. See details below |
| dateSelected               | function  | `date => {}`                                      | Use this function to get current selected date on your parent component                                                                                | Any function that receives an object with `day`, `month` and `year` keys                  |
| eventSelected              | function  | `index => {}`                                     | Use this function to get clicked event's index                                                                                | Any function that receives a `number` parameter (event index on `events` array)           |
| allowDeleteEvent           | bool      | `true`                                            | If `true`, will display delete button when event is clicked                                                                                | `true` or `false`                                                                         |
| allowAddEvent              | bool      | `true`                                            | If `true`, will display add event button on right panel                                                                                | `true` or `false`                                                                         |
| addEvent                   | function  | `date => {}`                                      | Use this function to add Events to `events` array                                                                                | Any function that receives an object with `day`, `month` and `year` keys                  |
| deleteEvent                | function  | `index => {}`                                     | Use this function to delete events from the `events` array                                                                                | Any function that receives a `number` parameter (index to be deleted from `events` array) |

### events Prop

`events` should receive an array of event objects. Events have two mandatory parameters and two optionals

Event object:

| Key    | Type           | Mandatory | Descrition                                                                                |
| ------ | -------------- | --------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| name   | string         | ✔        | Event name                                                                                |
| date   | unix timestamp | ✔        | 13 character timestamp. Can be obtained from adding operator `+` before JS `Date` object.                                                                                |
| allday | bool           |           | If `true`, will ignore `Date` object's time and show `allDay` string from current language's translation object                                                               |
| extra  | object         |           | If exists, will add one extra event information next to time. The object needs to contain strings: `icon` and `text`. `icon` will be passed as an `svg` `path` `d` parameter. |

Example:

```js
var events = [
  {
    name: 'Buyout',
    date: +new Date(),
    allday: true
  },
  {
    name: 'Reservation',
    date:<PHONE_NUMBER>000,
    extra: {
      icon:
        'M20.822 18.096c-3.439-.794-6.64-1.49-5.09-4.418 4.72-8.912 1.251-13.678-3.732-13.678-5.082 0-8.464 4.949-3.732 13.678 1.597 2.945-1.725 3.641-5.09           4.418-3.073.71-3.188 2.236-3.178 4.904l.004 1h23.99l.004-.969c.012-2.688-.092-4.222-3.176-4.935z',
      text: '7 People'
    }
  }
]
```

The example's `extra.icon` will render this: ![person icon](https://cdn-std.droplr.net/files/acc_519625/A2Wdsw)

### languages Prop

You can create an object where each key is a language (key needs to match `lang` atribute), each language needs to have the keys: `days`, `daysShort`, `daysMin`, `months`, `monthsShort`, `noEventForThisDay` and `allDay`.

Here is an example of the Esperanto language:

```js
const translations = {
  esperanto: {
    days: ['Dimanĉo', ...'Sabato'],
    daysShort: ['Dim', ...'Sab'],
    daysMin: ['Di', ...'Sa'],
    months: ['Januaro', ...'Decembro'],
    monthsShort: ['Jan', ...'Dec'],
    noEventForThisDay: 'Neniu evento por ĉi tiu tago ... do ripozu!',
    allDay: 'Tuta tago',
    addEvent: 'Aldoni eventon'
  }
}
```

To render the calendar using custom `esperanto` language, pass the `translations` object and the key to `languages` and `lang` respectivelly.

Example:

```jsx
<RevoCalendar languages={translations} lang='esperanto' />
```

### detailDateFormat Prop

detailDateFormat can be any string, with the following placeholders being replaced:

| placeholder | replacement          | example  |
| ----------- | -------------------- | -------- |
| `MMMM`      | Full month name      | November |
| `MMM`       | Short month name     | Nov      |
| `MM`        | Month number         | 11       |
| `DD`        | Day number           | 18       |
| `nth`       | Ordinal day number   | 18th     |
| `dddd`      | Weekday name         | Thursday |
| `ddd`       | Short weekday name   | Thu      |
| `dd`        | Tiny weekday name    | Th       |
| `YYYY`      | Full year            | 1997     |
| `YY`        | Year's last 2 digits | 97       |

Example

```js
"MMM nth, YYYY" => "Nov 18th, 1997"
```

## License

MIT © [gjmolter](https://github.com/gjmolter)

repository: adjarriawan/revo-calendar

branch_name: refs/heads/master

repo_name: adjarriawan/revo-calendar


text:
# zombicore
Homebrewed Lightweight Zombie RPG Ruleset; Not well tested.
See the [website here](http://zombicore.com)

## Getting Started
Install [Node.js](http://nodejs.org/) and then:
```sh
$ npm install -g gulp
$ npm install -g bower
$ npm install
$ bower install
$ gulp serve
```

repository: MartinFournier/zombicore

gha_language: CSS

repo_name: MartinFournier/zombicore


text:
[![Build Status](https://travis-ci.org/tobilarscheid/jaxrs-etag-filter.svg?branch=master)](https://travis-ci.org/tobilarscheid/jaxrs-etag-filter)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/bb6e22e1a20f409d84c5ea8cf3d8e2e1)](https://www.codacy.com/app/tobilarscheid/jaxrs-etag-filter?utm_source=github.com&utm_medium=referral&utm_content=tobilarscheid/jaxrs-etag-filter&utm_campaign=Badge_Grade)
[![Codacy Badge](https://api.codacy.com/project/badge/Coverage/bb6e22e1a20f409d84c5ea8cf3d8e2e1)](https://www.codacy.com/app/tobilarscheid/jaxrs-etag-filter?utm_source=github.com&utm_medium=referral&utm_content=tobilarscheid/jaxrs-etag-filter&utm_campaign=Badge_Coverage)

# JAX-RS ETag Filter

JAX-RS cache control finally became easy! Add ``ETags`` to all your responses and send ``304 Not Modified`` whenever a client sends matching ``ETags`` in ``If-None-Modified`` headers - with just one annotation!

To get started, get the latest version from jitpack:

https://jitpack.io/#tobilarscheid/jaxrs-etag-filter/

Make sure the entity you are planning to return from your service implements `ETagged`:

```java
public class Entity implements ETagged {
    public String getETag(){
        /**
        * if you you are reading this you probably know
        * what to consider when generating ETags
        */
    }
}
```

Then, simply annotate your service Method with `@ETag`.

```java
@ETag
public Response getMyEntity(){
    Entity e = //do something to get your entity here
    return Response.ok(e).build();
}
```

The `ETag` header is automatically added to your Response. If the client sends a request with a `If-None-Match` header matching your entities ETag, Status Code `304` and no body is returned.

## Hints
  - All the functionality is only applied if your Response´s status code is `200`
  - If you don't use class path scanning (hint: [you shouldn't]), you need to list `de.tobiaslarscheid.etag.ETagFilter.class` in your RestAppConfig. (Or whereever else you register your resource classes)
  - If you want to use `Cache-Control`or `Expires` headers to complete your caching, you should have a look at [JAX-RS Cache-Control Filter](https://github.com/tobilarscheid/jaxrs-cache-control-filter)

License
----

MIT

   [you shouldn't]: <https://blogs.oracle.com/japod/entry/when_to_use_jax_rs>

repository: tobilarscheid/jaxrs-etag-filter

gha_language: Java

repo_name: tobilarscheid/jaxrs-etag-filter


text:
+++
Talk_date = ""
Talk_start_time = ""
Talk_end_time = ""
Title = "From Cavemen to Captains - Using Kubernetes to Evolve DevOps Adoption"
Type = "talk"
Speakers = ["ragu-srinivasan","ramesh-podila"]
Youtube = "RJgPL1OhYD8"
Vimeo = ""
Speakerdeck = ""
Slideshare = "https://www.slideshare.net/DevOpsDaysDFW/cavemen-to-captains-using-kubernetes-to-evolve-devops-adoption"
Slides = ""
Website = ""
+++

##### TALK ABSTRACT

Our goal at Verizon is to create a shared multi-tenant container platform to:

* Accelerate our public cloud migration strategy
* Improve developer velocity
* Realize cost savings by reducing infrastructure spend
* Optimize resource utilization
* Enhance security, monitoring and governance framework that provides visibility from development to production

We achieved our goals by embracing open source Kubernetes and extending it to deploy a platform that provides a common set of components that are shared across the entire Verizon Enterprise.

The talk will highlight and share our experiences on

* Deployment
  * Securing helm deployments in a multi-tenant environment

* Manage Authentication & authorization (RBAC) for multi-tenant platform for large enterprise by leveraging kubectl plugins

* Logging
  * Support for diverse logging implementations for both brown(legacy) and green field applications
  * Configuration management using Custom Resource Definitions (CRD)

* Load Balancing
  * Efficiently using Ingress objects to manage cost and to provide end to end automation

* Security
  * Effectively using tools early on in the development process
  * Establishing container image management, scanning and runtime protection policies

repository: KrisBuytaert/devopsdays-web

gha_license_id: NOASSERTION

repo_name: KrisBuytaert/devopsdays-web


text:
---
hrs_structure:
  division: '3'
  volume: '12'
  title: '31'
  chapter: '580'
  section: 580-52
type: hrs_section
tags:
  - Property
  - Family
menu:
  hrs:
    identifier: HRS_0580-0052
    parent: HRS0580
    name: 580-52 Marriage after divorce
weight: 104205
title: Marriage after divorce
full_title: 580-52 Marriage after divorce
---
**§580-52 Marriage after divorce.** Whenever a marriage is dissolved, either party to the divorce may marry again at any time. [CC 1859, §1334; am L 1866, p 3; am L 1870, c 10, §2; am L 1876, c 48, §2; RL 1925, §2982; RL 1935, §4479; RL 1945, §12230; RL 1955, §324-41; [HRS §580-52](/title-31/chapter-580/section-580-52/)]

Case Notes

Remarriage during pendency of appeal. 37 H. 34.

repository: SamMade/BlueAndKrabby

repo_name: SamMade/BlueAndKrabby


text:
Blog Post API Assignment
========================

This application stores posts to a SQLite database. It provides the following JSON API:

GET /posts
----------

Returns a JSON document, which includes all posts.

Request

GET /posts HTTP/1.1
Host: localhost:4001

Response

HTTP/1.1 200 OK
content-type: application/json

[{"post_id":1,"title":"hai","body":"hai"},
{"post_id":2,"title":"second title","body":"second body"}]

POST /post
----------

Adds a new post to the database. The new post is sent as a JSON document in the request body.

Request

POST /post HTTP/1.1
Host: localhost:4001
Content-Type: application/json

{"title":"second title", "body":"second body"}

Response

HTTP/1.1 200 OK

Downloading
===========

Download the project repository

git clone https://github.com/vesapehkonen/blogpost

Installation
============

Install nodejs, node-express and npm

Install node modules: npm install

Run
===

Run application: npm start

Get posts using curl: curl -X GET http://localhost:4001/posts

Insert a new post using curl: curl -H "Content-Type: application/json" -d '{"title":"Title", "body":"Body"}' http://localhost:4001/post

Licensing
=========

Please see the file called LICENSE.

repository: vesapehkonen/blogpost

repo_name: vesapehkonen/blogpost


text:
# Inventory

[![Version](https://img.shields.io/github/v/tag/cgxeiji/inventory?sort=semver)](https://github.com/cgxeiji/inventory/releases)
[![PkgGoDev](https://pkg.go.dev/badge/github.com/cgxeiji/inventory)](https://pkg.go.dev/github.com/cgxeiji/inventory)
[![License](https://img.shields.io/github/license/cgxeiji/inventory)](https://github.com/cgxeiji/inventory/blob/master/LICENSE)
![Go version](https://img.shields.io/github/go-mod/go-version/cgxeiji/inventory)

Inventory is an inventory manager written in Go and served as a web page. It
was developed to keep track of items in a small scale, like research
laboratories or homes.

## How does it work?

By default, inventory will run a web server at `localhost:8080` and create a
directory at `$HOME/.inventory` to store the information of each item.

You can change the port and directory by passing:
```
$ inventory -p 5005 -d /path/to/inventory/dir
```

`localhost:8080` shows a table with the list of items in the inventory. You can
press `+ Add item` to add a new item to the inventory using the web interface
or manually create an entry at `$HOME/.inventory`.

#### Items

Each item is added to its own directory with a unique id name and consist of a
`info.yaml` metadata file, `picture.jpg` with a picture of the item, and
`location.jpg` with a photo of the return location.

Once the item is added, it will appear inside the table at the root url.
Clicking on the thumbnail of the item will open a new page with a QR code
linking that specific item. You can print this QR code and physically attach it
to the item.

#### Check in/out with QR codes

Scanning the QR code will open an `update item` interface where the user is
prompted to write their name. Clicking on `Use item!` will change the state of
the item to `in use = true` and show the name of the person using the item.

After finishing using the item, scan the QR code again to return the item. This
time, the user is prompted to upload a photo of the place the item was returned
at. Pressing on `Return item!` will change the state of the item to `in use =
false` and the location of the item can be reviewed by clicking on the
`returned` link from the main inventory url.

### Security

If only restricted users should have access to the inventory, then create a
`.htdigest` file or `.htpasswd` file and add users to the realm `inventory`.

Then, run inventory as:
```
$ inventory -c /path/to/.htdigest
```

This will block the access to the inventory main page, but the QR scan can
still be accessed by anyone.

## Installation

You can download the [release
binaries](https://github.com/cgxeiji/inventory/releases) or compile it from
source by running:
```
$ go get -v github.com/cgxeiji/inventory/inventory
```

repository: cgxeiji/inventory

repo_name: cgxeiji/inventory


text:
# Sidekiq::Squelch

Turns down the noise when executing Sidekiq jobs. Shit happens, its a fact. Sidekiq is pretty good at dealing with that by requing when an uncaught exception is thrown. And if you're monitoring errors using something like [Sentry](https://getsentry.com/) this can be a bit noisy when executing something that has a regular failures and recovery (i.e. network calls). Squelch allows you to set thresholds for common errors that occur so that you can cut down the noise and see when something is really going wrong.

## Installation

Add this line to your application's Gemfile:

```ruby
gem 'sidekiq-squelch'
```

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install sidekiq-squelch

## Usage

TODO: Write usage instructions here

## Contributing

1. Fork it ( https://github.com/[my-github-username]/sidekiq-squelch/fork )
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create a new Pull Request

repository: bobbrez/sidekiq-squelch

repo_name: bobbrez/sidekiq-squelch


text:
# xlsx to csv
##  xlsx2csv

## ORIGINAL VERSIONS

  * [tealeg xlsx2csv](https://github.com/tealeg/xlsx2csv) I have took this source and updated it.

## HELP
  Actual version always on  csv2xlsx -h or csv2xlsx help

### NAME:
   xlsx2csv - Convert XLSX files to csv

### Example:

```bash
# read 1st sheet from my.xlsx
xlsx2csv -d ";" -f my.xlsx -i 0  > my.csv

#  read sheet named Sheetname, starting from row 3. 1st row is 1
xlsx2csv -d ";" -f my.xlsx -s "SheetName"  -r 3 > my.csv

```

You can use also formulas in template or in csv. Csv formulas overwrite template formulas.
Look examples formula col.

### USAGE:

    xlsx2csv -f xlsx_file [options] > file.csv

#### VERSION:

#### OPTIONS:

```
	-d CHAR		column delimiter char, default ;
	-f file.xlsx	input xlsx file
	-i number	sheet number to read, 1st is 0 and it's default
	-s sheetname	use sheetname, not sheet number
	-r startrow	default is to start from row 1

```

## LICENSE

[tealeg](https://github.com/tealeg/xlsx2csv/) has done excellent packet xlsx and also xsls2csv. I have add some extensions. Enjoy.

[License](https://raw.githubusercontent.com/tealeg/xlsx2csv/master/LICENSE)

## Download

Original version:
Download from [releases section on GitHub]((https://github.com/tealeg/xlsx2csv/)

My updated version
Download from [releases section on GitHub](https://github.com/kshji/go/tree/master/xlsx2csv/build)

repository: kshji/go

repo_name: kshji/go


text:
## Ubuntu 16.04
[Not have a scoring_engine python environment setup?](SetupEnvironment.md)

### Modify hostname
`hostname <INSERT CUSTOM HOSTNAME HERE>`

### Setup worker service (run as root)
`cp /home/engine/scoring_engine/src/configs/worker.service /etc/systemd/system/scoring_engine-worker.service`

### Modify configuration
Change REDIS host/port/password fields to main engine host
`vi /home/engine/scoring_engine/src/engine.conf`

### Start worker service (must run as root)
`systemctl enable scoring_engine-worker`
`systemctl start scoring_engine-worker`

### Monitor worker
`journalctl -f _SYSTEMD_UNIT=scoring_engine-worker.service`
`tail -f /var/log/scoring_engine/worker.log`

### Install dependencies for DNS check
`apt-get install -y dnsutils`

### Install dependencies for HTTP/HTTPS/FTPUpload/FTPDownload check
`apt-get install -y curl`

### Install dependencies for most of the checks
`apt-get install -y medusa`

### Install dependencies for SSH check
`apt-get install -y sshpass`

### Install dependencies for SMTP/SMTPS check
`cp /home/engine/scoring_engine/src/scoring_engine/engine/checks/bin/smtp_check /usr/bin/smtp_check`
`cp /home/engine/scoring_engine/src/scoring_engine/engine/checks/bin/smtps_check /usr/bin/smtps_check`
`chmod a+x /usr/bin/smtp_check`
`chmod a+x /usr/bin/smtps_check`


text:
# _Workplace Environment_

#### By _**Maly Phongsavanh**_ May 6, 2019

## Description

_This webpage is built with HTML, CSS, and Vanilla JS. User is able to interact with the application, dragging a male or female employee to designated empty placeholders. Once the user places the employee in a specific div, information will then display giving information on Quid Pro Quo or Hostile work environment._

## Hosted with [GH-Pages](https://malyphong619.github.io/workplace/)

## Setup/Installation

* _Clone from github (https://github.com/MalyPhong619/workplace.git)_

## Support and contact details

_If there are any questions or would like to contribute to the code, please feel free to email [Maly Phongsavanh](mailto:phongsavanh619@icloud.com)_

## Technologies Used

* _ATOM -text editor-_
* _HTML_
* _CSS_
* _JAVASCRIPT_

### License
_This software is licensed under the MIT license_*
Copyright (c) 2019 **_Maly Phongsavanh_**


text:
Frenzy Turbolinks for Laravel 6.0+
==================================

Frenzy Turbolinks is a port of the Rails [turbolinks](https://github.com/turbolinks/turbolinks-rails) gem
for projects using the PHP [Laravel](http://laravel.com) 6.0+ framework.

## Versions

Current versions of the following JavaScript libraries are used:

 * turbolinks: v5.2.0

For [**Laravel 5.1 to 5.7**](http://laravel.com/docs/5.7) supports see [Frenzy Turbolinks `3.2.3` tag](https://github.com/frenzyapp/turbolinks/tree/3.2.3)

For [**Laravel 5.0**](http://laravel.com/docs/5.0) supports see [Frenzy Turbolinks `3.0.0` tag](https://github.com/frenzyapp/turbolinks/tree/3.0.0)

For [**Laravel 4.1 or 4.2**](http://laravel.com/docs/4.2) supports see [Frenzy Turbolinks `1.0` tag](https://github.com/frenzyapp/turbolinks/tree/1.0)

## Performance

Turbolinks makes following links in your web application faster. Instead of letting
the browser recompile the JavaScript and CSS between each page change, it keeps
the current page instance alive and replaces only the body and the title in the head.

Performance improvements will vary depending on the amount of CSS and Javascript
you are using. You can get up to a 2X increase when using a lot of Javascript and
CSS. You can find the Rails benchmarks [here](https://stevelabnik/turbolinks_test).

## Installation

### Using [Composer](https://getcomposer.org)

Run this command in a terminal:
```bash
composer require frenzy/turbolinks
```

Add the Turbolinks middleware, to the `$middlewareGroups` array in `app/Http/Kernel.php`:
```php
        \Frenzy\Turbolinks\Middleware\StackTurbolinks::class,
```

**NOTICE**: For Laravel 5.4 and below, you must modify your `config/app.php`, in the `providers` array add :
```php
    Frenzy\Turbolinks\TurbolinksServiceProvider::class
```

Add these scripts for automatic publication of assets, in your `composer.json` file:

```json
{
   "scripts": {
       "post-install-cmd": [
           "php artisan vendor:publish --provider=\"Frenzy\\Turbolinks\\TurbolinksServiceProvider\" --force"
       ],
       "post-update-cmd": [
           "php artisan vendor:publish --provider=\"Frenzy\\Turbolinks\\TurbolinksServiceProvider\" --force"
       ]
   }
}
```

Add Javascript files into your project

## Usage

Using turbolinks requires both the usage of the javascript library and the event listeners included with the component.

### Javascripts

Both the original coffeescript version and compiled version of each script are available for use.

#### Using turbolinks.js

To enable turbolinks, all you need to do is add the compiled turbolinks javascript to your layout in the `<head>`section.

## Installation with the Larasset package

Click [here](README_LARASSET.md) to publish the assets automatically.

## Compatibility

The turbolinks javascript is designed to work with any browser that fully supports
pushState and all the related APIs. This includes Safari 6.0+ (but not Safari 5.1.x!),
IE10+, and latest Chrome and Firefox.

Do note that existing JavaScript libraries may not all be compatible with
Turbolinks out of the box due to the change in instantiation cycle. You might
very well have to modify them to work with Turbolinks' new set of events. For
help with this, check out the [Turbolinks Compatibility project](http://reed.github.io/turbolinks-compatibility).

## Additional Resources

Please refer to the [turbolinks](https://github.com/turbolinks/turbolinks-rails) project
if you require additional information on the javascript libraries and their usage.

## Bugs

For bugs or feature requests, please [create an issue](https://github.com/frenzyapp/turbolinks/issues/new).

## Credits

This package is based on the Symfony middleware package [Helthe Turbolinks](https://github.com/helthe/Turbolinks).

repository: frenzyapp/turbolinks

gha_language: PHP

repo_name: frenzyapp/turbolinks


text:
# libprom

This project provides shared libraries for instrumenting software and expose metrics using the [Prometheus exposition format](https://prometheus.io/docs/instrumenting/exposition_formats/)

* libprom - Provides the core API. Resources such as counters, gauges, histograms, and
  collector registries can be found here. This library has no dependencies on third-party
  libraries; however, it does rely on pthreads native to POSIX systems.
* libpromhttp - Provides a simple web handler to expose Prometheus metrics for scraping.
  This library has a dependency on libmicrohttpd.

Documentation can be generated using `make docs`.

## Versioning

This project generally follows [semantic versioning](https://semver.org).

## Development

Navigate to the root fo this project directory and execute `make` - it will build libprom, libpromhttp and generate the documentation from the source code. To run all tests, use `make test` and `make smoke`. To generate the source documentation only use `make doc`.

### General Rules for Contribution

* Open An Issue: Before opening a PR or starting any work, open an issue.  In the issue, describe the problem you
want to fix and how you would like to fix it.  The level of detail should match the relative size of the proposed change.
This will allow us to work together to determine the best path forward towards a sound solution.

* Open a Pull Request: After you have gotten confirmation on your proposed change it's time to get to work! Create a
fork and make all of your updates in said fork. For each commit, you must prefix the commit with the associated issue.
For example: `#12 - Fixing typo in documentation`. Before opening a pull request, review the commit log for your fork.
If any of your commit messages are extraneous, squash said commits using `git rebase`. Once you're happy with your
changes and your commit log, open a pull request against the master branch.

* Engage in the Code Review: After submitting your pull request, there may be some requests for changes.  If you have
any questions or concerns, please do not hesitate to make them known.  The code review process is a bidirectional
communication process so please do not be shy. Speak up!

### Coding Rules for Contribution

* Please follow the general coding style already present in the project.
  * Every struct must have a constructor function and destructor function.
  * Every method must pass a pointer to the target struct as the first argument.
  * Every function that is not a constructor or destructor and does not return a value must return an int to signify
    success with 0 and failure with non-zero.
  * Every function name must begin with the library name. For example, all functions within prom must begin with `prom_`
    and all functions within promhttp must begin with `promhttp_`.
  * All variables must be underscore delimited (i.e. snake-case).
  * All macros must be captilalized.
* All new functions should introduce a corresponding suite of unit tests.
* If you add functionality to an existing function, be sure to add a corresponding unit test to verify correctness.

## Misc

* Language level: C11

repository: jpalpant/libprom

repo_name: jpalpant/libprom


text:
---
categories: [Programming]
date: 2020-11-28
images: [/images/resume-in-html/resume-latex.png, /images/resume-in-html/resume-html.png]
lang: en
title: Are You Still Writing a Resume in Word/LaTeX?
lastmod: '2022-09-02'
keywords: [resume, html, latex, writing, web, pdf, website, customizability, tex,
  icons]
recommendations: [/note/why-job-title-matters/, /note/hugo-kramdown-and-katex/, /note/javascript-save-svg-as-image/]
---

Over the past few years, I have been using LaTeX for writing a resume.

![resume-latex](/images/resume-in-html/resume-latex.png)

While it *looks* so professional especially in the academic world, there is a space for improvement in terms of maintainability, flexibility, and customizability.

Thus, I have started writing a resume in HTML and publishing it in the form of both PDF file and static website:

- **[takuti.me/cv](https://takuti.me/cv)**
- [GitHub repository](https://github.com/takuti/cv)

![resume-latex](/images/resume-in-html/resume-html.png)

Notice that the implementation is fully based on **[lucas-clemente/cv](https://github.com/lucas-clemente/cv)**. The template builds a static resume website by using [Broccoli.js](https://broccoli.build/), and a PDF version is dynamically rendered via [Screen Capture with PhantomJS](https://phantomjs.org/screen-capture.html). In fact, the code is slightly out of date, but it's fine and I can further tune and tweak as much as I want because it's just a simple HTML and JavaScript stuff.

### Pros

Most importantly, I don't necessarily have to install TeX on my laptop anymore. After I graduated from the master's program and joined a company as an engineer, I have had a very limited opportunity to write an academic paper in LaTeX (only twice in the last 3-4 years[^1][^2]). That is, resume writing was the only reason why I install the TeX environment every time I set up a laptop. It was so frustrating for me as it keeps causing problems and requires spending quite a bit of time on resolving them. HTML and JavaScript, on the other hand, are straightforward that make the situation a lot easier and simpler.

Second, I can make my resume as much descriptive as I want by fully leveraging the markup language for creating bullet/numbered lists and inserting links into the texts. Since I'm not good at LaTeX, to be honest, I needed to keep my LaTeX-based resume as simple as possible so that it doesn't depend on any advanced macros. Consequently, the use of web technology enables me to flexibly customize the contents arbitrarily.

Additionally, in terms of customizability, web-based resume writing unlocks new possibilities such as adding visually stimulating icons with [Font Awesome](https://fontawesome.com/). It means that we can be more creative and make the resume unique and attractive for the readers; it is important to note that a resume is ultimately delivered to a certain reader (e.g., hiring manager, business partner), and hence readability, attractiveness, and uniqueness are the key factors that define a good resume.

### Cons

Overall, I prefer creating a resume in HTML to taking the traditional options such as LaTeX and Word. However, at the same time, I can imagine some potential drawbacks.

First, the web-based ones may bring a less professional look and feel. I believe it's okay in most cases, but someone could think your resume is not serious when they look at the icons and web-safe fonts. We'd then need to spend more time on designing the website and carefully choosing a layout and font. In my case though, I have already submitted a PDF version of **[takuti.me/cv](https://takuti.me/cv)** to a couple of different organizations, and there have been no problems so far.

Meanwhile, your excessive creativity & familiarity with web technology may be harmful if you over-decorate a resume. We should not forget the fundamental purpose of a resume, which gives an accurate description of your career in a readable way so that you can proceed to an interview process and/or establish a good relationship with collaborators. Just let resume do the job.

### Bottom line

I have recreated my resume in HTML and stopped using LaTeX. The change makes the resume more maintainable, and it motivates me to keep the content updated. A resume is a "portfolio" of your life that must be read by someone else, and hence choosing the most comfortable way of writing is highly important for each of us to properly convey the information.

That's how I see resume writing, and I hope my case inspires you to rethink how to create/structure yours.

[^1]: [Query-Based Simple and Scalable Recommender Systems with Apache Hivemall](https://dl.acm.org/doi/10.1145/3240323.3241592)
[^2]: [Zero-Coding UMAP in Marketing: A Scalable Platform for Profiling and Predicting Customer Behavior by Just Clicking on the Screen](https://dl.acm.org/doi/10.1145/3314183.3324970)

gha_language: HTML


text:
---
layout: default
title: APX IDL v1.2
permalink: /specification/idl/apx_idl_12
parent: APX IDL
grand_parent: Specifications
nav_order: 1
---

# APX IDL v1.2
{: .no_toc }

This is the specification for the APX Interface Definition Language (IDL) v1.2.

## Table of contents
{: .no_toc .text-delta }

1. TOC
{:toc}

## Definition files

APX IDL is used when writing *definition files* that use the `.apx` file extension.
Preferably these files should be generated by a toolchain but they can on occasion be written by hand.

Each file shall be used to describe one *APX node*. It's not allowed (in this version of IDL) to place multiple node declarations in the same file.

### Line endings

The only acceptable line ending (or EOL) is the UNIX line ending (`\n`). If you are a Windows developer you must remember to convert your APX definition file to UNIX line ending before use with any of the implementations.

### Structure of an APX Definition File

1. [APX Header](#apx-header)
2. [Node Declaration](#node-declarations)
3. [\[Type Declaration(s)\]](#type-declarations)
4. [Port Declaration(s)](#port-declarations)

**Example:**

```yaml
APX/1.2
N"Example"
T"VehicleSpeed_T"S
T"EngineSpeed_T"S
P"VehicleSpeed"T[0]:=65535
P"EngineSpeed"T[1]:=65535
```

## APX Header

The first line of the definition file must contain an APX header. This is inspired by the HTTP header and contains the letters `APX/` followed by the IDL version.

**Example:**

```yaml
APX/1.2
```

## Statements and specifiers

Following the APX header line are one or more APX statement lines.
The first letter of each line sets what kind of statement it is.

| Statement Specifier          | Statement Type                                             |
|:-----------------------------|:-----------------------------------------------------------|
| **N**                        | [Node Declaration](#node-declaration)                      |
| **T**                        | [Type Declaration](#type-declarations)                     |
| **R**                        | [Require-Port Declaration](#require-port-declaration)      |
| **P**                        | [Provide-Port Declaration](#provide-port-declaration)      |

There can be at most one statement per line as there is no statement separator in APX IDL.

## Node Declarations

A *node declaration* begins a new APX *node*. All lines following it belongs to that node.
Each node has a name (string literal), it must be unique within the same APX *client*.
There can only be a single node declaration for each definition file.

A Node declaration does not have an attribute section, only a name.

**Example:**

```yaml
N"MyNode"
```

## Type Declarations

A type declaration statement creates a new type that can be referenced later by one or more
[port declarations](#port-declarations).

**'T'**{:.label .label-blue} **Name**{:.label .label-green} **Data-Signature**{:.label .label-red}

**Example:**

```yaml
# Type "VehicleSpeed_T" with type uint16
T"VehicleSpeed_T"S
```

You can also add an optional type attribute section separated by a `:` character.

**'T'**{:.label .label-blue} **Name**{:.label .label-green} **Data-Signature**{:.label .label-red} **':'**{:.label .label-blue}
**Type-Attribute**{:.label .label-purple}

**Example:**

```yaml
# Type "OffOn_T" with type uint8 and range 0..3
T"VehicleSpeed_T"C(0,3):VT("OffOn_Off", "OffOn_On", "OffOn_Error", "OffOn_NotAvailable")
```

## Data Signatures

### Primitive Type Codes

APX uses single letter type codes. In general (but not always) a lower-case letter means *signed* while an upper-case
letter means *unsigned*.

| Type Code | Platform Type | Bits | Lower Limit | Upper Limit |
|:----------|:--------------|:-----|:------------|:------------|
| **c**     | int8          | 8    | -128        | 127         |
| **s**     | int16         | 16   | -32768      | 32767       |
| **l**     | int32         | 32   | -2147483648 |<PHONE_NUMBER>  |
| **u**     | int64         | 64   | -(2^63)     | (2^63)-1    |
| **C**     | uint8         | 8    | 0           | 255         |
| **S**     | uint16        | 16   | 0           | 65535       |
| **L**     | uint32        | 32   | 0           |<PHONE_NUMBER>  |
| **U**     | uint64        | 64   | 0           | (2^64)-1    |
| **a**     | unsigned char | 8    | 0           | 255         |

### Array Types

Any primitive type code can be followed by `[n]` where n is the number of array elements.

**Examples:**

```yaml
C[3]     # type: uint8, array-length: 3, memory-size: 3
S[4]     # type: uint16, array-length: 4, memory-size: 8 bytes
```

### Strings

Declaring an array using the `a` type code turns the type into a string. The array length in that case declares how many bytes the string can contain (at the most).

APX allows writing of strings whose length are shorter to or equal to the maximum number of array elements (bytes). In that case, APX automatically sets the remaining bytes in the string to zero or *null*. This is not the case for other array types. reading and writing these ports must contain data that matches the number of array elements in the declaration.

**Examples:**

```yaml
a[10]    # type string, array-length: 10, memory-size: 10 bytes
a[40]    # type string, array-length: 40, memory-size: 40 bytes
```

### Data Limits

All primitive type codes can have an optional lower/upper limit. This is done by adding `(Lower, Upper)` right after the type code.

- Lower: Lower data limit (decimal integer)
- Upper: Upper data limit (decimal integer)

If no data limit is defined it will implicitly derive the data limit from the underlying primitve type.

When a data limit is combined with an array declaration the limit declaration is always placed before the array declaration

**Examples:**

```yaml
C(0,1)       #type:uint8, lower-limit: 0, upper-limit: 1
C(0,3)       #type:uint8, lower-limit: 0, upper-limit: 3
S(0,10000)   #type:uint16, lower-limit: 0, upper-limit: 10000
C            #type: uint8, lower-limit: 0 (implicit), upper-limit: 255 (implicit)
S            #type: uint8, lower-limit: 0 (implicit), upper-limit: 65535 (implicit)
C(0,3)[10]   #type: uint8, array-length: 10, lower-limit (for each elem): 0 upper-limit (for each elem): 3
```

### Record Types

Record types (sometimes known as struct types) can be declared in APX by wrapping the data signature in braces `{}`.

After the opening brace `{` Any number of record elements can be added until the closing brace `}` is seen.

Each record elements consist of type parts in the following order.

- Element name: String Literal
- Element signature: [Data Signature](#data-signatures)

Record elements are entered one after the other (name, data signature, name data signature, etc.). No whitespace or separators
(such as commas are allowed). The order of record elements data is preserved during serialization/deserialization.

**Examples:**

```yaml
# Record with 2 elements. "UserId" has type uint32 while "UserName" is a string of max 64 bytes.
{"UserId"L"UserName"a[64]}
#Record with 3 elements named "Red", "Green" and "Blue". Each element is of type uint8.
{"Red"C"Green"C"Blue"C}
```

For this version of the IDL, any APX implementation do not need to support records to be defined within records (nested structures).
APX IDL 1.3 however has that conformance requirement.

### Type References

Data signatures can reference a type definition by using capital letter `T` followed by the index of the data type enclosed in brackets `[]`.

**Example:**

```yaml
T"VehicleSpeed_T"S          # This type has index 0
T"EngineSpeed_T"S           # This type has index 1
P"VehicleSpeed"T[0]:=65535  # References VehicleSpeed_T
P"EngineSpeed"T[1]:=65535   # Reference EngineSpeed_T
```

This version of the IDL does not support type reference by name (see [APX IDL v1.3](/idl/apx_idl_13)).

## Type Attributes

In this version of the IDL there is only a single type attribute, the value table.

### Value Table

A value table maps enumeration names onto a data type. You declare it using the `VT()` syntax where
you place a list string literals inside the parenthesis. Each string literal shall be separated by a comma.

**Example:**

```yaml
VT("OffOn_Off", "OffOn_On", "OffOn_Error", "OffOn_NotAvailable")
```

This version of the IDL does not have any fancy options such as manually selecting what string literal is
assigned to what value etc.

## Port Declarations

There are two types of ports in APX, *Require-ports* and *Provide-ports*. The only difference between them is wether
the data is coming into or going out from the *APX node*.

### Require-port Declaration

A Require port declaration starts with capital letter `R` followed by its name and data signature.

**'R'**{:.label .label-blue} **Name**{:.label .label-green} **Data-Signature**{:.label .label-red}

**Example:**

```yaml
# Require-port "VehicleSpeed" with data type uint16
R"VehicleSpeed"S
# Require-Port "EngineSpeed" with type reference 1
R"EngineSpeed"T[1]
```

The port definition can also have an optional port attribute section separated by the `:` character.

**'R'**{:.label .label-blue} **Name**{:.label .label-green} **Data-Signature**{:.label .label-red} **':'**{:.label .label-blue} **Port-Attributes**{:.label .label-purple}

**Example:**

```yaml
# Require-port "VehicleSpeed" with data type uint16 and init-value 65535
R"VehicleSpeed"S:=65535
# Require-Port "EngineSpeed" with type reference 1 and init-value 65535
R"EngineSpeed"T[1]:=65535
```

### Provide-port Declaration

A Provide-port declaration starts with capital letter `P` followed by its name and data signature.

**'P'**{:.label .label-blue} **Name**{:.label .label-green} **Data-Signature**{:.label .label-red}

**Example:**

```yaml
# Provide-Port "VehicleSpeed" with data type uint16
P"VehicleSpeed"S
# Provide-Port "EngineSpeed" with type reference 1
P"EngineSpeed"T[1]
```

The port definition can also have an optional port attribute section separated by the `:` character.

**'P'**{:.label .label-blue} **Name**{:.label .label-green} **Data-Signature**{:.label .label-red} **':'**{:.label .label-blue} **Port-Attributes**{:.label .label-purple}

**Example:**

```yaml
# Provide-port "VehicleSpeed" with data type uint16 and init-value 65535
P"VehicleSpeed"S:=65535
# Provide-Port "EngineSpeed" with type reference 1 and init-value 65535
P"EngineSpeed"T[1]:=65535
```

## Port Attributes

Port attributes is a list of characters that is placed after the `:` in a port declaration.
Some port attributes are a single character while other can be more than one character.

- Each attribute must be separated by a comma.
- The order of the attributes does not matter, they all get applied to your port declaration.

### Init-Value

The init-value attribute sets the initial value of the port data. If no init value exists, the port data will be initialized to zero.
This attribute can be 2 or more characters depending on the complexity of the *port data signature*.

The first character of this attribute must be the equal-sign `=`, this identfies the character(s) to come after it to be part of the init-value (until either next comma or end-of-line is encountered).

APX accepts four different forms of initializers:

- decimal
- hexadecimal
- string
- record

#### Decimal and Hexadecimal Initializers

The most common form of initializer is a decimal integer. APX also accepts hexadecimal initializers when prefixed with `0x`.

**Examples:**

```yaml
=7               #Decimal init-value
=255             #Decimal init-value
=0xff            #Hexadecimal init-value
=0xffff          #Hexadecimal init-value
```

#### String Initializer

When the data signature is of string type (arrray of typecode **a**) a string initializer is expected.
Not all implementations of APX IDL v1.2 supports unicode characters as part of the initializer so it is best not to use them until all
implementations supports [APX IDL v1.3](/idl/apx_idl_13).

**Example:**

```yaml
=""               #Empty string initializer.
```

#### Record Initializer

Record initializer works similarly to C struct initializers. The initializer must be a non-empty, brace-enclosed, comma-separated list of initializers
for each member in the data signature.

**Example:**

```yaml
={255, 255, 255} #Record initializer for data signature containing 3 members.
```

## Full Language Specification

```yaml
Document
    ApxHeader '\n' Statements

ApxHeader
    'APX/1.2'

Statements
    Statement '\n'
    Statement '\n' Statement

Statement
   NodeDeclaration
   TypeDeclaration
   RequirePortDeclaration
   ProvidePortDeclaration

NodeDeclaration
    'N' Name

TypeDeclaration
    'T' Name TypeSignature
    'T' Name TypeSignature ':' TypeAttributes

RequirePortDeclaration
    'R' Name TypeSignature
    'R' Name TypeSignature ':' PortAttributes

ProvidePortDeclaration
    'P' Name TypeSignature
    'P' Name TypeSignature ':' PortAttributes

Name
    '"' NameChars '"'

Names
    Name
    Name ',' Names

NameChars
    NameChar
    NameChar NameChars

NameChar
    'a' . 'z'
    'A' .  'F'

StringLiteral
    '"' '"'
    '"' Characters '"'

Characters
    character
    character characters

character
    '0020' . '007F' - '"'

```

repository: cogu/apx

gha_language: SCSS

repo_name: cogu/apx


text:
# ReactiveCoreData

ReactiveCoreData (RCD) is an attempt to bring Core Data into the [ReactiveCocoa](https://github.com/ReactiveCocoa/ReactiveCocoa) (RAC) world.

Currently has several files with the source code, [Specta](https://github.com/petejkim/specta) specs and a [demo application][Demo] for the Mac.

To use, copy the source files from [ReactiveCoreData](ReactiveCoreData) folder to your project. You should also have ReactiveCocoa in your project, of course.

Code from the Mac example:

```objc
// This part refetches data for the table and puts it into filteredParents
// It either fetches all Parents or filters by name, if there's something in the search field
// It will also refetch, if objectsChanged send a next
RAC(self.filteredParents) = [[[[Parent findAll]
    where:@"name" contains:filterText options:@"cd"]
    sortBy:@"name"]
    fetchWithTrigger:objectsChanged];
```

Another example of background processing:
```objc
[[[[triggerSignal
    performInBackgroundContext:^(NSManagedObjectContext *context) {
        [Parent insert];
    }]
    saveContext]
    deliverOn:RACScheduler.mainThreadScheduler]
    subscribeNext:^(id _) {
        // Update UI
    }];

// We can also react to main context's merge notifications to update the UI
[mainContext.rcd_merged
    subscribeNext:^(NSNotification *note){
        // Update UI
    }];
```

See the test [Specs][Specs] for some crude usage examples.

Also checkout the demo application in the project. It shows a simple table-view with Core Data backed storage using ReactiveCoreData and ReactiveCocoa for connecting things.

The headers also provide documentation for the various methods.

It's not feature-complete and more could be done but will be added based on actual usage and your contributions.

That being said, it should work both with shoebox and document-based applications, where there are many object contexts.

### Done:

- Start signals that represent and modify NSFetchRequests (findAll, findOne) from NSManagedObject.
- `-[RACSignal where:args:]` method that sets a predicate with given format that can have signals as its arguments. This brings execution of NSFetchRequests into the Reactive domain. As any signal to predicate changes, the query is modified and sent next — to be fetched, for example.
- A couple of signal-aware convenience methods for common predicate cases, like for CONTAINS predicate and for equal
- `[RACSignal limit:]` that accepts either a value or a signal.
- `[RACSignal sortBy:]` that accepts either a "key" string, or a "-key" (for descending sort), or a sort descriptor, or an array of sort descriptors, or a signal with any of these
- `fetch` and `count` methods on RACSignal to execute the NSFetchRequest that's passed to them in the current NSManagedObjectContext and send the resulting array (or count) as "next".
- `fetchWithTrigger:` which will rerun the fetch if the trigger fires any value.
- fetching objectID and converting objectIDs to objects in current context
- Running in background contexts
- Saving of non-main contexts merges them into the main context.
- Signal that's fired when a context is saved (wraps NSManagedObjectContextDidSaveNotification).
- Signal that's fired after a merge.
- Support not only for shoebox applications (with one main managed object context) but also document-based applications where you have a separate context for each document.

[Demo]: ReactiveCoreDataApp/ASWAppDelegate.m
[Specs]: ReactiveCoreDataTests/RACManagedObjectFetchSpecs.m

repository: lohilabs/ReactiveCoreData

repo_name: lohilabs/ReactiveCoreData


text:
# Hot State Reloading (HSR)

Jumpsuit ships with a lightweight version of hot module reloading and is super easy to setup.

In contrast to traditional hot module reloading, Jumpsuit efficiently saves your state and **refreshes** your entire app, then restores the previously saved state.

In the example below, we are using a brand new install of Create-React-App!

```javascript
// Import the HSR rerenderer from Jumpsuit
import { Rerender } from 'jumpsuit'

// Import your app
import App from './App'

// For webpack
if (module.hot) {
  module.hot.accept('./App', Rerender)
}

// For other build systems you must be able to subscribe to file changes to trigger the Rerender. We will continue to post recipes here for those build systems as we see them.

```

Although it may not appear as smooth as traditional HMR, it is very reliable and **much** easier to set up. For anyone wanting support for traditional HMR, file an issue and we can discuss it!

repository: Jason-Cooke/jumpsuit

repo_name: Jason-Cooke/jumpsuit


text:
<img src="./logo.svg" width=350>

- [solidus.io](http://solidus.io/)
- [Documentation](https://guides.solidus.io)
- [Join our Slack](http://slack.solidus.io/) ([solidusio.slack.com](http://solidusio.slack.com))
- [solidus-security](https://groups.google.com/forum/#!forum/solidus-security) mailing list
- [Supported Solidus extensions](http://extensions.solidus.io/)

## solidus_cmd

solidus_cmd is a command line utility for creating extensions for the [Solidus ecommerce platform](https://github.com/solidusio/solidus).

## DEPRECATION NOTICE :warning: :construction:

This extension is deprecated in favor of [Solidus extension dev tools](https://github.com/solidusio-contrib/solidus_extension_dev_tools).

## Getting started

Install the gem!

```bash
$ gem install solidus_cmd
```
Create your Solidus extension with the `solidus extension` command.

```bash
$ solidus extension my_extension
```

A Solidus extension is bundled as a Ruby gem, so be sure to update your `.gemspec` file.

You can now load your extension in your Solidus project's Gemfile.

### Passing options to extensions generator

You can pass `--ci` option to the generator command to configure the CI
platform to use in the extension. By default circleci is used and recommended
but you can also use travis with:

```bash
$ solidus extension my_extension --ci=travis
```

## Questions?

The best way to ask questions is via the [#support channel on the Solidus Slack](https://solidusio.slack.com/messages/support/details/).

## Tests

We use [RSpec](http://rspec.info) for tests. Ideally all PRs include tests!

## Contributing

Solidus is an open source project and we encourage contributions.

gha_language: Ruby


text:
# React Component State and Props

## State

State is simply the current values of the properties used to render a component. Your brain will try to make it more complex than that, so remember this statement.

> State is simply the current values of the properties used to render a component.

You initialize state by defining a `state` object in your component constructor. Let's take a look at how to implement state for our **`Kennel`** component.

```js
import React, { Component } from "react"
import EmployeeList from "./EmployeeList"
import LocationList from "./LocationList"

export default class Kennel extends Component {

    state = {
        employees: [
            { name: "Jessica Younker" },
            { name: "Jordan Nelson" },
            { name: "Zoe LeBlanc" },
            { name: "Blaise Roberts" }
        ],
        locations: [
            { name: "Nashville North" },
            { name: "Nashville South" }
        ]
    }

    render() {
        return (
            <React.Fragment>
                <LocationList locations={this.state.locations} />
                <EmployeeList employees={this.state.employees} />
            </React.Fragment>
        );
    }
}
```

Each of those attributes for the child components become keys on a `props` object.

> EmployeeList.js

```js
import React, { Component } from 'react'

export default class EmployeeList extends Component {
    render() {
        return ({
            /*
            This is a reference to the employees array
            defined in the state object in Kennel.js
            */
            this.props.employees
        })
    }
}
```

Now you can use the `map()` array method to convert the raw data into HTML elements.

```js
import React, { Component } from 'react'

export default class EmployeeList extends Component {
    render() {
        return (
            <React.Fragment>
            {
                this.props.employees.map(employee =>
                    <div>
                        {employee.name}
                    </div>
                )
            }
            </React.Fragment>
        )
    }
}
```

## Using State in a Component

![](./images/state.png)

## Passing State to a Child Component

![](./images/statetoprops.png)

## Practice Exercise - Displaying Locations

Update your application so that the array of locations is passed from the **`Kennel`** state to the props of **`LocationList`**. Then use the `map()` method to display all location names.

## Practice Exercise - Displaying Animals

Now that you are passing state from the **`Kennel`** to the **`EmployeeList`** and **`LocationList`**, you're going to list animals now.

1. Create a new state array in the **`Kennel`** component named `animals`.
2. Create a **`AnimalList`** component for displaying animals.
3. Update **`Kennel`** to pass its `animals` state to **`AnimalList`** and use the appropriate key on `this.props` to display all animal names.

## Advanced Exercise

1. Add an `id` property to each of your existing resources.
1. Add the following `owners` property to the **`Kennel`** state.
    ```js
    state = {
        employees: [
            { id: 1, name: "Jessica Younker" },
            { id: 2, name: "Jordan Nelson" },
            { id: 3, name: "Zoe LeBlanc" },
            { id: 4, name: "Blaise Roberts" }
        ],
        locations: [
            { id: 1, name: "Nashville North" },
            { id: 2, name: "Nashville South" }
        ],
        animals: [
            { id: 1, name: "Doodles" },
            { id: 2, name: "Jack" },
            { id: 3, name: "Angus" },
            { id: 4, name: "Henley" },
            { id: 5, name: "Derkins" },
            { id: 6, name: "Checkers" }
        ],
        owners: [
            { id: 1, name: "Ryan Tanay" },
            { id: 2, name: "Emma Beaton" },
            { id: 3, name: "Dani Adkins" },
            { id: 4, name: "Adam Oswalt" },
            { id: 5, name: "Fletcher Bangs" },
            { id: 6, name: "Angela Lee" }
        ]
    }
    ```
1. You create the intersection table and assign each animal to an owner.

Your task is to update the **`AnimalList`** component to also display the name of the animal's owner. You'll need to pass multiple collections - not just `animals` - to the component in order to accomplish this.


text:
# DelayedConstructor

**Archived**, use [`std::optional`](https://en.cppreference.com/w/cpp/utility/optional) instead.

[![Build Status](https://travis-ci.org/klalumiere/DelayedConstructor.svg?branch=master)](https://travis-ci.org/klalumiere/DelayedConstructor/)

C++11 class that defers the *construction* of an object while still using *automatic* memory allocation (i.e. the stack). In other words, this class is a simplified, single-object stack allocator.

To use this class, simply download or copy-paste [the main header file](https://github.com/klalumiere/DelayedConstructor/blob/master/include/DelayedConstructor/DelayedConstructor.h) and include it in your project.

## Rationale

In c++, the typical way to control *when* an object is built and destroyed is to use pointers

```c++
std::unique_ptr<const int> ptr;
/** Do some stuff **/
ptr.reset(new const int{5});
/** Do some other stuff **/
ptr.reset();
```

Unfortunately, pointers do not come with value semantics. Moreover, it is usually more efficient, for small objects, to use automatic allocated memory (the *stack*) than dynamic allocated memory (the *heap*). **DelayedConstructor** aims to solve these problems. It is straightforward to use,

```c++
DelayedConstructor<const int> s;
/** Do some stuff **/
s.construct(5);
/** Do some other stuff **/
s.destruct();
```

Internally, it uses automatic allocated memory and placement new operator as memory management strategy,

```c++
template<typename... Args>
void construct(Args&&... args) {
    /** ... **/
    data = new(&stackMemory) Type{std::forward<Args>(args)...};
}
/** ... **/
typename std::aligned_storage<sizeof(Type), alignof(Type)>::type stackMemory;
typename std::add_pointer<Type>::type data = nullptr;
```

Since **DelayedConstructor** can contain an object *or not*, it can be seen as a lightweight version of [Boost Optional](http://www.boost.org/doc/libs/1_61_0/libs/optional/doc/html/index.html),

```c++
const DelayedConstructor<const int> s0{};
const DelayedConstructor<const int> s1{42};
s0.isConstructed(); // Returns false
s1.isConstructed(); // Returns true
```

It is important to notice that **it is not mandatory to call the destruct() function** when an object has been constructed. In the example above, the destructor of **const int** will be called automatically when **s1** reaches the end of its scope. If you were to call **s1.destruct()** explicitly, nothing would happen at the end of the scope of **s1** so that the destructor of **const int** is always called once and only once, just like it is with value semantics objects,

```c++
~DelayedConstructor() {
    destruct();
}
/** ... **/
void destruct() {
    if(isConstructed()) data->~Type();
    data = nullptr;
}
```

A factory function similar to [std::make_pair](http://en.cppreference.com/w/cpp/utility/pair/make_pair) is also included,

```c++
const auto s = createDelayedConstructor(42);
s.get(); // Returns 42
```

Errors are handled using *cassert*. For more information, look at [the unit tests (Google Test)](https://github.com/klalumiere/DelayedConstructor/blob/master/src/DelayedConstructor_tests.cpp) or at the [class source](https://github.com/klalumiere/DelayedConstructor/blob/master/include/DelayedConstructor.h).

[Discussion about this class on reddit](https://www.reddit.com/r/cpp/comments/56pccl/c11_class_that_defers_the_construction_of_an/)

repository: klalumiere/DelayedConstructor

repo_name: klalumiere/DelayedConstructor


text:
# Extension Pack for Visual Studio Code

Includes the basic extensions to get started with [NodeJS](http://nodejs.com/) & [Flow](https://flow.org/) development in Visual Studio Code.

## Extensions

<!-- +Extensions -->
* [Facebook Flow](https://marketplace.visualstudio.com/publishers/flowtype) [Flow Language Support](https://marketplace.visualstudio.com/items?itemName=flowtype.flow-for-vscode) :: Flow support for VS Code
* [gcazaciuc](https://marketplace.visualstudio.com/publishers/gcazaciuc) [vscode-flow-ide](https://marketplace.visualstudio.com/items?itemName=gcazaciuc.vscode-flow-ide) :: Visual studio code Flowtype support
* [itmcdev](https://marketplace.visualstudio.com/publishers/itmcdev) [ITMCDev Babel Extension Pack](https://marketplace.visualstudio.com/items?itemName=itmcdev.node-babel-extension-pack) :: A collection of extensions for developming with NodeJS & Babel inside ITMC
<!-- -Extensions -->

## Contact

Please file any [issues](https://github.com/itmcdev/vscode-extensions/issues).

repository: ITMCdev/vscode-extensions

repo_name: ITMCdev/vscode-extensions


text:
# Typescript-Catapult

A fully automated Typescript environment to start building your tools for catapult.

Because of a security vulnerability in a dependency in nem-sdk, you need to force resolution of dependencies.
Run `npx npm-force-resolutions` before you do `npm install`.

You do **not** need to run `npx npm-force-resolutions` if you use yarn.

# Easy as 1,2,3
1- You can use this repo by cloning it to your local machine in a new folder as follow
```bash
git init
git clone https://github.com/luxtagofficial/Typescript-Catapult.git
```
2- Once done you need to point the remote origin to your own git repository
```bash
git remote set-url origin https://github.com/USERNAME/REPOSITORY.git
```
3- There was never a third step, start writing some code!
# What do you get
**Linting:**
- [tslint](https://github.com/palantir/tslint)

**Testing:**
- [jest](https://github.com/facebook/jest)
- [sinon](https://github.com/sinonjs/sinon)

**development:**
- [Typescript](https://github.com/Microsoft/TypeScript)
- [nem2-sdk](https://github.com/nemtech/nem2-sdk-typescript-javascript)
- [apostille-library](https://github.com/luxtagofficial/Apostille-library)
- [nem-sdk](https://github.com/QuantumMechanics/NEM-sdk)
- [crypto-js](https://github.com/brix/crypto-js)
- [js-sha3](https://github.com/emn178/js-sha3)
- [lodash](https://github.com/lodash/lodash)
- [rxjs](https://github.com/ReactiveX/rxjs)

**Automation:**
- Travis CI
- Code Coverage
- Automatic release and changelog (Please read the [Guide](./.github/GUIDE.md) on how to use it)

# Contribution
For future contributors please make sure to read the [Contributing Guide](./.github/GUIDE.md) before making a pull request

Thank you to all the people who already contributed.

repository: luxtagofficial/Typescript-Catapult

repo_name: luxtagofficial/Typescript-Catapult


text:
# Force update

## Configuration

To enforce or suggest updates for client apps, you can utilize the `AddForceUpdate(...)` extension method from the `LeanCode.ForceUpdate` package in the `Startup.cs` file. This method is available on the `IServiceCollection` and needs to be called after `AddCQRS(...)`. The following example demonstrates the usage:

```csharp
public override void ConfigureServices(IServiceCollection services)
{
    // ...
    services.AddCQRS(CQRSTypes, CQRSTypes)
            .AddForceUpdate(
                new AndroidVersionsConfiguration(
                    new Version(AndroidMinimumRequiredVersion),
                    new Version(AndroidCurrentlySupportedVersion)),
                new IOSVersionsConfiguration(
                    new Version(IOSMinimumRequiredVersion),
                    new Version(IOSCurrentlySupportedVersion)));
    // ...
}
```

## Version support

After configuation above. [VersionSupport](../../src/Infrastructure/LeanCode.ForceUpdate.Contracts/VersionSupport.cs) query is created and available at `/cqrs/query/LeanCode.ForceUpdate.Contracts.VersionSupport`. The query takes `Platform` (either IOS or Android) and the `Version` of the client app as parameters. It returns whether the client's version is supported, currently supported version and minimum required version for specified provider.

By default, if the client's version is below the minimum required version, the response will indicate that an update is needed. If the client's version is between minimum required and currently supported version, the response will suggest an update. If the app version is greater or equal to the currently supported version, the response will indicate that the app is up to date. It's also possible to change this behavior by creating custom version handler and overriding `CheckVersionAsync` method from the [VersionHandler](../../src/Infrastructure/LeanCode.ForceUpdate/LeanCode.ForceUpdate.Services/VersionHandler.cs) class, responsible for version checking.

repository: leancodepl/corelibrary

gha_language: C#

repo_name: leancodepl/corelibrary


text:
![Square logo]

# Square .NET SDK

[![Build](https://github.com/square/square-dotnet-sdk/actions/workflows/dotnet.yml/badge.svg)](https://github.com/square/square-dotnet-sdk/actions/workflows/dotnet.yml)
[![NuGet](https://badge.fury.io/nu/Square.svg)](https://badge.fury.io/nu/Square)
[![Apache-2 license](https://img.shields.io/badge/license-Apache2-brightgreen.svg)](https://www.apache.org/licenses/LICENSE-2.0)

Use this library to integrate Square payments into your app and grow your business with Square APIs including Catalog, Customers, Employees, Inventory, Labor, Locations, and Orders.

## Requirements

Use of the Square .NET SDK requires:

* NET Standard 2.0 or higher

Generating DLLs from source requires:

* [RestSharp](https://www.nuget.org/packages/RestSharp) - 106.3.1 or later
* [Json.NET](https://www.nuget.org/packages/Newtonsoft.Json/) - 11.0.2 or later

## Installation

### Install with Package Manager Console
```
Install-Package Square
```

### Install with NuGet
```
nuget install Square
```

### Install with .NET Core
```
dotnet add package Square
```

## API documentation

### Payments
* [Payments]
* [Refunds]
* [Disputes]
* [Checkout]
* [Apple Pay]
* [Terminal]

### Orders
* [Orders]

### Subscriptions
* [Subscriptions]

### Invoices
* [Invoices]

### Items
* [Catalog]
* [Inventory]

### Customers
* [Customers]
* [Customer Groups]
* [Customer Segments]

### Loyalty
* [Loyalty]

### Bookings
* [Bookings]

### Business
* [Merchants]
* [Locations]
* [Devices]

### Team
* [Team]
* [Employees]
* [Labor]
* [Cash Drawers]

### Financials
* [Bank Accounts]

### Online
* [Sites]
* [Snippets]

### Authorization APIs
* [Mobile Authorization]
* [OAuth]

### Deprecated APIs
* [V1 Employees]
* [V1 Transactions]
* [V1 Items]
* [Transactions]

## Usage

First time using Square? Here’s how to get started:

1. **Create a Square account.** If you don’t have one already, [sign up for a developer account].
1. **Create an application.** Go to your [Developer Dashboard] and create your first application. All you need to do is give it a name. When you’re doing this for your production application, enter the name as you would want a customer to see it.
1. **Make your first API call.** Almost all Square API calls require a location ID. You’ll make your first call to `ListLocations`, which happens to be one of the API calls that don’t require a location ID. For more information about locations, see the [Locations] API documentation.

Now let’s call your first Square API.

```csharp
using System;
using Square;
using Square.Models;
using Square.Exceptions;

namespace Example
{
    public class Example
    {

        static void Main(string[] args)
        {
            SquareClient client = new SquareClient.Builder()
                .Environment(Square.Environment.Sandbox)
                .AccessToken("YOUR_SANDBOX_ACCESS_TOKEN")
                .Build();

            var api = client.LocationsApi;

            try
            {
                var locations = api.ListLocations().Locations;
                Console.WriteLine("Successfully called ListLocations");
                // Your business logic here
            }
            catch (ApiException e)
            {
                var errors = e.Errors;
                var statusCode = e.ResponseCode;
                var httpContext = e.HttpContext;
                Console.WriteLine("ApiException occurred:");
                Console.WriteLine("Headers:");
                foreach (var item in httpContext.Request.Headers)
                {
                    //Display all the headers except Authorization
                    if (item.Key != "Authorization")
                    {
                        Console.WriteLine("\t{0}: \{1}", item.Key, item.Value);
                    }
                }
                Console.WriteLine("Status Code: \{0}", statusCode);
                foreach (Error error in errors)
                {
                    Console.WriteLine("Error Category:{0} Code:{1} Detail:{2}", error.Category, error.Code, error.Detail);
                }

                // Your error handling code
            }
            catch (Exception e)
            {
                Console.WriteLine("Exception occurred");
                // Your error handling code
            }
        }
    }
}
```

Next, get an access token and reference it in your code:

1. Open the Developer Dashboard and select your application. The **Credentials** page for your app opens by default.
1. Set the dashboard mode to **Sandbox Settings** for a sandbox access token.
1. Copy the Access Token in the Credentials section of the page and replace `YOUR_SANDBOX_ACCESS_TOKEN` with the token.

**Important** When you eventually switch from trying things out on sandbox to actually working with your real production resources, you should not embed the access token in your code. Make sure you store and access your production access tokens securely.

## SDK patterns
If you know a few patterns, you’ll be able to call any API in the SDK. Here are some important ones:

### Get an access token

To use the Square API to manage the resources (such as payments, orders, customers, etc.) of a Square account, you need to create an application (or use an existing one) in the Developer Dashboard and get an access token.

When you call a Square API, you call it using an access key. An access key has specific permissions to resources in a specific Square account that can be accessed by a specific application in a specific developer account.
Use an access token that is appropriate for your use case. There are two options:

- To manage the resources for your own Square account, use the Personal Access Token for the application created in your Square account.
- To manage resources for other Square accounts, use OAuth to ask owners of the accounts you want to manage so that you can work on their behalf. When you implement OAuth, you ask the Square account holder for permission to manage resources in their account (you can define the specific resources to access) and get an OAuth access token and refresh token for their account.

**Important** For both use cases, make sure you store and access the tokens securely.

### Import and Instantiate the Client Class

To use the Square API, you import the Client class, instantiate a Client object, and initialize it with the appropriate access token. Here’s how:

- Initialize the `SquareClient` with environment set to sandbox:

```csharp
SquareClient client = new SquareClient.Builder()
    .Environment(Square.Environment.Sandbox)
    .AccessToken("YOUR_SQUARE_SANDBOX_ACCESS_TOKEN")
    .Build();
```

- To access production resources, set environment to production:

```csharp
SquareClient client = new SquareClient.Builder()
    .Environment(Square.Environment.Production)
    .AccessToken("YOUR_SQUARE_ACCESS_TOKEN")
    .Build();
```

- To set a custom environment provide a `CustomUrl`, and set the environment to `Square.Environment.Custom`:

```csharp
SquareClient client = new SquareClient.Builder()
    .Environment(Square.Environment.Custom)
    .CustomUrl("https://your.customdomain.com")
    .AccessToken("YOUR_SQUARE_ACCESS_TOKEN")
    .Build();
```
### Get an Instance of an API object and call its methods

Each API is implemented as a class. The Client object instantiates every API class and exposes them as properties so you can easily start using any Square API. You work with an API by calling methods on an instance of an API class. Here’s how:

- Work with an API by calling the methods on the API object. For example, you would call ListCustomers to get a list of all customers in the Square account:

```csharp
ListCustomersResponse listCustomersResponse = client.CustomersApi.ListCustomers();
```

See the SDK documentation for the list of methods for each API class.

- Pass complex parameters (such as create, update, search, etc.) as a model. For example, you would pass a model containing the values used to create a new customer using create_customer:

```csharp
CustomersApi api = client.CustomersApi;

Address address = new Address.Builder()
    .AddressLine1("1455 Market St")
    .AddressLine2("San Francisco, CA 94103")
    .Build();

// Create a unique key(idempotency) for this creation operation so you don't accidentally
// create the customer multiple times if you need to retry this operation.
// For the purpose of example, we mark it as `unique_idempotency_key`
CreateCustomerRequest createCustomerRequest = new CreateCustomerRequest.Builder()
    .IdempotencyKey("unique_idempotency_key")
    .GivenName("John")
    .FamilyName("Smith")
    .Address(address)
    .Build();

// Call createCustomer method to create a new customer in this Square account
try {
    var response = api.CreateCustomer(createCustomerRequest);
} catch (ApiException e) {
    var errors = e.Errors;
    var statusCode = e.ResponseCode;
    var httpContext = e.HttpContext;

    // Your error handling code
    Console.WriteLine("ApiException when calling API");
}

```

- Use idempotency for create, update, or other calls that you want to avoid calling twice. To make an idempotent API call, you add the idempotency_key with a unique value in the Hash for the API call’s request.
- Specify a location ID for APIs such as Transactions, Orders, and Checkout that deal with payments. When a payment or order is created in Square, it is always associated with a location.

### Handle the response

If your API call suceeds, a response object that contains HttpContext that describe both the request and the response. Otherwise, it will throw `ApiException`:

```csharp
try {
    var locations = api.ListLocations().Locations;
    Console.WriteLine("Successfully called ListLocations");
    // Your business logic here
}
catch (ApiException e){
    var errors = e.Errors;
    var statusCode = e.ResponseCode;
    var httpContext = e.HttpContext;
    Console.WriteLine("ApiException occurred");
    // Your error handling code
}
```

## Tests

First, clone the repo locally and `cd` into the directory.

```sh
git clone https://github.com/square/square-dotnet-sdk.git
cd square-dotnet-sdk
```

Before running the tests, find a sandbox token in your [Developer Dashboard] and set a `SQUARE_ACCESS_TOKEN` environment variable.

```sh
export SQUARE_ENVIRONMENT=sandbox
export SQUARE_ACCESS_TOKEN="YOUR_SANDBOX_ACCESS_TOKEN"
```

Run the tests with below command

```sh
dotnet test
```

## Learn more

The Square Platform is built on the [Square API]. Square has a number of other SDKs that enable you to securely handle credit card information on both mobile and web so that you can process payments via the Square API.

You can also use the Square API to create applications or services that work with payments, orders, inventory, etc. that have been created and managed in Square’s in-person hardware products (Square Point of Sale and Square Register).

repository: AdrianaMusic/square-dotnet-sdk

repo_name: AdrianaMusic/square-dotnet-sdk


text:
# Delani-Studio by **Tom Luther**

## Description
A web application dedicated to showing projects currently accomplished by Delani Studios, also giving the user the freedom to leave a comment on the site, regarding the projects.

## Technologies Used

* HTML5 for the layout.
* CSS3 for the styling.
* jQuery for the algorithm responsible for interactivity.

## Active Link
Currently working link to the project: https://tluther133.github.io/delani-studios/

## BDD
| Behaviour      | Input        | Output       |
| :------------- | :----------: | -----------: |
|   Name:  |  Tom Luther  |     |
| Mobile Number:  | +254706279246 |   |
| Message:   |  Appreciate your work. Would like to work together.     |     |
| Press Submit |     |Pop up "Tom Luther" , Message Received. Appreciate you reaching out to us.|

## Known Bugs
* The site may or may not be responsive.
* Mail Chimp API has a few bugs.

## Contact Information

If you wish to inquire or comment, contact me on mobile: +254706279246

## License
*MIT License

Copyright (c) 2021 Tom Luther

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

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

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


text:
# vdx-wildfly-testsuite
Testsuite for projectodd/vdx [https://github.com/projectodd/vdx/] pretty print feature in WildFly

[![Build Status](https://travis-ci.org/jboss-eap-qe/vdx-wildfly-testsuite.svg?branch=master)](https://travis-ci.org/jboss-eap-qe/vdx-wildfly-testsuite)

Running the Testsuite
-------------------

Ensure you have JDK 8 (or newer) installed

> java -version

Ensure you have Maven 3.2.5 (or newer) installed

> mvn -version

To run against local (e.g. latest WildFly master build) server use following command:

> mvn -P all test -Djboss.home=/path/to/location/of/the/server

To run against released WildFly 10.1.0.Final (will be downloaded) use following command, :

> mvn -P all test

Profile `all` redirects test output to file, so look at $TEST_NAME-output.txt files in target/surefire directory if needed.

Running one test
-------------------

To run test against application server running in standalone mode:

> mvn test -Djboss.home=/path/to/location/of/the/server -Dtest=$TEST

To run test against application server running in domain mode:

> mvn test -Djboss.home=/path/to/location/of/the/server -Ddomain -Dtest=$TEST

`-Ddomain` is hint to use correct `wildfly-arquillian-container` artifact

Of course you can specify concrere test not just whole TestCase class - for example `JBossWSTestCase#incorrectValueOfModifyWsdlAddressElement`

Used technologies
-----------------

JDK 8 (https://docs.oracle.com/javase/8)

Apache Maven 3.2.5 (https://maven.apache.org)

Creaper (https://github.com/wildfly-extras/creaper/)

Arquillian (http://arquillian.org/)

JUnit (http://junit.org/junit4/)

Groovy (http://www.groovy-lang.org/)

Travis CI
---------

There is Travis CI configured to test PRs.

Technical Details
-----------------
Tests for standalone and domain mode are differentiated by JUnit annotation `@Category(StandaloneTests.class)` or `@Category(DomainTests.class)`

Modification of the configuration file is driven by ServerConfig annotation, underlying technology is based on xml transformations done via Creaper and Groovy.
Custom configuration files or modification scripts can be specified by ServerConfig annotation, modification scripts can be parametrized.
There is support to use directly offline Creaper commands if ServerConfig annotation does not provide means necessary for test scenario.
Groovy transformations are taken from `src/test/resources/org/wildfly/test/integration/vdx/transformations`

Test-suite takes care of creating backup of the configuration before changes are applied. Configuration is restored after every test to avoid interference with other tests.
Logs from the server and modified server configurations are archived in `target/test-output/` directory, structure is multi-level based on TestCase and test names.

Example of typical TestCase class definition for standalone mode:
```java
@RunAsClient
@RunWith(Arquillian.class)
@Category(StandaloneTests.class)
public class YourNewTestCase extends TestBase {
    ...
}
```

Example of test definition for webservices:
```java
    @Test
    @ServerConfig(configuration = "standalone.xml", xmlTransformationGroovy = "webservices/AddIncorrectlyNamedModifyWsdlAddressElement.groovy",
            subtreeName = "webservices", subsystemName = "webservices")
    public void newTest() throws Exception {
        container().tryStartAndWaitForFail();

        String errorLog = container().getErrorMessageFromServerStart();
        assertContains(errorLog, "OPVDX001: Validation error");
        ...
    }
```


text:
# at

> Executes commands at a specified time.

- Open an `at` prompt to create a new set of scheduled commands, press Ctrl+D to save and exit:

`at {{hh:mm:ss}}`

- Execute the commands and email the result using a local mailing program such as sendmail:

`at {{hh:mm:ss}} -m`

- Execute a script at the given time:

`at {{hh:mm:ss}} -f {{path/to/file}}`


text:
---
layout: post
title: "Bartini Beriev VVA-14"
date: 2015-05-19 16:16:12 -0700
---

[Bartinit Beriev
VVA-14](http://en.wikipedia.org/wiki/Bartini_Beriev_VVA-14)

This thing is so cool looking. The Russians had some seriously wierd
looking surface effect aircraft.

<img src="http://upload.wikimedia.org/wikipedia/commons/7/7d/Beriev_VVA-14_in_2010.jpg" alt="Beriev VVA-14 in 2010.jpg" height="800" width="1200">

extension: markdown


text:
# Unscreen API demo using node.js (https://unscreen.com/api)
This repo contains a minimal node.js project that shows
* how to upload files to the unscreen API
* poll the unscreen API to get the status of the video file
* use webhooks to avoid polling

## Getting started
* Copy .env.sample to .env
* Add your unscreen API key to .env file
* Install dependencies with `npm i`
* Start tunnel using ngrok `npm run ngrok`(optional)
* Copy your public ngrok URL (http://XXXXXXXXXXXX.ngrok.io) into your .env file (optional)
* Start the server `npm start`
* Open the browser at `http://localhost:3000`
* Upload a video file
* Watch the console output
* Your processed file will automatically be downloaded in the browser

## Demo time

Data flow of your video file
![Data Flow Diagram](https://github.com/remove-bg/unscreen-api-nodejs-demo/blob/master/readme_assets/data_flow.jpg?raw=true)

Video running the demo with polling
![Polling Demo Video](https://github.com/remove-bg/unscreen-api-nodejs-demo/blob/master/readme_assets/polling.gif?raw=true)

Video running the demo with a webhook
![Webhook Demo Video](https://github.com/remove-bg/unscreen-api-nodejs-demo/blob/master/readme_assets/webhook.gif?raw=true)

## Your turn

Feel free to use this as a starting ground for your own unscreen API integration projects

repository: Kiatra/unscreen-api-nodejs-demo

repo_name: Kiatra/unscreen-api-nodejs-demo


text:
# UML Class Editor for OpenPonk
[![Nightly](https://github.com/OpenPonk/class-editor/actions/workflows/nightly.yml/badge.svg)](https://github.com/OpenPonk/class-editor/actions/workflows/nightly.yml) [![Coverage Status](https://coveralls.io/repos/github/OpenPonk/class-editor/badge.svg?branch=master)](https://coveralls.io/github/OpenPonk/class-editor?branch=master)

*part of [OpenPonk](https://github.com/OpenPonk/openponk) platform*

## Installation

```smalltalk
Metacello new
	baseline: 'ClassEditor';
	repository: 'github://OpenPonk/class-editor/repository';
	load: 'complete'.
```

repository: OpenPonk/class-editor

gha_language: Smalltalk

repo_name: OpenPonk/class-editor