Technical

How to execute a T-SQL command to every table in SQL Server database

sp_MSforeachtable is a stored procedure that is mostly used to apply a T-SQL command to every table, iteratively, that exists in the current database.Examples on how to use it:1-Perform an unconditional reindex over all tables in the database:EXEC sp_MSforeachtable 'DBCC DBREINDEX(''?'')'2-Truncate all tables in the database:EXEC sp_MSforeachtable 'TRUNCATE TABLE ?'3-Get the information about the...

Exception Handling in Angular 10

I am using Angular 10 and when I click to open Persons page I get “Nulljector error” and redirect me to the home page .NullInjectorError: No provider for PersonServiceProxy!<a ng-reflect-router-link="/app/main/phonebook" href="/app/main/phonebook">phonebook </a>The solution :Add your ServiceProxy to providers in "\angular\src\shared\service-proxies\service-proxy.module.ts".Open service-proxy.module.ts fileIn @NgModule > providers > Add this Line “ApiServiceProxies.PersonServiceProxy” like this

10 deadly sins of programming

Here are a few deadly sins that you should avoid while programming, they are not in a particular order:Assuming your code works.Code before you think.Coding without using a version control system.No code comments.No exception handling.Not using meaningful names for variables, methods, classes, etc.Overengineering.Overuse of inheritance and overriding.Reinventing the wheel.Untraceable Changes.If you have other sins,...

How to migrate a domain without losing your SEO

1. Map All Old Domain URLs To Their New Domain Versions This basically required mapping all of the dynamic and static old domain URLs to new domain URLs so they could all be 301 redirected at launch.2. Understand How Any UI Changes Might Affect SEO Changing UI while changing domains should be avoided whenever possible to...

Get geo location data using HTML5 & JavaScript

In case you are using Google Chrome you will have to enable getting location by the following steps:Open Google Chrome > on the top right click on the vertical 3 dots then select SettingsAt the bottom click Show advanced settingsIn the "Privacy" section, click Content settingsIn the dialog that appears, scroll down to the...

Subdomain Mapping in ASP.NET Boilerplate

In AbpTenants table in the database. You can add your custom properties to Tenant class.AbpTenant class defines some basic properties, the most important properties are:TenancyName: This is a unique name of a tenant in the application. It should not be changed normally. It can be used to allocate subdomains to tenants like 'mytenant.mydomain.com'. Tenant.TenancyNameRegex constant defines the...

Using EPPlus library to manage excel spreadsheets in .NET

EPPlus is a library to manage excel spreadsheets, using OOXML. To install EPPlus, you can search for EPPlus in "NuGet Package Manager" or simply run the following command in the "Package Manager Console":PM> Install-Package EPPlusAfter installing we are going to need to use this namespace:using OfficeOpenXml;I got an exception while reading from an excel...

Show alert or run JavaScript function after showing the appointment popup in DevExpress using VB.NET

You should handle the CustomJSProperties event and add in properties collection the script which you are going to run it.Please find below server side code:Dim script As String = Nothing Dim disablePopup As Boolean = falseProtected Sub ASPxScheduler1_AppointmentFormShowing(sender As Object, e As AppointmentFormEventArgs) Handles ASPxScheduler1.AppointmentFormShowinge.Container = New...