text:
[`🏠`](/) / [`Database Management Systems`](/s/dbms/) / [`Previous Years`](/s/dbms/previous-years/) / [`May 2019`](/s/dbms/previous-years/may-19/) / `Q1`

### Q1a. Differentiate between file system and database system with an example.

| S.NO. | File System                                                                                | DBMS                                                                    |
|-------|-------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------|
| 1.    | File system is a software that manages and organizes the files in a storage medium within a computer. | DBMS is a software for managing the database.                           |
| 2.    | Redundant data can be present in a file system.                                                       | In DBMS there is no redundant data.                                     |
| 3.    | It doesn’t provide backup and recovery of data if it is lost.                                         | It provides backup and recovery of data even if it is lost.             |
| 4.    | There is no efficient query processing in file system.                                                | Efficient query processing is there in DBMS.                            |
| 5.    | There is less data consistency in file system.                                                        | There is more data consistency because of the process of normalization. |
| 6.    | It is less complex as compared to DBMS.                                                               | It has more complexity in handling as compared to file system.          |
| 7.    | File systems provide less security in comparison to DBMS.                                             | DBMS has more security mechanisms as compared to file system.           |
| 8.    | It is less expensive than DBMS.                                                                       | It has a comparatively higher cost than a file system.                  |

### Q1b. Explain referential integrity with suitable example.

→ Referential integrity refers to the accuracy and consistency of data within a relationship.

→ In relationships, data is linked between two or more tables. This is achieved by having the foreign key (in the associated table) reference a primary key value (in the primary – or parent – table). Because of this, we need to ensure that data on both sides of the relationship remain intact.

→ So, referential integrity requires that, **whenever a foreign key value is used it must reference a valid, existing primary key in the parent table.**

#### Example

→ If we delete row number 15 in a primary table, we need to be sure that there’s no foreign key in any related table with the value of 15. We should only be able to delete a primary key if there are no associated rows. Otherwise, we would end up with an orphaned record.

![](https://database.guide/wp-content/uploads/2016/05/referential-integrity-orphaned-record.png)

→ So referential integrity will prevent users from:

* Adding rows to a related table if there is no associated row in the primary table.
* Changing values in a primary table that result in orphaned records in a related table.
* Deleting rows from a primary table if there are matching related rows.

#### Consequences of a Lack of Referential Integrity

→ A lack of referential integrity in a database can lead to incomplete data being returned, usually with no indication of an error. This could result in records being “lost” in the database, because they’re never returned in queries or reports.

→ It could also result in strange results appearing in reports (such as products without an associated company).

### Q1c. List the steps required to map ER, EER mode to relational model.

→ ER Model, when conceptualized into diagrams, gives a good overview of entity-relationship, which is easier to understand. ER diagrams can be mapped to relational schema, that is, it is possible to create relational schema using ER diagram. We cannot import all the ER constraints into relational model, but an approximate schema can be generated.

→ There are several processes and algorithms available to convert ER Diagrams into Relational Schema. We may focus here on the mapping diagram contents to relational basics.

#### 1. Mapping Entity

* Create table for each entity.
* Entity's attributes should become fields of tables with their respective data types.
* Declare primary key.

#### 2. Mapping Relationship

* Create table for a relationship.
* Add the primary keys of all participating Entities as fields of table with their respective data types.
* If relationship has any attribute, add each attribute as field of table.
* Declare a primary key composing all the primary keys of participating entities.
* Declare all foreign key constraints.

#### 3. Mapping Weak Entity Sets

* Create table for weak entity set.
* Add all its attributes to table as field.
* Add the primary key of identifying entity set.
* Declare all foreign key constraints.

#### 4. Mapping Hierarchical Entities

* Create tables for all higher-level entities.
* Create tables for lower-level entities.
* Add primary keys of higher-level entities in the table of lower-level entities.
* In lower-level tables, add all other attributes of lower-level entities.
* Declare primary key of higher-level table and the primary key for lower-level table.
* Declare foreign key constraints.

### Q1d. Explain the ACID properties of transactions.

→ A transaction is a single logical unit of work which accesses and possibly modifies the contents of a database. Transactions access data using read and write operations.

→ In order to maintain consistency in a database, before and after the transaction, certain properties are followed. These are called ACID properties.

#### Atomicity

→ By this, we mean that either the entire transaction takes place at once or doesn’t happen at all. There is no midway i.e. transactions do not occur partially. Each transaction is considered as one unit and either runs to completion or is not executed at all. It involves the following two operations.

  * Abort: If a transaction aborts, changes made to database are not visible.
  * Commit: If a transaction commits, changes made are visible.

#### Consistency

→ This means that integrity constraints must be maintained so that the database is consistent before and after the transaction. It refers to the correctness of a database.

#### Isolation

→ This property ensures that multiple transactions can occur concurrently without leading to the inconsistency of database state. Transactions occur independently without interference. Changes occurring in a particular transaction will not be visible to any other transaction until that particular change in that transaction is written to memory or has been committed.

→ This property ensures that the execution of transactions concurrently will result in a state that is equivalent to a state achieved these were executed serially in some order.

#### Durability

→ This property ensures that once the transaction has completed execution, the updates and modifications to the database are stored in and written to disk and they persist even if a system failure occurs. These updates now become permanent and are stored in non-volatile memory. The effects of the transaction, thus, are never lost.

Sources

- https://www.geeksforgeeks.org/difference-between-file-system-and-dbms/
- https://database.guide/what-is-referential-integrity/
- https://www.tutorialspoint.com/dbms/er_model_to_relational_model.htm
- https://www.geeksforgeeks.org/acid-properties-in-dbms/

license: Unlicense

gha_license_id: Unlicense


text:
`learntools.core` contains the basic elements of exercise checking, shared across all Learn micro-courses and exercises.

The remaining sub-packages correspond to Kaggle Learn courses in various stages of development.

## Live

The following sub-packages correspond to courses that are live at https://www.kaggle.com/learn/overview

- `deep_learning`
- `embeddings`
- `machine_learning`
- `ml_explainability`
- `pandas`
- `python`
- `time_series_with_siraj`

## In development

- `gans`

## Deprecated

- `advanced_pandas`: Old checking code for the Pandas course (predating the existence of `learntools.core` infrastructure)
- `ml_insights`: Previous name used (during the 4-day-challenge launch) for what is now `ml_explainability` (this is just a symlink to `ml_explainability`)

repository: NeuroLaunch/learntools

branch_name: refs/heads/master

extension: md

gha_language: Jupyter Notebook

license_type: permissive

repo_name: NeuroLaunch/learntools


text:
# awgn_boxmuller
I. Introduction

AWGN signal generator IP for FPGA implemented by Verilog HDL with Fmax up to 320MHz
on Xilinx Virtex Ultra-Scale FPGA.

The generator is based on Box-Muller Algorithm and the fixed point proccessing with
accuracy analysis refer to the following paper:

-D. U. Lee, J. D. Villasenor, W. Luk, and P. H. W. Leong, “A hardware
 Gaussian noise generator using the box-muller method and its error
 analysis,” IEEE Transactions on Computers, vol.55, no.6, pp.659–671, June 2006.

II. IP core features

  1.Synthesizable Verilog HDL design for FPGA/ASIC.

  2.Bit accurate matlab fixed point model.

  3.High precision performance accurate to one unit in the last place up to 8.15 sigma.

  4.State-of-the-art simulation environment for Modelsim.

III. Performance Test

  Resource Utilization

  1767 LUTs, 915 FFs, 8 DSP48, 2.5 BRAM36k. (On Xilinx Virtex Ultra-Scale FPGA)

  Fmax 320MHz to generate two Gaussian Distribution signals at the same time.

  Total delay of 16 cycles during the whole pipeline path.(from clock_enable signal to output_valid)

  Maximum accuracy error of the output signals compared to the float point model are both about 4.8e-4.

IV. Use Guide

1. matlab running

1) Open Matlab software, direct to the "matlab" subdirectory under the project.

2) If First time using, need to run "mex taus_URNG.c" command, this will generate the needed mex function according your OS.

3) Modify the "len" and "write_file" value according to your purpose:

  a)"len" represent the samples number to be generate, recommanded value for bit-Match simulation is 1e5 to 1e6, for performance evaluation the value can be set to 1e7 to 1e8;

  b)"write_file" is a signal to control golden files (for RTL bit-Match) writing on-off.
    If "write_file=0", matlab will not write golden files and will draw the PDF figure to illustrate the random feature of the algorithm;
	If "write_file=1", the opsite behaviour of above.

4) run function "BoxMuller_Fixed" directly(random seed is set to<PHONE_NUMBER> default), or with the specific random_seed, for example "BoxMuller_Fixed(123456)"

2. Simulation (Modelsim on Windows)

1) Direct to the subdirec "sim";

2) Double click "run_modelsim.bat"(Modelsim has been installed on your OS ready.)

  a) "run_modelsim.bat" call "vsim -do run_sim.do".

  b) "run_sim.do" setup the environment for simulation, including vlib, vlog, vsim, and run wave.do to add waves to view.

  c) All used files(verilog) are included in file "file.list", and called by "run_sim.do" script.

  d) View and check the output waveform. "tb.v" read input data and golden data from the "bitMatchFile" subdirectory under "matlab" directory, and compares them to the data output by RTL.
	 The error signals indicate the mismatch comparement are also listed in the waveform view.

3. Synthesize and Implementation of FPGA

  The Verilog codes are totally synthesizable independent from any FPGA/ASIC IP core/libraries, feel free to use them.

license: MIT


text:
---
layout: post
title: The Wolf Report - August 22nd, 2016
---

- [cube composer](http://david-peter.de/cube-composer/)
- [How Long Should Your Sprint Be? —<EMAIL_ADDRESS>- [Merging Done Right: Semantic Merge - DaedTech](http://www.daedtech.com/merging-done-right-semantic-merge)
- [OpenID Connect and JS applications with `oidc-client-js` · Mickaël Derriey's blog](https://mderriey.github.io/2016/08/21/openid-connect-and-js-applications-with-oidc-client-js/)
- [The Customer Support Handbook](http://cshandbook.com/)
- [Grokking Algorithms: An illustrated guide for programmers and other curious people: Aditya Bhargava:<PHONE_NUMBER>231: Amazon.com: Books](https://www.amazon.com/gp/product/1617292230)
- [In-Depth Async in Akka .NET: Why We Need PipeTo() - Gigi Labs](http://gigi.nullneuron.net/gigilabs/in-depth-async-in-akka-net-why-we-need-pipeto/)
- [Asynchronous and Concurrent Processing in Akka .NET Actors - Gigi Labs](http://gigi.nullneuron.net/gigilabs/asynchronous-and-concurrent-processing-in-akka-net-actors/)
- [Thinking in flux —<EMAIL_ADDRESS>- [Splitting pull request - Better world by better software](https://glebbahmutov.com/blog/splitting-pull-request/)
- [Offline Storage for Progressive Web Apps — Dev Channel — Medium](https://medium.com/dev-channel/offline-storage-for-progressive-web-apps-70d52695513c#.7alt4jyll)
- [Inbox:Zero - Paul Usher](https://paul-usher.com/2016/08/20/inboxzero/)
- [DDD Decoded - Application Services Explained – Sapiens Works – Maintainable code is a business advantage](http://blog.sapiensworks.com/post/2016/08/19/DDD-Application-Services-Explained)
- [Khalid Abuhakmeh - Directory Browser Middleware With ASP.NET Core](http://www.khalidabuhakmeh.com/directory-browser-middleware-with-asp-net-core)
- [Trying IdentityServer - leastprivilege.com](https://leastprivilege.com/2016/08/17/trying-identityserver/)
- [Hangfire 1.6.3](http://hangfire.io/blog/2016/08/19/hangfire-1.6.3.html)
- [How to set the hosting environment in ASP.NET Core](http://andrewlock.net/how-to-set-the-hosting-environment-in-asp-net-core/)
- [Monads - Better world by better software](https://glebbahmutov.com/blog/monads/)
- [Singletons Suck (aka Flux to Redux) - REA Group Tech Blog](http://rea.tech/singletons-suck-aka-flux-to-redux/)
- [3.3 release schedule update](http://blog.getseq.net/3-3-release-schedule-update-2/)
- [Strong consistency models](https://aphyr.com/posts/313-strong-consistency-models)
- [OpenID Connect Playground](https://openidconnect.net/)
- [GitHub - airbnb/react-dates: An accessible, easily internationalizable, mobile-friendly datepicker library for the web](https://github.com/airbnb/react-dates)


text:
Video Recorder
=========

## Video Recorder.
------------
 Added Some screens here.

![](https://github.com/pawankv89/VideoRecorder/blob/master/Screens/1.png)
![](https://github.com/pawankv89/VideoRecorder/blob/master/Screens/2.png)
![](https://github.com/pawankv89/VideoRecorder/blob/master/Screens/3.png)

## Usage
------------
 iOS 9 Demo showing how to droodown on iPhone X Simulator in  Objective-C.

```objective-c

#import "ViewController.h"
@import MediaPlayer;
#import <MobileCoreServices/UTCoreTypes.h>
@import AVFoundation;
@import AVKit;

@interface ViewController ()<UIImagePickerControllerDelegate, UINavigationControllerDelegate>

@end

@implementation ViewController

- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
}

- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}

-(IBAction)playVideoTap:(id)sender{

// pick a video from the documents directory
NSURL *video = [self<EMAIL_ADDRESS>
// create an AVPlayer
AVPlayer *player = [AVPlayer playerWithURL:video];

// create a player view controller
AVPlayerViewController *controller = [[AVPlayerViewController alloc]init];
controller.player = player;
[player play];

[self presentViewController:controller animated:YES completion:^{

}];
}

-(IBAction)recordVideoTap:(id)sender{

if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera]) {

UIImagePickerController *picker = [[UIImagePickerController alloc]init];
picker.sourceType = UIImagePickerControllerSourceTypeCamera;
picker.delegate = self;
picker.allowsEditing = NO;

NSArray *mediaTypes = [[NSArray alloc]initWithObjects:(NSString *)kUTTypeMovie, nil];

picker.mediaTypes = mediaTypes;

[self presentViewController:picker animated:YES completion:nil];

} else {

UIAlertView *alertView = [[UIAlertView alloc]initWithTitle:nil message:@"I'm afraid there's no camera on this device!" delegate:nil cancelButtonTitle:@"Dang!" otherButtonTitles:nil, nil];
[alertView show];
}
}

#pragma mark - Delegate Methods

- (void)imagePickerControllerDidCancel:(UIImagePickerController *)picker {

// user hit cancel
[self dismissViewControllerAnimated:YES completion:nil];
}

- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info {

// grab our movie URL
NSURL *chosenMovie = [info objectForKey:UIImagePickerControllerMediaURL];

// save it to the documents directory
NSURL *fileURL = [self<EMAIL_ADDRESS>NSData *movieData = [NSData dataWithContentsOfURL:chosenMovie];
[movieData writeToURL:fileURL atomically:YES];

// save it to the Camera Roll
UISaveVideoAtPathToSavedPhotosAlbum([chosenMovie path], nil, nil, nil);

// and dismiss the picker
[self dismissViewControllerAnimated:YES completion:nil];
}

- (NSURL*)grabFileURL:(NSString *)fileName {

// find Documents directory
NSURL *documentsURL = [[[NSFileManager defaultManager] URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask] lastObject];

// append a file name to it
documentsURL = [documentsURL URLByAppendingPathComponent:fileName];

return documentsURL;
}

```

```objective-c

```

## License

This code is distributed under the terms and conditions of the [MIT license](LICENSE).

## Change-log

A brief summary of each this release can be found in the [CHANGELOG](CHANGELOG.mdown).


text:
# Authentication Testing
## Testing for credentials trasported over an encrypted channel
Do data travel between client and server through unencrypted channel or HTTPS
#### Encrypted is not always safe. It depends on the algorith and the robustness of keys
Always check Request headers, POST address and Referer.
## Testing for default credentials
When an application interface is identified (eg. Cisco router web interface) __check for default usernames and passwords__.
if not successfull, at least find a vslid username. \
Common usernames are admin, administrator, root, system, guest, operator, super, test, test1  etc.
- Application admin users are often named after the application or organization (google/google)
- Contacts are often used as usernames (John Doe -><EMAIL_ADDRESS>- Search social media for administrator's name
- Check usernames with blank passwords
- View html source and comments
- Check urls (startupurl=/admin.asp else index.asp)
- New account and default password
- Look for user registration page to understand password format and length
- How are usernames generated?
- Create many accounts quickly
### Tools
- Burp Intruder
- THC Hydra
- Brutus
- Nikto 2
## Testing for weak lock out mechanism
Usually lockout is excuted after 3 to 5 unsuccessfull attemps in order to
- Protect accounts from unauthorized access
- Protect users from being denied authorized access
Tester need to access an account that can afford to lock.
Examine what happens when you enter
- Icorrect password 3 times and then the correct one
- Icorrect password 4 times and then the correct one
- Icorrect password 5 times and then the correct one
- Also try time gaps 5,10, 15 minutes)
## Testing for bypassing authentication schema
Skipping login page and directly calling an internal page that is supposed to be accessed only after authentication.\
It is often possible to bypass auth by tampering with requests (_tricking the web app to think that the user is already authenticated_) by modifying URL parameters, manipulating a form, counterfeiting sessions etc. Test by
- Direct page request (forced browsing) through address bar or curl
- Parameter modification
- Session ID prediction
- SQL injection
### Parameter modification
Change _http://foo.bar/page=index?authenticated=no_ to _http://foo.bar/page=index?authenticated=yes_
### Session ID prediction
If session id is predictable, a malicious user could be able to find a valid session ID. Cookie stored values may change only partially (_restrict brute force_)
### Tools
- Webscarab
- Webgoat

(see section Gray Box Testing)

## Testing for vulnerable Remeber Password functionality
- Browser _Remember me_ functionality
- API custom _Remember me_ functionality
- Passwords inside a cookie
- Credentials are sent during login

## Testing for browser cache weakness
__Back button is history, not cache__
- Check with a proxy so that every page or request with sensitive data does not cache them
- Check HTTP headers
  - Cache control : no-cache
  - Expires : 0
  - Pragma : no-cache
### Tools
- Cache Viewer 2 (Firefox addon)

## Testing for weak password policy
- What characters are permitted and forbidden for a password (length, upper/lower case, digits etc)
- How often a user has to change password
- How often a user can reuse a password
- How different must the next password be
- Can password contain username

## Testing for weak security question/answer
Upon account creation it is required the user to select _pregenerated_ or _custom_ security questions
- Pregenerated - obtain a list of questions by creating a new account
- Custom - Does the system allow creation of custom questions
- Can the be brute forcable?
- How many guesses do you have

## Testing for weak password change or reset functionalities
- Check if non admin users can change or reset password for other accounts
- Is the password change/reset vulnerable to [CSRF](https://en.wikipedia.org/wiki/Cross-site_request_forgery)?
- What information is required to reset a password (eg. security questions)
- How passwords are communicated to the user?
  - Plain text showing
  - Forcing to change
- Are reset passwords generated randomly?
- Does this process requests information before changing password?
- Is the old password requested in order to complete the change?

## Testing for weaker authentication in alternative channel
Firstly, identify alternative channels such as
- other website or web app
- mobile app
- accessibility optimized version
- alternative country and language
- parallel web sites (may have different functionality)
- development versions
- site versions without cookies, javascript, flash or java plugins

Indetify alternative channels by
- Reading Home, Contact, FAQ etc
- HTTP proxy logs search for strings "mobile", "android", "ipad", "mobile", "auth", "sso" etc
- Use search engines to find different sites from the same organization

_Does an alternative channel has any extra functionality (eg. password reset)_
_Alternative channels should always be mentioned in test report even as "information only"_

repository: ndalezios/owasp-cheat-sheet

repo_name: ndalezios/owasp-cheat-sheet


text:
# Tree

* [Binary Search Tree](binary-search-tree)
* [AVL Tree](avl-tree)
* [Red-Black Tree](red-black-tree)
* [Segment Tree](segment-tree) - with min/max/sum range queries examples
* [Fenwick Tree](fenwick-tree) (Binary Indexed Tree)

In computer science, a tree is a widely used abstract data
type (ADT) or data structure. This structure
simulates a hierarchical tree with a root
and subtrees, represented as
a set of linked nodes.

A tree data structure can be defined recursively (locally)
as a collection of nodes (starting at the root node). Each node is a data structure consisting of a value,
and a list of references the subtrees (the "children"),
with the constraints that no reference is duplicated, and none
points to the root.

A simple unordered tree; in this diagram, the node labeled 7 has
two children, labeled 2 and 6, and one parent, labeled 2. The
root node, at the top, has no parent.

![Tree](https://upload.wikimedia.org/wikipedia/commons/f/f7/Binary_tree.svg)

## References

- [Wikipedia](https://en.wikipedia.org/wiki/Tree_(data_structure))
- [YouTube](https://www.youtube.com/watch?v=oSWTXtMglKE&list=PLLXdhg_r2hKA7DPDsunoDZ-Z769jWn4R8&index=8)

repository: Kazexiii/javascript-algorithms

repo_name: Kazexiii/javascript-algorithms


text:
# Algorithms for Quantum Internet Routing
Different implementation of algorithms (greedy, shortest path, Monte Carlo Tree Search, SARSA, etc..) for Quantum Internet Routing. Still under construction...

## Requirements

* Python 3.6+
* NetworkX

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

## Run a benchmark

The following command will run a benchmark on a cycle networks.

```shell
python src/benchmark.py \
    --epochs 10 \
    --n 8 \
    --dth 3 \
    --mcts_sim_num 500 \
    --c_ucb1 2
```

## License
[Apache License 2.0](https://github.com/adelshb/Algorithms-for-Quantum-Internet-Routing/blob/main/LICENSE)

branch_name: refs/heads/main


text:
# Uredo bliti Biv., 1816 SPECIES

#### Status
SYNONYM

#### According to
The Catalogue of Life, 3rd January 2011

#### Published in
Stirp. Rar. Sic. 3: 11 (1816)

#### Original name
Uredo bliti Biv., 1816

### Remarks
null

repository: mdoering/backbone

path: /life/Chromista/Oomycota/Oomycetes/Albuginales/Albuginaceae/Wilsoniana/Wilsoniana bliti/ Syn. Uredo bliti/README.md

repo_name: mdoering/backbone


text:
# PHP-Projects
PHP: Hypertext Preprocessor.PHP is a popular general-purpose scripting language that is especially suited to web development. Fast, flexible and pragmatic.This repository contains all the PHP Projects that I built so far

## ➤ Features of PHP

* **Simple**:It is very simple and easy to use, compare to other scripting language it is very simple and easy, this is widely used all over the world.
* **Faster**: It is faster than other scripting language e.g. asp and jsp.
* **Open Source**: Open source means you no need to pay for use php, you can free download and use.
* **Interpreted**: It is an interpreted language, i.e. there is no need for compilation.
* **Platform Independent**: PHP code will be run on every platform, Linux, Unix, Mac OS X, Windows.
* **Error Reporting**: PHP have some predefined error reporting constants to generate a warning or error notice.

### Project Video Demos

| Projects   | Youtube Links  | Github Code Link|
|------------|------------|------------|
| Login System |[Youtube Video Link](https://youtu.be/LHEDlSTEfL4)  |[Github Code Link](https://github.com/CSElonewolf/PHP-Projects/tree/master/PHP%20Project-1) |
| Technical Course/blog project |Not yet uploaded |[Github Code Link](https://github.com/CSElonewolf/PHP-Projects/tree/master/PHP%20Project-2) |

[![-----------------------------------------------------](https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/colored.png)](#phpinstallation)
## ➤ PHP Installation

```
Step 1: Download the files. Download the latest PHP 7 ZIP package from www.php.net/downloads.php.
Step 2: Extract the files. ...
Step 3: Configure php. ...
Step 4: Add C:\php to the path environment variable. ...
Step 5: Configure PHP as an Apache module.
Step 6: Test a PHP file
```

[![-----------------------------------------------------](https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/colored.png)](#Mysqlinstallation)
## ➤ MySql Installation

```
Step 1: download MySQL. ...
Step 2: extract the files. ...
Step 3: move the data folder (optional) ...
Step 4: create a configuration file. ...
Step 5: test your installation. ...
Step 6: change the root password
```

### If you don't want to install anything you can use

 [![-----------------------------------------------------](https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/colored.png)](#xamppinstallation)
## ➤ XAMPP Installation

```
Click XAMPP for Windows. It's a grey button near the bottom of the page. ...
Double-click the downloaded file. This file should be named something like xampp-win32-7.2. ...
Click Yes when prompted. ...
Click Next. ...
Select aspects of XAMPP to install. ...
Click Next. ...
Select an installation location. ...
Click OK.
```

 [![-----------------------------------------------------](https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/colored.png)](#contributor)

## ➤ Contributors

| [] |  |
|:--------------------------------------------------:|:--------------------------------------------------:|
| [Devkant Gorai](https://github.com/CSElonewolf) |  |
| 🔥                                               |                                                  |

```json
{
  "contributors": [
    {
      "name": "Devkant Gorai",
      "email"<EMAIL_ADDRESS>      "aka": "CSELonewolf",
      "info": [
        "🔥"
      ]
    },
  ]
}
```

repository: CSElonewolf/PHP-Projects

repo_name: CSElonewolf/PHP-Projects


text:
normalize.scss
==============

A rude modification of well made modularized normalize sass repo found here: https://github.com/hail2u/normalize.scss

INSTALLATION
------------
  Install with [Bower][4]: `$ bower install modular-main-normalize-scss --save-dev`

TEST
----

Install development dependencies with [npm][5]:

    $ npm install

Then, test with [Grunt][6]:

    $ grunt test

LICENSE
-------

MIT

repository: KimmoCommit/modular-normalize-scss

repo_name: KimmoCommit/modular-normalize-scss


text:
# TOOLISTICON Compile-Testing

[![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.toolisticon.compiletesting/compiletesting/badge.svg)](https://maven-badges.herokuapp.com/maven-central/io.toolisticon.compiletesting/compiletesting)
![Build Status](https://github.com/toolisticon/compile-testing/workflows/default/badge.svg)
[![codecov](https://codecov.io/gh/toolisticon/compile-testing/branch/master/graph/badge.svg)](https://codecov.io/gh/toolisticon/compile-testing)

# Why you should use this project?
Testing of annotation processors can be a very difficult task.
Usually annotation procecssors are tighly bound to the compile time model of Java and are relying on tools provided by the java compiler during the compilation process.

Mocking of both tools and the compile time model is a very difficult task.
It's much easier to define testcases as source files and to test your processors during the normal compilation process.

This compile testing framework allows you to to do this and additionally supports you to provide unit tests for your annotation processor related code in an easy way.

# Features

- allows compile time tests supporting the most relevant test frameworks (junit4, junit5, testng, ...)
- simple, but powerful fluent api (immutable)
- supports all Java versions >=7 (including support for java 9 modules)
- Enables you to debug annotation processors during compilation tests
- provides useful information for analysis of failing tests:
   - error and warning messages
   - unexpected exceptions
   - writes generated files to filesystem
   - test configuration
- works with most IDEs and compilers
- dependency-less - binds no 3rd party libraries (therefore no versioning conflicts with your application)

# How does it work?
Simply add the following dependencies to your project to be able to use this testing framework.

```xml
<dependencies>

   <!-- Compile testing framework -->
       <dependency>
       <groupId>io.toolisticon.compiletesting</groupId>
       <artifactId>compiletesting</artifactId>
       <version>${currentVersion}</version>
       <scope>test</scope>
   </dependency>

   <!--
       optional : only needed if you want to trigger assertion
                  errors via your unit test framework
       Per default assertion errors are thrown and handled as java.lang.AssertionError by most unit test frameworks.
   -->
   <dependency>
       <groupId>io.toolisticon.compiletesting</groupId>
       <artifactId>${extension-junit4, extension-junit5, extension-testng}</artifactId>
       <version>${currentVersion}</version>
       <scope>test</scope>
   </dependency>

</dependencies>
```

# Tests types

There are two types of tests: Unit tests and Compilation (or Integration) Tests.

For both test types you can test

- if compilation was successful or not
- if certain messages have been created during compilation
- if certain java files (sources and classes) or resource files have been created
- if your annotation processor really has been applied (this is implicitly done)

The CompileTestBuilder always returns immutable CompileTestBuilder instances.
So it's safe to initialize a base CompileTestBuilder instance once in a testclass and to refine it further in the testcases.

## Compilation tests

Compilation test allow you to define testcase source files and to apply your processor on it.

```java
@Test
public void exampleCompilationTest() {

   CompileTestBuilder.compilationTest()
           .addSources("/exampletestcase/Testcase1.java")
           .addProcessors(YourProcessorUnderTest.class)
           .compilationShouldSucceed()
           .expectedWarningMessages("WARNING SNIPPET(will check if a warning exists that contains passed string)")
           .expectedGeneratedSourceFileExists(
                   "your.test.package.GeneratedFile",
                   JavaFileObjectUtils.readFromString("package your.test.package;\npublic class GeneratedFile{}"))
           .testCompilation();
}
```

Additionally to the explicitely configured assertions it implicitly checks if your annotation processor has been applied and triggers an AssertionError if not.

## Unit tests

Usually - if you are developing annotation processors - your code is likely to rely on the tools provided to the annotation processor via the ProcessingEnvironment like Filer, Messager, Types and Elements.
These classes and the Java compile time model are hard to mock. Thats why unit testing is usually very hard to do.
This library helps you to execute unit test at compile time, giving you the ProcessingEnvironment's tools and access to the compile time model for free.

The unit test concept provided by this library uses a default source file and applies a default annotation processor on it.
Your unit test code can be declared via the fluent api:

```java
// a junit 4 example
// test class should be in same package like your unit under test
// tested methods must be package visible
@Test
public void exampleUnitTest() {

    CompileTestBuilder.unitTest().useProcessor(SampleProcesssor.class, new UnitTestProcessorForTestingAnnotationProcessors<SampleProcesssor>() {
        @Override
        public void unitTest(SampleProcesssor unit, ProcessingEnvironment processingEnvironment, TypeElement typeElement) {

            // AbstractProcessor.init() method was called by compiletesting framework
            String result = unit.yourMethodToTest("ABC");

            // AssertionErrors will be passed through your external unit test function
            MatcherAssert.assertThat(result, Matchers.is("EXPECTED RESULT"));

        }
    })
    .compilationShouldSucceed()
    .expectedWarningMessages("WARNING SNIPPET(will check if a warning exists that contains passed string)")
    .testCompilation();

}
```

Besides that it's also possible to add an assertion if an expected exception has been thrown.

Additionally you have compile time model access for all classes residing in your classpath (including all test classes), which allows you to setup test classes easily, for example by adding classes to your src/test/java folder or by adding static inner classes to your unit test class.

# Projects using this toolkit library

- [Annotation processor toolkit](https://github.com/toolisticon/annotation-processor-toolkit) : Toolkit that allows you to build annotation processors in a more comfortable way
- [SPI-AP](https://github.com/toolisticon/SPI-Annotation-Processor) : Annotation processor for generation of spi service locator files

# Alternatives

- [google compile-testing](https://github.com/google/compile-testing): Another library for testing annotation processor at compile time.

# Contributing

We welcome any kind of suggestions and pull requests.

## Building and developing compile-testing project

The compile-testing is built using Maven via bundled maven wrapper.
A simple import of the pom in your IDE should get you up and running. To build the compile-testing project on the commandline, just run `mvnw` or `mvnw clean install`

## Requirements

The likelihood of a pull request being used rises with the following properties:

- You have used a feature branch.
- You have included a test that demonstrates the functionality added or fixed.
- You adhered to the [code conventions](http://www.oracle.com/technetwork/java/javase/documentation/codeconvtoc-136057.html).

## Contributions

- (2018) Tobias Stamann (Holisticon AG)

# License

This project is released under the revised [MIT License](LICENSE).

repository: tobiasstamann/compile-testing

repo_name: tobiasstamann/compile-testing


text:
# issues2cards

Pulls Github issues and creates/updates Trello cards.  Work in progress.

### Running

```
python3 issues2cards.py [-h] [-c <conf>]
```

-c <conf> (default `conf.yaml`) configuration file

### Configuration file

 - `repos`: list of Github repositories in `<user>/<repo>` format
 - `horizon_days`: doesn't consider issues whith `last_update` more than this number of days ago.
 - `board.id`: boardId of trello board.
 - `board.lists.new-issues`: listId to put new issue cards.
 - `board.lists.waiting`: listId for cards waiting for activity.
 - `board.lists.activity`: listId to move cards that have new activity.

### Current (minimal) functionality:

- Gathers open Github issues (PR or issue) with activity during the last `horizon_days`. (list A)
- lists all Github attachments from non-archived cards in the Trello board. (list B)
- for each issue in set(A - B), creates a new card in the `new-issues` list.
- compares the last modification timestamp of each card in the `waiting` list.
  - if the Github issue has an update later than that, moves the card to the `activity` list.

### TODOs

- Currently ignores the list of Github repos.  `Kong/kong` is hardcoded.
- if a card is moved to another board, the Github issue would be considered "new" and another card created in the `new-issues` list.
- any activity on a card in the `waiting` list would touch its "last modification" date and could skip some Github activity.
- should copy labels?  some of them?


text:
---
title: "Sub Station Alpha v4.00 Script Format"
tags: ["docs"]
published: true
date: "2021-09-28"
---

This is a copy of a Word document that I had to locate once, and which was very difficult to find. I am republishing it here in the hopes that it will be easier for someone else who needs this info to find it.

Disclaimer: I am not the author of this document, and I have nothing to do with [Sub Station Alpha](https://en.wikipedia.org/wiki/SubStation_Alpha) or its development.

---

# Sub Station Alpha v4.00 Script Format

1. 	General information
1.	The [sections] of a Sub Station Alpha script
1.	The line types in a Sub Station Alpha script
1.	Header lines, [Script Info] section
1.	Style lines, [v4 Styles] section
1.	Dialogue event lines, [Events] section
1.	Comment lines, [Events] section
1.	Picture event lines, [Events] section
1.	Movie event line, [Events] section
1. 	Sound event lines, [Events] section
1. 	Command event lines, [Events] section

- Appendix A: Style override codes
- Appendix B: Embedded font/picture encoding
- Appendix C: Example of a basic SSA subtitle

## 1. General Information

The information in this document assumes that you are familiar with the terms and concepts used by Sub Station Alpha (SSA). These are documented in SSA's help file, ssa.hlp which is distributed with the program, or can be downloaded separatelyfrom http://www.eswat.demon.co.uk.

1. **The SSA v4.00 script format is different to previous versions of SSA**
    - SSA v4.00 will read scripts from older versions, but v4.00 scripts will not load into older versions of SSA correctly.
    - Some of the changes in the script format are intended to allow all versions of SSA from v4.00 onwards to read any present or future SSA scripts. In particular, the new "Format" lines allow SSA to read only the information it recognises and discard any new information that is added in future scripts.

2. **Scripts are plain (DOS) text files.**
    - This means they can be "manually" editied using any text editor, but caution must be exercised when doing this - SSA assumes that scripts will adhere to the "rules" set out in this document, and any errors may lead to unpredictable  results when the script is loaded into SSA.

3. **The script is divided into "ini file" style sections**
    - However, SSA scripts are not true Windows .ini files and you cannot do certain things you might expect!

4. **Most lines in each section begin with some sort of code - a "line descriptor", to say what information is held in it.**
    - The descriptor is terminated by a colon.

5.	**The information fields in each line are separated by a commas.**
	  - This makes it illegal to use commas in character names and style names (SSA prevents you putting commas in these). It also makes it quite easy to load chunks of an SSA script into a spreadsheet as a CSV file, and chop out columns of information you need for another subtitling program.

6.	**SSA does not care what order events are entered in.**
	  - They could be entered in complete reverse order, and SSA would still play everything correctly in the right order ie. you cannot assume that each dialogue line is in chronological order in the script file.

7.	**Incorrectly formatted lines are ignored.**
    - SSA will discard any lines it doesn't understand, and give a warning after the script has loaded giving the number of lines it discarded.

8.	**Lines cannot be split**
	  - Each entry in a script contains all its information in a single line.

9.	**If unknown styles are used in the script, the *Default style will be used.**
	  - For example, if lines have been pasted in from another script, without the corresponding Style information then when SSA plays the script, the Default style settings will be used.

10.	**If a Style specifies a font which is not installed, then Arial will be used instead.**
	  - This can happen with scripts which you did not create yourself - the original authors may have fonts installed which you don't have.

## 2. The sections in a Sub Station Alpha script

**[Script Info]**
- This section contains headers and general information about the script.
The line that says `[Script Info]` must be the first line in a v4 script.

**[v4 Styles]**
- This section contains all Style definitions required by the script. Each "Style" used by subtitles in the script should be defined here.

**[Events]**
- This section contains all the events for the script - all the subtitles, comments, pictures, sounds, movies and commands. Basically, everything that you see in Sub Station Alpha's main-screen "grid" is in this section.

**[Fonts]**
- This section contains text-encoded font files, if the user opted to embed non-standard fonts in the script. Only truetype fonts can be embedded in SSA scripts. Each font file is started with a single line in the format: `fontname: <name of file>`
- The word `fontname` must be in lower case (upper case will be interpretted as part of a text-encoded file).
- `<name of file>` is the file name that SSA will use when saving the font file. It is:
  - the name of the original truetype font,
  - plus an underscore,
  - plus an optional `B` if Bold,
  - plus an optional `I` if Italic,
  - plus a number specifying the font encoding (character set),
  - plus `.ttf`
  - Eg. `fontname: chaucer_B0.ttf`, `fontname: comic_0.ttf`
- The fontname line is followed by lines of printable characters, representing the binary values which make up the font file. Each line is 80 characters long, except the last one which may be less.
- The conversion from binary to printable characters is a form of Uuencoding, the details of this encoding is contained in _Appendix B_, below.

**[Graphics]**
- This section contains text-encoded graphic files, if the user opted to embed any pictures they used in the script. The binary picture files are text-encoded, which is inefficient, but ensures that SSA scripts can still be handled by any text editor, if required.
- Each graphic file is started with a single line in the format: `filename: <name of file>`
- The word `filename` must be in lower case (upper case will be interpreted as part of a text-encoded file).
 - `<name of file>` is the file name that SSA will use when saving the picture file. It will match the filename of a picture used in the script.
- SSA saves any files found in the script in a subdirectory off SSA's program directory, "Pictures". eg. c:\program files\Sub Station Alpha v4.00\Pictures. SSA will attempt to load files using the paths specified in the script, but if they are not found, it will look in the "Pictures" subdirectory for them.
- The `fontname` line is followed by lines of printable characters, representing the binary values which make up the picture font file - format is as per embedded font files.

## 3. The line types in a Sub Station Alpha script
This briefly describes each of the line types that can appear in a Sub Station Alpha Script. Full details of the information held in each line type is in the next chapter.

**!**: This is a comment used in the script file only. It is not visible when you load the script into SSA.

**Title**: This is a description of the script

**Original Script**:	The original author(s) of the script

**Original Translation**:	(optional) The original translator of the dialogue

**Original Editing**:	(optional) The original script editor(s), typically whoever took the raw translation and turned it into idiomatic english and reworded for readability.

**Original Timing**: (optional) Whoever timed the original script

**Synch Point**: (optional) Description of where in the video the script should begin playback.

**Script Updated By**:	(optional) Names of any other subtitling groups who edited the original script.

**Update Details**:	The details of any updates to the original script made by other subtilting groups.

**ScriptType**: This is the SSA script format version eg. "V3.00".

**Collisions**: This determines how subtitles are moved, when preventing onscreen collisions

**PlayResY**: This is the height of the screen used by the authors when playing the script.

**PlayResX**: This is the width of the screen used by the authors when playing the script.

**PlayDepth**: This is the colour depth used by the authors when playing the script.

**Timer**: This is the Timer Speed for the script, as a percentage. eg. `100.0000` is exactly 100%. The timer speed is a time multiplier applied to SSA's clock to provide a ramp time.

**Style**:	This is a Style definition, used to format text displayed by the script.

**Dialogue**:	This is a Dialogue event, ie. Some text to display.

**Comment**:	This is a "comment" event. This contains the same information as a Dialogue, Picture, Sound, Movie, or Command event, but it is ignored during script playback.

**Picture**: This is a "picture" event, which means SSA will display the specified .bmp, .jpg, .gif, .ico or .wmf graphic.

**Sound**: This is a "sound" event, which means SSA will play the specified .wav file.

**Movie**: This is a "movie" event, which means SSA will play the specified .avi file.

**Command**: This is a "command" event, which means SSA will execute the specified program as a background task.

## 4. Header lines, [Script Info] section

**;** Semicolon. Any text can follow the semicolon. This is a comment used in the script file only. It is not visible when you load the script into SSA. The semicolon must be the first character in the line. This replaces the !: line type used in previous script versions.

**Title**: This is a description of the script. If the original author(s) did not provide this information then `<untitled>` is automatically substituted.

**Original Script**:	The original author(s) of the script. If the original author(s) did not provide this information then `<unknown>` is automatically substituted.

**Original Translation**:	(optional) The original translator of the dialogue. This entry does not appear if no information was entered by the author.

**Original Editing**:	(optional) The original script editor(s), typically whoever took the raw translation and turned it into idiomatic english and reworded for readability. This entry does not appear if no information was entered by the author.

**Original Timing**:	(optional) Whoever timed the original script. This entry does not appear if no information was entered by the author.

**Synch Point**: (optional) Description of where in the video the script should begin playback. This entry does not appear if no information was entered by the author.

**Script Updated By**:	(optional) Names of any other subtitling groups who edited the original script. This entry does not appear if subsequent editors did not enter the information.

**Update Details**:	The details of any updates to the original script - made by other subtitling groups. This entry does not appear if subsequent editors did not enter any information.

**ScriptType**: This is the SSA script format version eg. "V4.00". It is used by SSA to give a warning if you are using a version of SSA older than the version that created the script.

**Collisions**:	This determines how subtitles are moved, when automatically preventing onscreen collisions.
- If the entry says "Normal" then SSA will attempt to position subtitles in the position specified by the "margins". However, subtitles can be shifted vertically to prevent onscreen collisions. With "normal" collision prevention, the subtitles will "stack up" one above the other - but they will always be positioned as close the vertical (bottom) margin as possible - filling in "gaps" in other subtitles if one large enough is available.
- If the entry says "Reverse" then subtitles will be shifted upwards to make room for subsequent overlapping subtitles. This means the subtitles can nearly always be read top-down - but it also means that the first subtitle can appear half way up the screen before the subsequent overlapping subtitles appear. It can use a lot of screen area.

**PlayResY**: This is the height of the screen used by the script's author(s) when playing the script. SSA v4 will automatically select the nearest enabled setting, if you are using Directdraw playback.

**PlayResX**:	This is the width of the screen used by the script's author(s) when playing the script. SSA will automatically select the nearest enabled, setting if you are using Directdraw playback.

**PlayDepth**: This is the colour depth used by the script's author(s) when playing the script. SSA will automatically select the nearest enabled setting if you are using Directdraw playback.

**Timer**:	This is the Timer Speed for the script, as a percentage.eg. `100.0000` is exactly 100%. It has four digits following the decimal point.
- The timer speed is a time multiplier applied to SSA's clock to stretch or compress the duration of a script. A speed greater than 100% will reduce the overall duration, and means that subtitles will progressively appear sooner and sooner. A speed less than 100% will increase the overall duration of the script means subtitles will progressively appear later and later (like a positive ramp time).
- The stretching or compressing only occurs during script playback - this value does not change the actual timings for each event listed in the script.
- Check the SSA user guide if you want to know why "Timer Speed" is more powerful than "Ramp Time", even though they both achieve the same result.

## 5. Dialogue event lines, [Events] section

These contain the subtitle text, their timings, and how it should be displayed.
The fields which appear in each Dialogue line are defined by a Format: line, which must appear before any events in the section. The format line specifies how SSA will interpret all following Event lines. The field names must be spelled correctly, and are as follows:

1. **Marked**
1. **Start**
1. **End**
1. **Style**
1. **Name**
1. **MarginL**
1. **MarginR**
1. **MarginV**
1. **Effect**
1. **Text**

The last field will always be the Text field, so that it can contain commas. The format line allows new fields to be added to the script format in future, and yet allow old versions of the software to read the fields it recognises - even if the field order is changed.

**Field 1:	Marked**
- Marked=0 means the line is not shown as "marked" in SSA.
- Marked=1 means the line is shown as "marked" in SSA.

**Field 2:	Start**
- Start Time of the Event, in 0:00:00:00 format ie. Hrs:Mins:Secs:hundredths.
- This is the time elapsed during script playback at which the text will appear onscreen. Note that there is a single digit for the hours!

**Field 3:	End**
- End Time of the Event, in 0:00:00:00 format ie. Hrs:Mins:Secs:hundredths.
- This is the time elapsed during script playback at which the text will disappear offscreen. Note that there is a single digit for the hours!

**Field 4:	Style**
- Style name. If it is "Default", then your own *Default style will be subtituted.
- However, the Default style used by the script author IS stored in the script even though SSA ignores it - so if you want to use it, the information is there - you could even change the Name in the Style definition line, so that it will appear in the list of "script" styles.

**Field 5:	Name**
- Character name. This is the name of the character who speaks the dialogue. It is for information only, to make the script is easier to follow when editing/timing.

**Field 6:	MarginL**
- 4-figure Left Margin override. The values are in pixels. All zeroes means the default margins defined by the style are used.

**Field 7:	MarginR**
- 4-figure Right Margin override. The values are in pixels. All zeroes means the default margins defined by the style are used.

**Field 8:	MarginV**
- 4-figure Bottom Margin override. The values are in pixels. All zeroes means the default margins defined by the style are used.

**Field 9:	Effect**
- Transition Effect. This is either empty, or contains information for one of the three transition effects implemented in SSA v4.x
- The effect names are case sensitive and must appear exactly as shown. The effect names do not have quote marks around them.
- "Karaoke" means that the text will be successively highlighted one word at a time.
- "Scroll up;y1;y2;delay" means that the text/picture will scroll up the screen. The parameters after the words "Scroll up" are separated by semicolons.
- The y1 and y2 values define a vertical region on the screen in which the text will scroll. The values are in pixels, and it doesn't matter which value (top or bottom) comes first. If the values are zeroes then the text will scroll up the full height of the screen.
- The delay value can be a number from 1 to 100, and it slows down the speed of the scrolling - zero means no delay and the scrolling will be as fast as possible.
- "Banner;delay" means that text will be forced into a single line, regardless of length, and scrolled from right to left accross the screen.
- The delay value can be a number from 1 to 100, and it slows down the speed of the scrolling - zero means no delay and the scrolling will be as fast as possible.

**Field 10:	Text**
- Subtitle Text. This is the actual text which will be displayed as a subtitle onscreen. Everything after the 9th comma is treated as the subtitle text, so it can include commas.
- The text can include `\n` codes which is a line break, and can include Style Override control codes, which appear between braces `{ }`.

## 6. Comment event lines, [Events] section

These can contain the same information as any of the other event line types, but they will be ignored when the script is played.

## 7. 	Picture event lines, [Events] section

These contain the same information as Dialogue events, but Field 10 contains the full path and filename of the picture to display, instead of subtitle text.

The Style specified is ignored. The "scroll up" transition effect can be used for picture events.

The Left and Vertical Margin Overrides specify the bottom-left corner position of the picture. A left margin of all zeroes means that the picture will be horizontally centered. A vertical margin of all zeroes means that the picture will be vertically centered.

## 8. 	Sound event lines, [Events] section

These contain the same information as Dialogue events, but Field 10 contains the full path and filename of the wav file to play, instead of subtitle text.

The Style and margins are ignored. The End time is also ignored - the wav will play until it finishes, or until another wav file is played.

If an avi movie is played at the same time as a wav is already playing, then any sound in the avi will not be heard. Similarly, if a wav starts playing when an avi movie with sound is already playing then the wav will not be heard.

## 9. 	Movie event lines, [Events] section

These contain the same information as Dialogue events, but Field 10 contains the full path and filename of the avi file to play, instead of subtitle text.

The Style is ignored. Transition effects are ignored.

The End time specifies when the movie picture will disappear - but if th eavi file lasts longer, then the sound will continue to be heard.

The Left and vertical Margin Overrides specify the TOP-LEFT corner position of the picture (unlike picture events). A left margin of all zeroes means that the picture will be horizontally centered. a vertical margin of all zeroes means that the picture will be verticall centered.

If an avi movie is played at the same time as a wav is already playing, then any sound in the avi will not be heard. Similarly, if a wav starts playing when an avi movie with sound is already playing then the wav will not be heard.

## 10. Command event lines, [Events] section

These contain the same information as Dialogue events, but Field 10 contains the full path and filename of the program to execute, instead of subtitle text.

The Style is ignored. The margins are ignored. Transition effects are ignored. The End time is also ignored - the program will execute until it ends, or is "manually" closed.

**There are also internal SSA commands which can appear in SSA scripts - the "SSA:Pause", "SSA:Wait for trigger" command events, and genlock control commands. These all begin with "SSA:"**

The SSA:Pause command has the same effect as pressing "P" during script playback. It is useful as a second "synch point" to resume subtitling after switching sides of a laserdisk.

The "SSA:Wait for audio trigger" command has the same effect as pressing "P" during script playback, but pausing is automatically cancelled if the audio input to the computer exceeds a specified "trigger" level. It is useful as a second "synch point" to resume subtitling after switching sides of a laserdisk. The audio triggering can be overridden to resume playback - by pressing "P".

Audio triggering "times out" after 10 minutes - If no audio peak of sufficient magnitude is received, and "P" is not pressed within 10 minutes - then playback will resume anyway.

## Appendix A: Style override codes

This is a reference which may be useful for those of you who wish to learn the style override codes, so you can type them in manually without using the "override style" dialogue box.

All Override codes appear within braces `{ }` except the newline `\n` and `\N` codes.
All override codes are always preceded by a backslash `\`
Several overrides can be used within one set of braces.

Each override affects all text following the override. To apply an override only to selected text, you need a second "cancelling" override after the selected text, to "undo" the effect of the first override.

Some overrides automatically apply to ALL the text - currently this is just alignment overrides, but more may be added later (eg. Shadow/outline depth overrides).

**\n**: New line (carriage return)
- \n is ignored by SSA if "smart-wrapping" is enabled
- eg. `This is the first line\nand this is the second`

**\N**: New line (carriage return).
- This is used by SSA instead of \n if "smart-wrapping" is enabled.

**\b<0 or 1>**
- `\b1` makes the text bold. `\b0` forces non-bold text.
- eg. `There is a {\b1}bold {\b0}word here`

**\i<1 or 0>**
- \i1 makes the text italic. \i0 forces non-italic text.
- eg. There is an {\i1}italicised {\i0}word here

**\fn\<font name>**
- `<font name>` specifies a font which you have installed in Windows. This is case sensitive.
- If you use a font name that doesn't exist, then Arial will be used instead.
- eg. `Here is some {\fnCourier New}fixed space text`

**\fs<font size>**
- `<font size>` is a number specifying a font point size.
- eg. `{\fs16}This is small text. {\fs28}This is large text`

**\fe\<charset>**
- `<charset>` is a number specifying the character set (font encoding)

**\c&H\<bbggrr>&**
- `<bbggrr>` is a hexadecimal RGB value, but in reverse order. Leading zeroes are not required.
- eg.
    - `{\c&HFF&}This is pure, full intensity red`
    - `{\c&HFF00&}This is pure, full intensity Green`
    - `{\c&HFF0000&}This is pure, full intensity Blue`
    - `{\c&HFFFFFF&}This is White`
    - `{\c&HA0A0A&}This is dark grey`

\a\<alignment>
- `<alignment>` is a number specifying the onscreen aligment/positioning of a subtitle.
- A value of 1 specifies a left-justified subtitle
- A value of 2 specifies a centred subtitle
- A value of 3 specifies a right-justified subtitle
- Adding 4 to the value specifies a "Toptitle"
- Adding 8 to the value specifies a "Midtitle"

- eg.
    - `{\a1}This is a left-justified subtitle`
    - `{\a2}This is a centred subtitle`
    - `{\a3}This is a right-justified subtitle`
    - `{\a5}This is a left-justified toptitle`
    - `{\a11}This is a right-justified midtitle`

**\k\<duration>**
- `<duration>` is the amount of time that each section of text is highlighted for in a dialogue event with the Karaoke effect. The durations are in hundredths of seconds.
- eg. `{\k94}This {\k48}is {\k24}a {\k150}karaoke {\k94}line`

**\r**
- This cancels all previous style overrides in a line

## Appendix B: embedded font/picture encoding

SSA's font and picture file embeddeding is a form of UUEncoding.

It takes a binary file, three bytes at a time, and converts the 24bits of those bytes into four 6-bit numbers. 33 is added to each of these four numbers, and the corresponding ascii character for each number is written into the script file.

The offset of 33 means that lower-case characters cannot appear in the encoded output, and this is why the "filename" lines are always lower case.

Each line of an encoded file is 80 characters long, except the last one, which may be shorter.

If the length of the file being encoded is not an exact multiple of 3, then for odd-number filelengths, the last byte is multiplied by hexadecimal 100, and the most significant 12 bits are converted to two characters as above. For even-number filelengths, the last two bytes are multiplied by hexadecimal 10000, and the most significant 18 bits are converted to three characters as above.

There is no terminating code for the embedded files. If a new `[section]` starts in the script, or if another filename line is found, or the end of the script file is reached then the file is considered complete.

## Appendix C: Example of a basic SSA subtitle
The below is contained in a file called `sub.ass`
```
[Script Info]
; This is a Sub Station Alpha v4 script.
; For Sub Station Alpha info and downloads,
; go to http://www.eswat.demon.co.uk/
Title: Neon Genesis Evangelion - Episode 26 (neutral Spanish)
Original Script: RoRo
Script Updated By: version 2.8.01
ScriptType: v4.00
Collisions: Normal
PlayResY: 600
PlayDepth: 0
Timer: 100,0000

[V4 Styles]
Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, TertiaryColour, BackColour, Bold, Italic, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, AlphaLevel, Encoding
Style: DefaultVCD, Arial,28,11861244,11861244,11861244,-2147483640,-1,0,1,1,2,2,30,30,30,0,0

[Events]
Format: Marked, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text
Dialogue: Marked=0,0:00:01.18,0:00:06.85,DefaultVCD, NTP,0000,0000,0000,,{\pos(400,570)}Like an angel with pity on nobody
```

gha_language: JavaScript

gha_license_id: MIT


text:
# Internationalization

## Links

- [i18next](https://github.com/i18next/i18next) - Very popular internationalization framework for browser or any other JavaScript environment.

repository: Workster/knowledge

repo_name: Workster/knowledge


text:
# IoT - Weather Company Data

![](../img/weather-catalog.png)

<hr>

### Open IBM Cloud Service Catalog:

> [Weather Company Data service catalog](https://console.bluemix.net/catalog/services/weather-company-data)

repository: hovig/mic-sts-nlu-weather-tone-analyzer

repo_name: hovig/mic-sts-nlu-weather-tone-analyzer


text:
# gdbstub

GDB Remote Serial Protocol stub in C

`gdbstub` aims to allow quick integration of the GDB Remote Serial Protocol into your project.
It only supports a subset of the features provided by the GDB RSP, with a focus on enabling GDB
support in emulator projects.

Protocol Specification:
https://sourceware.org/gdb/onlinedocs/gdb/Remote-Protocol.html

## Building

gdbstub is a header only library. To use it, simply copy `gdbstub.h` to your project, or add it to your include path.

You may also install it using cmake, like so:

```
cmake path/to/source
sudo make install
```

This will install both CMake and pkg-config configuration files.

## Using

To use gdbstub in your program, put the following in a single source file:

```c
// If you would like gdbstub to print debug messages, you can optionally include this next line
#define GDBSTUB_DEBUG

#define GDBSTUB_IMPLEMENTATION
#include <gdbstub.h>
```

## Example

There is a full example file in `examples/example.c`

repository: WhoBrokeTheBuild/gdbstub

gha_language: C

repo_name: WhoBrokeTheBuild/gdbstub


text:
# node-bowling

[![Build Status](https://api.travis-ci.com/tphummel/node-bowling.svg?branch=master)](https://travis-ci.com/tphummel/node-bowling) [![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](https://github.com/feross/standard) [![Known Vulnerabilities](https://snyk.io/test/github/tphummel/node-bowling/badge.svg?targetFile=package.json)](https://snyk.io/test/github/tphummel/node-bowling?targetFile=package.json)

 📝scorekeeping for ten pin bowling 🎳

 - supports complete and incomplete games
 - 100% test coverage
 - zero dependencies

[![NPM](https://nodei.co/npm/bowling.png?downloads=true)](https://nodei.co/npm/bowling/)

# install

    npm install bowling

# test

    npm test

# usage

    var bowl = require('bowling')

    var aCompleteGame = ['81','9-','9/','71','9-','X','90','70','x','7-'],
        result

    result = bowl(aCompleteGame)

    console.log(result)

    /*
    [
      {outcome: '81', cumulative: 9, score: 9},
      {outcome: '9-', cumulative: 18, score: 9},
      {outcome: '9/', cumulative: 35, score: 17},
      {outcome: '71', cumulative: 43, score: 8},
      {outcome: '9-', cumulative: 52, score: 9},
      {outcome: 'X', cumulative: 71, score: 19},
      {outcome: '9-', cumulative: 80, score: 9},
      {outcome: '7-', cumulative: 87, score: 7},
      {outcome: 'X', cumulative: 104, score: 17},
      {outcome: '7-', cumulative: 111, score: 7}
    ]
    */

# example

`example.js`: a script that shows how a game could be scored progressively

![Example](http://i.imgur.com/A9NlY6W.gif)

also: a [live-updating terminal scoreboard](https://gist.github.com/tphummel/f757412870387c9897b9)

# notes

- miss: `0` or `-`
- strike: `x` or `X`
- foul: `f` or `F`

repository: tphummel/node-bowling

repo_name: tphummel/node-bowling


text:
---
title: How to preRead any Book in less than 15 minutes
layout: post
date: '2021-02-25 14:30:00 +0100'
image: "assets/tunjos_how_to_preread_any_book_in_less_than_15_minutes.jpg"
type: BlogPosting
categories:
- tips
---
![How to preread any Book in less than 15 minutes](/assets/tunjos_how_to_preread_any_book_in_less_than_15_minutes.jpg)

Just like you prepare a meal before eating it, you can also **preread** a book before reading it! Here is how you can.

1. Read the **Title** of the Book on the cover page.
A book can be judged by its cover, but you don't necessarily/always have to!

2. Read the **Table of Contents**.
This would give you an overview of the chapters and sections in a book, and subsequently, an overview of the contents of the book in terms of its ingredients.
Most books have clear chapter and section names that concisely describe the respective underlying contents. However, if you find yourself not understanding the essence of any of the listed items (chapters/sections) in the Table of Contents, you can briefly read the first paragraph (or the first 2-3 paragraphs) of that item (chapter/section).

3. Read the **Introduction**.
An introduction's purpose is to introduce you to a book and subsequently state the purpose and goals of the book. This would also give you some understanding of the author's writing style.

4. Read the **Back Cover**.
Many books have interesting texts on the back page that give tips on what a book contains, as well as what your gains would be by reading the book.

Now you have successfully preread your book. You have a summary of what you would benefit from completely reading the book. You can then proceed to read the full book immediately or at a later time.

**Tip**: When finally reading a book, it is the job of the author to convince you that their words are worth reading. It is the job of the author to persuade you to complete their book!

**Tip**: Reading takes your mind to places you'd never imagine.

gha_language: HTML


text:
# Hide or Leave a Team

To **Hide** or **Leave** a team:

![](../../../.gitbook/assets/image%20%28368%29.png)

## Hide a Team

To hide a team:

![](../../../.gitbook/assets/image%20%28384%29.png)

![](../../../.gitbook/assets/image%20%28340%29.png)

The team is hidden.

{% hint style="info" %}
To unhide a team, please search it in the spotlight.
{% endhint %}

## Leave a Team

To leave a team:

![](../../../.gitbook/assets/image%20%28381%29.png)

When leaving a team, you have the option to decide if you want to continue in teams channels or not, as shown below:

![](../../../.gitbook/assets/image%20%28355%29.png)

repository: Jeanstaquet/docs

gha_license_id: NOASSERTION

repo_name: Jeanstaquet/docs


text:
# cfn-news-to-telegram
Send Cloudformation feature releases to Telegram in a private chat on a weekly basis.

![Demo](https://raw.githubusercontent.com/jeshan/cfn-news-to-telegram/master/screenshot.png)

To deploy: `pipenv run bash deploy-cfn-news.sh`. This script leverages both AWS CLI and [sceptre](https://github.com/cloudreach/sceptre). (Use of sceptre is optional)

## Deploying via the Serverless Repo
Enter a Telegram bot token and a chat ID (group ID or your own user)

![](/diagram.png)
*Image automatically generated with [cfnbuddy](https://www.cfnbuddy.com)*

## Deploying via sceptre

It expects the following parameters available in Systems Manager Parameter store:

- `default-sam-bucket`: The S3 bucket that AWS CLI requires to upload the packaged cloudformation template.
- `bot-token`: The bot token for your bot.
- `/cfn-news-to-telegram/chat-id`: The user or group chat ID to whom to send the events.

**Note** that you must add the bot to the group that you specified while deploying, otherwise the bot will not have permission to send you messages.

repository: jeshan/cfn-news-to-telegram

repo_name: jeshan/cfn-news-to-telegram


text:
Sample ping-pong app for bouncing msgs thru Kafka topic
=======================================================

1. runs with docker-compose (or swarm if you have swarm created)

2. git clone http://yglcode/alpine-kafka-go

3. cd alpine-kafka-go/sameples/pingpong

4. "docker-compose build":

   which produce image "yglcode/pingpong:kafka"

   "docker-compose push" if you use swarm and private registry.

5. add network for kafka:

   compose: docker network create -d bridge kafka-net

   swarm:   docker network create -d overlay kafka-net

6. bring up kafka-cluster(1 zookeeper, 1 kafka):

   compose: docker-compose -f docker-compose.kafka.yml up -d

   swarm: docker stack deploy -c docker-compose.kafka.yml kafka-cluster

   create topic "ping" & "pong" with as many partitions as max number of pinger and ponger

7. bring up pinger & ponger:

   compose: docker-compose -f docker-compose.yml up -d

   swarm:   docker stack deploy -c docker-compose.yml pingpong

8. check messaging running:

   compose: docker-compose -f docker-compose.yml logs -f

   swarm:   docker service logs -f pingpong_pinger

9. scale pinger or ponger:

   compose: docker-compose -f docker-compose.yml scale pinger=2

   swarm:   docker service scale pingpong_pinger=2

repository: yglcode/alpine-kafka-go

repo_name: yglcode/alpine-kafka-go


text:
# Remove White Background from Images

Use `mix-blend-mode: multiply;` in your CSS to knock out white backgrounds
from images.

Browser support: http://caniuse.com/#search=mix-blend-mode

![Example of mix-blend-mode: multiply;](https://pbs.twimg.com/media/CfN7e6_XEAEnDJh.jpg)

Tip was tweeted on 4/04/2016 by Wes Bos
(https://twitter.com/wesbos/status/717052613934649344) with an example
CodePen (http://codepen.io/wesbos/pen/QNONJa)

repository: mikesprague/til

repo_name: mikesprague/til


text:
# Event MySQL

## Functions

### int eventmysql_get_conn_fd(MySQLi $link)

Get FD of MySQLi connection.

This function is extracted from Project [swoole-1.8.5](https://github.com/swoole/swoole-src).

repository: Timandes/event-mysql

repo_name: Timandes/event-mysql


text:
# mock-kubernetes-maven-plugin
Mock Api Server For Local Development With [Spring Cloud Kubernetes](https://cloud.spring.io/spring-cloud-kubernetes/)

Spring Cloud Kubernetes provided discovery and config server with Native Kubernetes. But it's hard to debug microservice locally. Neither [Minikube](https://minikube.sigs.k8s.io/) nor [K3S](https://www.rancher.cn/k3s/) is simple solution.
Mock Kubernets Maven Plugin make it more easily. Just plugin configuration and native kubernetes yaml files are required.
Bootstrap with mvn command, Local microservice will fetch configmap、secret even discovery without any change of your code.
It's better to work together with [generator-asf](https://github.com/alauda/generator-asf).

####  Instructions

1. Put kubernetes resources(yaml files) in directory called "kubernetes" under project root directory.

2. For local resources won't be pushed to git repository, put them in directory called ".local" under project root directory. Then you should append '.local/' in your .gitignore file.

3. Edit pom.xml of your project to append mock-kubernetes-maven-plugin:

   ```xml
   <build>
     <plugins>
       <plugin>
         <groupId>io.alauda</groupId>
         <artifactId>mock-kubernetes-maven-plugin</artifactId>
         <version>1.0.2-RELEASE</version>
       </plugin>
     </plugins>
   </build>
   ```

4. Execute command in shell:

   ```shell
   mvn mock-kubernetes:mock
   ```

Then mock api server will bootstrap.It will accept any key for termination.

#### Configuration

Plugin will search yaml files recursion in "kubernetes" directory. Specify multiple directory is optional:

```xml
<build>
  <plugins>
    <plugin>
      <groupId>io.alauda</groupId>
      <artifactId>mock-kubernetes-maven-plugin</artifactId>
      <version>1.0.2-RELEASE</version>
      <configuration>
        <resources>
          <resource>kubernetes</resource>
          <resource>services</resource>
        </resources>
      </configuration>
    </plugin>
  </plugins>
</build>
```

Mock-server will startup at <IP_ADDRESS>:8443, port is alternate in configuration:

```xml
<build>
  <plugins>
    <plugin>
      <groupId>io.alauda</groupId>
      <artifactId>mock-kubernetes-maven-plugin</artifactId>
      <version>1.0.2-RELEASE</version>
      <configuration>
        <port>8999</port>
      </configuration>
    </plugin>
  </plugins>
</build>
```

#### Mock Kubernetes Discovery With Spring Cloud

For remote micoservice debuging, you should use Service And Endpoints resources with NodePort address in Kubernetes:

```yaml
apiVersion: v1
kind: Service
metadata:
  name: user-service
---
apiVersion: v1
kind: Endpoints
metadata:
  name: user-service
subsets:
  - addresses:
      - ip: <IP_ADDRESS>
    ports:
      - port: 31101
```

Modify bootstrap.yml for mock-server：

```yaml
spring:
  cloud:
    kubernetes:
      client:
        master-url: https://<IP_ADDRESS>:8443
        trustCerts: true
```

repository: alauda/mock-kubernetes-maven-plugin

repo_name: alauda/mock-kubernetes-maven-plugin


text:
# Fortran Language

## Background and Motivation

Fortran is built from the ground up to translate mathematics into simple,
readable, and fast code – straightforwardly maintainable by the gamut of
mathematicians, scientists, and engineers who actually produce/apply that
mathematics. If that is the task at hand, it is the right tool for the job and,
as right tools tend to do, can save enormous time and pain, with most excellent
results. If, however, mathematics is not the main task, then almost certainly
C/C++, or a host of other more general-purpose languages, will be much better.

An important point is that having all the basic elements in the language itself
greatly simplifies both writing and reading fast, robust code. Writing and
reading is simplified because there is a single standard set of
functions/constructs. No need to wonder what class the array operations are
coming from, what the member functions are, how well it will be maintained in 5
years, how well optimized it is/will be, etc. All the basics are in the
language itself: fast, robust, and standard for all to read and write – and for
the compiler writers to optimize at the machine level.

## How to Learn Fortran

Fortran is relatively quick to learn because it is so much simpler and smaller
than C/C++ (in practice, that is, with all needed libraries included).
A good online resource to learn modern Fortran is:

* [fortran90.org](https://www.fortran90.org)

The website provides the
[recommended practices](https://www.fortran90.org/src/best-practices.html)
for modern Fortran and also has
[side-by-side examples](https://www.fortran90.org/src/rosetta.html)
of using Fortran and Python for common numerical tasks,
highliting the conceptual similarities between the two languages.
The website also maintains a
[list of books](https://www.fortran90.org/src/faq.html#what-are-good-books-to-learn-fortran-from)
and links to
[other online resources](https://www.fortran90.org/src/faq.html#what-are-other-good-online-fortran-resources)
about Fortran.

repository: stjordanis/lfortran

repo_name: stjordanis/lfortran


text:
# FeatEvalMusGen
Our custom scripts for Dataset Preprocessing and recursive Feature Extraction.

# Data Preprocessing

To preprocess your own dataset for [SampleRNN PyTorch](https://github.com/deepsound-project/samplernn-pytorch "Github Repository of SampleRNN PyTorch"), you can use our `combine-and-split.sh` bash script. Move this this script into `samplern-pytorch/datasets`. Create a folder `preprocess` for your dataset folder(s). For the purposes of showing an example, we will be using a dataset called `piano` with three .WAV files to preprocess.

![This is how the folder would look like after this step](../assets/folder-example-before.png?raw=true "This is how the folder would look like before executing.")

Open up a terminal and navigate to the `datasets` folder, where our script now resides.
```
$ cd Desktop/samplernn-pytorch/datasets/
```
Make sure we are able execute our bash script, by setting the correct permissions.
```
$ sudo chmod +x combine-split-audio.sh
```
Now we can start preprocessing our dataset by executing as follows. We will be using an audio chunk size of 8 second for the example.
The script can have the following parameters: `./combine-split-audio.sh <chunk size in seconds> <preprocess path> <(optional) channels:1> <(optional) audio bitrate:16k> <(optional) audio sampling rate:16000>`
```
$ ./combine-split-audio.sh 8 piano
```
When this script has executed correctly, a folder will be created in the `datasets` folder, containing all audio chunks. In this case we used the default parameters (1 channel, 16k bitrate, 16k sampling rate).
![This is how the folder would look like after this step](../assets/folder-example-after.png?raw=true "This is how the folder would look like after.")

# Feature Extraction

To extract musical features from your audio files, we created a custom script that uses the [`essentia_streaming_extractor_music`](http://essentia.upf.edu/documentation/streaming_extractor_music.html) called `generate-json.sh` to compute JSON-files for each audio file found in a given folder. Move this bash script onto your desktop. We will be using the dataset called `piano` with three .WAV files to extract features from.

Now, we need Essentias `essentia_streaming_extractor_music`. We can get this as a binary from the bottom of [this page](http://acousticbrainz.org/download). Download one suitable for your Operating System (Windows, Linux or Mac). We downloaded [`mac 64 bit extractor static binary for 10.7 and higher`](http://acousticbrainz.org/static/download/essentia-extractor-v2.1_beta2-2-gbb40004-osx.tar.gz) for this example. Unzip the compressed folder `essentia-extractor-v2.1_beta2-2-gbb40004-osx.tar` and move the binary file `streaming_extractor_music` to your desktop.

Open up a terminal and navigate to the Desktop.

```
$ cd ~/Desktop/
```

Make sure we are able execute our bash script, by setting the correct permissions.
```
$ sudo chmod +x generatejson.sh
```
Now we can start the feature extraction of our dataset by executing as follows. We will be using the audio files in the folder `~/Desktop/samplernn-pytorch/datasets/preprocess/piano`.
The script can have the following parameters: `./generatejson.sh <location streaming_extractor_music> <audio-files folder>`
```
$ ./generatejson.sh ~/Desktop/streaming_extractor_music ~/Desktop/samplernn-pytorch/datasets/preprocess/piano
```
When this script has executed correctly, a folder will be created in folder we specified called `json`, containing all files in JSON-format with all the features, ordered by keys.
![This is how the folder would look like after this step](../assets/folder-example-json.png?raw=true "This is how the folder would look like after.")

repository: bartvdbraak/FeatEvalMusGen

repo_name: bartvdbraak/FeatEvalMusGen


text:
---
discourse: 15457
---

(storage-cephfs)=
# CephFS - `cephfs`

```{youtube} https://youtube.com/watch?v=kVLGbvRU98A
```

% Include content from [storage_ceph.md](storage_ceph.md)
```{include} storage_ceph.md
    :start-after: <!-- Include start Ceph intro -->
    :end-before: <!-- Include end Ceph intro -->
```

{abbr}`CephFS (Ceph File System)` is Ceph's file system component that provides a robust, fully-featured POSIX-compliant distributed file system.
Internally, it maps files to Ceph objects and stores file metadata (for example, file ownership, directory paths, access permissions) in a separate data pool.

## Terminology

% Include content from [storage_ceph.md](storage_ceph.md)
```{include} storage_ceph.md
    :start-after: <!-- Include start Ceph terminology -->
    :end-before: <!-- Include end Ceph terminology -->
```

A *CephFS file system* consists of two OSD storage pools, one for the actual data and one for the file metadata.

## `cephfs` driver in LXD

```{note}
The `cephfs` driver can only be used for custom storage volumes with content type `filesystem`.

For other storage volumes, use the {ref}`Ceph <storage-ceph>` driver.
That driver can also be used for custom storage volumes with content type `filesystem`, but it implements them through Ceph RBD images.
```

% Include content from [storage_ceph.md](storage_ceph.md)
```{include} storage_ceph.md
    :start-after: <!-- Include start Ceph driver cluster -->
    :end-before: <!-- Include end Ceph driver cluster -->
```

You must create the CephFS file system that you want to use beforehand and specify it through the [`source`](storage-cephfs-pool-config) option.

% Include content from [storage_ceph.md](storage_ceph.md)
```{include} storage_ceph.md
    :start-after: <!-- Include start Ceph driver remote -->
    :end-before: <!-- Include end Ceph driver remote -->
```

% Include content from [storage_ceph.md](storage_ceph.md)
```{include} storage_ceph.md
    :start-after: <!-- Include start Ceph driver control -->
    :end-before: <!-- Include end Ceph driver control -->
```

The `cephfs` driver in LXD supports snapshots if snapshots are enabled on the server side.

## Configuration options

The following configuration options are available for storage pools that use the `cephfs` driver and for storage volumes in these pools.

(storage-cephfs-pool-config)=
### Storage pool configuration

Key                           | Type                          | Default                                 | Description
:--                           | :---                          | :------                                 | :----------
`cephfs.cluster_name`         | string                        | `ceph`                                  | Name of the Ceph cluster that contains the CephFS file system
`cephfs.fscache`              | bool                          | `false`                                 | Enable use of kernel `fscache` and `cachefilesd`
`cephfs.path`                 | string                        | `/`                                     | The base path for the CephFS mount
`cephfs.user.name`            | string                        | `admin`                                 | The Ceph user to use
`source`                      | string                        | -                                       | Existing CephFS file system or file system path to use
`volatile.pool.pristine`      | string                        | `true`                                  | Whether the CephFS file system was empty on creation time

{{volume_configuration}}

### Storage volume configuration

Key                     | Type      | Condition                 | Default                                        | Description
:--                     | :---      | :--------                 | :------                                        | :----------
`security.shifted`      | bool      | custom volume             | same as `volume.security.shifted` or `false`   | {{enable_ID_shifting}}
`security.unmapped`     | bool      | custom volume             | same as `volume.security.unmapped` or `false`  | Disable ID mapping for the volume
`size`                  | string    | appropriate driver        | same as `volume.size`                          | Size/quota of the storage volume
`snapshots.expiry`      | string    | custom volume             | same as `volume.snapshots.expiry`              | {{snapshot_expiry_format}}
`snapshots.pattern`     | string    | custom volume             | same as `volume.snapshots.pattern` or `snap%d` | {{snapshot_pattern_format}} [^*]
`snapshots.schedule`    | string    | custom volume             | same as `volume.snapshots.schedule`            | {{snapshot_schedule_format}}

[^*]: {{snapshot_pattern_detail}}

repository: lxc/incus

gha_language: Go

repo_name: lxc/incus


text:
# Repo for second blog post

## How to use

Change the `Main.hs` file according to the animation you want to compile.

Then compile the animation, e.g. as gif:

```bash
stack ./src/Main.hs -- render -w 3840 -h 2160 --compile --format gif
```

## Animations

### Static star (incorrect)

```haskell
main :: IO ()
main = reanimate
  $ docEnv
  animationIncorrectStaticStar
```

![A incorrect static star](./images/incorrect.gif)

### Static star

```haskell
main :: IO ()
main = reanimate
  $ docEnv
  animationStaticStar
```

![A static star](./images/staticStar.gif)

### Static star (changed view)

```haskell
main :: IO ()
main = reanimate
  $ docEnv
  animationStaticStarView
```

![A static star with changed view](./images/staticStarView.gif)

### Static star (rotated by 90°)

```haskell
main :: IO ()
main = reanimate
  $ docEnv
  animationStaticStar90
```

![A static star rotated by 90 degrees](./images/staticStar90.gif)

### Demo Cartesian coordinates

```haskell
main :: IO ()
main = reanimate
  $ docEnv
  animationCartesianCoordinates
```

![Coordinates of point in Cartesian coordinates](./images/PointCartesian.gif)

### Demo polar coordinates

```haskell
main :: IO ()
main = reanimate
  $ docEnv
  animationPolarCoordinates
```

![Coordinates of point in polar coordinates](./images/PointPolar.gif)

### Static dot

```haskell
main :: IO ()
main = reanimate
  $ docEnv
  animationStaticDot
```

![A static blue dot](./images/staticDot.gif)

### Jumping dot

```haskell
main :: IO ()
main = reanimate
  $ docEnv
  animationJumpingDot
```

![A jumping blue dot](./images/jumpingDot.gif)

### Smooth dot

```haskell
main :: IO ()
main = reanimate
  $ docEnv
  animationSmoothDot
```

![A smooth moving blue dot](./images/smoothDot.gif)

### Creative Star

```haskell
main :: IO ()
main = reanimate
  $ docEnv
  animationCreativeStar
```

![A star changing color and scale over time](./images/creative.gif)