(grid)カードレイアウトでボタンを揃える

(参考サイト) https://qiita.com/yosei_ikegami/items/530ab46a3e6d3650b0d7
<div class="card-grid">
  <div class="card">
    <div class="card-header">カードタイトル1</div>
    <div class="card-body">カードの内容がここに入ります。長いテキストでも高さが揃います。長いテキストでも高さが揃います。長いテキストでも高さが揃います。長いテキストでも高さが揃います。</div>
    <div class="card-footer">フッター</div>
  </div>
  
  <div class="card">
    <div class="card-header">カードタイトル2</div>
    <div class="card-body">短い内容</div>
    <div class="card-footer">フッター</div>
  </div>
  
  <div class="card">
    <div class="card-header">カードタイトル3</div>
    <div class="card-body"

【プラグイン】 Peek:ページの途中で上方向にスクロールするとヘッダを上部から表示

(参考サイト) https://coliss.com/articles/build-websites/operation/javascript/headroom-style-scroll-intent-library.html
(Peek)
https://adesignl.github.io/Peek/

フッターを画面最下部に固定(コンテンツ量が少ない状態)

body {
  min-height: 100dvh;
}

footer {
  position: sticky;
  top: 100%;
}

子要素を画面幅いっぱいに表示

(参考サイト) https://zenn.dev/necscat/articles/bc9bba54babaf5
/* 画面幅いっぱいに表示 */
.photo {
  width: 100vw;
  margin-inline: calc(50% - 50vw);
}

/* 画面幅左半分に表示 */
.photo {
  width: 50vw;
  margin-left: calc((50vw - 50%) * -1);
}

/* 画面幅右半分に表示 */
.photo {
  width: 50vw;
  margin-right: -50vw;
}

完全な角丸(大きさによる変化なし)

.button {
  border-radius: 100vmax;
}

左右中央寄せ(横幅指定なし)

(参考サイト) https://zenn.dev/tonkotsuboy_com/articles/css-grid-centering
.parent {
  display: grid;
  place-content: center;
}

3567. Minimum Absolute Difference in Sliding Submatrix

You are given an m x n integer matrix grid and an integer k. For every contiguous k x k submatrix of grid, compute the minimum absolute difference between any two distinct values within that submatrix. Return a 2D array ans of size (m - k + 1) x (n - k + 1), where ans[i][j] is the minimum absolute difference in the submatrix whose top-left corner is (i, j) in grid. Note: If all elements in the submatrix have the same value, the answer will be 0. A submatrix (x1, y1, x2, y2) is a matrix that is formed by choosing all cells matrix[x][y] where x1 <= x <= x2 and y1 <= y <= y2.
/**
 * @param {number[][]} grid
 * @param {number} k
 * @return {number[][]}
 */
var minAbsDiff = function(grid, k) {
    const m = grid.length;
    const n = grid[0].length;

    // The result matrix has (m - k + 1) rows and (n - k + 1) columns,
    // because that's how many k×k windows can slide across the grid.
    const ans = Array.from({ length: m - k + 1 }, () =>
        Array(n - k + 1).fill(0)
    );

    // Slide a k×k window over every valid top-left corner (i, j)
    for (let i = 0; 

Create VS Code Workspace in Windows

Open linux terminal:
cd batchservice
nano core-api-dev.code-workspace

Paste the below code: 
{
    "folders": [
        {
            "path": "./core-api-development"
        }
    ],
    "settings": {
        "terminal.integrated.cwd": "${workspaceFolder}",
        "terminal.integrated.defaultProfile.linux": "bash"
    },
    "remoteAuthority": "wsl+Ubuntu"
}

ctrl + X
Y
enter


Step 1: Create the shortcut

Right-click on your Windows Desktop
Select New → Shortcut

Step 2: Set the target comma

Commit, Lint & Push - Execution Flow

Connection & Execution Flow:

  1. Developer runs `npm run commit`
     ↓
  2. Commitizen (cz) launches interactive prompt
     - Uses @commitlint/cz-commitlint adapter
     - Guides user to create conventional commit message
     ↓
  3. Git commit process begins
     ↓
  4. Husky triggers hooks in sequence:

     a) prepare-commit-msg hook
        - jira-prepare-commit-msg adds JIRA ticket (CDE-XXX)

     b) pre-commit hook
        - lint-staged runs Prettier on staged .ts files

     c) commit

Performance Measurement - ES queries

for (let i = 0; i < 10; i++) {
  const startTime = performance.now();
  const elasticSearchResponse = await this.elasticsearchClient.get(
    "rinesh-playground-property",
    "documentId"
  );
  // console.log(`Response Received -> ${JSON.stringify(elasticSearchResponse)}`);
  const endTime = performance.now();
  const duration = endTime - startTime;
  console.log(`Time took for the execution - ${duration}`);
}

Performance Measuring Console

import { performance } from 'perf_hooks';

const start  = performance.now();

const end = performance.now();
const elapsed = end - start;
console.log(`newAccountRequest took ${elapsed} milliseconds to execute.`);

Batcher - Splice vs Slice

private* batcher(aggs: [string, string][] = [], batchSize: number = 5) {
    let j = 0;
    for (let i = 0; i < aggs.length; i += batchSize) {
      j = i + batchSize;
      yield aggs.slice(i, j);
    }
  }

private* batcher(aggs: [string, string][] = [], batchSize: number = 5) {
    while (aggs.length) {
      yield aggs.splice(0, batchSize);
    }
}

LEDController

package com.legendss.backend.controllers;

import com.legendss.backend.entities.LED;
import com.legendss.backend.services.LEDService;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/leds")
@CrossOrigin("*")
public class LEDController {
    private final LEDService ledService;

    public LEDController(LEDService ledService) {
        this.ledService = ledService;
    }

    @GetMapping("/get/color/{id}")
    public LED getLEDColorController(@PathVariable Long

LEDService

package com.legendss.backend.repositories;

import com.legendss.backend.entities.LED;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

@Repository
public interface LEDRepository extends JpaRepository<LED, Long> {

}

LEDRepository

package com.legendss.backend.repositories;

import com.legendss.backend.entities.LED;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

@Repository
public interface LEDRepository extends JpaRepository<LED, Long> {

}

LEDEntity

package com.legendss.backend.entities;

import jakarta.persistence.*;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;

@Table(name = "leds")
@Entity
@Getter
@Setter
public class LED {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id")
    private Long id;

    @Column(name = "color")
    private String color;

}