16 March 2022

The SSL connection could not be established between WebApp and WebApi

 Go to -> neget package manager console in visual studio and run below script 


> dotnet dev-certs https --trust

7 March 2022

Recursive user-defined function in SQL Server example

Recursive user-defined function

create function RecursiveTest(@V int)

returns @t table (i int)

as

   begin

   set @v = @v - 1

   if @v<>0

     insert into @t 

     select @v union 

     select * from dbo.RecursiveTest(@v)

   else

     insert into @t values (0)

   return

   end


How to Call Recursive user-defined function:

select * from dbo.RecursiveTest(10) 


Github Link: https://github.com/adi501/SQL-Server-Examples


How to compare two different date format in JQuery

 

<!DOCTYPE html>
<html>
  <head>
    <script src="js/jquery-3.6.0.js"></script>
    <script>
      $(document).ready(function () {
        var x =  new Date();
        var Date_y = "13-02-2024";
        split_y = Date_y.split('-');
        var y = new Date(split_y[2]+'-'+split_y[1]+'-'+split_y[0]);  
        if(new Date(x) <= new Date(y))
        {
            alert('y');
        }
        else{
            alert('x');
        }
      });
    </script>
  </head>
  <body></body>
</html>


 Github Link: https://github.com/adi501/JQuery-Examples