count of digits after decimal points

Here we have an example to find out the number of digits that come after decimal points.

string number = "253.1258";
int length = number.Substring(number.IndexOf(".")+1).Length;

CSS colon expected in app.component.css

This is the issue i am facing right now. I will update this once i got solution.

What is Transpiling in Angular?

Compiling
is the general term for taking source code written in one language and transforming into another.

Transpiling
is a specific term for taking source code written in one language and transforming into another language that has a similar level of abstraction.


Transpiling is the process of converting the typescript into javascript (using Traceur, a JS compiler). 

Though typescript is used to write code in the Angular applications, the code is internally transpiled into javascript. 

npm - Overview

What is npm?


npm help us(developers) to share and reuse code, and makes it easy to update the code that we already shared.

Install npm

In order to install npm, just install node.js. when you install Node.js, you automatically get npm installed on your computer because npm is distributed with Node.js

Click Here to download node.js

Verify

After installation just verify that you have node.js in your machine.
                  node -v (or) npm -v

find out npm version
Good to have the npm version 8 & above. 

Use below command to update npm version
              npm install npm@latest -g 

CONVERT VS TRY_CONVERT IN SQL 2012

TRY_CONVERT - It help us to convert to specific data type, it is most similar to CONVERT(). The only difference and advantage is it will return NULL when its fail to convert into given data type. 

Eq.







Setup new angular project

Step 1 - Install npm

In order to install npm, just install node.js. when you install Node.js, you automatically get npm installed on your computer because npm is distributed with Node.js

Click Here to download node.js

After installation just verify that you have node.js in your machine.
node -v (or) npm -v

Step 2 - Install Angular CLI 

CLI - Command Line Interface.

CLI - It is a Tool, which is used to create, develop and maintain angular applications.

npm install -g @angular/cli - This is the command used to install angular CLI.

npm -v - This is command used to get version of NPM.

Create a new angular project
ng new ProjectName


command to Create a angular project


Run a Project
   Open your angular project through command prompt and then type below command to run the project
To run angular project

ng s --o 
or 
ng serve --open

--------------------------
Terminate the Job

Ctrl +C

---------------------------


Open closed document in MS SQL SERVER



We can retrieve the query even we closed our query window in SQL without saving the script.

SELECT execquery.last_execution_time AS [Date Time], execsql.text AS [Script] FROM sys.dm_exec_query_stats AS execquery
CROSS APPLY sys.dm_exec_sql_text(execquery.sql_handle) AS execsql
ORDER BY execquery.last_execution_time DESC

Above query provides a list of scripts and its time of execution in the last 24 hours. 

This will be work for all executed scripts not only a view or procedure.