using System.Buffers; | |
using System.Net.WebSockets; | |
var builder = WebApplication.CreateBuilder(args); | |
var app = builder.Build(); | |
app.MapGet("/ws", async (HttpContext context) => | |
{ | |
const int MaxMessageSize = 1024 * 1024; |
[StructLayout(LayoutKind.Sequential, Size = 256)] | |
public unsafe struct Bitset | |
{ | |
public void Set(int bitIndex) => ((int*) Unsafe.AsPointer(ref Unsafe.AsRef(this)))[(bitIndex & ~7) >> 5] |= 1 << (bitIndex & 7); | |
public void Unset(int bitIndex) => ((int*)Unsafe.AsPointer(ref Unsafe.AsRef(this)))[(bitIndex & ~7) >> 5] ^= 1 << (bitIndex & 7); | |
public void SetAll() => Unsafe.InitBlock(Unsafe.AsPointer(ref Unsafe.AsRef(this)), 0xff, (uint) Unsafe.SizeOf<Bitset>()); | |
public void UnsetAll() => Unsafe.InitBlock(Unsafe.AsPointer(ref Unsafe.AsRef(this)), 0x00, (uint) Unsafe.SizeOf<Bitset>()); | |
} |
#r "paket: | |
nuget Fake.Core.SemVer | |
nuget Fake.Core.Target | |
nuget Fake.DotNet.Cli | |
nuget Fake.Tools.Git //" | |
#load "./.fake/build.fsx/intellisense.fsx" | |
open Fake.Core | |
open Fake.DotNet | |
open Fake.Tools |
*(not in any order, and i know few of these have been fixed, like having conference in separate window) **These are mostly from Classic version, will collect New Teams specific in the gist below
- If you typed message in some chat, then alt tab and go to another chat, that message is still in the chatbox (wrong room)
- if there is many single messages, with link on each, tooltip emoji menu popups and blocks your view to previews item (and you can accidentally click it if tried to click the previous link)
- if paste image to messagebox, messagebox stays very small 2 rows.. so cannot see anything (or wait, it expands after you alt tab away..)
- channel mention doesnt show alerts for people by default
- replies minimize automatically if leave chat open for a while (so context is lost where you left it)
// Given previous tokens, predict the next token (and runners up) | |
let predictNextToken (previousKinds : SyntaxKind[]) : Prediction[] = | |
if ios11 then | |
let model : MLModel = model.Value // Load the cached model | |
let mutable predictions : Prediction[] = [| |] | |
// RNNs require external memory | |
let mutable lstm_1_h : MLMultiArray = null | |
let mutable lstm_1_c : MLMultiArray = null |
- C#./.NET source: https://github.com/Microsoft/CNTK/tree/master/bindings/csharp
- C#/.NET API: https://docs.microsoft.com/en-us/cognitive-toolkit/cntk-library-managed-api
- Data file format: https://docs.microsoft.com/en-us/cognitive-toolkit/brainscript-cntktextformat-reader
- C# examples: https://github.com/Microsoft/CNTK/tree/release/latest/Examples/TrainingCSharp
- Python API docs: https://cntk.ai/pythondocs/index.html
I've worked with AngularJS for many years now and still use it in production today. Even though you can't call it ideal, given its historically-formed architecture, nobody would argue that it became quite a milestone not only for evolution of JS frameworks, but for the whole web.
It's 2017 and every new product/project has to choose a framework for development. For a long time I was sure that new Angular 2/4 (just Angular below) will become the main trend for enterprise development for years to come. I wasn't even thinking of working with something else.
Today I refuse to use it in my next project myself.
using System; | |
using System.Collections.Generic; | |
using System.Diagnostics; | |
using System.Linq; | |
using System.Threading.Tasks; | |
namespace Microsoft.eShopOnContainers.WebMVC.Services | |
{ | |
/// <summary> | |
/// When working with cloud services and Docker containers, it's very important to always catch |
No, seriously, don't. You're probably reading this because you've asked what VPN service to use, and this is the answer.
Note: The content in this post does not apply to using VPN for their intended purpose; that is, as a virtual private (internal) network. It only applies to using it as a glorified proxy, which is what every third-party "VPN provider" does.
- A Russian translation of this article can be found here, contributed by Timur Demin.
- A Turkish translation can be found here, contributed by agyild.
- There's also this article about VPN services, which is honestly better written (and has more cat pictures!) than my article.