日本搞逼视频_黄色一级片免费在线观看_色99久久_性明星video另类hd_欧美77_综合在线视频

國內(nèi)最全I(xiàn)T社區(qū)平臺(tái) 聯(lián)系我們 | 收藏本站
阿里云優(yōu)惠2
您當(dāng)前位置:首頁 > php開源 > 綜合技術(shù) > [置頂] Windows內(nèi)存映射文件打造極速復(fù)制(速度已和ExtremeCopy商業(yè)軟件相當(dāng))

[置頂] Windows內(nèi)存映射文件打造極速復(fù)制(速度已和ExtremeCopy商業(yè)軟件相當(dāng))

來源:程序員人生   發(fā)布時(shí)間:2015-04-21 09:15:01 閱讀次數(shù):4053次
如題,先貼圖,后續(xù)上傳源碼和exe
測試文件大小7.08GB:

結(jié)果:


商業(yè)軟件ExtremeCopy 2.1測試結(jié)果:
最新代碼:
/* * Copyright (c) purelib 2012⑵015. */ #include <purelib/movable_window.h> #include <purelib/file_mapping.h> #include <purelib/controls.h> #include <purelib/nsconv.h> #include <thread> using namespace purelib; using namespace purelib::gui; using namespace purelib::filesystem; #ifdef _DEBUG #pragma comment(lib, "purelib32_d.lib") #else #pragma comment(lib, "purelib32.lib") #endif class fixed_window : public movable_window { public: fixed_window() { append_style(WS_OVERLAPPED | WS_MINIMIZEBOX | WS_SYSMENU); } }; class extremely_copier : public fixed_window { public: extremely_copier() { set_opacity(0.95f); set_text(L"extremely_copier"); resize(700, 360); int delta = 30; this->input_.reset(new controls::xxedit(L"D:vs2013.4_ult_chs.iso", 17, 10, 200, 25, *this, WS_BORDER | ES_AUTOHSCROLL)); this->input_->set_font(purelib::gui::DEF_FONT_NORM_10); this->input_->set_left(5); this->input_->set_top(5); this->output_.reset(new controls::xxedit(L"D:TDDOWNLOADakvs2013.4_ult_chs.iso", 17, 10, 200, 25, *this, WS_BORDER | ES_AUTOHSCROLL)); this->output_->set_font(purelib::gui::DEF_FONT_NORM_10); this->output_->set_left(350 + 20); this->output_->set_top(5); this->time_used_.reset(new controls::xxedit(L"00:00:00", 17, 10, 200, 25, *this, WS_BORDER | ES_READONLY | ES_AUTOHSCROLL)); this->time_used_->set_font(purelib::gui::DEF_FONT_NORM_10); this->time_used_->set_left(5); this->time_used_->set_top(100); this->launcher_.reset(new controls::xxbutton(L"啟動(dòng)復(fù)制", 17, 10, 118, 25, *this, WS_BORDER | BS_PUSHBUTTON)); this->launcher_->set_font(purelib::gui::DEF_FONT_BOLD_10); this->launcher_->set_left(this->output_->get_location().x + this->output_->get_size().width); this->launcher_->set_top(280 + 15 + delta); this->cachesize_.reset(new controls::xxedit(L"8192", 17, 10, 200, 25, *this, WS_BORDER | ES_AUTOHSCROLL | ES_NUMBER)); this->cachesize_->set_font(purelib::gui::DEF_FONT_NORM_10); this->cachesize_->set_left(this->output_->get_location().x + this->output_->get_size().width - delta - this->cachesize_->get_size().width); this->cachesize_->set_top(280 + 15 + delta); progress_.reset(new controls::xxprogressbar(17, 280, 670, 25, *this)); register_event(WM_TIMER, [this](void){ ++time_used_seconds_; auto hh = time_used_seconds_ / 3600; auto left = time_used_seconds_ - hh * 3600; auto mm = left / 60; auto ss = left % 60; static wchar_t svalue[128]; swprintf(svalue, L"%02d:%02d:%02d", hh, mm, ss); time_used_->set_text(svalue); }); register_event(this->launcher_->get_id(), [this](void){ // start new worker thread, avoid block UI thread. std::thread copier([this]{ auto input = input_->get_text(); auto output = output_->get_text(); auto cachesize = atol(nsc::transcode(cachesize_->get_text()).c_str()); if (cachesize == 0) cachesize = 8192; launcher_->set_text(L"正在復(fù)制..."); launcher_->disable(); progress_->set_value(0); uint64_t total_bytes = 0; time_used_seconds_ = 0; this->start_timer(1000); auto start = clock(); if ((total_bytes = progress_->extremely_copy(input.c_str(), output.c_str(), cachesize)) > 0) { auto seconds = (clock() - start) / (long double)CLOCKS_PER_SEC; this->stop_timer(); swprintf(message_, L"復(fù)制成功,共耗時(shí)%f秒, 平均速度%fMB/s", seconds, total_bytes / (SZ(1, M) * seconds)); MessageBox(get_handle(), message_, L"提示", MB_OK | MB_ICONINFORMATION); } else { MessageBox(get_handle(), L"復(fù)制失敗", L"提示", MB_OK | MB_ICONERROR); } launcher_->set_text(L"啟動(dòng)復(fù)制"); launcher_->enable(); }); copier.detach(); }); } private: std::unique_ptr<controls::xxedit> input_; std::unique_ptr<controls::xxedit> output_; std::unique_ptr<controls::xxedit> time_used_; std::unique_ptr<controls::xxedit> cachesize_; std::unique_ptr<controls::xxbutton> launcher_; std::unique_ptr<controls::xxprogressbar> progress_; u_long time_used_seconds_; wchar_t message_[256]; }; purelibGUIEntry { // enable_leak_check(); extremely_copier copier; copier.update(); copier.show(); copier.message_loop(); return 0; }


extremely_copier可履行文件: http://pan.baidu.com/s/1hqEfBDU



生活不易,碼農(nóng)辛苦
如果您覺得本網(wǎng)站對您的學(xué)習(xí)有所幫助,可以手機(jī)掃描二維碼進(jìn)行捐贈(zèng)
程序員人生
------分隔線----------------------------
分享到:
------分隔線----------------------------
關(guān)閉
程序員人生
主站蜘蛛池模板: 欧美日本三级 | 日韩欧美一区二区三区 | 亚洲毛片视频 | 久久99精品久久久久久久久久久久 | 国产亚洲欧美一区二区 | 夜夜嗨av色综合久久久综合网 | 精品一区二区免费视频 | 日韩在线免费观看视频 | 福利av在线 | 久久国产精品偷 | 欧美一区二区三区四区在线观看 | 亚洲视频在线一区二区 | 久久国产精品99久久久大便 | 在线播放一区二区三区 | 天天草天天干 | 黄色av网站在线免费观看 | 精品影院 | 严国精品国产三级国产 | 日日爱夜夜爽 | 精品一区二区久久久久久久网站 | 亚洲欧洲成人av每日更新 | 99久久久久国产精品免费 | 欧美 日韩 国产 在线 | 亚洲免费成人 | 国产精品视频一区二区三区不卡 | 欧美爱爱视频 | 麻豆国产一区 | 亚洲欧美一区二区三区国产精品 | 久久久久久久久久av | 91玖玖 | 亚洲精品久久久久国产 | 成人不卡 | 亚洲国内精品 | 亚洲黄色精品 | 亚洲福利视频一区 | 国产一区精品视频 | 欧美一级大片在线播放 | 久久久国产精品视频 | 不卡在线一区 | 免费av网站在线看 | 黄色片网站 |