ブラウザがアイドル状態かどうかを検知する

// requestIdleCallbackを使ってブラウザのアイドル状態を検知するサンプル
// ブラウザがアイドル状態になるとコールバック関数が実行される
// タイムアウトを設定することも可能
requestIdleCallback(
  (deadline) => {
    console.log("タイムアウトで実行されました");
    console.log(`残り時間: ${deadline.timeRemaining()}ms`);
    console.log(`タイムアウトによる実行: ${deadline.didTimeout}`);
  },
  { timeout: 2000 } // 2秒後に強制的に実行
);

ブラウザのPaint完了後に処理を実行する

/**
 *
 * ブラウザの1フレームの流れ:
 *
 *   1. JavaScript実行(通常タスク)
 *   2. Style / Layout / Render 準備
 *   3. requestAnimationFrame コールバック実行(Paint直前)
 *   4. Paint(実際の描画)
 *   5. setTimeout(..., 0) 実行(Paint後のmacrotask)
 */

requestAnimationFrame(() => {
  // Paint「直前」で呼ばれる
  console.log("① requestAnimationFrame:Paint直前に実行");

  // ここでDOM更新などを確定させる
  document.body.style.backgroundColor = "lightgreen";

  // Paint完了後(次のmacrotask)に実行される
  setTimeout(() => {
    console.log("✅ Paint完了後に実行される確実なタイミング");
  }, 0)

ビジュアルエディターとブロックエディター切り替えによるデザイン崩れ対策

(参考サイト) https://b-risk.jp/blog/2021/06/wp_auto_p/
// Gutenberg(ブロックエディター)を無効化する
add_filter('use_block_editor_for_post_type', 'disable_block_editor', 10, 2);
function disable_block_editor($use_block_editor, $post_type)
{
	if ($post_type === 'page') return false;
	return $use_block_editor;
}

// 固定ページのみpタグ等が自動生成されないようにする
add_filter('the_content', 'wpautop_filter', 9);
function wpautop_filter($content)
{
	global $post;
	$remove_filter = false;

	$arr_types = array('page'); //自動整形を無効にする投稿タイプを記述
	$post_type = get_post_type($post->ID)

Windows vs Linux vs MacOS

| MacOS | Windows | Debian | ... |
| ----- | ------- | ------ | --- |
| /var/log/{app}.log | C:/ProgramData/{App}/Logs/ | /var/log/{app}.log |

SRPM Finding locations according to country

On a service offering form, there's a new Country field. By selecting countries, the below Location field shall be updated via client script, populating all the locations that are available for any selected country. This is handled via a client script, that through the spm_helperAjax AJAX call calls the script include method getCitiesByCountries().
onChange client script:

function onChange(control, oldValue, newValue, isLoading, isTemplate) {
    if (isLoading || isTemplate) {
        return;
    }

    var selectedCountries = g_form.getValue('u_country');

    // If no countries selected, clear locations
    if (!selectedCountries) {
        g_form.setValue('u_location', '');
        return;
    }

    var ga = new GlideAjax('spm_helperAjax');
    ga.addParam('sysparm_name', 'getCitiesByCountries');
    ga.addParam('sysparm_countries', s

DE1 - FreshKart

[**LIEN VERS LE PLAN**](https://claude.ai/public/artifacts/a037706a-e51f-4a60-b74a-3f6d5b524019)

Kubernetes commands

```bash
kubectl get ns
kubectl get all -n kube-system

kubectl run nginx --image=nginx -o yaml --dry-run=client > nginx-pod.yaml
kubectl apply -f nginx-pod.yaml
kubectl get pods -l "run=nginx" -o wide 
```

Win Office Activator

https://massgrave.dev

Open PowerShell
Click the Start Menu, type PowerShell, then open it.

Copy and paste the code below, then press enter.

For Windows 8, 10, 11: 📌
irm https://get.activated.win | iex

If the above is blocked (by ISP/DNS), try this (needs updated Windows 10 or 11):
iex (curl.exe -s --doh-url https://1.1.1.1/dns-query https://get.activated.win | Out-String)

For Windows 7 and later:
iex ((New-Object Net.WebClient).DownloadString('https://get.activated.win'))

Script not launch

DE1 - Veilles Sources de Données Data

# Distinction Originelle

1. SOURCES DE STOCKAGE
   - Fichiers (CSV, Parquet, JSON...)
   - SGBD relationnels (PostgreSQL, MySQL...)
   - SGBD NoSQL (MongoDB, Cassandra...)
   - Data Lakes (S3, HDFS...)
   - Streaming (Kafka, Kinesis...)

2. MODES D'ACCÈS
   - APIs (REST, GraphQL...)
   - Connecteurs directs (JDBC, ODBC...)
   - Fichiers partagés (FTP, NFS...)
   - Message queues

---

# Sources de Stockage

## Taxonomie
### NIVEAU 1 : STOCKAGE
- Fichiers (local/simple) - CSV, JSON, Parquet sur 

Copilot prompt

---
mode: 'ask'
model: Claude Sonnet 4
description: 'Find Code Smells'
---

Please review and analyze the ${selection} and identify potential areas for improvement related to code smells, readability, maintainability, performance, security, etc. Do not list issues already addressed in the given code. Focus on providing up to 5 constructive suggestions that could make the code more robust, efficient, or align with best practices. For each suggestion, provide a brief explanation of the potential b

2273. Find Resultant Array After Removing Anagrams

You are given a 0-indexed string array words, where words[i] consists of lowercase English letters. In one operation, select any index i such that 0 < i < words.length and words[i - 1] and words[i] are anagrams, and delete words[i] from words. Keep performing this operation as long as you can select an index that satisfies the conditions. Return words after performing all operations. It can be shown that selecting the indices for each operation in any arbitrary order will lead to the same result. An Anagram is a word or phrase formed by rearranging the letters of a different word or phrase using all the original letters exactly once. For example, "dacb" is an anagram of "abdc".
/**
 * @param {string[]} words
 * @return {string[]}
 */
var removeAnagrams = function(words) {
    // Helper function to check if two words are anagrams
    const isAnagram = (word1, word2) => {
        // Sort the letters of both words and compare
        return word1.split('').sort().join('') === word2.split('').sort().join('');
    };

    // Initialize a result array with the first word (it can't be removed)
    const result = [words[0]];

    // Start from the second word and compare with 

Azure Exam AZ -900

Describe cloud concepts (25–30%)
Describe cloud computing
Define cloud computing

Describe the shared responsibility model

Define cloud models, including public, private, and hybrid

Identify appropriate use cases for each cloud model

Describe the consumption-based model

Compare cloud pricing models

Describe serverless

Describe the benefits of using cloud services
Describe the benefits of high availability and scalability in the cloud

Describe the benefits of reliability

Css only type grinding

/* https://www.bitovi.com/blog/css-only-type-grinding-casting-tokens-into-useful-values */

@property --variant {
  syntax: "primary|secondary|success|error";
  initial-value: primary;
  inherits: true;
}

@property --_v-primary-else-0 {
  syntax: "primary|<integer>"; initial-value: 0; inherits: true;
}


@property --_v-primary-bit {
  syntax: "<integer>"; initial-value: 1; inherits: true;
}


.element {
  --variant: primary;
  --_v-primary-else-0: var(--variant);
  --_v-primary-bit: var(--_v-pr

3539. Find Sum of Array Product of Magical Sequences

You are given two integers, m and k, and an integer array nums. A sequence of integers seq is called magical if: seq has a size of m. 0 <= seq[i] < nums.length The binary representation of 2seq[0] + 2seq[1] + ... + 2seq[m - 1] has k set bits. The array product of this sequence is defined as prod(seq) = (nums[seq[0]] * nums[seq[1]] * ... * nums[seq[m - 1]]). Return the sum of the array products for all valid magical sequences. Since the answer may be large, return it modulo 109 + 7. A set bit refers to a bit in the binary representation of a number that has a value of 1.
/**
 * @param {number} m
 * @param {number} k
 * @param {number[]} nums
 * @return {number}
 */
var magicalSum = function(m, k, nums) {
    const MOD = BigInt(1e9 + 7); // Modulo for large number arithmetic
    const n = nums.length;

    // Precompute binomial coefficients: comp[i][j] = C(i, j)
    const comp = Array.from({ length: m + 1 }, () => Array(m + 1).fill(0n));
    for (let i = 0; i <= m; i++) {
        comp[i][0] = 1n;
        comp[i][i] = 1n;
        for (let j = 1; j < i; j++) {
   

C1 U6

persecute vs prosecute
  get arrested and hold in prision -> prosecute,
  persecute - just verolgen, Hitler persecuted Juews
lessen vs diminish
make out capital of sth - only about money?
  90% yes. But e.g. human capital.
paramount vs the most - which context
a body of - The committee is made up of a body of experts in the field.
  =group of
rally vs protest
  rally - promote smth - women rights, working rights
  protest - against sth
inequity vs inequality
  inequity = difference in money, e.g