HEADER AREA:
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.5/codemirror.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.5/theme/monokai.min.css" />
CONTENT AREA:
<!-- POST CONTENT -->
<div wire:ignore>
<div id="editor" style="height: 500px; width: 100%;"></div>
</div>
<!-- Hidden textarea to bind with Livewire -->
<textarea id="content" name="content" style="display:none;" wire:model="post_content"></
function my_acf_save_post( $post_id ) {
// get new value
$user_id = get_field('lead_designer');
if($user_id){
wp_update_post( array( 'ID'=>$post_id, 'post_author'=>$user_id) );
}
}
add_action('acf/save_post', 'my_acf_save_post', 20);
/**
* Definition for a binary tree node.
* function TreeNode(val, left, right) {
* this.val = (val===undefined ? 0 : val)
* this.left = (left===undefined ? null : left)
* this.right = (right===undefined ? null : right)
* }
*/
/**
* @param {TreeNode} root
* @return {TreeNode}
*/
var reverseOddLevels = function(root) {
if (!root) return null;
// Helper function to perform a BFS traversal and reverse node value at odd levels
const bfs = (root) => {
const q
/**
* Definition for a binary tree node.
* function TreeNode(val, left, right) {
* this.val = (val===undefined ? 0 : val)
* this.left = (left===undefined ? null : left)
* this.right = (right===undefined ? null : right)
* }
*/
/**
* @param {TreeNode} root
* @return {TreeNode}
*/
var reverseOddLevels = function(root) {
if (!root) return null;
// Helper function to perform a BFS traversal and reverse node value at odd levels
const bfs = (root) => {
const q
# WSL 配置
- ## wsl 如何设置 Linux 子系统默认用户为 root
解决:
1. `WIN` + `R`,输入`cmd`打开命令行窗口
2. 输入命令: `cd %HOMEPATH%\AppData\Local\Microsoft\WindowsApps`,查看安装的子系统对应的应用名,比如:`ubuntu2404.exe`
3. 输入命令:`.\ubuntu2404.exe config --default-user root`
4. 再次打开子系统会发现已经默认登录用户为root了
- ## wsl 如何设置 Linux 子系统默认用户为 root
解决:
1. 输入命令:`wsl -l --all`查看所有版本
2. 命令格式:`wsl --setdefault wsl名称`,例如:`wsl --setdefault Ubuntu-24.04`将Ubuntu-24.04设置为默认子系统
.visuallyHidden {
position: absolute !important;
width: 1px !important;
height: 1px !important;
margin: -1px !important;
padding: 0 !important;
overflow: hidden !important;
clip: rect(0 0 0 0) !important;
white-space: nowrap !important;
border: 0 !important;
}
const fs = require('fs')
const data = fs.readFileSync('./networks.json').toString();
const sourceData = JSON.parse(data);
const networks = fs.readFileSync('./networks-list.json').toString();
const sourceNetworks = JSON.parse(networks);
const networksMapping = Object.fromEntries(sourceNetworks.map(({ wallet, network }) => [wallet, network]))
const normalized = sourceData.map((item) => ({
...item,
asset_identifier: item.asset_identifier || item.symbol,
network: item.network || net
observer.observe(document.body, {
attributes: true,
attributeFilter: ['class'],
});
});
document.addEventListener('DOMContentLoaded', () => {
const counters = document.querySelectorAll('.counter .el-title');
const startCounter = (counter) => {
// Set the data-target attribute based on the current content
const targetValue = counter.innerText.trim().replace(/[,\.]/g, '');
counter.setAttribute('data-target', targetValue);
// Set the initial value to 0
PJxrGPMK5ZTF
<template>
<div ref="div1">useTemplateRefの場合</div>
<div ref="div2">refの場合</div>
</template>
<script setup>
const div1 = useTemplateRef<HTMLDivElement>('div1')
const div2 = ref<HTMLDivElement | null>(null)
</script>
```tsx
import Button, { ButtonProps } from '@mui/material/Button';
import NextLink from 'next/link';
import { LoadingButton } from '@mui/lab'
```
```
LinkComponent={NextLink}
```
<!-- 使用例 -->
<section class="js-labelledby-uuid">
<h2 class="js-labelledby-uuid__heading">見出しです</h2>
<p>テキストです</p>
</section>
const ctaSettings = {
classes: {
animate: 'animate',
arrow: '.icon--arrow-cta'
},
animation: {
duration: 600,
interval: 5000
}
}
let ctaLastTime = 0;
// Function to trigger the animation
const ctaAnimationTrigger = () => {
const ctaArrows = document.querySelectorAll(ctaSettings.classes.arrow);
ctaArrows.forEach(arrow => arrow.classList.add(ctaSettings.classes.animate));
requestAnimationFrame(() => {
setTimeout(() => {
ctaArrows.forEach(arrow => arrow.c
/**
* @param {number[]} arr
* @return {number}
*/
var maxChunksToSorted = function(arr) {
// Variable to keep track of the number of chunks
let maxChunks = 0;
// Variable to keep track of the maximum value in the current chuck
let currentMax = 0;
// Loop through each element in the array
for (let i = 0; i < arr.length; i++) {
// Update the current maximum value in the chuck
currentMax = Math.max(currentMax, arr[i]);
// If the current maximum
import yfinance as yf
data = yf.download('^GSPC', progress=False)
trading_days = data.index
git update-index --skip-worktree <filename>