Search Substring

- Given 2 sheets: sheet 1 and sheet 2 
 - Sheet 1 contains column sku
 - Sheet 2 contains column compatibility (comma separated string which may contain
 the sku from sheet 1 column sku)
 - Result: Sheet 3, for every sku in sheet 1, find the compatible part in sheet 2
 return the part name, comma seperated

### Sheet 1
id | sku
---|---
1 | ABC

### Sheet 2
Part ID | Model Compatibilty
--|--
1039228 | "ABC, DEF"
AB9034-89 | "VDR, ABC"
HUDH90-0122 | "BDN, EDF"

### Sheet 3
sku | compatibilities
--

C1 U12

B
outing
unwind
idle
avid
pastime
gym bunny
hiking
couch potato

how to iterate an array in Go?

fruits := [4]string{"Apple", "Banana", "Orange", "Grapes"}

for index, fruit := range fruits {
    fmt.Println(position, fruitName)
}

for i, v := range fruits {
    fmt.Println(i, v)
}

for position, fruitName := range fruits {
    fmt.Println(position, fruitName)
}

Hide extra product option woocommerce single product page

div#tm-extra-product-options {
    display: none;
}

.tm-totals-form-main.tc-show {
    display: none;
}

xpra

Xpra 

If anyone is facing issues restarting their Xpra server after yesterday’s reboot, please try the following steps:
xpra list – to check whether there is an existing (possibly expired) session
xpra stop – to stop any existing session, if found
. start_xpra – to start the Xpra server again
Please feel free to reach out if you have any questions or need assistance.
 

1339. Maximum Product of Splitted Binary Tree

Given the root of a binary tree, split the binary tree into two subtrees by removing one edge such that the product of the sums of the subtrees is maximized. Return the maximum product of the sums of the two subtrees. Since the answer may be too large, return it modulo 109 + 7. Note that you need to maximize the answer before taking the mod and not after taking it.
/**
 * 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 {number}
 */
var maxProduct = function(root) {
    const MOD = 1_000_000_007;

    // ---------------------------------------------
    // First pass: compute total sum of the tree
    // --------------------------

Encode / Decode .env file

# encrypt_decrypt_file.py
# Encrypt/decrypt a file using cryptography

from cryptography.hazmat.primitives.kdf.scrypt import Scrypt
from cryptography.hazmat.primitives.ciphers.aead import AESGCM
from cryptography.exceptions import InvalidTag
import os
import sys
from pathlib import Path
from datetime import datetime
from getpass import getpass

BASE_DIR = Path(__file__).resolve().parent  # Current folder: /poetry/utils
APP_ROOT_DIR = BASE_DIR.parent  # Current app root: /poetry
PRO

убрать фон с атрибутов на странице товара

<style>/* Убираем фон у всей области атрибутов */
.elementor-widget-woocommerce-product-add-to-cart 
.variations,
.elementor-widget-woocommerce-product-add-to-cart 
.variations tr,
.elementor-widget-woocommerce-product-add-to-cart 
.variations th,
.elementor-widget-woocommerce-product-add-to-cart 
.variations td,
.elementor-widget-woocommerce-product-add-to-cart 
.variable-items-wrapper {
    background: transparent !important;
}

/* Убираем фон у самих атрибутов */
.elementor-wid

fix style *4 в наявності*

<style>/* Стиль "в наявності" в Add to Cart */
.elementor-widget-woocommerce-product-add-to-cart
.single_variation_wrap
.woocommerce-variation-availability
.stock.in-stock {
    color: var(--e-global-color-f3d70e7);
    font-family: "Montserrat Alternates", Sans-serif;
    font-size: 16px;
    font-weight: 300;
}
</style>

add to card elementor

для случая когда глобальные атрибуты не возможно пододвинуть к краю контейнера 
Код переводит таблицу во флекс 

3 col grid

first col fixed, rest 2 col equal
.grid-row {
  display: grid;
  grid-template-columns: 42px repeat(2, minmax(0, 1fr));
}

cari alacak verecek detay çalışma

SELECT 
CLCARD.LOGICALREF,
    CLCARD.CODE AS [CARİ KODU],
    CLCARD.DEFINITION_ AS [CARİ ÜNVANI],
    -- Vadesi bugün veya geçmiş olanların NET bakiyesi (PAYTRANS üzerinden)
    (SELECT ROUND(SUM(
        CASE WHEN SIGN = 0 THEN TOTAL -- Borç ise (Fatura vb)
             WHEN SIGN = 1 THEN -TOTAL -- Alacak ise (Ödeme vb)
             ELSE 0 END), 2)
     FROM LG_050_01_PAYTRANS 
     WHERE CARDREF = CLCARD.LOGICALREF 
       AND CANCELLED = 0 
       AND DATE_ <= GETDATE() -- Gerçe

cari listesi filtreli


SELECT 
LOGICALREF,
    CODE AS [Kodu],
    DEFINITION_ AS [Firma Ünvanı],
    REPLACE(REPLACE(ADDR1, CHAR(13)+CHAR(10), ' '), CHAR(10), ' ') AS [Adres1],
    REPLACE(REPLACE(ADDR2, CHAR(13)+CHAR(10), ' '), CHAR(10), ' ') AS [Adres2],
    DISTRICT AS [İlçe],
    CITY AS [İl],
    COUNTRY AS [Ülke],
    TELNRS1 AS [Tlf1],
    TELNRS2 AS [Tlf2],
    FAXNR AS [Fax],
    POSTCODE AS [Posta Kodu],
    INCHARGE AS [İlgili Kişi],
    EMAILADDR AS [E Posta],
    TCKNO AS [Tc Kimlik No],

cari için alacak verecek listesi

  --SPI2026000000008

  SELECT *  FROM [LOGODB].[dbo].[LG_050_01_STFICHE] (NOLOCK) where FICHENO LIKE 'EIM2025%' 
  
  SELECT *  FROM [LOGODB].[dbo].LG_500_CLCARD (NOLOCK) where CODE='120.01.018'

  
  select 
  cari.CODE as CariKodu,
  item.CODE as StokKodu,
  [LG_500_01_STLINE].AMOUNT,
  [LG_500_01_STLINE].* from [dbo].[LG_500_01_STLINE]  (NOLOCK) 
  JOIN [dbo].[LG_500_ITEMS] item on item.LOGICALREF = [LG_500_01_STLINE].STOCKREF
  JOIN [dbo].[LG_500_CLCARD] cari on cari.LOGICALREF

subs_mp4

폴더 안에 있는 모든 .mp4 파일에 대해 자막을 다 뽑아버리고 싶을 때 쓰는 반복문 한 줄입니다.
echo 'function subs_mp4() {
    # 1. 경로를 ~/whisper.cpp 로 고정 (찾기 기능 제거)
    local wd="$HOME/whisper.cpp"

    # 2. 폴더 존재 확인
    if [ ! -d "$wd" ]; then
        echo "❌ 오류: $wd 폴더가 없습니다."
        return 1
    fi

    # 3. 실행 파일(main)이 없으면 자동으로 만들기 (Auto-Repair)
    if [ ! -f "$wd/main" ]; then
        echo "⚠️ 실행 파일(main)이 없어 자동으로 생성합니다..."
        curr_dir=$(pwd)
        cd "$wd" && make
        cd "$curr_dir"
        echo "✅ 실행 파일 생성 완료!"
    fi

    # 4. MP4 파일 반복 처리
    ech

irsaliye çalışması

  --SPI2026000000008

  SELECT *  FROM [LOGODB].[dbo].[LG_050_01_STFICHE] (NOLOCK) where FICHENO LIKE 'EIM2025%' 
  
  SELECT *  FROM [LOGODB].[dbo].LG_500_CLCARD (NOLOCK) where CODE='120.01.018'

  
  select 
  cari.CODE as CariKodu,
  item.CODE as StokKodu,
  [LG_500_01_STLINE].AMOUNT,
  [LG_500_01_STLINE].* from [dbo].[LG_500_01_STLINE]  (NOLOCK) 
  JOIN [dbo].[LG_500_ITEMS] item on item.LOGICALREF = [LG_500_01_STLINE].STOCKREF
  JOIN [dbo].[LG_500_CLCARD] cari on cari.LOGICALREF