Saturday, October 31, 2020

Where to find the files after ng build in angular

Once you run the ng build --prod for deployment build and you are wondering after successfully from where to copy files to deployment. 

You can check path on following setting where its mentioned in angular.json file. 

"outDir": "./location/toYour/dist"

Monday, October 26, 2020

How to remove all elements from JavaScript Array ?

 In case you have an array in JavaScript and you want to remove all elements from that array , there are couple of ways by which you can remove all elements from your array. 


#1 

Arr = [];
#2 

 Arr.length = 0

#3 
 
 Arr.splice(0,Arr.length)

#4 
  
while(Arr.length > 0) {
    Arr.pop();
}





Sunday, October 25, 2020

Import MySQL Dump file using MySQL Command Line tool in windows 10

 

It really pain and may be you are facing same kind of issues which i faced so far to import mysql dump file using MySQL Command line tool in windows 10. 

You will be able to find multiple posts about SOURCE command you need to use but here certain things which might you also not able to find and still struggling with proper information. 


So easy solution here is : 


mysql> use db_name;

mysql> SET autocommit=0 ; source the_sql_file.sql ; COMMIT ;

But few catches here : 
First Catch : 

Just use the absolute path of the file and then, instead of using backslashes, use forward slashes.

Example:

with backslashes : source C:\folder1\metropolises.sql
with forward slashes : source C:/folder1/metropolises.sql



Second Catch : 

 filename must not be in quotes even if it contains spaces in name or path to file.



Wednesday, October 21, 2020

Remove all packages from a specific project within a solution

 Be careful: This will uninstall ALL packages in the project. If -Force parameter is used, packages are removed even if dependencies exist.

Get-Package -ProjectName "YourProjectName" | 
Uninstall-Package -ProjectName "YourProjectName" -RemoveDependencies -Force

Remove all packages from all projects in the solution

 Be careful: This will uninstall ALL packages in the solution. If -Force parameter is used, packages are removed even if dependencies exist.

Get-Package | Uninstall-Package -RemoveDependencies -Force

ASP.NET Core

 Certainly! Here are 10 advanced .NET Core interview questions covering various topics: 1. **ASP.NET Core Middleware Pipeline**: Explain the...