Skip to content

Instantly share code, notes, and snippets.

mattslay / CallStoredProc.prg
Created December 9, 2019 19:58
Call a Stored Procedure using West Wind wwBusiness for FoxPro
This.oSQL.AddParameter(lnJobID, "JobID")
lcStoredProc = "[BillingRegister].[GetTimeRecordsByJobId]"
lnReturn = This.ExecuteStoredProcedure(lcStoredProc, lcCursor)
If lnReturn < 0
This.SetError("Error calling Sql Server Stored Proc: " + lcStoredProc)
mattslay /
Last active September 14, 2019 06:47
What percentage of the Sun's energy hits the Earth
mattslay / AnotherBubbleSortExample.cs
Last active September 14, 2019 00:12
Another Bubble Sort example in C#
// Taken from:
using System;
class BubbleSort {
static void Main(string[] args) {
Console.WriteLine("Enter the Size of Array");
int size = int.Parse(Console.ReadLine()); //Read array size.
Console.WriteLine("Enter the Array elements");
mattslay / BubbleSort.cs
Last active September 14, 2019 00:11
Bubble Sort example in C#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BubbleSort
class Program
mattslay / query software installed on list of machines.ps1
Created October 19, 2018 13:03
PowerShell - Query software installed on list of machines
$machines = 'MSPC5', 'JRPC5', 'CWPC5', 'RPPC5', 'TMPC4', 'MIPC5', 'TWPC5', 'JBPC5', 'DNC2', 'FS6-VM1', ''
foreach ($machine in $machines)
trap{"$machine`: not reachable or not running WsMan"; continue}
if(test-wsman -ComputerName $machine -ea stop){
$result = gcim -Class CIM_Product -Filter 'Name like "%DWG%"' |
select name, version
Write-Host $machine $, $result.version
mattslay / quickmove.js
Created December 7, 2017 16:29
Thunderbird Quick Folder Move
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at
* Portions Copyright (C) Philipp Kewisch, 2009-2013 */
"use strict";
try {
} catch (e) {
# Adapted from here
# Also see this one:
<# This simple PowerShell routine scripts out all the user-defined functions,
stored procedures, tables and views in all the databases on the server that
you specify, to the path that you specify.
SMO must be installed on the machine (it happens if SSMS is installed)
To run – set the servername and path. Open a command window and run powershell
mattslay / msUtils.prg
Last active October 17, 2016 19:13
Matt Slay general FoxPro utils, aka msUtils
import math
class cylinder(object):
feature_type = "cylinder"
def __init__(self, diameter, length):
self.diameter = diameter
self.length = length
self._start_z = 0.00
mattslay /
Last active June 27, 2016 00:54
Basic getting started with html and

This a small collection of getting-started-with-html-and-javascript samples that I created for coding beginners. Each link takes you to a code page hosted on jsFiddle where you can see the html/javascript code and how it renders on the screen. You can also play with the code in the jsFiddle editor to begin your own exploration and tinkering with html/javascript.

(Look for comments on each example in the lower javascript panel of the jsFiddle page.)

[00.0 - Basic HTML web page layout] (

  • the most basic sections of an html page: DOCTYPE, html, body

[00.1 - Introducing a few basic HTML elements] (

  • h1, h2, p, strong, em, u