php:// — 访问各个输入/输出流(I/O streams)说明PHP 提供了一些杂项输入/输出(IO)流,允许访问 PHP 的输入输出流、标准输入输出和错误描述符, 内存中、磁盘备份的临时文件流以及可以操作其他读取写入文件资源的过滤器。php://stdin, php://stdout 和 p...
分类:
Web程序 时间:
2015-07-14 17:23:55
阅读次数:
149
[root@localhostlocal]#tar-xvfechoping-6.0.0.tar.gzgzip:stdin:notingzipformattar:Childreturnedstatus1tar:Errorisnotrecoverable:exitingnow原因:[root@localhostlocal]#fileechoping-6.0.0.tar.gzechoping-6.0.0.tar.gz:HTMLdocumenttext[root@localhostlocal]#因为在下..
分类:
其他好文 时间:
2015-07-14 06:26:07
阅读次数:
165
下面是一个简单的词法分析器
#include
#include
using namespace std ;
int main()
{
char str[150] ;
// freopen("C:\\Users\\Lionel\\Desktop\\1.txt","r",stdin) ;
int row = 1 , cow = 0 ;
while(gets(str))
{
char temp[10] ;
int index = 0 , i = 0;
...
分类:
其他好文 时间:
2015-07-13 22:32:51
阅读次数:
232
linux的管道:前一个命令的输出当做后一个命令的输入管道的形式:命令1 |命令2|命令3|....eg:echo"redhat"|passwd --stdin hive cat /etc/passwd|sort cut -d: -f1 /etc/passwd|sort
分类:
系统相关 时间:
2015-07-12 21:33:01
阅读次数:
135
在此之前先区分一下:printf,sprintf,fprintf。
1、printf就是标准输出,在屏幕上打印出一段字符串来。
#include
原型:void printf(const char
*format,[argument]);
功能:一般用于向标准输出设备按规定格式输出信息。
2、sprintf就是把格式化的数据写入到某个字符串中。返回值字符串的长...
分类:
其他好文 时间:
2015-07-10 11:21:17
阅读次数:
143
常常遇到这段代码, while(scanf("%d",&num)!=EOF){...} ,对于 EOF 以及 scanf 函数的返回值始终没有好好研究过,本文将对这个问题进行一下简单的剖析。...
分类:
编程语言 时间:
2015-07-08 09:40:28
阅读次数:
152
一.选项与参数:-n :使用安静(silent)模式。在一般 sed 的用法中,所有来自 STDIN 的数据一般都会被列出到终端上。但如果加上 -n 参数后,则只有经过sed 特殊处理的那一行(或者动作)才会被列出来。-e :直接在命令列模式上进行 sed 的动作编辑;-f :直接将 sed 的动作...
分类:
其他好文 时间:
2015-07-06 13:48:48
阅读次数:
104
1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 using namespace std; 8 9 int main()10 {11 //freopen("in.txt","r",stdin);12 ...
分类:
编程语言 时间:
2015-07-05 09:29:22
阅读次数:
142
int getc(FILE *fp);int putc(int c, FILE * fp);#define getchar() getc(stdin)#define putchar() putc((c), stdout)
分类:
其他好文 时间:
2015-07-01 13:37:52
阅读次数:
124
1.使用fgets#define SLEN 50char str[SLEN];fgets(str, SLEN, stdin);i = 0;while (str[i] != '\n' && str[i] != '\0') i++if (str[i] == '\n') str[i] = '\...
分类:
编程语言 时间:
2015-07-01 12:04:52
阅读次数:
141