3234. Count the Number of Substrings With Dominant Ones

You are given a binary string s. Return the number of substrings with dominant ones. A string has dominant ones if the number of ones in the string is greater than or equal to the square of the number of zeros in the string.
/**
 * @param {string} s
 * @return {number}
 */
let numberOfSubstrings = function (s) {
    const n = s.length;

    // dp[i] stores the nearest index <= i where a '0' occurs
    // (or -1 if none). This helps us quickly jump backwards
    // to substrings that include more zeros.
    const dp = Array(n + 1).fill(-1);

    // Build the dp array
    for (let i = 0; i < n; i++) {
        if (i === 0 || s[i - 1] === '0') {
            // If at start OR previous char was '0',
            // mark cu

Tiny usefull composables

// useFormHandler.js
import { ref } from 'vue'

export function useFormHandler(initialData = {}) {
  const formData = ref({ ...initialData })
  const errors = ref({})
  const validate = () => {
    errors.value = {}
    Object.keys(formData.value).forEach(key => {
      if (!formData.value[key]) errors.value[key] = 'Required'
    })
    return Object.keys(errors.value).length === 0
  }
  return { formData, errors, validate }
}

// ======================================= // 

//

Animations - Metallic Paint

npx shadcn@latest add @react-bits/MetallicPaint-TS-CSS

Animation - Electric Border

npx shadcn@latest add @react-bits/ElectricBorder-TS-CSS

Body text - Glitch Text

npx shadcn@latest add @react-bits/GlitchText-TS-CSS

Title Text - Decrypted Text

npx shadcn@latest add @react-bits/DecryptedText-TS-CSS

Components - Magic Bento

npx shadcn@latest add @react-bits/MagicBento-TS-CSS

Background - Lighting effect

npx shadcn@latest add @react-bits/Lightning-TS-CSS

2536. Increment Submatrices by One

You are given a positive integer n, indicating that we initially have an n x n 0-indexed integer matrix mat filled with zeroes. You are also given a 2D integer array query. For each query[i] = [row1i, col1i, row2i, col2i], you should do the following operation: Add 1 to every element in the submatrix with the top left corner (row1i, col1i) and the bottom right corner (row2i, col2i). That is, add 1 to mat[x][y] for all row1i <= x <= row2i and col1i <= y <= col2i. Return the matrix mat after performing every query.
/**
 * @param {number} n
 * @param {number[][]} queries
 * @return {number[][]}
 */
var rangeAddQueries = function(n, queries) {
    // Step 1: Initialize an n x n matrix filled with 0s
    let mat = Array.from({ length: n }, () => Array(n).fill(0));

    // Step 2: Process each query
    for (let [row1, col1, row2, col2] of queries) {
        // Loop through the submatrix defined by the query
        for (let r = row1; r <= row2; r++) {
            for (let c = col1; c <= col2; c++) {
         

0. Welcome to Cacher

# Welcome to Cacher

We're delighted you've chosen Cacher to be your snippet organizer! Whether you're a solo developer or a member of your team, Cacher is here to help you organize and use snippets more efficiently.

Our users create snippets to:

- Remember project-specific algorithms
- Create cheatsheets for useful libraries
- Share knowledge with colleagues

Take a few minutes to look over our **Getting Started** snippets. To view more detailed information on features, you can visit [Cacher 

path

C:\Users\Administrator\AppData\Roaming\JetBrains\DataGrip2025.2\consoles

商品の対価に含まれる価値の分類

# 商品の対価に含まれる価値の分類

商品を購入する際、私たちは物そのものの価値だけでなく、様々な付加価値に対しても対価を払っている。この分類は、対価に含まれる価値を5つの観点から整理したもの。  
商品の価格設定の際に参考にするための指標として作った。  

## **商品価値(商品そのものの価値)**
- 物質的価値(素材、品質、機能など商品自体が持つ本質的な価値)

## **ブランド価値(販売者への信頼に対する価値)**
- 信頼性の価値(過去に積み上げた実績に対する信頼)
- 専門性の価値(その分野における知識や技術力)

## **体験価値(購買プロセス自体の価値)**
- 体験・環境の価値(店舗空間、購買体験そのもの)
- 所有の価値(持つこと自体の満足感や喜び)

## **取得価値(手に入れるまでのコスト)**
- 時間の価値(自分で作る・探す時間を節約できることへの対価)
- 希少性・タイミングの価値(今すぐ、ここで手に入ることへの対価)

## **個人依存価値(個人的必要性・緊急性の価値)**
- 期限の切迫度(特定の日

Create Gamma depuis Zoho Deals

string button.createGammaOffreCommercial(String dealId)
{
try 
{
	info "DealId recu: " + dealId;
	dealIdLong = dealId.toLong();
	moduleName = "Potentials";
	dealRecord = zoho.crm.getRecordById(moduleName,dealIdLong);
	if(dealRecord == null || dealRecord.isEmpty())
	{
		moduleName = "Opportunites";
		dealRecord = zoho.crm.getRecordById(moduleName,dealIdLong);
	}
	if(dealRecord == null || dealRecord.isEmpty())
	{
		return "Erreur: Affaire introuvable (ID: " + dealId + ")";
	}
	// 

3228. Maximum Number of Operations to Move Ones to the End

You are given a binary string s. You can perform the following operation on the string any number of times: Choose any index i from the string where i + 1 < s.length such that s[i] == '1' and s[i + 1] == '0'. Move the character s[i] to the right until it reaches the end of the string or another '1'. For example, for s = "010010", if we choose i = 1, the resulting string will be s = "000110". Return the maximum number of operations that you can perform.
/**
 * Calculates the maximum number of operations that can be performed
 * on a binary string `s`. An operation is defined as pairing a '1'
 * with the end of a block of consecutive '0's.
 *
 * @param {string} s - Input binary string consisting of '0' and '1'
 * @return {number} - Maximum number of operations possible
 */
var maxOperations = function (s) {
    const n = s.length;   // Length of the string
    let countOnes = 0;    // Number of '1's encountered so far
    let operations = 0;   /

Linux - apt VS snap

**Comparaison APT vs Snap - explications pédagogiques**

## Nature fondamentale

### APT (Advanced Package Tool)

**Type :** Gestionnaire de paquets traditionnel Linux

**Principe :**
- Installe des paquets `.deb`
- Dépendances partagées (bibliothèques système communes)
- Intégration profonde avec le système

**Exemple :**
```
htop → dépend de libncurses5 (partagée)
nginx → dépend aussi de libncurses5 (même copie)
```

**Avantage :** Économie d'espace (bibliothèques partagées)  
**Inconvénient :

Ansible Role Hierarchy, Dependencies, and Variable Precedence


# Ansible Role Hierarchy, Dependencies, and Variable Precedence

This gist explains how:

- A **main role** (`main_role`) interacts with:
  - A **dependency role** (`role_a`) via `meta/main.yml`.
  - An **imported role** (`role_b`) via `ansible.builtin.import_role`.
- Default variables and overrides behave in both cases.
- This all ties into Ansible’s global **variable precedence**.
- Common pitfalls with defaults, templating, and variable reuse.

---

## 1. Scenario Overview

We have three rol