Easy Breadcrumb Path Replacements (Drupal)

[Easy Breadcrumb Path Replacements (Drupal)]
Ok, I finally figured out how the "Paths to replace with custom breadcrumbs" section of the Easy Breadcrumbs settings works!

1. Each line is a separate breadcrumb.
2. Each section of a line is separated with ::
3. The first section is the chunk you want to replace.
4. Then each section after that is a chunk of breadcrumb
5. If you want your breadcrumb chunk to link somewhere, put in a pipe (|) followed by the url to link to

ex:
```
/node/1 :: A :: B :: C
```
Would render as A > B > C (none of 

YT video background

youtube background video. Autoplays and mute. Example: https://harpseals.speakcreative.com/ (Near the bottom) Credit: https://github.com/stamat/youtube-background?tab=readme-ov-file
<div data-vbg="{{ Module.FieldValues.YouTubeEmbedLink }}"></div>

{% if Module.FieldValues.YouTubeEmbedLink.size > 0 %}
<script type="text/javascript" src="https://unpkg.com/youtube-background/jquery.youtube-background.min.js"></script>
<script type="text/javascript">
   const videoBackgrounds = new VideoBackgrounds('[data-vbg]');
</script>
{% endif %}

1358. Number of Substrings Containing All Three Characters

Given a string s consisting only of characters a, b and c. Return the number of substrings containing at least one occurrence of all these characters a, b and c.
/**
 * @param {string} s - Input string containing characters 'a', 'b', and 'c'
 * @return {number} - Number of substrings containing at least one 'a', 'b', and 'c'
 */
var numberOfSubstrings = function(s) {
    let count = 0; // To keep track of the number of unique characters 'a', 'b', and 'c' in the current window
    let map = {'a': 0, 'b': 0, 'c': 0}; // Map to store the count of each character 'a', 'b', and 'c'
    let res = 0; // To store the result (number of substrings)
    let l = 0; /

Sub menu - last child - bottom border radius applied

ul.sub-menu {
    border-radius: 0 0 9px 9px !important;
}
ul.sub-menu :last-child a {
    border-radius: 0 0 9px 9px;
}

Has Okendo reviews

{%- liquid
  assign okendo_reviews_count = product.metafields.okendo.summaryData.reviewCount | plus: 0
  
  assign has_okendo_reviews = false

  if okendo_reviews_count > 0
    assign has_okendo_reviews = true
  endif
-%}

Simple Parallax

parallax a `background-image` of some div credit: https://generatepress.com/forums/topic/site-background-parallax-effect-to-body/#post-350945 credit 2: https://stackoverflow.com/questions/37527132/parallax-effect-on-an-elements-position-only-when-in-view
function body_parallax_element( selector, context ) {
    context = context || document;
    var elements = context.querySelectorAll( selector );
    return Array.prototype.slice.call( elements );
}

window.addEventListener( "scroll", function() {
    var scrolledHeight= window.pageYOffset;
    body_parallax_element( "body" ).forEach( function( el, index, array ) {
        var limit = el.offsetTop + el.offsetHeight;
        if( scrolledHeight > el.offsetTop && scrolledHeight <= limit )

Use post ID in filter function wp_mail_from()

<?php
$CUSTOM_HELP_EMAIL_PREFIX = getenv( '4ME_HELP_EMAIL_PREFIX' );
$CUSTOM_HELP_EMAIL_DOMAIN = getenv( '4ME_HELP_EMAIL_DOMAIN' );

if ( ! empty( $CUSTOM_HELP_EMAIL_PREFIX ) && ! empty( $CUSTOM_HELP_EMAIL_DOMAIN ) ) {
  add_filter(
    'wp_mail_from',
    function( $email ) use ( $post_id ) {
      $CUSTOM_HELP_EMAIL_PREFIX = getenv( '4ME_HELP_EMAIL_PREFIX' );
      $CUSTOM_HELP_EMAIL_DOMAIN = getenv( '4ME_HELP_EMAIL_DOMAIN' );
      $sender                 = $CUSTOM_HELP_EMAIL_PREFIX

Nextでアコーディオンパネル

"use client";

import { useEffect, useRef, useState } from "react";
import styles from "./Accordion.module.css";

type AccordionProps = {
  buttonName: string;
  panelName: string;
  open?: boolean;
  title: React.ReactNode;
  icon?: React.ReactNode;
  content: React.ReactNode;
};

export default function Accordion({ buttonName, panelName, open = false, title, icon, content }: AccordionProps) {
  const accordionTrigger = useRef<HTMLButtonElement | null>(null);
  const accordionBody = useRef<HTML

Nuxtでアコーディオンパネル

<template>
  <button
    :id="props.buttonname"
    ref="accordionTrigger"
    class="accordion-trigger"
    :aria-expanded="isOpen"
    role="tab"
    :aria-controls="props.panelname"
    type="button"
    @click="changeExpanded"
  >
    <slot name="title"></slot>
    <slot name="icon"></slot>
  </button>
  <div
    :id="props.panelname"
    ref="accordionBody"
    class="accordion-body"
    role="tabpanel"
    :aria-labelledby="props.buttonname"
  >
    <div class="accordion-inner">
      <slo

go Test commands

# Tests in Go

Run all tests
```go
go test ./...
```

## Force Re-Run Tests
Test-results are cached for efficiency, if go detects that no change has 
occurred to the source-files, the tests will not re-run.

To force re-running all tests use

```go
go test -count=1 ./...
```

Tips MongoDB

# Connect to db
$ mongo "mongodb://localhost:${port}/example"   

# List tables
> db.getCollectionNames()

# List table users content
> db.users.find()

# Update row
> db.users.update(
    {
        email: "${email}"
    },
    {
        $set: { "password": "${new_password}" }
    }
)

# Test : https://mongoplayground.net/

clearTerminal()

Java code to clear CLI space
    public static void clearTerminal(){
        System.out.print("\033[H\033[2J");
        System.out.flush();
  }

3306. Count of Substrings Containing Every Vowel and K Consonants II

You are given a string word and a non-negative integer k. Return the total number of substrings of word that contain every vowel ('a', 'e', 'i', 'o', and 'u') at least once and exactly k consonants.
/**
 * @param {string} word
 * @param {number} k
 * @return {number}
 */
var countOfSubstrings = function(word, k) {
    
    // Function to count substrings with at least k consonants
    function atLeastK(word, k) {
        const vowels = new Set(['a', 'e', 'i', 'o', 'u']);
        const n = word.length;
        const vowelCount = new Array(5).fill(0); // To count occurrences of each vowel
        let start = 0; // Start index of the current window
        let end = 0; // End index of the curr

Eliminar Partículas fuera del rango de cámara - dentro del DOPNET

VERSION EN PARTICULAS
EL POP WRANGE DENTRO DEL DOPNET CONECTADO EN "PARTICLE FORCE"
CODIGO DENTRO DEL POP WRANGLE
// Use in a gas wrangle in dops to cull by camera
float sample;
 
sample = volumesample(1, "density", @P);
if (sample == 0){
   removepoint(0,@ptnum);
}
ASEGURATE DE QUE LA CAMARA ESTÁ CONECTADA EN LA PESTAÑA DE INPUT EN EL SEGUNDO.

Register custom post status for a custom post type (ticket)

<?php
class Custom_Post_Type {
	// Construct
	public function __construct() {
		add_action( 'init', array( $this, 'custom_post_type_register_custom_post_status' ) );
		add_action( 'admin_footer-edit.php', array( $this, 'custom_post_type_custom_post_status_add_inline_edit' ) );
		add_action( 'admin_footer-post.php', array( $this, 'custom_post_type_custom_post_status_add_to_select' ) );
		add_filter( 'display_post_states', array( $this, 'custom_post_type_custom_post_display_post_states' ) )