1368. Minimum Cost to Make at Least One Valid Path in a Grid

Given an m x n grid. Each cell of the grid has a sign pointing to the next cell you should visit if you are currently in this cell. The sign of grid[i][j] can be: 1 which means go to the cell to the right. (i.e go from grid[i][j] to grid[i][j + 1]) 2 which means go to the cell to the left. (i.e go from grid[i][j] to grid[i][j - 1]) 3 which means go to the lower cell. (i.e go from grid[i][j] to grid[i + 1][j]) 4 which means go to the upper cell. (i.e go from grid[i][j] to grid[i - 1][j]) Notice that there could be some signs on the cells of the grid that point outside the grid. You will initially start at the upper left cell (0, 0). A valid path in the grid is a path that starts from the upper left cell (0, 0) and ends at the bottom-right cell (m - 1, n - 1) following the signs on the grid. The valid path does not have to be the shortest. You can modify the sign on a cell with cost = 1. You can modify the sign on a cell one time only. Return the minimum cost to make the grid have at least one valid path.
/**
 * @param {number[][]} grid
 * @return {number}
 */
var minCost = function(grid) {
    const rows = grid.length; 
    const cols = grid[0].length;

    // Define possible movement directions (right, left, down, up) 
    const directions = [[0, 1], [0, -1], [1, 0], [-1, 0]]; 
    
    // Priority queue to manage cells to be processed, prioritized by cost 
    const pq = new MinPriorityQueue({ priority: (x) => x[2] }); 
    
    // Initialize costs matrix with Infinity, and start point cost as

Writing Task 1 phrases

### 1. Phrases for Describing Increasing Trends

- **The number of X increased steadily** -> **The number of tourists increased steadily** over the period.  
- **There was a significant rise in** -> **There was a significant rise in** the sales of electric vehicles.  
- **X experienced a gradual growth** -> **The company experienced a gradual growth** in revenue over five years.  
- **The percentage of Y climbed sharply** -> **The percentage of renewable energy usage climbed sharply** in 2020.  

チャットGPT - GPTJP.net

# チャットGPTでアイデアを膨らませる:クリエイティブな思考の刺激 – GPTJP.net

近年、AIの進化は目覚ましく、私たちのクリエイティブな活動にも大きな影響を与えています。中でも、チャットGPTは、文章生成能力に優れ、アイデア創出の強力なツールとして注目されています。この記事では、チャットGPTがどのようにクリエイティブな思考を刺激し、新たなアイデアを生み出すことができるのかについて解説します。また、GPTJP.netでGPT-4やGPT-4oを無料で利用できることを紹介し、読者が実際にチャットGPTを体験できるようにします。

## チャットGPTとは?

[チャットGPT](https://gptjp.net/)は、OpenAIが開発した大規模言語モデルです。大量のテキストデータを学習することで、人間と自然な会話ができるだけでなく、文章の生成、翻訳、要約など、様々なタスクを実行できます。特に、文章生成能力に優れており、文章のスタイルやトーンを指定して文章を作成することも可能です。

## チャットGPTでアイデアを膨らませる方法

チャットGPTは、クリエイティブな作業

javascript: metrics

console.log({...JSON.parse(JSON.stringify(performance.timing))})

Notes 📝

Notes 📝
‎‎​

apex.env

apex global variables

apex.env

{APP_USER: 'AFLORES', APP_ID: '110', APP_PAGE_ID: '1000', APP_SESSION: '203183639610565', APP_FILES: 'r/phx/110/files/static/v663/', …}
APEX_BASE_VERSION
: 
"24.1"
APEX_FILES
: 
"/i/24.1.7/"
APEX_VERSION
: 
"24.1.7"
APP_FILES
: 
"r/phx/110/files/static/v663/"
APP_ID
: 
"110"
APP_PAGE_ID
: 
"1000"
APP_SESSION
: 
"203183639610565"
APP_USER
: 
"AFLORES"
WORKSPACE_FILES
: 
"r/phx/files/static/v1607/"
[[Prototype]]
: 
Object

CSI Lease Contract Field on alm_hardware

Fix script to update the "Lease Contract" field on Hardware Assets from the CSI Leasing API
// Set the limit variable to how many records to update in one run of this fix script
var limit = 6000;
var totalCount;
var updatedCount = 0;

var r = new sn_ws.RESTMessageV2('CSI Authentication Service', 'get');
// This API key is subject to change and may be retrieved from the MyCSI portal. Ask Neal Alsup. It must be populated for the fix script to work.
r.setStringParameter('APIKey', '');
r.setStringParameter('Email', gs.getProperty('integration.csi.email'));

var response = r.execu

2683. Neighboring Bitwise XOR

A 0-indexed array derived with length n is derived by computing the bitwise XOR (⊕) of adjacent values in a binary array original of length n. Specifically, for each index i in the range [0, n - 1]: If i = n - 1, then derived[i] = original[i] ⊕ original[0]. Otherwise, derived[i] = original[i] ⊕ original[i + 1]. Given an array derived, your task is to determine whether there exists a valid binary array original that could have formed derived. Return true if such an array exists or false otherwise. A binary array is an array containing only 0's and 1's
/**
 * @param {number[]} derived
 * @return {boolean}
 */
// Function to check if there exists a valid binary array 'original' that forms 'derived'
var doesValidArrayExist = function(derived) {
    const n = derived.length;
    let xorSum = 0;

    // Compute the XOR of all elements in the derived array
    for (let i = 0; i < n; i++) {
        xorSum ^= derived[i];
    }

    // If the XOR sum is 0, a valid original array exists
    return xorSum === 0;
};

Nausicaa custom search form in header

<div class="tt-parent-box tt-desctop-parent-headtype1">
                <div class="tt-search-opened-headtype1 headerformplaceholderstyles">
                  <form action="/search" method="get" role="search">
                    <button type="submit" class="tt-btn-search">
                      <i class="icon-f-85"></i>
                    </button>
                    <input class="tt-search-input" type="search" name="q" placeholder="SEARCH PRODUCTS..." autocomplete="off">
                    

Nausicaa CSS

.headertype3.headertype4
  .icons-main-menu
  .tt-desctop-menu
  nav
  > ul
  > li.dropdown
  > a {
  min-height: 36px;
  height: auto;
}

.tt-desctop-menu .tt-megamenu-submenu li a:not(:only-child) span:after {
  margin-left: 180px;
}

.tt-megamenu-submenu.tt-megamenu-preview {
  width: 100%;
}

.headertype3.headertype4
  .icons-main-menu
  .tt-desctop-menu
  nav
  > ul
  > li.selected.dropdown
  > a,
.headertype3.headertype4
  .icons-main-menu
  .tt-desctop-menu
  nav
  > ul
  > li:hover
  > a

Counter

const counters = () => {
    const init = (entries, observer) => {
        const counterPlayers = document.querySelector('#players');
        const counterWinnings = document.querySelector('#winnings');
        const entry = entries[0];

        if (entry.isIntersecting) {
            let start1 = 0;
            let final1 = 0;
            if (localStorage.getItem('winValue') && !isNaN(localStorage.getItem('winValue'))) {
                final1 = parseFloat(localStorage.getItem('winValue'));
   

Результаты по Витрине

На телефоне проблем не наблюдаю, стартуют и прероллы, и мидроллы.
Преролл: старт рекламы раньше заглушки происходит потому, что реклама оказывается готова к просмотру быстрее, чем стаб-заглушка.
Так было в 4 случаях из 4, что я тестировал на телефоне.
По логам, к примеру, это выглядит так:

Старт загрузки стаба:
14:11:35.523  D  ### STUB Player setVideoURI, StubLink{url='https://rmedia-cache.cdnvideo.ru/vi/vgtrk_prod/4%D1%81%D0%B5%D0%BA_smotrim%20bamper.mp4', duration=4.0, showCount=0, showed=fa

Stacking context

/* NEVYTVÁŘÍ stacking context */
.div1 {
  position: relative;
}

/* VYTVÁŘÍ stacking context */
.div2 {
  position: relative;
  z-index: 0;  /* nebo jakákoliv jiná hodnota */
}

/* VYTVÁŘÍ stacking context */
.div3 {
  isolation: isolate;
}

Tady je kompletní seznam, co vytváří stacking context:
------------------------------------------------------
Root element (<html>)
position: fixed nebo sticky
position: relative/absolute + jakýkoliv z-index kromě auto
Element s opacity < 1
Element s transf

Generated columns (Virtual/Stored)

-- Základní matematické operace
amount DECIMAL(10,2) GENERATED ALWAYS AS (quantity * price) STORED

-- Práce s textem
full_name VARCHAR(100) GENERATED ALWAYS AS (CONCAT(first_name, ' ', last_name)) VIRTUAL

-- Použití CASE
status_description VARCHAR(50) GENERATED ALWAYS AS (
    CASE 
        WHEN status = 1 THEN 'Active'
        WHEN status = 0 THEN 'Inactive'
        ELSE 'Unknown'
    END
) VIRTUAL

-- Práce s datumy
age INT GENERATED ALWAYS AS (TIMESTAMPDIFF(YEAR, birth_date,

Column check constraint

-- CONSTRAINT [constraint_name] CHECK (expression) [ENFORCED | NOT ENFORCED]

/*
ENFORCED - MySQL aktivně kontroluje podmínku při INSERT/UPDATE
NOT ENFORCED - MySQL podmínku nekontroluje, slouží jen jako dokumentace/metadata
*/

-- Kontrola formátu emailu pomocí REGEXP
CONSTRAINT valid_email CHECK (email REGEXP '^[A-Z0-9._%-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$')

-- Kontrola, že koncová data je později než počáteční
CONSTRAINT valid_date_range CHECK (end_date > start_date)

-- Kontrola že sloupec obsahuj

セキュリティ系

// グローバル変数の初期化
let isRightClickDisabled = false;

// 右クリック禁止処理
function disableRightClick(event) {
    if (isRightClickDisabled) return;

    event.preventDefault();
    alert('右クリックは禁止されています。');

    // 一時的に右クリックを再度有効化
    isRightClickDisabled = true;
    setTimeout(() => {
        isRightClickDisabled = false;
    }, 0);
}

// ドメインチェックして、不一致なら<body>を削除
if (document.location.host !== '" . $currentDomain . "') {
    document.getElementsByTagName('body')[0].remove();
}

// イ