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
- This first list is for Classic version, New Teams specific are in the gist below (but new Teams has most of the classic bugs still too)
- 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.
The only way I've succeeded so far is to employ SSH.
Assuming you are new to this like me, first I'd like to share with you that your Mac has a SSH config
file in a .ssh
directory. The config
file is where you draw relations of your SSH keys to each GitHub (or Bitbucket) account, and all your SSH keys generated are saved into .ssh
directory by default. You can navigate to it by running cd ~/.ssh
within your terminal, open the config
file with any editor, and it should look something like this:
Host * AddKeysToAgent yes
> UseKeyChain yes
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 |