What Do You Do if the Data Input Does Not Fit in Memory in Computer Programming?

Problem scenario
You have a massive amount of data to process. The amount is too big for the server you have. How do you write a program or algorithm to handle a very large set of data?

Possible Solution #1
Logically divide the memory by writing portions of the data to files. This is called “chunking” the data. Serially/sequentially process batches. Use external sorting with subfiles in parallel with multiple hard disks if the data set is very large.

How Do You Find out if UAC is Enabled on Your Windows Computer?

Problem scenario
You are using either Windows Server 2019 or Windows 10. You want to know if UAC is enabled or not. What should you do?

Solution
Open PowerShell. Run this:

If((Get-ItemProperty HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System).EnableLUA -eq 1) { echo “UAC is enabled”} Else {echo “UAC is NOT enabled”}

How Do You Write a Flask Program to Accept a Parameter in the URL?

Problem scenario
You want to pass a variable via a URL to a Python program. You want to use Flask for this. What do you do?

Solution
Prerequisite

Install Flask. If you need assistance, see this posting if you are using a CentOS/RHEL/Fedora server or this posting if you are using a Debian/Ubuntu server.

Procedures
This is a multi-route Flask program.

How Do You Change the Resolution of the Screen Size So You Can See the Entire Window/GUI Application?

Problem scenario
You are using a Windows or Mac laptop or workstation with an external monitor. In the external monitor when you maximize applications, you cannot see the very top or very bottom of the window. You cannot see the lower portion of the bottom toolbar or ribbon. How do you get the resolution to fit in the screen and not extend beyond your monitor’s size?

Solution
Root cause: The problem is not with the computer;

How Do You Sort a Dictionary in Python and Use It?

Problem scenario
You want to use a sorted dictionary in Python. What do you do?

Solution
Create a sorted list based on the dictionary’s keys. Use the list as keys to summon the dictionary’s values.

contint_dict = {}
contint_dict[”a_test”] = “123”
contint_dict[”b_test”] = “456”
contint_dict[”c_test”] = “789”
sorted_dict_list = sort1ed(contint_dict.items()) # sorted_dict_list is a list, not a dictionary.
list_of_keys = sorted(contint_dict.keys())

for key_pair in sorted_dict_list:
print(key_pair)

print(“”)
print(“Above are key-pairs. …

How Do You Troubleshoot “conntrack not found in system path” when You Run a kubeadm Command?

Problem scenario
You try to run “kubeadm init”, but you receive this error:

[ERROR FileExisting-conntrack]: conntrack not found in system path
[preflight] If you know what you are doing, you can make a check non-fatal with –ignore-preflight-errors=…

What should you do?

Solution
Install conntrack.

If you are using SUSE Linux run this:

sudo zypper -n install conntrack-tools

If you are using Debian/Ubuntu Linux:

sudo apt -y install conntrack

How Do You Troubleshoot the Flask Message “LookupError: the converter ‘str’ does not exist”?

Problem scenario
You are trying to pass a string parameter to a Flask application via a call to a URL. You get the message “LookupError: the converter ‘str’ does not exist.” What should you do?

Solution
Use the term “string” instead of “str”.

Here is an example of incorrect syntax:
@app.route(“/ccc/”, strict_slashes=False)

This shows the correct syntax:
@app.route(“/ccc/”,

What is Writing Your Own Provisioner in Terraform?

Question
You have heard there is such a thing as customer provisioners (not providers) in Terraform. What is a custom-built provisioner in Terraform?

Answer
There are generic provisioners such as “file”, “local-exec”, and “remote-exec”.

To learn about provisioners, see this: https://www.terraform.io/docs/language/resources/provisioners/

Custom provisioners exist; you can create your own provisioner beyond the generic three (“file”, “local-exec”, and “remote-exec”).