Disable Gutenberg

add_filter('use_block_editor_for_post', '__return_false');
add_filter('use_block_editor_for_post_type', '__return_false');

2946. Matrix Similarity After Cyclic Shifts

You are given an m x n integer matrix mat and an integer k. The matrix rows are 0-indexed. The following proccess happens k times: Even-indexed rows (0, 2, 4, ...) are cyclically shifted to the left. Odd-indexed rows (1, 3, 5, ...) are cyclically shifted to the right. Return true if the final modified matrix after k steps is identical to the original matrix, and false otherwise.
/**
 * @param {number[][]} mat
 * @param {number} k
 * @return {boolean}
 */
var areSimilar = function(mat, k) {
  for (let row of mat) {
    const n = row.length;
    const shift = k % n;

    // Left shift for even rows, right shift for odd rows
    // But instead of simulating, just check if shifting preserves equality

    // Build shifted versions
    const left = row.slice(shift).concat(row.slice(0, shift));
    const right = row.slice(n - shift).concat(row.slice(0, n - shift));

    // If

2946. Matrix Similarity After Cyclic Shifts

You are given an m x n integer matrix mat and an integer k. The matrix rows are 0-indexed. The following proccess happens k times: Even-indexed rows (0, 2, 4, ...) are cyclically shifted to the left. Odd-indexed rows (1, 3, 5, ...) are cyclically shifted to the right. Return true if the final modified matrix after k steps is identical to the original matrix, and false otherwise.
/**
 * @param {number[][]} mat
 * @param {number} k
 * @return {boolean}
 */
var areSimilar = function(mat, k) {
  for (let row of mat) {
    const n = row.length;
    const shift = k % n;

    // Left shift for even rows, right shift for odd rows
    // But instead of simulating, just check if shifting preserves equality

    // Build shifted versions
    const left = row.slice(shift).concat(row.slice(0, shift));
    const right = row.slice(n - shift).concat(row.slice(0, n - shift));

    // If

Prepare local environment

# GCP Local Environment

## Prepare Local Environment

Follow the official documentation available at https://docs.cloud.google.com/docs/authentication/set-up-adc-local-dev-environment

CLI Installation: https://docs.cloud.google.com/sdk/docs/install-sdk

### Re-authorize credentials
`gcloud auth application-default login`

faq schema

<script type="application/ld+json">
    {
      "@context": "https://schema.org",
      "@type": "FAQPage",
      "mainEntity": [
        {%- for block in section.blocks -%}
          {
            "@type": "Question",
            "name": {{ block.settings.title | json }},
            "acceptedAnswer": {
              "@type": "Answer",
              "text": {{ block.settings.text | json }}
            }
          }{% unless forloop.last %},{% endunless %}
        {%- endfor -%}
      ]
    }
  

Git Aliases Setup

# Git Aliases Setup Notes

**Machine:** Lenovo ThinkPad T14 Gen 2
**OS:** Ubuntu 24.04 LTS (Dual Boot)
**Date:** March 25, 2026

---

## Overview

Global git aliases configured for faster branch switching. All aliases are stored in `~/.gitconfig` and apply across every repository on the machine.

---

## Configure Aliases

```bash
git config --global alias.co checkout
git config --global alias.cm "checkout master"
git config --global alias.cq "checkout qa"
git config --global alias.cp "checkout 

Git Worktrees Setup

# Git Worktrees Setup Notes

**Machine:** Lenovo ThinkPad T14 Gen 2
**OS:** Ubuntu 24.04 LTS (Dual Boot)
**Date:** March 25, 2026

---

## Overview

Git Worktrees allow multiple branches of the same repository to be checked out simultaneously, each in its own folder, all sharing a single `.git` database. This eliminates the need to stash or resolve conflicts just to switch context — each worktree is fully independent on disk.

The alternative — cloning the same repo into multiple folders — achie

Git Pull, Merge, and Rebase Guide

# Git Pull, Merge, and Rebase Guide

A practical reference for understanding how git integrates changes between branches, when to use each strategy, and how to avoid common pitfalls.

## The Fundamentals

Git has two core ways to integrate changes from one branch into another: **merge** and **rebase**. `git pull` is a shorthand that combines `git fetch` + one of these two.

---

## 1. Merge

```
Before:
master:    A → B → C → D
                \
feature:         E → F → G

After `git merge maste

Git Branch Cleanup Guide: Squashing a Messy Feature Branch

# Branch Cleanup Guide: Squashing a Messy Feature Branch

When a long-lived feature branch accumulates dozens of merge commits from repeatedly syncing with master, the history becomes noisy and hard to review. This guide documents how to extract a clean branch with identical code but minimal commit history.

## When to Use This

- Feature branch has many "Merged master into ..." commits from UI sync buttons
- `git pull origin master` with `pull.rebase = true` triggers previously-resolved conflic

Apply custom widget attributes to an input field from list_editable dictionary in admin.py

Apply custom widget attributes from the field_attrs dictionary to an input field from list_editable dictionary
# poetry/admin/admin_utils.py

# Apply custom widget attributes from the field_attrs dictionary to an input field from list_editable dictionary
def apply_widget_attrs_to_admin_input_field(formfield, db_field, field_attrs):
    attrs = field_attrs.get(db_field.name)
    if attrs:
        formfield.widget.attrs.update(attrs)
    return formfield

    """
    # Apply custom widget attributes from the field_attrs dictionary to an input field from list_editable dictionary
    # Usage examp

AutoRecover feature does not recover unsaved files

# SQL Server Management Studio (SSMS) AutoRecover Feature Does Not Recover Unsaved Files

## Problem

Unsaved files are not recovered after SSMS is forcibly closed **AND** the user profile is logged off. This can happen when an event, such as a log off or device restart occurs.

## Symptoms
- SSMS is being used via Remote Desktop
- The user profile was logged off (device restart or log off/on)
- SSMS does not show the AutoRecover screen

## Cause

Remote Desktop Services is configured to delete 

空配列を返すgenerateStaticParams()とsearchParamsを併用する際に500エラーになる例

# Next.js: 空の `generateStaticParams()` + `searchParams` で 500 エラーになる問題

## 結論

Next.js App Router で **空配列を返す `generateStaticParams()`** と **`searchParams`** を同じページで併用すると、本番ビルド(`build` → `start`)時に **500 Internal Server Error** が発生する。`dev` では再現しない。

---

## 問題が起きるコード

`app/[slug]/page.tsx`:

```tsx
export async function generateStaticParams() {
  return []; // 空配列を返している
}

const Page = async (props: {
  params: Promise<{ slug: string }>;
  searchParams: Promise<{ [key: string]: string | string[] 

mongodb memory

  [New2025 wrap-up: Voyage AI, AMP launch, & customer wins. Plus, 2026 predictions. Read blog >2025 wrap-up: Voyage AI, AMP launch, & customer wins. Plus, 2026 predictions. >>\\
\\
NewBuild better RAG. Voyage 4 models & Reranking API are now on Atlas. Read blog >Build better RAG. Voyage 4 models & Reranking API are now on Atlas. >>\\
\\
NewIntroducing Automated Embedding: One-click vector search, no external models. Read blog >Introducing Automated Embedding: One-click vector search, no external

3548. Equal Sum Grid Partition II

You are given an m x n matrix grid of positive integers. Your task is to determine if it is possible to make either one horizontal or one vertical cut on the grid such that: Each of the two resulting sections formed by the cut is non-empty. The sum of elements in both sections is equal, or can be made equal by discounting at most one single cell in total (from either section). If a cell is discounted, the rest of the section must remain connected. Return true if such a partition exists; otherwise, return false. Note: A section is connected if every cell in it can be reached from any other cell by moving up, down, left, or right through other cells in the section.
/**
 * @param {number[][]} grid
 * @return {boolean}
 */
/**
 * 3548. Equal Sum Grid Partition II
 *
 * @param {number[][]} grid
 * @return {boolean}
 */
var canPartitionGrid = function (grid) {
    const m = grid.length;
    const n = grid[0].length;

    // --------------------------------------------------
    // Compute total sum of all cells
    // --------------------------------------------------
    let total = 0;
    for (const row of grid) {
        for (const val of row) total += val;

Replace Add to Card button with Contact Us

add_action( 'template_redirect', 'replace_add_to_cart_with_contact' );
function replace_add_to_cart_with_contact() {
    // Define specific product IDs
    $specific_products = array(123, 456);

    if ( is_product() && in_array( get_the_ID(), $specific_products ) ) {
        // Remove Add to Cart
        remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_add_to_cart', 30 );
        // Add Contact Button
        add_action( 'woocommerce_single_product_summary', 'ad

Invoicing app solution

https://sufio.com/