Understanding Linux Releases and Upgrades

Posted in software by Christopher R. Wirz on Tue Aug 03 2021

The release and flavor of linux you use is less important than the kernel.

Read More

Compiling PGAudit in Visual Studio 2019

Posted in software by Christopher R. Wirz on Mon Apr 12 2021

There are many tutorials to compile PGAudit on Windows, but using Visual Studio and an installed version of PostgreSQL, it is dead simple.

Read More

A basic Rust HTTP server

Posted in software by Christopher R. Wirz on Sun Apr 04 2021

The rust language can be used to create a high-performance HTTP server.

Read More

Net SNMP 5.9 in Docker

Posted in software by Christopher R. Wirz on Fri Aug 21 2020

Net SNMP 5.9 includes blumenthal-aes, which provides cisco compliant AES256 for SNMP testing.

Read More

Interrupt Performance Considerations in DotNet (C#)

Posted in software by Christopher R. Wirz on Thu Jun 20 2019

The interrupt pattern is often viewed as less performant than graceful checking... But what if the exception case rarely happens?

Read More

Calling Excel from C++ in 2019

Posted in software by Christopher R. Wirz on Fri Jan 18 2019

C++ performs efficient data processing, and Excel helps with data exploration. For Visual Studio 2019, you can still use C++ to call the Excel API.

Read More

Using ImageMagick to Resize images in DotNetCore 2.0

Posted in software by Christopher R. Wirz on Sat Dec 29 2018

Sometimes System.Drawing doesn't work in your runtime environment. ImageMagick is an alternative.

Read More

Resizing Graphics for iOS 12 Loading Image using DotNetCore 2.0

Posted in software by Christopher R. Wirz on Fri Dec 28 2018

With the latest iOS12+, new image assets have been added to support iPhone X+ resolutions. You can make these images easily in an AWS Lambda function using DotNetCore 2.0.

Read More

OpenCV Convolution (filter2D) Does Not Rotate

Posted in software by Christopher R. Wirz on Sat Dec 22 2018

Some libraries produce image convolutions assuming the kernel is rotated 180 degrees - OpenCV does not.

Read More

Custom Fields for TFS Work Items

Posted in software by Christopher R. Wirz on Tue Nov 27 2018

With Work Item Tracking Administration (witadmin), you can modify XML definition files to support the On-premises XML process model. For an overview of process models and what is supported.

Read More

A C# P/Invoke Alternative that works with a PlugIn Architecture

Posted in software by Christopher R. Wirz on Thu Nov 15 2018

PInvoke is fine if you only have one DLL, but what if you have a PlugIn Architecture?

Read More

C++ PlugIn Architecture in Ubuntu 18.04

Posted in software by Christopher R. Wirz on Mon Oct 15 2018

Using shared object files, dynamic linking at runtime can be used to create a PlugIn architecture.

Read More

C++ PlugIn Architecture in Windows 10

Posted in software by Christopher R. Wirz on Wed Oct 10 2018

Using a compiled DLL with a C-Style API, you can create a PlugIn architecture using the Windows API.

Read More

Adding Get/Set Logic to Bracket [] Operator Overloads in C++

Posted in software by Christopher R. Wirz on Tue Sep 25 2018

Using a pointer wrapper, set/get logic can be added to array-like classes which implement the bracket [] operator.

Read More

ActiveMQ on Windows NanoServer using Docker

Posted in software by Christopher R. Wirz on Wed Sep 12 2018

Using a multi-stage build, you can run ActiveMQ in a Windows NanoServer Docker container.

Read More

NodeJS on Windows NanoServer using Docker

Posted in software by Christopher R. Wirz on Tue Sep 11 2018

Using a multi-stage build, you can take certain benefits of a larger image and use select features on the image which ultimately gets deployed.

Read More

Reference Counting Class Objects in C++

Posted in software by Christopher R. Wirz on Wed Jul 04 2018

In C++ objects can be passed by value or reference. But what if the object holds reference to allocated memory?

Read More

Linq-ing XML Specific Types (and how to overcome a .Net bug)

Posted in software by Christopher R. Wirz on Thu Jun 28 2018

Fixing the "The specified type was not recognized: name=" bug.

Read More

SimpleImageCache iOS Swift4 Refresh

Posted in software by Christopher R. Wirz on Wed Jun 06 2018

SimpleImageCache allows a UIImageView to update when an image is downloaded or retrieved from disk.

Read More

Cuda Template Kernels using atomicAdd

Posted in software by Christopher R. Wirz on Sun May 27 2018

Newer CUDA versions allow for C++ style template kernels, but this capability needs to be wrapped to enable templated C style API functions.

Read More

Building install tarballs for ubuntu containers

Posted in software by Christopher R. Wirz on Fri May 25 2018

When you deploy docker containers on edge networks, it is helpful to keep the install files with them - but you also have to include all dependencies.

Read More

Running a WCF service in Docker

Posted in software by Christopher R. Wirz on Tue May 22 2018

Windows Communication Foundation (WCF) services in docker containers.

Read More

Project Highlight: ffmpeg-windows-build-helpers

Posted in software by Christopher R. Wirz on Fri May 04 2018

The ffmpeg-windows-build-helpers allows you to easily configure and run the FFmpeg build chain.

Read More

Raw HTTPS requests using Java

Posted in software by Christopher R. Wirz on Mon Apr 02 2018

Using java to make HTTPS requests using raw TCP SSLSockets.

Read More

A Demonstration of Object Pointers in C++

Posted in software by Christopher R. Wirz on Sun Feb 18 2018

Pointer incrementing moves differently through memory based on the structure you are pointing to.

Read More

C API string array returns in C++

Posted in software by Christopher R. Wirz on Mon Feb 12 2018

Certain C APIs use the much-dreaded triple pointer to return an array of strings (character arrays).

Read More

Attaching an installation CD to a VM using Power CLI (VMware)

Posted in software by Christopher R. Wirz on Thu Feb 08 2018

Using PowerShell, a VM can have an install CD automatically attached.

Read More

VM Management through Power CLI and C#

Posted in software by Christopher R. Wirz on Tue Feb 06 2018

VMWare PowerShell Command Line Interface (CLI) can be used to automate VM deployment.

Read More

Little Endian Indexing in C++

Posted in software by Christopher R. Wirz on Sun Jan 28 2018

In C++ bit shift operators help show bytes and bits are laid out low to high (on x86 anyway).

Read More

Docker Commands Getting Started

Posted in software by Christopher R. Wirz on Sat Jan 13 2018

These commands make use of the Docker Command Line Interface (CLI) to build up and take down a Docker environment.

Read More

Starting and Debugging Processes Programmatically in C# with EnvDTE

Posted in software by Christopher R. Wirz on Mon Dec 18 2017

EnvDTE lets you debug into processes by attaching them to an already-running debug application.

Read More

Adding a Column to a DataFrame Based on Web Data in Python in Azure ML

Posted in software by Christopher R. Wirz on Fri Oct 13 2017

AzureML allows for Python Execution modules, which can be used to fetch Web Data.

Read More

.NET Standard 2.0 Initializer String Generation using Reflection

Posted in software by Christopher R. Wirz on Sun Sep 24 2017

Using reflection, you can generate the C# code used to reproduce an instance of your class objects' public members.

Read More

Basic use of Labelizer using Pandas in Python

Posted in software by Christopher R. Wirz on Sun Sep 17 2017

Labelizer turns categorical data into numerical columns that can be modeled in sykit learn.

Read More

Inherited sequential layout in C++

Posted in software by Christopher R. Wirz on Sat Sep 16 2017

Inheritance has gaunted precedence for memory layout in C++.

Read More

Basic normalization using Pandas in Python

Posted in software by Christopher R. Wirz on Fri Sep 15 2017

It is best practice to normalize the data, but these methods aren't exposed out-of-the-box.

Read More

No Privacy in C++

Posted in software by Christopher R. Wirz on Mon Sep 11 2017

C++ uses sequential memory, which is fast by provides access to private fields - whether you like it or not.

Read More

C Sharp Reflection hack to call any class or any method.

Posted in software by Christopher R. Wirz on Mon Aug 14 2017

Using reflection, it is possible to create a singleton for any class or call any method (it's a feature).

Read More

C Sharp Reflection hack to determine implicit default constructor vs. declared constructor

Posted in software by Christopher R. Wirz on Mon Jul 24 2017

Using reflection, it is possible to determine if a given type has a specified constructor or an implicit constructor.

Read More

Managed C# Byte Arrays to Un-Managed C++ Byte Arrays

Posted in software by Christopher R. Wirz on Sat Jul 08 2017

Byte arrays are foundational in C#, but can be exchanged with native and re-usable C++ code.

Read More

Free Google SiteSearch with NodeJS

Posted in software by Christopher R. Wirz on Wed Jun 28 2017

SiteSearch is expensive, but using a NodeJS server you can easily wrap a web request.

Read More

Shimmer Like Facebook in Swift 3.0

Posted in software by Christopher R. Wirz on Tue Jun 06 2017

Adding a Shimmer effect to UIView through inspectable extensions.

Read More

Conditional Foreach Performance Considerations in DotNet (C#)

Posted in software by Christopher R. Wirz on Sat Jun 03 2017

For large data sets, canceling an iteration may have performance implications that are important to consider.

Read More

Foreach Performance Considerations in DotNet (C#)

Posted in software by Christopher R. Wirz on Fri Jun 02 2017

The method by which you iterate on collections may have performance implications. Arrays are faster than lists, but their enumerators are not.

Read More

C++ Unit Testing Redirecting stdout

Posted in software by Christopher R. Wirz on Mon May 22 2017

Visual Studio allows for C++ unit tests, but there is a major catch when trying to debug. Fortunately, we can capture stdout printf statements.

Read More

A simple Queue for iOS Swift

Posted in software by Christopher R. Wirz on Wed May 17 2017

Swift Foundation libraries do not come with a queue, but a custom queue can be powerful and easy to implement.

Read More

UTF-8 Serialization and Byte Arrays in C#

Posted in software by Christopher R. Wirz on Wed Mar 08 2017

The preferred approach to serialization in C# is to use XmlSerializer. While extremely convenient, there are a few small draw-backs.

Read More

Serving Static files with Node JS

Posted in software by Christopher R. Wirz on Mon Feb 13 2017

Node JS offers an advantage over other server types because you can elect to keep certain contents in the cache (in memory). This allows for faster transactions of static data as there are fewer read write operations to disk or database.

Read More

Type strings vs Reflection in C#

Posted in software by Christopher R. Wirz on Fri Feb 03 2017

Does reflection beat string comparison for type identification?

Read More

Type checking with strings in C#

Posted in software by Christopher R. Wirz on Thu Feb 02 2017

Does bookmarking your type using strings get you anything?

Read More

Weak Reference Lists (WeakLists) in C#

Posted in software by Christopher R. Wirz on Wed Dec 28 2016

WeakLists allow for a collection of class objects to self manage - or at least garbage collect regardless of inclusion in the WealkList.

Read More

Byte Array passwords in C#

Posted in software by Christopher R. Wirz on Tue Nov 08 2016

Byte arrays (byte[]) are preferred over strings for handling passwords and other sensitive data in memory over string object types.

Read More

Explicit to Implicit Cast Operators in C#

Posted in software by Christopher R. Wirz on Tue Oct 18 2016

Using a weak reference collection, explicit cast operators can function like implicit cast operators.

Read More

C# Implicit Cast Wrapping for Operators

Posted in software by Christopher R. Wirz on Wed Sep 28 2016

Extension methods must be in static classes, and static classes can't have operator overloads.

Read More

Partially Available Extension Methods in C#

Posted in software by Christopher R. Wirz on Sun Sep 18 2016

Some C# 3 features can be used in .NET 2.0 with a declaration. Extension methods require an attribute which is normally part of .NET 3.5.

Read More

Using System.Threading.EventWaitHandle to block for an event

Posted in software by Christopher R. Wirz on Fri Sep 02 2016

A developer can still hook onto an event, but now can return a value from the added execution body within a client method.

Read More

Monkey Patch Methods and Properties in JavaScript

Posted in software by Christopher R. Wirz on Wed Aug 03 2016

Javascript allows for prototype methods, but define properties can take place on the prototype as well.

Read More

Programmatically Running Unit Tests in C#

Posted in software by Christopher R. Wirz on Tue Jun 28 2016

Running a test outside of MS Test allows for an application to have a Built-In-Test (BIT).

Read More

Using the windows API to simulate keyboard input in C#

Posted in software by Christopher R. Wirz on Fri Apr 15 2016

Using the user32.dll library, C# can be used to simulate keystrokes.

Read More

Using the Windows API to emulate hardware input in C#

Posted in software by Christopher R. Wirz on Wed Apr 13 2016

C# is managed code, but parts of the Windows API were built before the introduction of C#. Fortunately, there are InteropServices to call the API

Read More

Base64 File Encoding using Javascript

Posted in software by Christopher R. Wirz on Sun Mar 13 2016

Encoding file information into a base-64 URI can easily be done in javascript

Read More

Base64 Encoded Image URIs

Posted in software by Christopher R. Wirz on Sat Mar 12 2016

Image data can be directly inserted into a HTML document using data URIs. This allows an entire HTML document to be loaded in a single request.

Read More

Data Contract type Detection in C#

Posted in software by Christopher R. Wirz on Thu Feb 18 2016

Using different serialization paradigms, one single set of extension methods can handle them all.

Read More

Styled GridSplitter handles in WPF

Posted in software by Christopher R. Wirz on Sun Feb 14 2016

A styled grid splitter can be accomplished in a single style resource using Windows Presentation Foundation (WPF).

Read More

Design Data in WPF

Posted in software by Christopher R. Wirz on Sat Feb 13 2016

When creating a WPF application, laying out design is easy, but making it look good with data doesn't have to be hard.

Read More

View Models as a WPF Dependency Property

Posted in software by Christopher R. Wirz on Wed Feb 10 2016

The DataContext of a user control is important for its interaction, but his can become even more dynamic when it is a dependency property.

Read More

Scraping Web Data with Excel [Macros]

Posted in software by Christopher R. Wirz on Wed Feb 03 2016

For simple cases, MS Excel macros can be used to make web requests - an even provide access to the Document Object Model (DOM).

Read More

Pointers References and Back in C++

Posted in software by Christopher R. Wirz on Thu Jan 28 2016

A C/C++ API can be written using pointers or references, since the conversion is loss-less.

Read More

Protecting files in NodeJS

Posted in software by Christopher R. Wirz on Thu Jan 21 2016

With NodeJS, you don't have htaccess, but there are other ways of protecting files.

Read More

Installing Redmine 3.0.1 on Openshift

Posted in software by Christopher R. Wirz on Wed Jan 13 2016

Redmine is a great tool for project management. While the source code is free, there are a limited number of options for hosting it affordably. Luckily, Openshift has a reasonable free tier that can support an instance of Redmine.

Read More

Resetting a 503-ed Openshift Ruby on Rails container using RHC

Posted in software by Christopher R. Wirz on Wed Jan 13 2016

Due to a long standing bug with InnoDB in MySQL, disk space on the database container may be exhausted and it's time to attach a new container to your application.

Read More

Sometimes you point to null in C/C++

Posted in software by Christopher R. Wirz on Mon Jan 11 2016

Sometimes you don't need to initialize a pointer when working with string arrays, you can set it to NULL.

Read More

C# Proper Task Passing (async await)

Posted in software by Christopher R. Wirz on Mon Dec 28 2015

The await keyword provides a non-blocking way to start a task, then continue execution when that task completes, but don't nest too many tasks.

Read More

Results of task cancellation in DotNet (C#)

Posted in software by Christopher R. Wirz on Tue Dec 22 2015

Task cancellation must be handled inside the task, but you can either interrupt the task with a throw or exit gracefully, completing the task.

Read More

Proper task cancellation in DotNet (C#)

Posted in software by Christopher R. Wirz on Sun Dec 20 2015

The delegate of a task should utilize the cancellation token in order to be effective.

Read More

Future-Proofing Access Connection Classes

Posted in software by Christopher R. Wirz on Sat Dec 12 2015

MS Access has changed its API over the years, and it's time to future-proof your connection classes.

Read More

Polymorphic collection serialization in C#

Posted in software by Christopher R. Wirz on Wed Nov 04 2015

XmlSerializer cannot serialize interfaces, yet SOLID principles implies that one should code to interfaces, not concrete types.

Read More

WPF Separate Style Resource

Posted in software by Christopher R. Wirz on Wed Oct 14 2015

The resource dictionary can combine multiple resource dictionaries through the MergedDictionaries declaration.

Read More

Define Properties in javaScript

Posted in software by Christopher R. Wirz on Tue Oct 13 2015

Javascript allows for defining properties in many ways, including set and get logic.

Read More

CoClass Serialization in C#

Posted in software by Christopher R. Wirz on Thu Oct 08 2015

Abstract classes and Interfaces serve different purposes, but neither allows for instantiation.

Read More

ConfigurationManager Default values in C#

Posted in software by Christopher R. Wirz on Mon Sep 14 2015

System.Configuration.ConfigurationManager.ConnectionStrings is a ConnectionStringSettingsCollection populated by the App.config. But, what if you don't want to share that file.

Read More

Hand Written Entity in C#

Posted in software by Christopher R. Wirz on Sun Sep 13 2015

Entity is an object-relational mapper that allows your code to work the same regardless of the database back end - but you don't need the designer to get started.

Read More

Creating triggers in Microsoft SQL

Posted in software by Christopher R. Wirz on Fri Aug 14 2015

If using MS SQL Server, this is how to setup a trigger.

Read More

Materialized Views in MySQL

Posted in software by Christopher R. Wirz on Thu Aug 13 2015

Forget expensive join operations. Your MySQL database needs to call materialized views.

Read More

Getting to the Root in Serialization using C#

Posted in software by Christopher R. Wirz on Thu Jul 30 2015

C# code generated from a schema is going to have many custom attributes. Sometimes, these attributes modify the behavior of serialization.

Read More

Programmatic Binding to Presentation Controls in C#

Posted in software by Christopher R. Wirz on Tue Jun 30 2015

Programmatic binding offers a slight advantage over XAML in that it will check the property names at compile time.

Read More

Relay Commands for Process Execution in C#

Posted in software by Christopher R. Wirz on Wed Apr 08 2015

Windows Presentation Foundation (WPF) controls have both an IsEnabled boolean property and a Click RoutedEventHandler which can be consolidated in the Command ICommand property.

Read More

Expression Bodied Members in C#

Posted in software by Christopher R. Wirz on Tue Jan 13 2015

Expression bodied members are a feature of C# 6.0 and provide an inline expression for properties (get only properties) and methods.

Read More

Creating SSL Certificates for Red-Hat

Posted in software by Christopher R. Wirz on Sat Jan 03 2015

These steps will help create an SSL certificate quickly for your server. Once complete, your website will support HTTPS.

Read More

Renaming a Database in MongoDB

Posted in software by Christopher R. Wirz on Wed Oct 15 2014

Renaming a database should be done with caution - and backups are advised before performing any database operations.

Read More

Pretty XML in C#

Posted in software by Christopher R. Wirz on Mon Aug 04 2014

XML serialization is a common technique for storing and transacting data objects when programming in C# but sometimes it is hard to understand the data hierarchy.

Read More

Automatic swift SDK updates in Mac OS

Posted in software by Christopher R. Wirz on Mon Jun 16 2014

Mac OS provides a scripting environment within the terminal to automate tasks such as downloading the latest SDK and updating it

Read More

Free SSL Options

Posted in software by Christopher R. Wirz on Sun May 11 2014

Having SSL enabled on your website helps with Search Engine Optimization, is recommended for membership, and is required to process financial transactions.

Read More

A common using statement mistake in C#

Posted in software by Christopher R. Wirz on Tue Feb 18 2014

Do not use code cleanup on using statements where writers are involved.

Read More

Using System.Threading.Task to call a remote broadcast service

Posted in software by Christopher R. Wirz on Fri Sep 13 2013

If a broker is over-loaded, it will be slow - but in most cases, remote services are executed in environments with more resources than local clients.

Read More

A Generic-Friendly PlugIn Framework in C#

Posted in software by Christopher R. Wirz on Mon May 13 2013

The goal of a PlugIn framework is to allow library files (DLLs) to be placed in a given given directory and become available to the main application.

Read More

Common Collections Explained

Posted in software by Christopher R. Wirz on Fri Apr 12 2013

There are many collection types in Java. Knowing which to use when can have several implications.

Read More

Position Based Mouse-Over in C#

Posted in software by Christopher R. Wirz on Thu Mar 28 2013

The user32 API and an extension method can be used to detect mouse position over a control.

Read More

etc/hosts and ad Blocking

Posted in software by Christopher R. Wirz on Thu Feb 28 2013

The internet host table specification is available in all operating systems. You can use it for ad blocking.

Read More

Filter and Sort in javaScript

Posted in software by Christopher R. Wirz on Fri Aug 03 2012

Javascript allows for filtering and sorting of arrays.

Read More

Mapping network drives at the command line - Ubuntu vs Windows

Posted in software by Christopher R. Wirz on Sun Apr 15 2012

Shared network folders provides interoperability between Linux and Windows, and mapping from each is equally easy.

Read More

Microsoft Project - Convert All SubTasks to Automatic Scheduling using Macros

Posted in software by Christopher R. Wirz on Sat Apr 07 2012

To transition from waterfall project management to kanban, schedule must be derived from work and not the other way around.

Read More

Trimming strings in C++

Posted in software by Christopher R. Wirz on Mon Apr 02 2012

C++ doesn't include a trim() method for std::string, but making one is easy.

Read More

Adding Subtract to Linq

Posted in software by Christopher R. Wirz on Thu Mar 22 2012

Linq allows for interaction with collections of objects, but lacks a way to remove elements based on a given criteria.

Read More

Adding IndexOf to Linq

Posted in software by Christopher R. Wirz on Thu Mar 15 2012

Linq allows for interaction with collections of objects, but is missing the IndexOf feature.

Read More

Calling C# from Excel using COM

Posted in software by Christopher R. Wirz on Sat Mar 03 2012

You don't have to go the distance to make an excel AddIn, just register for COM to expose all the functionality you need.

Read More

Numeric Type Detection in C#

Posted in software by Christopher R. Wirz on Sat Mar 03 2012

C#'s Type object does not have an IsNumeric method or property. This is how to make one using extension methods.

Read More

The using Statement and Members

Posted in software by Christopher R. Wirz on Sat Feb 18 2012

Do not use the using statement on class members if you can avoid it.

Read More

Adding properties to C++ 11 like C#

Posted in software by Christopher R. Wirz on Thu Feb 02 2012

C++ doesn't come with properties, but there are ways to add them

Read More

C++ Matrix Structure and Access Pattern Considerations

Posted in software by Christopher R. Wirz on Wed Jan 25 2012

There are many ways to define a Matrix in C++, but maybe it makes more sense to do it one row at a time.

Read More

Reading RSS with jQuery

Posted in software by Christopher R. Wirz on Sun Aug 14 2011

Really Simple Syndication (RSS) is xml that can be easily read using jQuery.

Read More

Linq Distinct Classes in C#

Posted in software by Christopher R. Wirz on Wed Aug 10 2011

Distinct() returns distinct elements from a sequence using the default equality comparer to compare values - preferably the methods of the IEquatable interface.

Read More

Linq Casting Issues in C#

Posted in software by Christopher R. Wirz on Thu Aug 04 2011

Cast and OfType are two methods provided by Linq - however their behaviors are significantly different.

Read More

A Common bug in C# when using Inheritance and Constructor Bodies

Posted in software by Christopher R. Wirz on Wed Jun 29 2011

C# adds some modern flair with the ability to have inline constructor chains as well as constructor bodies and optional parameters.

Read More

A little about APIs (why this site has none)

Posted in software by Christopher R. Wirz on Fri Jun 24 2011

Were you expecting an API here? This site is written Node JS so that content is in memory!.

Read More

Considerations in calling .bat files from .bat files

Posted in software by Christopher R. Wirz on Sun Aug 03 2008

Batch files (.bat) can be used for automated tasks or running programs with no user interface.

Read More