/**
* Count the number of unique trapezoids that can be formed
* from a set of points on the Cartesian plane.
*
* @param {number[][]} points - Array of [x, y] coordinates
* @return {number} - Number of trapezoids
*/
var countTrapezoids = function(points) {
const t = new Map(); // Tracks lines grouped by slope (normalized)
const v = new Map(); // Tracks lines grouped by raw vector direction
const n = points.length;
/**
* Helper to add a line into a map structure.
// https://go.dev/tour/moretypes/16
// https://chatgpt.com/share/69304294-58ac-8006-9cde-961288946986
package main
import "fmt"
var pow = []int{1, 2, 4, 8, 16, 32, 64, 128}
func main() {
for i, v := range pow {
fmt.Printf("2**%d = %d\n", i, v)
}
}
.block-button-container,
.button-group {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 1rem 3rem;
&.align-center {
justify-content: center;
}
&.align-right {
justify-content: end;
}
}# VerneMQ Connection Handling
If you use a vernemq and you need to check to which broker which client is
connected, these commands might help.
Connect to vernemq
```sh
k -n <namespace> exec -it <pod_name_of_vernemq_broker> -- /bin/sh
```
List connections and grep for specific service
```sh
vmq-admin session show --limit 10000 --node --client_id --is_online | grep <service>
```
Enforce a disconnect and re-connect
```sh
vmq-admin session disconnect client-id=<client_id>
```
If you have a tamgc db:dump -z -f "dump1.sql.gz" --exclude-table="catalog_product_index_eav_replica" --exclude-table="report_viewed_product_index" --exclude-table="catalog_product_index_price_replica" --exclude-table="sales_order_data_exporter_cl_index_batches" --exclude-table="sales_order_data_exporter_cl_index_sequence" --exclude-table="tmp_akeneo_connector_entities_asset" --exclude-table="magento_logging_event_changes" --exclude-table="nn_cache_algolia_reccomend"
Scattered Spider (and allied group Scattered LAPSUS$ Hunters) 🌎
VERIFIED CARDER SELLING WU,BANK,PAYPAL,CASHAPP,SKRILL TRANSFER BANK LOGS,DUMPS+PIN,CLONED CARDS
Telegram: JeansonTooL SELL CCV CANADA FULLZ FRESH SSN DOB WITH DL LIVE MAIL PASSWORD OFFICE365 PAYPAL
Telegram: JeansonTooL CVV,Fullz,Dumps,PayPal Debit/Credit Card,CashApp, Western Union, Transfer,ATM Clone Cards!!
Telegram: JeansonTooL SELL CVV FULLZ INFO GOOD USA-UK-CA-AU-INTER,PASS VBV/BIN/DOB
Telegram: JeansonTooL : Sell Dump/**
* @param {number[][]} points
* @return {number}
*/
var countTrapezoids = function(points) {
const MOD = 1e9 + 7;
// Step 1: Group points by y-coordinate
let yGroups = new Map();
for (let [x, y] of points) {
if (!yGroups.has(y)) yGroups.set(y, []);
yGroups.get(y).push(x);
}
// Step 2: Count pairs per level
let pairs = [];
for (let xs of yGroups.values()) {
let n = xs.length;
if (n >= 2) {
pairs.push((n * (n - 1))# go run [path_to_entry_point_file_name]
# example
go run main.go
#example 2
go run basics/for_loop.go{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "BlockedServiceActions",
"Effect": "Deny",
"Action": [
"ec2:PurchaseReservedInstancesOffering",
"ec2:PurchaseScheduledInstances",
"elasticache:PurchaseReservedCacheNodesOffering",
"events:CreatePartnerEventSource",
"glacier:AbortVaultLock",
"glacier:CompleteVaultLock",
"glacier:InitiateVaultLock",
"glacier:PurchaseProvisionedCapacity",
"glacier:SetVaultAccessPolicy",
"iotevents:PutLoggingOptio/**
* Calculates the maximum running time for `n` computers
* given a set of batteries with different capacities.
*
* @param {number} n - Number of computers
* @param {number[]} batteries - Array of battery capacities
* @return {number} - Maximum possible running time
*/
var maxRunTime = function(n, batteries) {
// Step 1: Compute the total available power across all batteries
let totalPower = 0;
for (let power of batteries) {
totalPower += power;
}
// Step 2:### 1\. La Logique : Pourquoi l'Octal ?
Linux gère les droits d'accès par groupes de **3 types d'actions**.
Or, $2^3 = 8$. L'octal (base 8, chiffres de 0 à 7) est donc mathématiquement parfait pour décrire ces états.
Chaque fichier a 3 niveaux de permission qui correspondent à 3 bits :
1. **R**ead (Lecture) : Le bit de poids fort ($2^2 = 4$)
2. **W**rite (Écriture) : Le bit du milieu ($2^1 = 2$)
3. **X**ecute (Exécution) : Le bit de poids faible ($2^0 = 1$)
Si le bit est à 1, l'action estShift left vs Shift right: When to use which? https://www.browserstack.com/guide/shift-left-vs-shift-right
Accessibility decentralization, “shifting left” must happen at every level of the product development (and digital accessibility) cycle. It should not be in a form of integrating accessibility checker somewhere in the CI pipeline, it should be a focus within design, development, project management and copywriting teams.
Make accessibility a part of something that already exists. Do not eini; 1つのファイルの最大アップロードサイズ
upload_max_filesize = 50M
; POSTデータ全体の最大サイズ(upload_max_filesizeより大きくする)
post_max_size = 60M
; PHPスクリプトが使用できるメモリの上限
memory_limit = 128M
; スクリプトの最大実行時間(秒)
max_execution_time = 300<div class="resize"></div># Les types d'entiers (binaire, octal, décimal, hexadécimal)
Pour l'interpréteur Python (et le processeur), **ces types n'existent pas séparément**.
Que tu écrives `x = 10`, `x = 0b1010` (binaire), `x = 0xA` (hexadécimal) ou `x = 0o12` (octal), pour la machine, c'est **exactement la même chose**. C'est stocké comme une suite de 0 et de 1.
Ces bases (Hexa, Octal) sont des **outils de commodité pour l'humain**, pour lire et écrire du binaire sans avoir mal à la tête avec des chaînes de 32 zéros e## Buffers
Pour faire simple : un **Buffer** (ou "tampon" en français), c'est une **zone de mémoire temporaire** (RAM) utilisée pour stocker des données pendant qu'elles sont déplacées d'un endroit à un autre.
C'est l'amortisseur du monde informatique.
### L'Analogie : Le réservoir d'eau
Imagine que tu dois arroser ton jardin (le **Consommateur**) avec de l'eau qui arrive d'une pompe capricieuse (le **Producteur**).
* Parfois la pompe envoie un jet ultra-puissant.
* Parfois elle goutte à pein