/**
* Definition for a binary tree node.
* function TreeNode(val, left, right) {
* this.val = (val===undefined ? 0 : val)
* this.left = (left===undefined ? null : left)
* this.right = (right===undefined ? null : right)
* }
*/
/**
* @param {TreeNode} root
* @return {boolean}
*/
// Determine whether a binary tree is height-balanced.
// A tree is balanced if, at every node, the heights of the left and right
// subtrees differ by no more than 1.
var isBalanced = function(root)
// Media queries
@up-to-mobile: ~"only screen and (max-width: 767px)";
@from-mobile: ~"only screen and (min-width: 768px)";
@up-to-desktop: ~"only screen and (max-width: 949px)";
@from-desktop: ~"only screen and (min-width: 950px)";
@up-to-desktop-xl: ~"only screen and (max-width: 1199px)";
@from-desktop-xl: ~"only screen and (min-width: 1200px)";
/ Set the h1 tag font size on mobile screens
h1 {
@media @up-to-mobile {
font-size: 2em;
}
}
// # Dependabot 導入ガイド
GitHub Dependabot による依存関係の自動更新管理。
## 目次
1. [Dependabot とは](#dependabot-とは)
2. [導入手順](#導入手順)
3. [設定オプション](#設定オプション)
4. [運用のポイント](#運用のポイント)
5. [トラブルシューティング](#トラブルシューティング)
## Dependabot とは
Dependabot は GitHub が提供する依存関係の自動更新ツール。以下の機能を提供する。
### 主な機能
| 機能 | 説明 |
| -------------------- | ------------------------------------------------------ |
| **Version Updates** | 依存パッケージの新バージョンを検出し、更新PRを自動作成 |
| **Security # Next.jsでmicroCMSの下書き機能を実装する際の注意点
## 前提
microCMSはヘッドレスCMSであり、APIでJSONを返すだけで、HTMLのレンダリング機能を持たない。下書きコンテンツが公開後にサイト上でどう表示されるかを確認するには、Next.js側に「下書きデータを受け取って本番と同じレイアウトで描画するモード」を実装する必要がある。
## 核心の問題
ISRで静的生成しているページで `draftMode()` や `cookies()` を `isEnabled` の分岐外(=関数のトップレベルなど)で呼ぶと、Next.jsはそのページを動的ページと判定する。結果、全リクエストでサーバー実行され、ビルド時生成のHTMLキャッシュが使われなくなる。`isEnabled === true` の分岐内に閉じ込めれば、`isEnabled === false` 時は静的生成済みHTMLがそのまま返る。
## 設計のポイント
- microCMSの画面プレビューボタンは `/api/draft?secret=xxx&contentId=yyy&drafPS1='\[\e[0;31m\]\u@\h \[\e[0;36m\][\w]\$\[\e[0m\] '
alias s="sudo"
alias c="clear"
alias update="sudo apt update && sudo apt upgrade -y"
alias install="sudo apt install"
alias services='systemctl list-units --type=service --state=running'
alias web="cd /var/www/html/public"
alias phpdir="cd /etc/php/*.*"
alias vhosts="cd /etc/apache2/sites-available"
alias nhosts="cd /etc/nginx/sites-available"
alias sshdir="cd /etc/ssh"
alias start="sudo systemctl start"
alias restart="sudo systemctl re<?php
/**
* Plugin Name: Control Debug Level
*/
// Toggle this to true/false when needed
if ( defined('WP_SUPPRESS_PHP_WARNINGS') && WP_SUPPRESS_PHP_WARNINGS === false ) {
return;
}
error_reporting( E_ERROR | E_WARNING | E_PARSE ); // logs only errors, warnings, and parse errors# Временное монтирование (CLI)
mount -t cifs -o username=<user>,password=<pass> //<server-ip>/<share-path> /mnt/<mount-point>
# Постоянное монтирование (/etc/fstab): добавьте следующую строку в /etc/fstab для автоматического монтирования при загрузке:
//<server-ip>/<share-path> /mnt/<mount-point> cifs username=<user>,password=<pass>,iocharset=utf8 0 0nano /etc/openssh/sshd
# PermitRootLogin yes
passwd root #Установите пароль root
service sshd start #Запустите SSH-сервер
ssh root@<IP_адрес_rescue> #Подключитесь с другой машины
net-eth # Попробует настроить сеть по DHCP
# Или ручная настройка, например:
ip a или ifconfig -a # определяем имя сетевой карты
ip addr add <IP_адрес>/<маска> dev <интерфейс> # задаем IP-адрес
ip link set <интерфейс> up # включаем интерфейс
ip route add default via <IP_шлюза> # указываем маршрут по умолчанию/**
* @param {number[]} nums
* @param {number} k
* @return {number}
*/
var minRemoval = function(nums, k) {
// Step 1: Sort the array so window are contiguous and ordered
nums.sort((a, b) => a - b);
let n = nums.length;
let i = 0; // left pointer (minimum in window)
let maxWindow = 1; // at least one element is always balanced
// Step 2: Slide the right pointer j across the array
for (let j = 0; j < n; j++) {
// Step 3: If window becom const url = 'ajax/ops.php';
const datos = vars;
const xhr = new XMLHttpRequest();
xhr.open('POST', url, true);
xhr.responseType = 'blob';
const fd = new FormData();
for (const key in datos) {
fd.append(key, datos[key]);
}
xhr.onload = function() {
if (xhr.status === 200) {
const blob = xhr.response;
if (blob.size > 0) {
const link = document.createElement('a');
link.href = URL.createObjectURL(blob);
_______ JEANSON ANCHETA_______
🌎
💻💸 Fresh Logs Pricing 💸💻
🔐 UK/US Logs / Clean Bank Drops (GBP/$)
💰 10K GBP/$ = 250
💰 12K GBP/$ = 300
💰 16K GBP/$ = 350
💰 20K GBP/$ = 500
💰 30K GBP/$ = 800
🛡️ Verified • HQ Access • Fast Delivery
💬 DM for escrow or direct 🔥
WESTERN UNION / MONEY GRAM/BANKS LOGINS/BANK TRANFERS/PAYPAL TRANSFERS WORLDWIDE/CASHAPP/ZELLLE/APPLE PAY/SKRILL/VENMO TRANSFER
Telegram:@JeansonTooL
Group: https://t.me/+2__ynBAtFP00M2Fk
Group: http/**
* @param {number[]} nums
* @return {number[]}
*/
var constructTransformedArray = function(nums) {
const n = nums.length;
const result = new Array(n);
for (let i = 0; i < n; i++) {
const steps = nums[i];
// Case 1: If the value is zero, no movement happens.
if (steps === 0) {
result[i] = 0;
continue;
}
// Case 2: Movement happens.
// We compute the new index using modular arithmetic.
//
/mysql -u root -p < C:\laragon\backup\mysql\xxx.sqlcd C:\laragon\usr\bin && curl -L -O https://raw.github.com/wp-cli/builds/gh-pages/phar/wp-cli.phar && echo @ECHO OFF > wp.bat && echo php "%~dp0wp-cli.phar" %* >> wp.bat