Remove password weak checkbox

<?php
/*
 * Plugin name: Sevanova Extra Secu Features
 * Description: See title
 * Author: Sevanova
 * Author URI: https://www.sevanova.com
 * Version: 1.0.0
 * Text Domain: sn-extra-secu
 */

class Sevanova_Extra_Secu {
	// Construct
	public function __construct() {
		add_action( 'login_head', array( $this, 'sn_extra_secu_disable_weak_checkbox' ), 999 );
	}

	// Remove weak password confirm checkbox
	public function sn_extra_secu_disable_weak_checkbox() {
		?>
	<script>
		jQ

Uploading data to SQL table

from sqlalchemy import text
from libdl.dl import dl

schema="test_schema"
table="askepot_test3"

# Define all columns that are being uploaded by the user (excluding the ones managed automatically)
headers = "read_result, sampleid, assay_activity, batchid, planned_sampling_time, assay"
# Construct a string of columns to cause updating instead of failing on conflict
# The column updated_datetime will be updated for every upload
# The column created_datetime only updates at the 1st upload

Creating SQL table

from libdl.dl import dl

schema="test_schema"

table="test_table2"
unique_cols = "someid, plateid, assayval"

# There is no need to include the created_at and updated_at columns in the Python df when new rows are added (SQL will automatically handle the timestamps)
# TIMESTAMP DEFAULT CURRENT_TIMESTAMP will use the default server timezone
# SERIAL is a special type that automatically generates a unique integer value for each row
# PRIMARY KEY ensures that each value in this column is u

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