在WSL中获取Windows剪贴板中的图片

背景

Win10里面的WSL(Windows Subsystem For Linux)算是一个开发神器了,虽然功能不是100%完善,但是对于轻度开发已经足够了。现在我的日常开发,就是一个 …

more ...




容斥原理以及一些题目

什么是容斥原理

容斥原理是一种计数手段。例如在下图中,我们想不重复、不遗漏的求出包含在ABC三个集合中所包含的元素的个数,应该使用怎么样的方法 …

more ...

实现一个无锁消息队列

240414更新:后续补充了一篇勘误文章,见这里

目标

实现一个多读多写的无锁消息队列。

cmpxchg - 比较并替换

比较并替换(compare-and-swap, CAS)是一个用于 …

more ...


Bw-Tree:在新硬件平台上的新B-Tree

ARS 与 Bw-Tree

nosql数据库从本质上说,都属于ARS(Atomic Record Stores,“原子记录存储”)。

最常见的“原子记录存储”一种实现就是朴素的Hash表:通过一个特定的key,来读写一条 …

more ...

Windows Azure Storage Made Simple

加机器就是一把梭

没有什么问题是加一千台机器解决不了的,如果有,就再加一千台。
—— 《21天精通分布式系统》

分布式系统在设计之初,是为了解 …

more ...

STUP - the Implementation (3)

throughput and window size

The wisdom of STUP protocol is all about the window size. The throughput of a TCP communication is limited by two windows: the congestion window and the receive window. The congestion window can determine how many bytes that can be send a simple piece of time …

more ...