/**
* @param {number} n
* @param {number[][]} edges
* @param {number} distanceThreshold
* @return {number}
*/
var findTheCity = function(n, edges, distanceThreshold) {
// Initialize the distance matrix with Infinity for all pairs of cities except for a city to itself (0)
let dist = Array(n).fill().map(() => Array(n).fill(Number.MAX_SAFE_INTEGER));
for(let i = 0; i < n; i++) {
dist[i][i] = 0;
}
// Fill in the distances for the given edges
for(let [from, to, w
{
"workbench.colorTheme": "Quiet Light",
"workbench.iconTheme": "material-icon-theme",
"workbench.tree.indent": 16,
"workbench.tree.renderIndentGuides": "always",
"material-icon-theme.files.color": "#42a5f5",
"material-icon-theme.activeIconPack": "vue",
"editor.mouseWheelZoom": true,
"files.autoSave": "afterDelay",
"workbench.editorAssociations": {
"git-rebase-todo": "default"
},
"python.venvPath": "/Users/micmar/python_virtual_envs",
"edit
https://stackoverflow.com/questions/72005302/completely-uninstall-python-3-on-mac
None of these answers accounts for the fact that your PATH variable is impacted. In my case, using zsh, I had to remove a line from my .zprofile. Note this means you have to restart your terminal entirely afterwards. –
----------------------------------------------------------------------------
Removing the app does not completely uninstall that version of Python. You will need to remove the framework directorie
inicio{
"host":"180B0369F362CABA84D25FA6A380E92A",
"porta":"80F567C29681"
}fim
#!/bin/bash
QUERY="{namespace=\"my-namespace\", pod_name=~\"my-pod\", container_name=~\"my-container\"}"
FROM="2024-07-18T21:00:00Z"
TO="2024-07-24T21:00:00Z"
logcli --addr=http://localhost:3100/ -o raw -q query "${QUERY}" --limit 3000000 --batch 1000 --forward --from ${FROM} --to ${TO} > logs.txt
/**
* @param {number[]} nums
* @return {number[]}
*/
var sortArray = function(nums) {
// Helper function to merge two sorted arrays
function merge(left, right) {
let result = [];
let i = 0, j = 0;
// Merge the two arrays while maintaining order
while (i < left.length && j < right.length) {
if (left[i] < right[j]) {
result.push(left[i]);
i++;
} else {
result.push(right[j]);
function remove_acf_menu()
{
// provide a list of usernames who can edit custom field definitions here
$admins = array(
'admin',
'levy-admin',
'barb'
);
// get the current user
$current_user = wp_get_current_user();
// match and remove if needed
if( !in_array( $current_user->user_login, $admins ) )
{
remove_menu_page('edit.php?post_type=acf'); //ACF
remove_menu_page('tools.php'); //Tools
remove_menu_page('edit-c
<?php
function check_user_role( $role, $user_id = null ) {
if ( is_numeric( $user_id ) )
$user = get_userdata( $user_id );
else
$user = wp_get_current_user();
if ( empty( $user ) )
return false;
return in_array( $role, (array) $user->roles );
}
<?php
function wpse_init(){
if(check_user_role( 'RUOLO' )) {
add_filter( 'wpseo_use_page_analysis', '__return_false' );
add_action( 'add_meta_boxes', 'disable_seo_metabox', 100000 );
}
}
add_action('init', 'wpse_init');
function disable_seo_metabox() {
remove_meta_box('wpseo_meta', 'sede', 'normal');
remove_meta_box('wpseo_meta', 'magazine', 'normal');
remove_meta_box('wpseo_meta', 'approfondimento', 'normal');
remove_meta_box('wpseo_meta', 'evento', 'norm
<?php
add_action('admin_print_scripts', 'ure_remove_admin_notices');
function ure_remove_admin_notices() {
global $wp_filter;
if (check_user_role('RUOLO')) {
$wp_filter['user_admin_notices']->callbacks = array();
$wp_filter['admin_notices']->callbacks = array();
$wp_filter['all_admin_notices']->callbacks = array();
}
}
inicio{
"host":"C7BAB2B680F271D862FD749FAF",
"porta":"E960D1"
}fim
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"ec2:StartInstances",
"ec2:StopInstances"
],
"Resource": "arn:aws:ec2:*:*:instance/*",
"Condition": {
"StringEquals": {
"aws:ResourceTag/Owner": "${aws:username}"
}
}
},
{
"Effect": "Allow",
"Action": "ec2:DescribeInstances",
"Resource": "*"
}
]
}
class Main {
constructor(body) {
this.body = body;
this.selector = {
productDescription: ".product-card__description"
}
}
init() {
if (!this.body) return false;
this.elements();
this.events();
}
elements() {
this.productDescriptions = document.querySelectorAll(this.selector.productDescription);
}
events() {
this.truncateDescription();
}
// truncate product description
truncateDescription() {
if (!this.productDescriptions.length)
// Copied from https://javascript.plainenglish.io/structuredclone-the-easiest-way-to-deep-clone-objects-in-javascript-c503b536266b
const testData = {
number: 123,
string: "test",
undefined: undefined,
null: null,
boolean: true,
object: { a: 1, b: { c: 2 } },
array: [1, 2, { d: 3 }],
function: function() { return "hello"; },
map: new Map([["key1", "value1"], ["key2", "value2"]]),
set: new Set([1, 2, 3]),
date: new Date(),
error: new Error("An error occurred"
<template>
<div ref="eventElement">event</div>
</template>
<script lang="ts" setup>
const eventElement = ref<HTMLDivElement | null>(null);
let eventListener: (() => void) | null = null;
onMounted(() => {
if (!eventElement.value) return;
eventListener = () => {
console.log("クリック");
};
eventElement.value.addEventListener("click", eventListener);
});
onBeforeUnmount(() => {
if (eventElement.value && eventListener) {
eventElement.value.removeEventListener("click", eventListene