摘要:大多数具有一定重要性的 web 应用程序都要求维护某种会话状态,如用户购物车的内容。如何在群集服务器应用程序中管理和复制状态对应用程序的可伸缩性有显著影响。许多 j2se 和 j2ee 应用程序将状态存储在由 servlet api 提供的 httpsession 中。本月,专栏作家 brian goetz 分析了状态复制的一些选项以及如何最有效地使用 httpsession 以提供好的伸缩性和性......
摘要:windows网络编程(一)
1. 关于bind
inaddr_any 的具体含义是,绑定到0.0.0.0。此时,对所有的地址都将是有效的,如果系统考虑冗余,采用多个网卡的话,那么使用此种bind,将在所有网卡上进行绑定。在这种情况下,你可以收到发送到所有有效地址上数据包。
例如:
sockaddr_in local;
local.sin_addr.s_addr = htonl(......
一个JavaScript的日历改自blog上流行的日历,增加了一些效果,修改了外观,优化了代码.效果见左边吧.
【程序编程相关:
毕业五年有感,给年轻人的一点忠告】 【推荐阅读:
设计模式学习笔记——《设计模式》引言】 代码如下:
<script language="javascript"> 【扩展信息:
xmlhttp 抓取网页内容1】 var months = new array("一", "二", "三","四", "五", "六", "七", "八", "九","十", "十一", "十二"); var daysinmonth = new array(31, 28, 31, 30, 31, 30, 31, 31,30, 31, 30, 31); var days = new array("日","一", "二", "三","四", "五", "六"); var classtemp; var today=new gettoday(); var year=today.year; var month=today.month; var newcal;
function getdays(month, year) {
if (1 == month) return ((0 == year % 4) && (0 != (year % 100))) ||(0 == year % 400) ? 29 : 28; else return daysinmonth[month]; }
function gettoday() {
this.now = new date(); this.year = this.now.getfullyear(); this.month = this.now.getmonth(); this.day = this.now.getdate(); }
function calendar() {
newcal = new date(year,month,1); today = new gettoday(); var day = -1; var startday = newcal.getday(); var endday=getdays(newcal.getmonth(), newcal.getfullyear()); var daily = 0; if ((today.year == newcal.getfullyear()) &&(today.month == newcal.getmonth())) { ...
下一页 摘要:final 关键字常常被误用 - 声明类和方法时使用过度,而声明实例字段时却使用不足。本月,java 实践者 brian goetz 探究了一些有关有效使用 final 的准则。
如同它的“表亲”- c 中的 const 关键字一样,根据上下文,final 表示不同的东西。final 关键字可应用于类、方法或字段。应用于类时,意味着该类不能再生成子类。应用于方法时,意味着......