CLICK ME
yes, even hidden code blocks!
print("hello world!")| using Microsoft.AspNetCore.Diagnostics; | |
| namespace Samples; | |
| public class GlobalExceptionHandler(ILogger<GlobalExceptionHandler> logger) : IExceptionHandler | |
| { | |
| public ValueTask<bool> TryHandleAsync( | |
| HttpContext httpContext, | |
| Exception exception, | |
| CancellationToken cancellationToken) |
| export const getThumbnail = (id, size = 300) => | |
| `https://drive.google.com/thumbnail?id=${id}&sz=${size}`; | |
| export const getIcon = (mimeType) => | |
| `https://drive-thirdparty.googleusercontent.com/256/type/${mimeType}`; | |
| export const getFile = (id) => `https://drive.google.com/uc?id=${id}`; | |
| const downloadFile = (id) => |
| using System.Text; | |
| using Newtonsoft.Json.Serialization; | |
| namespace Asseco.JsonUtils | |
| { | |
| // Adapted from SnakeCaseNamingStrategy from Newtonsoft.Json library | |
| public class KebabCaseNamingStrategy : NamingStrategy | |
| { | |
| const char HYPHEN = '-'; | |
| const char UNDERSCORE = '_'; |
| // JS array equivalents to C# LINQ methods - by Dan B. | |
| // First: This version using older JavaScript notation for universal browser support (scroll down for ES6 version): | |
| // Here's a simple array of "person" objects | |
| var people = [ | |
| { name: "John", age: 20 }, | |
| { name: "Mary", age: 35 }, | |
| { name: "Arthur", age: 78 }, | |
| { name: "Mike", age: 27 }, |