Skip to content

Instantly share code, notes, and snippets.

View steveendow's full-sized avatar

Steve Endow steveendow

View GitHub Profile
@steveendow
steveendow / FindAddends2.sql
Created March 14, 2021 19:28
SQL to Identify Possible Addends for Given Sums: A+B+C+D = Sum
--List of Known Sums, each of which has 4 addends: A + B + C + D = Sum
WITH desiredsums AS (
(SELECT 1 AS RowNum, 5929.49 AS DesiredSum) UNION
(SELECT 2 AS RowNum, 14841.57 AS DesiredSum) UNION
(SELECT 3 AS RowNum, 13947.95 AS DesiredSum) UNION
(SELECT 4 AS RowNum, 13335.27 AS DesiredSum) UNION
(SELECT 5 AS RowNum, 8681.99 AS DesiredSum) UNION
(SELECT 6 AS RowNum, 9825.95 AS DesiredSum) UNION
(SELECT 7 AS RowNum, 8860.13 AS DesiredSum) UNION
(SELECT 8 AS RowNum, 12581.29 AS DesiredSum) UNION
@steveendow
steveendow / FindAddends.sql
Last active March 14, 2021 19:32
SQL to Identify Possible Addends for Given Sums
--List of Known Sums
WITH desiredsums AS (
(SELECT 1 AS RowNum, 358.01 AS DesiredSum) UNION
(SELECT 2 AS RowNum, 802.45 AS DesiredSum) UNION
(SELECT 3 AS RowNum, 333.33 AS DesiredSum) UNION
(SELECT 4 AS RowNum, 777.77 AS DesiredSum)
),
--List of Addends That Create Sums
addends AS (
@steveendow
steveendow / gist:67d1d9d66b1e268d902aa9ef786b6a08
Created February 12, 2021 19:40
PowerShell Script to delete old BC Docker Images Except for base OS image
docker images --format "{{.Repository}}\t{{.Tag}}\t{{.ID}}" |
Select-String "businesscentral" -notMatch |
ConvertFrom-CSV -Delimiter "`t" -Header ("Repository","Tag","ID") |
Sort-Object Tag | % ID | % { docker rmi $_ }
page 50200 FastTabTest
{
Caption = 'FastTabTest';
PageType = Card;
SourceTable = Customer;
layout
{
area(content)