上一页 1 ··· 284 285 286 287 288 289 290 291 292 ··· 300 下一页
2013年7月28日

层层递进Struts1(五)之处理流程

摘要: 这篇博客我们深入Struts框架执行部分源码,从ActionServlet的process函数开始,看一下其内在的执行过程。 流程图 以下流程图展示的是ActionServlet和RequestProcessor两个类用到的函数,如RequestProcessor调用的其它类的函数不再说明。 函数说明 我们选择几个重要的函数说明,其它函数则简单说明一下即可。 ActionServlet process /** * Perform the standard request processing for this request, and create *... 阅读全文
posted @ 2013-07-28 20:46 you Richer 阅读(319) 评论(0) 推荐(0) 编辑

SDJZUOJ迷宫问题

摘要: 题目描述小明置身于一个迷宫,请你帮小明找出从起点到终点的最短路程。 小明只能向上下左右四个方向移动。 输入格式输入包含多组测试数据。输入的第一行是一个整数T,表示有T组测试数据。 每组输入的第一行是两个整数N和M(1#include#include#includeusing namespace std;struct N //结构体定义了2个信息:{ int x,y; //结点编号 int step; //步数} p[105];char map[105][105];int vis[105][105];int dir[4][2]= {{-1,0},{0,-1},{1,0},{0,... 阅读全文
posted @ 2013-07-28 20:42 you Richer 阅读(389) 评论(0) 推荐(0) 编辑

HDU 2059 龟兔赛跑

摘要: http://acm.hdu.edu.cn/showproblem.php?pid=2059 这个题用动态规划做。 问题:求到终点最短时间 因此,只要看乌龟和兔子到达终点的时间哪个短就行了。 兔子跑完全程用的时间很好求:time = L / VR 最主要的就是乌龟的最短时间。 我动态规划不是很懂,因此问了一下同学,给我讲解了一下,通过自己的理解,开始对动态规划有一点点感觉了。。 在这里,算乌龟的时间用动态规划,用dp[i]存储到达第i个充电站所用的最短时间,这里我们可以推导一下只有3个充电站的时候的情况: 在第二充电站时,有充电或者不充电到达... 阅读全文
posted @ 2013-07-28 20:40 you Richer 阅读(189) 评论(0) 推荐(0) 编辑

win32多线程-异步(asynchronous) I/O

摘要: I/O设备是个慢速设备,无论打印机、调制解调器,甚至硬盘,与CPU相比都奇慢无比,坐下来干等I/O的完成是一件不甚明智事情。 异步(asynchronous) I/O在win32多线程程序设计中被称为overlapped I/O,是win32的一项技术,你可以要求操作系统为你传送数据,并且在传送完毕时通知你。这项技术使你的程序在I/O进行过程中仍然能够继续处理事务。事实上,操作系统内部正是以多线程完成overlapped I/O,你可以获得线程的所有利益,而不需要付出什么痛苦代价。异步(asynchronous) I/O事例: /* * IoByEvnt.c * * Sample... 阅读全文
posted @ 2013-07-28 20:38 you Richer 阅读(461) 评论(0) 推荐(0) 编辑

ZOJ3712:Hard to Play

摘要: MightyHorseis playing a music game calledosu!.After playing for several months,MightyHorsediscovered the way of calculating score inosu!:1. While playingosu!, player need to click some circles following the rhythm. Each time a player clicks, it will have three different points: 300, 100 and 50, deci 阅读全文
posted @ 2013-07-28 20:36 you Richer 阅读(253) 评论(0) 推荐(0) 编辑

ZOJ3714:Java Beans

摘要: There areNlittle kids sitting in a circle, each of them are carrying some java beans in their hand. Their teacher want to selectMkids who seated inMconsecutive seats and collect java beans from them.The teacher knows the number of java beans each kids has, now she wants to know the maximum number of 阅读全文
posted @ 2013-07-28 20:34 you Richer 阅读(241) 评论(0) 推荐(0) 编辑

ZOJ3708:Density of Power Network

摘要: The vast power system is the most complicated man-made system and the greatest engineering innovation in the 20th century. The following diagram shows a typical 14 bus power system. In real world, the power system may contains hundreds of buses and thousands of transmission lines.Network topology an 阅读全文
posted @ 2013-07-28 20:33 you Richer 阅读(258) 评论(0) 推荐(0) 编辑

刚子扯扯蛋:说下百度对网站原创文章的个人感受

摘要: 文/刚子 2013年7月28日 大家还记得百度的星火计划里提到的网站原创文章的重要性吗?这个破计划,我是不太了解的。因为当初那是我正在看百度推出的绿萝算法,然后我问同事,是不是咱们要注意了。 其实没啥要注意的,因为我们这类公司里面基本上没有软文推广这一说,就更别谈软文营销这一说了。所以,我很纳闷的就是原来网站运营就是这么回事吗?其实非也。经过偶的一段时间的验证,不得不再次拿出这个原创问题来和大家一起进行探讨和分享自身网站原创体会的感受。 当然这部分分享是基于个人的实践,网站编辑里面很少有人懂SEO,所以写出来的东西百度是喜欢,但是不会产生流量价值。所以着落内容的优化不是每一个做网站编辑... 阅读全文
posted @ 2013-07-28 20:30 you Richer 阅读(231) 评论(0) 推荐(0) 编辑

hdu2364之BFS

摘要: Escape Time Limit: 1000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 569Accepted Submission(s): 227 Problem Description You find yourself trapped in a large rectangular room, made up of large square tiles; some are accessible, others are blocked by ... 阅读全文
posted @ 2013-07-28 20:29 you Richer 阅读(206) 评论(0) 推荐(0) 编辑

HDU1412:{A} + {B}

摘要: Problem Description 给你两个集合,要求{A} + {B}. 注:同一个集合中不会有两个相同的元素. Input 每组输入数据分为三行,第一行有两个数字n,m(0#include #include using namespace std;int main(){ int n,m,a[10005],b[10005],i,j; while(~scanf("%d%d",&n,&m)) { for(i = 0; i la; list lb; for(i = 0; i<n; i++) la.push... 阅读全文
posted @ 2013-07-28 20:27 you Richer 阅读(156) 评论(0) 推荐(0) 编辑
上一页 1 ··· 284 285 286 287 288 289 290 291 292 ··· 300 下一页