Posts

Recent

Mat Date Picker set Default value, Previous Sunday and Saturday

https://stackblitz.com/edit/ng-mat-date-value-binding-kk-12?embed=1&file=app/datepicker-value-example.html&view=preview < mat-form-field >    < input   matInput  [ matDatepicker ] = "picker3"   placeholder = "Value binding"  [ value ] = "startDate.value" >    < mat-datepicker-toggle   matSuffix  [ for ] = "picker3" ></ mat-datepicker-toggle >    < mat-datepicker  # picker3 ></ mat-datepicker > </ mat-form-field > < mat-form-field >    < input   matInput  [ matDatepicker ] = "picker4"   placeholder = "Value binding"  [ value ] = "endDate.value" >    < mat-datepicker-toggle   matSuffix  [ for ] = "picker4" ></ mat-datepicker-toggle >    < mat-datepicker  # picker4 ></ mat-datepicker > </ mat-form-field > import   {   Component   }   from ...

Kendo Chart with Dynamic Series

https://stackblitz.com/edit/ng-kendo-chart-dynamic-series-kk-12?embed=1&file=app/app.component.ts&view=preview import   {   Component   }   from   '@angular/core' ; @ Component ({   selector :   'my-app' ,   template :   `         <button (click)="addSeries()">Add series</button>         <kendo-chart>           <kendo-chart-series>             <kendo-chart-series-item [stack]="true" [data]="data"             categoryField="organization"                 *ngFor="let series of model"          ...

SQL Server Symmetric Key & Certificate based Encryption With AES_256 Algorithm

--  Create SYMMETRIC KEY  &  CERTIFICATE CREATE MASTER KEY ENCRYPTION BY PASSWORD  =   ' newPasswordForEncryption ' ; CREATE CERTIFICATE MyCertificate     WITH SUBJECT  =   ' MyCryptographyCertificate ' ; CREATE SYMMETRIC KEY MySymetricKey     WITH IDENTITY_VALUE  =   ' MyCryptoIdentityValue '   ,          ALGORITHM  =  AES_256  ,          KEY_SOURCE  =   ' $dggfg@9e& '     ENCRYPTION BY CERTIFICATE OHCertificate ; SELECT  *  FROM   sys . symmetric_keys ;   --  returns created key --  Create SYMMETRIC KEY  &  CERTIFICATE --  Create Sp to Open CLose SYMMETRIC KEY ...

Ad Hoc Query / Dynamic Query Implementation

---  Dynamic script workout DECLARE     @ SQL      NVARCHAR ( 500 ) ,     @ SQLOut      NVARCHAR ( 500 ) ,     @ UserName  NVARCHAR ( 50 ) ,     @ Columns     NVARCHAR ( 100 ) ,     @ ParmDefinition  NVARCHAR ( 100 ) ,     @ ParmDefinitionOut  NVARCHAR ( 100 ) ,     @ Table     NVARCHAR ( 128 ) ,     @ PersonID    INT ; CREATE TABLE #Person (    [PersonId]  INT ,    [FirstName]  NVARCHAR ( 25 ) ,    [LastName]   NVARCHAR ( 25 ) ,    [UserName]   NVARCHAR ( 50 ) ) ; INSERT INTO #Person VALUES    (  1 ,  N ' Default ' ,  N ' Default ' ,  N ' Default.com.np '  ) ,    ...

Truncate All Tables with Foreign Keys SQL

SET QUOTED_IDENTIFIER ON ; SET ANSI_NULLS ON ; GO --   ============================================= --   Author :     Yawahang Rai --  Create  date :   12 / 18 / 2018 --   Description :  Stored Procedure To Truncate all data --   ============================================= ALTER PROCEDURE dbo . UtlResetDatabase AS     BEGIN         SET NOCOUNT ON ;         DECLARE  @ i INT  ,                  @ TableName  VARCHAR  ( 80 )  ,                  @ ColumnName  VARCHAR  ( 80 )  ,               ...

Print Html table in new window

  printReport(): void {     let gridWindow = window.open(null, 'Print', 'toolbar=no, menubar=no, dialog=no, location=no, status=yes, resizable=yes, scrollbars=yes');     let htmlStart =       '<!DOCTYPE html>' +       '<html>' +       '<head>' +       '<meta charset="utf-8" />' +       '<title>' + this.report + '</title>' +       '<style type="text/css" media="print">@page {margin: 0.38in 0.1in 0.4in 0.1in;}</style>' + // print margin       '<style type="text/css">table{width:100%;margin-bottom:1rem;background-color:transparent;border-collapse:collapse}table thead{background:#dee2e6}table thead th{vertical-align:bottom;padding:.2rem;border:none;border-left:.5px solid #c1c6cc;border-right:.5px solid #c1c6cc;text-align:center}table tbody tr td{border-left:.5px solid #dee2e6;border-right:.5px solid...