Programming

C-CPP-Programming-in-case-of

2022-04-23. Category & Tags: C, C++, CPP, Programming

Data Structure Alignment 数据结构对齐 #

x86-64 architecture #

Overall rule: any data structure/element should be accessed by CPU with minimum CPU cycles. A 32bit CPU can access 4Bytes in one cycle, while a 64bit one can access 8Bytes. When a memory access is not aligned, it is said to be misaligned (wiki).
Thus, there are two practical rules for us to understand compiler’s padding:

Rule 1: any basic data structure/element/variable should be aligned so that their beginning address is divisible (任何变量的开始地址都能被自己的大小整除,即:当被访问的数据长度为 n 字节时,数据地址为 n 字节对齐。).

...

Comparison of Programming Fonts - Fantasque vs Dejavu vs Mononoki vs Inconsolata

2016-06-30. Category & Tags: Programming, Font, DejaVu Sans Mono, Mononoki, Fantasque Sans Mono

Before comparison, we need to know that the following sizes are roughly the same: dejavu09 vs mononoki10 vs inconsolata10

Dejavu #

If you are looking at this page, you know coding.
If you know coding, you should know Dejavu.
Thus, I will skip the intro for it.

Mononoki #

  • looks similar like dejavu, but its punctuation is much bigger and easier to see. // may draw mroe attention than code ???
  • mononoki10 is the same size of dejavu09, but mononoki11 is longer than dejavu10.
  • trying to use all space, thus, even mononoki10 is the same size of dejavu09, it is a slightly bigger.
  • some minor differences: digits 0 & 1, char g.
  • the punctuation symbols may touch each other, but the charaters never touch each other, which is a reversed situation compared wit dejavu.

Themes (Screen Captures) #

nightfall dejavu 09 vs. mononoki 10:
programming fonts nightfall dejavu 09 vs. mononoki 10

...

HTML5:Gate One 0.9发布,支持SSH

2011-10-15. Category & Tags: Leading Leading, Programming

Dan McDougall 发布了Gate One v0.9版。Gate One是利用HTML5技术开发的Web终端模拟器和SSH客户端,使用WebSockets,不要任何插件;支持单一浏览器多同步终端/SSH会话;能在断开后恢复用户会话;支持客户端和服务器端会话记录/回放;可以嵌入到其它应用中。

项目 https://github.com/liftoff/GateOne

视频演示 http://vimeo.com/24857127

from: http://internet.solidot.org/article.pl?sid=11/10/14/0913242