Aditya Chatterjee's Blog, page 132

January 5, 2022

Basics of XML

Over the course of this article, we shall explore what XML is, its uses and advantages and then, basic syntax as well how XML documents are written. Let's begin!

Table of contents:

What is XML?Advantages of XMLVersions of XMLGetting startedXML VocabulariesXML parsersValidation of XMLXML NamespacesApplications of XMLAlternatives to XMLWhat is XML?

XML stands for Extensible Markup Language. It was developed to encode data and information in a format that could be easily interpreted by ...

 •  0 comments  •  flag
Share on Twitter
Published on January 05, 2022 03:14

January 4, 2022

Cayley’s formula

In this article, we have explained the idea of Cayley’s formula which is used to find the number of trees with N nodes and M connected components. We have presented an implementation to calculate Cayley’s formula.

Table of contents:

Introduction to Cayley’s formulaGeneralizations of Cayley’s formulaImplementation of Cayley’s formulaIntroduction to Cayley’s formula

Let us say you were given n nodes and you were asked to find out how many trees you can form with the given nodes. How would you...

 •  0 comments  •  flag
Share on Twitter
Published on January 04, 2022 13:44

Design of a Lexical Analyzer

In this article, we discuss the design of a lexical analyzer and its role in lexical analysis, the first phase in compiler design.

Table of contents:Definitions.Generating a lexical analyzer.Non-deterministic finite automata.Deterministic finite automata.Structure of the generated lexical analyzer.Pattern matching based on NFA.DFAs for lexical analyzer.From RE to NFA to DFA.Implementing the lookahead operator.Dead states in DFA.Roles of the lexical analyzer.References.Definitions....
 •  0 comments  •  flag
Share on Twitter
Published on January 04, 2022 04:30

January 3, 2022

Check if 4 Line Segments form a Rectangle

In this article, we will solve the problem of Check if 4 Line Segments form a Rectangle. This is a core problem of Computational Geometry.

Table of contents:

Introduction to Problem StatementProperties of the RectangleSolving the problemTracing a Few ExamplesImplementing the SolutionTime and Space ComplexityIntroduction to Problem Statement

In this problem, 4 line segments are given. Each line segment is denoted by the co-ordinates of its starting point and ending point. The problem is t...

 •  0 comments  •  flag
Share on Twitter
Published on January 03, 2022 23:35

Rename Conda Environment (2 commands)

In this article, we have demonstrated commands using which you can rename a Conda environment. It is not directly possible to rename a conda environment but there are work-arounds.

Table of contents:

Step 1: Find the Conda environment to cloneStep 2: Get out of the environmentStep 3.1: Rename using Clone commandStep 3.2: Rename by moving filesWhy rename a Conda environment?Step 1: Find the Conda environment to clone

To find the name of the environment you want to clone, we can get the lis...

 •  0 comments  •  flag
Share on Twitter
Published on January 03, 2022 21:11

Clone Conda Environment (3 techniques)

In this article, we have presented commands to clone a Conda environment that is to create a duplicate conda environment with a new name. There are multiple options like using clone command, update command or copy files directly.

Table of contents:

Step 1: Find the Conda environment to cloneStep 2: Get out of the environmentStep 3: Clone the Conda EnvironmentAlternative to Step 3: Clone the Conda Environment using updateCopy Directory directly?Why to clone a Conda Environment?Step 1: Fin...
 •  0 comments  •  flag
Share on Twitter
Published on January 03, 2022 14:30

Delete Conda Environment (7 commands)

In this article, we have explained and presented 7 commands to delete a Conda environment permanently. We can delete a conda environment either by name or by path.

Table of contents:

Step 1: Find the Conda environment to deleteStep 2: Get out of the environmentStep 3: Delete the Conda Environment (6 commands)Delete Directory directly?Why to delete a Conda environment?Step 1: Find the Conda environment to delete

To find the name of the environment you want to delete, we can get the list of...

 •  0 comments  •  flag
Share on Twitter
Published on January 03, 2022 14:08

Clearfix in Bootstrap

In this article, we have covered Clearfix in Bootstrap in depth. It is an alternative to Canvas. Clearfix is a straightforward way for removing the floating of an element in a container that is linked to its child element without the need of any additional markup.

Table of contents:

Introduction to Bootstrap + ClearfixIs Clearfix on its way out?Compatibility with BrowsersIntroduction to Bootstrap + Clearfix

When we're drawing the next layout for our new project, we never have enough power i...

 •  0 comments  •  flag
Share on Twitter
Published on January 03, 2022 01:30

Return value of main() in C / C++

The return value of main() function shows how the program exited. The normal exit of program is represented by zero return value. If the code has errors, fault etc., it will be terminated by non-zero value.

Table of contents:

main() in C / C++The exit() functionmain() in C / C++

Here is the syntax of main() function in C/C++ language,

int main() { // Your program return 0;}

 
The valid C/C++ main signatures are:

int main()int main(int argc, char* argv[])int main(int argc, char** ...
 •  0 comments  •  flag
Share on Twitter
Published on January 03, 2022 01:10

January 2, 2022

Image compression using K means clustering

In this article, we will look at Image Compression using K-means Clustering which is an unsupervised learning algorithm. This is a lossy Image Compression technique.

Table of Contents:

IntroductionK-mean Clustering AlgorithmImage Compression Using Kmeans ClusteringImplementation of Image Compression using Kmeans Clustering

Pre-requisites:

Image Compression: ML Techniques and ApplicationsK means clusteringDocument Clustering using K MeansIntroduction to Clustering AlgorithmsIntroductio...
 •  0 comments  •  flag
Share on Twitter
Published on January 02, 2022 08:13