This file contains hidden or 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
DROP TABLE currency; | |
-- Create table variable | |
CREATE TABLE currency ( | |
country VARCHAR(100), | |
currency VARCHAR(100), | |
code VARCHAR(100), | |
symbol VARCHAR(100) | |
); |
This file contains hidden or 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
CREATE TABLE #Organization(Id INT, ParentID INT, Name nvarchar(20)); | |
INSERT INTO #Organization VALUES(1,NULL,'A'); | |
INSERT INTO #Organization VALUES(2,NULL,'B'); | |
INSERT INTO #Organization VALUES(3,NULL,'C'); | |
INSERT INTO #Organization VALUES(4,1,'A->D'); | |
INSERT INTO #Organization VALUES(5,2,'B->E'); | |
INSERT INTO #Organization VALUES(6,3,'C->F'); |
This file contains hidden or 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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Diagnostics; | |
using System.Threading; | |
using System.Windows.Forms; | |
using System.ComponentModel; | |
namespace TestProject |
This file contains hidden or 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
install window service | |
serviceName /i ( via cmd) | |
or | |
Installutil servicename (via Visual studio cmd prompt) | |
start window service via command prompt | |
net start servicename ( via cmd) | |
stop window service via command prompt | |
net stop servicename ( via cmd) |
This file contains hidden or 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
public class AddAllClaimAction : ClaimAction | |
{ | |
public AddAllClaimAction() : base(null, null) | |
{ | |
} | |
public override void Run(JObject userData, ClaimsIdentity identity, string issuer) | |
{ | |
var claims = userData.Properties() | |
.Where(x => !x.Value.HasValues) |
This file contains hidden or 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
public static class AsExpandableExtension | |
{ | |
public static IQueryable<T> AsExpandable<T>(this IQueryable<T> source) | |
{ | |
if (source is ExpandableQuery<T>) | |
{ | |
return (ExpandableQuery<T>)source; | |
} |
This file contains hidden or 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
public class TimeService : ITimeService | |
{ | |
private readonly ILogger _logger; | |
private Instant? _frozenTime; | |
private Instant _realTimeAtTimeOfFreezing = Instant.MinValue; | |
private readonly IDateTimeZoneProvider _timeZoneProvider = DateTimeZoneProviders.Tzdb; | |
private readonly DateTimeZone _timeZone; | |
public TimeService(ILogger logger, string systemTimeZone, DateTime? setDate = null) |
This file contains hidden or 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
[HtmlTargetElement(Attributes = "is-active-route")] | |
public class ActiveRouteTagHelper : TagHelper | |
{ | |
private IDictionary<string, string> _routeValues; | |
/// <summary>The name of the action method.</summary> | |
/// <remarks>Must be <c>null</c> if <see cref="P:Microsoft.AspNetCore.Mvc.TagHelpers.AnchorTagHelper.Route" /> is non-<c>null</c>.</remarks> | |
[HtmlAttributeName("asp-action")] | |
public string Action { get; set; } |
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title></title> | |
<meta charset="utf-8" /> | |
</head> | |
<body> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/1.0.2/Chart.min.js"></script> |
OlderNewer