会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
 Sportica
 Sportica
qingjoin
博客园
首页
新随笔
联系
管理
订阅
上一页
1
···
18
19
20
21
22
23
24
25
26
下一页
2012年4月24日
telnet 远程连接设备
摘要: telnet 192.168.1.123 无敌连接设备。在ubuntu中。。可以shift+Ctrl+t 在同一终端打开一个新的窗口
阅读全文
posted @ 2012-04-24 16:13 qingjoin
阅读(295)
评论(0)
推荐(0)
2012年4月11日
LINUX 查看文件中具体的某一行。
摘要: sed -n '10,1p' set.js //查看set.js 文件中的第10行sed -n '30,80p' set.js //查看set.js文件中的第10-50行
阅读全文
posted @ 2012-04-11 16:44 qingjoin
阅读(7565)
评论(0)
推荐(1)
2012年4月6日
简单的宏定义
摘要: #include <stdio.h>#define MAX_NUMBER(a,b) ((a)>(b)) ? (a):(b) //返回较大的一个数。#define MAX(a,b) ((a)/(b)) ? (a):(b) //返回最大的一个数。不用if,等语句int main(){ printf("%d\n",MAX_NUMBER(10,5)); printf("%d\n",MAX(5,6));}
阅读全文
posted @ 2012-04-06 10:51 qingjoin
阅读(156)
评论(0)
推荐(0)
2012年3月31日
简单的makefile 编写
摘要: /* 这是.c文件里的内容 文件名为: two_row_code.c */#include <stdio.h>int main(){ printf("%s\n","my name is qingjoin!\n"); }/* 下面是makefile文件里的内容 文件名为:makefile */two_row_code:two_row_code.o cc -o two_row_code two_row_code.o //1two_row_code.o:two_row_code.c cc -c two_row_code.c ...
阅读全文
posted @ 2012-03-31 10:57 qingjoin
阅读(248)
评论(0)
推荐(1)
2012年3月30日
shell 命令
摘要: # history | tail -3 2029 ls 2030 make 2031 history | tail -3 //查看用户最后执行的3条命令#history | tail -3 //清除所有历史记录# alias test1='cd /mnt/hgfs/share/project' //设置一个命令别名# test1 //执行命令 /mnt/hgfs/share/project## unalias test1 ...
阅读全文
posted @ 2012-03-30 14:48 qingjoin
阅读(177)
评论(0)
推荐(0)
2012年3月28日
char_to_wchar 字符编码
摘要: static int char_to_wchar(const char* orig_str, wchar_t *wtext, int max_length){ int nCoverLen = 0; //add by shenbo setlocale(LC_ALL, "zh_CN.utf8"); nCoverLen = mbstowcs(wtext, orig_str, max_length - 1); if(-1 == nCoverLen){ perror("mbstowcs"); return...
阅读全文
posted @ 2012-03-28 16:30 qingjoin
阅读(814)
评论(0)
推荐(0)
2012年3月24日
Google 亚马逊水域和波兰街景上线
摘要: 去年8月,Google街景团队就已经驾着照相机泛舟在亚马逊河之上了,现在他们的工作成果终于出现在了Google街景里。你可以泛舟在里奥内格罗河之上,或是到被洪水淹没的深入到森林里的小支流里看一看。走进亚马逊森林步道,看看巴西各种坚果是如何收获的,运气好的话甚至能一瞥森林里的小动物!同时上线的还有波兰街景,这里将成为2012年欧洲杯足球赛的举办地,届时会涌入100万球迷,所以Google也不失时机的推出了波兰街景。位于欧洲心脏位置的波兰有着丰富的历史,你可以漫步在克拉科夫,这里曾经是13世纪欧洲最大的集市:你还可以参观波兰首都华沙的老城,尽管在第二次世界大战的时候被毁,但现在是联合国教科文组织世
阅读全文
posted @ 2012-03-24 12:18 qingjoin
阅读(239)
评论(0)
推荐(0)
2012年3月23日
Set_Ntp and Get_Ntp 主要是IP
摘要: int __ns8__GetNTP(struct soap* soap, struct _ns8__GetNTP *ns8__GetNTP, struct _ns8__GetNTPResponse *ns8__GetNTPResponse) { printf("%s\n",__FUNCTION__); readIPaddr(); //read NTP configuration struct ns3__NTPInformation *pNTPInformation; pNTPInformation=(struct n...
阅读全文
posted @ 2012-03-23 15:49 qingjoin
阅读(556)
评论(0)
推荐(0)
C 判断IP地址的合法性
摘要: #include <stdio.h>int is_valid_ip(const char *ip) { int section = 0; //每一节的十进制值 int dot = 0; //几个点分隔符 int last = -1; //每一节中上一个字符 while(*ip) { if(*ip == '.') { dot++; if(dot > 3) { return 0; } ...
阅读全文
posted @ 2012-03-23 11:36 qingjoin
阅读(9230)
评论(1)
推荐(0)
2012年3月22日
C 把一个字符串倒序输出
摘要: #include <stdio.h>#include <string.h>int main(){ char str[] = "abcde"; char temp[] = ""; int i, j; for(i = 0; i<5; i++) { temp[i] = str [4-i]; } strcpy(str, temp); printf("%s\n",str);}结果: # gcc test_point.c -o test_point # ./test_point str:edcba
阅读全文
posted @ 2012-03-22 20:42 qingjoin
阅读(15326)
评论(1)
推荐(1)
上一页
1
···
18
19
20
21
22
23
24
25
26
下一页
公告
 Sportica