In this post , we will be discussing about Retry decorator and how to use it in python.

Generally , we might have encountered many scenarios where we want to execute a piece of code until we get expected result or we may need to wait for the some operation should complete before proceeding further.

Before directly going to the implementation , I will explain a simple use case where I had to use retry decorator.

The use case is , there is an API with following endpoints:-

1.api/getData
2.api/status
3.api/data

api/getData , returns “id” instead of directly returning data…


In this post , we will learn about how we can show loader in Angular application using Ngx spinner library

Ngx-spinner is an angular library for loading spinner which supports Angular4+.

Follow below steps:

Step1:

Install ngx-spinner library using below command.

npm install ngx-spinner --save

Step2:

Update app.module.ts by importing NgxSpinnerModule as below.

Step3:

Now inject NgxSpinnerService in what ever you want to use as below.

As in the above code snippet , NgxSpinnerService has 2 methods show and hide which are responsible for showing and hiding the spinner.

Step4:

Now use <ngx-spinner></ngx-spinner> directive in your template.


Asynchronous validators are similar to synchronous validators where in synchronous validation will mostly a kind of validation at client side (client side validation) , but in asynchronous validation a request will made to your API to get the requested data and validate accordingly. Asynchronous validator returns observable if validation fails or returns null is validation passed.

Now , lets take an example where we can use Asynchronous validators. For example , in your application you are designing a feature to update the password of the user account.

Update feature form contains 3 form controls , old password , new password…


Unlike .net framework , .net core has provided built-in dependency injection feature. In order to register any service with Microsoft Dependency Injection Container , .net core provides with three different methods

  1. AddTransient
  2. AddScoped
  3. AddSingleton

AddTransient

If any service is registered with Transient lifetime , then always a new instance of that service is created when ever service is requested.

In the above code snippet , i have created an interface with one method.

I have created a class and implementing the interface IServiceLifetime.

In Startup file , i have injected our service as Transient scope.

In…


The following are some of the free sites available for hosting your applications.

  1. Netlify
  2. Heroku
  3. Github pages
  4. Versel
  5. Google cloud
  6. Firebase

This article will guide you on deploying Angular applications to Heroku assuming that you have an angular application developed and is ready to deploy and also assuming that your code base is available in Github repository . If your code base is not available in Github , create a repository and push your code to that repository . This article will cover:-

  1. Creating an account in Heroku website.
  2. Creating an App in Heroku.
  3. Deploying your App to Heroku.
  4. Configuring…

Why transactions?

Lets take an example . Suppose we have database operation where we need to insert a record into DB table and after successful insertion you need to perform some other operation like in my case i want to insert an image into azure blob.Now , if inserting into azure blob storage fails we have to delete the record from database for consistency in database. For such scenarios we can use transactions.

What are transactions?

A transaction is a set of operations where all of them must be successful or fail to ensure consistency that means the job is…

Dheeraj Thodupunuri

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