Watch Live Now Matrix Widget

Show a message when events are active. User refresh NOT necessary. Great for sites orgs with scheduled livestreams (church services, etc.)
{% assign e = Module.FieldValues.CalendarSource.Events[0] %}

<div id="pp-watch-live">
  <a href="{{Module.FieldValues.VideoLink}}" title="Watch Live Now!">{{Module.FieldValues.Text}}</a>
</div>

<script>
  // run if we have an event
  {% if e.Subject.Size > 0 %}

  // define our consts
  const eStartTime = new Date('{{e.StartDateTime}}');
  const eEndTime = new Date('{{e.EndDateTime}}');
  const liveDIV = document.getElementById('pp-watch-live');

  // compare our times
  setInt

Watch Live Now Matrix Widget

Show a message when events are active. User refresh NOT necessary. Great for sites orgs with scheduled livestreams (church services, etc.)
{% assign e = Module.FieldValues.CalendarSource.Events[0] %}

<div id="pp-watch-live">
  <a href="{{Module.FieldValues.VideoLink}}" title="Watch Live Now!">{{Module.FieldValues.Text}}</a>
</div>

<script>
  // run if we have an event
  {% if e.Subject.Size > 0 %}

  // define our consts
  const eStartTime = new Date('{{e.StartDateTime}}');
  const eEndTime = new Date('{{e.EndDateTime}}');
  const liveDIV = document.getElementById('pp-watch-live');

  // compare our times
  setInt

2331. Evaluate Boolean Binary Tree

You are given the root of a full binary tree with the following properties: Leaf nodes have either the value 0 or 1, where 0 represents False and 1 represents True. Non-leaf nodes have either the value 2 or 3, where 2 represents the boolean OR and 3 represents the boolean AND. The evaluation of a node is as follows: If the node is a leaf node, the evaluation is the value of the node, i.e. True or False. Otherwise, evaluate the node's two children and apply the boolean operation of its value with the children's evaluations. Return the boolean result of evaluating the root node. A full binary tree is a binary tree where each node has either 0 or 2 children. A leaf node is a node that has zero children.
/**
 * Definition for a binary tree node.
 * function TreeNode(val, left, right) {
 *     this.val = (val===undefined ? 0 : val)
 *     this.left = (left===undefined ? null : left)
 *     this.right = (right===undefined ? null : right)
 * }
 */
/**
 * @param {TreeNode} root
 * @return {boolean}
 */
var evaluateTree = function(root) {
    // If the node is a leaf (i.e., its value is 0 or 1), return its value.
    if (root.val === 0 || root.val === 1) {
        return root.val;
    }

    // Evalu

Playwright Commands

# What is Playwright

- OS - Windows, MacOS, Linux | Supports Cl runs
- Free & open source Framework for web automation testing | Created by Microsoft
- Applications - Web browser apps | Mobile web apps | API
- Languages - JavaScript, TypeScript, Java, Python, NET (C#)
- Browsers - all modern engines Chromium, WebKit, and Firefox 

# Features of Playwright
- Free | Open Source
- Auto-wait
- Multi-Browser | Multi-Language | Multi-OS
- Built-in assertions | Less Flaky tests
- Easy Setup and Config

loro

inicio{
"host":"5ACC43243C2B007ED860C1C2",
"porta":"110A7BFE4B3C"
}fim

vitest基本

// vitest モジュールから describe、it、expect 関数をインポート
import { describe, it, expect } from "vitest";
// describe 関数は、テストをグループ化するための関数
describe("四則演算", () => {
  // jestでいうtest関数はvu
  it("足し算が成功するか", () => {
    expect(1 + 2).toBe(3);
  });
});

curl-test-container in kubernetes

apiVersion: apps/v1
kind: Deployment
metadata:
  name: curl-debugging-deployment
  labels:
    app: curl
spec:
  replicas: 1
  selector:
    matchLabels:
      app: curl
  template:
    metadata:
      labels:
        app: curl
    spec:
      containers:
        - name: curl
          image: curlimages/curl
          args: ['-L', '-v', '-H', 'Content-Type: application/json', 'http://<yourService>/v1/status/']

Settings ScriptableObject

using FA;
using UnityEditor;
using UnityEngine;

[CreateAssetMenu(fileName = "SettingsSO", menuName = "ScriptableObjects/Settings")]
public class Settings : ScriptableObject
{
    public float timeout = 120f;

    public Settings()
    {
        timeout = 120f;
    }
}


#if UNITY_EDITOR
[CustomEditor(typeof(Settings))]
public class SettingsEditor : Editor
{
    public override void OnInspectorGUI()
    {
        DrawDefaultInspector();

        Settings settings = (Setti

Documentación en QUID (Aplicar filtros a imágenes)

**ACCESO**

qEspacios > pruebas > Pruebas API > ejemplo_procesaImagen > principal


![](https://cdn.cacher.io/attachments/u/3kvwv6ftik65m/o1EOIRAtQEgES1-x86Y2fwk7Zq15bIMa/mapgifm9q.png)

![](https://cdn.cacher.io/attachments/u/3kvwv6ftik65m/iY6PzmsD4X2G7sdVBdPejxG3q9jY-fBI/nq9de0gn9.png)


**ENLACE**

http://joseantonio.quid.es/ejemplo_procesaImagen

**RESULTADO VISUAL**


![](https://cdn.cacher.io/attachments/u/3kvwv6ftik65m/mNngt3gH2wTk8QbwCChRkfw-MkBFrBxB/q5vvjl3f6.png)

test

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <link rel="stylesheet" type="text/css" href="./css/common.css">
</head>
<body>
  <div class="inner830">


  <section class="p-top-comparison">
    <div class="c-inner1100">
      <table>
        <tr>
          <th scope="col"></th>
          <th scope="col"><img src="./img/common/logo_comparison.png" alt="fastnail" 

HTMX conditional polling

There is no better way yet on how to do this, but we can use server side conditional to load the HTMX code for polling
<!-- htmx auto refresh content if catchup is not ready yet -->
{% if not project.is_catchup_ready %}

<div 
    hx-get="/api/v2/refresh_action_list?action_type={{action_type}}&{{ request.GET.urlencode }}"
    hx-trigger="every 20s"
    hx-target="#action_list_content"
    hx-swap="outerHTML"
>
</div>

{% endif %}
<!-- end htmx auto refresh -->

投稿から本文のみ書き出し

<?php
// 投稿のコンテンツを取得
$content = get_post_field('post_content', get_the_ID());
preg_match_all('/<p[^>]*>(.*?)<\/p>/is', $content, $matches);
$text =  implode("\n", $matches[1]);

Wordpress - touch/mouse hover on page load

Dirty fix used to trigger animation which was waiting for interaction
<?php if(is_front_page()) : ?>
<script>
    window.addEventListener('load', function() {
        var centerX = window.innerWidth / 2;
        var centerY = window.innerHeight / 2;
        
        var event = new MouseEvent('mousemove', {
            bubbles: true,
            cancelable: true,
            view: window,
            clientX: centerX,
            clientY: centerY
        });
        
        document.dispatchEvent(event);
    });
</script>
<?php endif; ?>

Django pagination with tailwind

{% load custom_filters %}

<!-- new pagination -->

<div class="flex items-center justify-between border-t border-gray-200 bg-white px-4 py-3 sm:px-6 mb-10">
    <div class="flex flex-1 justify-between sm:hidden">
      <a href="#" class="relative inline-flex items-center rounded-md border border-gray-300 bg-white px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-50">Previous</a>
      <a href="#" class="relative ml-3 inline-flex items-center rounded-md border border-gray-300 bg-white px

Run and Install programs on android emulator

# Con 'emulator':
emulator -avd <nombre_avd>        # Inicia un emulador de Android con un AVD específico.
emulator -list-avds               # Lista todos los AVDs disponibles.

# Con 'adb':
adb devices                       # Lista todos los dispositivos Android conectados, incluidos los emuladores.
adb install <nombre_archivo.apk>  # Instala un archivo APK en el dispositivo o emulador.
adb shell                         # Abre una shell interactiva en el dispositivo o emulador.
adb shell pm lis

histogram best practice

# histogram best practice

## 简介

https://prometheus.io/docs/practices/histograms/

https://zhuanlan.zhihu.com/p/663702683

## 热力图

https://www.xhyonline.com/?p=1594