The main difference between map and forEach is that the map method returns a new array by applying the callback function on each element of an array, while the forEach method doesn’t return anything.
How to install AWS CLI on Windows
1. Search in Google 2. Download the installer 3. Check if install successfully
Rabin Karp Algorithm – Character Match
When we have a string pattern and want to match it with the substring of a given string, what can we do? The tuition way is that we could use substring() to match in a for loop. But the Time Complexity would be O(N* L), N refer to the string length, L refer to the …
How to install gcloud CLI on Windows
1. Search “glcoud install” 2. Download the installer 3. Follow the prompts to finish the configuration 4. Set the Environment Path for Google Cloud CLI 5. Log in Google Cloud from terminal
How to create Kubernetes on Google Cloud
1. Create an account on Google Cloud, and search Kubernetes Engineer 2. Launch the Kubernetes Engine API 3. Name your cluster and create it
What is Kubernetes?
In short, an orchestrator (like Kubernetes) brings together a set of microservices and organizes them into an application that brings value. It also provides and manages cloud-native features such as scaling, self-healing, and updating. OS of the cloud “Abstracting and commoditizing infrastructure” is a fancy way of saying that Kubernetes makes it so you don’t …
What is Cloud Native & Orchestrator?
What is Cloud Native In one of my interview, for a cloud based position, I asked my interviewer a question at the end, "could you give some advice to be a real cloud engineer?". And the answer I get is, "you can play with some cloud native things". So what is Cloud Native? A cloud-native …
How to iterate HashMap in Java
Iterate the Entry // Java program to demonstrate iteration over // Map.entrySet() entries using for-each loop import java.util.Map; import java.util.HashMap; class IterationDemo { public static void main(String[] arg) { Map<String,String> gfg = new HashMap<String,String>(); // enter name/url pair gfg.put("GFG", "geeksforgeeks.org"); gfg.put("Practice", "practice.geeksforgeeks.org"); gfg.put("Code", "code.geeksforgeeks.org"); gfg.put("Quiz", "quiz.geeksforgeeks.org"); // using for-each loop for iteration over Map.entrySet() for …
Enable an Image to Be Parameterized in Docker
Create a .js file var radius = process.env.diameter / 2; var area = Math.pow(radius, 2) * Math.PI; console.log( `Area of a ${radius} cm radius disk: ${area} cm²` ); Create a file named Dockerfile and add the following code to it: FROM node:11-alpine ENV diameter=4.0 COPY compute.js . CMD node compute.js Open a command-line. Change the …
Continue reading “Enable an Image to Be Parameterized in Docker”
Volume in Docker
When a container writes files, it writes them inside of the container. Which means that when the container dies (the host machine restarts, the container is moved from one node to another in a cluster, it simply fails, etc.) all of that data is lost. It also means that if you run the same container …