This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using BenchmarkDotNet.Attributes; | |
using BenchmarkDotNet.Engines; | |
using BenchmarkDotNet.Running; | |
_ = BenchmarkRunner.Run<TestParamType>(); | |
[MemoryDiagnoser] | |
public class TestParamType | |
{ | |
private List<string> list = new(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//TransferMoney context | |
class TransferMoney: Context { | |
private let SourceAccount: SourceAccountRole | |
private let DestinationAccount: DestinationAccountRole | |
init(source:AccountData, destination:AccountData) { | |
SourceAccount = source as! SourceAccountRole | |
DestinationAccount = destination as! DestinationAccountRole |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Transfer Money use case | |
*/ | |
function TransferMoney(sourceAcct: Account, destinationAcct: Account, amount: number) { | |
//bind the objects to their roles | |
SourceAccount <- sourceAcct; | |
DestinationAccount <- destinationAcct; | |
Amount <- amount; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Unicode table - List of most common Unicode characters * | |
* This summary list contains about 2000 characters for most common ocidental/latin languages and most printable symbols but not chinese, japanese, arab, archaic and some unprintable. | |
Contains character codes in HEX (hexadecimal), decimal number, name/description and corresponding printable symbol. | |
What is Unicode? | |
Unicode is a standard created to define letters of all languages and characters such as punctuation and technical symbols. Today, UNICODE (UTF-8) is the most used character set encoding (used by almost 70% of websites, in 2013). The second most used character set is ISO-8859-1 (about 20% of websites), but this old encoding format is being replaced by Unicode. | |
How to identify the Unicode number for a character? | |
Type or paste a character: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(netsh wlan show profiles) | # Fetch all Wi-Fi profiles | |
Select-String "\:(.+)$" | # Grab the profile name (note: not necessarily equal to SSID) | |
%{$name=$_.Matches.Groups[1].Value.Trim(); $_} | # Store profile name to a var | |
%{(netsh wlan show profile name="$name" key=clear)} | # Fetch profile details with clear-text password | |
Select-String "Key Content\W+\:(.+)$" | # Grab the password | |
%{$pass=$_.Matches.Groups[1].Value.Trim(); $_} | # Store password to a var | |
%{[PSCustomObject]@{ PROFILE_NAME=$name;PASSWORD=$pass }} | # Construct an object to be able to use Format-Table | |
Format-Table -AutoSize # Format the output | |
Write-Host "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<select name="nationality"> | |
<option value="">-- select one --</option> | |
<option value="afghan">Afghan</option> | |
<option value="albanian">Albanian</option> | |
<option value="algerian">Algerian</option> | |
<option value="american">American</option> | |
<option value="andorran">Andorran</option> | |
<option value="angolan">Angolan</option> | |
<option value="antiguans">Antiguans</option> | |
<option value="argentinean">Argentinean</option> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Security.Cryptography; | |
using System.Text; | |
namespace Snippets | |
{ | |
public static class SHA1Util | |
{ | |
/// <summary> | |
/// Compute hash for string encoded as UTF8 | |
/// </summary> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MyResource : IDisposable { | |
// Pointer to an external unmanaged resource. | |
private IntPtr handle; | |
// Other managed resource this class uses. | |
private Component component = new Component(); | |
// Track whether Dispose has been called. | |
private bool disposed = false; |
This list served quite some people but someone else did a better job since.
Go to https://github.com/umpirsky/country-list for a list in your language and format.
I've also compiled a list of nationalities
NewerOlder