How Do You Start the Postgres Service on an Ubuntu Linux Server?

Problem scenario
You have Postgres installed on an Ubuntu Linux server.  You want to start the Postgres service. How do you do this?

Solution
Run this command:  service postgresql start

If you want to list the databases on the server, run these three commands:

sudo -i -u postgres
psql
\l

# To exit the psql command prompt,

How Do You Use C++ to Retrieve Data from a PostgreSQL Database on Ubuntu Linux?

Problem scenario:  You have C++ and Postgres installed on an Ubuntu Linux server.  How do you write C++ programs to retrieve data from Posgres databases?

Solution
Install the official C++ API for Postgresql.  These directions should work on any Debian distribution of Linux.

As root, do the following from the Linux command prompt:

apt-get -y install libpq-dev g++
cd /usr/bin/
curl http://pqxx.org/download/software/libpqxx/libpqxx-4.0.tar.gz >

How Do You Troubleshoot This PowerShell Error “Unable to initialize device PRN.”?

Problem scenario
When running a PowerShell script, you receive the error “Unable to initialize device PRN.”  

Solution
Use the “echo” reserved word instead of “print”.

PRN is what the Windows system name for printer (according to this external posting).

Optional:  If you want to buy a book on PowerShell, click here; you may also want to click here and search for “PowerShell”.

What Process Should You Choose to Automate with Robotic Process Automation?

Question
How do you know when a process should be scripted with image recognition and automated via robotic process automation (RPA)?

Answer
Business managers want to know what characteristics a process should have to be a good candidate for robotic process automation.  There are different criteria for selecting a process to automate with RPA.  Here are 10 traits of a software business process that using robotic process automation would add value.

Using PowerShell, How Do You Reverse the Individual Strings in a .txt File While Preserving the Top to Bottom Order of the Lines Themselves?

Problem scenario
You have a list of strings in a .txt file.  You want each string to be in the reverse order from left to right.  You want the strings to remain in their current order from top to bottom.  In other words, you want the content of each line to be reversed. Otherwise you want to preserve the lines in the file (row by row).  For example, the file looks like this:

abc
def
ghi

You want the PowerShell script to transform the above list into this as a separate and new file:

cba
fed
ihg

How do you write such a program?

How Do You Create a PowerShell Script to Filter a List by Removing Any Line That Matches Patterns or Strings in a Second File?

Problem scenario
You have two files.  One file is the main file you want to modify by removing lines that match specific patterns.  The second file has patterns (or strings) that should not be in a final, filtered list.   How do you filter a file to remove the patterns that match strings in another file?

Solution
# This assumes you want to ignore blank spaces in the second file.  

How Do You Install LAPP Using Ubuntu Linux?

Update October 2020: These were tested to work with Ubuntu 20.x.

Problem scenario
You want to install the four core components that compose the LAPP stack. That is you want to install Apache, Postgres and PHP on Ubuntu Linux (which comes with Perl pre-installed).  How do you do this?

Solution
1.  Install Ubuntu.  If you need directions, see this link.

How Do You Install Apache Web Server on Your Ubuntu Server when You Receive an Error about “no installation candidate”?

Problem scenario
You tried this command: sudo apt-get install httpd
But you got this error message as a result:

“…E: Package ‘httpd’ has no installation candidate”

You tried this command as root:  

apt-get install apache2-bin 2.4.7-1ubuntu4.13

But you get this error message as a result:

Reading package lists… Done
Building dependency tree
Reading state information… Done
E: Unable to locate package 2.4.7-1ubuntu4.13
E: Couldn’t find any package by regex ‘2.4.7-1ubuntu4.13’

How do you install Apache web server on your Ubuntu server?

How Do You Transfer Data without Using Network Connectivity from a Smart Phone or Tablet to a USB Stick?

Problem scenario
You have a smart phone (iOS, Android, BlackBerry, Microsoft Lumia, Windows 10 Mobile, or Windows Phone etc.) and you have a limited data plan.  You want to copy over (or bring/move) files (e.g., numerous photos).  The problem is that you do not want to use hundreds of megabytes of data from your roaming MiFi/3G/4G monthly plan.  It takes a great deal of manual labor to select the files and then transfer them (e.g.,