#include /* 1、通过函数实现打印*号组成的直角三角形,函数要求传入行数即可。在main方法中,通过用户输入得到行数,然后调用函数做打印。三角形样式:**********************/int sanjiao(int hang){ int i; int j; for(i = 0....
分类:
其他好文 时间:
2014-09-24 01:56:55
阅读次数:
213
/*任意输入一个4位正整数,调用函数(函数自定义)输出该正整数数的各位数字组成的最大数。*/#include int numb(int a){ int i = 0, j = 0,sum = 0, b[4]; b[0] = a%10; b[1] = a/10%10; b[2] = a/100%10; ...
分类:
其他好文 时间:
2014-09-24 01:11:05
阅读次数:
243
#include /* 1、通过函数实现打印*号组成的直角三角形,函数要求传入行数即可。在main方法中,通过用户输入得到行数,然后调用函数做打印。三角形样式:**********************/int sanjiao(int hang){ int i; int j; for(i = 0....
分类:
其他好文 时间:
2014-09-24 00:56:25
阅读次数:
311
第三十一题The following is a simple C program to read and print an integer. But it is not working properly. What is(are) the mistake(s)? #include int m...
分类:
其他好文 时间:
2014-09-24 00:25:25
阅读次数:
277
第三十四题The following is a piece of C code, whose intention was to print a minus sign 20 times. But you can notice that, it doesn't work. #include in...
分类:
其他好文 时间:
2014-09-24 00:21:05
阅读次数:
336
#!/usr/bin/python # -*- coding:utf8 -*- import os import re def swap(path, a, b): print path file = open(path, "r").read() file = re.sub(a,b,file) #pr...
分类:
编程语言 时间:
2014-09-23 22:42:45
阅读次数:
198
[root@ERIKXUEDesktop]#iprush0: fromalllookuplocal32766: fromalllookupmain32767: fromalllookupdefault[root@ERIKXUEDesktop]#实现流量从哪个网卡来,就从哪个网卡回去[root@ERIKXUEDesktop]#[root@ERIKXUEDesktop]#foriin`ipaddr|awk-F:‘{print$2}‘|grep-vlo|grep-v0c|gre..
分类:
系统相关 时间:
2014-09-23 20:00:25
阅读次数:
378
python2 urllib 笔记import urllibbase='http://httpbin.org/'ip=base+'ip'r=urllib.urlopen(ip)print r.geturl()print r.read()#getget=base+"get"parms=urllib.u...
分类:
编程语言 时间:
2014-09-23 19:38:25
阅读次数:
225
python 遍历字典几种方法脚本:#!/usr/bin/python dict={"a":"apple","b":"banana","o":"orange"} print "##########dict######################" for i in dict: ...
分类:
编程语言 时间:
2014-09-23 19:12:15
阅读次数:
308
1.查看TCP连接状态netstat-nat|awk'{print$6}'|sort|uniq-c|sort-rnnetstat-n|awk'/^tcp/{++S[$NF]};END{for(ainS)printa,S[a]}'或netstat-n|awk'/^tcp/{++state[$NF]};...
分类:
系统相关 时间:
2014-09-23 15:58:54
阅读次数:
279