`
zc_888
  • 浏览: 19859 次
  • 性别: Icon_minigender_1
  • 来自: 苏州
文章分类
社区版块
存档分类
最新评论
文章列表
**apt-get(来自:http://wiki.ubuntu.org.cn/Apt-get%E4%BD%BF%E7%94%A8%E6%8C%87%E5%8D%97)apt-get update——在修改/etc/apt/sources.list或者/etc/apt/preferences之後运行该命令。此外您需要定期运行这一命令以确保您的软件包列表是最新的。apt-get insta ...
添加用户: [root@localhost ~]# useradd test[root@localhost ~]# passwd testChanging password for user test.New UNIX password: Retype new UNIX password: passwd: all authentication tokens updated successfully.此时,该用户才是可以使用的。 设置的默认规则如下:[root@localhost ~]# useradd -DGROUP=100HOME=/homeINACTIVE=-1EXPIRE=SH ...
在javascript中操作textarea时如果要换行,需要加上换行符/n,但当要删除一行时却无法找到"/n”的匹配,原因就是换行符应该是"/r/n",加上这个就可以匹配了。 例如: function tempFunc(object){var temp = document.getElementById("temp").value;var clip = document.getElementById("clip_ip");if(temp!=""){if(object){if(clip.value.in ...
//提取查找字符串前面所有的字符function getFront(mainStr,searchStr){ foundOffset=mainStr.indexOf(searchStr); if(foundOffset==-1){ return null; } return mainStr.substring(0,foundOffset);}//提取查找字符串后面的所有字符function getEnd(mainStr,searchStr){ foundOffset=mainStr.indexOf(searchStr); if(foundOffset==-1){ return null; } re ...
package com.netqin.data.weather; import java.util.Iterator;import java.util.LinkedHashMap;import java.util.Map;import java.util.Set; public class CharacterToPinyin { /** * @param args */public static void main(String[] args) {// TODO Auto-generated method stubSystem.out.println(getFullSpell(" ...
public static boolean checkDate(String date) {String eL = "^((//d{2}(([02468][048])|([13579][26]))[//-/////s]?((((0?[13578])|(1[02]))[//-/////s]?((0?[1-9])|([1-2][0-9])|(3[01])))|(((0?[469])|(11))[//-/////s]?((0?[1-9])|([1-2][0-9])|(30)))|(0?2[//-/////s]?((0?[1-9])|([1-2][0-9])))))|(//d{2}(([0 ...
原文之地:http://blog.csdn.net/Nicolas_Yang/archive/2008/12/12/3504480.aspx 【JAVA 中执行Shell】 jShell.java /* * jShell.java * class jShell is used for executing shell command * USAGE: * jShell obj=new jShell(shellCommand); * obj.startErr(); * obj.startOut(); * obj.startIn(); * You can Interupt I/O thr ...
原文地址:http://www.ibm.com/developerworks/cn/java/j-lo-spring25-mvc/index.html 使用 Spring 2.5 基于注解驱动的 Spring MVC 基于注解的配置有越来越流行的趋势,Spring 2.5 顺应这种趋势,为 Spring MVC 提供了完全基于注解的配置。本文将介绍 Spring 2.5 新增的 Sping MVC 注解功能,讲述如何使用注解配置替换传统的基于 XML 的 Spring MVC 配置。 继 Spring 2.0 对 Spring MVC 进行重大升级后,Spr ...
1. 使用Spring注解来注入属性 1.1. 使用注解以前我们是怎样注入属性的 类的实现: Java代码 publicclassUserManagerImplimplementsUserManager{ privateUserDaouserDao; publicvoidsetUserDao(UserDaouserDao){ this.userDao=userDao; } ...
1.java.util.Date to java.sql.Date java.sql.Date sqlDate = new java.sql.Date(new java.util.Date().getTime()); 2.java.sql.Date to java.util.Date java.sql.Date sqlDate = ……; java.util.Date utilDate = new java.util.Date(sqlDate.getTime()); 3.java.util.Date to java.sql.Timestamp java.s ...
1.String to InputStream String str = "String与InputStream相互转换"; InputStream in_nocode = new ByteArrayInputStream(str.getBytes()); InputStream in_withcode = new ByteArrayInputStream(str.getBytes("UTF-8")); 2.InputStream to String 这里提供几个方法。 方法1: publicStringconve ...
如果希望从ServerA免输入passwd ssh到ServerB,先在ServerA上执行: ssh-keygen -t rsa 例如:连续回车即可 hanqf@localhost:~$
最近在开发一项目时使用了spring注解式事务管理,现介绍如下: 一.spring配置文件 这里使用spring命名空间,如下: <?xml version="1.0" encoding="UTF-8"?><beans xmlns="http://www.springframework.org/schema/beans"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.spr ...
spring对jdbc操控LOB也提供了简单的方式,以oracle数据库为例,方式如下: 一.spring配置文件 <!-- 提供对lob字段的支持 --><bean id="nativeJdbcExtractor"class="org.springframework.jdbc.support.nativejdbc.CommonsDbcpNativeJdbcExtractor"lazy-init="true" /> <bean id="oracleLobHandler" c ...
spring为hibernate提供了对LOB对像的支持,以oracle数据库为例,配置方法如下: 一.spring配置文件 <!-- 使用jndi连接数据库 --><!--<bean id="dataSource" class="org.springframework.jndi.JndiObjectFactoryBean"><property name="jndiName"><value>java:comp/env/develop</value></prope ...
Global site tag (gtag.js) - Google Analytics