码迷,mamicode.com
首页 >  
搜索关键字:while read line for ifs    ( 74720个结果
杭电 2000
#include using namespace std;#define MAXN 4int main(){ //char arr[MAXN] = {0}; char arr[MAXN]; memset(arr,0,MAXN); while (cin >> arr) {...
分类:其他好文   时间:2014-05-14 02:32:38    阅读次数:327
杭电2001
#include #include #include using namespace std;int main(){ double x1,y1,x2,y2; double result; while (cin>>x1>>y1>>x2>>y2) { result ...
分类:其他好文   时间:2014-05-14 02:02:49    阅读次数:242
socket编程中recv与send函数
recv函数会将套接字缓冲区中的内容读出,但不清空,与read函数的区别在此。此函数有一个flag标志位,设为MSG_PEEK。 send函数会将缓冲区中的内容写入到套接字,也不清空,与write函数的区别在此。 用这两个函数可以先接收或发送缓冲区中的内容,然后再用readn(此时缓冲区中的内容依然存在)与write函数去继续判断换行符/n,对缓冲区内容实现换行输出。 echocli.c...
分类:其他好文   时间:2014-05-13 23:43:35    阅读次数:494
响应式网站
1.图片自动等比例缩放{display:block;width:100%; height:auto;}
分类:Web程序   时间:2014-05-13 22:47:10    阅读次数:453
poj 2074 Line of Sight 计算几何
1 /** 2 大意:给定一个建筑--水平放置,给定n个障碍物, 给定一条街道,从街道上能看到整个建筑的最长的连续的区域 3 思路: 分别确定每一个障碍物所确立的盲区,即----建筑物的终点与障碍物的起点的连线,建筑物的起点与障碍物的终点的连线。。这段区域即为盲区,,,有多个盲区,需要去重。...
分类:其他好文   时间:2014-05-13 20:38:27    阅读次数:349
FileSystemObject组件新建读取添加修改删除功能实例
FileSystemObject组件应该实例              read="michael.txt"  '获取文件真实路径  read=LEFT(Server.MapPath(Request.ServerVariables("PATH_INFO")),InstrRev(Server.MapPath(Request.ServerVariables("PATH_INF...
分类:其他好文   时间:2014-05-13 07:17:51    阅读次数:283
用shell脚本监控linux系统 自动发送邮件
此脚本可以做一个定时的检测,超出设定的值,即往邮箱发送警告脚本用到bc,sendmail,163邮箱,yuminstallbc#!/bin/bash #SystemMonitoringScript while[1] do #本机需开启postfix或sendmail服务。 #报警邮件地址设置 MAILFROM=root@localhost MAILTO=your_mail@163.com #设置..
分类:系统相关   时间:2014-05-13 05:05:29    阅读次数:649
Linux之部分shell脚本练习(二)
whileCONDITION;dostatementdone进入循环:条件满足退出循环:条件不满足untilCONDITION;dostatment...done#!/bin/bash#read-p"Inputsomething:"STRINGwhile[$STRING!=‘quit‘];doecho$STRING|tr‘a-z‘‘A-Z‘read-p"Inputsomething:"STRINGdone#!/bin/bash#read-p"Inputsomething:..
分类:系统相关   时间:2014-05-13 03:58:53    阅读次数:343
php循环删除目录及目录下的文件
分享两个使用函数:php循环删除目录及目录下的文件和仅删除指定目录下的文件,不删除目录文件夹!代码一:php循环删除目录及目录下的文件<?php//循环删除目录和文件函数functiondelDirAndFile($dirName){if($handle=opendir("$dirName")){while(false!==($item=readdir($han..
分类:Web程序   时间:2014-05-13 01:47:25    阅读次数:410
HDU 4028 The time of a day STL 模拟题
暴力出奇迹。。 #include #include #include #include #include #include #include #include using namespace std; #define ll __int64 #define N 42 ll n,m,ans; ll Gcd(ll x,ll y){ if(x>y)swap(x,y); while(x){ y%=...
分类:其他好文   时间:2014-05-12 23:11:06    阅读次数:445
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!