David Wilson - @daviwil Software Engineer, PowerShell Team
- Visual Studio Code overview
- Configuring the editor
- Extensions
/* | |
* I add this to html files generated with pandoc. | |
*/ | |
html { | |
font-size: 100%; | |
overflow-y: scroll; | |
-webkit-text-size-adjust: 100%; | |
-ms-text-size-adjust: 100%; | |
} |
/*! normalize.css v2.1.3 | MIT License | git.io/normalize */ | |
/* ========================================================================== | |
HTML5 display definitions | |
========================================================================== */ | |
/** | |
* Correct `block` display not defined in IE 8/9. | |
*/ |
/// <summary> | |
/// Helper to encode and set HTML fragment to clipboard.<br/> | |
/// See http://theartofdev.com/2014/06/12/setting-htmltext-to-clipboard-revisited/.<br/> | |
/// <seealso cref="CreateDataObject"/>. | |
/// </summary> | |
/// <remarks> | |
/// The MIT License (MIT) Copyright (c) 2014 Arthur Teplitzki. | |
/// </remarks> | |
public static class ClipboardHelper | |
{ |
# Moved to https://github.com/nightroman/FarGit |
class DependsOn : System.Attribute { | |
[string[]]$Name | |
DependsOn([string[]]$name) { | |
$this.Name = $name | |
} | |
} | |
function Invoke-Step { |
David Wilson - @daviwil Software Engineer, PowerShell Team
Enter this in the search box along with your search terms:
Get all gists from the user santisbon.
user:santisbon
Find all gists with a .yml extension.
extension:yml
Find all gists with HTML files.
language:html
Coroutines or async/await is not a new concept as it was named in 1958 by Melvin Conway. Coroutines had support in languages such as Simula(1962), Smalltalk(1972) and Modula-2(1978) but I think one can argue that coroutines came into mainstream with C# 5(2012) when Microsoft added async/await to C#.
A thread can only execute a single subroutine at a time as a subroutine starts and then runs to completion. In a server environment subroutines can be problematic as in order to service connections concurrently we would usually would start a thread per connection, this was the idiom a few years ago. A thread depending on the operating system and settings needs about 1 MiB of user stack space meaning 1,024 threads needs 1 GiB of for just user stack space. In addition there's the cost of kernel stack space, book-keeping and scheduling of threads. This drives cost of VM/hardwa
Check out User.cs
down below. It's a pretty simple class with three constructors: the default (parameterless) one, and one each taking the user name, and id. PowerShell will cast using the constructors of a type, so in this case, you can cast either a string or a number --or a hashtable-- to User
.
We can add this type to our PowerShell session using Add-Type
:
Add-Type -path User.cs