As most of the diseases arising out of the stomach, nauli kriya is a great way to strengthen and be disease-free from the inside out.

Nauli is one of the six Shatkarmas, purifications used in traditional hatha yoga.

1. Kapalabhati [breathe rapidly]

2. Tratak [gaze at point until eyes water]

3. Neti [run oiled thread in nostril, out of mouth]

4. Dhauti [swallow long cloth, remove]

5. Nauli [rotate belly muscles left and right]

6. Basti [Squat in water, pipe in rectum, pulse muscles, to draw water into gut]

Nauli exercise is claimed to serve the cleaning of the abdominal…


Fixing “Refactor this code to not nest more than 3 if/for/while/switch/try statements.”

Sonar: Control flow statements “if”, “for”, “while”, “switch” and “try” should not be nested too deeply
JAVA: NestedIfDepth
Nested if, for, while, switch and try statements is a key ingredient for making what’s known as “Spaghetti code”. Such code is hard to read, refactor, and therefore maintain.

Noncompliant Code Example

The following code snippet illustrates this rule with the default threshold of 3. bool conditionA = executeStepA(); if (conditionA){ // Compliant — depth = 1 bool conditionB = executeStepB(); if (conditionB){ // Compliant — depth = 2 bool…


The Tower of Hanoi (also called the Tower of Brahma or Lucas’ Tower[1] and sometimes pluralized as Towers) is a mathematical game or puzzle. It consists of three rods and a number of disks of different sizes, which can slide onto any rod.

The puzzle starts with the disks in a neat stack in ascending order of size on one rod, the smallest at the top, thus making a conical shape.

The objective of the puzzle is to move the entire stack to another rod, obeying the following simple rules:

  1. Only one disk can be moved at a time.
  2. Each…

Breadth-first search (BFS) is an algorithm for traversing or searching tree or graph data structures. It starts at the tree root (or some arbitrary node of a graph, sometimes referred to as a ‘search key’[1]), and explores all of the neighbor nodes at the present depth prior to moving on to the nodes at the next depth level.

BFS of the graph will be

[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]

Applications of Breadth First Traversal

  1. Shortest Path and Minimum Spanning Tree for unweighted graph In an unweighted graph, the shortest path is the path with the least number of…

In this article, we are going to understand various aspects that come into play, before we start using OAuth2 and OpenId Connect. Thanks to Keith Casey.

What OAuth and OpenID Connect are?

OAuth: Fundamentally, OAuth is an authorization framework. It gives you a consistent pattern to request, receive, and apply authorization policies across resources.

Before you understand OAuth you need to understand “Authentication” versus “Authorization”.
Authentication is who you are while authorization is what you can do.”
Authorization depends on authentication but they’re not interchangeable.

My favorite analogy here is checking in to a hotel: When you check in to…


Overview:

The AWS Cloud Development Kit (AWS CDK) is a software development framework for defining your cloud infrastructure in code and provisioning it through AWS CloudFormation.

Use the AWS CDK to define your cloud resources in a familiar programming language. The AWS CDK supports TypeScript, JavaScript, Python, Java, and C#/.Net.

Why use the AWS CDK?

· A small CDK class produces an AWS CloudFormation template of more than hundreds of lines; · Use logic (if statements, for-loops, etc) when defining your infrastructure · Use object-oriented techniques to create a model of your system · Define high-level abstractions, share them, and publish them to your team, company…


Prequesits

Docker for windows
Powershell

Installing kubectl

Download kubectl from https://kubernetes.io/docs/tasks/tools/install-kubectl/#install-kubectl-binary-with-curl-on-windows

Copy “kubectl” to “D:/kube” folder
Add in evn’ variable path “D:/kube”
Verify using “kubectl version — client”

Installing minikube

Download from https://kubernetes.io/docs/tasks/tools/install-minikube/

copy this to D:/kube


Prerequisite

Before proceeding, we need to have the following already running.

1. Git and GitHub access
2. Docker for windows
3. Kafka local setup [https://medium.com/@catchanilonline/apache-kafka-setup-in-windows-420f3cfd33b9]

Setup

  1. Check out the code from below git link to your local folder
    https://github.com/simplesteph/kafka-stack-docker-compose"

2. In command prompt enter the below command to start

D:\kafka\kafka-stack-docker-compose-master>

docker-compose -f zk-multiple-kafka-multiple.yml up


Prerequisite

Before proceeding, you need to have java installed.

Download link

Download the latest binary from https://kafka.apache.org/downloads

Setup

  1. Download and unzip, I have downloaded it into

“D:\kafka\”

2. Add below path in environment variables path

D:\kafka\bin\windows

3. Create three folders :

D:\kafka\data
D:\kafka\data\kafka
D:\kafka\data\zookeeper

D:\kafka\data>tree
D:.
├───kafka
└───zookeeper

4. Edit the file “D:\kafka\config\zookeeper.properties”

replace
dataDir=/tmp/zookeeper
with
dataDir=D:/kafka/data/zookeeper

Run below command

D:\kafka>zookeeper-server-start.bat config\zookeeper.properties


Prerequisite

Before proceeding, you need to have java and Kafka installed.
For Kafka setup refer to https://medium.com/@catchanilonline/apache-kafka-setup-in-windows-420f3cfd33b9

Setup

  1. Make three new copies of “server.properties” in “D:\kafka\config” as server0.properties
    server1.properties
    server2.properties

2. Update these properties as shown below

in “server0.properties” file
broker.id=0
log.dirs=D:/kafka/data/kafka0
listeners=PLAINTEXT://your.host.name:9092

in “server1.properties” file
broker.id=1
log.dirs=D:/kafka/data/kafka1
listeners=PLAINTEXT://your.host.name:9093

in “server2.properties” file
broker.id=2
log.dirs=D:/kafka/data/kafka2
listeners=PLAINTEXT://your.host.name:9094

3. Create three new folders in “D:/kafka/data” as kafka0, kafka1, kafka2

Anil Thirunagari

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store