Skip to content

Instantly share code, notes, and snippets.

View rruntsch's full-sized avatar

Randy Runtsch rruntsch

View GitHub Profile
@rruntsch
rruntsch / get_pk.sql
Last active March 22, 2022 19:02
Get the primary keys for all user-defined tables in the SQL Server database.
-- File Name: get_pk.sql
-- Description: Get the primary keys.
USE AdventureWorks2019;
GO
SELECT
SCHEMA_NAME(tab.schema_id) AS [Schema]
@rruntsch
rruntsch / get_fk_relationships.sql
Last active March 22, 2022 19:11
Get the foreign key relationships between SQL Server database tables.
-- File Name: get_fk_relationships.sql
-- Description: Get the foreign key relationships between tables.
USE AdventureWorks2019;
GO
SELECT
fk.name AS [Foreign Key Name],
-- File Name: get_columns.sql
-- Description: Get all schemas, user-defined tables, and columns in the SQL Server database
-- specified in the USE statement.
USE AdventureWorks2019;
GO
SELECT
@rruntsch
rruntsch / get_tables.sql
Last active March 22, 2022 19:07
This SQL query obtain end-user table metadata from SQL Server database system tables.
-- File Name: get_tables.sql
-- Description: Get all schemas and user-defined tables in the SQL Server database
-- specified in the USE statement.
USE AdventureWorks2019;
GO
SELECT
@rruntsch
rruntsch / c_video_frame_capture.py
Created January 20, 2022 17:16
The Python class c_video_frame_capture.py captures video frames as still image files in JPEG format
#
# Name: c_video_frame_capture.py
# Date: January 19, 2022
# Author: Randy Runtsch
#
# Description:
#
# The c_video_frame_capture class displays video from a webcam.
# When the user presses "p" it writes the a frame to a file
# as a JPEG image.
using System;
/* This program writes "Hello world!" to the console window.
It also demonstrates the use of multi-line comments. */
namespace CommentMulti
{
class Program
{
static void Main(string[] args)
using System;
// This program writes "Hello world!" to the console window.
// It also demonstrates the use of single-line comments.
namespace CommentsSingle
{
class Program
{
static void Main(string[] args)
using System;
namespace MainArgs
{
class Program
{
static void Main(string[] args)
{
if (args.Length > 0)
{
using System;
namespace HelloWorld
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello World!");
}
// C# introduction examples:
// Calling a method without and with parameters and
// without and with return values.
using System;
namespace hello_world
{
class Program
{