To transform the currently opened Graphviz source file (in DOT Language) into a PNG:
{
"cmd": [ "dot", "-Tpng", "-o", "$file_base_name.png", "$file"],
"selector": "source.dot"
}
/* compile osx | |
* gcc -bundle -fPIC -O3 -o popcount.dylib popcount.c | |
* */ | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <stdint.h> | |
#include <sqlite3ext.h> | |
SQLITE_EXTENSION_INIT1 |
To transform the currently opened Graphviz source file (in DOT Language) into a PNG:
{
"cmd": [ "dot", "-Tpng", "-o", "$file_base_name.png", "$file"],
"selector": "source.dot"
}
Mac Port 基本用法总结 | |
1. Mac Port的下载地址 | |
http://www.macports.org/install.php | |
2. Mac Port的说明文档 | |
http://guide.macports.org/ | |
3. Mac Port中第三方软件下载包存放的默认路径是:/opt/local/var/macports/distfiles/ | |
为了提高安装速度,可以在安装新port时直接将此目录下的文件拷贝到新的Mac Port相同的目录中就可以避免Port去网上下载。 |
#!/usr/bin/env python | |
"""Simple HTTP Server With Upload. | |
This module builds on BaseHTTPServer by implementing the standard GET | |
and HEAD requests in a fairly straightforward manner. | |
""" |
Latency Comparison Numbers (~2012) | |
---------------------------------- | |
L1 cache reference 0.5 ns | |
Branch mispredict 5 ns | |
L2 cache reference 7 ns 14x L1 cache | |
Mutex lock/unlock 25 ns | |
Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
Compress 1K bytes with Zippy 3,000 ns 3 us | |
Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |