class Solution {
public List<List<String>> groupAnagrams(String[] strs) {
List<List<String>> groups = new ArrayList<>();
Map<String, List<String>> map = new HashMap<>();
for(int i = 0; i < strs.length; i++) {
String sortedKeyString = sortString(strs[i]);
if (map.containsKey(sortedKeyString)) {
map.get(sortedKeyString).add(strs[i]);
} else {
List<String> newGroup = new ArrayList<>();
/**
* @param {string} s
* @param {number} k
* @param {character} fill
* @return {string[]}
*/
var divideString = function(s, k, fill) {
const result = [];
// Loop through the string in increments of k
for (let i = 0; i < s.length; i += k) {
// Get a substring of length k starting from index i
let group = s.slice(i, i + k);
// If the group is shorter than k, pad it with the fill character
if (group.length < k) {
group = group.padEnd(k
// https://medium.com/@genildocs/mastering-object-oriented-programming-in-javascript-from-zero-to-hero-c718c3182eba
// Mixin for logging functionality
const LoggerMixin = {
log(message) {
console.log(`[${this.constructor.name}] ${message}`);
},
logError(error) {
console.error(`[${this.constructor.name}] ERROR: ${error}`);
}
};
// Mixin for validation
const ValidatorMixin = {
validate(data, rules) {
for (const [field, rule] of Object.entries(rules)) {
class Solution {
public static List<Integer> spiralOrder(int[][] mat) {
List<Integer> result = new ArrayList<Integer>();
int n = mat.length;
int m = mat[0].length;
int top = 0;
int left = 0;
int right = m - 1;
int bottom = n - 1;
while (top <= bottom && left <= right) {
// Traverse right
for (int i = left; i <= right; i++) {
result.add(mat[top][i]);
}
/**
* Returns the minimum number of deletions required to make the string k-special.
* A string is k-special if the difference between the frequencies of any two characters
* is at most k.
*
* @param {string} word - The input string.
* @param {number} k - The allowed max difference between frequencies.
* @return {number} - The minimum deletions needed.
*/
var minimumDeletions = function(word, k) {
const freq = new Array(26).fill(0); // Frequency array for lowercase a-z.
for (le
class Solution {
public List<List<String>> groupAnagrams(String[] strs) {
List<List<String>> groups = new ArrayList<>();
Map<String, List<String>> map = new HashMap<>();
for(int i = 0; i < strs.length; i++) {
String sortedKeyString = sortString(strs[i]);
if (map.containsKey(sortedKeyString)) {
map.get(sortedKeyString).add(strs[i]);
} else {
List<String> newGroup = new ArrayList<>();
### Matar procesos del chrome
En el VPS de los bots de JM
```bash
pkill -f chrome
```
### Correr Bun
```bash
bun src/bot.ts
```
### Revisar memoria y procesos
```bash
top
```
<template>
<TheBase :state="state" />
</template>
<script setup>
import { ref } from 'vue'
import TheBase from './TheBase.vue'
const state = ref(111)
setTimeout(() => {
state.value = 222
}, 2000)
</script>
CREATE OR REPLACE FUNCTION fn_get_blob_dblink(
I_DBLINK VARCHAR2,
I_TABELA VARCHAR2,
I_BLOB_COL VARCHAR2,
I_RID UROWID
) RETURN BLOB
IS
-- Autor: Hallan Christian
-- Função para buscar BLOB remotamente via DBLink em partes (chunks)
C_CHUNK_SIZE CONSTANT PLS_INTEGER := 2000;
V_CHUNK RAW(2000);
V_BLOB BLOB;
V_POS PLS_INTEGER := 1;
BEGIN
LOOP
EXECUTE IMMEDIATE
(
'SELECT DBMS_LOB.SUBSTR@' || I_DBLINK || '(' || I_BLOB
it has been good
it has gone well
it has
the
build up
goes
E
1. If she hadn't worn high heels, she wouldn't have fallen down the stairs.
2. If we had known there was a dress code, we would have dressed up for the occasion.
3. If I had been into Nirvana, I would have loved the grunge style.
4. I would have looked trendy If I had bought the dress from a fancy shop.
5. I he had had a big enough wardrobe, there would have been enough space for the new suits.
6. If she hadn't quit h
/**
* 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,