??xml version="1.0" encoding="utf-8" standalone="yes"?>快乐12开奖直播:BlogJava - 四川福利彩票快乐12快乐12开奖直播快乐12开奖辽宁福彩快乐12快乐彩12选5走势图//www.ot7t.com.cn/parable-myth/慢慢的度?/description>zh-cnSat, 15 Dec 2018 20:59:08 GMTSat, 15 Dec 2018 20:59:08 GMT60kettle ETL java 调用 kettle job ?transfer - 四川福利彩票快乐12快乐12开奖直播快乐12开奖辽宁福彩快乐12快乐彩12选5走势图//www.ot7t.com.cn/parable-myth/archive/2014/03/02/410499.html无声无声Sun, 02 Mar 2014 00:20:00 GMT//www.ot7t.com.cn/parable-myth/archive/2014/03/02/410499.html//www.ot7t.com.cn/parable-myth/comments/410499.html//www.ot7t.com.cn/parable-myth/archive/2014/03/02/410499.html#Feedback0//www.ot7t.com.cn/parable-myth/comments/commentRss/410499.html//www.ot7t.com.cn/parable-myth/services/trackbacks/410499.html
//blog.csdn.net/chen978616649/article/details/9063695


代码如下:调用kettle 4.2版本


package test;


import org.apache.commons.lang.StringUtils;
import org.apache.commons.vfs.FileSelector;
import org.pentaho.di.core.KettleEnvironment;
import org.pentaho.di.core.database.DatabaseMeta;
import org.pentaho.di.core.exception.KettleException;
import org.pentaho.di.core.util.EnvUtil;
import org.pentaho.di.job.Job;
import org.pentaho.di.job.JobMeta;
import org.pentaho.di.repository.RepositoryDirectory;
import org.pentaho.di.repository.RepositoryDirectoryInterface;
import org.pentaho.di.repository.kdr.KettleDatabaseRepository;
import org.pentaho.di.repository.kdr.KettleDatabaseRepositoryMeta;
import org.pentaho.di.trans.Trans;
import org.pentaho.di.trans.TransMeta;


import com.longtech.configuration.BaseConfiguration;
import com.platform.common.util.LoggerUtil;


/**
 * 
 * @Description:  java调用kettle 数据库型资料库中的转?br /> * @author chen 此类是调用kettle 4.2版本的测试类
 * @version 1.0, 
 * @date 2013-5-23 下午02:40:50
 */
public class ExecRepositoryTrans {
/**
* 本测试类慎用!!!!!!?br />* @param args
*/
public static void main(String[] args) {
//D:\java\workspace\sics\src\config\kettle
String classesdir = BaseConfiguration.getString("classesdir");
String jobName = BaseConfiguration.getString("kettle.path.file");
if(StringUtils.isNotEmpty(jobName)){
LoggerUtil.info(ExecRepositoryTrans.class, "执行kettle job start-------------------");

runJob(classesdir + jobName);

LoggerUtil.info(ExecRepositoryTrans.class, "执行kettle job end -------------------");
}else{

LoggerUtil.info(ExecRepositoryTrans.class, "请配置kettle.path.file job 的路径文?);
}

}
/**
*java 调用kettle 转换 
*/
public static void runTransfer(){
Trans trans=null;  
FileSelector f = null;
try {
// 初始? 
            String fName= "D:\\kettle\\informix_to_am_4.ktr";
            // 转换元对? 
        KettleEnvironment.init();//初始?br />        EnvUtil.environmentInit();
            TransMeta transMeta = new TransMeta(fName);
            // 转换  
            trans = new Trans(transMeta);  
            // 执行转换  
            trans.execute(null);   
            // 等待转换执行结束  
            trans.waitUntilFinished();  
            //抛出异常  
            if(trans.getErrors()>0){  
                throw new Exception("There are errors during transformation exception!(传输过程中发生异?");  
            }  
} catch (Exception e) {
e.printStackTrace();
}
}
/**
* java 调用 kettle 的job
* @param jobname 如: String fName= "D:\\kettle\\informix_to_am_4.ktr";
*/
public static void runJob(String jobname){  
try {   
KettleEnvironment.init();   
//jobname 是Job脚本的路径及名称   
JobMeta jobMeta = new JobMeta(jobname, null);   
Job job = new Job(null, jobMeta);   
//向Job 脚本传递参数,脚本中获取参数值:${参数名}   
//job.setVariable(paraname, paravalue);   
 job.start();   
 job.waitUntilFinished();   
 if (job.getErrors() > 0) {   
 throw new Exception("There are errors during job exception!(执行job发生异常)");  
 }   
} catch (Exception e) {   
e.printStackTrace();
}   
}
/**
* 配置数据?调用资源库中的相关job 、transfer
*/
public static void dbResource(){
String transName="t1";  
         
       try {  
           KettleEnvironment.init();  
           DatabaseMeta dataMeta = new DatabaseMeta("KettleDBRep","MSSQL","Native","127.0.0.1","etl","1433","sa","bsoft");  
           KettleDatabaseRepositoryMeta repInfo = new KettleDatabaseRepositoryMeta();  
           repInfo.setConnection(dataMeta);  
           KettleDatabaseRepository rep = new KettleDatabaseRepository();  
           rep.init(repInfo);  
           rep.connect("admin", "admin");  
             
           RepositoryDirectoryInterface dir = new RepositoryDirectory();  
           dir.setObjectId(rep.getRootDirectoryID());  
             
           TransMeta tranMeta = rep.loadTransformation(rep.getTransformationID(transName, dir), null);  
           Trans trans = new Trans(tranMeta);  
           trans.execute(null);  
           trans.waitUntilFinished();  
       } catch (KettleException e) {  
           e.printStackTrace();  
       }  
}


}



无声 2014-03-02 08:20 发表评论
]]>
etl一个例?/title><link>//www.ot7t.com.cn/parable-myth/archive/2014/03/02/410498.html</link><dc:creator>无声</dc:creator><author>无声</author><pubDate>Sun, 02 Mar 2014 00:15:00 GMT</pubDate><guid>//www.ot7t.com.cn/parable-myth/archive/2014/03/02/410498.html</guid><wfw:comment>//www.ot7t.com.cn/parable-myth/comments/410498.html</wfw:comment><comments>//www.ot7t.com.cn/parable-myth/archive/2014/03/02/410498.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>//www.ot7t.com.cn/parable-myth/comments/commentRss/410498.html</wfw:commentRss><trackback:ping>//www.ot7t.com.cn/parable-myth/services/trackbacks/410498.html</trackback:ping><description><![CDATA[     摘要: 转自//bbs.csdn.net/topics/390369075 最近项目中使用ETL工具kettle?.+)对数据库的数据进行清洗,使用工具spoon来使用一些图形化的操作比较简单,抽空研究了下用使用kettle的一些jar包,把kettle结合到java(web项目一样)程序中。留作一个记录,以后备用查看?nbsp;   先看看网站上下了...  <a href='//www.ot7t.com.cn/parable-myth/archive/2014/03/02/410498.html'>阅读全文</a><img src ="//www.ot7t.com.cn/parable-myth/aggbug/410498.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="//www.ot7t.com.cn/parable-myth/" target="_blank">无声</a> 2014-03-02 08:15 <a href="//www.ot7t.com.cn/parable-myth/archive/2014/03/02/410498.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>论坛 - 四川福利彩票快乐12快乐12开奖直播快乐12开奖辽宁福彩快乐12快乐彩12选5走势图//www.ot7t.com.cn/parable-myth/archive/2014/01/09/408748.html无声无声Thu, 09 Jan 2014 13:25:00 GMT//www.ot7t.com.cn/parable-myth/archive/2014/01/09/408748.html//www.ot7t.com.cn/parable-myth/comments/408748.html//www.ot7t.com.cn/parable-myth/archive/2014/01/09/408748.html#Feedback0//www.ot7t.com.cn/parable-myth/comments/commentRss/408748.html//www.ot7t.com.cn/parable-myth/services/trackbacks/408748.html//www.dxper.net/forum-70-1.html

无声 2014-01-09 21:25 发表评论
]]>
Spring 3.2.4源码编译 - 四川福利彩票快乐12快乐12开奖直播快乐12开奖辽宁福彩快乐12快乐彩12选5走势图//www.ot7t.com.cn/parable-myth/archive/2013/09/05/403697.html无声无声Thu, 05 Sep 2013 02:55:00 GMT//www.ot7t.com.cn/parable-myth/archive/2013/09/05/403697.html//www.ot7t.com.cn/parable-myth/comments/403697.html//www.ot7t.com.cn/parable-myth/archive/2013/09/05/403697.html#Feedback0//www.ot7t.com.cn/parable-myth/comments/commentRss/403697.html//www.ot7t.com.cn/parable-myth/services/trackbacks/403697.html
https://github.com/SpringSource/spring-framework/tags/v3.2.4.RELEASE
2、安装jdk1.7(1.6编译会报错,找不到java.util.concurrent.ForkJoinPool)
3、进入源码目录执?不要有中文路?
C:\>cd spring-framework
C:\spring-framework>gradlew build -x javadoc -x api -x groovydoc -x jdiff -x reference
3?打包(包含运行时依赖jar包)
C:\>cd spring-framework
C:\spring-framework>gradlew depsZip -x javadoc -x api -x groovydoc -x jdiff -x reference
PS:我在编译时发现如果要生成javadoc,会编译不成功,所以将javadoc、api、groovydoc、jdiff、reference等任务都从任务列表中去除了,以保证编译和打包都能正常通过?br />编译过程会下载一些依赖包,放到c盘用户目录下


无声 2013-09-05 10:55 发表评论
]]>
转win8 64?Oracle 11g 64位下使用PL/SQL Developer 的解决办?/title><link>//www.ot7t.com.cn/parable-myth/archive/2013/09/02/403545.html</link><dc:creator>无声</dc:creator><author>无声</author><pubDate>Mon, 02 Sep 2013 01:42:00 GMT</pubDate><guid>//www.ot7t.com.cn/parable-myth/archive/2013/09/02/403545.html</guid><wfw:comment>//www.ot7t.com.cn/parable-myth/comments/403545.html</wfw:comment><comments>//www.ot7t.com.cn/parable-myth/archive/2013/09/02/403545.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>//www.ot7t.com.cn/parable-myth/comments/commentRss/403545.html</wfw:commentRss><trackback:ping>//www.ot7t.com.cn/parable-myth/services/trackbacks/403545.html</trackback:ping><description><![CDATA[<span style="text-align: left; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 14px/26px Arial; white-space: normal; float: none; letter-spacing: normal; color: rgb(0,0,0); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">1)安装Oracle 11g 64?/span><br style="text-align: left; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 14px/26px Arial; white-space: normal; letter-spacing: normal; color: rgb(0,0,0); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="text-align: left; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 14px/26px Arial; white-space: normal; float: none; letter-spacing: normal; color: rgb(0,0,0); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">2)安?2位的Oracle客户端( instantclient-basic-win32-11.2.0.1.0?/span><br style="text-align: left; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 14px/26px Arial; white-space: normal; letter-spacing: normal; color: rgb(0,0,0); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="text-align: left; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 14px/26px Arial; white-space: normal; float: none; letter-spacing: normal; color: rgb(0,0,0); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">下载 instantclient-basic-win32-11.2.0.1.0.zip (一定得?2位的,不要下错了版本,Oracle官网有下载),将其解压至Oracle安装目录的Product下(本机命名为:instantclient_11_2):D:\Oracle\app\YM\product\instantclient_11_2?/span><br style="text-align: left; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 14px/26px Arial; white-space: normal; letter-spacing: normal; color: rgb(0,0,0); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="text-align: left; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 14px/26px Arial; white-space: normal; float: none; letter-spacing: normal; color: rgb(0,0,0); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">拷贝数据库安装根目录下的一个目录D:\Oracle\app\YM\product\11.2.0\dbhome_1\NETWORK到Oracle客户端目录下D:\Oracle\app\YM\product\instantclient_11_2(其实只需?NETWORK\ADMIN\tnsnames.ora,最好是直接拷贝这个文件到D:\Oracle\app\YM\product\instantclient_11_2目录下)</span><br style="text-align: left; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 14px/26px Arial; white-space: normal; letter-spacing: normal; color: rgb(0,0,0); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="text-align: left; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 14px/26px Arial; white-space: normal; float: none; letter-spacing: normal; color: rgb(0,0,0); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">3)安装PL/SQL Developer</span><br style="text-align: left; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 14px/26px Arial; white-space: normal; letter-spacing: normal; color: rgb(0,0,0); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="text-align: left; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 14px/26px Arial; white-space: normal; float: none; letter-spacing: normal; color: rgb(0,0,0); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">安装 PL/SQL Developer,在perference->Connection里面设置OCI Library和Oracle_Home,例如本机设置为?/span><br style="text-align: left; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 14px/26px Arial; white-space: normal; letter-spacing: normal; color: rgb(0,0,0); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="text-align: left; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 14px/26px Arial; white-space: normal; float: none; letter-spacing: normal; color: rgb(0,0,0); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">Oracle Home :D:\Oracle\app\YM\product\instantclient_11_2</span><br style="text-align: left; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 14px/26px Arial; white-space: normal; letter-spacing: normal; color: rgb(0,0,0); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="text-align: left; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 14px/26px Arial; white-space: normal; float: none; letter-spacing: normal; color: rgb(0,0,0); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">OCI Library ?D:\Oracle\app\YM\product\instantclient_11_2\oci.dll</span><br style="text-align: left; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 14px/26px Arial; white-space: normal; letter-spacing: normal; color: rgb(0,0,0); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="text-align: left; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 14px/26px Arial; white-space: normal; float: none; letter-spacing: normal; color: rgb(0,0,0); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"> </span><br style="text-align: left; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 14px/26px Arial; white-space: normal; letter-spacing: normal; color: rgb(0,0,0); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="text-align: left; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 14px/26px Arial; white-space: normal; float: none; letter-spacing: normal; color: rgb(0,0,0); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">4) 设置环境变量(修改PATH和TNS_ADMIN环境变量)</span><br style="text-align: left; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 14px/26px Arial; white-space: normal; letter-spacing: normal; color: rgb(0,0,0); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><br style="text-align: left; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 14px/26px Arial; white-space: normal; letter-spacing: normal; color: rgb(0,0,0); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><br style="text-align: left; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 14px/26px Arial; white-space: normal; letter-spacing: normal; color: rgb(0,0,0); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="text-align: left; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 14px/26px Arial; white-space: normal; float: none; letter-spacing: normal; color: rgb(0,0,0); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">对于NLS_LANG环境变量, 最好设置成和数据库端一? 首先从数据库端查询字符集信息:</span><br style="text-align: left; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 14px/26px Arial; white-space: normal; letter-spacing: normal; color: rgb(0,0,0); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="text-align: left; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 14px/26px Arial; white-space: normal; float: none; letter-spacing: normal; color: rgb(0,0,0); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">SQL> select userenv('language') nls_lang from dual;</span><br style="text-align: left; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 14px/26px Arial; white-space: normal; letter-spacing: normal; color: rgb(0,0,0); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="text-align: left; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 14px/26px Arial; white-space: normal; float: none; letter-spacing: normal; color: rgb(0,0,0); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">NLS_LANG</span><br style="text-align: left; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 14px/26px Arial; white-space: normal; letter-spacing: normal; color: rgb(0,0,0); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="text-align: left; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 14px/26px Arial; white-space: normal; float: none; letter-spacing: normal; color: rgb(0,0,0); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">----------------------------------------------------</span><br style="text-align: left; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 14px/26px Arial; white-space: normal; letter-spacing: normal; color: rgb(0,0,0); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="text-align: left; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 14px/26px Arial; white-space: normal; float: none; letter-spacing: normal; color: rgb(0,0,0); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">SIMPLIFIED CHINESE_CHINA.ZHS16GBK</span><br style="text-align: left; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 14px/26px Arial; white-space: normal; letter-spacing: normal; color: rgb(0,0,0); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><br style="text-align: left; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 14px/26px Arial; white-space: normal; letter-spacing: normal; color: rgb(0,0,0); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><br style="text-align: left; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 14px/26px Arial; white-space: normal; letter-spacing: normal; color: rgb(0,0,0); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="text-align: left; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 14px/26px Arial; white-space: normal; float: none; letter-spacing: normal; color: rgb(0,0,0); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">右击"我的电脑" - "属? - "高级" - "环境变量" - "系统环境变量":</span><br style="text-align: left; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 14px/26px Arial; white-space: normal; letter-spacing: normal; color: rgb(0,0,0); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="text-align: left; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 14px/26px Arial; white-space: normal; float: none; letter-spacing: normal; color: rgb(0,0,0); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">1>.选择"Path" - 点击"编辑", ?"D:\Oracle\app\YM\product\instantclient_11_2;" 加入;</span><br style="text-align: left; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 14px/26px Arial; white-space: normal; letter-spacing: normal; color: rgb(0,0,0); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="text-align: left; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 14px/26px Arial; white-space: normal; float: none; letter-spacing: normal; color: rgb(0,0,0); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">2>.点击"新建", 变量名设置为"TNS_ADMIN", 变量值设置为"D:\Oracle\app\YM\product\instantclient_11_2;", 点击"确定";</span><br style="text-align: left; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 14px/26px Arial; white-space: normal; letter-spacing: normal; color: rgb(0,0,0); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="text-align: left; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 14px/26px Arial; white-space: normal; float: none; letter-spacing: normal; color: rgb(0,0,0); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">3>.点击"新建", 变量名设置为"NLS_LANG", 变量值设置为"SIMPLIFIED CHINESE_CHINA.ZHS16GBK", 点击"确定";</span><br style="text-align: left; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 14px/26px Arial; white-space: normal; letter-spacing: normal; color: rgb(0,0,0); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="text-align: left; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 14px/26px Arial; white-space: normal; float: none; letter-spacing: normal; color: rgb(0,0,0); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">最后点?确定"退?</span><br style="text-align: left; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 14px/26px Arial; white-space: normal; letter-spacing: normal; color: rgb(0,0,0); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><br style="text-align: left; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 14px/26px Arial; white-space: normal; letter-spacing: normal; color: rgb(0,0,0); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><br style="text-align: left; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 14px/26px Arial; white-space: normal; letter-spacing: normal; color: rgb(0,0,0); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="text-align: left; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 14px/26px Arial; white-space: normal; float: none; letter-spacing: normal; color: rgb(0,0,0); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">启动 PL/SQL Developer ,运行无问题?/span><img src ="//www.ot7t.com.cn/parable-myth/aggbug/403545.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="//www.ot7t.com.cn/parable-myth/" target="_blank">无声</a> 2013-09-02 09:42 <a href="//www.ot7t.com.cn/parable-myth/archive/2013/09/02/403545.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>crontab配置详解 - 四川福利彩票快乐12快乐12开奖直播快乐12开奖辽宁福彩快乐12快乐彩12选5走势图//www.ot7t.com.cn/parable-myth/archive/2013/02/22/395555.html无声无声Fri, 22 Feb 2013 02:22:00 GMT//www.ot7t.com.cn/parable-myth/archive/2013/02/22/395555.html//www.ot7t.com.cn/parable-myth/comments/395555.html//www.ot7t.com.cn/parable-myth/archive/2013/02/22/395555.html#Feedback0//www.ot7t.com.cn/parable-myth/comments/commentRss/395555.html//www.ot7t.com.cn/parable-myth/services/trackbacks/395555.html名称 : crontab 
使用权限 : 所有使用?nbsp;
使用方式 : 
crontab [ -u user ] file 
crontab [ -u user ] { -l | -r | -e } 
说明 : 
crontab 是用来让使用者在固定时间或固定间隔执行程序之用,换句话说,也就是类似使用者的时程表?u user 是指设定指定 user 的时程表,这个前提是你必须要有其权限(比如说是 root)才能够指定他人的时程表。如果不使用 -u user 的话,就是表示设定自己的时程表?nbsp;

参数 : 
crontab -e : 执行文字编辑器来设定时程表,内定的文字编辑器?VI,如果你想用别的文字编辑器,则请先设?VISUAL 环境变数来指定使用那个文字编辑器(比如?setenv VISUAL joe) 
crontab -r : 删除目前的时程表 
crontab -l : 列出目前的时程表 
crontab file [-u user]-用指定的文件替代目前的crontab?nbsp;
时程表的格式如下 : 
f1 f2 f3 f4 f5 program 
其中 f1 是表示分钟,f2 表示小时,f3 表示一个月份中的第几日,f4 表示月份,f5 表示一个星期中的第几天。program 表示要执行的程序?nbsp;
?f1 ?* 时表示每分钟都要执行 program,f2 ?* 时表示每小时都要执行程序,其馀类推 
?f1 ?a-b 时表示从?a 分钟到第 b 分钟这段时间内要执行,f2 ?a-b 时表示从?a 到第 b 小时都要执行,其馀类推 
?f1 ?*/n 时表示每 n 分钟个时间间隔执行一次,f2 ?*/n 表示?n 小时个时间间隔执行一次,其馀类推 
?f1 ?a, b, c,... 时表示第 a, b, c,... 分钟要执行,f2 ?a, b, c,... 时表示第 a, b, c...个小时要执行,其馀类推 
使用者也可以将所有的设定先存放在??file 中,?crontab file 的方式来设定时程表?nbsp;

例子 : 
#每天早上7点执行一?/bin/ls : 
0 7 * * * /bin/ls 
?12 月内, 每天的早?6 点到 12 点中,每?个小时执行一?/usr/bin/backup : 
0 6-12/3 * 12 * /usr/bin/backup 
周一到周五每天下?5:00 寄一封信?alex@domain.name : 
0 17 * * 1-5 mail -s "hi" alex@domain.name < /tmp/maildata 
每月每天的午?0 ?20 ? 2 ?20 ? 4 ?20 ?...执行 echo "haha" 
20 0-23/2 * * * echo "haha" 
注意 : 
当程序在你所指定的时间执行后,系统会寄一封信给你,显示该程序执行的内容,若是你不希望收到这样的信,请在每一行空一格之后加?> /dev/null 2>&1 即可 

例子2 : 
#每天早上6?0?nbsp;
10 6 * * * date 
#每两个小?nbsp;
0 */2 * * * date 
#晚上11点到早上8点之间每两个小时,早??nbsp;
0 23-7/2? * * * date 
#每个月的4号和每个礼拜的礼拜一到礼拜三的早?1?nbsp;
0 11 4 * mon-wed date 
#1月份日早??nbsp;
0 4 1 jan * date 
范例 
$crontab -l 列出用户目前的crontab. 

crontab命令的功能是在一定的时间间隔调度一些命令的执行。在/etc目录下有一个crontab文件,这里存放有系统运行的一些调度程序。每个用户可以建立自己的调度crontab?nbsp;

crontab命令有三种形式的命令行结构: 

crontab [-u user] [file] 

crontab [-u user] [-e|-l|-r] 

crontab -l -u [-e|-l|-r] 第一个命令行中,file是命令文件的名字。如果在命令行中指定了这个文件,那么执行crontab命令,则将这个文件拷贝到crontabs目录下;如果在命令行中没有制定这个文件,crontab命令将接受标准输入(键盘)上键入的命令,并将他们也存放在crontab目录下?nbsp;

命令行中-r选项的作用是?usr/spool/cron/crontabs目录下删除用户定义的文件crontab?nbsp;

命令行中-l选项的作用是显示用户crontab文件的内容?nbsp;

使用命令crontab -u user -e命令编辑用户user的cron(c)作业。用户通过编辑文件来增加或修改任何作业请求?nbsp;

执行命令crontab -u user -r即可删除当前用户的所有的cron作业?nbsp;

作业与它们预定的时间储存在文?usr/spool/cron/crontabs/username里。username使用户名,在相应的文件中存放着该用户所要运行的命令。命令执行的结果,无论是标准输出还是错误输出,都将以邮件形式发给用户。文件里的每一个请求必须包含以spaces和tabs分割的六个域。前五个字段可以取整数值,指定何时开始工作,第六个域是字符串,称为命令字段,其中包括了crontab调度执行的命令?nbsp;

第一道第五个字段的整数取值范围及意义是: 

0?9 表示?nbsp;

1?3 表示小时 

1?1 表示?nbsp;

1?2 表示月份 

0? 表示星期(其?表示星期日) 

/usr/lib/cron/cron.allow表示谁能使用crontab命令。如果它是一个空文件表明没有一个用户能安排作业。如果这个文件不存在,而有另外一个文?usr/lib/cron/cron.deny,则只有不包括在这个文件中的用户才可以使用crontab命令。如果它是一个空文件表明任何用户都可安排作业。两个文件同时存在时cron.allow优先,如果都不存在,只有超级用户可以安排作业?/span> 

无声 2013-02-22 10:22 发表评论
]]>
将JSON转换成MAP的工具类 - 四川福利彩票快乐12快乐12开奖直播快乐12开奖辽宁福彩快乐12快乐彩12选5走势图//www.ot7t.com.cn/parable-myth/archive/2013/01/30/394954.html无声无声Wed, 30 Jan 2013 11:48:00 GMT//www.ot7t.com.cn/parable-myth/archive/2013/01/30/394954.html//www.ot7t.com.cn/parable-myth/comments/394954.html//www.ot7t.com.cn/parable-myth/archive/2013/01/30/394954.html#Feedback7//www.ot7t.com.cn/parable-myth/comments/commentRss/394954.html//www.ot7t.com.cn/parable-myth/services/trackbacks/394954.html
package digu.pendant.util;
import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.URL;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
public class PandantTools {
   
    public static List<Map<String, Object>> parseJSON2List(String jsonStr){
        JSONArray jsonArr = JSONArray.fromObject(jsonStr);
        List<Map<String, Object>> list = new ArrayList<Map<String,Object>>();
        Iterator<JSONObject> it = jsonArr.iterator();
        while(it.hasNext()){
            JSONObject json2 = it.next();
            list.add(parseJSON2Map(json2.toString()));
        }
        return list;
    }
    
   
    public static Map<String, Object> parseJSON2Map(String jsonStr){
        Map<String, Object> map = new HashMap<String, Object>();
        //最外层解析
        JSONObject json = JSONObject.fromObject(jsonStr);
        for(Object k : json.keySet()){
            Object v = json.get(k); 
            //如果内层还是数组的话,继续解?/div>
            if(v instanceof JSONArray){
                List<Map<String, Object>> list = new ArrayList<Map<String,Object>>();
                Iterator<JSONObject> it = ((JSONArray)v).iterator();
                while(it.hasNext()){
                    JSONObject json2 = it.next();
                    list.add(parseJSON2Map(json2.toString()));
                }
                map.put(k.toString(), list);
            } else {
                map.put(k.toString(), v);
            }
        }
        return map;
    }
    
   
    public static List<Map<String, Object>> getListByUrl(String url){
        try {
            //通过HTTP获取JSON数据
            InputStream in = new URL(url).openStream();
            BufferedReader reader = new BufferedReader(new InputStreamReader(in));
            StringBuilder sb = new StringBuilder();
            String line;
            while((line=reader.readLine())!=null){
                sb.append(line);
            }
            return parseJSON2List(sb.toString());
        } catch (Exception e) {
            e.printStackTrace();
        }
        return null;
    }
    
   
    public static Map<String, Object> getMapByUrl(String url){
        try {
            //通过HTTP获取JSON数据
            InputStream in = new URL(url).openStream();
            BufferedReader reader = new BufferedReader(new InputStreamReader(in));
            StringBuilder sb = new StringBuilder();
            String line;
            while((line=reader.readLine())!=null){
                sb.append(line);
            }
            return parseJSON2Map(sb.toString());
        } catch (Exception e) {
            e.printStackTrace();
        }
        return null;
    }
    
    
    //test
    public static void main(String[] args) {
        String url = "//...";
        List<Map<String,Object>> list = getListByUrl(url);
        System.out.println(list);
    }
}


无声 2013-01-30 19:48 发表评论
]]>
Java 获取当前日期和时?/title><link>//www.ot7t.com.cn/parable-myth/archive/2013/01/17/394364.html</link><dc:creator>无声</dc:creator><author>无声</author><pubDate>Thu, 17 Jan 2013 10:47:00 GMT</pubDate><guid>//www.ot7t.com.cn/parable-myth/archive/2013/01/17/394364.html</guid><wfw:comment>//www.ot7t.com.cn/parable-myth/comments/394364.html</wfw:comment><comments>//www.ot7t.com.cn/parable-myth/archive/2013/01/17/394364.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>//www.ot7t.com.cn/parable-myth/comments/commentRss/394364.html</wfw:commentRss><trackback:ping>//www.ot7t.com.cn/parable-myth/services/trackbacks/394364.html</trackback:ping><description><![CDATA[<p style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff; "><span class="yibqv">有两种方法:</span></p><p style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff; "><span class="yibqv">方法一:用java.util.Date类来实现,并结合java.text.DateFormat类来实现时间的格式化,看下面代码?/span></p><p style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff; "><span class="yibqv">import java.util.*; <br /></span><span class="yibqv">import java.text.*;<br /></span><span class="yibqv">//以下默认时间日期显示方式都是汉语语言方式<br /></span><span class="yibqv">//一般语言就默认汉语就可以了,时间日期的格式默认为MEDIUM风格,比如:2008-6-16 20:54:53<br /></span><span class="yibqv">//以下显示的日期时间都是再Date类的基础上的来的,还可以利用Calendar类来实现见类TestDate2.java<br /></span><span class="yibqv">public class TestDate { <br /></span><span class="yibqv">   public static void main(String[] args) { <br /></span><span class="yibqv">      Date now = new Date(); <br /></span><span class="yibqv">      Calendar cal = Calendar.getInstance(); <br />      <br /></span><span class="yibqv">      DateFormat d1 = DateFormat.getDateInstance(); //默认语言(汉语)下的默认风格(MEDIUM风格,比如:2008-6-16 20:54:53?br /></span><span class="yibqv">      String str1 = d1.format(now);<br /></span><span class="yibqv">      DateFormat d2 = DateFormat.getDateTimeInstance(); <br /></span><span class="yibqv">      String str2 = d2.format(now); <br /></span><span class="yibqv">      DateFormat d3 = DateFormat.getTimeInstance(); <br /></span><span class="yibqv">      String str3 = d3.format(now); <br /></span><span class="yibqv">      DateFormat d4 = DateFormat.getInstance(); //使用SHORT风格显示日期和时?br /></span><span class="yibqv">      String str4 = d4.format(now);</span></p><p style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff; "><span class="yibqv">      DateFormat d5 = DateFormat.getDateTimeInstance(DateFormat.FULL,DateFormat.FULL); //显示日期,周,时间(精确到秒?br /></span><span class="yibqv">      String str5 = d5.format(now);<br /></span><span class="yibqv">      DateFormat d6 = DateFormat.getDateTimeInstance(DateFormat.LONG,DateFormat.LONG); //显示日期。时间(精确到秒?br /></span><span class="yibqv">      String str6 = d6.format(now);<br /></span><span class="yibqv">      DateFormat d7 = DateFormat.getDateTimeInstance(DateFormat.SHORT,DateFormat.SHORT); //显示日期,时间(精确到分?br /></span><span class="yibqv">      String str7 = d7.format(now);<br /></span><span class="yibqv">      DateFormat d8 = DateFormat.getDateTimeInstance(DateFormat.MEDIUM,DateFormat.MEDIUM); //显示日期,时间(精确到分?br /></span><span class="yibqv">      String str8 = d8.format(now);//与SHORT风格相比,这种方式最好用</span></p><p style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff; "> </p><p style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff; "><br /><span style="color: #3366ff; ">      <br /></span><span class="yibqv">      System.out.println("用Date方式显示时间: " + now);//此方法显示的结果和Calendar.getInstance().getTime()一?br />      <br />      <br /></span><span class="yibqv">      System.out.println("用DateFormat.getDateInstance()格式化时间后为:" + str1);<br /></span><span class="yibqv">      System.out.println("用DateFormat.getDateTimeInstance()格式化时间后为:" + str2);<br /></span><span class="yibqv">      System.out.println("用DateFormat.getTimeInstance()格式化时间后为:" + str3);<br /></span><span class="yibqv">      System.out.println("用DateFormat.getInstance()格式化时间后为:" + str4);<br />      <br /></span><span class="yibqv">      System.out.println("用DateFormat.getDateTimeInstance(DateFormat.FULL,DateFormat.FULL)格式化时间后为:" + str5);<br /></span><span class="yibqv">      System.out.println("用DateFormat.getDateTimeInstance(DateFormat.LONG,DateFormat.LONG)格式化时间后为:" + str6);<br /></span><span class="yibqv">      System.out.println("用DateFormat.getDateTimeInstance(DateFormat.SHORT,DateFormat.SHORT)格式化时间后为:" + str7);<br /></span><span class="yibqv">      System.out.println("用DateFormat.getDateTimeInstance(DateFormat.MEDIUM,DateFormat.MEDIUM)格式化时间后为:" + str8);<br /></span><span class="yibqv">   }</span></p><p style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff; "><span class="yibqv">}</span></p><p style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff; "><span class="yibqv">运行结果?/span></p><p style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff; "><span class="yibqv">用Date方式显示时间: Mon Jun 16 20:54:53 CST 2008<br /></span><span class="yibqv">用DateFormat.getDateInstance()格式化时间后为:2008-6-16<br /></span><span class="yibqv">用DateFormat.getDateTimeInstance()格式化时间后为:2008-6-16 20:54:53<br /></span><span class="yibqv">用DateFormat.getTimeInstance()格式化时间后为:20:54:53<br /></span><span class="yibqv">用DateFormat.getInstance()格式化时间后为:08-6-16 下午8:54<br /></span><span class="yibqv">用DateFormat.getDateTimeInstance(DateFormat.FULL,DateFormat.FULL)格式化时间后?br /></span><span class="yibqv">?008??6?星期一 下午08?4?3?CST<br /></span><span class="yibqv">用DateFormat.getDateTimeInstance(DateFormat.LONG,DateFormat.LONG)格式化时间后?br /></span><span class="yibqv">?008??6?下午08?4?3?br /></span><span class="yibqv">用DateFormat.getDateTimeInstance(DateFormat.SHORT,DateFormat.SHORT)格式化时间后<br /></span><span class="yibqv">为:08-6-16 下午8:54<br /></span><span class="yibqv">用DateFormat.getDateTimeInstance(DateFormat.MEDIUM,DateFormat.MEDIUM)格式化时?br /></span><span class="yibqv">后为?008-6-16 20:54:53</span></p><p style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff; "> </p><p style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff; "><span class="yibqv">方法二:用java.util.Calendar类来实现,看下面?/span></p><p style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff; "><span class="yibqv">import java.util.*; <br /></span><span class="yibqv">import java.text.*;<br /></span><span class="yibqv">//以下是利用Calendar类来实现日期时间的,和Date类相比较比较简?/span></p><p style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff; "><span class="yibqv">public class TestDate2 { <br /></span><span class="yibqv">   public static void main(String[] args) { <br />      <br /></span><span class="yibqv">      Calendar ca = Calendar.getInstance();<br /></span><span class="yibqv">      int year = ca.get(Calendar.YEAR);//获取年份<br /></span><span class="yibqv">      int month=ca.get(Calendar.MONTH);//获取月份 <br /></span><span class="yibqv">      int day=ca.get(Calendar.DATE);//获取?br /></span><span class="yibqv">      int minute=ca.get(Calendar.MINUTE);//?nbsp;<br /></span><span class="yibqv">      int hour=ca.get(Calendar.HOUR);//小时 <br /></span><span class="yibqv">      int second=ca.get(Calendar.SECOND);//?br /></span><span class="yibqv">      int WeekOfYear = ca.get(Calendar.DAY_OF_WEEK); <br />      <br />      <br /></span><span class="yibqv">      System.out.println("用Calendar.getInstance().getTime()方式显示时间: " + ca.getTime());<br /></span><span class="yibqv">      System.out.println("用Calendar获得日期是:" + year +"?+ month +"?+ day + "?);<br />      <br /></span><span class="yibqv">      System.out.println("用Calendar获得时间是:" + hour +"?+ minute +"?+ second +"?);<br /></span><span class="yibqv">      System.out.println(WeekOfYear);//显示今天是一周的第几天(我做的这个例子正好是周二,故结果显示2,如果你再周6运行,那么显??br />      <br /></span><span class="yibqv">   }</span></p><p style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff; "><span class="yibqv">}<br /></span><span class="yibqv">运行结果是:<br /></span><span class="yibqv">用Calendar.getInstance().getTime()方式显示时间: Mon Jun 16 21:54:21 CST 2008<br /></span><span class="yibqv">用Calendar获得日期是:2008??6?br /></span><span class="yibqv">用Calendar获得时间是:9?4?1?br /></span><span class="yibqv">2</span></p><p style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff; "><br /><span class="yibqv">总结:中的来说,方法二是最方便的,方法一显得分笨拙,不过看个人喜欢了?/span></p><p style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff; "> </p><p style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff; "><span class="yibqv">转自?/span><a style="color: #336699; text-decoration: none; "><span class="yibqv">//student.csdn.net/space.php?uid=122120&do=blog&id=14681</span></a></p><p style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff; "> </p><p style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff; "><span class="yibqv">方法三:</span></p><p style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff; "></p><div style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff; "><h3><span class="yibqv">SimpleDateFormat 24小时制时间显?/span></h3><span class="yibqv">关键? java基础</span></div><div style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff; "><p> </p><table border="0" cellspacing="3" cellpadding="0" summary="Chart shows pattern letters, date/time component, presentation, and examples."><tbody><tr><th align="left"><span class="yibqv">字母</span></th><th align="left"><span class="yibqv">日期或时间元?/span></th><th align="left"><span class="yibqv">表示</span></th><th align="left"><span class="yibqv">示例</span></th></tr><tr><td><code><span class="yibqv">G</span></code></td><td><span class="yibqv">Era 标志?/span></td><td><span class="yibqv">Text</span></td><td><code><span class="yibqv">AD</span></code></td></tr><tr><td><code><span class="yibqv">y</span></code></td><td><span class="yibqv">?/span></td><td><span class="yibqv">Year</span></td><td><code><span class="yibqv">1996</span></code><span class="yibqv">; </span><code><span class="yibqv">96</span></code></td></tr><tr><td><code><span class="yibqv">M</span></code></td><td><span class="yibqv">年中的月?/span></td><td><span class="yibqv">Month</span></td><td><code><span class="yibqv">July</span></code><span class="yibqv">; </span><code><span class="yibqv">Jul</span></code><span class="yibqv">; </span><code><span class="yibqv">07</span></code></td></tr><tr><td><code><span class="yibqv">w</span></code></td><td><span class="yibqv">年中的周?/span></td><td><span class="yibqv">Number</span></td><td><code><span class="yibqv">27</span></code></td></tr><tr><td><code><span class="yibqv">W</span></code></td><td><span class="yibqv">月份中的周数</span></td><td><span class="yibqv">Number</span></td><td><code><span class="yibqv">2</span></code></td></tr><tr><td><code><span class="yibqv">D</span></code></td><td><span class="yibqv">年中的天?/span></td><td><span class="yibqv">Number</span></td><td><code><span class="yibqv">189</span></code></td></tr><tr><td><code><span class="yibqv">d</span></code></td><td><span class="yibqv">月份中的天数</span></td><td><span class="yibqv">Number</span></td><td><code><span class="yibqv">10</span></code></td></tr><tr><td><code><span class="yibqv">F</span></code></td><td><span class="yibqv">月份中的星期</span></td><td><span class="yibqv">Number</span></td><td><code><span class="yibqv">2</span></code></td></tr><tr><td><code><span class="yibqv">E</span></code></td><td><span class="yibqv">星期中的天数</span></td><td><span class="yibqv">Text</span></td><td><code><span class="yibqv">Tuesday</span></code><span class="yibqv">; </span><code><span class="yibqv">Tue</span></code></td></tr><tr><td><code><span class="yibqv">a</span></code></td><td><span class="yibqv">Am/pm 标记</span></td><td><span class="yibqv">Text</span></td><td><code><span class="yibqv">PM</span></code></td></tr><tr><td><code><span class="yibqv">H</span></code></td><td><span class="yibqv">一天中的小时数?-23?/span></td><td><span class="yibqv">Number</span></td><td><code><span class="yibqv">0</span></code></td></tr><tr><td><code><span class="yibqv">k</span></code></td><td><span class="yibqv">一天中的小时数?-24?/span></td><td><span class="yibqv">Number</span></td><td><code><span class="yibqv">24</span></code></td></tr><tr><td><code><span class="yibqv">K</span></code></td><td><span class="yibqv">am/pm 中的小时数(0-11?/span></td><td><span class="yibqv">Number</span></td><td><code><span class="yibqv">0</span></code></td></tr><tr><td><code><span class="yibqv">h</span></code></td><td><span class="yibqv">am/pm 中的小时数(1-12?/span></td><td><span class="yibqv">Number</span></td><td><code><span class="yibqv">12</span></code></td></tr><tr><td><code><span class="yibqv">m</span></code></td><td><span class="yibqv">小时中的分钟?/span></td><td><span class="yibqv">Number</span></td><td><code><span class="yibqv">30</span></code></td></tr><tr><td><code><span class="yibqv">s</span></code></td><td><span class="yibqv">分钟中的秒数</span></td><td><span class="yibqv">Number</span></td><td><code><span class="yibqv">55</span></code></td></tr><tr><td><code><span class="yibqv">S</span></code></td><td><span class="yibqv">毫秒?/span></td><td><span class="yibqv">Number</span></td><td><code><span class="yibqv">978</span></code></td></tr><tr><td><code><span class="yibqv">z</span></code></td><td><span class="yibqv">时区</span></td><td><span class="yibqv">General time zone</span></td><td><code><span class="yibqv">Pacific Standard Time</span></code><span class="yibqv">; </span><code><span class="yibqv">PST</span></code><span class="yibqv">; </span><code><span class="yibqv">GMT-08:00</span></code></td></tr><tr><td><code><span class="yibqv">Z</span></code></td><td><span class="yibqv">时区</span></td><td><span class="yibqv">RFC 822 time zone</span></td><td><p><code><span class="yibqv">-0800</span></code></p><p> </p><p><br /></p></td></tr></tbody></table></div><div style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff; "><span class="yibqv">它有个优点就是支持两位月份,两位日期。带前缀0.</span></div><div style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff; "><div class="yibqv"><span class="yibqv">Date date = new Date();</span></div><div class="yibqv"><span class="yibqv">SimpleDateFormat dateformat = new SimpleDateFormat("yyyy-MM-dd HH:mm");</span></div><div class="yibqv"><span class="yibqv">String sDateSuffix = dateformat.format(date);</span></div><div class="yibqv"><span class="yibqv">System.out.println("[+]sDateSuffix:"+sDateSuffix);</span></div></div><img src ="//www.ot7t.com.cn/parable-myth/aggbug/394364.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="//www.ot7t.com.cn/parable-myth/" target="_blank">无声</a> 2013-01-17 18:47 <a href="//www.ot7t.com.cn/parable-myth/archive/2013/01/17/394364.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>清除目录下的SVN信息 - 四川福利彩票快乐12快乐12开奖直播快乐12开奖辽宁福彩快乐12快乐彩12选5走势图//www.ot7t.com.cn/parable-myth/archive/2012/08/31/386680.html无声无声Fri, 31 Aug 2012 05:07:00 GMT//www.ot7t.com.cn/parable-myth/archive/2012/08/31/386680.html//www.ot7t.com.cn/parable-myth/comments/386680.html//www.ot7t.com.cn/parable-myth/archive/2012/08/31/386680.html#Feedback0//www.ot7t.com.cn/parable-myth/comments/commentRss/386680.html//www.ot7t.com.cn/parable-myth/services/trackbacks/386680.html今天想清除目录下的SVN信息,在网上找了找,说是有三种方法:

一、在linux?nbsp;

删除这些目录是很简单的,命令如?nbsp;
find . -type d -name ".svn"|xargs rm -rf 

或?nbsp;

find . -type d -iname ".svn" -exec rm -rf {} \;   


二、在windows下用以下法子?nbsp;

1、在项目平级的目录,执行dos命令?nbsp;
xcopy project_dir project_dir_1 /s /i 

2、或者在项目根目录执行以下dos命令 
for /r . %%a in (.) do @if exist "%%a\.svn" rd /s /q "%%a\.svn" 

其实第二种方法可以用来干很多事的,比如把代码中的.svn替换为任意其他文件名并在硬盘根目录下执行,就可以从硬盘上删除所有的这个文件啦?nbsp;

3、添加注册表(亲自动手测试? 
可以?#8220;快速删除SVN版本信息”命名增加到资源管理器的右键上,这样,鼠标点两下就能把选中目录下的所?svn目录干掉了?nbsp;

代码为: 

Windows Registry Editor Version 5.00 

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell\DeleteSVN] 
@="快速删除SVN版本信息" 

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell\DeleteSVN\command] 
@="cmd.exe /c D:\工具\批处理文件删除SVN版本信息.bat" 
将这段代码保存为一?reg文件,双击确认导入注册表中不完整,后来自己手工添加。注意:文件“批处理文件删除SVN版本信息.bat”不能?在有空格的文件夹下,确认删除时请看一下当前目录不要删除不该删的目录下的SVN版本信息。不知道怎么改进“cmd.exe /c D:\工具\批处理文件删除SVN版本信息.bat”?nbsp;


批处理文件删除SVN版本信息.bat文件内容如下?nbsp;
@echo off 
echo *********************************************************** 
echo 清除SVN版本??nbsp;                                                                                              
echo *********************************************************** 
:start 
::启动过程,切换目?nbsp;
:set pwd=%cd% 
:cd %1 
echo 工作目录是:& chdir 
:input 
::获取输入,根据输入进行处?nbsp;
set source=: 
set /p source=确定要清楚当前目录下?svn信息吗?[Y/N/Q] 
set "source=%source:"=%" 
if "%source%"=="y" goto clean 
if "%source%"=="Y" goto clean 
if "%source%"=="n" goto noclean 
if "%source%"=="N" goto noclean 
if "%source%"=="q" goto end 
if "%source%"=="Q" goto end 
goto input 
:clean 
::主处理过程,执行清理工作 
@echo on 
@for /d /r %%c in (.svn) do @if exist %%c ( rd /s /q %%c & echo    删除目录%%c) 
@echo off 
echo "当前目录下的svn信息已清? 
goto end 
:noclean 
::分支过程,取消清理工?nbsp;
echo "svn信息清楚操作已取? 
goto end 
:end 
::退出程?nbsp;
cd "%pwd%" 
pause

注:最后一种方法,如果出现错误,就打开注册表,找到对应的项,吧“cmd.exe /c D:\工具\批处理文件删除SVN版本信息.bat “直接写入注册表中即可使用

我只用了最后一种方法:

报文件没有关联错误,找到这个注册表项:[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell\DeleteSVN\command] 
写入?#8220;cmd.exe /c D:\工具\批处理文件删除SVN版本信息.bat “,注意路?/p>

还有一个要注意的:在使用的时候,不要在要清除的文件夹上右击,在要清除的文件夹里面的子文件夹上右击--》快速删除svn版本信息



无声 2012-08-31 13:07 发表评论
]]>
Symantec 卸载密码方法 - 四川福利彩票快乐12快乐12开奖直播快乐12开奖辽宁福彩快乐12快乐彩12选5走势图//www.ot7t.com.cn/parable-myth/archive/2012/06/17/380950.html无声无声Sun, 17 Jun 2012 01:31:00 GMT//www.ot7t.com.cn/parable-myth/archive/2012/06/17/380950.html//www.ot7t.com.cn/parable-myth/comments/380950.html//www.ot7t.com.cn/parable-myth/archive/2012/06/17/380950.html#Feedback0//www.ot7t.com.cn/parable-myth/comments/commentRss/380950.html//www.ot7t.com.cn/parable-myth/services/trackbacks/380950.html


方法一:当时就是输入在服务器端设置的密码(诺顿的默认密码是symantec?nbsp;
方法二:修改注册表HKEY_LOCAL_MACHINE\SOFTWARE\INTEL\LANDesk\VirusProtect6CurrentVersion\AdministratorOnly\Security 
修改UseVPUninstallPassword键值为0,即可无需密码卸载



]]>