This document now exists on the official ASP.NET core docs page.
- Application
- Request Handling
This document now exists on the official ASP.NET core docs page.
// | |
struct TerminalCell | |
{ | |
// cell index into GlyphTexture, should be two 16-bit (x,y) values packed: "x | (y << 16)" | |
uint GlyphIndex; | |
// 0xAABBGGRR encoded colors, nonzero alpha for Foreground indicates to render colored-glyph | |
// which means use RGB values from GlyphTexture directly as output, not as ClearType blending weights | |
uint Foreground; |
//based on the discussion here https://gist.github.com/aidanhs/5ac9088ca0f6bdd4a370 | |
// Binary tree implementation (simplified) | |
#![allow(dead_code)] | |
use std::string::String; | |
use std::cmp::PartialEq; | |
use std::cmp::PartialOrd; | |
struct BinTree<T> { |
import zio._ | |
object ZLayerPlayground { | |
case class User(id: String, name: String) | |
class MongoDb { | |
def insertUser(user: User): Task[Unit] = Task.succeed(()) <* UIO(println(s"[MongoDb]: Inserted user $user")) | |
} | |
object MongoDbLayer { |
<Project Sdk="Microsoft.NET.Sdk"> | |
<PropertyGroup> | |
<OutputType>Exe</OutputType> | |
<TargetFramework>net5.0</TargetFramework> | |
<LangVersion>preview</LangVersion> | |
</PropertyGroup> | |
<ItemGroup> | |
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="5.0.0-preview.3.20215.2" /> | |
</ItemGroup> | |
<ItemGroup> |
#if NETCOREAPP3_1 | |
using System; | |
using System.Linq; | |
using System.Text; | |
using System.Buffers; | |
using NUnit.Framework; | |
using System.Reflection; | |
using System.Buffers.Binary; | |
using static FastExpressionCompiler.LightExpression.Expression; | |
// ReSharper disable InconsistentNaming |
If you're encountering ping github.com
failing inside WSL with a Temporary failure in name resolution
, you're not alone — this has been a long-standing issue, especially when using VPNs or corporate networks.
This issue is now fixed robustly with DNS tunneling, which preserves dynamic DNS behavior and avoids limitations like WSL’s former hard cap of 3 DNS servers in /etc/resolv.conf
.
DNS tunneling is enabled by default in WSL version 2.2.1 and later, meaning that if you're still seeing DNS resolution issues, the first and most effective fix is simply to upgrade WSL. Upgrading WSL updates the WSL platform itself, but does not affect your installed Linux distributions, apps, or files.
To upgrade WSL, follow these steps,
<Project Sdk="Microsoft.NET.Sdk"> | |
<PropertyGroup> | |
<OutputType>Exe</OutputType> | |
<TargetFramework>net472</TargetFramework> | |
</PropertyGroup> | |
<PropertyGroup> | |
<GeneratedText><![CDATA[ | |
using System%3B |
/// The MIT License (MIT) | |
/// | |
/// Copyright (c) Bartosz Sypytkowski <[email protected]> | |
/// | |
/// Permission is hereby granted, free of charge, to any person obtaining a copy | |
/// of this software and associated documentation files (the "Software"), to deal | |
/// in the Software without restriction, including without limitation the rights | |
/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
/// copies of the Software, and to permit persons to whom the Software is | |
/// furnished to do so, subject to the following conditions: |
using Microsoft.AspNetCore.Hosting; | |
using Microsoft.AspNetCore.Builder; | |
using Microsoft.AspNetCore.Http; | |
using Microsoft.Extensions.Hosting; | |
public class Program | |
{ | |
public static void Main(string[] args) => | |
Host.CreateDefaultBuilder(args) | |
.ConfigureWebHostDefaults(webBuilder => |