1914. Cyclically Rotating a Grid

ou are given an m x n integer matrix grid​​​, where m and n are both even integers, and an integer k. The matrix is composed of several layers, which is shown in the below image, where each color is its own layer: A cyclic rotation of the matrix is done by cyclically rotating each layer in the matrix. To cyclically rotate a layer once, each element in the layer will take the place of the adjacent element in the counter-clockwise direction. An example rotation is shown below: Return the matrix after applying k cyclic rotations to it.
/**
 * @param {number[][]} grid
 * @param {number} k
 * @return {number[][]}
 */
var rotateGrid = function(grid, k) {
    const m = grid.length, n = grid[0].length;
    const layers = Math.min(m, n) / 2;

    for (let layer = 0; layer < layers; layer++) {
        let ring = [];

        let top = layer, bottom = m - layer - 1;
        let left = layer, right = n - layer - 1;

        // top row
        for (let j = left; j <= right; j++) ring.push(grid[top][j]);
        // right col
        for 

newest firecrawl key

fc-f361f97009ef4beb99e70ffa5f2a1cf6

copilots-project-manager.md

---
description: "Use this agent when the user has a complex task that needs to be broken down, coordinated across multiple agents, and assembled into a complete solution.\n\nTrigger phrases include:\n- 'I have a big project, can you help organize it?'\n- 'Break this down and delegate it to the right people'\n- 'Can you manage this task and coordinate the team?'\n- 'I need multiple things done, can you orchestrate?'\n- 'Help me break this into pieces and assign them out'\n\nExamples:\n- User say

Oracle APEX URL session link

oracle apex link session

https://pretius.com/blog/apex-application-links-active-session

Autoplay policy in Chrome

https://developer.chrome.com/blog/autoplay/

3629. Minimum Jumps to Reach End via Prime Teleportation

You are given an integer array nums of length n. You start at index 0, and your goal is to reach index n - 1. From any index i, you may perform one of the following operations: Adjacent Step: Jump to index i + 1 or i - 1, if the index is within bounds. Prime Teleportation: If nums[i] is a prime number p, you may instantly jump to any index j != i such that nums[j] % p == 0. Return the minimum number of jumps required to reach index n - 1.
/**
 * @param {number[]} nums
 * @return {number}
 */
var minJumps = function(nums) {
    const n = nums.length;
    if (n === 1) return 0;

    // 1. Build SPF (smallest prime factor) up to max(nums)
    const maxVal = Math.max(...nums);
    const spf = Array(maxVal + 1).fill(0);
    for (let i = 2; i <= maxVal; i++) {
        if (spf[i] === 0) {
            spf[i] = i;
            if (i * i <= maxVal) {
                for (let j = i * i; j <= maxVal; j += i) {
                    if (spf[j] =

Git: Reset/Sync main with dev on branch-drift

#Create Backup of Main (optional)
git fetch --all --tags
git checkout main
git pull

git branch main-backup-$(date +%Y%m%d)
git push origin main-backup-$(date +%Y%m%d)

# Reset Main to dev:
git checkout main
git reset --hard origin/dev
git push --force-with-lease origin main

glm

我在使用GLM Coding Plan,数小时内完成过去需要数周的开发工作,赠送你1张7天AI Coding体验卡,一起来用吧:https://open.bigmodel.cn/activity/trial-card/6WHV88OFUX

2ced31df52d1411a8ac0a6799620b21b.PyJm3WTaZdlnDV39

53dc0c152c434111808493d898fc9691.pCnWPI9A5FsjbqHO

How to execute javasript code inside the browser that is running the code in Playwright?

// To execute JavaScript code inside a browser using Playwright, use the page.evaluate() method. This API runs a JavaScript function within the web page's context, allowing you to access browser globals like window and document

const href = await page.evaluate(() => document.location.href);

const status = await page.evaluate(async () => {
  const response = await fetch(location.href);
  return response.status;
});

how to run a test and see the browser executing it?

# using the --headed option --headed
npx playwright test --headed

Interactive Elfsight Script

Elfsight now puts the embed into a `#shadow-root (open)` - using some js, we can still make it so that CSS and JS apply to these embeded elements. This snippet requires that the display of the embed in Elfsight be set to LIST. With this snippet, i was able to animate the embed elements when the section came into view. exapmle: https://hopepres2026.speakcreative.com/ (socials near the footer)
   const interval = setInterval(() => {
      const widget = document.querySelector('.es-embed-root');
      if (!widget?.shadowRoot) return;

      const shadowRoot = widget.shadowRoot;
      const posts = shadowRoot.querySelectorAll('.es-list-layout > div');
      if (!posts.length) return;

      clearInterval(interval);
      injectStylesheet(shadowRoot);
      
   }, 300);

   function injectStylesheet(shadowRoot) {
      if (shadowRoot.querySelector('#social-animation-css')) return;

     

3660. Jump Game IX

You are given an integer array nums. From any index i, you can jump to another index j under the following rules: Jump to index j where j > i is allowed only if nums[j] < nums[i]. Jump to index j where j < i is allowed only if nums[j] > nums[i]. For each index i, find the maximum value in nums that can be reached by following any sequence of valid jumps starting at i. Return an array ans where ans[i] is the maximum value reachable starting from index i.
/**
 * @param {number[]} nums
 * @return {number[]}
 */
var maxValue = function(nums) {
    const n = nums.length;
    const pref = Array(n);
    const suff = Array(n);

    // prefix max
    pref[0] = nums[0];
    for (let i = 1; i < n; i++) {
        pref[i] = Math.max(pref[i-1], nums[i]);
    }

    // suffix min
    suff[n-1] = nums[n-1];
    for (let i = n-2; i >= 0; i--) {
        suff[i] = Math.min(suff[i+1], nums[i]);
    }

    const ans = Array(n);
    let start = 0;

    for (let i = 

Style overrides - TwentyTwentySix

/* Remove extra space above footer */

Hover Autoplays Video (YouTube API)

Using YouTube Player API (https://developers.google.com/youtube/iframe_api_reference), have a video start/stop programmatically on event. example: https://hopepres2026.speakcreative.com/ (media section)
{% assign medias = Module.FieldValues.MediaArchiveSource.Episodes %}
{% assign mediaSorted = medias | OrderBy: 'DisplayDateTime', 'desc' %}

<div class="pp-home-media">
   <div class="bg-wrapper">
      <span class="logomark1"></span>
      <span class="logomark2"></span>
   </div>
   <div class="section-copy">{{Module.FieldValues.SectionCopy}}</div>
   <div class="recent-medias">
      {% for media in mediaSorted limit:1 %}
      <div class="first-event">
         <a href="/{{Module

Scoping process

- Issue Summary
- Key Findings
- Root Cause Analysis
- Recommended Solution