exit intent modal - leave page popup

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Modal de Saída</title>
<style>
    /* Estilos do modal */
    #modal {
        display: none;
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        background-color: #fff;
        padding: 20px;
        border: 1px solid #ccc;
        box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.5);
   

static vertical slider by css animation | статичный слайдер на css анимации | 3 slides | 3 слайда | @keyframes

.slider {
  width: 100%;

  display: flex;
  justify-content: center;

  height: 30px;
  overflow: hidden;
  position: relative;

  .item {
    line-height: 30px;

    --dur: 6s;
    // если 3 слайда то на 3 делим
    --delay:  calc(var(--dur) / 3);

    opacity: 0;
    transition: opacity 300ms;
    transform: translateY(100%);
    position: absolute;

    animation-name: sliding;
    animation-duration: var(--dur);
    animation-iteration-count: infinite;

    &.n1 {
      animation-delay: 0s;

Editor número destacado

![](https://cdn.cacher.io/attachments/u/3kvw08xwp9mh4/bmN-K6U4BNcU1YNVMCQ9Pr3pW5qOO09O/Screenshot_9.png)
$miContenidoEstatico = $Plugins->editorNumeroDestacado([
	"tipo"=>"info",
	"valor"=>16,
	"animado"=>true,
	"tamaño"=>1,
	"sufijo"=>"",
	"rotulo"=>"mi valor",
	"delay"=>500
]);

Validate if file or folder exists

import os

if os.path.isfile("filename.txt"):
    # file exists
    f = open("filename.txt")

if os.path.isdir("data"):
    # directory exists

if os.path.exists(file_path):
    # file or directory exists

Detect OS

var OSName="Unknown OS";
if (navigator.appVersion.indexOf("Win")!=-1) OSName="Windows";
if (navigator.appVersion.indexOf("Mac")!=-1) OSName="MacOS";
if (navigator.appVersion.indexOf("X11")!=-1) OSName="UNIX";
if (navigator.appVersion.indexOf("Linux")!=-1) OSName="Linux";

if (navigator.appVersion.indexOf("Mac")!=-1) 
{
  console.log('Your OS: '+OSName);
  $("head link[rel='stylesheet']").last().after("<link rel='stylesheet' href='../wp-content/themes/drvn-theme/css/mac-fixes.css' type='

Animazioni a comparsa nella viewport in js puro

In questo video spiega come fare animazioni alla comparsa nel vieport con un semplice js
https://www.youtube.com/watch?v=tMFhuYt_cw8

Aplicar filtros a imagenes

Funciones necesarias para terminar con un pdf de datos de baremos:

1. (**MiClase.pruebasJesus**) Llama a 'contenedorFichaInteractiva'
2. (**Archivo.procesoImagen**) Contiene los controles de 'filtrosFichaInteractiva' y 'fichaInteractivaAsignaturas'

ENLACE
http://joseantonio.quid.es/ajax/ops.php?api=Archivo.procesaImagen&json=0


![](https://cdn.cacher.io/attachments/u/3kvwv6ftik65m/_PbZBcB3yArmk1fuRzPBVwjM_a_XiPLo/3kwoez7kj.png)

Perfectly fetching data in react

The `ignore` variable in your code serves as a flag to prevent state updates after an asynchronous operation (in this case, fetching country data) has completed, especially when the component might have been unmounted or the state might have been updated with a new value before the operation completes. This is a common pattern used to avoid setting state on an unmounted component or to prevent updating the state with stale data. Here's a breakdown of how it works in your code: 1. **Initialization**: The `ignore` variable is initialized as `false` at the beginning of the `useEffect` hook. This means that initially, the state updates are not ignored. 2. **Asynchronous Operation**: When you start fetching country data, you set `ignore` to `false` to indicate that any state updates that occur as a result of this operation should be applied. 3. **State Updates**: Inside the `try` block, after successfully fetching the data, you check if `ignore` is still `false` before updating the state. This is to ensure that the state updates only happen if the component is still mounted and the operation hasn't been cancelled or superseded by a new operation. 4. **Cleanup Function**: The `useEffect` hook returns a cleanup function that sets `ignore` to `true`. This cleanup function is executed when the component unmounts or before the next time the effect runs (due to a change in dependencies). By setting `ignore` to `true`, you signal that any state updates that occur after this point should be ignored, preventing potential memory leaks or errors from trying to update the state of an unmounted component. 5. **Error Handling**: Similarly, in the `catch` block, you check if `ignore` is `false` before updating the state with error information. This ensures that error state updates are also ignored if the component has been unmounted or if a new operation has started. In summary, the `ignore` variable is a safeguard to prevent state updates that could lead to errors or memory leaks, especially in asynchronous operations within a React component.
import {
  createContext,
  memo,
  useCallback,
  useContext,
  useEffect,
  useId,
  useLayoutEffect,
  useMemo,
  useReducer,
  useRef,
  useState,
  useSyncExternalStore,
} from 'react';
import './App.css';
import React from 'react';


export default function App() {
  const [countryCode, setCountryCode] = useState('EG');
  const [data, setData] = useState(null);
  const [isLoading, setIsLoading] = useState(true);
  const [error, setError] = useState(null);

  useEffe

keep fixed space between fixed element and normal element when resize the window

@include media-breakpoint-between(lg, xl) {
    #snapshot-details {
        right: calc((100% - rem-calc(870)) / 2);
    }
}

@include media-breakpoint-up(xl) {
    #snapshot-details {
        right: calc((100% - rem-calc(909)) / 2);
    }
}

testerafa

inicio{
"host":"C5B4A78BDD492E192B3B",
"porta":"85FF71FC49"
}fim

HTML Sitemap для WordPress

<!-- Pages -->
<h2>Страницы</h2>
			<ul>
				<?php
				wp_list_pages(array(
					'exclude' => '[199, 3, 1099]',
					'title_li' => '',
				)); ?>
			</ul>
		<?php endwhile; ?>
		<!-- End Pages -->

		<!-- Categories and Posts   -->
		<?php

		$category = get_taxonomy('category');

		// echo '<h2><a href="/' . $category->rewrite['slug'] . '/">' . $category->labels->name . '</a></h2>';

		$cats = get_categories('exclude=');
		foreach ($cats as $cat) {
			$cat_link = get_catego

Island Perimeter

/**
 * @param {number[][]} grid
 * @return {number}
 */
var islandPerimeter = function(grid) {
    // Initialize perimeter to 0
    var perimeter = 0;

    // Loop through each cell in the grid
    for (var i = 0; i < grid.length; i++) {
        for (var j = 0; j < grid[i].length; j++) {

            // If the cell is land (1)
            if (grid[i][j] === 1) {

                // Add 4 to the perimeter (assuming it's a standalone cell)
                perimeter += 4;

                // If the

Not Shipped Sales Orders

SELECT
  RTRIM(dbo.dttord.to_billpo) AS [Bill To PO],
  dbo.dttord.to_ordnum AS [Sales Order Number],
  dbo.dttord.to_dueship AS [MRP Date],
  RTRIM(dbo.dmbill.bi_name) AS [Bill To],
  RTRIM(dbo.dmship.sh_name) AS [Ship To],
  dbo.dttord.to_totdue AS Amount,
  dbo.dmbill.bi_id,
  dbo.dmship.sh_id,
  RTRIM(dbo.dmship.sh_state) AS [Ship To State]
FROM
  dbo.dttord
  INNER JOIN dbo.dmbill ON dbo.dmbill.bi_id = dbo.dttord.to_biid
  INNER JOIN dbo.dmship ON dbo.dmship.sh_id = dbo.dttord.

Slurm test script

#!/bin/bash

#SBATCH --job-name=boops 
#SBATCH --partition=walkerpass
#SBATCH --ntasks=1                       
#SBATCH --cpus-per-task=30               
#SBATCH --mem=170G                       
#SBATCH --time=00:05:00                  
#SBATCH --output=%j_job.out         
#SBATCH --error=%j_job.err          

# Optional: Load modules if needed
# module load some_module

# A simple test command 
hostname
echo "This job ran on $(hostname) at $(date)" 

管理画面 h1テキストをロゴ画像に差し替え

// =====================================================
// h1テキストをロゴ画像に差し替え
// =====================================================
window.addEventListener("DOMContentLoaded", () => {
	const siteName = document.querySelector("body.index-php #wp-admin-bar-site-name .ab-item");
	if (siteName) {
		const h1 = document.querySelector("h1");
		const domainUrl = window.location.origin;
		const logoImg = document.createElement("img");
		logoImg.src = `${domainUrl}/wp-content/themes/theme/asset

管理画面 投稿タイトル「ブロックエディター」「クラシックエディター」の表記削除

// =====================================================
// 管理画面 投稿タイトル「ブロックエディター」「クラシックエディター」の表記削除
// =====================================================
const myPostTitles = document.querySelectorAll(".wp-list-table  .column-title.page-title > strong");
myPostTitles.forEach((element) => {
	// <strong> タグ内の <a> タグを取得
	const aTag = element.querySelector("a.row-title");
	// <a> タグが存在する場合
	if (aTag) {
		console.log(aTag.outerHTML);
		element.innerHTML = aTag.outerHTML;
	}
});