06 2012 档案

一个看起来奇怪的C++程序 && c++操作符重载
摘要:这篇随笔源自在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++是一个不成熟的语言的观.. 阅读全文

posted @ 2012-06-18 19:57 小宇2 阅读(987) 评论(1) 推荐(0) 编辑

stl algorithm -- sort ,unique
摘要:在写私信群聊代码的时候碰到怎么把一个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, 阅读全文

posted @ 2012-06-11 19:37 小宇2 阅读(999) 评论(0) 推荐(0) 编辑

netstat,ifconfig写得很随便
摘要: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. 阅读全文

posted @ 2012-06-01 13:09 小宇2 阅读(408) 评论(0) 推荐(0) 编辑

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

统计

点击右上角即可分享
微信分享提示