UVa 10387- BilliardTable of Contents1 题目2 思路3 代码4 参考1题目=============Problem A: BilliardIn a billiard table with horizontal side a inches and vertical side b inches, a ball is launched from the middle of the table. After s > 0 seconds the ball returns to the point from which it was launched, after Read More
posted @ 2013-08-10 00:18 javawebsoa Views(724) Comments(0) Diggs(0) Edit
今儿,我遇到一个大怪物 --夏令虫╮(╯▽╰)╭,学艺不精,因为他掉进大坑里去了。坑是这样挖的:以前,我为了表示当前时间的“明天”、“后天”,会用到类如下面的写法:$date = date(time + 3600*24*N);殊不知,这种写法并不安全的,请看例子:ini_set('date.timezone','Europe/Berlin');echo date("Y-m-d H:i:s",1382824800);echo "";echo date("Y-m-d H:i:s",1382824800 + Read More
posted @ 2013-08-10 00:17 javawebsoa Views(358) Comments(0) Diggs(0) Edit
内置对象的特点: 1.由JSP规范提供,不用编写者实例化。2.通过Web容器实现和管理3. 所有JSP页面均可使用4.只有在脚本元素的表达式或代码段中才可使用(或)九大内置对象:1.输出输入对象:request对象、response对象、out对象2.通信控制对象:pageContext对象、session对象、application对象3.Servlet对象:page对象、config对象4.错误处理对象:exception对象 对象常用方法说明:1.out对象(数据流 javax.servlet.jsp.jspWriter)方法名 说明 print或println 输出数据 ... Read More
posted @ 2013-08-10 00:15 javawebsoa Views(3493) Comments(0) Diggs(1) Edit
参考资料 reference: http://mongodb.blog.51cto.com/1071559/740131 http://docs.mongodb.org/manual/tutorial/deploy-shard-cluster/#sharding-setup-shard-collection感谢网友Mr.Sharp,他给了我很多很有用的建议。概念梳理 Sharded cluster has the following components: shards, query routers and config servers.Shards A : A shard is a M... Read More
posted @ 2013-08-10 00:13 javawebsoa Views(1489) Comments(0) Diggs(0) Edit
相信大家都知道非常著名的两个名词:异常和中断,不过,你真的理解这两个名词在说什么吗?它们之间有什么区别呢? 1.中断 大家都知道,当我们在敲击键盘的同时就会产生中断,当硬盘读写完数据之后也会产生中断,所以,我们需要知道,中断是由硬件设备产生的,而它们从物理上说就是电信号,之后,它们通过中断控制器发送给CPU,接着CPU判断收到的中断来自于哪个硬件设备(这定义在内核中),最后,由CPU发送给内核,有内核处理中断。下面这张图显示了中断处理的流程: 2.异常 我们在学习《计算机组成原理》的时候会知道两个概念,CPU处理程序的时候一旦程序不在内存中,会产生缺页异常;当运行除法程序... Read More
posted @ 2013-08-10 00:11 javawebsoa Views(536) Comments(0) Diggs(0) Edit
Html编码规范语义化结构 (使用符合语义的标签书写 HTML 文档,选择恰当的元素表达所需的含义)所有的标签元素和属性的名字都必须使用小写; 属性值必须加双引号; 所有的标记都必须有一个相应的结束标记 ;嵌套标签必须合理同级标记 上下应对齐,父级标记与子标记之间的标签元素要有一定的缩进。多行相似的代码出现要对齐。注意图片大小以及保存格式:结构图片保存成 gif格式的;组合多个不同的背景小图标到一张图上并且摆放整齐有序,然后保存透明 gif /png 的格式;图片大小最大不能超过80k;图片增加alt 属性.css样式 、html结构、 js脚本 三者进行完全分离。(css js 外部引用,j Read More
posted @ 2013-08-10 00:09 javawebsoa Views(592) Comments(0) Diggs(0) Edit
白书说这个是MP,没有对f 数组优化过,所以说KMP有点不准确#include int a,b;int T[1000010],P[10010];//从0开始存int f[10010];//记录P的自我匹配void getFail(){ int m=b; f[0]=f[1]=0; for(int i=1;i<m;i++){ int j=f[i]; while(j&&P[i]!=P[j])j=f[j]; f[i+1]= P[i]==P[j] ? j+1 : 0; }}bool find(){ int len1=a,len2=b; getFail(); int j=0; for Read More
posted @ 2013-08-10 00:07 javawebsoa Views(221) Comments(0) Diggs(0) Edit
貌似····················这个算法深的东西还是很不熟悉!继续学习!!!!++++++++++++++++++++++++++++============================++++++++++++++++++++++++++++-------------------------------------------------====================== Read More
posted @ 2013-08-10 00:05 javawebsoa Views(391) Comments(0) Diggs(0) Edit
某些公司对安全性有着较高的要求。在传统瀑布模式下,会有阶段性的安全检查milestone。但是在引入敏捷,每个迭代都需要交付,满足DoD。那么,security是否也应该是DoD的一部分?如何将安全性要求融入每个短迭代中呢?见脑图中的一些想法。 Read More
posted @ 2013-08-10 00:03 javawebsoa Views(279) Comments(0) Diggs(0) Edit
Graph Search and Connectivity Generic Graph Search Goals 1. find everything findable 2. don't explore anything twice Generic Algorithm (given graph G, vertex S) --- initialize S explored (all others unexplored) --- while possible: --- choose an edge(u, v) with u explor... Read More
posted @ 2013-08-10 00:01 javawebsoa Views(2460) Comments(0) Diggs(0) Edit