- 博客(9)
- 资源 (8)
- 收藏
- 关注
原创 在jsp页面得到URL base
<br /><%= request.getRequestURL()).substring(0, request.getRequestURL().indexOf(request.getRequestURI())) %>
2010-10-29 10:49:00 834
转载 java 日志的一种写法(转)
<br />public void writeLog(String logFileName, String content) { try { /* 日志文件大小最大为100KB */ File log = new File(logFileName); if (log.length() > 102400) { if (log.delete()) logger.info("日志文件: " + logFileName + " 已满, 已经自动清空.");
2010-10-29 09:54:00 818
原创 可以用javascript语言实现登录界面的一些功能
<br />以下这段js代码就是实现一进来就把光标放在username的输入框上面。<br /> <br /><mce:script language="JavaScript" type="text/javascript"><!-- document.forms["login_form"].elements["j_username"].focus()// --></mce:script>
2010-10-29 09:17:00 1323
原创 java编程的若干细节
1. JSP 怎样得到页面的URL: 用页面内定的对象 request.getURL(); 就可以获得这个URL2. JDialog对象的创建能不能把parent设成null?编译通过,但不知道实现效果如何
2010-10-26 11:51:00 594
原创 数独的一种实现方式
<br /> <br /> <br />生成一个数独的解:<br /> <br />定义:一个 3*3 的整体我称之为box, 那一个9*9 的数独盘里就有9 个 box,编号依次为1-9:<br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br />Box 1 <br /> <br /> <br />Box 2<br /> <br /> <br />Box 3<br /> <br /> <br /> <br /> <
2010-10-23 19:45:00 944
原创 关于java 中的assert 关键字
不要用assert 来检查 参数是否合法,要检查就这样写:if(upbound { throw new IllegalArgumentException("upbound must be positive");}那assert 是用来干什么的呢?
2010-10-21 12:08:00 765
转载 Eclipse快捷键大全(转载)
Ctrl+1 快速修复(最经典的快捷键,就不用多说了)Ctrl+D: 删除当前行 Ctrl+Alt+↓ 复制当前行到下一行(复制增加)Ctrl+Alt+↑ 复制当前行到上一行(复制增加)Alt+↓ 当前行和下面一行交互位置(特别实用,可以省去先剪切,再粘贴了)Alt+↑ 当前行和上面一行交互位置(同上)Alt+← 前一个编辑的页面Alt+→ 下一个编辑的页面(当然是针对上面那条来说了)Alt+Enter 显示当前选择资源(工程,or 文件 or文件)的属性Shift+En
2010-10-21 10:12:00 473
原创 玩《文明5》心得
1. 陆兵走水路很慢,水路就用船走。2. 用archer 攻城,还有后来的攻城器材3. 现在还不知道如何把城市所需的silk,wine什么的资源给弄来(待解决)
2010-10-04 16:57:00 1561
原创 Tomcat 图片不能显示的问题
今天发现Tomcat 对 png格式的图片支持不太好,一些图能显示,另一些却不能显示。 我把所有的 png图片换成 GIF, (html代码里一定要用大写的GIF)显示图片就正常了! 大写GIF !很高兴,很兴奋。
2010-10-01 18:44:00 6400 1
托福OG(第三版) The.Official.Guide.to.the.TOEFL.iBT,Third.Edition
2010-07-23
Concrete Mathematics
2010-07-02
用Rational RequisitePro写用例规约(Use Case Specification)的心得
2009-11-11
Struts.The.Complete.Reference.2nd.Edition
2009-10-09
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人