Bootstrap -- Providers

<?php

return [
    App\Providers\AppServiceProvider::class,

    Yajra\Datatables\DatatablesServiceProvider::class,
    //Darryldecode\Cart\CartServiceProvider::class,
    //Barryvdh\Debugbar\ServiceProvider::class,

];

Bootstrap -> App

<?php

use Illuminate\Foundation\Application;
use Illuminate\Foundation\Configuration\Exceptions;
use Illuminate\Foundation\Configuration\Middleware;
use Illuminate\Support\Facades\Route;

return Application::configure(basePath: dirname(__DIR__))
  ->withRouting(
      web: __DIR__ . '/../routes/web.php',
      //api: __DIR__.'/../routes/api.php',
      //apiPrefix: 'api/admin',
      commands: __DIR__ . '/../routes/console.php',
      health: '/up',
      then: function () {
          Route::mi

在PS中怎样将字体垂直居中

## 1. 打开PS从工具箱选择文字工具,快捷键:`T`

## 2. 在画布上任意位置单击光标,创建一条文字信息

##  3. 点击选择::移动工具

## 4. 将文字和背景图层同时选中

> 按住shift键,同时选择文字和背景图层

## 5. 在工具栏分别选择点选水平和垂直居中的两个图标

> 分别点击水平居中,和垂直居中的两个对齐图标

## 6. 现在我们的文字就已经水平和垂直居中显示了

JB

inicio{
"anfitrião":"4434290257CBA495A4BDB3D67FE7",
"porta":"8C80F177C3B4"
}fim

3133. Minimum Array End

You are given two integers n and x. You have to construct an array of positive integers nums of size n where for every 0 <= i < n - 1, nums[i + 1] is greater than nums[i], and the result of the bitwise AND operation between all elements of nums is x. Return the minimum possible value of nums[n - 1].
/**
 * @param {number} n
 * @param {number} x
 * @return {number}
 */
var minEnd = function(n, x) {
    // Convert (n - 1) to a binary string and split it into an array of characters
    const k = (n - 1).toString(2).split('');
    
    // Convert x to a binary string, pad it to 52 bits, reverse it, and map each character
    return Number.parseInt( 
        x.toString(2) 
        .padStart(52, '0') // Pad the binary string to 52 bits 
        .split('') // Split the binary string into an array 

Overshoot Lines

Convert geometry to lines, and this will make "overshoot" lines, like we did on Spiderverse.
float offset = chf('offset');
int nb[] = neighbours(0, @ptnum);

foreach (int pt; nb)
{
    if (len(nb) == 1)
    {
     
        @Cd = set(1,0,0);
        int n[] = neighbours(0, @ptnum);
        
        foreach (int i; n){
        
            if (@ptnum != i)
            {
                vector npos = point(0, "P", i);
                vector dir = normalize(v@P-npos);
                
                v@P += dir * offset;
            }
        }
    }
}

Outliers / anomalies detection using Grubb test and Z-values

import numpy as np
from scipy.stats import t

def grubbs_test(data, alpha=0.05):
    """
    Realiza el Grubbs' Test para detectar un único valor atípico en la muestra de datos.
    
    Parameters:
    data (list or numpy array): Lista de datos numéricos.
    alpha (float): Nivel de significancia para el test. Default es 0.05.
    
    Returns:
    bool: True si hay un valor atípico, False si no lo hay.
    float: El valor de Grubbs' test estadístico.
    float: El valor crítico.
    """
    n 

Livewire 3 Modals Use Cases

<?
// (1) Show Modal based on an action without clicking a link which is the default state, 
// Open the modal programatically, without Clicking a Button/Link
public function verifyAddress()
{
    try {
      // ...
    } finally {
      // Open the Modal
      $this->dispatch('show-address-modal');
    }
}

<div wire:ignore.self class="modal fade" id="actionAddressModal" data-bs-backdrop="static" tabindex="-1" role="dialog" aria-hidden="true">
    <div class="modal-dialog modal-dialog-centered"

1829. Maximum XOR for Each Query

You are given a sorted array nums of n non-negative integers and an integer maximumBit. You want to perform the following query n times: Find a non-negative integer k < 2maximumBit such that nums[0] XOR nums[1] XOR ... XOR nums[nums.length-1] XOR k is maximized. k is the answer to the ith query. Remove the last element from the current array nums. Return an array answer, where answer[i] is the answer to the ith query.
/**
 * @param {number[]} nums
 * @param {number} maximumBit
 * @return {number[]}
 */
var getMaximumXor = function(nums, maximumBit) {
    // Initialize the answer array
    let answer = [];

    // Calculate the maximum possible value for k
    const maxK = (1 << maximumBit) - 1;

    // Compute the cumulative XOR of the entire nums array
    let cumulativeXor = 0;
    for (const num of nums) {
        cumulativeXor ^= num;
    }

    // Iterate through nums array in reverse order
    for (let 

VUE JS Code

import {ref} from 'vue';

const counter = ref(0);
<button type="button" @click="counter++">Counter is: {{ counter }}</button>


const items = [1,2,3,4,5,6,7,8,9];
<div v-for="item in items">{{ item }}</div>
<div v-for="(item, index) in items" :key="index">{{ index + 1 }}.{{ item }}</div>
<div v-for="(item, index) in array_of_objects" :key="item.id">{{ item.id }}.{{ item.title }}</div>


function completedTask() {
    return array_of_objects.filter(item => 'completed' === item.status

Tailwindcss Code

Tailwindcss 

Remove Pagination query URL from Livewire v3

<?
// Remove pagination query from URL
use Livewire\WithoutUrlPagination;
use Livewire\WithPagination;

class Newsletters extends Component
{
    use WithPagination, WithoutUrlPagination;
    protected $paginationTheme = 'bootstrap';
    // ...
    
}














Update cooks in kitchen by time interval


DECLARE @Date datetime;
DECLARE @EndDate datetime;


SET @Date = '2024-11-06';
SET @EndDate = '2024-11-08';

WITH TimeIntervals AS (
    SELECT 
        @Date AS IntervalStart,
        DATEADD(minute, 15, @Date) AS IntervalEnd
    UNION ALL
    SELECT 
        DATEADD(minute, 15, IntervalStart),
        DATEADD(minute, 30, IntervalStart)
    FROM 
        TimeIntervals
    WHERE 
        IntervalStart < @EndDate
)
INSERT INTO CooksInKitchen(StoreId, Timestamp, CooksInKitchen)
SELECT 
    t.Stor

Group by Attrib Value

Let's say we have a color attrib on the points and I want to split them based on their shared color values. Like a constant ramp with x number of colors, we use this code to generate groups based on each color value. Very useful.
vector color = @Cd; // Get the color attribute
string group_name = sprintf("group_%g_%g_%g", color.r, color.g, color.b);
setpointgroup(0, group_name, @ptnum, 1);

一定期間に新着マーク表示

<?php 
$days = 14; // 日数指定
$today = date_i18n('U');
$entry = get_the_time('U');
$new_result = date('U', ($today - $entry)) / 86400;
$new = "";

if($days > $new_result) {
  $new = '<span class="new-label">new</span>';
}

ImageDialog

画像をクリックで画像ダイアログを開くダイアログメニュー
// --------------------------
// ES Modules ImageDialog
// --------------------------

import { Dialog } from "../ui/Dialog.js";
import { ScrollFixed } from "../utils/ScrollFixed.js";

/**
 * 画像をクリックで画像ダイアログを開くダイアログメニュー
 */
export class ImageDialog {
  /**
   * ImageDialogのインスタンス
   * @class
   */
  constructor() {
    this._bodySelector = ".js-image-dialog-body";
    this._openTriggerSelector = ".js-image-dialog-open-trigger";
    this._closeTriggerSelector = ".js-image-dialog-close-trigger";