摘要:这篇随笔源自在coolshell.cn上看到的一篇文章,也第一次看到这样的话,这是linux之父linus说的,在解释他为什么不用C++来写git : c++ is a horrible language, it is made more horrible by the fact that a lot of substandard programmers use it.自己看书有很多大神级别的人是这种观点,比如好像the art of unix programming的作者是,好像很多写程序的高手都认同这样的想法,像云风,coolshell的博主陈皓,陈皓表达了C++是一个不成熟的语言的观..
阅读全文
摘要:在写私信群聊代码的时候碰到怎么把一个vector<Int> 元素unique化的问题,基本上就是需要下面这么做,用<algorithm>中的,先sort再unique 1 #include <algorithm> 2 #include <iostream> 3 #include <vector> 4 #include <stdio.h> 5 using namespace std; 6 void print(vector<int>& vec); 7 int main(){ 8 int a[] = {1,
阅读全文
摘要:netstat (network statatics), http://en.wikipedia.org/wiki/Netstatnetstat提供的信息有, 一个socket的 : protocol(TCP or UDP), Local Address , Foreign Address, State (TCP 连接的状态) , Address包括地址和Port, 如果没有指定 -n, 则Address会被解析成域名, port会被解析成 端口对应的应用 (80 对应 www)-p 是显示出拥有这个socket的 进程的 pid 和 namenetstat -i 会显示kernel int.
阅读全文