Justin.Lu----Position

  IT博客 :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 管理 ::
  4 随笔 :: 6 文章 :: 3 评论 :: 0 Trackbacks

2005年9月20日 #

用app.path取得遠程目錄時結果:例如 \\gcecn\copy\
取得的本機目錄時, 例如 f:\backup
注意:最後是否有"\"
posted @ 2005-09-20 20:03 Justin 阅读(2060) | 评论 (2)编辑 收藏

2005年8月19日 #

 

sub CreateFile()
Dim fso As Scripting.FileSystemObject
Dim ts As TextStream
Dim FileName As String
Dim txtLine As String
    
    
Set fso = CreateObject("Scripting.FileSystemObject")
    
    FileName 
= App.Path & "鑽孔疊板數.txt"
    Set ts = fso.CreateTextFile(FileName)
    ts.
writeLine ("ProductNo" & Chr(9& "DRILL_E/P" & Chr(9& _
                    
"Drill E/P" & Chr(9& "ins_date" & Chr(9& _
                    
"DRILL_E/P2" & Chr(9& "Drill E/P2" & Chr(13))  
    ts.Close
end sub
posted @ 2005-08-19 09:17 Justin 阅读(305) | 评论 (0)编辑 收藏

2005年8月18日 #

File Copy

// Copies src file to dst file.
// If the dst file does not exist, it is created
void copy(File src, File dst) throws IOException
{
 InputStream 
in = new FileInputStream(src);
 OutputStream 
out = new FileOutputStream(dst);
 
 
// Transfer bytes from in to out
 byte[] buf = new byte[1024];
 
int len;
 
while ((len = in.read(buf)) > 0)
 
{
     
out.write(buf, 0, len);
 }

 
in.close();
 
out.close();
}
posted @ 2005-08-18 20:57 Justin 阅读(2073) | 评论 (6)编辑 收藏


第一个是 ::URL::http://www.koders.com/  是一个源代码搜索引擎,可以查询Apache,Mozilla,Novell Forge和SourceForge等组织的源代码。目前,据称可以搜索1.98亿行源代码,并可按编程语言及应用协议的不同进行查询,其查询直接深入到源代码内部进行,对开发者比较有用

第二个是 ::URL::
http://javaalmanac.com  Java开发者年鉴一书的在线版本. 要想快速查到某种Java技巧
的用法及示例代码, 这是一个不错的去处,我经常去参阅

posted @ 2005-08-18 18:44 Justin 阅读(303) | 评论 (0)编辑 收藏

仅列出标题