??xml version="1.0" encoding="utf-8" standalone="yes"?>欧美美女在线,中文字幕一区二区三,一卡二卡三卡日韩欧美http://www.aygfsteel.com/parable-myth/慢慢的度q?/description>zh-cnThu, 01 May 2025 16:15:48 GMTThu, 01 May 2025 16:15:48 GMT60kettle ETL java 调用 kettle job ?transferhttp://www.aygfsteel.com/parable-myth/archive/2014/03/02/410499.html无声无声Sun, 02 Mar 2014 00:20:00 GMThttp://www.aygfsteel.com/parable-myth/archive/2014/03/02/410499.htmlhttp://www.aygfsteel.com/parable-myth/comments/410499.htmlhttp://www.aygfsteel.com/parable-myth/archive/2014/03/02/410499.html#Feedback0http://www.aygfsteel.com/parable-myth/comments/commentRss/410499.htmlhttp://www.aygfsteel.com/parable-myth/services/trackbacks/410499.html
http://blog.csdn.net/chen978616649/article/details/9063695


代码如下Q调用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 {
/**
* 本测试类慎用Q!Q!Q!Q?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);   
            // {待转换执行l束  
            trans.waitUntilFinished();  
            //抛出异常  
            if(trans.getErrors()>0){  
                throw new Exception("There are errors during transformation exception!(传输q程中发生异?");  
            }  
} 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>http://www.aygfsteel.com/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>http://www.aygfsteel.com/parable-myth/archive/2014/03/02/410498.html</guid><wfw:comment>http://www.aygfsteel.com/parable-myth/comments/410498.html</wfw:comment><comments>http://www.aygfsteel.com/parable-myth/archive/2014/03/02/410498.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/parable-myth/comments/commentRss/410498.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/parable-myth/services/trackbacks/410498.html</trackback:ping><description><![CDATA[     摘要: 转自http://bbs.csdn.net/topics/390369075 最q项目中使用ETL工具kettleQ?.+Q对数据库的数据q行清洗Q用工具spoon来用一些图形化的操作比较简单,抽空研究了下用用kettle的一些jar包,把kettlel合到javaQweb目一PE序中。留作一个记录,以后备用查看?nbsp;   先看看网站上下了...  <a href='http://www.aygfsteel.com/parable-myth/archive/2014/03/02/410498.html'>阅读全文</a><img src ="http://www.aygfsteel.com/parable-myth/aggbug/410498.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/parable-myth/" target="_blank">无声</a> 2014-03-02 08:15 <a href="http://www.aygfsteel.com/parable-myth/archive/2014/03/02/410498.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>论坛http://www.aygfsteel.com/parable-myth/archive/2014/01/09/408748.html无声无声Thu, 09 Jan 2014 13:25:00 GMThttp://www.aygfsteel.com/parable-myth/archive/2014/01/09/408748.htmlhttp://www.aygfsteel.com/parable-myth/comments/408748.htmlhttp://www.aygfsteel.com/parable-myth/archive/2014/01/09/408748.html#Feedback0http://www.aygfsteel.com/parable-myth/comments/commentRss/408748.htmlhttp://www.aygfsteel.com/parable-myth/services/trackbacks/408748.htmlhttp://www.dxper.net/forum-70-1.html

无声 2014-01-09 21:25 发表评论
]]>
Spring 3.2.4源码~译http://www.aygfsteel.com/parable-myth/archive/2013/09/05/403697.html无声无声Thu, 05 Sep 2013 02:55:00 GMThttp://www.aygfsteel.com/parable-myth/archive/2013/09/05/403697.htmlhttp://www.aygfsteel.com/parable-myth/comments/403697.htmlhttp://www.aygfsteel.com/parable-myth/archive/2013/09/05/403697.html#Feedback0http://www.aygfsteel.com/parable-myth/comments/commentRss/403697.htmlhttp://www.aygfsteel.com/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?打包Q包含运行时依赖jar包)
C:\>cd spring-framework
C:\spring-framework>gradlew depsZip -x javadoc -x api -x groovydoc -x jdiff -x reference
PSQ我在编译时发现如果要生成javadocQ会~译不成功,所以将javadoc、api、groovydoc、jdiff、reference{Q务都从Q务列表中去除了,以保证编译和打包都能正常通过?br />~译q程会下载一些依赖包Q放到c盘用L录下


无声 2013-09-05 10:55 发表评论
]]>
转win8 64?Oracle 11g 64位下使用PL/SQL Developer 的解军_?/title><link>http://www.aygfsteel.com/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>http://www.aygfsteel.com/parable-myth/archive/2013/09/02/403545.html</guid><wfw:comment>http://www.aygfsteel.com/parable-myth/comments/403545.html</wfw:comment><comments>http://www.aygfsteel.com/parable-myth/archive/2013/09/02/403545.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/parable-myth/comments/commentRss/403545.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/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">1Q安装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">2Q安?2位的Oracle客户端( instantclient-basic-win32-11.2.0.1.0Q?/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位的Q不要下错了版本QOracle官网有下载)Q将其解压至Oracle安装目录的Product下(本机命名为:instantclient_11_2Q: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_2Q其实只需?NETWORK\ADMIN\tnsnames.oraQ最好是直接拯q个文g到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">3Q安装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 DeveloperQ在perference->Connection里面讄OCI Library和Oracle_HomeQ例如本|ؓQ?/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 QD:\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 Q?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环境变量, 最好设|成和数据库端一? 首先从数据库端查询字W集信息:</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">叛_"我的电脑" - "属? - "高" - "环境变量" - "pȝ环境变量":</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|ؓ"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", 变量D|ؓ"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 Q运行无问题?/span><img src ="http://www.aygfsteel.com/parable-myth/aggbug/403545.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/parable-myth/" target="_blank">无声</a> 2013-09-02 09:42 <a href="http://www.aygfsteel.com/parable-myth/archive/2013/09/02/403545.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>crontab配置详解http://www.aygfsteel.com/parable-myth/archive/2013/02/22/395555.html无声无声Fri, 22 Feb 2013 02:22:00 GMThttp://www.aygfsteel.com/parable-myth/archive/2013/02/22/395555.htmlhttp://www.aygfsteel.com/parable-myth/comments/395555.htmlhttp://www.aygfsteel.com/parable-myth/archive/2013/02/22/395555.html#Feedback0http://www.aygfsteel.com/parable-myth/comments/commentRss/395555.htmlhttp://www.aygfsteel.com/parable-myth/services/trackbacks/395555.html名称 : crontab 
使用权限 : 所有用?nbsp;
使用方式 : 
crontab [ -u user ] file 
crontab [ -u user ] { -l | -r | -e } 
说明 : 
crontab 是用来让使用者在固定旉或固定间隔执行程序之用,换句话说Q也是cM使用者的时程表?u user 是指讑֮指定 user 的时E表Q这个前提是你必要有其权限(比如说是 root)才能够指定他人的时程表。如果不使用 -u user 的话Q就是表C定自q时程表?nbsp;

参数 : 
crontab -e : 执行文字~辑器来讑֮时程表,内定的文字编辑器?VIQ如果你想用别的文字~辑器,则请先设?VISUAL 环境变数来指定用那个文字编辑器(比如?setenv VISUAL joe) 
crontab -r : 删除目前的时E表 
crontab -l : 列出目前的时E表 
crontab file [-u user]-用指定的文g替代目前的crontab?nbsp;
时程表的格式如下 : 
f1 f2 f3 f4 f5 program 
其中 f1 是表C分钟,f2 表示时Qf3 表示一个月份中的第几日Qf4 表示月䆾Qf5 表示一个星期中的第几天。program 表示要执行的E序?nbsp;
?f1 ?* 时表C每分钟都要执行 programQf2 ?* 时表C每时都要执行E序Q其馀cL 
?f1 ?a-b 时表CZW?a 分钟到第 b 分钟q段旉内要执行Qf2 ?a-b 时表CZW?a 到第 b 时都要执行Q其馀cL 
?f1 ?*/n 时表C每 n 分钟个时间间隔执行一ơ,f2 ?*/n 表示?n 时个时间间隔执行一ơ,光cL 
?f1 ?a, b, c,... 时表C第 a, b, c,... 分钟要执行,f2 ?a, b, c,... 时表C第 a, b, c...个小时要执行Q其馀cL 
使用者也可以所有的讑֮先存攑֜档案 file 中,?crontab file 的方式来讑֮时程表?nbsp;

例子 : 
#每天早上7Ҏ行一?/bin/ls : 
0 7 * * * /bin/ls 
?12 月内, 每天的早?6 点到 12 点中Q每?个小时执行一?/usr/bin/backup : 
0 6-12/3 * 12 * /usr/bin/backup 
周一到周五每天下?5:00 寄一信l?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" 
注意 : 
当程序在你所指定的时间执行后Q系l会寄一信l你Q显CE序执行的内容,若是你不希望收到q样的信Q请在每一行空一g后加?> /dev/null 2>&1 卛_ 

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

crontab命o的功能是在一定的旉间隔调度一些命令的执行。在/etc目录下有一个crontab文gQ这里存放有pȝq行的一些调度程序。每个用户可以徏立自q调度crontab?nbsp;

crontab命o有三UŞ式的命o行结构: 

crontab [-u user] [file] 

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

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

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

命o行中-l选项的作用是昄用户crontab文g的内宏V?nbsp;

使用命ocrontab -u user -e命o~辑用户user的cron(c)作业。用户通过~辑文g来增加或修改M作业h?nbsp;

执行命ocrontab -u user -r卛_删除当前用户的所有的cron作业?nbsp;

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

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

0?9 表示?nbsp;

1?3 表示时 

1?1 表示?nbsp;

1?2 表示月䆾 

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

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

无声 2013-02-22 10:22 发表评论
]]>
JSON转换成MAP的工Lhttp://www.aygfsteel.com/parable-myth/archive/2013/01/30/394954.html无声无声Wed, 30 Jan 2013 11:48:00 GMThttp://www.aygfsteel.com/parable-myth/archive/2013/01/30/394954.htmlhttp://www.aygfsteel.com/parable-myth/comments/394954.htmlhttp://www.aygfsteel.com/parable-myth/archive/2013/01/30/394954.html#Feedback7http://www.aygfsteel.com/parable-myth/comments/commentRss/394954.htmlhttp://www.aygfsteel.com/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); 
            //如果内层q是数组的话Ql解?/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 = "http://...";
        List<Map<String,Object>> list = getListByUrl(url);
        System.out.println(list);
    }
}


无声 2013-01-30 19:48 发表评论
]]>
Java 获取当前日期和时?/title><link>http://www.aygfsteel.com/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>http://www.aygfsteel.com/parable-myth/archive/2013/01/17/394364.html</guid><wfw:comment>http://www.aygfsteel.com/parable-myth/comments/394364.html</wfw:comment><comments>http://www.aygfsteel.com/parable-myth/archive/2013/01/17/394364.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/parable-myth/comments/commentRss/394364.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/parable-myth/services/trackbacks/394364.html</trackback:ping><description><![CDATA[<p style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff; "><span>有两U方法:</span></p><p style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff; "><span>Ҏ一Q用java.util.DatecL实现Qƈl合java.text.DateFormatcL实现旉的格式化Q看下面代码Q?/span></p><p style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff; "><span>import java.util.*; <br /></span><span>import java.text.*;<br /></span><span>//以下默认旉日期昄方式都是汉语语言方式<br /></span><span>//一般语a默认汉语就可以了,旉日期的格式默认ؓMEDIUM风格Q比如:2008-6-16 20:54:53<br /></span><span>//以下昄的日期时间都是再Datecȝ基础上的来的Q还可以利用CalendarcL实现见类TestDate2.java<br /></span><span>public class TestDate { <br /></span><span>   public static void main(String[] args) { <br /></span><span>      Date now = new Date(); <br /></span><span>      Calendar cal = Calendar.getInstance(); <br />      <br /></span><span>      DateFormat d1 = DateFormat.getDateInstance(); //默认语言Q汉语)下的默认风格QMEDIUM风格Q比如:2008-6-16 20:54:53Q?br /></span><span>      String str1 = d1.format(now);<br /></span><span>      DateFormat d2 = DateFormat.getDateTimeInstance(); <br /></span><span>      String str2 = d2.format(now); <br /></span><span>      DateFormat d3 = DateFormat.getTimeInstance(); <br /></span><span>      String str3 = d3.format(now); <br /></span><span>      DateFormat d4 = DateFormat.getInstance(); //使用SHORT风格昄日期和时?br /></span><span>      String str4 = d4.format(now);</span></p><p style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff; "><span>      DateFormat d5 = DateFormat.getDateTimeInstance(DateFormat.FULL,DateFormat.FULL); //昄日期Q周Q时__到秒Q?br /></span><span>      String str5 = d5.format(now);<br /></span><span>      DateFormat d6 = DateFormat.getDateTimeInstance(DateFormat.LONG,DateFormat.LONG); //昄日期。时__到秒Q?br /></span><span>      String str6 = d6.format(now);<br /></span><span>      DateFormat d7 = DateFormat.getDateTimeInstance(DateFormat.SHORT,DateFormat.SHORT); //昄日期Q时__到分Q?br /></span><span>      String str7 = d7.format(now);<br /></span><span>      DateFormat d8 = DateFormat.getDateTimeInstance(DateFormat.MEDIUM,DateFormat.MEDIUM); //昄日期Q时__到分Q?br /></span><span>      String str8 = d8.format(now);//与SHORT风格相比Q这U方式最好用</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>      System.out.println("用Date方式昄旉: " + now);//此方法显C的l果和Calendar.getInstance().getTime()一?br />      <br />      <br /></span><span>      System.out.println("用DateFormat.getDateInstance()格式化时间后为:" + str1);<br /></span><span>      System.out.println("用DateFormat.getDateTimeInstance()格式化时间后为:" + str2);<br /></span><span>      System.out.println("用DateFormat.getTimeInstance()格式化时间后为:" + str3);<br /></span><span>      System.out.println("用DateFormat.getInstance()格式化时间后为:" + str4);<br />      <br /></span><span>      System.out.println("用DateFormat.getDateTimeInstance(DateFormat.FULL,DateFormat.FULL)格式化时间后为:" + str5);<br /></span><span>      System.out.println("用DateFormat.getDateTimeInstance(DateFormat.LONG,DateFormat.LONG)格式化时间后为:" + str6);<br /></span><span>      System.out.println("用DateFormat.getDateTimeInstance(DateFormat.SHORT,DateFormat.SHORT)格式化时间后为:" + str7);<br /></span><span>      System.out.println("用DateFormat.getDateTimeInstance(DateFormat.MEDIUM,DateFormat.MEDIUM)格式化时间后为:" + str8);<br /></span><span>   }</span></p><p style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff; "><span>}</span></p><p style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff; "><span>q行l果Q?/span></p><p style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff; "><span>用Date方式昄旉: Mon Jun 16 20:54:53 CST 2008<br /></span><span>用DateFormat.getDateInstance()格式化时间后为:2008-6-16<br /></span><span>用DateFormat.getDateTimeInstance()格式化时间后为:2008-6-16 20:54:53<br /></span><span>用DateFormat.getTimeInstance()格式化时间后为:20:54:53<br /></span><span>用DateFormat.getInstance()格式化时间后为:08-6-16 下午8:54<br /></span><span>用DateFormat.getDateTimeInstance(DateFormat.FULL,DateFormat.FULL)格式化时间后?br /></span><span>Q?008q??6?星期一 下午08?4?3U?CST<br /></span><span>用DateFormat.getDateTimeInstance(DateFormat.LONG,DateFormat.LONG)格式化时间后?br /></span><span>Q?008q??6?下午08?4?3U?br /></span><span>用DateFormat.getDateTimeInstance(DateFormat.SHORT,DateFormat.SHORT)格式化时间后<br /></span><span>为:08-6-16 下午8:54<br /></span><span>用DateFormat.getDateTimeInstance(DateFormat.MEDIUM,DateFormat.MEDIUM)格式化时?br /></span><span>后ؓQ?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>Ҏ二:用java.util.CalendarcL实现Q看下面Q?/span></p><p style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff; "><span>import java.util.*; <br /></span><span>import java.text.*;<br /></span><span>//以下是利用CalendarcL实现日期旉的,和Datecȝ比较比较?/span></p><p style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff; "><span>public class TestDate2 { <br /></span><span>   public static void main(String[] args) { <br />      <br /></span><span>      Calendar ca = Calendar.getInstance();<br /></span><span>      int year = ca.get(Calendar.YEAR);//获取q䆾<br /></span><span>      int month=ca.get(Calendar.MONTH);//获取月䆾 <br /></span><span>      int day=ca.get(Calendar.DATE);//获取?br /></span><span>      int minute=ca.get(Calendar.MINUTE);//?nbsp;<br /></span><span>      int hour=ca.get(Calendar.HOUR);//时 <br /></span><span>      int second=ca.get(Calendar.SECOND);//U?br /></span><span>      int WeekOfYear = ca.get(Calendar.DAY_OF_WEEK); <br />      <br />      <br /></span><span>      System.out.println("用Calendar.getInstance().getTime()方式昄旉: " + ca.getTime());<br /></span><span>      System.out.println("用Calendar获得日期是:" + year +"q?+ month +"?+ day + "?);<br />      <br /></span><span>      System.out.println("用Calendar获得旉是:" + hour +"?+ minute +"?+ second +"U?);<br /></span><span>      System.out.println(WeekOfYear);//昄今天是一周的W几天(我做的这个例子正好是周二Q故l果昄2Q如果你再周6q行Q那么显C?Q?br />      <br /></span><span>   }</span></p><p style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff; "><span>}<br /></span><span>q行l果是:<br /></span><span>用Calendar.getInstance().getTime()方式昄旉: Mon Jun 16 21:54:21 CST 2008<br /></span><span>用Calendar获得日期是:2008q??6?br /></span><span>用Calendar获得旉是:9?4?1U?br /></span><span>2</span></p><p style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff; "><br /><span>ȝQ中的来_Ҏ二是最方便的,Ҏ一昑־分笨拙,不过看个人喜Ƣ了?/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>转自Q?/span><a style="color: #336699; text-decoration: none; "><span>http://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>Ҏ三:</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>SimpleDateFormat 24时制时间显C?/span></h3><span>关键? 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>字母</span></th><th align="left"><span>日期或时间元?/span></th><th align="left"><span>表示</span></th><th align="left"><span>CZ</span></th></tr><tr><td><code><span>G</span></code></td><td><span>Era 标志W?/span></td><td><span>Text</span></td><td><code><span>AD</span></code></td></tr><tr><td><code><span>y</span></code></td><td><span>q?/span></td><td><span>Year</span></td><td><code><span>1996</span></code><span>; </span><code><span>96</span></code></td></tr><tr><td><code><span>M</span></code></td><td><span>q中的月?/span></td><td><span>Month</span></td><td><code><span>July</span></code><span>; </span><code><span>Jul</span></code><span>; </span><code><span>07</span></code></td></tr><tr><td><code><span>w</span></code></td><td><span>q中的周?/span></td><td><span>Number</span></td><td><code><span>27</span></code></td></tr><tr><td><code><span>W</span></code></td><td><span>月䆾中的周数</span></td><td><span>Number</span></td><td><code><span>2</span></code></td></tr><tr><td><code><span>D</span></code></td><td><span>q中的天?/span></td><td><span>Number</span></td><td><code><span>189</span></code></td></tr><tr><td><code><span>d</span></code></td><td><span>月䆾中的天数</span></td><td><span>Number</span></td><td><code><span>10</span></code></td></tr><tr><td><code><span>F</span></code></td><td><span>月䆾中的星期</span></td><td><span>Number</span></td><td><code><span>2</span></code></td></tr><tr><td><code><span>E</span></code></td><td><span>星期中的天数</span></td><td><span>Text</span></td><td><code><span>Tuesday</span></code><span>; </span><code><span>Tue</span></code></td></tr><tr><td><code><span>a</span></code></td><td><span>Am/pm 标记</span></td><td><span>Text</span></td><td><code><span>PM</span></code></td></tr><tr><td><code><span>H</span></code></td><td><span>一天中的小时数Q?-23Q?/span></td><td><span>Number</span></td><td><code><span>0</span></code></td></tr><tr><td><code><span>k</span></code></td><td><span>一天中的小时数Q?-24Q?/span></td><td><span>Number</span></td><td><code><span>24</span></code></td></tr><tr><td><code><span>K</span></code></td><td><span>am/pm 中的时敎ͼ0-11Q?/span></td><td><span>Number</span></td><td><code><span>0</span></code></td></tr><tr><td><code><span>h</span></code></td><td><span>am/pm 中的时敎ͼ1-12Q?/span></td><td><span>Number</span></td><td><code><span>12</span></code></td></tr><tr><td><code><span>m</span></code></td><td><span>时中的分钟?/span></td><td><span>Number</span></td><td><code><span>30</span></code></td></tr><tr><td><code><span>s</span></code></td><td><span>分钟中的U数</span></td><td><span>Number</span></td><td><code><span>55</span></code></td></tr><tr><td><code><span>S</span></code></td><td><span>毫秒?/span></td><td><span>Number</span></td><td><code><span>978</span></code></td></tr><tr><td><code><span>z</span></code></td><td><span>时区</span></td><td><span>General time zone</span></td><td><code><span>Pacific Standard Time</span></code><span>; </span><code><span>PST</span></code><span>; </span><code><span>GMT-08:00</span></code></td></tr><tr><td><code><span>Z</span></code></td><td><span>时区</span></td><td><span>RFC 822 time zone</span></td><td><p><code><span>-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>它有个优点就是支持两位月份,两位日期。带前缀0.</span></div><div style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff; "><div><span>Date date = new Date();</span></div><div><span>SimpleDateFormat dateformat = new SimpleDateFormat("yyyy-MM-dd HH:mm");</span></div><div><span>String sDateSuffix = dateformat.format(date);</span></div><div><span>System.out.println("[+]sDateSuffix:"+sDateSuffix);</span></div></div><img src ="http://www.aygfsteel.com/parable-myth/aggbug/394364.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/parable-myth/" target="_blank">无声</a> 2013-01-17 18:47 <a href="http://www.aygfsteel.com/parable-myth/archive/2013/01/17/394364.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>清除目录下的SVN信息http://www.aygfsteel.com/parable-myth/archive/2012/08/31/386680.html无声无声Fri, 31 Aug 2012 05:07:00 GMThttp://www.aygfsteel.com/parable-myth/archive/2012/08/31/386680.htmlhttp://www.aygfsteel.com/parable-myth/comments/386680.htmlhttp://www.aygfsteel.com/parable-myth/archive/2012/08/31/386680.html#Feedback0http://www.aygfsteel.com/parable-myth/comments/commentRss/386680.htmlhttp://www.aygfsteel.com/parable-myth/services/trackbacks/386680.html今天x除目录下的SVN信息Q在|上找了找,说是有三U方法:

一、在linux?nbsp;

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

或?nbsp;

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


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

1、在目q的目录,执行dos命oQ?nbsp;
xcopy project_dir project_dir_1 /s /i 

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

其实W二U方法可以用来干很多事的Q比如把代码中的.svn替换ZQ意其他文件名q在盘根目录下执行Q就可以从硬盘上删除所有的q个文g啦?nbsp;

3、添加注册表(亲自动手试q? 
可以?#8220;快速删除SVN版本信息”命名增加到资源管理器的右键上Q这P鼠标点两下就能把选中目录下的所?svn目录q掉了?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" 
这D代码保存ؓ一?reg文gQ双ȝ认导入注册表中不完整Q后来自己手工添加。注意:文g“批处理文件删除SVN版本信息.bat”不能?在有I格的文件夹下,认删除时请看一下当前目录不要删除不该删的目录下的SVN版本信息。不知道怎么改进“cmd.exe /c D:\工具\批处理文件删除SVN版本信息.bat”?nbsp;


批处理文件删除SVN版本信息.bat文g内容如下Q?nbsp;
@echo off 
echo *********************************************************** 
echo 清除SVN版本??nbsp;                                                                                              
echo *********************************************************** 
:start 
::启动q程Q切换目?nbsp;
:set pwd=%cd% 
:cd %1 
echo 工作目录是:& chdir 
:input 
::获取输入Q根据输入进行处?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 
::d理过E,执行清理工作 
@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 
::分支q程Q取消清理工?nbsp;
echo "svn信息清楚操作已取? 
goto end 
:end 
::退出程?nbsp;
cd "%pwd%" 
pause

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

我只用了最后一U方法:

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

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



无声 2012-08-31 13:07 发表评论
]]>
Symantec 卸蝲密码Ҏhttp://www.aygfsteel.com/parable-myth/archive/2012/06/17/380950.html无声无声Sun, 17 Jun 2012 01:31:00 GMThttp://www.aygfsteel.com/parable-myth/archive/2012/06/17/380950.htmlhttp://www.aygfsteel.com/parable-myth/comments/380950.htmlhttp://www.aygfsteel.com/parable-myth/archive/2012/06/17/380950.html#Feedback0http://www.aygfsteel.com/parable-myth/comments/commentRss/380950.htmlhttp://www.aygfsteel.com/parable-myth/services/trackbacks/380950.html


Ҏ一Q当时就是输入在服务器端讄的密码(诺顿的默认密码是symantecQ?nbsp;
Ҏ二:修改注册表HKEY_LOCAL_MACHINE\SOFTWARE\INTEL\LANDesk\VirusProtect6CurrentVersion\AdministratorOnly\Security 
修改UseVPUninstallPassword键gؓ0Q即可无需密码卸蝲



无声 2012-06-17 09:31 发表评论
]]>
վ֩ģ壺 | °Ͷ| º| Դ| Ͻ| | μԴ| | | | | ͨ| | °Ͷ| Դ| | ̫| ɽ| | | | ɽ| | | | Թ| Զ| | | | | ڻ| »Ȱ| | | | | | ֬| | |