MySQL: EXISTS vs IN

-- 1. Zápis pomocí EXISTS 

SELECT o.* 
FROM `order` o  
WHERE EXISTS (
    SELECT 1 
    FROM `user` u 
    WHERE u.id = o.user_id 
      AND u.country_code = o.country_code  -- Druhá podmínka
      AND u.is_active = 1                  -- Třetí podmínka
);



-- 2. Zápis pomocí IN 
SELECT o.* 
FROM `order` o  
WHERE (o.user_id, o.country_code) IN (
    SELECT u.id, u.country_code 
    FROM `user` u
    WHERE u.is_active = 1
);

Ducat Protocol overview (Bitcoin-native credit)

## # Ducat Protocol

[Ducat Protocol](https://www.ducatprotocol.com/) is a bitcoin-native credit and stablecoin protocol built on Bitcoin L1. Users lock BTC in UTXO vaults via tapscript and borrow a dollar-pegged stablecoin without lenders or custodians.

Website: [https://www.ducatprotocol.com/](https://www.ducatprotocol.com/)

1021. Remove Outermost Parentheses

A valid parentheses string is either empty "", "(" + A + ")", or A + B, where A and B are valid parentheses strings, and + represents string concatenation. For example, "", "()", "(())()", and "(()(()))" are all valid parentheses strings. A valid parentheses string s is primitive if it is nonempty, and there does not exist a way to split it into s = A + B, with A and B nonempty valid parentheses strings. Given a valid parentheses string s, consider its primitive decomposition: s = P1 + P2 + ... + Pk, where Pi are primitive valid parentheses strings. Return s after removing the outermost parentheses of every primitive string in the primitive decomposition of s.
/**
 * @param {string} s
 * @return {string}
 */
var removeOuterParentheses = function(s) {
    let result = [];
    let depth = 0; // Tracks the current nesting level of parentheses
    
    for (let i = 0; i < s.length; i++) {
        let char = s[i];
        
        if (char === '(') {
            // If depth > 0, this '(' is inside the primitive string (not the outermost)
            if (depth > 0) {
                result.push(char);
            }
            depth++; // Increase depth aft

Horizon cart count

import { Component } from '@theme/component';
import { onAnimationEnd } from '@theme/utilities';
import { ThemeEvents, CartUpdateEvent } from '@theme/events';

/**
 * A custom element that displays a cart icon.
 *
 * @typedef {object} Refs
 * @property {HTMLElement} cartBubble - The cart bubble element.
 * @property {HTMLElement} cartBubbleText - The cart bubble text element.
 * @property {HTMLElement} cartBubbleCount - The cart bubble count element.
 *
 * @extends {Component<Refs>}
 */
class Ca

🪝 pre-commit - Tutoriel

# pre-commit — tutoriel synthétique et progressif

## Préambule

**Public visé.** Data engineer Python (dbt, Snowflake, DuckDB, AWS) sous Linux, shell zsh, qui connaît Git au quotidien (`add`, `commit`, `push`) et veut que les vérifications répétitives — espaces en fin de ligne, YAML invalide, lint Python, secrets, fichiers trop gros — se fassent toutes seules avant chaque commit, sur son poste comme en CI. Il s'agit de **pre-commit, le framework** (pre-commit.com), à ne pas confondre avec le ho

🔎 grep - Tutoriel

# grep — tutoriel synthétique et progressif

## Préambule

**Public visé.** Data engineer Python (dbt, Snowflake, DuckDB, AWS) sous Linux, shell zsh, qui tape `grep -ri motif .` par réflexe et veut chercher vite et juste dans des journaux, des CSV et un dépôt de code, puis utiliser grep dans des scripts. Les expressions régulières de base sont supposées connues (tutoriels sed et awk de la série) : ce volet systématise ce qui change **d'un dialecte à l'autre** et **d'une implémentation à l'autre*

address token

 <p>
            [company_profile:node:field_company_address:address_line1]<br>
            [company_profile:node:field_company_address:locality] [company_profile:node:field_company_address:administrative_area] [company_profile:node:field_company_address:postal_code]
        </p>

301. Remove Invalid Parentheses

Given a string s that contains parentheses and letters, remove the minimum number of invalid parentheses to make the input string valid. Return a list of unique strings that are valid with the minimum number of removals. You may return the answer in any order.
/**
 * @param {string} s
 * @return {string[]}
 */
var removeInvalidParentheses = function(s) {
    const result = [];
    const visited = new Set([s]);
    const queue = [s];

    // Checks whether a string has valid parentheses
    function isValid(str) {
        let balance = 0;

        for (const ch of str) {
            if (ch === '(') {
                balance++;
            } else if (ch === ')') {
                // More closing than opening parentheses
                if (balance === 0

tailwindconfig

_

Tailwind utitilies

const plugin = require('tailwindcss/plugin')

module.exports = {
  plugins: [
    plugin(({ matchUtilities }) => {
      const bleedParent = {
        DEFAULT: '50%',   // rodič = container
        '1/2': '100%',
        '1/3': '150%',
        '2/3': '75%',
        '1/4': '200%',
        '3/4': '66.6667%',
        '1/5': '250%',
      }
      const out  = (v) => `calc(${v} - 50vw)` // přetečení
      const back = (v) => `calc(50vw - ${v})` // návrat obsahu

      matchUtilities({
        'bleed-

All examples of edge bleeding / overlaping (claude)

<!DOCTYPE html>
<html lang="cs">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Bleed snippet (čisté HTML + CSS)</title>

<style>
/*
  BLEED SNIPPET
  -------------
  Pravidlo: % v marginu/paddingu se počítá ze šířky OBSAHU RODIČE.
  Půlka containeru = (kolikrát se rodič vejde do containeru) / 2 * 100 %
    - rodič = container       -> 50%
    - rodič = sloupec 1/2     -> 100%
    - rodič = sloupec 1/3     -> 150%
    - r

SwiperJs + bleed edge

<!DOCTYPE html>
<html lang="cs">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>Bleed slider</title>

  <script src="https://cdn.tailwindcss.com"></script>
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.css">
  <script src="https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.js"></script>

  <script>
    tailwind.config = {
      theme: { container: { screens: { '2xl': '800

index.html

<!--
https://play.tailwindcss.com/vibc7NWlcK
-->


<div class="max-w-2xl mx-auto bg-red-400 py-10 mb-20">
  <div class="bg-green-400 py-5 ml-[calc(50%-50vw)]">Bleed to left </div>
</div>


<div class="max-w-2xl mx-auto bg-red-400 py-10 mb-20">
  <div class="bg-green-400 py-5 mr-[calc(50%-50vw)]">Bleed to right </div>
</div>


<div class="max-w-2xl mx-auto bg-red-400 py-10 flex mb-20">
  <div class="w-1/2">AAA</div>
  <div class="w-1/2">
    <div class="bg-green-400 py-5 mr-[cal

Bleed to edge from container columns

<!--
https://play.tailwindcss.com/vibc7NWlcK
-->


<div class="max-w-2xl mx-auto bg-red-400 py-10 mb-20">
  <div class="bg-green-400 py-5 ml-[calc(50%-50vw)]">Bleed to left </div>
</div>


<div class="max-w-2xl mx-auto bg-red-400 py-10 mb-20">
  <div class="bg-green-400 py-5 mr-[calc(50%-50vw)]">Bleed to right </div>
</div>


<div class="max-w-2xl mx-auto bg-red-400 py-10 flex mb-20">
  <div class="w-1/2">AAA</div>
  <div class="w-1/2">
    <div class="bg-green-400 py-5 mr-[cal

Explanation on modules

Swissup modules are found in two places:
ci.swissuplabs (provate)
Packagisy (public)

both contain some modules. 
During installation, composer looks for the modules in two placed.
If the module is free, it should be on packagist. In such case, the client can install a module without buying swissup subscription. 
However, if the module is not included on Packagist, there will be no possibility to install it without buying Swissup subscriptions. 

It cases a problem when a module is said to be fr

🗂️ awk - Tutoriel

# awk — du copier-coller à la maîtrise

<a id="preambule"></a>
## Préambule

**Public visé.** Data engineer Python (dbt, Snowflake, DuckDB, AWS) sous Linux, shell zsh, qui lance `awk '{print $1}'` par copier-coller et veut comprendre ce qu'il exécute : extraire et recalculer des colonnes, filtrer, agréger un journal ou un CSV, produire un petit rapport. Sixième tutoriel de la série ; les expressions régulières de base sont supposées acquises (tutoriel sed).

**Versions vérifiées.** Tous les bloc