Using Python How Do You Write a Palindrome Tester with Special Requirements?

Problem scenario
You want to write a Python that will test if a string is a palindrome with two other requirements. One requirement is to not use a “::” (a colon pair) in the code. The second requirement is to search for a substring that is a palindrome if the full string is not a palindrome. This substring is not any substring however: it must include the leftmost character.

How Do You Use a PowerShell Command to Destroy an Azure VM?

Problem scenario
You have a server in Azure you no longer need. You want to save money by deleting it. What should you do to eliminate it?

Solution
Prerequisite
You need to know the server’s name and resource group. You can do this by finding the server in the Azure Portal.

Procedures
Run this command:

Remove-AzureRmVM -ResourceGroupName $nameOfResourceGroup -Name $nameOfVM

# Replace $nameOfResourceGroup with the name of the Resource Group. …

A List of Books on Site Reliability Engineering

Here is a list of SRE books:

How Do You Troubleshoot the Ansible Message “Syntax Error while loading YAML. expected , but found ””?

Problem scenario
You run an Ansible playbook with a variable. But you get this message: “ERROR! Syntax Error while loading YAML. expected , but found ”” (Ansible found blank single quotes or a double quote mark.)

How do you get the playbook to run?

Solution
Notice the “offending line” in the message. Remove the braces and possibly the quotes around the braces.

How Do You Troubleshoot the Message “Error: Config file not found: /usr/lib/jvm/java-9-openjdk-amd64/conf/management/management.properties”?

Problem scenario
You are trying to run Apache Zookeeper or some other application. You enounter the problem Error: Config file not found: /usr/lib/jvm/java-9-openjdk-amd64/conf/management/management.properties. What should you do?

Possible solution
This is a workaround. Run these commands:
sudo mkdir -p /usr/lib/jvm/java-9-openjdk-amd64/conf/management/
sudo touch /usr/lib/jvm/java-9-openjdk-amd64/conf/management/management.properties

Why Does Your Python Function Return None?

Problem scenario
Your Python function prints out the value of the variable immediately before it returns the variable.  When it is assigned via the “return” statement, the value is “None”.  You were expecting an integer or some other value.  What is wrong?

Solution
Does your function use recursion?  If it is using recursion rather than merely calling the function and it returns “None”,

How Do You Configure HeidiSQL to Work with Postgres?

Problem scenario
You have a Windows desktop computer with HeidiSQL installed on it. You have a Linux server with Postgres installed on it.  How do you get your SQL front end (e.g., Hiedi SQL), to work with the Postgres database?

Solution
Part 1 / From the back end:
1.
  Modify this file /etc/postgresql/9.5/main/postgresql.conf so this stanza is not commented out:
listen_addresses = ‘localhost’ 

# Make sure in the quotes there is a space and then the external IP address of the Postgres server.

How Do You Troubleshoot this Error “java.lang.ClassNotFoundException: com.mysql.jdbc.Driver”?

Problem scenario
In Linux you are trying to run a Java program that connects to a MySQL database. The program compiles, but it does not run. You get this error: “java.lang.ClassNotFoundException: com.mysql.jdbc.Driver” What should you do?

Solution

1. Set the CLASSPATH variable in two steps. First set it to where the .class file is for the Java file you are running.

What is a Jenkins Project?

Question
With the CI/CD pipeline, you hear about projects in the context of Jenkins. What is a Jenkins project?

Answer
A Jenkins project is a job. However, the term “job” is no longer used. Jenkins’ website defines a project as this: “A user-configured description of work which Jenkins should perform, such as building a piece of software, etc.” Taken from Jenkins’ website.

What is a Jenkins Node?

Question
You have read about Jenkins nodes. Cloudbees uses the term.

You have heard of the term “Jenkins slave” servers (which are configured to use their CPU and RAM according to the main Jenkins server’s needs). What is a Jenkins node?

Answer
A Jenkins node is a Jenkins slave server.

The main Jenkins website defines a node as “A machine which is part of the Jenkins environment and capable of executing Pipelines or Projects.