java语言对时间的处理
作者:大鹏 发布于:2006-10-1 23:24 Sunday
分类:Java与Jsp
标签: 免费资源 java
TIME Java.sql.Time 时戳,TIMESTAMP Java.sql.Timestamp 当日日期和时间,
对应的ResultSet的方法
DATE java.sql.Date java.sql.Date getDate()
TIME java.sql.Time java.sql.Time getTime()
TIMESTAMP java.sql.Timestamp java.sql.Timestamp getTimestamp()
根据java2的规范要求使用Java.sql.Timestamp,这样不会失去精度详见
Eclipse插件系列——JSEclipse
作者:大鹏 发布于:2006-9-24 13:02 Sunday
分类:Java与Jsp
标签: java jsp
插件分类:Editor
插件版本:1.5.2
插件主页: http://www.interaktonline.com/Products/Eclipse/JSEclipse/Overview/
下载地址: http://www.interaktonline.com/downloads/eclipse/100/JSEclipse_1.5.2.zip
插件介绍:
JSEclipse是在Eclipse环境下的Javascript脚本编辑器,最大的特点就是对js的自动完成功能非常完美,支持普通DOM对象的点取,如document对象,screen对象,这些对象都是通过外置的xml文件配置进行工作的,所以用户可以根据自己需要配置更详细的DOM对象的xml文件。除基本的DOM对象支持外,JSEclipse对js文件内的Class和Function也能完美地支持自动完成。除自动完成功能外,该插件还支持JS的语法高亮、错误和警告提示等等,唯一遗憾的就是没有调试功能,希望下一个版本把javascript脚本调试加进来,这样才算是一个真正意义上的js开发插件。
jsp web calendar
作者:大鹏 发布于:2006-9-24 12:23 Sunday
分类:Java与Jsp
标签: java jsp 收藏
<%@page contentType="text/html"%> <%@page pageEncoding="UTF-8"%> <!-- File name:calendar.jsp --> <!-- 显示任意年、月的日历,可选择不同的年、月。author:Rochael Zhang--> <%@ page language="java" import="java.util.*" %> <%! String year; String month; %> <% month =request.getParameter("month"); year =request.getParameter("year"); %> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>日</title> <script Language="JavaScript"> <!-- function changeMonth() { var mm="calendar.jsp?month="+document.sm.elements[0].selectedIndex+"&year="+<%=year%>; window.open(mm,"_self"); } //--></script> </head> <%! String days[]; %> <% days=new String[42]; for(int i=0;i<42;i++) { days[i]=""; } %> <% Calendar thisMonth=Calendar.getInstance(); if(month!=null&&(!month.equals("null"))) thisMonth.set(Calendar.MONTH, Integer.parseInt(month) ); if(year!=null&&(!year.equals("null"))) thisMonth.set(Calendar.YEAR, Integer.parseInt(year) ); year=String.valueOf(thisMonth.get(Calendar.YEAR)); month=String.valueOf(thisMonth.get(Calendar.MONTH)); thisMonth.setFirstDayOfWeek(Calendar.SUNDAY); thisMonth.set(Calendar.DAY_OF_MONTH,1); int firstIndex=thisMonth.get(Calendar.DAY_OF_WEEK)-1; int maxIndex=thisMonth.getActualMaximum(Calendar.DAY_OF_MONTH); for(int i=0;i<maxIndex;i++) { days[firstIndex+i]=String.valueOf(i+1); } %> <body> <FORM name="sm" method="post" action="calendar.jsp"> <%=year%>年 <%=Integer.parseInt(month)+1%>月 <table border="0" width="168" height="81"> <div align=center> <tr> <th width="25" height="16" bgcolor="#FFFF00"><font color="red">日</font> </th> <th width="25" height="16" bgcolor="#FFFF00">一</th> <th width="25" height="16" bgcolor="#FFFF00">二</th> <th width="25" height="16" bgcolor="#FFFF00">三</th> <th width="25" height="16" bgcolor="#FFFF00">四</th> <th width="25" height="16" bgcolor="#FFFF00">五</th> <th width="25" height="16" bgcolor="#FFFF00"><font color="green">六</fon t></th> </tr> <% for(int j=0;j<6;j++) { %> <tr> <% for(int i=j*7;i<(j+1)*7;i++) { %> <td width="15%" height="16" bgcolor="#C0C0C0" valign="middle" align="ce nter"> <a href="jump.jsp?year=<%=year%>&month=<%=Integer.parseInt(month)+1%>&date=<%=days[i]%>" target="main"><%=days[i]%></a></td> <% } %> </tr> <% } %> </div> </table> <table border="0" width="168" height="20"> <tr> <td width=30%><select name="month" size="1" onChange="changeMonth()" > <option value="0">一月</option> <option value="1">二月</option> <option value="2">三月</option> <option value="3">四月</option> <option value="4">五月</option> <option value="5">六月</option> <option value="6">七月</option> <option value="7">八月</option> <option value="8">九月</option> <option value="9">十月</option> <option value="10">十一月</option> <option value="11">十二月</option> </select></td> <td width=28%><input type=text name="year" value=<%=year%> size=4 maxlength =4></td> <td>年</td> <td width=28%><input type="submit" value="提交"></td> </tr> </table> </FORM> <script Language="JavaScript"> <!-- document.sm.month.options.selectedIndex=<%=month%>; //--> </script> </body> </html>
JSP里request变量列表
作者:大鹏 发布于:2006-9-24 12:18 Sunday
分类:Java与Jsp
标签: java jsp
Protocol: HTTP/1.1
Scheme: http
Server Name: 192.168.0.1
Server Port: 8080
Protocol: HTTP/1.1
Server Info: JavaServer Web Dev Kit/1.0 EA (JSP 1.0; Servlet 2.1; Java 1.2; Windows NT 5.0 x86; java.vendor=Sun Microsystems Inc.)
Remote Addr: 192.168.0.106
Remote Host: abc
Character Encoding: null
Content Length: -1
ArrayList和LinkedList的区别
作者:大鹏 发布于:2006-9-23 18:24 Saturday
分类:Java与Jsp
标签: java jsp
LInkedList而言,随机选择某一元素的动作需要在链表上进行,越靠近链表尾端,花费的时间愈久。
如果将元素安插至序列的中央位置,对 LinkedList来说花费的代价明显小于ArrayList
netbean 5.0 快捷键
作者:大鹏 发布于:2006-9-23 18:17 Saturday
分类:Java与Jsp
标签: java netbeans
在源代码编辑器中键入代码时,可以通过键入以下列表左列中的
缩写,然后按空格键来生成右列中的文本。
Java 编辑器代码模板
En Enumeration
Ex Exception
Ob Object
Psf public static final
Psfb public static final boolean
Psfi public static final int
Psfs public static final String
St String
ab abstract
bo boolean