Aditya Chatterjee's Blog, page 196

August 23, 2020

Types of Load Balancing Algorithms

Types of Load Balancing Algorithms

In the previous article, we got an insight into the load balancer, what is a load balancer, how it works,different types of load balancer, and the companies which provide the load balancer.


If you haven't read that article

You can check it here : - Load Balancer


In this article, we will delve into the different types of load balancing algorithms. The different types of Load Balancing algorithms are:



Round-Robin
Weighted Round Robin
Least Connections
Hashing Methods
URL Hash Method
Source IP Ha...
 •  0 comments  •  flag
Share on Twitter
Published on August 23, 2020 00:44

August 19, 2020

Different Self Balancing Binary Trees

Different Self Balancing Binary Trees

A self-balancing binary tree is any tree that automatically keeps its height small in the face of arbitrary insertions and deletions on the tree. The height is usually maintained in the order of log n so that all operations performed on that tree take O(log n) time on an average. Now let us look at the most widely used self balancing binary trees, their complexities and their use cases. The various self balancing binary search trees are:



2-3 tree
Red-Black Tree
AVL tree
B tree
AA tree
Scapegoa...
 •  0 comments  •  flag
Share on Twitter
Published on August 19, 2020 23:10

“Show and Tell: A Neural Image Caption Generator” by Vinyals

This article explains the conference paper "Show and tell: A neural image caption generator" by Vinyals and others. Here we try to explain its concepts and details in a simplified manner and in a easy to understand way. This paper showcases how it approached state of art results using neural networks and provided a new path for the automatic captioning task.


Task

In a very simplified manner we can transform this task to automatically describe the contents of the image. This may sound simple as ...

 •  0 comments  •  flag
Share on Twitter
Published on August 19, 2020 22:46

August 18, 2020

Regex Expressions in Java

Regex -> Reg + ex i.e. Regular + Expressions


Regex Expressions are a sequence of characters which describe a search pattern. It is generally used for 'find', 'find and replace' as well as 'input validation'.

Most languages either contain regex expressions or contain the ability to create regex expressions such as Perl, Javascript et cetera. This article shall focus on how to write a Regex Expression in Java.


Writing Regex

Let us understand a regular expression with an example to check for a val...

 •  0 comments  •  flag
Share on Twitter
Published on August 18, 2020 06:19

Snake Game in Java (OOP design concepts)

In this article, we have explored how to design the classical Snake Game using Object Oriented Programming (OOP) concepts and implement it using Java.


Let us start immersing ourselves into it by fueling ourselves with some Nostalgia. Below is Snake Xenzia the Nokia.

snake_xenzia

The classic game that we are all acquainted with is actually surprisingly simple to implement and understand.


So lets get this straight, What do we need in our snake game?



A snake? Ofcourse!
Food for the snake!
A board.. where wil...
 •  0 comments  •  flag
Share on Twitter
Published on August 18, 2020 06:08

Introduction to 2-3 Trees

Introduction to 2-3 Trees

A 2-3 Tree is a tree data structure where every node with children has either two children and one data element or three children and two data elements. A node with 2 children is called a 2-NODE and a node with 3 children is called a 3-NODE. A 4-NODE, with three data elements, may be temporarily created during manipulation of the tree but is never persistently stored in the tree.

Introduction to 2-3 Trees

Nodes on the outside of the tree i.e. the leaves have no children and have either one or two data elements. All its...

 •  0 comments  •  flag
Share on Twitter
Published on August 18, 2020 05:48

August 17, 2020

A static Portfolio Website in Django

Reading time:30 minutes


In this article, we will be creating a static Django website and understand the structure of the Django framework. This article would cover all the commands for Windows users. For other operating systems, the commands are almost similar, you can find them on the net.


Pre-requisites for this article would be:



Basic Python
Basic HTML
Knowledge of CSS would be a plus
The basic working of Django

You can download a suitable version of Python officially from [here] (https://...

 •  0 comments  •  flag
Share on Twitter
Published on August 17, 2020 00:33

Solving Jigsaw Puzzles using Machine Learning

To solve Jigsaw Puzzles using Machine Learning, we have explored the paper "Unsupervised Learning of Visual Representations by Solving Jigsaw Puzzles". The paper describes a convolutional neural network (CNN) that aims to solve a pretext task, solving Jigsaw puzzles without manual labelling, and then to solve object classification and detection tasks.


Jigsaw-puzzles


The research in the paper has been done by Mehdi Noroozi and Paolo Favaro from University of Bern, Switzerland.


This paper introduces a new self...

 •  0 comments  •  flag
Share on Twitter
Published on August 17, 2020 00:23

August 16, 2020

Counting number of set bits (1) in a number (Brian Kernighan Algorithm)

Given an Integer and you have to count its set bits.


So here, Actually we have to find number of digits with value 1 in the given number when it is represented in its binary form.

i.e (5)10 = (0101)2

So number of count bits in 5 = 2

We have to just count number of 1's in given binary number.


We have explored two approaches:



Naive approach
Brian Kernighan Algorithm

Now how can we count ?


Naive Approach

As we know if we take AND of any number N with 1 then it returns the last or least signific...

 •  0 comments  •  flag
Share on Twitter
Published on August 16, 2020 14:30

Models in Django

Reading time:30 minutes


In this article, we'll be learning about Models in Django and how the database system works in Django.


How to store information?

Let us take an example, you want to create a social networking website in Django and we need a systematic way to define and store things such as user profiles and their details, posts, and their details, messages, comments, pages, and many more things. What do you think about how Django does that? How it will store this data?


Generally, when web...

 •  0 comments  •  flag
Share on Twitter
Published on August 16, 2020 11:39