This document now exists on the official ASP.NET core docs page.
- Application
- Request Handling
using SixLabors.ImageSharp; | |
using SixLabors.ImageSharp.Drawing; | |
using SixLabors.ImageSharp.Drawing.Processing; | |
using SixLabors.ImageSharp.PixelFormats; | |
using SixLabors.ImageSharp.Processing; | |
var destWidth = 1920; | |
var destHeight = 1080; | |
using var image = new Image<Rgba32>(destWidth, destHeight); |
This document now exists on the official ASP.NET core docs page.
using System; | |
using System.Threading.Tasks; | |
namespace System.Collections.Concurrent | |
{ | |
public static class ConcurrentDictionaryExtensions | |
{ | |
/// <summary> | |
/// Provides an alternative to <see cref="ConcurrentDictionary{TKey, TValue}.GetOrAdd(TKey, Func{TKey, TValue})"/> that disposes values that implement <see cref="IDisposable"/>. | |
/// </summary> |
<script> | |
(function() { | |
var capsLockEnabled = false; | |
document.onkeypress = function (e) { | |
e = e || window.event; | |
var s = String.fromCharCode(e.keyCode || e.which); | |
if (s.toLowerCase() === s.toUpperCase()) { | |
return; | |
} |
// Install System.Threading.Channels | |
using System; | |
using System.Collections.Generic; | |
using System.Diagnostics; | |
using System.IO; | |
using System.Text; | |
using System.Threading.Channels; | |
using System.Threading.Tasks; |
myStuff.forEach(function stuff){ | |
var subStuff = stuff.subStuff; | |
doSomething({ | |
success: (function(subStuff) { // creates a function scope | |
return function(results) { // the actual success callback with subStuff scoped | |
// subStuff and results are now function scoped | |
}; |
namespace BST | |
{ | |
using System; | |
using System.Collections; | |
public class BloomFilter<T> | |
{ | |
private readonly int _size; | |
//how many times to run the hash method |
var parser = document.createElement('a'); | |
parser.href = "http://example.com:3000/pathname/?search=test#hash"; | |
parser.protocol; // => "http:" | |
parser.hostname; // => "example.com" | |
parser.port; // => "3000" | |
parser.pathname; // => "/pathname/" | |
parser.search; // => "?search=test" | |
parser.hash; // => "#hash" | |
parser.host; // => "example.com:3000" |