read(fd, buf,
number)从fd中申请读取number个字符,返回实际读取的数,若达到文件末,则返回0.若文件中有30个字符,number设置100第一次:read返回30第二次:read返回0故一般读取文件形式:while((n
= read(fd,buf,number)) >0)...
分类:
其他好文 时间:
2014-06-29 14:07:29
阅读次数:
243
#includevoid ShellSort(int *a,int length){ int
jump=length; int temp=0; int change=1; while(jump>0) //while1 { jump=jump/2;
change=1; /***************...
分类:
其他好文 时间:
2014-06-07 03:53:30
阅读次数:
243
Implementint sqrt(int x).Compute and return the
square root
ofx.classSolution{public:intsqrt(intx){inti=0;intstep=1;while(step>0){while((i+step)>1);}r...
分类:
其他好文 时间:
2014-06-04 19:54:17
阅读次数:
214
VOIDKiAdjustIrpCredits ( VOID )其中 Number =
KeNumberProcessors;Prcb = KiProcessorBlock[Index];多核情况下调整每个CPU的IRP对象配额。在while
(Index Lookaside...
分类:
其他好文 时间:
2014-06-03 11:35:52
阅读次数:
254
逆序数的性质。1. 暴力解 1 #include 2 3 #define MAXNUM 5005 4
5 int a[MAXNUM]; 6 7 int main() { 8 int n; 9 int i, j, sum, min;10 11 while
(scanf(...
分类:
其他好文 时间:
2014-05-31 07:50:50
阅读次数:
170
水题,不过要想0ms过还是有个技巧的:#include #include using
namespace std;int main(){ int score[101]; int t,t1,temp; while(cin>>t) {
//memset(score,...
分类:
其他好文 时间:
2014-05-30 16:53:11
阅读次数:
268
做法1: List list = new List(); Random rand = new
Random(); while (list.Count =1,=0,<100 之间的随机数m、n,颠倒arr[m]和arr[n]的数。 int[] arr
= new int[100]; //把100个数顺...
分类:
其他好文 时间:
2014-05-30 04:27:12
阅读次数:
208
解决SQL Server管理器无法连接远程数据库Error: 1326错误我们在在使用SQL
Server时都会遇到使用SQL Server Management Studio无法连接远程数据库实例的问题,错误描述信息摘录如下:An error has
occurred while establis...
分类:
数据库 时间:
2014-05-29 20:50:49
阅读次数:
404
http://ubuntuforums.org/archive/index.php/t-1771058.htmlI
accidentally discovered a fix for this while trying to solve a different
problem.edit~/.conf...
分类:
其他好文 时间:
2014-05-29 15:00:26
阅读次数:
623
/*提示用户输入一个正整数n,如果n=5,就输出下列图形,其他n值以此类推****************/#includeintmain(){//1.定义一个变量存储用户输入的值intn=0;//一定要初始化//2.判断n值合不合理while(n<=0){//2.1提示用户输入正整数printf(...
分类:
其他好文 时间:
2014-05-28 18:51:18
阅读次数:
390