proxyで料金表アプリ

<div>
  <section>
    <h3>コース</h3>
    <div>コースA (1000円) <input class="amount" type="number" name="course_a_xxx123" min="0" value="0" /></div>
    <div>コースB (2000円) <input class="amount" type="number" name="course_b_yyy456" min="0" value="0" /></div>
    <div>コースC (3000円) <input class="amount" type="number" name="course_c_zzz789" min="0" value="0" /></div>
  </section>
  <section>
    <h3>単品</h3>
    <div>フード1 (200円) <input class="amount" type="number" name="food_1_abc111" min="0" value="0" /></

extract. wpress

npx wpress-extract migration.wpress

Nuxt3 propsに初期値をつける

<script lang="ts" setup>
const props = withDefaults(
  defineProps<{
    orientation?: 'horizontal-left' | 'horizontal-right' | 'vertical-top' | 'vertical-bottom'
    duration?: number
  }>(),
  {
    orientation: 'horizontal-left',
    duration: 30,
  },
)
</script>

Dawn theme pubsub implementation

let subscribers = {};

function subscribe(eventName, callback) {
  if (subscribers[eventName] === undefined) {
    subscribers[eventName] = [];
  }

  subscribers[eventName] = [...subscribers[eventName], callback];

  return function unsubscribe() {
    subscribers[eventName] = subscribers[eventName].filter((cb) => {
      return cb !== callback;
    });
  };
}

function publish(eventName, data) {
  if (subscribers[eventName]) {
    subscribers[eventName].forEach((callback) => {
      callback(d

Binary Tree Right Side View

https://leetcode.com/problems/binary-tree-right-side-view/description/
/**
 * Definition for a binary tree node.
 * public class TreeNode {
 *     int val;
 *     TreeNode left;
 *     TreeNode right;
 *     TreeNode() {}
 *     TreeNode(int val) { this.val = val; }
 *     TreeNode(int val, TreeNode left, TreeNode right) {
 *         this.val = val;
 *         this.left = left;
 *         this.right = right;
 *     }
 * }
 */
 
class Solution {
    public List<Integer> rightSideView(TreeNode root) {
        List<Integer> output = new ArrayList<>()

Maximum Depth of Binary Tree

https://leetcode.com/problems/maximum-depth-of-binary-tree/
/**
 * Definition for a binary tree node.
 * public class TreeNode {
 *     int val;
 *     TreeNode left;
 *     TreeNode right;
 *     TreeNode() {}
 *     TreeNode(int val) { this.val = val; }
 *     TreeNode(int val, TreeNode left, TreeNode right) {
 *         this.val = val;
 *         this.left = left;
 *         this.right = right;
 *     }
 * }
 */
 
 class Solution {
     public int maxDepth(TreeNode root) {
         if (root == null) return 0;
         Queue<TreeNode

1800. Maximum Ascending Subarray Sum

Given an array of positive integers nums, return the maximum possible sum of an ascending subarray in nums. A subarray is defined as a contiguous sequence of numbers in an array. A subarray [numsl, numsl+1, ..., numsr-1, numsr] is ascending if for all i where l <= i < r, numsi < numsi+1. Note that a subarray of size 1 is ascending.
/**
 * @param {number[]} nums
 * @return {number}
 */
var maxAscendingSum = function(nums) {
    // Initialize maxSum with the first element of the array
    let maxSum = nums[0];
    // Initialize currentSum with the first element of the array
    let currentSum = nums[0];

    // Loop through the array starting from the second element
    for (let i = 1; i < nums.length; i++) {
        // Check if the current element is greater than the previous element
        if (nums[i] > nums[i - 1]) {
   

Opinionated code formatting

- **Print width:** 120

Add Browser Sync

```
npm i -D browser-sync concurrently
```

Copy as browser-sync.js in the theme root this code:

```js
const browserSync = require('browser-sync');

const siteUri = 'site.docksal.site'; // <--- Change this

browserSync({
  proxy: siteUri,
  host: siteUri,
  open: 'external',
  files: ['dist/js/**/*.js', 'dist/css/**/*.css'], // <--- Change this
});

```

Adjust the siteUri (no https or http), the css and js output folder.

Add in package.json in the script section:

```
"watch": "concurrently -

Same Side Selling - Feedback Form CSS

.feedback-form .gform_wrapper {
	border: none;
	padding: 0;
}

.feedback-form .gform_wrapper.gravity-theme .gfield_label {
	font-size: 25px;
	font-weight: 400;
}

.gform_wrapper .gfield.buttonized .gfield_radio,
 .gform_wrapper .gfield.buttonized .gfield_checkbox {
    display: grid;
    grid-template-columns: repeat( 2, 1fr );
    grid-gap: .5em 1em;
	max-width: 600px;
}

/* Buttonize Radio & Checkbox Fields */
.gfield.buttonized .gfield_radio .gchoice,
.gfield.buttonized .g

Push all repos

# Get the current execution directory
$rootDir = Get-Location

# Iterate over each subdirectory
Get-ChildItem -Directory -Path $rootDir | ForEach-Object {
    # Change to the subdirectory
    Set-Location $_.FullName
    
    # Run git commands
    git add .
    git commit -am 'up'
    git push
}

# Change back to the root directory
Set-Location 

IAS Log Reader

enum RADIUS_CODE {
    rcUnknwon = 0
    rcAccessRequest      = 1
    rcAccessAccept       = 2
    rcAccessReject       = 3
    rcAccountingRequest  = 4
    rcAccountingResponse = 5
    rcAccessChallenge    = 11
    rcStatusServer       = 12
    rcStatusClient       = 13
    rcReserved           = 255
}
enum IAS_AUTHENTICATION_TYPE {
    IAS_AUTH_INVALID     = 0
    IAS_AUTH_PAP         = 1
    IAS_AUTH_MD5CHAP     = 2
    IAS_AUTH_MSCHAP      = 3
    IAS_AUTH_MSCHAP2     = 4
    IAS_AUTH_EAP   

@property like fake replacement for animation ;)

/*
https://yuanchuan.dev/time-uniform-for-css-animation
*/


@property --t {
  syntax: "<number>";
  initial-value: 0;
  inherits: true;
}


@keyframes animate-time {
  from { --t: 0 }
  to   { --t: 31536000000 }
}

/* Put animation to :root so we can use --t everywhere */
:root {
  animation: animate-time 31536000000ms linear infinite;
}

div {
  background: red;
  width: 100px;
  height: 100px;
  margin: 5rem;
  
}

.second {
   background: hsl(
    calc(var(--t

TestNG SetAttribute

class XrayListener : IInvokedMethodListener, ITestListener {
    override fun beforeInvocation(method: IInvokedMethod, testResult: ITestResult) {
        testResult.setAttribute("test", testResult.method.xrayKey)
    }
}

val xmlReporter = XMLReporter()
xmlReporter.config.isGenerateTestResultAttributes = true
xmlReporter.generateReport(executionType.xmlSuites, reportAggregator.aggregatedSuites, executionType.outputDirectory)

Remove Signature From Email - VBA Outlook Macro

Sub RemoveSignature()
    Dim mailItem As Outlook.mailItem
    Dim subjectText As String
    
    ' Check if the active window is a mail item
    If Application.ActiveInspector.CurrentItem.Class = olMail Then
        Set mailItem = Application.ActiveInspector.CurrentItem
        
        ' Force Outlook to save the latest input
        mailItem.Save
        
        ' Get the current subject
        subjectText = mailItem.Subject
        
        ' Avoid duplicating "#NO" if alread

FIeldSingleSelect

Field Single Select

utiliser field single select searchable

parse modifie la valeur stockée dans initial form value
format pour dire que la valeur c'est ça et bien l'afficher > OK pour le find