3620. Network Recovery Pathways

You are given a directed acyclic graph of n nodes numbered from 0 to n − 1. This is represented by a 2D array edges of length m, where edges[i] = [ui, vi, costi] indicates a one‑way communication from node ui to node vi with a recovery cost of costi. Some nodes may be offline. You are given a boolean array online where online[i] = true means node i is online. Nodes 0 and n − 1 are always online. A path from 0 to n − 1 is valid if: All intermediate nodes on the path are online. The total recovery cost of all edges on the path does not exceed k. For each valid path, define its score as the minimum edge‑cost along that path. Return the maximum path score (i.e., the largest minimum-edge cost) among all valid paths. If no valid path exists, return -1.
/**
 * @param {number[][]} edges
 * @param {boolean[]} online
 * @param {number} k
 * @return {number}
 */
var findMaxPathScore = function(edges, online, k) {
    const n = online.length;

    // Build adjacency list only for edges whose endpoints are online
    const adj = Array.from({ length: n }, () => []);
    let maxEdgeCost = 0;

    for (const [u, v, cost] of edges) {
        if (online[u] && online[v]) {
            adj[u].push([v, cost]);
            if (cost > maxEdgeCost) maxEdgeCost 

Check if DNS-Records are propagated successfully (using dig)

dig +short A sub.domain.end

3286. Find a Safe Walk Through a Grid

You are given an m x n binary matrix grid and an integer health. You start on the upper-left corner (0, 0) and would like to get to the lower-right corner (m - 1, n - 1). You can move up, down, left, or right from one cell to another adjacent cell as long as your health remains positive. Cells (i, j) with grid[i][j] = 1 are considered unsafe and reduce your health by 1. Return true if you can reach the final cell with a health value of 1 or more, and false otherwise.
/**
 * @param {number[][]} grid
 * @param {number} health
 * @return {boolean}
 */
var findSafeWalk = function (grid, health) {
  const m = grid.length;
  const n = grid[0].length;

  // dist[i][j] = minimum health lost to reach cell (i, j)
  const dist = Array.from({ length: m }, () => Array(n).fill(Infinity));

  // Starting cell: if it's unsafe (1), you lose 1 health immediately
  dist[0][0] = grid[0][0];

  // Directions for moving up, down, left, right
  const dirs = [
    [1, 0],
    [-1, 

Load Subscription Term Discount Price

<mvt:comment> 1. Build a discount state from the current basket </mvt:comment>
<mvt:do file="g.Module_Feature_PGR_UT" name="l.ok"
        value="DiscountState_CreateFromBasket( g.Basket, l.discount_state )" />
<mvt:do file="g.Module_Feature_PGR_UT" name="l.ok"
        value="DiscountState_Load_PriceGroups_Basket( g.Basket, l.discount_state )" />

<mvt:comment> 2. Predict the price for this product + subscription term
     args: discount_state, product, subterm_id, variant_id, quantity,
         

Caching via Redis

Snippet for caching via redis. This example is caching a Flex Component mega menu because it has many links and loading the categories & links takes valuable processing time
<mvt:assign name="l.cache_key"			value="tolower( slugify( g.Domain:name ) ) $ '-' $ tolower( slugify( g.Store:branch:name ) ) $ '-global_mega_menu'" />
<mvt:assign name="l.global_mega_menu"	value="''" />
<mvt:assign name="l.redis_connected"	value="0" />
<mvt:assign name="l.expiration"			value="2 * 60 * 60" />
<mvt:if expr="g.Store:cache_type EQ 'redis'">
	<mvt:do file="g.Module_Library_Crypto" name="l.redispwd" value="Decrypt_Payment_Password( g.Store:redispwd )" />
	<mvt:do file="g.Module

recovery ubuntu root acccess

Out of the box Ubuntu doesn't use a root password unless you set one yourself. Here's how to recover:

When you see the grub screen, hit 'e' to edit kernel arguments.

Find the line that starts with 'linux' and at the end of that line, add init=/bin/bash.

Hit F10 or ESC to boot the machine. You're now in single user mode but filesystems are mounted read-only. We'll fix that like this: mount -no remount,rw /

Next, change the root password using passwd root.

Last, reboot the machine and you sho

Order report

select {o:code} as 'Eazle Order Number', {o:bcordernumber} as 'BC Order Number', {o:sapordernumber} as 'SAP Order number', {os:code} as 'Status', {bu:companycode} as 'Company Code', {bu:uid} as 'SoldTo', {o:originalordercode} as 'Amended Order', convert(date,{o:creationtime}) as 'Order Creation date', convert(time,{o:creationtime}) as 'Order Creation time'
from {order as o join b2bunit as bu on {bu:pk} = {o:unit} join orderstatus as os on {os:pk} = {o:status}}
where {o:creationtime} >= '2026-05-

Missing BC data order

select {oe:entrynumber}, {oe:quantity}, {oe:baseprice}, {oe:totalprice}, {p:code}, {o:code}, {o:bcordernumber}, {o:deliverydate}, {bu:uid}, {ad:sapcustomerid}
from {orderentry as oe 
join product as p on {p:pk} = {oe:product} 
join order as o on {o:pk} = {oe:order} and {o:bcordernumber} is not null and {o:bcorderupdatedstreammessage} is null and {o:status} <> '8796096528475'
join b2bunit as bu on {bu:pk} = {o:unit}
join address as ad on {ad:owner} = {bu:pk} and {ad:sapaddressusage} = 'SHIPTO'} 

{% style %} vs {% stylesheet %}

## {% style %}

This tag creates an inline `<style>` block that allows dynamic updates in the theme editor. However, it’s not automatically scoped to the section—meaning the styles inside can affect the entire page unless you explicitly scope them using `section.id`.

## {% stylesheet %}

Unlike {% style %}, styles inside {% stylesheet %} are bundled into a single CSS file by Shopify and injected into the theme through the `{{ content_for_header }}` global Liquid object. This ensures that sectio

IELTS 5-14

coaches
?first aid
sports complex
fruit
snacks
4:30
C
C
A
A
E
D
B
?A
H

locations
signal
user manual
brand
tourism

exchange rates
import duty

transportation fees
quality
biodiversity
water
pest control
intervals
moist soil
leaves
revenue
machines
monetary lawn
protein
holding tank
slip stream
corse

git commit

請檢視目前所有未提交的 Git 變更,包含 staged、unstaged、untracked files。

請不要修改程式碼,也不要執行 git commit。

請根據實際 diff 產出一份繁體中文說明,並提供一個繁體中文 Conventional Commits 格式的 commit message。

輸出格式:

變更摘要:
- 

主要異動:
- 

注意事項:
- 

Commit message:
```text
type(scope): summary
````

Commit body:

```text
- ...
- ...
```

Python libraries

import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
import seaborn as sns
from sklearn.pipeline import Pipeline
from sklearn.preprocessing import StandardScaler, PolynomialFeatures
from sklearn.linear_model import LinearRegression, Ridge
from sklearn.metrics import mean_squared_error, r2_score
from sklearn.model_selection import cross_val_score, train_test_split

1967. Number of Strings That Appear as Substrings in Word

Given an array of strings patterns and a string word, return the number of strings in patterns that exist as a substring in word. A substring is a contiguous sequence of characters within a string.
/**
 * @param {string[]} patterns
 * @param {string} word
 * @return {number}
 */
var numOfStrings = function(patterns, word) {
    let count = 0;

    for (const p of patterns) {
        // JS built-in substring check
        if (word.includes(p)) {
            count++;
        }
    }

    return count;
};

redirect apps change password

FSP_AFTER_LOGIN_URL

https://vinish.dev/oracle-apex-after-login-redirect-page#google_vignette

DECLARE
    l_URL VARCHAR2(4000);
    
BEGIN
    apex_util.set_session_state('G_APP_TFA_AUTH_CHECK', 'FALSE'); -- jm: check if this goes inside through 2fa, initially set as false

    -- IF nvl(:G_REQUIRE_MFA,'1') = '0' THEN -- *** JUST FOR NOW LOA TESTING JM 07-11-2025 --> i switched from 1=1 THEN --
    IF nvl(:G_REQUIRE_MFA,'1') = '0' THEN
        -- If the user does not use MFA, after authenticati

ヘッダー スクロールで表示/非表示

<header class="l-header js-l-header" data-is-scroll="false">
</header>

1846. Maximum Element After Decreasing and Rearranging

You are given an array of positive integers arr. Perform some operations (possibly none) on arr so that it satisfies these conditions: The value of the first element in arr must be 1. The absolute difference between any 2 adjacent elements must be less than or equal to 1. In other words, abs(arr[i] - arr[i - 1]) <= 1 for each i where 1 <= i < arr.length (0-indexed). abs(x) is the absolute value of x. There are 2 types of operations that you can perform any number of times: Decrease the value of any element of arr to a smaller positive integer. Rearrange the elements of arr to be in any order. Return the maximum possible value of an element in arr after performing the operations to satisfy the conditions.
/**
 * @param {number[]} arr
 * @return {number}
 */
var maximumElementAfterDecrementingAndRearranging = function(arr) {
    arr.sort((a, b) => a - b);

    // First element must be 1
    arr[0] = 1;

    for (let i = 1; i < arr.length; i++) {
        // Each element can be at most previous + 1
        arr[i] = Math.min(arr[i], arr[i - 1] + 1);
    }

    return arr[arr.length - 1];
};