Alice->Bob: Hello Bob, how are you?
Note right of Bob: Bob thinks
Bob-->Alice: I am good thanks!
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 Spire.Pdf; | |
using Spire.Pdf.Graphics; | |
// Main call | |
static void AddHeader(PdfPageBase page, string left, string center, string right) | |
{ | |
var state = page.Canvas.Save(); | |
RotatePage(page); | |
AddHeaderWithRotatedPage(page, left, center, right); | |
page.Canvas.Restore(state); |
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
//-------------------------------------------------------------------------- | |
// | |
// Copyright (c) Microsoft Corporation. All rights reserved. | |
// | |
// File: LimitedConcurrencyTaskScheduler.cs | |
// Source: https://code.msdn.microsoft.com/vstudio/Execution-Time-Based-dd4dbdb6/sourcecode?fileId=67470&pathId=1378361369 | |
// Modified for .net core | |
//-------------------------------------------------------------------------- | |
using System; |
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
#region Socket operations | |
protected IAsyncResult BeginSocketRead(int length, ApmCallback callback) | |
{ | |
return BeginSocketIO(new byte[length], callback, _socket.BeginReceive, _socket.EndReceive); | |
} | |
protected IAsyncResult BeginSocketWrite(byte[] data, ApmCallback callback) | |
{ | |
return BeginSocketIO(data, callback, _socket.BeginSend, _socket.EndSend); | |
} |
http://www-public.it-sudparis.eu/~maigron/RIR_Stats/index.html
RIR Delegations
These pages provide statistics on IP addresses and ASN numbers delegated by RIRs to each country in their geographic area. Delegation details for each country are also available.
These statistics are generated automatically from the RIRs delegation files available via FTP:
ftp://ftp.afrinic.net/pub/stats/afrinic/delegated-afrinic-extended-latest ftp://ftp.apnic.net/pub/stats/apnic/delegated-apnic-extended-latest
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
static void Main() | |
{ | |
var source = new CancellationTokenSource(); | |
var task1 = Task.Factory.StartNew(() => | |
{ | |
Console.WriteLine("run task1"); | |
Task.Delay(2000).Wait(); | |
Console.WriteLine("after delay task1"); | |
source.Token.ThrowIfCancellationRequested(); | |
Console.WriteLine("no exec task1"); |
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
/* | |
GitCandy is a Git platform based on ASP.NET MVC | |
Source on: http://github.com/Aimeast/GitCandy | |
Demo on: http://git.53wb.com/ | |
The MIT License (MIT) | |
Copyright (c) 2014 Aimeast | |
*/ |
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
// A highlight.js packer which work for Git Candy© | |
// The output please reference to https://github.com/Aimeast/GitCandy/blob/dev/GitCandy/Scripts/highlight.pack.js | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
using (var writer = new StreamWriter("highlight.pack.js")) | |
{ | |
writer.WriteLine("//https://github.com/isagalaev/highlight.js"); |
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
/* | |
* Following code for test an method will be inlined by JIT or not | |
* Tested on Framework 4.5, Win8 x64 | |
* | |
* http://blogs.msdn.com/b/ericgu/archive/2004/01/29/64717.aspx | |
* http://blogs.microsoft.co.il/blogs/sasha/archive/2012/01/20/aggressive-inlining-in-the-clr-4-5-jit.aspx | |
*/ | |
using System; | |
using System.Diagnostics; |
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 static class CommitLogExtension | |
{ | |
public static IEnumerable<Commit> PathFilter(this IEnumerable<Commit> log, string path) | |
{ | |
if (string.IsNullOrEmpty(path)) | |
return log; | |
return log.Where(s => | |
{ | |
var pathEntry = s[path]; |
NewerOlder