上一页 1 2 3 4 5 6 7 8 ··· 15 下一页
摘要: #include <stdio.h>#include <stdlib.h>#include <iostream.h>#include <time.h> #define Bsize 3#define Psize 20struct pageInfor{ int content;//页面号 int timer;//被访问标记};class LRU{ public: LRU(int qstring[]); int findSpace(void);//查找是否有空闲内存 int findExist(int curpage);//查找内存中是否有该页面 in 阅读全文
posted @ 2012-05-13 10:07 常伟华 阅读(4255) 评论(4) 推荐(1) 编辑
摘要: 结果图 1 #include <stdio.h> 2 //s为初态,z为终态 3 int in(int s,int z) 4 { 5 if(s == z) 6 { 7 printf("3\nlook!the last status belongs to Z"); 8 return 1; 9 }10 else11 {12 return 0;13 }14 }15 //s为状态,t为输入的字符16 int step(int s,char t)17 {18 if(t == 'a')19 ... 阅读全文
posted @ 2012-05-07 20:29 常伟华 阅读(1283) 评论(0) 推荐(0) 编辑
摘要: 1 #include <stdio.h> 2 int main() 3 { 4 int a ,b,c; 5 printf("请输入第一个数字"); 6 scanf("%d",&a); 7 printf("请输入第二个数字"); 8 scanf("%d",&b); 9 printf("交换之前a=%d\tb=%d",a,b);10 printf("\n");11 a = a + b;12 b = a - b;13 a = a - b;14 print 阅读全文
posted @ 2012-04-30 19:39 常伟华 阅读(1568) 评论(0) 推荐(0) 编辑
摘要: 1 #include <stdio.h> 2 3 int main() 4 { 5 int c,m,n,l; 6 m=n=l=0; 7 /* m代表空格个数,n代表制表符个数,l代表换行符个数 */ 8 int flag=0;//表示是否遇到换行符 9 while((c = getchar()) != EOF)10 {11 if(c == '\n')12 {13 ++l;14 flag = 1;15 continue;16 ... 阅读全文
posted @ 2012-01-29 13:14 常伟华 阅读(3908) 评论(0) 推荐(0) 编辑
摘要: 1 #include <stdio.h> 2 3 int main() 4 { 5 int c = 0,flag = 0; 6 printf("Clear blanks"); 7 while((c=getchar()) != EOF) 8 { 9 if(c == ' ')10 {11 if(flag == 0)12 {13 flag = 1;14 }15 else16 {17 ... 阅读全文
posted @ 2012-01-29 12:10 常伟华 阅读(1558) 评论(0) 推荐(0) 编辑
摘要: [Version] Signature="$Windows NT$" Provider="Microsoft Visual Studio 2010 Ultimate - ENU" Version=900.100.00 NullString=Null String Lang=1033 BootstrapperURL=fwlink/?LinkId=158842 NewVersionURL=fwlink/?LinkId=138177 [Scenario List] vsscenario.dll [Scenario Factory Information] De 阅读全文
posted @ 2012-01-14 13:39 常伟华 阅读(202) 评论(0) 推荐(0) 编辑
摘要: 1、Servlet跳转,同一个Servlet如何在不同的目录下进行跳转,第一种方法当然是将Servlet放在最内层的目录中发,但是当你在外层目录使用转向(request.getRequestDispatcher("user-modify.jsp").forward(request, response);)的时候,你会发现很容易被困在最内层目录,以及外层调用时,暴露了路径,所以我们可以在配置Servlet的时候,配置多个<url-pattern>,即可以避免这个问题2、JavaScript操作Cookie 1 function getCookie(name) // 阅读全文
posted @ 2011-12-20 08:53 常伟华 阅读(265) 评论(0) 推荐(0) 编辑
摘要: 1、含义:常见问题解答(Frequently Asked Questions)2、软件团队的沟通方式 1、口头沟通:迅速传达信息,能及时得到回馈,但是不能保留和保存信息 2、会议沟通:适于解决复杂、较困难的问题,但是成本高,时间长 3、文档沟通:沟通有一定的延迟。传达着获取信息后需要花一定的时间撰写、整理后再传达给对方、但是沟通时间长。需要对方花较长的时间阅读,理解 阅读全文
posted @ 2011-12-16 21:29 常伟华 阅读(337) 评论(0) 推荐(0) 编辑
摘要: 1 package net.cmono.javaweb.c3; 2 3 import java.awt.Color; 4 import java.awt.Font; 5 import java.awt.Graphics2D; 6 import java.awt.image.BufferedImage; 7 import java.io.IOException; 8 import java.io.PrintWriter; 9 import java.util.Random; 10 11 import javax.servlet.ServletException; 12 i... 阅读全文
posted @ 2011-12-08 23:48 常伟华 阅读(1461) 评论(0) 推荐(0) 编辑
摘要: public List<Message> getByPage(int page) { // TODO Auto-generated method stub String sql = "select * from message"; Message message = null; DateFormat format = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss"); List<Message> list = new ArrayList<Message>(); try { conn 阅读全文
posted @ 2011-12-07 18:32 常伟华 阅读(4649) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 ··· 15 下一页