podman kind cluster

## Starting kind-cluster in podman

If you use podman desktop on a mac and want to use a kind-cluster:

```sh
export KIND_EXPERIMENTAL_PROVIDER=podman
kind create cluster --name local-kind-cluster
```

## create docker-image in podman
By default, podman can only pull images from publicly available registries.
If you build a docker-image locally, it will not be available in the 
podman or kind cluster.

Therefore you need to build the docker image with podman directly, or import
it into there.

`

Tailwinds v.4 react Navbar light / dark mode

import { useEffect, useState } from "react";
import Footer from "./Footer";

export default function Navbar() {
  const [theme, setTheme] = useState(localStorage.getItem("theme") || "light");

  useEffect(() => {
    document.documentElement.setAttribute("data-theme", theme);
    localStorage.setItem("theme", theme);
  }, [theme]);

  return (
    <>
      {/* Navbar */}
      <nav className="navbar bg-white dark:bg-black text-primary-content flex justify-between items-center p-4 t

CSSで水滴

<div class="blob"></div>

3356. Zero Array Transformation II

You are given an integer array nums of length n and a 2D array queries where queries[i] = [li, ri, vali]. Each queries[i] represents the following action on nums: Decrement the value at each index in the range [li, ri] in nums by at most vali. The amount by which each value is decremented can be chosen independently for each index. A Zero Array is an array with all its elements equal to 0. Return the minimum possible non-negative value of k, such that after processing the first k queries in sequence, nums becomes a Zero Array. If no such k exists, return -1.
/**
 * Checks if the array can be made zero with a given number of queries.
 * @param {number[]} nums - The array of numbers.
 * @param {number[][]} queries - The array of queries.
 * @param {number} limit - The number of queries to use.
 * @return {boolean} - Returns true if the array can be made zero, false otherwise.
 */
let check = (nums, queries, limit) => {
    let arr = new Array(nums.length + 1).fill(0);

    // Apply each query to the arr array
    for (let i = 0; i < limit; i++) {
    

run pg_dump and pg_restore

Como realizar um dump e restauração do dump no postgresql
-- Para fazer o dump da base de dados você pode usar a ferramenta pg_dump
PGPASSWORD=seu_password pg_dump -U seu_usuario -h endereco_remoto -p sua_porta nome_do_banco > nome_do_banco_dump.sql

-- gerar o dump em um formato customizado (útil para restaurar com pg_restore), utilize a opção -Fc:
PGPASSWORD=seu_password pg_dump -U seu_usuario -h endereco_remoto -p sua_porta -Fc nome_do_banco > nome_do_banco_dump.sql

-- Se o backup estiver em formato SQL (texto puro):
PGPASSWORD=seu_password 

K-diff Pairs in an Array

https://leetcode.com/problems/k-diff-pairs-in-an-array/description/
class Solution {
    public int findPairs(int[] nums, int k) {
        if (k < 0) {
            return 0;
        }

        Map<Integer, Integer> numCounts = new HashMap<>();
        for (int num : nums) {
            numCounts.put(num, numCounts.getOrDefault(num, 0) + 1);
        }

        int pairCount = 0;
        for (int num : numCounts.keySet()) {
            if (k == 0) {
                if (numCounts.get(num) > 1) {
                    pairCount++;
                }
  

VPS常用命令

# VPS常用命令
- ## 重启NaiveProxy(caddy服务器)
```bash
systemctl reload caddy
```
- ## 查找大于20MB的文件
```bash
find . -type f -size +20M  -print0 | xargs -0 du -h
```

Supported Scraper Types

Saved from https://github.com/stashapp/stash/blob/develop/ui/v2.5/src/docs/en/Manual/Scraping.md
Scraper Types
Type 	Description
Fragment 	Uses existing metadata for an Item and match it to a result from a metadata source.
Search/By Name 	Uses a provided query string to search a metadata source for a list of matches for the user to pick from.
URL 	Extracts metadata from a given URL.
Supported Scrapers
	Fragment 	Search 	URL
gallery 	✔️ 		✔️
image 	✔️ 		✔️
group 			✔️
performer 		✔️ 	✔️
scene 	✔️ 	✔️ 	✔️

Source yaml

Saved from https://github.com/stashapp/stash/blob/develop/ui/v2.5/src/docs/en/Manual/Scraping.md
- id: <package id>
  name: <package name>
  version: <version>
  date: <date>
  requires:
  - <ids of packages required by this package (optional)>
  - ...
  path: <path to package zip file>
  sha256: <sha256 of zip>
  metadata:
    <optional key/value pairs for extra information>
- ...

How to configure NTP client/server in Ubuntu 20

# How to configure NTP client/server in Ubuntu 20
Source: https://toxigon.com/ubuntu-20-04-ntp-server

## Install NTP application

Install ntp application use apt:

```
$ sudo apt install ntp
```

This will install the NTP daemon (ntpd) and all its dependencies. 
You can check the status of the service with: 

```
$ sudo systemctl status ntp 
```

You should see output similar to this:

```
● ntp.service - Network Time Service Loaded: loaded (/lib/systemd/system/ntp.service;

Book Sales

import java.io.FileReader;
import java.io.IOException;
import java.util.Locale;
import java.util.Scanner;

public class ReadSalesData {
    private String arrID[] = new String[100];
    private String arrTitle[] = new String[100];
    private String arrAuthor[] = new String[100];
    private double arrPrice[] = new double[100];
    
    private int size;
    
    public void readData(String filename){
        try{
            FileReader fr = new FileReader(filename);
            

Rainfall Analysis

import java.io.FileReader;
import java.io.IOException;
import java.util.Scanner;

public class TextfileData {
    private String arrMonth[] = new String[50];
    private int arrYear[] = new int[50];
    private int arrRainfall[] = new int[50];
    
    private int n;
    
    public void ReadData(String filename){
        try{
            FileReader fr = new FileReader(filename);
            Scanner inFile = new Scanner(fr);
            n = 0;
            
            while(inFi

main cpp

#include <iostream> 

using namespace std;

int main(){
    
  return 0;
}

MCP開発まとめ(Python)

# 作成手順

エディタはCursor、パッケージ管理はuvを使う想定で進める。  

## 1. プロジェクトの初期化

以下のコマンドを実行する。  

```
$ uvx create-mcp-server --path . --name mcp-server --description mcp-server --version 0.1.0 --no-claudeapp
```

## 2. 依存関係のインストール

以下のコマンドを実行する。  

```
$ uv sync --dev --all-extras
```

## 4. MCPサーバーの設定を追加

プロジェクトディレクトリの `.cursor/mcp.json` に以下のように記述する

```
{
  "mcpServers": {
    "mcp-server": {
      "command": "uv",
      "args": [
        "--directory",
        "C:\\Users\\[ユーザー]\

MCP開発まとめ(TypeScript)

# 作成手順

エディタはCursor、パッケージ管理はbunを使う想定で進める。  

## 1. プロジェクトの初期化

以下のコマンドを実行する。  

```
$ bun init -y
```

## 2. 必要なツールのインストール

以下のコマンドを実行する。  

```
$ bun add @modelcontextprotocol/sdk
```

## 3. MCPサーバーの処理を作成

`index.ts` に以下のコードを記述する。  

```
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
import { z } from "zod";

const config = {
  server: {
    name: "simple-mcp-se