`
ludaojuan21
  • 浏览: 224165 次
  • 性别: Icon_minigender_1
  • 来自: 回龙观
社区版块
存档分类
最新评论
文章列表
1.安装JDK时,JDK和JRE要分别安装在不同的目录下,否则会出现文件覆盖及没有某些jar文件的问题(比如说tools.jar),且文件夹名最好取默认的文件夹名,否则在MyEclipse添加JRE时会报"Target is not a JDK root. System library was not found"错误 2.安装JDK1.5时,环境变量配置如下: JAVA_HOME:G:\Java\jdk CLASSPATH;%JAVA_HOME%\lib\dt.jar;%JAVA_HOME%\lib\tools.jarPATH:%JAVA_HOME%\bin
方法一: for(int i = 0; i < loopSize; i++){   执行语句    for(int j = 0; j < loopSize; j++){      执行语句            if(满足退出条件){               break;          }   }    if(满足退出条件){      break;    } } 方法二: loop: for (int i = 0; i < 6; i++) {   for (int j = 0; j < 7; j++) {     System.out.print ...
String value = java.util.ResourceBundle.getBundle("mybuild").getString("build.number"); 其中: mybuild为属性文件名,如mybuild.properties build.number为键值
SQLServer驱动: JDK1.5时,用sqljdbc.jar包 JDK1.6时,用sqljdbc4.jar包 具体参看文章:http://developer.51cto.com/art/200907/137813.htm Oracle驱动: ojdbc14.jar 与 classes12.jar 驱动包classes12.jar用于JDK 1.2和JDK 1.3,而ojdbc14.jar用于JDK 1.4及以上,所以尽量不要使用classes12.jar; 针对不同的数据库版本选择相应版本的驱动包; 一般连接连接数据库时报“java.lang.UnsupportedClassVer ...
在实际开发中遇到jstl换行问题,贴出来共享!!! 一.3列换行 <c:forEach var="i" begin="0" end="${size}" step="3"> <tr align="center" bgcolor="#FFFFFF"> <c:forEach var="product" items="${Product}" begin="${i}" end="${ ...
一.servlet构造出的AJAX返回的XML文件: public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { request.setCharacterEncoding("UTF-8"); response.setContentType("text/xml; charset=UTF-8"); response.setHeader("Cac ...
一:无返回值的存储过程 存储过程为: CREATE OR REPLACE PROCEDURE TESTA(PARA1 IN VARCHAR2,PARA2 IN VARCHAR2)  AS BEGIN    INSERT INTO HYQ.B_ID (I_ID,I_NAME) VALUES (PARA1, PARA2); END TESTA; 调用方法为: CallableStatement proc = null; proc = conn.prepareCall("{ call HYQ.TESTA(?,?) }"); proc.setString(1, "10 ...
public boolean isExistRunRota(String rotaid) { log.debug("find isExistRunRota in RunDuty: "); boolean isExist=false; try { String queryString = "select count(*) from RunDuty as model where model.rotaid=?"; if(((Long)getHibernateTemplate().find(queryString,rotaid).listI ...
<%@ page contentType="text/html;charset=gb2312"%> <%@ page import = "javax.naming.*"%> <%@ page import = "javax.sql.*" %> <%@ page import = "java.sql.*" %> <%@ page import = "java.util.*" %> <%@ page import = "jav ...
方法1:直接用ORACLE方言函数进行比较 //综合查询 public List getOpeRecsByCon1(HttpServletRequest request){ log.debug("finding OpeRecords instances by Condition"); try { String factoryId = ""; String spciltyId = ""; String dutyId = ""; String classId ...
package org.idcn.jse; public class SortAll { /** * 冒泡排序,选择排序,插入排序,希尔(Shell)排序 Java的实现 * 2008.11.09 * @author YangL. (http://www.idcn.org) */ public static void main(String[] args) { int[] i = { 1, 5, 6, 12, 4, 9, 3, 23, 39, 403, 596, 87 }; System.out.println("----冒泡 ...
应用场景:当需构造根据部门ID构造从此部门一直到最顶层部门的字符串时,如:XXX股份有限公司->XXX热电厂->运行分场->一厂->一厂运行三值->一厂汽机三班,此时传入此方法的是"一厂汽机三班"对应的DEPID,则返回此构造好的字符串,不过得保证最顶级部门的PID为NULL或为"". public String findFullPathDepNameByDepid(String depid) { log.debug("finding SysDepartment fullPathDepName by pr ...
1.迭代List(hql组装出来的对象) hql: String hql = "select (select b.rotaname from RunRota b where b.rotaid=a.rotaid),a.classid,a.classname from RunClass a where a.rotaid in " +" (select c.rotaid from PlanRota c where " +" c.startdate = (select max(b.startdate) from PlanRota b wher ...
使文本框内的文字居中: style="text-align: center" 强制设置下拉列表框长度: <select name="selectObj" title="selectObj" style="width:250px"> </select> 设置表格行当鼠标移入时变色,移出行时恢复: <TR bgcolor="#ffffff" onMouseOver="this.style.backgroundColor='#fee5ca'" onMou ...
Action: List allNodesList = sysDepartmentService.findbySql(sql,"ht.sys.model.SysDepartment"); Service: public List findbySql(String sql,String classname){ return theDAO.findbySql(sql,classname); } Dao: /** * 执行sql查询 * @param sql * @return */ public List findb ...
Global site tag (gtag.js) - Google Analytics