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
.loader | |
display flex | |
justify-content center | |
align-items center | |
&.fullscreen | |
min-height 100vh | |
&:after | |
content "" |
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.Threading.Tasks; | |
namespace Models | |
{ | |
public class Text | |
{ |
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
<system.web> | |
<httpRuntime enableVersionHeader="false" /> | |
</system.web> | |
<system.webServer> | |
<httpProtocol> | |
<customHeaders> | |
<remove name="X-Powered-By" /> | |
<remove name="X-AspNet-Version" /> | |
<remove name="X-AspNetMvc-Version" /> | |
<remove name="X-Powered-By-Plesk" /> |
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 CacheFilterAttribute : ActionFilterAttribute | |
{ | |
int DurationInSeconds = int.Parse(ConfigurationManager.AppSettings["CacheDuration"]); | |
public override Task OnActionExecutedAsync(HttpActionExecutedContext actionExecutedContext, CancellationToken cancellationToken) | |
{ | |
if (actionExecutedContext.Request.Method == HttpMethod.Get) | |
{ | |
actionExecutedContext.Response.Headers.CacheControl = new CacheControlHeaderValue() | |
{ |
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 float SimilarityPercentage(string a, string b) | |
{ | |
var SpecialCharacters = new Regex("[^\\w\\d\\s]"); | |
a = SpecialCharacters.Replace(a, string.Empty); | |
b = SpecialCharacters.Replace(b, string.Empty); | |
var PairsInA = a.Split(' ').SelectMany(s => s.Zip(s.Substring(1), (fc, sc) => string.Concat(fc, sc))); | |
var PairsInB = b.Split(' ').SelectMany(s => s.Zip(s.Substring(1), (fc, sc) => string.Concat(fc, sc))); |
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
{ | |
"access_token":"1/fFAGRNJru1FTz70BzhT3Zg", | |
"expires_in":3920, | |
"token_type":"Bearer", | |
"refresh_token":"1/xEoDL4iW3cxlI7yDbSRFYNG01kVKM2C-259HOF2aQbI" | |
} |
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
Generate timestamps from 00:00 to 23:59 (created to test with regex) | |
https://dotnetfiddle.net/6FI0Wo | |
Generate dates for an year | |
https://dotnetfiddle.net/fCccqO | |
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
Timestamp 12 & 24 hr format | |
(?:[0-1]?\d|2[0-3]):[0-5]?\d(?:pm|am)? | |
Timestamp 12 hr format | |
(?:0?\d|1[0-2]):[0-5]?\d\s?(?:pm|am) | |
Date format supporting yesterday, today & tomorrow along with delimeters -, / & space | |
(?:today|tomorrow|yesterday|(?:[0-2]?\d|3[0-1])(\s|-|\/)(?:0?\d|1[0-2])\1\d{4}) | |
Decimal number > 1 |
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
uninstall-package bootstrap | |
uninstall-package Modernizr | |
uninstall-package Respond | |
uninstall-package Microsoft.AspNet.Web.Optimization | |
uninstall-package WebGrease | |
uninstall-package Microsoft.jQuery.Unobtrusive.Validation | |
uninstall-package jQuery.Validation | |
uninstall-package jQuery | |
uninstall-package Microsoft.AspNet.Identity.EntityFramework | |
uninstall-package EntityFramework |