- 博客(137)
- 收藏
- 关注
原创 Strust2+JavaBean+DAO开发示例
题目要求:(1)技术要求:采用struts2架构构建一个简单的登录系统。(2)系统功能要求:当用户在登录页面上填写用户名和密码并提交后,系统检查该用户是否已经注册,若注册,系统进入主页面,否则,进入注册页面。构建系统的处理步骤(1)分析系统,给出系统的业务流程(这是系统设计的关键一步,只有搞清业务处理,才能开发出正确的系统)(2)系统设计,根据对系统的分析,
2013-10-23 10:18:01
956
原创 DAO操作--以MySQL为例
1.1 MySQL数据库基础MySQL 是一个真正的多用户、多线程SQL数据库服务器,MySQL具有小巧、功能齐全、查询迅捷等优点 ,MySQL 对于一般中小型,甚至大型应用都能够胜任。1.2 数据类型和数据表 用于保存数据记录的结构被称为数据表。而每一条数据记录则是由更小的数据对象,即数据类型组成。Database < Table < Record < Datatype
2013-10-23 09:35:08
1669
原创 DDA算法
DDA算法(Digital Differential Analyzer),又称数值微分法,是计算机图形学中一种基于直线的微分方程来生成直线的方法。|k|void DDALine(int x0,int y0,int x1,int y1,int color){ int x; float dx,dy,y,k; dx=x1-x0,dy=y1-
2013-10-15 21:28:06
1823
原创 Struts2+JavaBean的开发练习
输入两个整数,计算这两个数的代数和,如果代数和为非负数,这跳转到positive.jsp,否则跳转到negative.jsp并显示计算结果。开发步骤:1.安装Struts2将所需要的jar包放入WEB-INF\lib下2.配置web.xml修改WEB-INF下的web.xml<web-app version="2.5" xmlns="http://java.sun
2013-10-11 00:16:25
1062
原创 MVC框架技术Struts2
1.Struts2概述1.1在Web程序的开发过程中,大家普遍认可了MVC模式的重要地位。但是MVC模式并没有给出代码结构性的具体要求。例如MVC的控制器部分是做一个Servlet,还是做多个Servlet,跳转页面的名称是写在代码中,还是写在配置文件中。对这些问题,MVC模式不能给出进一步的回答。虽然大家都使用MVC模式,但是写出来的代码还是不能做到完全的一致。这样就给MVC模式开发的规范化
2013-10-10 23:56:24
1057
原创 设置默认信息的方法
(1)设置默认的主页: web.xml--->修改(2)设置默认端口--》80(8080--》80) 直接修改conf/server.xml,找到: maxHttpHeaderSize=”8192″ 把其中的8080修改为80,(3)设置默认工程: 直接修改:修改默认项目地址的方法: 在
2013-10-10 23:37:17
979
原创 JSP+Servlet+JavaBean实现MVC模式练习
5种开发模式的总结1、利用单纯的JSP页面开发模式设计Web程序,计算1+2+3+….+100的和值,并在网页上显示结果。文件结构index.jsp <% int i; int sum=0; for(i=1;i<=100;i++) sum+=i; %> 这是一单纯的jsp页面编程示例
2013-10-10 23:34:48
3140
1
原创 codeforces 263C. Circle of Numbers
C. Circle of Numberstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputOne day Vasya came up to the blackboar
2013-09-24 11:57:04
1516
原创 hdu 1012 u Calculate e
u Calculate eTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 25225 Accepted Submission(s): 11190Problem DescriptionA simple m
2013-09-19 09:25:50
873
原创 hdu 4737 A Bit Fun 暴力
A Bit FunTime Limit: 5000/2500 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 76 Accepted Submission(s): 41Problem DescriptionThere are n numbers
2013-09-14 18:01:52
1539
6
原创 poj 2115 C Looooops 扩展欧几里德算法
C LooooopsTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 15305 Accepted: 3901DescriptionA Compiler Mystery: We are given a C-language style for loop of
2013-09-12 20:55:23
931
原创 poj 2185 Milking Grid KMP
Milking GridTime Limit: 3000MS Memory Limit: 65536KTotal Submissions: 5046 Accepted: 2113DescriptionEvery morning when they are milked, the Farmer John's cows for
2013-09-12 20:37:44
1968
原创 poj 1101 The Game BFS
The GameTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 8401 Accepted: 2564DescriptionOne morning, you wake up and think: "I am such a good programmer.
2013-09-12 20:27:11
1503
原创 poj 1102 LC-Display
LC-DisplayTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 14432 Accepted: 5763DescriptionA friend of you has just bought a new computer. Until now, the
2013-09-12 20:22:01
783
原创 poj 1105 S-Trees 数组模拟建树
S-TreesTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 1321 Accepted: 707DescriptionA Strange Tree (S-tree) over the variable set Xn = {x1,x2,...,xn} is
2013-09-11 10:34:56
1214
原创 hdu 2896 病毒侵袭 AC自动机
病毒侵袭Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 8250 Accepted Submission(s): 2158Problem Description当太阳的光辉逐渐被月亮遮蔽,世界失去了光明
2013-09-08 16:02:51
549
原创 hdu 4196 Remoteland 基本算术定理
RemotelandTime Limit: 10000/5000 MS (Java/Others) Memory Limit: 262144/131072 K (Java/Others)Total Submission(s): 846 Accepted Submission(s): 305Problem DescriptionIn the Republi
2013-08-31 16:41:32
918
原创 POJ 1204 Word Puzzles AC自动机
Word PuzzlesTime Limit: 5000MS Memory Limit: 65536KTotal Submissions: 8353 Accepted: 3160 Special JudgeDescriptionWord puzzles are usually simple and very ent
2013-08-28 10:08:23
906
原创 hdu 2179 pi 母函数
piTime Limit : 6000/2000ms (Java/Other) Memory Limit : 32768/32768K (Java/Other)Total Submission(s) : 1 Accepted Submission(s) : 1Problem Description计算圆周率到小数点后5n 位。(本题不可打表)
2013-08-23 11:00:40
1200
1
原创 hdu 1234 Rooted Trees Problem 有重复的组合+乘法原理
Rooted Trees ProblemTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 443 Accepted Submission(s): 147Problem DescriptionGive yo
2013-08-23 10:46:29
1023
原创 hdu 1799 循环多少次? 组合数
循环多少次?Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 2298 Accepted Submission(s): 832Problem Description 我们知道,在编程中,我们时常需要考虑
2013-08-22 17:33:02
661
原创 poj 2406 Power Strings KMP应用
Power StringsTime Limit: 3000MS Memory Limit: 65536KTotal Submissions: 27694 Accepted: 11600DescriptionGiven two strings a and b we define a*b to be their concate
2013-08-22 16:22:25
857
原创 Ural 1167. Bicolored Horses DP
1167. Bicolored HorsesTime limit: 1.0 secondMemory limit: 64 MBEvery day, farmer Ion (this is a Romanian name) takes out all his horses, so they may run and play. When they are done, far
2013-08-21 15:36:25
1306
原创 Ural 1132. Square Root 二次剩余
1132. Square RootTime limit: 1.0 secondMemory limit: 64 MBThe number x is called a square root of a modulo n (root(a,n)) if x*x = a (mod n). Write the program to find the square root o
2013-08-19 17:43:12
1256
原创 Ural 1456. Jedi Riddle 2 整数的阶
1456. Jedi Riddle 2Time limit: 0.25 secondMemory limit: 64 MBBackgroundEveryone wants to be respected and famous. At that many of us forget that most people became respected and famous
2013-08-19 11:26:58
791
原创 Ural 1554. Multiplicative Functions 狄利克雷卷积
1554. Multiplicative FunctionsTime limit: 2.0 secondMemory limit: 64 MBIn number theory, a multiplicative function is an arithmetic function F(n) of the positive integer nwith property t
2013-08-19 09:46:19
1861
原创 hdu 3292 No more tricks, Mr Nanguo pell方程+矩阵快速幂
No more tricks, Mr NanguoTime Limit: 3000/1000 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 201 Accepted Submission(s): 113Problem DescriptionNo
2013-08-17 10:01:18
826
原创 poj 1006 生理周期 中国剩余定理
生理周期Time Limit: 1000MS Memory Limit: 10000KTotal Submissions: 103623 Accepted: 32049Description人生来就有三个生理周期,分别为体力、感情和智力周期,它们的周期长度为23天、28天和33天。每一个周期中有一天是高峰。在高峰这天,人会
2013-08-17 09:41:57
1263
原创 poj 2689 Prime Distance 二次筛法
Prime DistanceTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 10269 Accepted: 2772DescriptionThe branch of mathematics called number theory is about pro
2013-08-17 09:30:30
726
原创 Ural 1268. Little Chu 求原根
1268. Little ChuTime limit: 0.25 secondMemory limit: 64 MBThe favorite occupation of Little Chu is to sleep. Strictly speaking, he is busy with nothing but sleeping. Sometimes he wakes u
2013-08-15 18:35:12
869
原创 Ural 1428. Jedi Riddle 二分求幂
1428. Jedi RiddleTime limit: 1.0 secondMemory limit: 64 MBBackgroundSystem administrator Vasily Slipman, also known as Jedi Master, was an outstanding jester. He enciphered gigabyte ar
2013-08-15 10:02:54
684
原创 Ural 1585. Penguins
1585. PenguinsTime limit: 1.0 secondMemory limit: 64 MBProgrammer Denis has been dreaming of visiting Antarctica since his childhood. However, there are no regular flights to Antarctica
2013-08-14 20:58:49
808
原创 Ural 1698. Square Country 5 记忆化搜索
1698. Square Country 5Time limit: 2.0 secondMemory limit: 64 MBThe first arithmetical operation taught to the children of the Square country is the calculation of squares of positive int
2013-08-14 20:26:18
909
原创 Ural 1593. Square Country. Version 2 Lagrange 定理
1593. Square Country. Version 2Time limit: 1.0 secondMemory limit: 64 MBThere live square people in a square country. Everything in this country is square also. Thus, the Square Parliame
2013-08-14 20:05:06
1174
原创 Ural 1097. Square Country 2
1097. Square Country 2Time limit: 1.0 secondMemory limit: 64 MBThe Square Parliament of the Square country (recall the corresponding problem from the USU 2001 personal contest) has decre
2013-08-14 18:30:23
1309
原创 Ural 1748. The Most Complex Number DFS+反素数
1748. The Most Complex NumberTime limit: 1.0 secondMemory limit: 64 MBLet us define a complexity of an integer as the number of its divisors. Your task is to find the most complex intege
2013-08-14 17:00:14
1039
原创 Ural 1486. Equal Squares 字符串hash
1486. Equal SquaresTime limit: 2.0 secondMemory limit: 16 MBDuring a discussion of problems at the Petrozavodsk Training Camp, Vova and Sasha argued about who of them could in 300 minute
2013-08-14 14:51:40
1671
原创 Ural 1446. Sorting Hat
1446. Sorting HatTime limit: 1.0 secondMemory limit: 64 MBAt the start of each school year, a very important event happens at Hogwarts. Each of the first-year wizards and witches is assi
2013-08-14 10:11:53
937
原创 Ural 1706. Cipher Message 2 后缀数组
1706. Cipher Message 2Time limit: 3.0 secondMemory limit: 64 MBMüller had been suspecting for a long time that Stierlitz had been sending cipher messages to the USSR from time to time. A
2013-08-14 09:54:52
863
原创 poj 3096 Surprising Strings 字符串哈希
Surprising StringsTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 5232 Accepted: 3438DescriptionThe D-pairs of a string of letters are the ordered pairs
2013-08-13 11:23:11
716
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人