/**
* Calculates the maximum Manhattan distance from the origin
* that can be achieved while moving in a grid, with the option
* to change up to 'k' directions.
*
* @param {string} s - String of movement directions: 'N', 'S', 'E', 'W'.
* @param {number} k - Number of allowed direction changes.
* @return {number} - Maximum distance from the origin at any point.
*/
var maxDistance = function(s, k) {
let x = 0, y = 0; // Current coordinates on the grid
let maxDist = 0;
import { NextResponse } from 'next/server'
import { createClient } from '@supabase/supabase-js'
const supabaseAdmin = createClient(
process.env.NEXT_PUBLIC_SUPABASE_URL!,
process.env.SUPABASE_SERVICE_ROLE_KEY! // ⚠️ Service role key uniquement côté serveur
)
export async function POST(req: Request) {
try {
const body = await req.json()
const { userId, role, firstName, lastName } = body
if (!userId || !role) {
return NextResponse.json({ error: "userId et role sont requi
# pause and allow the selection between continue or stop
while True:
answer = input("Would you like to continue (C) or stop (S)? ").strip().lower()
if answer == 'c':
print("Continue...")
break
elif answer == 's':
print("Stop.")
exit()
else:
print("Not allowed answer.")
kafka:
https://learn.conduktor.io/kafka/kafka-topics/
pretzel (python, api)
https://www.pretzellogix.net/2021/12/08/step-1-read-the-docs-and-use-postman-to-understand-the-rest-api/
<script>
// make sure to import your icon CDN script first
// Services icon swap (this is a quick way to replace system icons with FontAwesome icons
jQuery('.products-services[about*="/tax-planning"] .thumbnail').empty().append('<i class="fa-solid fa-sharp icon-4x text-center fa-pie-chart"></i>');
jQuery('.products-services[about*="/products-services/retirement-planning"] .thumbnail').empty().append('<i class="fa-solid fa-sharp icon-4x text-center fa-compass"></i>');
/* @import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&display=swap');
:root {
--h1-font-family: "DM Sans", sans-serif;
--h2-font-family: "DM Sans", sans-serif;
--h3-font-family: "DM Sans", sans-serif;
--h4-font-family: "DM Sans", sans-serif;
--body-font-family: "DM Sans", sans-serif;
--link-font-family: "DM Sans", sans-serif;
--button-font-family: "DM Sans", sans-serif;
} */
h1, .h1, h2, .h2, h3, .h3, h4, .h4, h5, .h5,
const handleAccordionToggle = (accordions) => {
accordions.forEach((accordion) => {
accordion.addEventListener("toggle", () => {
if (accordion.open) {
accordions.forEach((otherAccordion) => {
if (otherAccordion !== accordion && otherAccordion.open) {
otherAccordion.open = false;
}
});
}
});
});
};
/**
*************************************************************************
* WORDPRESS - Show in the admin bar the main PHP template file, used template parts, PHP version, query count and page load time
*************************************************************************
*/
// Store the actual template being used
global $current_template_file;
add_filter('template_include', function($template) {
global $current_template_file;
$current_template_file = $template;
return $
$example = get_field( 'example' );
echo wp_kses( $example, array(
'b' => array(),
'br' => array(),
'strong' => array(),
'em' => array(),
'h1' => array(),
'h2' => array(),
'h3' => array(),
'h4' => array(),
'h5' => array(),
'h6' => array(),
'p' => array(),
) );
ng add @angular/material
const data = require('./snaphots.json');
const fs = require('fs');
const boo = data.map(({date, fundsExchanges, funds, notionalCcy, additionalFunds}) => {
return {
date,
notionalCcy,
fundsExchanges,
additionalFunds,
funds: funds.map(({ id, prices, createdAt, updatedAt, ltv, liqPx, ...other}) => {
return {
...other,
ltv: ltv || undefined,
liqPx: liqPx || undefined,
type: "manual",
prices: prices.map(({id, createdA
nmcli device status
mitmproxy --mode transparent --showhost --allow-hosts sessions.ggn.live:6125
header#top {
@include respond-to(only-xl) {
@for $i from 50 through 70 {
@if $i >= 50 and $i <= 54 {
&[data-carcount="#{$i}"] {
nav.header-nav {
--fontsize-main-menu-item: 1.4rem;
--p-x-main-item: 1.4rem;
form.search-form input[type="text"] {
max-width: 20rem;
}
}
.logo svg {
width: 19rem;
}
}
} @else if $i >= 55 and $i <= 59 {
&[data-carcount="#{$i}"] {
nav.header-nav {
--fontsize-main-menu-item: 1.4rem;
// timeDifference(t1:time, t2:time):time
// timeDifferenceAsString(t1:time, t2:time):string
public LocalTime timeDifference(LocalTime t1, LocalTime t2){
long totalSeconds = ChronoUnit.SECONDS.between(t1, t2);
long hours = totalSeconds / 3600;
long minutes = (totalSeconds % 3600) / 60;
long seconds = totalSeconds % 60;
String td = String.format("%02d:%02d:%02d",
hours, minutes, seconds);
return LocalTime.parse(td);
}
public String
pretzel logic website:
https://www.pretzellogix.net/2021/12/08/step-1-read-the-docs-and-use-postman-to-understand-the-rest-api/