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
internal static class RSAKeyExtensions | |
{ | |
#region JSON | |
internal static void FromJsonString(this RSA rsa, string jsonString) | |
{ | |
Check.Argument.IsNotEmpty(jsonString, nameof(jsonString)); | |
try | |
{ | |
var paramsJson = JsonConvert.DeserializeObject<RSAParametersJson>(jsonString); |
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
public class EditResponseMiddleware | |
{ | |
private readonly RequestDelegate _next; | |
public EditResponseMiddleware(RequestDelegate next) | |
{ | |
_next = next; | |
} | |
public async Task Invoke(HttpContext context) |
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
(async function() { | |
while(!document.querySelector("#yourElem")) { | |
await new Promise(r => setTimeout(r, 500)); | |
} | |
)(); |
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
function polarToCartesian(centerX, centerY, radius, angleInDegrees) { | |
var angleInRadians = (angleInDegrees-90) * Math.PI / 180.0; | |
return { | |
x: centerX + (radius * Math.cos(angleInRadians)), | |
y: centerY + (radius * Math.sin(angleInRadians)) | |
}; | |
} | |
function getArcPath(centerX, centerY, radius, startAngle, endAngle){ |