A library is a collection of modules and packages that together fulfills a specific requirement.
A python module is a .py file that has variables, functions, classes, statements etc. related to a specific task.
A package is a collection of python modules under a common namespace that is created by putting different modules on a single directory along with some special files (such as __init__.py). In order for a folder to be recognized as a package, a file named __init__.py must also be stored in that folder, even if this file is empty.
Note — A library can have one or more packages. …
The objective of this article is to create a python client which will send an HTTP request to the server that is running on express.js framework for downloading an image.
The code for this project is also available in my GitHub repository -
We’ll develop the back-end of this application in Node.js using Express.js framework. For that, let’s create a directory for our server application with the name myServer, which will contain the following files and folders.
We’ll open the terminal and navigate into this directory. …
In linear search, each element of the array/list is compared from the beginning to the end with the element entered to be searched for.
Linear Search is also called as sequential search .
In linear search, it is not compulsory to have the elements sorted. The elements can be in any order.
GeeksforGeeks describes Linked list as a linear data structure, in which the elements are not stored at contiguous memory locations. These elements are called as nodes. Each node contains a data field and a reference (link) to the next node in the list.
Few common types of linked lists are as follows —
According to GeeksforGeeks, Singly linked list is the simplest type of linked list in which every node contains some data and a pointer to the next node of the same data type. The node contains a pointer to the next node means that the node stores the address of the next node in the sequence. A single linked list allows traversal of data only in one way. …
I am writing this blog just to bring back all the memories of the basic concepts and terminologies that we learnt in our high school. I am going to discuss several topics in random manner and you can use this blog as your own personal notes just to have quick overview.
First of all, let us understand the meaning of procedural and non-procedural languages which is quite nicely explained by GeeksforGeeks.
In procedural languages, the program code is written as a sequence of instructions. User has to specify ‘what to do’ and ‘how to do’. These instructions are executed in a sequential order. …
The objective of this article is to develop an application for a hypothetical organization that will authenticate users and then it will allow them to perform CRUD operations on an employee database of the organization.
Our project is basically based on federated identity flow, which is described below.
The objective of this article is to implement the concept of access token and refresh token mentioned in the OAuth2.0 specification (RFC 6749). We’ll use JSON Web Tokens (JWT) for this purpose.
For more details about JWTs, please visit the following article.
This project is also available in my GitHub repository.
In this project, we’ll create two server applications viz. authentication cum authorization server and resource server. The functions of both the servers are described below.
(i) Authentication cum authorization server — This server will register new users and will enable them to log-in. On successful log-in, it will provide the users with access and refresh tokens, with the help of which the users will be able to access the resource. It will also generate new access tokens once it receives correct refresh token from the user. If the access token gets compromised/stolen from the user, then it will also have the ability to delete the refresh token from the database once the user requests for it. …
This blog is a compilation of various aspects of JSON Web Tokens collected from different sources viz. jwt.io, The JWT Handbook by Sebastián E. Peyrott (Auth0 Inc.) and RFC 7519. My main intention behind writing this blog is to go through it whenever I need to revise this topic.
According to jwt.io, JWT is an open standard claims representation format that defines a compact way for securely transmitting information between parties as a JSON object. This information can be verified and trusted because it is digitally signed. …
This blog deals with ECMAScript 2015 (ES 6) features and it is written by taking help from W3Schools.com.
According to MDN web docs,
this keyword is a property of an execution context (global, function or eval) that, in non–strict mode, is always a reference to an object and in strict mode can be any value.
In most cases, the value of
this is determined by how a function is called (runtime binding). It can't be set by assignment during execution, and it may be different each time the function is called. …