2503. Maximum Number of Points From Grid Queries

You are given an m x n integer matrix grid and an array queries of size k. Find an array answer of size k such that for each integer queries[i] you start in the top left cell of the matrix and repeat the following process: If queries[i] is strictly greater than the value of the current cell that you are in, then you get one point if it is your first time visiting this cell, and you can move to any adjacent cell in all 4 directions: up, down, left, and right. Otherwise, you do not get any points, and you end this process. After the process, answer[i] is the maximum number of points you can get. Note that for each query you are allowed to visit the same cell multiple times. Return the resulting array answer.
/**
 * @param {number[][]} grid
 * @param {number[]} queries
 * @return {number[]}
 */
// Main function to compute maximum points for each query
var maxPoints = function(grid, queries) {
  let m = grid.length, n = grid[0].length;

  // Store all grid cells as coordinates with their values
  let coords = [];
  for (let i = 0; i < m; i++) {
    for (let j = 0; j < n; j++) {
      coords.push([i, j, grid[i][j]]); // Format: [row, col, value]
    }
  }

  // Sort coordinates by cell value in ascendi

Emoticon and icons

✅ Check (Éxito/Verificación)
🔒 Seguridad (Candado/Cifrado/Protección)
❌ Error (Error/Prohibido/Fallo)
⚠️ Warning (Advertencia/Precaución/Riesgo)
ℹ️ Info (Información/Aviso/Detalles)
🚫 Prohibido (Acceso Denegado/Restricción)
⏳ Cargando (Procesando/Espere/Espera)
🔔 Notificación (Alerta/Recordatorio)
📧 Correo (Mensaje/Email/Comunicación)
📢 Anuncio (Broadcast/Alerta Pública/Notificación Masiva)
🔄 Actualizar (Recargar/Refrescar/Reiniciar)
👁️ Vista (Visualizar/Previsualizar/Inspeccionar)
🛑 Detenido (P

conect

meriona

Get event date format (date start / date end)

class Sevanova_Event {
	// Get event date format
	public static function get_date_format( $event_id = null ) {
		if ( is_null( $event_id ) ) {
			return false;
		}

		$event_date_start = get_field( 'event_date_start', $event_id );
		if ( ! $event_date_start ) {
			return false;
		}

		$event_date_end = get_field( 'event_date_end', $event_id );

		$date_label = '';

		if ( ! $event_date_end ) {
			$date_label = date_i18n( 'j	F Y', strtotime( $event_date_start ) );
		} else {
		

inputにアップロードされたファイル名を表示・削除

<label for="file-input">
  <span>ファイルを選択</span>
  <input type="file" id="file-input" multiple />
</label>
<ul id="file-list"></ul>

Object Polymorphism with Funcs

// You have a method that returns a list of strings i.e.Func<List<string>> 
public List<string> ReturnStringList() => new List<string> { "Bob", "Nancy", "Bill", "Evan" };

// Create a class with a member signature Func<List<string>>
public class MyFuncClass
    {
        public Func<List<string>> MyFunc { get; set; }
    }
    
// Assign the method to the func
var myClass = new MyFuncClass { MyFunc = () => ReturnStringList() };
// or 
myClass.MyFunc = ReturnStringList;

// Call the func
var list

2780. Minimum Index of a Valid Split

An element x of an integer array arr of length m is dominant if more than half the elements of arr have a value of x. You are given a 0-indexed integer array nums of length n with one dominant element. You can split nums at an index i into two arrays nums[0, ..., i] and nums[i + 1, ..., n - 1], but the split is only valid if: 0 <= i < n - 1 nums[0, ..., i], and nums[i + 1, ..., n - 1] have the same dominant element. Here, nums[i, ..., j] denotes the subarray of nums starting at index i and ending at index j, both ends being inclusive. Particularly, if j < i then nums[i, ..., j] denotes an empty subarray. Return the minimum index of a valid split. If no valid split exists, return -1.
/**
 * Finds the minimum index to split the array such that both subarrays
 * have the same dominant element.
 * 
 * @param {number[]} nums - The input array of integers.
 * @return {number} - The minimum index of a valid split, or -1 if no valid split exists.
 */
var minimumIndex = function(nums) {
    const n = nums.length;

    // Step 1: Identify the dominant element in the array.
    // The "dominant" element is the one that appears more than half the time.
    let dominant = 0; // Candidat

5 Responsive Layouts (KP)

/* https://codepen.io/kevinpowell/full/vYvEdWG */


.cluster {
  outline: 5px solid hotpink;
  padding: 1rem;

  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.flexible-grid {
  outline: 5px solid hotpink;
  padding: 1rem;

  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.flexible-grid > * {
  flex: 1;
}

.auto-grid {
  outline: 5px solid hotpink;
  padding: 1rem;

  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(10rem, 100%), 1fr));
}

.reel {
  outline

Shopify Partners Slack

rechargepartners.slack.com
shopifypartners.slack.com

Save and Uninstall Python Requirements

Save the current Python environment's requirements and uninstall them
pip freeze > requirements.txt && pip uninstall -r requirements.txt -y

Custom columns admin list users

<?php
/*
 * Plugin name: Sevanova User
 * Description: See title
 * Author: Sevanova
 * Author URI: https://www.sevanova.com
 * Version: 1.0.0
 * Text Domain: sn-user
 */

class Sevanova_User {
	// Construct
	public function __construct() {
		add_action( 'manage_users_extra_tablenav', array( $this, 'sn_manage_filter_by' ), 20, 1 );
		add_action( 'pre_get_users', array( $this, 'sn_filter_query_by' ) );
		add_filter( 'manage_users_custom_column', array( $this, 'sn_content_custom_col

Useful functions

# countVowels(string):int
# countConsonants(string):int
# countCharacters(string word, string char):int
# isAnagram(string, string):boolean
# isPalindrome(string):boolean
# pyramid(int)

def countVowels(s):
    vowels = ['a', 'e', 'i', 'o', 'u']
    count = 0
    for char in s:
        if char in vowels:
            count += 1
    return count

def countConsonants(s):
    vowels = ['a', 'e', 'i', 'o', 'u']
    count = 0
    for char in s:
        if char not in vowels:
      

Angel

U/oDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEBAAA8PDwAAAqoAAD4AvgC+AIAAAAAAAALARwaPDw8AAD6rAAA9Vj4AvqsBxz44gAADAEAHjw8PAAABVQAAPqs+AL2rQcc+OIAAAwBAB48PDwFVP1WAAD1WPgC+qz44gccAAAMARwaPDw8AAACqgAA9Vj4AvatBxwHHAAADAEcGgAAAAAAAAD9VgAAAAAAAAAAAAAAAAwBAAA8PB4AAAAAAAD4AvgC9VgAAAAAAAARAQAqPDweAAAAAAAA+AL4AvVYAAAAAAAAEgEmBhQeCgAAAAAAAP1W/AH1WAAAAAAAABIBAB48PB4AAAAAAAD4AvgC9VgAAAAAAAARAQAqAAAANUgAAAAA/VbpW/6r+OIAAAAADAEAAAAAAMq4AAAAAAP/6VwBVPjiAAAAAAwBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAM

Promises

// https://medium.com/@hxu0407/master-these-8-promise-concurrency-control-techniques-to-significantly-improve-performance-5a1c199b6b3c


// 1. Promise.all: Execute in Parallel and Return Results Together
const promise1 = Promise.resolve(1);
const promise2 = Promise.resolve(2);
const promise3 = Promise.resolve(3);
Promise.all([promise1, promise2, promise3])
  .then(results => {
    console.log(results); // Output: [1, 2, 3]
  });
  
  
  
  
// 2. Promise.allSettled: Execute in Parallel and Retur

Email-Scraper-gig.user.js

// ==UserScript==
// @name         Email Scraper
// @namespace    http://tampermonkey.net/
// @version      0.2
// @description  Scrape emails across multiple pages and save to CSV
// @match        https://solicitors.lawsociety.org.uk/*
// @grant        GM_setValue
// @grant        GM_getValue
// @run-at       document-end
// @license MIT
// ==/UserScript==

// Install this in Tampermonkey by clicking [https://gist.githubusercontent.com/MarwanShehata/34acd0b3d2a4431cf8a93c9d3cdf2d41/raw/3050c898