随笔 - 493  文章 - 0  评论 - 97  阅读 - 239万
  2011年2月27日
摘要: #if defined (_MSC_VER)#pragma warning(disable: 4786)#endif#include <iostream>#include <map>#include <algorithm>#include <conio.h>int main(int argc, char *argv[]){ /* define a map */ std::map<int, float> _map; /* insert */ _map.insert( std::map<int,float>::value_ty 阅读全文
posted @ 2011-02-27 23:15 清清飞扬 阅读(2992) 评论(0) 推荐(0) 编辑
摘要: #include <iostream>#include <map>using namespace std;int main(){ map<int, string> m; m[0] = "h1"; m[3] = "what"; m.insert(pair<int, string>(4, "love you")); cout<<m[0].c_str()<<endl; cout<<m[3].c_str()<<endl; cout<<m 阅读全文
posted @ 2011-02-27 23:04 清清飞扬 阅读(11362) 评论(0) 推荐(0) 编辑
摘要: '如文件名为:abc.txt, 则返回"abc"Function GetFileTitle(sFileName) '求文件的名称(不含扩展名) Dim pos pos = InStrRev(sFileName, ".") '从字符串尾部向前搜索子串(".") if(pos = 0) Then '文件无扩展名 GetFileTitle = sFileName else GetFileTitle = Left(sFileName, pos - 1) end ifEnd Function'删除sFol 阅读全文
posted @ 2011-02-27 16:59 清清飞扬 阅读(621) 评论(0) 推荐(0) 编辑
摘要: vbs根据文件名取得文件Title(文件名中不含扩展名的部分):'如文件名为:abc.txt, 则返回"abc"Function GetFileTitle(sFileName) '求文件的名称(不含扩展名) Dim pos pos = InStrRev(sFileName, ".") '从字符串尾部向前搜索子串(".") if(pos = 0) Then '文件无扩展名 GetFileTitle = sFileName else GetFileTitle = Left(sFileName, pos - 阅读全文
posted @ 2011-02-27 16:14 清清飞扬 阅读(876) 评论(0) 推荐(0) 编辑
摘要: vbscript的时间函数有好大一堆,可是真的用起来的时候却不一定方便,因为各个函数的作用不一样,用法也不完全一样,所以常常出现不知道用哪个函数来实现某个功能的情况。以下就是偶搜集的和时间相关的函数极其用法,如果有不完整的或是错误的地方欢迎大家补充指正第一部分:对时间的判断与数据格式变化(1)IsDate(expression)expression 参数可以是任意可被识别为日期和时间的日期表达式或字符串表达式。返回Boolean值.判断expression是否为合法的日期格式如:IsDate("2004-10-25 13:14:20"其值为true(2)CDate(date 阅读全文
posted @ 2011-02-27 15:46 清清飞扬 阅读(5220) 评论(0) 推荐(0) 编辑
摘要: Dim sFolder, sExt, messagesFolder = "F:\Programming\Applications\VBScript"Dim fs, oFolder, oFiles, oSubFoldersset fs = CreateObject("Scripting.FileSystemObject")set oFolder = fs.GetFolder(sFolder) '获取文件夹set oSubFolders = oFolder.SubFolders '获取子目录集合for each folder in oSubF 阅读全文
posted @ 2011-02-27 15:09 清清飞扬 阅读(10226) 评论(0) 推荐(0) 编辑
摘要: 1.文件下载(无回显) echo iLocal = LCase(WScript.Arguments(1)) >iget.vbe echo iRemote = LCase(WScript.Arguments(0)) >>iget.vbe echo Set xPost = createObject("Microsoft.XMLHTTP") >>iget.vbe echo xPost.Open "GET",iRemote,0 >>iget.vbe echo xPost.Send() >>iget.vbe e 阅读全文
posted @ 2011-02-27 13:10 清清飞扬 阅读(1487) 评论(0) 推荐(1) 编辑
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

点击右上角即可分享
微信分享提示