2560. House Robber IV

There are several consecutive houses along a street, each of which has some money inside. There is also a robber, who wants to steal money from the homes, but he refuses to steal from adjacent homes. The capability of the robber is the maximum amount of money he steals from one house of all the houses he robbed. You are given an integer array nums representing how much money is stashed in each house. More formally, the ith house from the left has nums[i] dollars. You are also given an integer k, representing the minimum number of houses the robber will steal from. It is always possible to steal at least k houses. Return the minimum capability of the robber out of all the possible ways to steal at least k houses.
/**
 * @param {number[]} nums
 * @param {number} k
 * @return {number}
 */
var minCapability = function(nums, k) {
    // Define the binary search range: minimum and maximum house values.
    let left = Math.min(...nums), right = Math.max(...nums);

    // Function to check if a given capability can rob at least `k` house.
    const canRob = (cap) => {
        let count = 0; // Number of houses robbed.
        let i = 0; // Pointer to traverse house.

        while (i < nums.length) {
          

Configuration of Wezterm Terminal

-- Pull in the wezterm API
local wezterm = require("wezterm")

-- This will hold the configuration.
local config = wezterm.config_builder()

-- This is where you actually apply your config choices

-- my coolnight colorscheme
--
config.color_scheme = "GruvboxDarkHard"

-- config.font = wezterm.font("Cascadia Code NF")
config.font = wezterm.font("Hack Nerd Font")
config.font_size = 10

config.enable_tab_bar = false

config.window_decorations = "RESIZE"
config.window_background_opacity = 0.75
conf

Configuration of Ghostty Terminal

window-padding-x = 10
font-family = JetBrains Mono
font-size = 9
theme = GruvboxDarkHard
shell-integration-features = no-cursor,sudo,no-title
cursor-style = block
adjust-cell-height = 35%
background-opacity = 0.96

mouse-hide-while-typing = true
mouse-scroll-multiplier = 2

window-padding-balance = true 
window-save-state = always
macos-titlebar-style=transparent
window-colorspace = "display-p3"
background = 1C2021
# foreground = d4be98

# keybindings
keybind = cmd+s>r=reload_config
keybind = cm

デザインの都合上selectを<select>要素を使わずに実装する場合のマークアップ

<section class="select-section">
  <h2 type="button" aria-haspopup="listbox" aria-expanded="false" class="select-trigger" aria-labelledby="select-menu">言語切り替え</h2>
  <ul class="select-list" role="listbox" id="language-menu" inert>
    <li class="select-item" role="option" aria-selected="false" tabindex="0">日本語</li>
    <li class="select-item" role="option" aria-selected="false" tabindex="0">英語</li>
  </ul>
</section>

ELEGANT Self NumberSorter (Thread-Self)

Beautiful number sorter that's thread safe and has clear logic
package PrivateSorter;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

public class PrivateSorter implements Runnable {
    private final List<Integer> selfListSorter = new ArrayList<>();
    private boolean isSorted = true; // Flag to track if the list is sorted

    // Method to add items to the list and mark the list as unsorted
    public synchronized void addItem(Integer item) {
        selfListSorter.add(item);
        isSorted = false; // Mark the list a

Useful Terminal Util Console display commaneds - Runtime.getRunTime

the following line to know how many processors your machine has
int cores = Runtime.getRuntime().availableProcessors();
System.out.println("Available processors: " + cores);

long freeMemory = Runtime.getRuntime().freeMemory();
System.out.println("Free memory: " + freeMemory);

long totalMemory = Runtime.getRuntime().totalMemory();
System.out.println("Total memory: " + totalMemory);

long maxMemory = Runtime.getRuntime().maxMemory();
System.out.println("Max memory: " + maxMemory);


Runtime.getRuntime().gc(); // Suggest to JVM to run garbage collection
Syste

Concurrent Tasks and Synchronized collections list

Example of tasks running truly concurrently (in the background) and storing the tasks in a synchreonized collections list
import java.util.*;
import java.util.concurrent.atomic.AtomicInteger;

public class ResponsiveUI implements Runnable {
    private int taskId;
    private int duration;
    private static List<Integer> finishedTasks = Collections.synchronizedList(new ArrayList<>());
    private static AtomicInteger taskCounter = new AtomicInteger(0);

    public ResponsiveUI(int duration) {
        this.taskId = taskCounter.incrementAndGet(); // Assign unique task number
        this.duration = duration;
    }

B2 Unit 9

H
1 strengthens
2 foodbank
3 hunger
4 tuie
5 pride
6 poverty
7 sutisfaction
8 charity

I
1. key to creating
2. struggle access
3. priceless
4. well-being

J 
flood

Inefficient DOM Manipulations

/*
Why It’s a Problem:
Direct DOM manipulation triggers reflows and repaints, slowing down rendering.
Inserting elements one by one instead of batching updates increases the number of re-renders.
Modifying styles directly forces layout recalculations.
*/

// BAD: Multiple reflows
for (let i = 0; i < 1000; i++) {
    const div = document.createElement('div');
    div.textContent = `Item ${i}`;
    document.body.appendChild(div);
}

// GOOD: Batch updates using DocumentFragment
cons

Number To Text Coverter

converts 1 to one converts 2 to two etc.
import java.util.*;

public class ReponsiveUI implements Runnable {
    private static int userLength;
    private static int taskNo = 0;
    private static List<Integer> finishedtasks = new ArrayList<>();
    public static Map<Integer, String> numTextStrings = new HashMap<>();

    static {
        numTextStrings.put(1, "one");
        numTextStrings.put(2, "two");
        numTextStrings.put(3, "three");
        numTextStrings.put(4, "four");
        numTextStrings.put(5, "five");
        numTe

Nuxtで流し続けるカルーセル

<template>
  <MyAutoCarousel class="my-auto-carousel" orientation="horizontal-left" :duration="3">
    <li style="font-size: 540px; padding-right: 600px; background-color: green">1</li>
    <li style="font-size: 540px; padding-right: 600px; background-color: orange">2</li>
    <li style="font-size: 540px; padding-right: 600px; background-color: red">3</li>
  </MyAutoCarousel>
</template>

Nuxtでダイアログ(モーダル)

<template>
  <MyDialog ref="dialogRef">
    <template #open>ダイアログを開く</template>
    <template #inner>
      <p>ダイアログの中身</p>
      <button @click="closeDialogFromParent">閉じる</button>
    </template>
  </MyDialog>
</template>
<script setup lang="ts">
/* 「ダイアログを閉じる」というアクションを、閉じるボタン以外からも行えるように */
import MyDialog from "../components/MyDialog.vue";
const dialogRef = ref<InstanceType<typeof MyDialog> | null>(null);
const closeDialogFromParent = () => {
  dialogRef.value?.closeDialog();
};
</script>

Nuxtでページ全体のローディングが完了するまでのアニメーション実装(ローディング・オープニング)

<template>
  <div>
    <LoadingMyLoading :loaded="isMounted" />
  </div>
</template>
<script setup lang="ts">
const isMounted = ref(false);

onMounted(() => {
  /* onMountedは「コンポーネントのmount」なため、ページ全体のmountではない。
   * そのため、レイアウトやページ全体のコンポーネントが集約しているファイルなどのonMountedの中でflagを管理し、
   * ローディング演出用のコンポーネントに渡す
  */
  isMounted.value = true;
});
</script>
<style scoped></style>

FMOD cheatsheet

# FMOD Cheatsheet
Simple FMOD scripting in Unity

## Setup
<img align="right" width="236" height="222" src="https://user-images.githubusercontent.com/911416/215850054-acafd661-354f-4247-a8eb-fd22b252470a.png">  

Remove the built-in Audio Listener component from your main camera and add an FMOD Studio Listener component.  
If you're using a template this may already be done.  

<br>

> This guide will use FMOD naming conventions, any references to **Event(s)** is talking about a sound(s).

<br><

Laravel proper permissions


Ensure Correct Ownership
sudo chown -R www-data:www-data /var/www/u2cmobilelifeline.com


Set Proper Permissions
sudo chmod -R 775 /var/www/u2cmobilelifeline.com



Also, explicitly allow storage and bootstrap/cache to be writable:
sudo chmod -R 775 /var/www/u2cmobilelifeline.com/storage
sudo chmod -R 775 /var/www/u2cmobilelifeline.com/bootstrap/cache








2226. Maximum Candies Allocated to K Children

You are given a 0-indexed integer array candies. Each element in the array denotes a pile of candies of size candies[i]. You can divide each pile into any number of sub piles, but you cannot merge two piles together. You are also given an integer k. You should allocate piles of candies to k children such that each child gets the same number of candies. Each child can be allocated candies from only one pile of candies and some piles of candies may go unused. Return the maximum number of candies each child can get.
/**
 * @param {number[]} candies
 * @param {number} k
 * @return {number}
 */
var maximumCandies = function(candies, k) {
    // Helper function to check if it's possible to distribute 'target' candies to 'k' children
    function canDistribute(candies, k, target) {
        let count = 0; // Count the number of children that can receive 'target' candies
        for (let pile of candies) {
            count += Math.floor(pile / target); // Divide the pile and count the number of children served