/**
* @param {number[][]} grid
* @return {number}
*/
var lenOfVDiagonal = function(grid) {
const n = grid.length;
const m = grid[0].length;
// Diagonal directions: ↘, ↙, ↖, ↗
const DIRS = [
[1, 1], // down-right
[1, -1], // down-left
[-1, -1], // up-left
[-1, 1] // up-right
];
// Memoization: memo[i][j][mask] stores longest segment from (i,j) with direction+turn state
const memo = Array.from({ length: n }, () =>
Array.
mysqldump -u имя_пользователя_БД -p название_БД название_таблицы > academy_curses_appointment.sql
Разворачиваем
1)mysql -u имя_пользователя -p - заходим
2)USE имя_базы;
3)mysql -u имя_пользователя -p имя_базы < /tmp/academy_curses_appointment.sql
Profondeur:
to_real(
replace(
substr(
"Text",
strpos("Text",'(') + 1,
strpos("Text",')') - strpos("Text",'(') - 1
),
',', '.'
)
)
ZTN:
-- Z (après "Z=" jusqu'à la fin)
to_real(
replace(
trim(
substr(
"Text",
strpos("Text",'Z=') + 2,
length("Text") - (strpos("Text",'Z=') + 1)
)
),
',', '.'
)
)
+
-- Profondeur (entre parenthèses)
to_real(
replace(
substr(
"Text",
strpos("Text",'(') + 1,
function theme_color_selection($field_name) {
add_filter("acf/load_field/name={$field_name}", function($field) {
$field['choices'] = [
'white' => 'Wit',
'dark-grey' => 'Donker grijs',
'primary' => 'Groen',
'secondary' => 'Blauw',
'tertiary' => 'Roze',
'quaternary' => 'Geel',
'quinary' => 'Rood',
];
return $field;
});
}
theme_color_selection('button_color');
theme_color_sele
/* --- center text --- */
p {
text-align: center;
}
/* --- text that is visually centered, but I maintain my left text align still. --- */
.parent {
display: flex;
flex-direction: column;
align-items: center;
}
p {
max-width: 50ch;
}
/* --- I am a box that is centered in both directions with grid. --- */
.parent {
display: grid;
place-items: center;
}
/* --- child element to center itself in a grid parent. --- */
aside {
display: grid;
}
.my-element {
place-self: center;
#!/usr/bin/env python3
"""
Training entry point.
Features:
- Argparse for hyperparams
- YAML config dump
- Mixed precision + grad clipping
- Checkpointing (best & last)
- Simple 2D training loop with Dice/IoU metrics
"""
import os
import math
import time
import argparse
import yaml
from pathlib import Path
import torch
from torch.utils.data import DataLoader
from torch.cuda.amp import autocast, GradScaler
from tqdm import tqdm
from dataset import build_dataset
from m
import torch
import torch.nn as nn
import torch.nn.functional as F
class MyModel(nn.Module):
def __init__(self):
super(MyModel, self).__init__()
# Define layers for the model
# Convolutional Layer 1
self.conv1 = nn.Conv2d(3, 64, kernel_size=3, stride=1, padding=1)
# Convolutional Layer 2
self.conv2 = nn.Conv2d(64, 128, kernel_size=3, stride=1, padding=1)
# Convolutional Layer 3
self.conv3 = nn.Conv2d(128,
/**
* Returns the area of the rectangle with the longest diagonal.
* If multiple rectangles share the longest diagonal, returns the one with the largest area.
*
* @param {number[][]} dimensions - Array of [length, width] pairs for each rectangle.
* @return {number} - Area of the rectangle with the longest diagonal.
*/
var areaOfMaxDiagonal = function(dimensions) {
let maxDiagonalSq = 0; // Stores the longest diagonal squared (avoids using Math.sqrt)
let maxArea = 0; // Stores
$data = get_field('programma_speeldata');
if ($data) {
foreach ($data as &$date) {
if (!empty($date['programma_location_city'])) {
$term = get_term($date['programma_location_city']);
if ($term && !is_wp_error($term)) {
$date['programma_location_city'] = $term->name;
}
}
}
}
$context['speeldata'] = $data;
jQuery(function($) {
$('body').on('click', '#searchButton', function(e) {
e.preventDefault();
const observer = new MutationObserver(() => {
const $target = $('.bookzo.resultaat');
if ($target.length) {
$('html, body').animate(
{ scrollTop: $target.offset().top },
800
);
observer.disconnect();
}
});
observer.observe(document.body, { childList: true, subtree: true });
});
});
CREATE LOGIN aurix_ro_login WITH PASSWORD = 'aurixpass@1';
USE SSRMS_Production; GO;
CREATE USER aurix_ro_user FOR LOGIN aurix_ro_login;
GRANT SELECT ON dbo.vw_Request TO aurix_ro_user;
/**
* @param {number[][]} mat
* @return {number[]}
*/
var findDiagonalOrder = function(mat) {
// Edge case: empty matrix
if (!mat || mat.length === 0 || mat[0].length === 0) return [];
const m = mat.length; // number of rows
const n = mat[0].length; // number of columns
const result = [];
let row = 0, col = 0;
let directionUp = true; // true = moving up-right, false = down-left
// We need to collect m * n elements
while (result.length < m *
https://developer.mozilla.org/en-US/docs/Web/CSS/animation-timeline/scroll
> The scroll() CSS function can be used with animation-timeline to indicate a scrollable element (scroller) and scrollbar axis that will provide an anonymous scroll progress timeline for animating the current element. The scroll progress timeline is progressed through by scrolling the scroller between top and bottom (or left and right). The position in the scroll range is converted into a percentage of progress — 0% at t
document.addEventListener('shopify:section:load', (evt) => {
const { target } = evt;
// Load and evaluate section specific scripts immediately
target.querySelectorAll('script[src]').forEach((script) => {
const s = document.createElement('script');
s.src = script.src;
document.body.appendChild(s);
});
});
torch>=1.10.0
torchvision>=0.11.0
torchaudio>=0.10.0
numpy>=1.21.0
pandas>=1.3.0
scikit-learn>=0.24.0
scipy>=1.7.0
matplotlib>=3.4.0
seaborn>=0.11.0
tqdm>=4.62.0
pyyaml>=5.4.0
networkx>=2.6.0
-- Database Schema
CREATE TABLE messages (
id SERIAL PRIMARY KEY,
user_id INTEGER REFERENCES users(id),
channel_id INTEGER REFERENCES channels(id),
content TEXT NOT NULL,
created_at TIMESTAMP DEFAULT NOW()
);
-- Trigger for real-time notifications
CREATE OR REPLACE FUNCTION notify_new_message()
RETURNS TRIGGER AS $$
BEGIN
PERFORM pg_notify('new_message',
json_build_object(
'id', NEW.id,
'user_id', NEW.user_id,
'channel_id', NEW.channel_id,
'content', NEW