This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var mockConfiguration = new Mock<IConfiguration>(); | |
// Set up the GetSection method to return a Mock<IConfigurationSection> | |
mockConfiguration.Setup(config => config.GetSection(It.IsAny<string>())) | |
.Returns(new Mock<IConfigurationSection>().Object); // returns a new Mock IConfigurationSection object | |
// Set up the Value property of the IConfigurationSection to return a specific value | |
mockConfiguration.Setup(config => config[It.IsAny<string>()]) | |
.Returns("YourValue"); // returns "YourValue" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
POST subjects/_update_by_query | |
{ | |
"query": { | |
"match": { | |
"handleList.platform": "0" | |
} | |
}, | |
"script": { | |
"source": """if (ctx._source.handleList != null) { | |
for (int i=ctx._source.handleList.length-1; i>=0; i--) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
union isfuzzy=true customEvents | |
| where tostring(customDimensions.SubjectId) == "a1f9c74c-4cd4-4d56-9741-42042097634f" | |
| order by timestamp desc | |
| take 100 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GET posts/_search | |
{ | |
"query": { | |
"bool": { | |
"must": [ | |
{ | |
"match": { | |
"partitionKey.keyword": "9e6f80e6-d834-4d63-a37d-1845e90b4007" | |
} | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// this always succeeds :{ | |
try | |
{ | |
var ec = GetHttpEventCollector(); | |
var errorHappened = false; | |
ec.OnError += ex => | |
{ | |
errorHappened = true; | |
health.AddChildItem( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div fxLayout="row" fxLayoutAlign="center"> | |
<mat-card fxFlex="400px"> | |
<mat-card-header fxLayoutAlign="center"> | |
<mat-card-title> | |
<div class="mat-subheading-2"><strong>Welcome to FACTS Info - PEPFAR Module</strong></div> | |
<mat-card-subtitle *ngIf="loginPageMessage"><div [style.backgroundColor]="'yellow'" [innerHtml]="loginPageMessage"></div></mat-card-subtitle> | |
</mat-card-title> | |
</mat-card-header> | |
<mat-card-content> | |
<form [formGroup]="loginForm" (ngSubmit)="login(loginForm)" fxLayout="column"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cfg.CreateMap<T<S>, T<D>>().ForMember(d => d.XYZ, opt => opt.Ignore()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// http://docs.telerik.com/devtools/winforms/gridview/view-definitions/column-groups-view | |
// Grouped columns do not wrap header text; see http://www.telerik.com/forums/grouping-column-headers | |
var view = new ColumnGroupsViewDefinition(); | |
var group = new GridViewColumnGroup("Reference Data"); | |
view.ColumnGroups.Add(group); | |
var groupRow = new GridViewColumnGroupRow(); | |
group.Rows.Add(groupRow); |