#includeint main(){ int n,i,a[105]; while(scanf("%d",&n)!=EOF) { for(i=0;i<=100;i++) { a[i]=0; } ...
分类:
其他好文 时间:
2014-09-29 23:35:51
阅读次数:
223
# -*- coding: cp936 -*-
# 1 打开文件
# open(fileName, mode)
# 参数:fileName文件名
# mode打开方式
# w 以写方式打开,
# a 以追加模式打开 (从 EOF 开始, 必要时创建新文件)
# r+ 以读写模式打开
# w+ 以读写模式打开
# a+ 以读写模式打开
# ...
分类:
编程语言 时间:
2014-09-29 14:35:51
阅读次数:
174
一、sendmail报警通知1、停止系统自带的sendmail服务
#/etc/init.d/postfixstop
2、安装sendmail和mailx
#yum-yinstallsendmailmailx
3、修改sendmail配置文件
#cp/etc/mail.rc/etc/mail.rc.bak
#cat>>/etc/mail.rc<<EOF
setfrom=13260071987@139.comsmtp=smtp.1..
分类:
系统相关 时间:
2014-09-29 02:41:27
阅读次数:
540
feof()函数是我们在C语言中操作文件经常用到的一个函数。这个函数用来表示我们是否已经到了文件的末尾的下一个位置。不管是二进制文件,还是文本文件它都管用。对比EOF(一般宏定义为-1),EOF只能用来判断文本文件是否到达末尾,因为文本文件中的数字是用ASCII表示的,ASCII字符的取值范围是0~...
分类:
其他好文 时间:
2014-09-29 00:13:56
阅读次数:
207
1001.Alice and Bob签到题*1,只要x * 2 ==n && y * 2 == m就满足条件。1 var2 m, n, x, y : int64;3 4 begin5 while not eof do begin6 readln(m, n, x, y);7 ...
分类:
其他好文 时间:
2014-09-28 22:25:15
阅读次数:
422
1、概论 -- 来自维基的解释/dev/null :在类Unix系统中,/dev/null,或称空设备,是一个特殊的设备文件,它丢弃一切写入其中的数据(但报告写入操作成功),读取它则会立即得到一个EOF。在程序员行话,尤其是Unix行话中,/dev/null 被称为位桶(bit bucket)或者黑...
分类:
其他好文 时间:
2014-09-28 21:22:25
阅读次数:
224
#!/bin/bash
IP=`awk‘{print$1}‘/home/bash/mima.txt`
foriin$IP
do
{port=`grep$i/home/bash/mima.txt|awk‘{print$2}‘`
pawd=`grep$i/home/bash/mima.txt|awk‘{print$3}‘`
expect<<EOF
spawnssh-p$portroot@$i;
expect{
"(yes/no)?"{send"yes\r"}
"password:"{send"$pa..
分类:
其他好文 时间:
2014-09-28 18:43:36
阅读次数:
133
#includeint main(){ int a,b,i,j; while(scanf("%d %d",&a,&b)!=EOF) { for(i=0;i<b+2;i++) { if(i==0||i==b+1) ...
分类:
其他好文 时间:
2014-09-28 10:02:31
阅读次数:
251
1 #include 2 int main() 3 { 4 int n,a[20],i,j; 5 while(scanf("%d",&n)!=EOF&&n>0) 6 { 7 8 for(i=0;n/2.0!=0;i++) 9 ...
分类:
其他好文 时间:
2014-09-27 10:22:09
阅读次数:
149
#include#include#include#includeusing namespace std;char a[1000+10];int num[1000+10];int main(){ int i,j; int l,r; while(scanf("%s",a)!=EOF) ...
分类:
其他好文 时间:
2014-09-26 01:05:17
阅读次数:
303