Automatically Resize All Columns to Fit in Ag-Grid
If you have an Ag-Grid, and want to automatically resize all the columns to fit the width of the viewport, you can use this hack.
In-depth guides, insights, and best practices for modern software engineering
If you have an Ag-Grid, and want to automatically resize all the columns to fit the width of the viewport, you can use this hack.
The easiest way to get the content of all rows’ data, back into a Javascript/Typescript array, is as follows.
Simply create a blank array, then …
Read Article →You are given an m x n binary matrix grid. An island is a group of 1‘s (representing land) connected 4-directionally (horizontal or …
Apache POI provides a mechanism to work with Excel documents.
However, it has a missing feature when you want to only create a new sheet if one with …
Read Article →Automatons, or Finite State Machines (FSM), are extremely useful to programmers when it comes to software design. You will be given a …
Read Article →You are given a string of n lines, each substring being n characters long. For example:
s = "abcd\nefgh\nijkl\nmnop"
We will …
Read Article →I will give you an integer. Give me back a shape that is as long and wide as the integer. The integer will be a whole number between 1 …
Read Article →Complete the solution so that it returns true if the first argument(string) passed in ends with the 2nd argument (also a string). …
Read Article →Git submodules are a way of including another repository’s code into an existing codebase, without associating it’s code or tracking …
Read Article →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 →