Premier League stats & predictions
Jordan
Premier League
- 17:45 Al-Faisaly vs Al-Salt -Under 2.5 Goals: 65.50%Odd: 1.57 Make Bet
- 15:00 Shabab Al-Ordon vs Ramtha SC -Over 1.5 Goals: 74.50%Odd: 1.38 Make Bet
Upcoming Premier League Matches: A Deep Dive into Tomorrow's Fixtures
As the Premier League continues to captivate fans around the globe, tomorrow promises another thrilling day of football. With a series of high-stakes matches lined up, fans and bettors alike are eagerly anticipating the outcomes. In this comprehensive guide, we will delve into the fixtures, analyze team performances, and provide expert betting predictions to enhance your viewing and betting experience.
Fixture Overview
- Match 1: Manchester United vs. Chelsea
- Match 2: Liverpool vs. Arsenal
- Match 3: Manchester City vs. Tottenham Hotspur
- Match 4: Everton vs. West Ham United
- Match 5: Southampton vs. Leicester City
Detailed Analysis of Each Match
Manchester United vs. Chelsea
This clash of titans is set to be one of the most anticipated matches of the weekend. Manchester United, currently sitting at the top of the table, will look to extend their lead against a formidable Chelsea side known for their tactical prowess and defensive solidity. The Red Devils have been in stellar form, with their attacking trio delivering consistent performances. However, Chelsea's recent resurgence under their new manager has seen them climb up the standings, making this match a must-watch.
Betting Predictions:
- Correct Score: Manchester United 2-1 Chelsea
- Total Goals Over/Under: Over 2.5 goals
- Bet on: Both teams to score (Yes)
Liverpool vs. Arsenal
Liverpool and Arsenal are set to lock horns in a classic north-west versus north London derby. Liverpool's attacking flair will be tested against Arsenal's disciplined defense. The Reds have been clinical in front of goal, with their front three causing havoc for opponents week in and week out. Arsenal, on the other hand, have shown resilience and tactical acumen under their manager, making them a tough opponent.
Betting Predictions:
- Correct Score: Liverpool 3-1 Arsenal
- Total Goals Over/Under: Over 2.5 goals
- Bet on: Liverpool to win (1)
Manchester City vs. Tottenham Hotspur
In what promises to be a tactical battle, Manchester City will face Tottenham Hotspur at the Etihad Stadium. Pep Guardiola's men are known for their possession-based style and intricate passing sequences, while Spurs have been solid defensively under their new manager. This match could go either way, with both teams having the quality to secure a win.
Betting Predictions:
- Correct Score: Manchester City 2-0 Tottenham Hotspur
- Total Goals Over/Under: Under 2.5 goals
- Bet on: Draw no bet (Manchester City)
Eve<|repo_name|>TatianaAlekseeva/TatianaAlekseeva.github.io<|file_sep|>/_posts/2020-01-10-generate-docs-from-comments.md
---
layout: post
title: "Generate documentation from comments"
date: 2020-01-10
---
* TOC
{:toc}
## Overview
The [JSDoc](https://jsdoc.app/) is an excellent tool for generating documentation from code comments.
It can be used for JavaScript or TypeScript.
If you don't have JSDoc installed yet:
npm install -g jsdoc
To generate docs for all files in current directory:
jsdoc .
The default output is `out` folder.
## Simple example
### Commenting
In this example we'll use TypeScript but JSDoc supports JavaScript as well.
Consider following class:
typescript
class Person {
name: string;
age: number;
constructor(name: string) {
this.name = name;
this.age = Math.floor(Math.random() * (100 - 18)) + 18;
}
getAge(): number {
return this.age;
}
sayHello(): void {
console.log(`Hello! My name is ${this.name} and I am ${this.age} years old.`);
}
}
We can add comments like that:
typescript
/**
* Class representing a person.
*/
class Person {
/**
* @type {string}
*/
name: string;
/**
* @type {number}
*/
age: number;
/**
* @param {string} name
*/
constructor(name: string) {
this.name = name;
this.age = Math.floor(Math.random() * (100 - 18)) + 18;
}
/**
* Returns age.
*
* @returns {number} Age.
*/
getAge(): number {
return this.age;
}
/**
* Say hello.
*
* @example
* const person = new Person("John");
* person.sayHello();
*/
sayHello(): void {
console.log(`Hello! My name is ${this.name} and I am ${this.age} years old.`);
}
}
The first comment block describes class as a whole.
Other comments describe each property and method separately.
We can also add examples like that:
typescript
/**
* Say hello.
*
* @example
* const person = new Person("John");
* person.sayHello();
*/
### Generating
To generate documentation from code we run `jsdoc` command:
jsdoc ./person.ts
It will generate HTML documentation in `out` folder.
Let's open `index.html` file.

You can see that it contains documentation for class and its methods.

You can see method description and example there.

You can also see types there.
### Configuration
To change output directory we can create `jsdoc.json` file with configuration:
json
{
"source": "./src",
"destination": "./docs"
}
After that we can run:
jsdoc -c jsdoc.json
Now our docs will be generated in `docs` folder instead of `out`.
## Complex example
### Commenting
Consider following code:
typescript
/**
* Class representing a person.
*/
export class Person {
/**
* @type {string}
*/
name: string;
/**
* @type {number}
*/
age: number;
/**
* @param {string} name
*/
constructor(name: string) {
this.name = name;
this.age = Math.floor(Math.random() * (100 - 18)) + 18;
}
/**
* Returns age.
*
* @returns {number} Age.
*/
getAge(): number {
return this.age;
}
/**
* Say hello.
*
* @example
* const person = new Person("John");
* person.sayHello();
*/
sayHello(): void {
console.log(`Hello! My name is ${this.name} and I am ${this.age} years old.`);
}
}
/**
* Class representing an employee.
*
* @extends {Person}
*/
export class Employee extends Person {
private _salary: number;
constructor(name: string, salary: number) {
super(name);
if (!Number.isInteger(salary)) {
throw new Error("Salary must be integer.");
}
if (salary <= 0) {
throw new Error("Salary must be positive.");
}
this._salary = salary;
}
getSalary(): number {
return this._salary;
}
setSalary(salary: number): void {
if (!Number.isInteger(salary)) {
throw new Error("Salary must be integer.");
}
if (salary <= 0) {
throw new Error("Salary must be positive.");
}
this._salary = salary;
}
}
/**
* Get employee by id.
*
* @param {number} id Employee id.
*
* @returns {Employee | null} Employee or null if not found.
*
* @throws Will throw error if employee not found.
*/
export function getEmployeeById(id: number): Employee | null {
if (!Number.isInteger(id)) {
throw new Error("Id must be integer.");
}
if (id <= 0) {
throw new Error("Id must be positive.");
}
const employees = [
new Employee("John", Math.floor(Math.random() * (100000 - 10000)) + 10000),
new Employee("Jane", Math.floor(Math.random() * (100000 - 10000)) + 10000),
new Employee("Bob", Math.floor(Math.random() * (100000 - 10000)) + 10000)
];
for (const employee of employees) {
if (employee.getAge() === id) return employee;
}
throw new Error(`Employee with id ${id} not found.`);
}
We added some complexity here:
* We made `Person` class exported so that it could be imported by other modules.
* We added `Employee` class which extends `Person`.
* We added function which gets employee by id from array of employees.
### Generating
To generate documentation from code we run `jsdoc` command:
jsdoc ./employee.ts
It will generate HTML documentation in `out` folder.
Let's open `index.html` file.

You can see that it contains documentation for both classes and function now.

You can see that there are links to parent class now.

You can see that there are links to inherited methods now.

You can see that there are links to imported classes now.
### Configuration
We'll use same configuration as before but we'll add some more options:
json
{
"source": "./src",
"destination": "./docs",
"opts": {
"recurse": true,
"verbose": true,
"encoding": "utf8"
},
"plugins": ["plugins/markdown"],
"templates": "./templates"
}
* `"recurse": true` option tells JSDoc to scan all subdirectories recursively.
* `"verbose": true` option tells JSDoc to show more information about what it is doing while running.
* `"encoding": "utf8"` option tells JSDoc to use UTF-8 encoding when reading source files.
* `"plugins": ["plugins/markdown"]` option tells JSDoc to use markdown plugin which allows us to write comments in markdown format instead of plain text.
* `"templates": "./templates"` option tells JSDoc where to find custom templates for generated documentation.
To use custom templates we need to create `templates/default.js` file with following content:
javascript
module.exports = function(templateData) {
var template =
`
${templateData.title}
`;
if (templateData.styles.length >0) {
template += 'n';
template += templateData.styles.map(function(file) { return 'n'; }).join('');
};
template +=
`
`;
if (templateData.footer.length >0) {
template += `
${templateData.footer}`;
};
template +=
`
${templateData.body}
`;
if (templateData.footer.length >0) {
template += `
${templateData.footer}`;
};
template +=
`
`;
template += '';
return template;
};
This template uses Bootstrap CSS framework for styling so that our documentation looks nicer out of the box without any additional work on our part.
We also added some additional scripts like highlight.js for syntax highlighting and search.js for adding search functionality.
Finally we added Google Analytics tracking code so that we can track how many people visit our documentation page once it is published online.
After creating custom templates we need to run JSDoc again with updated configuration file:
jsdoc -c jsdoc.json
Now our docs will be generated using custom templates instead of default ones provided by JSDoc itself.<|repo_name|>TatianaAlekseeva/TatianaAlekseeva.github.io<|file_sep|>/_posts/2019-05-11-typescript-overview.md
---
layout: post
title: "TypeScript overview"
date: "2019-05-11"
---
* TOC
{:toc}
## Overview
TypeScript is an open-source language developed by Microsoft that builds on JavaScript by adding optional static typing as well as other features such as classes, interfaces etc., which makes it easier to write large-scale applications without sacrificing performance or maintainability.
TypeScript compiles down into plain old JavaScript so you don't need any special runtime environment or tools just like regular JavaScript does; however unlike JavaScript you get all these extra features out-of-the-box without having write any additional code yourself!
## Installation
To install TypeScript globally via npm run:
npm install -g typescript
## Usage
To compile TypeScript file into JavaScript file run:
tsc filename.ts
It will create corresponding `.js` file in same directory as `.ts`.
## Basic Types
TypeScript supports following basic types:
* `boolean`: true/false values.
* `number`: integers and floats.
* `string`: text values enclosed in quotes ("").
* `array`: list of values enclosed in square brackets ([]).
* `object`: key-value pairs enclosed in curly braces ({}) or created using object literal notation ({key1: value1, key2: value2}).
## Type Annotations
To annotate variable type use colon after variable name followed by type name e.g.:
typescript
let x:number =10; // x has type 'number'
let y:string = "hello"; // y has type 'string'
let z:boolean = true; // z has type 'boolean'
let arr:number[]=[1,2,3]; // arr has type 'number[]' i.e., an array containing numbers only!
let obj:{name:string}; // obj has type '{name:string}'
obj={name:"John"}; // ok!
obj={age:30}; // error! missing property 'name'
obj={name:"John",age:30}; // ok!
obj=null; // error! cannot assign null value!
obj={} // error! cannot assign empty object!
## Functions
Functions are defined using function keyword followed by function name followed by parentheses
${templateData.footer}`; }; template += `
${templateData.footer}`; }; template += ` `; template += '