Author: skywhat

ideal growth rate for a dynamically allocated array

allocate 16*1.5=24  deallocate 16
allocate 24*1.5=36. deallocate  16+24=40
allocate 36*1.5=54. deallocate  40+36=76
allocate 54*1.5=81 deallocate.  76+54=130
allocate 81*1.5=121.5 < 130 reuse
choosing 1.5 as the factor allows memory reuse after 4 reallocations; 1.45 allows memory reuse after 3 reallocations; and 1.3 allows reuse after only 2 reallocations.

AlphaBlendMatrix and how to resize the image by C#

The description about Alpha Blending in MSDN is as follows

Alpha Blending Lines and Fills

In GDI+, a color is a 32-bit value with 8 bits each for alpha, red, green, and blue. The alpha value indicates the transparency of the color — the extent to which the color is blended with the background color. Alpha values range from 0 through 255, where 0 represents a fully transparent color, and 255 represents a fully opaque color. Continue reading


6月3日,已经驻扎在东京将近两年的主机开始抽风了,这种抽风以前真的没有发现过,virtual private network 果断一个也连接不上了,甚至putty完全没有响应,报错Error Network,Connection timed out.



I’m sorry to hear of the connectivity issues you are experiencing. So that we may further investigate this issue, could you please provide the output of “mtr –report” from your location to your Linode, as well as the reverse? More information on generating and interpreting MTR reports can be found in the Linode Docs:


Hi there,

All of this is a classic issue with the GFW Please notice how the packet loss starts at the 202 hops and persists all the way out to the server; this is evident of the deep packet inspection stage that the GFW goes under before you’re completely blocked.  Would you like for us to switch your IP again? This is really the only course of action that works when faced with this issue.

果真是碰上某个敏感的日子了,你懂得:) 依稀记得两年前,google也是在此时渐渐淡出了人们的视线,真是无奈呢

linode给我换了几个IP address, 测试结果几乎没有改善。看样子东京的服务器大部分都遭殃了。