How to convert Promise to Observable in Angular?

How to convert Promise to Observable in Angular? Angular by default returns Obserable when you invoked HTTP client methods. But let’s assume that you have a function that returns a promise. In this case, you can easily change…

How to measure time taken by a function to execute

In this post, I will show you how to measure the execution time of any function in Javascript. Javascript console api have two functions console.time and console.timeEnd . console.time - start the timer console.timeEnd …

Create Compiler In C# Using ANTLR-Crash Course

Unless it is a hobby project, the vast majority of programmers should avoid writing their own compiler. You should write your own compiler or interpreter because you have a unique idea for a programming language that is not al…

RSA encryption/decryption C# example

There are two classes for asymmetric encryption in .net. RSACryptoServiceProvider and DSACryptoserviceProvider . With the default constructor, both classes automatically create the public and private keys necessary to encryption…

How to randomize (shuffle) a JavaScript array?

In this article, I will show you how to shuffle an array in javascript. We will use The modern version of the Fisher-Yates shuffle, designed for computer use, was introduced by Richard Durstenfeld in 1964 The algorithm for shu…

Everything you show know about ES6 `let` keyword.

Everything you show knows about ES6 let keyword. Both var and let are used to declare variables in javascript, but the difference is that var is function scoped and let is block scoped. In this article, we will see the diffe…

تحميل المزيد من المشاركات
لم يتم العثور على أي نتائج