kristain

博客园 首页 新随笔 联系 订阅 管理

2011年9月16日 #

摘要: 1. String --> InputStreampublic static InputStream String2InputStream(String str) throws IOException{ ByteArrayInputStream stream = new ByteArrayInputStream(str.getBytes()); return stream;} 2. InputStream --> Stringpublic static String inputStream2String(InputStream is) throws IOException{ By. 阅读全文
posted @ 2011-09-16 12:37 kristain 阅读(615) 评论(0) 推荐(0) 编辑

2011年9月15日 #

摘要: TagSupport与BodyTagSupport的区别标签:TagSupport与BodyTagSupport的区别1、 TagSupport与BodyTagSupport的区别TagSupport与BodyTagSupport的区别主要是标签处理类是否需要与标签体交互,如果不需要交互的就用TagSupport,否则如果需要交互就用BodyTagSupport。 交互就是标签处理类是否要读取标签体的内容和改变标签体返回的内容。 用TagSupport实现的标签,都可以用BodyTagSupport来实现,因为BodyTagSupport继承了TagSupport。2 、doStartTag( 阅读全文
posted @ 2011-09-15 16:32 kristain 阅读(14261) 评论(2) 推荐(1) 编辑

2011年9月6日 #

摘要: 错误信息:Java compiler level does not match the version of the installed Java project facet.解决方法:右键点击出错的工程,选择属性,在弹出的preference中找到Project Facets,然后可以看到当前工程使用的jdk版本号,再看看你当前Studio中Install JREs,这两个应该不同,你把facets中的java版本修改为与你的jre版本一致就可以了。 阅读全文
posted @ 2011-09-06 17:17 kristain 阅读(2179) 评论(0) 推荐(0) 编辑

摘要: 转自 snandyhttp://www.cnblogs.com/snandy/archive/2011/09/06/2167440.html各情景下元素宽高的获取为了叙述简单,这里仅拿width示例。情景一,元素style属性设置了width/height1<divstyle="width:100px;">test<div>2<script>3var div = document.getElementsByTagName('div')[0];4alert(div.style.width);5</script>如 阅读全文
posted @ 2011-09-06 11:08 kristain 阅读(182) 评论(0) 推荐(0) 编辑

2011年9月4日 #

摘要: 转自IT专家网http://database.ctocio.com.cn/69/8849069.shtml JDBC与ODBC都可以实现类似的功能,但JDBC与ODBC的区别是他们的开发架构不同,其实现细节上也有所差异。 谈到JDBC与ODBC的区别,JDBC和ODBC其实都是用来连接数据库的启动程序。ODBC中文名字叫做开放数据库互联,是微软技术人员开发的开放服务结构中有关数据库的一个组成部分,它建立一组相关的规范,并提供了一组对数据库访问的标准应用程序编程接口。简单的说,ODBC就是应用程序与数据库系统进行交互的工具。一个给予ODBC的应用程序对数据库的操作不依赖于人员的数据库系统,不.. 阅读全文
posted @ 2011-09-04 15:40 kristain 阅读(779) 评论(0) 推荐(0) 编辑

摘要: 转自joneschenghttp://www.cnblogs.com/jonescheng/archive/2008/05/08/1189063.htmlredo log 重做日志undo log 撤消日志重做日志:每当有操作执行前,将数据真正更改时,先前相关操作写入重做日志。这样当断电,或者一些意外,导致后续任务无法完成时,系统恢复后,可以继续完成这些更改撤消日志:当一些更改在执行一半时,发生意外,而无法完成,则可以根据撤消日志恢复到更改之前的壮态网上找到一些解说:以便以后自己参考有两个概念:前滚与回退比如某一时刻数据库DOWN机了,有两个事务,一个事务已经提交,另一个事务正在处理数据库重启 阅读全文
posted @ 2011-09-04 15:19 kristain 阅读(373) 评论(0) 推荐(0) 编辑

摘要: DDL is Data Definition Language statements. Some examples:CREATE - to create objects in the databaseALTER - alters the structure of the databaseDROP - delete objects from the databaseTRUNCATE - remove all records from a table, including all spaces allocated for the records are removedCOMMENT - add c 阅读全文
posted @ 2011-09-04 11:51 kristain 阅读(248) 评论(0) 推荐(0) 编辑

2011年8月31日 #

摘要: <SCRIPT LANGUAGE="JavaScript"><!--var myDate = new Date(); myDate.getYear(); //获取当前年份(2位) myDate.getFullYear(); //获取完整的年份(4位,1970-????) myDate.getMonth(); //获取当前月份(0-11,0代表1月) myDate.getDate(); //获取当前日(1-31) myDate.getDay(); //获取当前星期X(0-6,0代表星期天) myDate.ge... 阅读全文
posted @ 2011-08-31 16:28 kristain 阅读(276) 评论(0) 推荐(0) 编辑

2011年8月26日 #

摘要: 如题代码document.write("<iframe id=\"frame1\" scrolling=no frameBorder=0 width=1050 height=700 src=\"http://www.cnblogs.com/dso.html\">");document.write("</iframe>");frame1.document.onreadystatechange=fnStartInit;function fnStartInit(){// alert(frame1. 阅读全文
posted @ 2011-08-26 17:13 kristain 阅读(3447) 评论(0) 推荐(0) 编辑

摘要: 本来要实现在页面中载入多个iframe,而iframe中的数据是从SQL查询的,恰好我的iframe是js循环排列的,因为js执行速度的原因,iframe不能显示,想要在js的循环中,每次执行都停留一段时间让每一个iframe都能加载完全,需要一个函数来停止js的页面元素加载。代码如下:function sleep(numberMillis) { var now = new Date(); var exitTime = now.getTime() + numberMillis; while (true) { now = new Date(); if (now.get... 阅读全文
posted @ 2011-08-26 17:08 kristain 阅读(3427) 评论(0) 推荐(0) 编辑