Skip to content

Instantly share code, notes, and snippets.

Zhen Deng ZhenDeng

Block or report user

Report or block ZhenDeng

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View change job
It’s been a fantastic eight years and eleven months, but it is time to move on.
Today is my last day at Dicker Data. I have enjoyed working for this company. It’s been a great place to work with a great bunch of people whose dedication and passion are second to none. I appreciate having had this wonderful opportunity to work with you all and I’m proud to have been part of the team.
I’d like to thank you all for your help and support and I will hold very fond memories of my time spent working with you, but for now I wish you the very best and every success in all the future endeavours from the bottom of my heart.
You can be in touch with me by email, mobile 0411 409 061 or find me on LinkedIn. I’d love to hear from you.
Take care and all the very best.
View Loading screen
1. LoadingScreenComponent
import { Subscription } from 'rxjs';
import { Component, OnInit, OnDestroy, Output, EventEmitter, Input } from '@angular/core';
import { LoadingScreenService } from '../../services/loading-screen.service';
import { debounceTime } from 'rxjs/operators';
selector: 'loading-screen',
View Website loading remind
1. add html below in <app-root></app-root> or in index.html
<div id="pre-bootstrap">
<div class="messaging">
Website is Loading
<div class="app-loader">
<div class="app-loader-inner">
View encrypt password
string decryptPassword = MD5DESEncryption.Decrypt(model.Password, true);
private static string securityKey = "Dicker183654729Data";
public static string Encrypt(string toEncrypt, bool useHashing)
string retVal = string.Empty;
byte[] keyArray;
View use urlHelper in .net core
in startup.cs
services.AddSingleton<IActionContextAccessor, ActionContextAccessor>();
services.AddScoped<IUrlHelper>(x => {
var actionContext = x.GetRequiredService<IActionContextAccessor>().ActionContext;
var factory = x.GetRequiredService<IUrlHelperFactory>();
return factory.GetUrlHelper(actionContext);
then could inject IUrlHelper
View Get value from appsettings.json
private readonly IConfiguration _configuration;
public Tools(IConfiguration configuration)
_configuration = configuration;
public string GetConfigKey(string categoryName, string keyName)
string keyValue = null;
View angular powered bootstrap tooltip
1. top arrow fix
:host ::ng-deep .arrow::before {
border-top-color: #C0054D;
border-bottom-color: white !important;
:host ::ng-deep .tooltip-inner {
background: #C0054D;
width: 200px;
View .net core
1. Go to appsettings.json file and add the secret key for the JWT encryption.
"AppSettings": {
2. Create a class as “AppSettings.cs” to access the AppSetting values trough a class.
namespace NetCoreWebAPI.Helpers
View angular reactive form with angular material and autocomplete
<div [formGroup]="userFormGroup">
<div class="row" formGroupName="userGroup">
<div class="userinfo col-md-6">
<mat-form-field [floatLabel]="'always'" hidden> // hide this input field
<input matInput class="domainPrefixValidate" formControlName="prefixField" (blur)="checkPrefix()" placeholder="DOMAIN PREFIX" required>
<span matSuffix></span>
<mat-form-field [floatLabel]="'always'">
You can’t perform that action at this time.