How to LowerCase a String in Python
Python comes with a built-in method on all String types, by calling lower() on a String, you can immediately lower the case of that String.
In-depth guides, insights, and best practices for modern software engineering
Python comes with a built-in method on all String types, by calling lower() on a String, you can immediately lower the case of that String.
So for some strange reason, your audio has stopped playing through the Macbook Pro speakers, but if you plug in an external audio device, it still …
Read Article →If you have a decimal number, and want to get it’s binary value, you can use the built-in bin method.
decimal = 32
binary = bin(decimal)
# …
Read Article →
A binary gap within a positive integer N is any maximal sequence of consecutive zeros that is surrounded by ones at both ends in the …
Read Article →Once you have a secret in Kubernetes, if you know it’s name, you can delete it.
You can get the secret name as …
Read Article →Secrets in Kubernetes are encoded using base64.
If you have the secret name, you can ask for its value. If not, then learn how to get a secret in …
Read Article →You have created a secret, and would like to retrieve it.
kubectl get secrets
This will result in:
NAME …
Read Article →
Secrets allow applications to not hardcode usernames, passwords or additional information such as hostnames, IP addresses or other protected/sensitive …
If you have a single-dimensional array, and want to break it into chunks, you can use the array_chunks method.
It takes 3 arguments:
Certbot allows simple, quick and free provisioning of SSL certificates using LetsEncrypt.
sudo snap …
Read Article →
If you have stored a secret in AWS using the Secrets Manager, it is possible to use the AWS CLI to retrieve this value at a later date.
aws …
Let’s call an integer number N ‘green’ if N² ends with all of the digits of N. Some examples:
5 is green, because 5² = 25 …
Once you have deployed an application into Kubernetes, it will not be available to the outside world.
For this to be possible, you need to expose it …
Read Article →If you find yourself needing to jump into a Kubernetes pod to either diagnose an issue, or run a particular command, you can use the bash connectivity …
In this comprehensive guide, you will learn how to effectively get and list environment variables within a Kubernetes pod. Understanding how to work …
Read Article →In Kubernetes, a cluster is a group of machines working together.
By running the kubectl cluster-info command, we can find out high level information …
The kubeconfig file is the main configuration file that allows access to a Kubernetes cluster.
When you first create your Kubernetes cluster, you are …
Read Article →Write a function which maps a function over the lists in a list:
public static <T,R> R[][] gridMap(Function<T,R> fn, T[][] …
Read Article →
Create a function that differentiates a polynomial for a given value of x.
Your function will receive 2 arguments: a polynomial as a …
Read Article →The task is simply stated. Given an integer n (3 < n < 10<sup>9</sup>), find the length of the smallest list of …
If you have come across this error when trying to build and deploy your Spring Boot Maven application then this post will help you!
Error: Failed to …
You’ve built a Java project and packaged a .jar file.
You are ready to run it outside your IDE, or deploy it somewhere.
When you run it using …
Read Article →So you just tried to do a git pull and got the following error:
error: The following untracked working tree files would be overwritten by merge:
If you have some HTML input submitted from a user to your application, before saving it to the database, you may want to strip all <script> tags …