## 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.
`
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
<div class="blob"></div>
/**
* 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++) {
-- 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
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常用命令
- ## 重启NaiveProxy(caddy服务器)
```bash
systemctl reload caddy
```
- ## 查找大于20MB的文件
```bash
find . -type f -size +20M -print0 | xargs -0 du -h
```
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 ✔️ ✔️ ✔️
- 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
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;
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);
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
#include <iostream>
using namespace std;
int main(){
return 0;
}
# 作成手順
エディタは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\\[ユーザー]\
# 作成手順
エディタは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