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

Get next business day

function getNextBusinessDay(date) {
    do {
        date.setDate(date.getDate() + 1);
    } while (date.getDay() === 0 || date.getDay() === 6);

    return date;
}

mariaclara

mariaclara
inicio{
"host":"13067EFA4DC5A396A7B9BFC280E0",
"porta":"3F3524"
}fim

Regex For Remove All Search

^.*[keyword].* as part of find all/replace all

Playwright

//npx playwright codegen -> Opens browser and playwright inspector window

const { test, expect } = require("@playwright/test");

test("My Test", async ({ page }) => {
  await page.goto("https://google.com");
  await page.locator('[data-test="username"]').click();
  await page.locator('[data-test="username"]').fill("username");
  await expect(page).toHaveTitle("Google");
  await page.click("id=user-name");
  await page.locator("id=user-name").fill("Edison");
  await page.locator('[id="user-name"

Story Featured Thumbnail List

![](https://cdn.cacher.io/attachments/u/3hcvbnw9zj03k/5wxaYJ_RpOW3tpwPmjN6PE_dP3dT3JVw/ygoy8cdcz.png)
<div class="component c-stories c-stories--rotator-list flex">
  <div class="c-stories__thumbnails">
        <ul data-bind="foreach: thumbnails">
            <li tabindex="0" data-bind="css: { 'c-stories__active': active }, click: $component.slickGoTo, onEnter:$component.slickGoTo ">
                <div class="c-stories__item-inner relative">
                    <div class="c-stories__active-indicator">
                        <span>
                            Now Viewing
                     

2812. Find the Safest Path in a Grid

You are given a 0-indexed 2D matrix grid of size n x n, where (r, c) represents: A cell containing a thief if grid[r][c] = 1 An empty cell if grid[r][c] = 0 You are initially positioned at cell (0, 0). In one move, you can move to any adjacent cell in the grid, including cells containing thieves. The safeness factor of a path on the grid is defined as the minimum manhattan distance from any cell in the path to any thief in the grid. Return the maximum safeness factor of all paths leading to cell (n - 1, n - 1). An adjacent cell of cell (r, c), is one of the cells (r, c + 1), (r, c - 1), (r + 1, c) and (r - 1, c) if it exists. The Manhattan distance between two cells (a, b) and (x, y) is equal to |a - x| + |b - y|, where |val| denotes the absolute value of val.
/**
 * @param {number[][]} grid
 * @return {number}
 */
var maximumSafenessFactor = function(grid) {
    // Get the size of the grid
    const n = grid.length;

    // Define the directions for moving to adjacent cells
    const directions = [[1, 0], [-1, 0], [0, 1], [0, -1]];

    // Helper function to check if a cell is within the grid boundaries
    const isInBound = (r, c) => r >= 0 && r < n && c >= 0 && c < n;

    // Initialize the distance array with Infinity and the queue as empty
    co

My Git Cheatsheet

My Git Cheatsheet

## `vs` Questions
-----------------
1. http://stackoverflow.com/questions/804115  (`rebase` vs `merge`).
2. https://www.atlassian.com/git/tutorials/merging-vs-rebasing (`rebase` vs `merge`)
3. https://www.atlassian.com/git/tutorials/undoing-changes/ (`reset` vs `checkout` vs `revert`)
4. http://stackoverflow.com/questions/2221658 (HEAD^ vs HEAD~) (See `git rev-parse`)
5. http://stackoverflow.com/questions/292357 (`pull` vs `fetch`)
6. http://stackoverflow.com/questions/39651 (`stash` vs `branch

JSON Access

import org.json.simple.JSONArray;
import org.json.simple.JSONObject;
import org.json.simple.parser.JSONParser;
import org.json.simple.parser.ParseException;

import java.io.*;

public class ContactListToJson {

    public void WriteToJson() {
        // Create a JSON array to store contacts
        JSONArray contacts = new JSONArray();

        // Create a sample contact
        JSONObject contact1 = new JSONObject();
        contact1.put("name", "Peter");
        contact1.put("s