moderine urls

stage: 'https://hsapiservice.quinstage.com/ping-post-encoded-consent/pings/{pingToken}/consent-searches'

prod: 'https://form-service-hs.qnst.com/ping-post-encoded-consent/pings/{pingToken}/consent-searches’

TEC-Tickets > Redirect to 404 if /tickets-order/ is directly accessed without an ID

TEC - Tickets snippet to prevent a PHP Fatal Error when a bot or visitor goes directly to ~/tickets-order/ without including the TC Order ID:  ~/tickets-order/?tc-order-id=32971
function tec_custom_redirect(){
$page  = $_SERVER['REQUEST_URI'];

	if($page === '/tickets-order/' && empty($_GET)){
		wp_redirect('/404');
		exit;
	}
}
add_action('init', 'tec_custom_redirect');

custom.scss (bookzo version)

Samenvatting van de SCSS-code Deze SCSS-code definieert en past stijlen toe op basis van verschillende breekpunten die overeenkomen met de UIkit/Yootheme-standaarden. De code importeert specifieke stijlen voor elk breekpunt en zorgt ervoor dat de juiste stijlen worden toegepast afhankelijk van de schermgrootte. Belangrijkste onderdelen: Mixin breakpoint-styles: Definieert een mixin die inhoud (@content) insluit op basis van het opgegeven breekpunt ($breakpoint). Ondersteunt de breekpunten: s, m, l, xl, en xxl. Import van basisstijlen: Importeert de basisstijlen vanuit index. Breekpunten en media queries: Definieert media queries voor verschillende schermgroottes en importeert de bijbehorende stijlen voor elk breekpunt. Wat de code doet: Mixin breakpoint-styles: Biedt een manier om inhoud conditioneel in te sluiten op basis van het opgegeven breekpunt. Basisstijlen: Importeert de basisstijlen vanuit index. Media queries: Definieert media queries voor verschillende schermgroottes en importeert de bijbehorende stijlen voor elk breekpunt. Stijlen importeren: Voor elk breekpunt worden specifieke stijlen geïmporteerd, inclusief extra stijlen vanuit de bookzo-styling map. Deze aanpak zorgt ervoor dat de juiste stijlen worden toegepast afhankelijk van de schermgrootte, wat helpt bij het creëren van een responsieve en consistente gebruikerservaring.
// Define the breakpoint-styles mixin
@mixin breakpoint-styles($breakpoint) {
    @if $breakpoint=='s' {
        @content;
    }

    @else if $breakpoint=='m' {
        @content;
    }

    @else if $breakpoint=='l' {
        @content;
    }

    @else if $breakpoint=='xl' {
        @content;
    }
}

@import 'index';

// UIkit/Yootheme breakpoints
// s: up to 639px
// m: 640px to 959px
// l: 960px to 1199px
// xl: 1200px to 1599px
// xxl: 1600px and above

// Apply styles for s breakpoint (up 

machine learning chatboot

Étape 1 : Activer ton environnement virtuel

Lorsque tu redémarres ton ordinateur, tu dois d'abord réactiver ton environnement virtuel dans lequel tu as installé toutes les dépendances comme TensorFlow et Flask.

Si tu es dans le dossier de ton projet (par exemple ~/mon_chatbot), exécute la commande suivante pour activer ton environnement virtuel :

source venv/bin/activate


Étape 2 : Vérifier que les fichiers et modèles sont présents

Assure-toi que les fichiers suivants existent bien dans ton

Compile FPLEXPART (-WRF)

# FLEXPART only

## Compile:  
>  cd src  
make -j -f makefile_gfortran

## Pre-job:   
.bashrc, 
> export CPATH=/usr/lib64/gfortran/modules  
  export LIBRARY_PATH=/usr/lib64
  
## Packages needed:
>  sudo dnf install eccodes netcdf  
   sudo dnf install jasper  
  sudo dnf install jasper-libs-2.0.28-3.el9.i686  
   sudo dnf install jasper-utils-2.0.28-3.el9.x86_64  
   sudo dnf install automake  
   sudo dnf install m4  
   sudo dnf install perl  
   sudo dnf install eccodes-devel-2.36.0-1.el9

Javascript Fecth from API example

Javascript Fecth from API example
/*
 * 1. Valid syntax
 */

// Basic Syntax
fetch("https://jsonplaceholder.typicode.com/posts")
  .then(function (response) {
    // The API call was successful!
    console.log(response)
  })
  .catch(function (error) {
    // There was an error
    console.warn(error)
  })

// Getting JSON
fetch("https://jsonplaceholder.typicode.com/posts")
  .then(function (response) {
    // The API call was successful!
    return response.json()
  })
  .then(function (data) {
    // This is the JSON from our

🛠️ Google Drive - Dowload a file

import re
from tqdm import tqdm  # 🚧 Work in progress
import urllib.request


def download_from_drive(url_link: str, filename:str) -> None:
  """
  Convenient function to download a file from Google Drive
  
  Args:
    url_link (str): the download url provided by Google Drive's UI
    filename (str): the desired name you want for your file
    
  Returns:
    None: it only downloads the file to the current directory
  """
  # Build the file's direct download link
  ID_PATTERN =

Houdini Python HDA - Color

OnCreated, run this to change the node to desired color "when created"
import hou

def set_color():
    node = kwargs['node']
    
    color = hou.Color((0.45, .8, .9))
    node.setColor(color)
    
set_color()

Assertion / Casting

// Casting = přetypování v TS nelze
// Asserce je explicitni určený typu


let x: unknown;
x = [];

// 1
let result = (x as number[]).push(111);

// 2
let result = (<number[]>x).push(111);

2583. Kth Largest Sum in a Binary Tree

You are given the root of a binary tree and a positive integer k. The level sum in the tree is the sum of the values of the nodes that are on the same level. Return the kth largest level sum in the tree (not necessarily distinct). If there are fewer than k levels in the tree, return -1. Note that two nodes are on the same level if they have the same distance from the root.
/**
 * 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
 * @param {number} k
 * @return {number}
 */
class TreeNode {
  constructor(val = 0, left = null, right = null) {
    this.val = val;
    this.left = left;
    this.right = right;
  }
}

function kthLargestLevelSum(root, k) {

pinelabs one web

const { viewType } = useSelector((state) => state.globals);
const isMobile = viewType === VIEW_TYPE.MOBILE;

const appliedTransactionFilters = useSelector(
  (state) => state.transaction.appliedTransactionFilters
);
const transactionFlags = useSelector(
  (state) => state.transaction.transactionFlags
);
const paymentModes = useSelector(
  (state) => state.transaction.appliedTransactionFilters.paymentModes
);
const paymentModesFilter = useSelector(
  (state) => state.transaction.transactionFilter

cssだけで自動インクリメント(カウンター)

<div class="hoge">
  <p class="count"></p>
  <p class="count"></p>
  <p class="count"></p>
</div>
<div class="fuga">
  <p class="count"></p>
  <p class="count"></p>
  <p class="count"></p>
</div>

一文字ずつ囲む

function wrapCharsWithSpan(targetSelector) {
        var $target = $(targetSelector);
        if (!$target.length) return;
      
        var html = $target.html();
      
        var wrappedText = html.replace(/(<br\s*\/?>|\S|\s)/g, function(match, char) {
          if (char.match(/<br\s*\/?>/)) { return char; }
          else { return '<span>' + char + '</span>'; }
        });
      
        $target.html(wrappedText);
      }

1593. Split a String Into the Max Number of Unique Substrings

Given a string s, return the maximum number of unique substrings that the given string can be split into. You can split string s into any list of non-empty substrings, where the concatenation of the substrings forms the original string. However, you must split the substrings such that all of them are unique. A substring is a contiguous sequence of characters within a string.
/**
 * @param {string} s
 * @return {number}
 */
var maxUniqueSplit = function(s) {
    // Helper function to perform backtracking
    function backtrack(start, uniqueSubstrings) {
        if (start === s.length) {
            return uniqueSubstrings.size; // Return the size of the set if we've reached the end of the string
        }

        let maxCount = 0;

        for (let end = start + 1; end <= s.length; end++) {
            let substring = s.slice(start, end);
            if (!uniqueSubs

redshift_introduction

https://www.redshift-observatory.ch/white_papers/downloads/introduction_to_the_fundamentals_of_amazon_redshift.pdf

asd

public ImportReturnModel UploadMedia(ImportReturnModel itMedia, SyncTransferSettings ssSettings, ImportRequest iRequest, List<ITAsset> sourceItAssets)
{
    var statusProgressValue = 1;
    try
    {
        var mergedMedia = GetMediaToRetry(itMedia);

        if ((mergedMedia == null) || (mergedMedia.Count <= 0))
        {
            itMedia.Results.Messages.Add($"No media found to upload.");
            return itMedia;
        }

        var mediaPathModel = MediaLogic.MediaLogic