This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Declare an User interface with typed properties | |
interface User { | |
name: string; | |
age: number; | |
[key: string]: any; | |
} | |
// Declare types for the parameter, and for the function return prettyPrintWilder | |
const prettyPrintWilder = (users: User[]) => { | |
users.map((user: User) => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- MySQL dump 10.13 Distrib 5.7.21, for Linux (x86_64) | |
-- | |
-- Host: localhost Database: bdd_advanced | |
-- ------------------------------------------------------ | |
-- Server version 5.7.21-0ubuntu0.16.04.1 | |
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; | |
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; | |
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; | |
/*!40101 SET NAMES utf8 */; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
abstract class HighWay | |
{ | |
protected array $currentVehicles; | |
protected int $nbLane; | |
protected int $maxSpeed; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mysql> SELECT team.name, COUNT(*) AS nb_student | |
-> FROM team JOIN player ON team.id=player.team_id | |
-> GROUP BY team_id | |
-> ORDER BY nb_student DESC; | |
+------------+------------+ | |
| name | nb_student | | |
+------------+------------+ | |
| Gryffindor | 36 | | |
| Slytherin | 21 | | |
| Ravenclaw | 15 | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mysql> SELECT wizard.firstname, wizard.lastname, player.role, team.name | |
-> FROM wizard JOIN player ON wizard.id=player.wizard_id | |
-> JOIN team ON team.id=player.team_id | |
-> ORDER BY team.name ASC, player.role, lastname, firstname; | |
+-------------+-----------------+--------+------------+ | |
| firstname | lastname | role | name | | |
+-------------+-----------------+--------+------------+ | |
| Sirius | Black | beater | Gryffindor | | |
| Lavender | Brown | beater | Gryffindor | | |
| Seamus | Finnigan | beater | Gryffindor | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require 'php-connec.php'; | |
$pdo = new \PDO(DSN, USER, PASS); | |
$query = "SELECT * FROM friend"; | |
$statement = $pdo->query($query); | |
$friends = $statement->fetchAll(); | |
?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once 'Vehicle.php'; | |
class Bicycle extends Vehicle | |
{ | |
public function __construct(string $color, int $nbSeats, string $energy) | |
{ | |
parent::__construct($color, $nbSeats); | |
$this->energy = $energy; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Bicycle | |
{ | |
private $color; | |
private $currentSpeed; | |
private $name; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Fighter | |
{ | |
const MAX_LIFE = 100; | |
private $name; | |
private $life = self :: MAX_LIFE; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<link href="style.css" rel="stylesheet"> | |
<title>Form</title> | |
</head> |
NewerOlder