loading screen scroll to hide

const loadingScreen = document.querySelector('.loading-screen');

if (loadingScreen) {
  const CONFIG = {
    fadeThreshold: 150,
    bufferZone: 50,
    reactivateAt: 5,
    wheelMultiplier: 0.8,
    touchMultiplier: 1.5,
    extraVirtualCap: 100
  };

  const UNLOCK_THRESHOLD = CONFIG.fadeThreshold + CONFIG.bufferZone;
  const MAX_VIRTUAL = UNLOCK_THRESHOLD + CONFIG.extraVirtualCap;

  const state = {
    ticking: false,
    virtualY: 0,
    locked: false,
    savedScrollY: 0,
    hasLeftTop: 

how to know an absolute path of a file?

realpath file.txt

# realpath is part of GNU coreutils

# Installed by default on most Linux distributions

1390. Four Divisors

Given an integer array nums, return the sum of divisors of the integers in that array that have exactly four divisors. If there is no such integer in the array, return 0.
/**
 * @param {number[]} nums
 * @return {number}
 */
var sumFourDivisors = function(nums) {
    // Helper: return the sum of divisors of n if it has exactly 4 divisors.
    // Otherwise return 0.
    function sumIfFourDivisors(n) {
        let count = 0; // how many divisors we've found
        let sum = 0;   // sum of those divisors

        // Check all possible divisors from 1 up to sqrt(n)
        for (let d = 1; d * d <= n; d++) {
            if (n % d === 0) {
                let other = 

ある要素に適用されているスタイルをUAデフォルトまで全て取り消す

<p class="text">テキスト</p>

メール認証技術(SPF・DKIM・DMARC)メモ

# メール認証技術(SPF・DKIM・DMARC)学習メモ

---

## 1. SPF(Sender Policy Framework)

### 概要

- 「このドメインからのメールは、これらのIPアドレスから送信される」とDNSで宣言する仕組み
- 受信サーバーが送信元IPをSPFレコードと照合し、正当性を検証する

### なぜ必要か

- SMTPプロトコルは送信元アドレスを検証する仕組みを持たない
- 任意のサーバーから任意の送信元アドレスでメール送信が可能
- SPFにより、ドメイン所有者が「正当な送信元IP」を定義できる

### 設定場所

- ドメインのDNS TXTレコード

### レコード例

```
example.com. IN TXT "v=spf1 ip4:203.0.113.1 include:_spf.google.com -all"
```

| 部分 | 意味 |
|------|------|
| `v=spf1` | SPFバージョン1 |
| `ip4:203.0.113.1` | このIPからの送信を許可 |
| `include:

classを連ねずに詳細度を高くする方法

.hoge{
  /*ここの詳細度は1*/
}
.hoge.hoge{
  /*ここの詳細度は2*/
}

My "Dash to Panel" tweaks for an easier switch from Windows to Ubuntu

My "Dash to Panel" tweaks for an easier switch from Windows to Ubuntu
#!/bin/sh
dconf reset -f /org/gnome/shell/extensions/dash-to-panel/

AI Stack

services:
  postgres:
    image: postgres:16-alpine
    container_name: n8n-postgress
    restart: always
    environment:
      - POSTGRES_USER=${POSTGRES_USER}
      - POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
      - POSTGRES_DB=${POSTGRES_DB}
    volumes:
      - ./postgres_data:/var/lib/postgresql/data

  n8n:
    image: n8nio/n8n:latest
    container_name: n8n
    restart: always
    environment:
      - DB_TYPE=postgresdb
      - DB_POSTGRESDB_DATABASE=${POSTGRES_DB}
      - DB_POSTGRESDB_HO

sqlite database

from sqlalchemy import create_engine, Column, Integer, String, DateTime
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker

# SQLite Database (local file - no configuration needed)
DATABASE_URL = "sqlite:///./complaints.db"

engine = create_engine(DATABASE_URL, connect_args={"check_same_thread": False})
SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine)
Base = declarative_base()

class Complaint(Base):
    __tablen

1411. Number of Ways to Paint N × 3 Grid

You have a grid of size n x 3 and you want to paint each cell of the grid with exactly one of the three colors: Red, Yellow, or Green while making sure that no two adjacent cells have the same color (i.e., no two cells that share vertical or horizontal sides have the same color). Given n the number of rows of the grid, return the number of ways you can paint this grid. As the answer may grow large, the answer must be computed modulo 109 + 7.
/**
 * @param {number} n
 * @return {number}
 */
var numOfWays = function(n) {
    const MOD = 1_000_000_007;

    // a = number of ABC patterns for the current row
    // b = number of ABA patterns for the current row
    let a = 6;  // ABC has 6 permutations
    let b = 6;  // ABA also 6 valid patterns

    // Build row by row using the recurrence
    for (let i = 2; i <= n; i++) {
        // Compute next row counts based on transitions
        let nextA = (2 * a + 2 * b) % MOD;  // ABC -> ABC

how to know what shell is using a system?

echo $SHELL

pandas filter

# Filter only >90Days and >180Days
filtered_df = open_aging_df[open_aging_df['Age_Bucket'].isin(['>90Days', '>180Days'])]

# Pivot table with complaint type + age bucket
pi_data_df = pd.pivot_table(
    filtered_df,
    values='CLOSED/OPEN',        
    index=['COMPLAINT TYPE'],       
    columns=['Age_Bucket','DEPT'], 
    aggfunc='count',
    fill_value=0
)

# ➡️ Add Grand Total column (row-wise sum)
pi_data_df['Grand_Total'] = pi_data_df.sum(axis=1)

# ➡️ Add Grand Total row 

961. N-Repeated Element in Size 2N Array

You are given an integer array nums with the following properties: nums.length == 2 * n. nums contains n + 1 unique elements. Exactly one element of nums is repeated n times. Return the element that is repeated n times.
/**
 * @param {number[]} nums
 * @return {number}
 */
var repeatedNTimes = function(nums) {
    // We'll use a Set to track which numbers we've seen.
    const seen = new Set();
    
    // Walk through each number in the array
    for (let num of nums) {
        // If we've seen this number before, it must be the one
        // that is repeated n times (because only one element repeats).
        if (seen.has(num)) {
            return num;
        }
        
        // Otherwise, record it as s

how to remove packages using dnf

sudo dnf remove nginx

how to install packages using dnf

dnf install nginx

how to update all packages using dnf?

dnf upgrade or dnf update