03 2013 档案

操作系统-使用批处理文件更改网络配置
摘要:经常在公司里面的实验室和办公室之间奔波,IP换来换去需要有耐心,索性参考别人写个脚本来缓解痛苦。搜罗了一下发现大家貌似都在用netsh,根据百度百科:NetSH 是windows系统本身提供的功能强大的网络配置命令行工具。发现果然参数巨多,但是如果只是配置IP地址和DNS,用interface ip... 阅读全文

posted @ 2013-03-29 13:48 醉清风JM 阅读(487) 评论(0) 推荐(0)

面试题目-字符串与整型互转
摘要://///////////////////////////////////////////////////////////////////////////////// FileName : atoi_itoa.cpp// Version : 0.10// Author ... 阅读全文

posted @ 2013-03-28 00:21 醉清风JM 阅读(159) 评论(0) 推荐(0)

数据结构-快速排序
摘要:// Header.h//定义函数指针别名typedef int ( *PFI2S ) ( const string &, const string & );//函数声明int lexicoCompare( cnost string &, const string & );int sort( str... 阅读全文

posted @ 2013-03-27 23:55 醉清风JM 阅读(182) 评论(0) 推荐(0)

C++-IO操作之从文件读取输出到标准输出
摘要:#include int main(){ cout >file_name; //打开文件copy.out用于用户输入 ifstream inFile( filename.c_str() ); if ( !inFile ) { cerr << "unable to open ... 阅读全文

posted @ 2013-03-27 23:06 醉清风JM 阅读(226) 评论(0) 推荐(0)

【Linux】查看某个进程的线程数量(转)
摘要:有些时候需要确实进程内部当前运行着多少线程,那么以下几个方法值得一用。1.根据进程号进行查询:# pstree -p 进程号# top -Hp 进程号2.根据进程名字进行查询:#pstree -p `ps -e | grep server | awk '{print $1}'`#pstree -p ... 阅读全文

posted @ 2013-03-26 17:22 醉清风JM 阅读(183) 评论(0) 推荐(0)

C-字节对齐
摘要:文章最后本人做了一幅图,一看就明白了,这个问题网上讲的不少,但是都没有把问题说透。 一、概念 对齐跟数据在内存中的位置有关。如果一个变量的内存地址正好位于它长度的整数倍,他就被称做自然对齐。比如在32位cpu下,假设一个整型变量的地址为0x00000004,那它就是自然对齐的。 ... 阅读全文

posted @ 2013-03-22 21:57 醉清风JM 阅读(163) 评论(0) 推荐(0)

C-声明和定义
摘要:定义:只有一个,确定对象的类型,并分配内存。对于数组需要用常量指定除最左边一维之外的维数,。声明:可以有多个,描述对象的类型。对于数组可以不指定维数 阅读全文

posted @ 2013-03-20 22:34 醉清风JM 阅读(163) 评论(0) 推荐(0)

数据结构-书籍列表
摘要:Data structures with Abstract Data Types, Daniel F.Stubb and Neil W.Webbre著,第二版,Pacific Grove, CA, Brooks/Colde, 1989长期-记忆力长期-逻辑思维能力 阅读全文

posted @ 2013-03-20 22:29 醉清风JM

C-typedef和define的区别
摘要:在C语言中,typedef和define都可以设置变量的别名,但是typedef被视为一种彻底的封装,为类型引入一个别名,声明之后不能再往里面加入别的东西,宏则不然。1. define可以进行扩展但是typedef不行(note1)#define peach intunsigned peach; /... 阅读全文

posted @ 2013-03-20 22:21 醉清风JM 阅读(166) 评论(0) 推荐(0)

About inflation
摘要:Today I read a article from CNN about inflation. It's quite intresting that people from overseas are also paying attention to the same thing as we do.Author want to buy inks for his printer, but found the price has been increased for 25%. He is quite curious about why and think of whether there 阅读全文

posted @ 2013-03-13 10:28 醉清风JM 阅读(138) 评论(0) 推荐(0)

【杂项】Set and let differences in VBA
摘要:Same:set and let could both be used to set variables. Like:set var1 = valuelet var2 = valueDifference:let is used to set nominal data types and could ... 阅读全文

posted @ 2013-03-08 16:14 醉清风JM 阅读(164) 评论(0) 推荐(0)

【C】malloc()与 alloc()区别
摘要:malloc()与 alloc()C语言跟内存分配方式(1) 从静态存储区域分配。内存在程序编译的时候就已经分配好,这块内存在程序的整个运行期间都存在。例如全局变量,static变量。(2) 在栈上创建。在执行函数时,函数内局部变量的存储单元都可以在栈上创建,函数执行结束时这些存储单元自动被释放。栈... 阅读全文

posted @ 2013-03-07 23:23 醉清风JM 阅读(285) 评论(0) 推荐(0)

【Linux】僵尸进程
摘要:linux 如何清理僵尸进程今天在维护服务器的时候,发现有5个nova-novncproxy的僵尸进程。?26327 ? S 0:05 \_ /usr/bin/python /usr/bin/nova-novncproxy --config-file=/etc/nova/nova.conf4765 ... 阅读全文

posted @ 2013-03-04 15:41 醉清风JM 阅读(246) 评论(0) 推荐(0)

【Linux】grep命令
摘要:grep和egrep例子:1. :格式: grep [option] pattern filename 注意: pattern如果是表达式或者超过两个单词的, 需要用引号引用. 可以是单引号也可双引号, 区别是单引号无法引用变量而双引号可以.grep '\' file 包含单词Tom的行grep '... 阅读全文

posted @ 2013-03-04 15:20 醉清风JM 阅读(592) 评论(0) 推荐(0)

【C】C的书籍列表
摘要:网上找的,号称比较经典的C语言书籍:第一阶段:《The C Programming Language》,《C Reference Manual》,>,《C Primer》《Expert C Programming》第二阶段:《Expert C Programming --- Deep C Secre... 阅读全文

posted @ 2013-03-01 01:32 醉清风JM 阅读(218) 评论(0) 推荐(0)

【C】external/internal/static/register variable and function
摘要:external(global)external variable is defined outside of functions. They are available to all the below functions and all of reference points to the sa... 阅读全文

posted @ 2013-03-01 01:19 醉清风JM 阅读(283) 评论(0) 推荐(0)

导航