2685. Count the Number of Complete Components

You are given an integer n. There is an undirected graph with n vertices, numbered from 0 to n - 1. You are given a 2D integer array edges where edges[i] = [ai, bi] denotes that there exists an undirected edge connecting vertices ai and bi. Return the number of complete connected components of the graph. A connected component is a subgraph of a graph in which there exists a path between any two vertices, and no vertex of the subgraph shares an edge with a vertex outside of the subgraph. A connected component is said to be complete if there exists an edge between every pair of its vertices.
/**
 * @param {number} n
 * @param {number[][]} edges
 * @return {number}
 */
var countCompleteComponents = function(n, edges) {
    // Initialize parent array (each vertex is its own parent initially)
    let parent = Array.from({ length: n }, (_, i) => i);
    // Rank array to optimize Union-Find operations
    let rank = Array(n).fill(0);

    // Find function with path compression
    const find = (x) => {
        if (parent[x] !== x) {
            parent[x] = find(parent[x]); // Path compre

logger

Logging Utility
package io.helidon.examples;
import java.util.logging.Logger;

public class LogUtil { 
    
    public static Logger getLogger(Class<?> clazz) {
        return Logger.getLogger(clazz.getName());
    }
}



// ...... psvm


    private static final Logger LOGGER = LogUtil.getLogger(GreetResource.class);
        LOGGER.info("GreetResource initialized. Server is running...");

CSSだけでスライダー

<div class="slider">
  <div class="slider-container">
    <div class="slider-item" tabindex="0">1</div>
    <div class="slider-item" tabindex="0">2</div>
    <div class="slider-item" tabindex="0">3</div>
    <div class="slider-item" tabindex="0">4</div>
    <div class="slider-item" tabindex="0">5</div>
    <div class="slider-item" tabindex="0">6</div>
  </div>
</div>

Get-HardwareReadiness

function Get-HardwareReadiness {
    [CmdletBinding()]
    param()
    
    begin {
        function Test-AdministratorContext {
            [CmdletBinding()]param()
            $CurrentWindowsIdentity = [System.Security.Principal.WindowsIdentity]::GetCurrent()
            $CurrentWindowsPrincipal = New-Object System.Security.Principal.WindowsPrincipal($CurrentWindowsIdentity)
            $IsAdministratorContext = $CurrentWindowsPrincipal.IsInRole([System.Security.Principal.WindowsBuilt

2115. Find All Possible Recipes from Given Supplies

You have information about n different recipes. You are given a string array recipes and a 2D string array ingredients. The ith recipe has the name recipes[i], and you can create it if you have all the needed ingredients from ingredients[i]. A recipe can also be an ingredient for other recipes, i.e., ingredients[i] may contain a string that is in recipes. You are also given a string array supplies containing all the ingredients that you initially have, and you have an infinite supply of all of them. Return a list of all the recipes that you can create. You may return the answer in any order. Note that two recipes may contain each other in their ingredients.
/**
 * @param {string[]} recipes
 * @param {string[][]} ingredients
 * @param {string[]} supplies
 * @return {string[]}
 */
var findAllRecipes = function(recipes, ingredients, supplies) {
  // Step 1: Initialization
  const n = recipes.length; // Get the number of recipes
  const graph = new Map(); // Represents dependencies: ingredients point to recipes they can help create
  const indegree = new Map(); // Tracks the number of unmet ingredients needed for each recipe
  const result = []; // Sto

certutil

certutil -store my
certutil -store my "thumbprint"
certutil -verifystore my
certutil -verifystore my "thumbprint"
certutil -repairstore "thumbprint"
certutil -csplist

mapとfilterの違い

const sample = [
  {
    id: 1,
    name: "name1",
  },
  {
    id: 2,
    name: "name2",
  },
];

// mapを使ってidが1のnameをupdateに変更
const mapSample2 = sample.map((item) => {
  if (item.id === 1) {
    item.name = "update";
    return item;
  } else {
    return item;
  }
});
console.log(mapSample2);

// filterを使ってidが1オブジェクトを削除
const filterSample = sample.filter((item) => {
  if (item.id === 1) {
    return false;
  } else {
    return true;
  }
});
console.log(filterSample);

rip vintageits.com

rip vintageits.com using httrack
```sh
httrack "https://vintageits.com/" -O "/home/hoang/htdocs/customers/web1" -v
```

bulk
```sh
for i in {4..14}; do
	httrack "https://vintageits.com/category/blog/page/$i/" -O "/home/hoang/htdocs/customers/web1-1" -v
	cp -rf /home/hoang/htdocs/customers/web1-1/vintageits.com/category/blog/page/$i /home/hoang/htdocs/customers/web1/vintageits.com/category/blog/page/
done

# next
for i in {3..13}; do
	httrack "https://vintageits.com/category/news-events/page/$i/"

Rotate Array

https://leetcode.com/problems/group-anagrams/description
class Solution {
    public void rotate(int[] nums, int k) {
        int[] numsCopy = new int[nums.length];
        for (int i = 0; i < nums.length; i++) {
            numsCopy[(i + k) % nums.length] = nums[i];
        }

        for (int i = 0; i < numsCopy.length; i++) {
            nums[i] = numsCopy[i];
        }
    }
}

requestAnimationFrameの再帰フレームレートに上限をつける

const desiredFPS = 30; // 上限フレームレートを設定
const frameInterval = 1000 / desiredFPS; // 1フレームの間隔(ミリ秒)
let lastTime = 0;

const update = function (time) {
  if (time - lastTime >= frameInterval) {
    lastTime = time;
    console.log("実行");
  }
  requestAnimationFrame(update);
};

requestAnimationFrame(update);

実装自動化への道

# やらせたい事

- Laravelインストール
- 初期設定
- 通知(必要なら)
- 必要に応じて自動実装(パーツを使用)

# そのために必要なこと

- Laravelプラグインの実装
- Laravelのパーツ
- 初期設定のための指示書
- 自動実装についての指示書

# 利用する技術

- MCP
- VSCodeプラグイン
- 独自コマンド(必要なら)

jfrog

jfrog rt config --interactive=false \
    --artifactory-url="$JFROG_URL" \
    --user="$JFROG_USERNAME" \
    --password="$JFROG_API_KEY"

3108. Minimum Cost Walk in Weighted Graph

There is an undirected weighted graph with n vertices labeled from 0 to n - 1. You are given the integer n and an array edges, where edges[i] = [ui, vi, wi] indicates that there is an edge between vertices ui and vi with a weight of wi. A walk on a graph is a sequence of vertices and edges. The walk starts and ends with a vertex, and each edge connects the vertex that comes before it and the vertex that comes after it. It's important to note that a walk may visit the same edge or vertex more than once. The cost of a walk starting at node u and ending at node v is defined as the bitwise AND of the weights of the edges traversed during the walk. In other words, if the sequence of edge weights encountered during the walk is w0, w1, w2, ..., wk, then the cost is calculated as w0 & w1 & w2 & ... & wk, where & denotes the bitwise AND operator. You are also given a 2D array query, where query[i] = [si, ti]. For each query, you need to find the minimum cost of the walk starting at vertex si and ending at vertex ti. If there exists no such walk, the answer is -1. Return the array answer, where answer[i] denotes the minimum cost of a walk for query i.
/**
 * Finds the minimum cost to connect queried nodes in a weighted graph.
 * 
 * @param {number} n - The number of nodes in the graph.
 * @param {number[][]} edges - The edges of the graph, where each edge is represented as [u, v, w].
 * @param {number[][]} query - An array of queries, where each query is represented as [s, t].
 * @return {number[]} - An array where each element corresponds to the minimum cost of connecting the queried nodes.
 */
var minimumCost = function(n, edges, query) {
 

BigCommerce, Algolia Searching

### BigCommerce w/ Algolia Search
- BigComm can use Algolia as an alternative search input

#### Tasks
- In order to show different pricing when a user enters the parts website (whether
logged in or a guest:
  - Algolia's search result template can be edited
  - Need to create a web script (using Script Manager in BC) with a custom hook [event](https://www.algolia.com/doc/integration/bigcommerce/search-settings/custom-hooks/)
  - Attach js to the head of all files
  - You are able to use Handleb

Antivirus Exclusions

- Windows [Virus scanning recommendations for Enterprise computers that are running Windows or Windows Server (KB822158)](https://support.microsoft.com/en-us/topic/virus-scanning-recommendations-for-enterprise-computers-that-are-running-windows-or-windows-server-kb822158-c067a732-f24a-9079-d240-3733e39b40bc)
- Microsoft Teams [Prevent antivirus and DLP tools from blocking or crashing Microsoft Teams](https://learn.microsoft.com/en-us/microsoftteams/troubleshoot/teams-administration/include-exclu

confirmを表示し、どっちが押されたか判定する

const result = confirm("OKかキャンセルのどちらかを押してください");
if (result) {
  console.log("OKが押されました");
} else if (!result) {
  console.log("キャンセルが押されました");
}