# Linux Swap Configuration Guide for EC2 Instances
## What is Swap?
**Swap** is disk space that the Linux kernel uses as virtual memory when physical RAM is full. Think of it as an overflow area for memory.
**How it works:**
1. When RAM fills up, Linux moves rarely-used memory pages to swap
2. Frees up RAM for active processes
3. If a swapped-out page is needed, Linux reads it back from disk (slow but prevents crashes)
**Trade-off:** Swap is 100-1000x slower than RAM, but prevents
# NotebookLM - Questions Pièges & Réponses pour Présentation Finance
## 🔒 SÉCURITÉ & CONFIDENTIALITÉ
### Q1 : "Si on met des données sensibles dans NotebookLM, sont-elles utilisées pour entraîner l'IA ?"
**Réponse courte :**
Cela dépend de la version utilisée.
**Réponse détaillée :**
| Version | Training IA | Revue humaine | Verdict |
|---------|-------------|---------------|---------|
| **Free** | ❌ Non | ⚠️ Si feedback donné | ❌ Proscrire pour données sensibles |
| **Plus**
# Templates NotebookLM - Audio/Video Overviews
## Structure d'un bon prompt
```
[LANGUE]
[AUDIENCE]
[OBJECTIF]
[FOCUS/INCLURE]
[EXCLURE]
[TON]
[DURÉE]
[STRUCTURE]
```
---
## 📊 TEMPLATE 1 : Briefing Exécutif (5min)
### Use case
Présenter un sujet technique à la direction
### Instructions
```
Language: French
Target audience: C-level executives, board members, non-technical stakeholders
Goal: Enable strategic decision-making on [TOPIC]
Focus on:
- Business impact
# NotebookLM - Jour 1 Matinée : Tester les Limites
## 📋 Vue d'ensemble (09h-10h30)
**Objectif** : Comprendre quand NotebookLM excelle et quand il atteint ses limites
---
## 1️⃣ Versions NotebookLM - Comparatif
| Critère | **Free** | **Plus** | **Enterprise** |
|---------|----------|----------|----------------|
| **Prix** | Gratuit | $14-22/mois (Workspace)<br>$20/mois (Google One AI Premium) | Sur devis |
| **Notebooks** | 20 | 100 | Illimité |
| **Sources/notebook** | 50 | 30
# DORA - Digital Operational Resilience Act
## Définition
Règlement européen entré en vigueur le **17 janvier 2025** pour renforcer la résilience numérique du secteur financier.
## Objectifs
- Garantir que les institutions financières peuvent **résister, répondre et se remettre** de perturbations ICT (cyber-attaques, pannes systèmes)
- Harmoniser les règles de cybersécurité dans l'UE
- Superviser les fournisseurs IT critiques du secteur financier
## Qui est concerné ?
- Banques
-
-- Create database
CREATE DATABASE pc_repair_service;
USE pc_repair_service;
-- Customers table
CREATE TABLE customers (
customer_id INT AUTO_INCREMENT PRIMARY KEY,
full_name VARCHAR(100) NOT NULL,
email VARCHAR(100) UNIQUE,
phone VARCHAR(20),
address TEXT,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
-- Devices table
CREATE TABLE devices (
device_id INT AUTO_INCREMENT PRIMARY KEY,
customer_id INT NOT NULL,
device_type VARCHAR(50), -- e.g., Laptop, De
/**
* Given a matrix of heights, returns coordinates of cells that can flow to both the Pacific and Atlantic oceans.
* Pacific touches the left and top edges; Atlantic touches the right and bottom edges.
* @param {number[][]} heights - 2D grid of elevation values
* @return {number[][]} - List of coordinates [i, j] that can reach both oceans
*/
var pacificAtlantic = function(heights) {
let row = heights.length;
let col = heights[0].length;
let arr = []; // Stores final result: ce
grasp - physical or mental. If mental, difference between understand/catch on to sth.
used mostly as "physical"
diminutive - use with comparison. Business, academic language
resent
go to work
partially
### **1. Sending Form Data with Fetch (FormData object)**
If you already have a `<form>` element in HTML:
```html
<form id="myForm">
<input type="text" name="username" placeholder="Enter username">
<input type="email" name="email" placeholder="Enter email">
<button type="submit">Submit</button>
</form>
```
You can submit it with JavaScript:
```javascript
document.getElementById('myForm').addEventListener('submit', async function (e) {
e.preventDefault(); // prevent default form submi
# Fetch API Usage
1. Handling `FormData` (`multipart/form-data`)
2. Handling JSON (`application/json`)
---
## **1. PHP Backend for FormData (multipart/form-data)**
If you send data using `FormData`, the browser automatically sends it as `multipart/form-data`.
Example Fetch:
```javascript
const formData = new FormData();
formData.append("username", "Ryan");
formData.append("email", "test@example.com");
fetch("process.php", {
method: "POST",
body: formData
});
```
PHP (`process.php`):
## 📝 JavaScript DOM Manipulation Cheat Sheet
### 🔍 Selecting Elements
```js
document.getElementById("id"); // By ID
document.getElementsByClassName("class"); // By class (HTMLCollection)
document.getElementsByTagName("tag"); // By tag
document.querySelector("cssSelector"); // First match
document.querySelectorAll("cssSelector"); // All matches (NodeList)
```
---
### ✏️ Changing Content
```js
element.textContent = "Hello World"; // Text only
element.innerHTML =
### 🔹 **JavaScript Form Events Reference**
| **Event** | **Description** | **Typical Use** |
| ------------ | ----------------------------------------------------------------------------------------------- | --------------------------------------------------- |
| **submit** | Fired when a form is submitted. | Val
<?php
require __DIR__ . '/vendor/autoload.php';
use Dotenv\Dotenv;
class Database {
private $pdo;
private static $instance = null;
private function __construct() {
// Load .env
$dotenv = Dotenv::createImmutable(__DIR__);
$dotenv->load();
$host = $_ENV['DB_HOST'];
$db = $_ENV['DB_NAME'];
$user = $_ENV['DB_USER'];
$pass = $_ENV['DB_PASS'];
$charset = $_ENV['DB_CHARSET'] ?? 'utf8mb4';
$dsn = "mysq
/**
* @param {number[]} height
* @return {number}
*/
var maxArea = function(height) {
// Initialize two pointers: one at the start, one at the end of the array
let left = 0;
let right = height.length - 1;
// Variable to keep track of the maximum area found so far
let maxArea = 0;
// Loop until the two pointers meet
while (left < right) {
// Calculate the width between the two lines
let width = right - left;
// Calculate the height of the
# Openshift Cheatsheet
## Work with projects (Kubernetes namespaces)
1) Run `oc get project` to get all projects.
2) Run `oc project [project-name]` to change project.
## Create an application from a container image
* `oc new-app [image-path]`: Create an application
* `oc expose service/[app-name]`: Create a route to expose access to the application.
## Get the application’s Kubernetes label and Delete resources
* `oc get deployment --show-labels`: The result should be as below and the l
<?php
$states = array(
'AL' => 'Alabama',
'AK' => 'Alaska',
'AZ' => 'Arizona',
'AR' => 'Arkansas',
'CA' => 'California',
'CO' => 'Colorado',
'CT' => 'Connecticut',
'DE' => 'Delaware',
'FL' => 'Florida',
'GA' => 'Georgia',
'HI' => 'Hawaii',
'ID' => 'Idaho',
'IL' => 'Illinois',
'IN' => 'Indiana',
'IA' => 'Iowa',
'KS' => 'Kansas',
'KY' => 'Kentucky',
'LA' => 'Louisiana',
'ME' => 'Maine',
'MD' => 'Maryland',
'MA' =>