Aditya Chatterjee's Blog, page 155

September 13, 2021

Jinja Template for Django Framework

Jinja Template for Django Framework

In this article, we have explored the Jinja Template. Jinja is a modern, designer-friendly templating language for python, modeled after django templates and is widely used for execution.

Jinja Template for Django Framework

In a template, the variables can be replaced by placing relevant values.

Example:

{{ fruit }} is the national fruit of {{ country }}
Fruit: mango and country: india
Mango is the national fruit of india

Template engines are more often used in web apps.

An HTML example:

{{title}}{{header}}

{{body}}


I ...

 •  0 comments  •  flag
Share on Twitter
Published on September 13, 2021 11:21

September 12, 2021

Adding 2 integers as linked lists

In this article, we will represent an Integer as Singly Linked List and define an addition algorithm to add two integers as Linked Lists. This is used to add very large integers which is not stored in existing data types.

Table of Contents:

Linked listsAddition of two integers as linked listsAlgorithmRepresenting a number as a linked listsImplementationExampleTime and space complexityIntroduction to Linked lists

Linked lists are a type of data structure that stores data in a dynamica...

 •  0 comments  •  flag
Share on Twitter
Published on September 12, 2021 12:08

With statement in Python

In this article, we have covered what is the With statement in Python and how to use it along with the idea of Context Manager in Python.

Table of contents:

What is the With statement?Python Examples using the With statementHow does the With statement work?Context Manager and using With in User Defined Objects

Let us get started with the exploration of With statement in Python.

What is the With statement?

The With statement is a keyword in Python is used to provide exception handling functi...

 •  0 comments  •  flag
Share on Twitter
Published on September 12, 2021 11:51

100+ Graph Algorithms and Techniques [Complete List]

In this article, we have listed 100+ problems on Graph data structure, Graph Algorithms, related concepts, Competitive Programming techniques and Algorithmic problems. You should follow this awesome list to master Graph Algorithms.

There are different categories of problems like Topological Sorting, Shortest Path in Graph, Minimum Spanning Tree, Maximum Flow Problem, Graph Coloring Problem, Maximum Matching Problem and much more.

Basics of Graph Algorithms

These are basic ways to represent a Gra...

 •  0 comments  •  flag
Share on Twitter
Published on September 12, 2021 07:13

September 11, 2021

Word Embedding [Complete Guide]

Word Embedding [Complete Guide]

In this article, we have explained the idea behind Word Embedding, why it is important, different Word Embedding algorithms like Embedding layers, word2Vec and other algorithms.

Table of contents:

Introduction to Word EmbeddingIs Word Embedding Important?Word Embedding Algorithms
3.1. Embedding Layer
3.2. Word2Vec
3.2.1. Skip-Gram
3.2.2. Continuous Bag of Words (CBOW)
3.3. GloVeConclusion

Let us get started.

Introduction to Word Embedding

Maybe some of you that read this article have a basi...

 •  0 comments  •  flag
Share on Twitter
Published on September 11, 2021 15:49

Swap 2 variables [6+ techniques]

In this article, we have explored about Swapping of 2 variables. We have presented different methods to do so including swapping using third variable, using arithmetic operations, XOR, macro and much more along with their pros and cons.

Table of ContentsIntroduction to SwappingUsing a third variableUsing arithmetic operators and -Using arithmetic operators * and /Using bitwise XOR operator ^Using a macroOther MethodsUsing a file as bufferUsing a command-line-related variable as buff...
 •  0 comments  •  flag
Share on Twitter
Published on September 11, 2021 11:27

September 6, 2021

Two Pointer Technique in Array

In this article, we have explained the Two Pointer Technique/ algorithm in array which is used to solve a vast range of problems efficiently. Problems include Reversing an array and Find if a pair with given sum exists in a sorted array.

Table of contents:

Introduction to Two Pointer TechniqueExample Problem 1: Reverse an arrayExample Problem 2: Find if a pair with given sum exists in a sorted array

Let us get started with Two Pointer Technique.

Introduction to Two Pointer Technique

Two poin...

 •  0 comments  •  flag
Share on Twitter
Published on September 06, 2021 22:38

How to take string input in C?

In this article, we have explained how to take string input in C Programming Language using C code examples. We have explained different cases like taking one word, multiple words, entire line and multiple lines using different functions.

Table of contents:

String input using scanf Function
1.1. Reading One Word
1.2. Reading Multiple Words
1.3. Reading Multiple Words to Form a Line
1.4. Reading an entire lineUsing getcharReading Entire Line using gets()Read One Line at a Time from a File usi...
 •  0 comments  •  flag
Share on Twitter
Published on September 06, 2021 19:57

calloc() in C / C++

In this article, we have explained the use of calloc() function in C / C which is used for Dynamic Memory Allocation. We have explained it with code examples with different situations.

Table of contents:

What is Calloc?What is Dynamic Memory Allocation?Examples of calloc()calloc() vs malloc()calloc(): pros & cons

Let us get started with calloc() in C/ C .

What is Calloc?

The calloc() "contiguous allocation" function in C (and due to backwards compatibility: C ) allocates a block of mem...

 •  0 comments  •  flag
Share on Twitter
Published on September 06, 2021 09:07

September 5, 2021

System Design of GitLab

This article talks about the Gitlab system design with a simplified overview of its architecture as well as explanation on the working of the important Gitlab architecture components. The System Design of GitHub will be on similar lines.

GitLab is a web-based DevOps lifecycle tool that provides a Git repository manager providing wiki, issue-tracking and continuous integration and deployment pipeline features, using an open-source license, developed by GitLab Inc.

The simplified gitlab architectu...

 •  0 comments  •  flag
Share on Twitter
Published on September 05, 2021 13:58