2010年4月25日

html 弹出框

摘要: window.open("popwin.jsp","Message","width=400,height=200,scrollbars=yes,toolbar=yes,location=no,directories=no,status=no,menubar=no,resizable=1;"); 阅读全文

posted @ 2010-04-25 12:42 sdh 阅读(337) 评论(0) 推荐(0)

html多文档属性

摘要: 1._blank <a href="document.html" target="_blank">my document</a> 浏览器会另开一个新窗口显示document.html文档 2._parent <a href="document.html" target="_parent">my document</a> 指向父frameset文档... 阅读全文

posted @ 2010-04-25 12:41 sdh 阅读(136) 评论(0) 推荐(0)

分页sql

摘要: hibernate分页 Query q = session.createQuery("from Cat as c");   q.setFirstResult(50);   q.setMaxResults(100);   List l = q.list(); sql分页 select top 10 * from 表名 where id not in (select top (当前页数-1)*每页显示... 阅读全文

posted @ 2010-04-25 12:40 sdh 阅读(188) 评论(0) 推荐(0)

orcale得到时间差1970-01-01 00:00:00——至今

摘要: round(to_number(to_date(to_char(sysdate,'yyyy-mm-dd'),'yyyy-mm-dd')-to_date('1970-01-01','yyyy-mm-dd')))*24*60*60*1000+to_number(to_char(sysdate,'HH24'))*60*60*1000+to_number(to_char(sysdate,'MI'))*60... 阅读全文

posted @ 2010-04-25 12:39 sdh 阅读(304) 评论(0) 推荐(0)

sql 创建表+约束

摘要: use lybgoif exists (select * from sysobjects where name='student')drop table studentcreate table student (id int identity(1,1),stuNumber int not null,stuName varchar(60) not null,password varchar(60) ... 阅读全文

posted @ 2010-04-25 12:38 sdh 阅读(171) 评论(0) 推荐(0)

JavaScript去掉html标签

摘要: function delHtmlTag(str) { return str.replace(/<[^>]+>/g,"");//去掉所有的html标记 } 阅读全文

posted @ 2010-04-25 12:36 sdh 阅读(442) 评论(0) 推荐(0)

java调用存储过程

摘要: JDBC调用存储过程(2009-02-24 22:46:39)标签:杂谈 分类:oracle ? 案例1– 添加员工,如果指定部门不存在,则先添加部门信息,再添加员工。– 特点:无返回值存储过程? 步骤– 开发sp_add_emp(部门号,部门名称,工号,姓名)– JDBC调用Connection conn = ...;CallableStateme... 阅读全文

posted @ 2010-04-25 12:33 sdh 阅读(290) 评论(0) 推荐(0)

tomcat5.0连接池

摘要: - <Context path="/power" docBase="D:/workspace/PowerEIP/WebRoot" debug="0" privileged="true"> <Resource auth="Container" name="jdbc/HDEIP" type="javax.sql.DataSource" /> - <ResourcePara... 阅读全文

posted @ 2010-04-25 12:33 sdh 阅读(122) 评论(0) 推荐(0)

java去掉html标签

摘要: public static String delHtmlTag(String content){ while(content.indexOf("<")>=0){ String str1 = ""; String str2 = ""; str1 = content.substring(0, content.indexOf("<")); str2 = content.subs... 阅读全文

posted @ 2010-04-25 12:31 sdh 阅读(236) 评论(0) 推荐(0)

jquery实时时间

摘要: function clockon() { thistime= new Date(); var hours=thistime.getHours() var minutes=thistime.getMinutes() var seconds=thistime.getSeconds() if (eval(hours) <10) {hours="0"+hours} if (eval(minute... 阅读全文

posted @ 2010-04-25 12:30 sdh 阅读(258) 评论(0) 推荐(0)

ssh2配置文件

摘要: 1:web.xml<?xml version="1.0" encoding="UTF-8"?><web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http:... 阅读全文

posted @ 2010-04-25 12:28 sdh 阅读(662) 评论(0) 推荐(0)

java操作LDAP

摘要: SUNOne: 1.连接 import java.util.Hashtable; import javax.naming.Context; import javax.naming.NamingException; import javax.naming.directory.DirContext; import javax.naming.directory.InitialDirContext;... 阅读全文

posted @ 2010-04-25 12:25 sdh 阅读(588) 评论(0) 推荐(0)

MyEclise6.5注册码

摘要: myeclipse 6.5 注册号 sn2008-06-05 23:03好像不支持 struts2在迅雷找到得一个下载地址http://downloads4.myeclipseide.com/downloads/products/eworkbench/6.5M1/MyEclipse_6.5M1.exe网上找得注册码(没有试过),注册时要断网啊:Subscriber:QQ24785490 Subsc... 阅读全文

posted @ 2010-04-25 12:24 sdh 阅读(386) 评论(0) 推荐(0)

ssh配置文件

摘要: 1.web.xml <context-param> <param-name>contextConfigLocation</param-name> <param-value>/WEB-INF/applicationContext.xml</param-value> </context-param> <servlet>... 阅读全文

posted @ 2010-04-25 12:23 sdh 阅读(134) 评论(0) 推荐(0)

json+struts2

摘要: struts.xml<?xml version="1.0" encoding="UTF-8" ?><!DOCTYPE struts PUBLIC"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN""http://struts.apache.org/dtds/struts-2.0.dtd"><... 阅读全文

posted @ 2010-04-25 12:21 sdh 阅读(126) 评论(0) 推荐(1)

经典sql

摘要: --查找重复记录select a.* from stu as a,(select name,pwd from stu group by name,pwd having count(*)>1) b where a.name = b.name and a.pwd = b.pwd--查找未重复记录select a.* from stu as a,(select name,pwd from stu ... 阅读全文

posted @ 2010-04-25 12:20 sdh 阅读(120) 评论(0) 推荐(0)

HIbernate set 排序

摘要: hibernate 中对set对象的两种配置方法:(一)使用order-by对set排序,只需要修改set设置:<set name="standards" ... order-by="st_id desc" > ...</set> 阅读全文

posted @ 2010-04-25 12:18 sdh 阅读(333) 评论(0) 推荐(0)

Spring MVC乱码

摘要: 用spring提供的过虑器,在web.xml里加 <filter><filter-name>Set Character Encoding</filter-name><filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class><i... 阅读全文

posted @ 2010-04-25 12:18 sdh 阅读(534) 评论(0) 推荐(0)

Apach+Tomcat

摘要: Apach + Tomcat 准备工作: 1、 apache 2.0.55 下载地址:http://apache.justdn.org/httpd/binaries/win32/apache_2.0.55-win32-x86-no_ssl.msi 2、 Tomcat 5.5 下载地址:http://tomcat.apache.org/download-55.cgi 3、 JRE1.5.0 upda... 阅读全文

posted @ 2010-04-25 12:16 sdh 阅读(419) 评论(0) 推荐(0)

让网页文字和图片变灰(哀悼时有用)

摘要: 在styel里面加如下几句,flash不行。body{ filter:gray;}img{ filter:gray;} 阅读全文

posted @ 2010-04-25 12:13 sdh 阅读(142) 评论(0) 推荐(0)

Ajax(jquery、Dom提交+struts1) 乱码解决

摘要: 一,jquery框架 1.对于post提交方式 在servlet中对request进行编码:request.setCharacterEncoding("UTF-8"); 2 对于get提交 String username = request.getParameter("username"); username = newString(username.getBytes("ISO-8859-1")... 阅读全文

posted @ 2010-04-25 12:10 sdh 阅读(653) 评论(0) 推荐(0)

struts.xml 配置

摘要: 1.struts.xml<struts><constant name="struts.i18n.encoding" value="GBK" ></constant><package name="struts2" extends="struts-default"> <action name="loginaction" class="org.str... 阅读全文

posted @ 2010-04-25 12:07 sdh 阅读(197) 评论(0) 推荐(0)

jquery+webservice

摘要: 1、编写4种WebService方法[WebService(Namespace="http://tempuri.org/")][WebServiceBinding(ConformsTo=WsiProfiles.BasicProfile1_1)][ScriptService]//令WebService成功传入Json参数,并以Json形式返回结果[GenerateScriptType(typeof(... 阅读全文

posted @ 2010-04-25 12:04 sdh 阅读(418) 评论(0) 推荐(0)

导航