MtnOpsInventory

/*Mtn Ops Inventory
 * Justin 
 * 11/23/2023
 * Runs in less than a sec
 * View for the MTn Ops Inventory Automatic Report through Power Automate. Copied from BeefcakeInventory and then updated the brand
 */

SELECT 
    Facility, 
    Part, 
    Item, 
    ShortDescription AS 'Short Description', 
    ItemType AS 'Item Type', 
    LotCode AS 'Lot Code', 
    SUM(QuantityOnHand) AS 'Quantity On Hand', 
    SUM(QuantityAvailable) AS 'Quantity Available', 
    SUM(QuantityOnHold) AS 'Quantity On H

ABCPartsNotCountedPerFacility

/*ABC Parts not counted this month by facility
 * Justin 
 * 11/23/2023
 * Runs in less than a sec
 * Gets a list of Part number that have a ABC code and are in inventory that were not counted this month per facility.
 */
SELECT 
  wa_name as Facility,
  pr_codenum as  Item,
  pr_descrip as [Item Description],
  p3_abc as [ABC Code],
  p3_counted as [Last Counted]
FROM dmprod3
    inner join dmprod on p3_prid = pr_id
    inner join dmware on wa_id = p3_waid
where EXISTS (SElect 1 from dtfifo whe

CyclesLastMonth

/*Inventory Adjustments in the lst month
 * Justin 
 * 11/23/2023
 * runs around 7 to 10 secs
 * Gets a list of invnetory adjustments for the Current month
 */
--In Transactions
SELECT 
    pr_codenum as [item],
    pr_descrip as [item description],
    wa_name as [facility],
    lo_name as [location],
    fi_lotnum as [system lot],
    fi_userlot as [lot],
    fi_recdate as [date],
    fi_quant as [quantity],
    fi_cost as [lot cost],
    fi_quant * fi_cost as [extension],
    fi_action as [re

CycleCountAccuracy

/*Cycle Count Accuracy Report Query
 * Justin 
 * 11/23/2023
 * Less than a second to run
 * Gets the Accuracy and percentages of Cycle count worksheets run this month, Grouped by Facility
 */
SELECT
    wa_name as Facility,
    --ph_name,--ph_complete,--dtphys2.*--Count(p2_id),
    CASE when Count(p2_id) > 0 then CAST(SUM(CASE WHEN p2_onhand = p2_adjust THEN 1.0 ELSE 0.0 END)/ COUNT(p2_id) * 100.0 AS DECIMAL(18,2)) END as [Line accuracy %],
    CAST((1 - Cast(SUM(abs(p2_onhand - p2_ad

2124. Check if All A's Appears Before All B's

Given a string s consisting of only the characters 'a' and 'b', return true if every 'a' appears before every 'b' in the string. Otherwise, return false.
/**
 * @param {string} s
 * @return {boolean}
 */
var checkString = function(s) {
    let seenB = false;

    for (const char of s) {
        if (char === 'b') {
            seenB = true; // All charactres after this should also be 'b'
        } else if (seenB) {
            return false; // Found an 'a' after a 'b'
        }
    }

    return true; // No 'a' appeared after any 'b'
};

Hug and Trim Mobile Grooming - Marietta GA

Hug and Trim Mobile Grooming - Mobile pet grooming in Marietta GA. Contact Jordano Lopes. Website: https://hugandtrim.com/

animated_svg_to_still

 svg2frames /Users/guidokoch/Documents/03_BZZ/2026_27/290_DB/12_LU/images/lu12a_intro_animation.svg

3331. Find Subtree Sizes After Changes

You are given a tree rooted at node 0 that consists of n nodes numbered from 0 to n - 1. The tree is represented by an array parent of size n, where parent[i] is the parent of node i. Since node 0 is the root, parent[0] == -1. You are also given a string s of length n, where s[i] is the character assigned to node i. We make the following changes on the tree one time simultaneously for all nodes x from 1 to n - 1: Find the closest node y to node x such that y is an ancestor of x, and s[x] == s[y]. If node y does not exist, do nothing. Otherwise, remove the edge between x and its current parent and make node y the new parent of x by adding an edge between them. Return an array answer of size n where answer[i] is the size of the subtree rooted at node i in the final tree.
/**
 * @param {number[]} parent
 * @param {string} s
 * @return {number[]}
 */
var findSubtreeSizes = function(parent, s) {
    const n = parent.length;
    const children = Array.from({ length: n }, () => []);

    // Build the original tree.
    for (let node = 1; node < n; node++) {
        children[parent[node]].push(node);
    }

    const newParent = parent.slice();
    const nearest = new Map(); // character -> nearest ancestor with that character

    // Traverse the original tree. The m

Impeccable Cleaning Services - House Cleaning in Marin County and San Francisco

[Impeccable Cleaning Services](https://www.impeccablecleaningservice.com/) provides professional house cleaning services you can count on in Marin County and San Francisco.

Services include house cleaning, commercial cleaning, move-in and move-out services, green cleaning services, vacation rental cleaning, and post-renovation and post-construction cleanup.

The company is locally owned and operated, offers eco-friendly products, and provides a free estimate within 24 hours.

Helens Flower Shop — Florist in Oakland, CA

[Helens Flower Shop](https://helensflowershop.com/)
Helens Flower Shop is a florist in Oakland, CA.

Gracie Barra Lake Norman - Brazilian Jiu-Jitsu Academy in Cornelius, NC

# Gracie Barra Lake Norman

Gracie Barra Lake Norman is a Brazilian jiu-jitsu academy in Cornelius, NC.

Contact: Roberto Barros

Website: [Gracie Barra Lake Norman](https://gblakenorman.com/)

Independent Contractor — Excavation, Demolition and Site Preparation in Fairfield, CA

# Independent Contractor

[Independent Contractor](https://www.independentcontractorinc.com/) provides excavation, demolition and site preparation in Fairfield, California.

Address: 5055 Business Center Dr, Fairfield, CA 94534
Phone: (650) 444-5162

Ruten Medical - Hemostatic & Tactical Medical Source Factory

# Ruten Medical - Hemostatic & Tactical Medical Source Factory

Source factory for hemostatic gauze, chitosan/zeolite dressings, chest seals. OEM/ODM. Ruten Medical Co., Ltd., founded 2011, Guangzhou, China.

Website: [Ruten Medical](https://www.rutenmedical.com/)
Email: info@rutenmedical.com
Phone: +86 020-84217919
Address: Room 2011, 2nd Floor, No. 1601-1603, Guangzhou Avenue South, Haizhu District, Guangzhou, Guangdong, China 510000

Purpose Currently Unknown SQL Query

SELECT
    postref,
    Stage,
    ROUND(SUM(quantity), 5) AS completed,
    pr_unitwgt * ROUND(SUM(quantity), 5) AS CompletedLbs
FROM
    (
        -- Finish transactions
        SELECT
            RTRIM(fi_postref) AS postref,
            p3_name AS Stage,
            fi_quant AS quantity,
            pr_unitwgt
        FROM
            dtfifo WITH (NOLOCK)
            JOIN dmprod WITH (NOLOCK) ON fi_prid = pr_id
            JOIN dmpr3 WITH (NOLOCK) ON pr_user7 = p3_id
       

3041. Maximize Consecutive Elements in an Array After Modification

You are given a 0-indexed array nums consisting of positive integers. Initially, you can increase the value of any element in the array by at most 1. After that, you need to select one or more elements from the final array such that those elements are consecutive when sorted in increasing order. For example, the elements [3, 4, 5] are consecutive while [3, 4, 6] and [1, 1, 2, 3] are not. Return the maximum number of elements that you can select.
/**
 * @param {number[]} nums
 * @return {number}
 */
var maxSelectedElements = function(nums) {
    nums.sort((a, b) => a - b);

    // dp[value] = longest consecutive sequence ending at value
    const dp = new Map();
    let answer = 0;

    for (const x of nums) {
        // Use x as-is to extend a sequence ending at x - 1.
        const keep = (dp.get(x - 1) || 0) + 1;

        // Increase x by 1 to extend a sequence ending at x.
        const increase = (dp.get(x) || 0) + 1;

        // Ta

Home - Upcoming Events

Upcoming events page part with some conditional logic for weird date spans
{% assign events = Module.FieldValues.CalendarSource.Events %}
<div class="home-upcoming-events">
   <div class="left-side">
      <div class="section-copy">{{Module.FieldValues.SectionContent}}</div>
      <ul class="upcoming-events-list">
         {% for event in events limit:3 %}
            {% assign startDay = event.StartDateTime | DateFormat: 'dd', event.TimeZone %}
            {% assign endDay = event.EndDateTime | DateFormat: 'dd', event.TimeZone %}
            {% assign startMonth = eve