上一页 1 ··· 34 35 36 37 38 39 40 41 42 ··· 50 下一页
  2011年2月26日
摘要: Function ShowDriveType(drvpath) Dim fso, d, t Set fso = CreateObject("Scripting.FileSystemObject") Set d = fso.GetDrive(fso.GetDriveName(drvpath)) Select Case d.DriveType Case 0 t = "Unknown" Case 1 t = "Removable" '移动硬盘 Case 2 t = "Fixed" '硬盘 Case 3 t 阅读全文
posted @ 2011-02-26 21:39 清清飞扬 阅读(2143) 评论(0) 推荐(0)
摘要: Dim messagemessage = "I love you baby, what can I do for you。我一定要找到你!" '经调试,发现不支持中文CreateObject("SAPI.SpVoice").speak message把上面的文件存到a.vbs文件,再双击运行看看,你就知道了。 阅读全文
posted @ 2011-02-26 21:03 清清飞扬 阅读(1381) 评论(0) 推荐(0)
摘要: 主文件:/* 功能:主要是实现字符串分割,并选择了三种不同的方式来保存结果。 最终证明:可能最方便的还是第一种方法(方便、快捷,不用自己做太多的工作,可以自己维护内存空间)*/#include <iostream>#include <vector>#include "z_string.h"using namespace std;void Spliter(char* pSrc, char* spliter, vector<string>& v){ char* token = NULL; char* temp = new char[s 阅读全文
posted @ 2011-02-26 20:12 清清飞扬 阅读(2652) 评论(0) 推荐(1)
摘要: /*功能:删除nDays天及之前的日志文件@nDays: 0-不删除日志,3-删除3天及之前的日志(保留今天、昨天、前天的日志) ...void CRecordLog::ClearLog(UINT nDays)// 删除N天前的日志{if (nDays > 0){WIN32_FIND_DATA FindFileData;CString sAllFile = m_sLogFolder + "\\*.log";HANDLE hFind = ::FindFirstFile(sAllFile, &FindFileData);if(INVALID_HANDLE_VALU 阅读全文
posted @ 2011-02-26 14:38 清清飞扬 阅读(684) 评论(0) 推荐(0)
  2011年2月25日
摘要: On error resume NextDim mu_sFilePath, mu_sFileNamemu_sFilePath = "textFolder/"mu_sFileName = mu_sFilePath & "ResultVoice.txt"Dim fsset fs = CreateObject("Scripting.FileSystemObject")if(fs.FolderExists(mu_sFilePath)) Then '检测文件夹是否存在 MsgBox "文件夹已存在"else 阅读全文
posted @ 2011-02-25 17:17 清清飞扬 阅读(1079) 评论(0) 推荐(0)
摘要: CreateTextFile 方法创建指定文件并返回 TextStream 对象,该对象可用于读或写创建的文件。object.CreateTextFile(filename[, overwrite[, unicode]])参数object必选项。应为 FileSystemObject 或 Folder 对象的名称。filename必选项。字符串表达式,指明要创建的文件。overwrite可选项。Boolean 值指明是否可以覆盖现有文件。如果可覆盖文件,该值为 True;如果不能覆盖文件,则该值为 False 。如果省略该值,则将覆盖现有文件。unicode可选项。Boolean 值指明是否以 阅读全文
posted @ 2011-02-25 16:58 清清飞扬 阅读(6791) 评论(1) 推荐(0)
摘要: 功能:服务器端程序处于监听状态,等待客户端连接。客户端发来数据后,服务端回发一个消息,同时关闭连接!源码下载服务器(采用一个监听线程)核心代码:BOOL CListenThread::InitInstance(){// if (!AfxSocketInit())// {// AfxMessageBox(IDP_SOCKETS_INIT_FAILED);// return FALSE;// } m_bListening = TRUE; // 线程启动时默认处于监听状态 while(1) { if(m_bListening) { StartListen(); } } return TRUE;}in 阅读全文
posted @ 2011-02-25 00:27 清清飞扬 阅读(2992) 评论(0) 推荐(0)
  2011年2月24日
摘要: 通常形成记录集可以使用 Set rs=conn.execute(SQL) 或直接rs=CONN.execute(SQL)和 Set rs=Server.CreateObject("ADODB.Recordset")rs.open SQL,CONN,0,1 或 rs.open SQL,CONN这种情况 通常open比上一个性能要好那么一丁点( command对象更灵活,执行范围更广)使用 CONN.execute 可以不用关闭直接执行下一个 set rs=conn.execute(SQL)大约要慢 2~5倍!!(这是在msSQL循环1000次的),所以执行下一个 rs=con 阅读全文
posted @ 2011-02-24 17:34 清清飞扬 阅读(4112) 评论(1) 推荐(0)
摘要: On error resume NextDim mu_ConnString, mu_InsertSqlmu_ConnString = "driver={SQL Server};Server=192.xx.xx.xx;database=TestFax;Uid=sa;pwd=xxx;" '连接SQL Server2005'mu_ConnString = "Provider=MSDAORA.1;Data Source=GSxx;User ID=GSxxx;Password=GSxxx" '连接Oracle数据库mu_InsertSql 阅读全文
posted @ 2011-02-24 17:14 清清飞扬 阅读(665) 评论(0) 推荐(0)
摘要: On error resume NextDim mu_ConnString, mu_InsertSqlmu_ConnString = "driver={SQL Server};Server=192.xx.xx.xx;database=TestFax;Uid=sa;pwd=zzz;" '连接SQL Server2005'mu_ConnString = "Provider=MSDAORA.1;Data Source=GSxxx;User ID=xx;Password=xxx" '连接Oracle数据库mu_InsertSql = &q 阅读全文
posted @ 2011-02-24 17:04 清清飞扬 阅读(536) 评论(0) 推荐(0)
上一页 1 ··· 34 35 36 37 38 39 40 41 42 ··· 50 下一页