- Computers fundamentals
- OS
- Linux
- osx
- Networking
- Fundamentals
- Tcp
- Udp
- Ip
1. Update PATH by running command below from vs code: | |
> Shell command: Install 'code-insiders' command in PATH | |
2. Open terminal and type | |
> code-insiders --diff <File1> <File2> |
public enum PublisherStatus | |
{ | |
NotRunning, | |
Listenning, | |
Publishing, | |
Stopped, | |
Failed | |
} |
Flow control is a mechanism to prevent the sender from overhelming the receiver. rwnd - receive window. Each ACK packet carries latest rwnd value for each side.
cwnd - congestion window. Sender-side limit on the amount of data the sender can have in flight before receiving an acknowledgment (ACK) from the client. cwnd is set up for each TCP connection. Maximum amount of data in flight is the minimum of the rwnd and cwnd.
Specifies algorithms for how to grow a window to minimize further packet loss once cwnd is reset.
using System; | |
using System.Collections.Concurrent; | |
using System.Collections.Generic; | |
using System.Collections.Immutable; | |
using System.IO; | |
using System.Net; | |
using System.Net.Sockets; | |
using System.Reactive.Disposables; | |
using System.Reactive.Linq; | |
using System.Text; |
using System; | |
using System.Reactive.Linq; | |
namespace Common | |
{ | |
public static class ReactiveExtensions | |
{ | |
private static Func<int, TimeSpan> DefaultDelayStrategy = n => n == 1 ? TimeSpan.Zero : TimeSpan.FromSeconds(Math.Pow(2, n - 1)); | |
/// <summary> |
using System; | |
using System.IO; | |
using System.Net; | |
using System.Net.Sockets; | |
using System.Reactive.Linq; | |
using Newtonsoft.Json; | |
public static class TcpSubscriber | |
{ | |
/// <summary> |
TLS provides all protocols above three essential services:
/// Description of the problem can be found at https://www.hackerrank.com/challenges/largest-rectangle/editorial | |
/// As a real use case we could consider usage of this algorithm to find out the largest rectangular subarray containing only ones. | |
/// For more details go to http://www.drdobbs.com/database/the-maximal-rectangle-problem/184410529 | |
public int LargestRectangle(string input) | |
{ | |
var heights = input.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries) | |
.Select(int.Parse) | |
.Concat(new[] { 0 }) // add tail 0 to force calculation when we reach the last element | |
.ToArray(); | |
var positions = new Stack<int>(); |
This presintation is based on the true stories
I wonder what I could do with this that would make the Mads Torgersen wince? >