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 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'">
View export data to excel
using (ExcelPackage pck = new ExcelPackage())
TenantsDetailsSheet(pck, tenantList.Output);
private ExcelPackage TenantsDetailsSheet(ExcelPackage pck, List<GetCSPTenant.Out> annuityList)
var input = new GetCSPSubscription.In();
input.in_status = "A";
input.in_update_status = "N";
View order confirmation template
StringBuilder stringBuilder = new StringBuilder();
stringBuilder.Append("<div style='padding: 0; margin: 0; height: 100%; background:#fbfaf7;'>");
stringBuilder.Append("<table width='100%' height='100%' align='center' cellspacing='0' cellpadding='0' bgcolor='#fbfaf7'>");
stringBuilder.Append("<tr><td style='font:12px/1.5 Arial,Helvetica,sans-serif;color:#454545'>&nbsp;</td></tr>");
stringBuilder.Append("<td style='color:#343731;'><table width='600px' bgcolor='#ffffff' cellspacing='0' cellpadding='0' align='center' border='0' style='border:1px solid #232323;text-align:center'><tbody><tr><td style='padding:10px;color:#343731'>");
stringBuilder.Append("<img src='' width='80px' style='margin:0 auto;display:block'>");
stringBuilder.Append("<h1 style='font-weight:400;text-transform:uppercase'>Trojan Trading Company PTY LTD</h1><h4 style='font-weight:400;text-transform:uppercase'>Australia</h4>");
View how to remove account
I was able to fix the issues by deleting the files in ~Library/Accounts/ and ~/Library/Preferences/MobileMeAccounts.plist
then logging out and in again before opening the panels again.
Warning: This also removes every other account you have listed in the accounts folder.
View call Restful api
public enum WebMethods
public static T GetJsonResult<T>(string baseUrl, WebMethods method, dynamic queryParameters = null, dynamic bodyContent = null, dynamic token = null) where T : new()
string url = string.Empty;
if (queryParameters != null)
View Ajax sample
url: '/Account/Login',
type: 'POST',
contentType: 'application/json; charset=utf-8',
data: JSON.stringify(loginInfo),
dataType: 'json',
success: function (output) {
if (output.Status == 'fail') {
View text box with an arrow
.widget-text {
background-color: #999590;
color: white;
margin: 10px 0 0 70px;
padding: 1px 20px;
position: relative;
.widget-text:before, .widget-text:after {
content: "";
You can’t perform that action at this time.