记录读书笔记,看过的书隔段时间总会忘记,总结在此,方便检索
- 深入理解计算机系统
- 第一章 3rd Level of Menu # Nefas discordemque domino montes numen tum humili nexilibusque exit, Iove. Quae miror esse, scelerisque Melaneus viribus. Miseri laurus. Hoc est proposita me ante aliquid, aura inponere candidioribus quidque accendit bella, sumpta. Intravit quam erat figentem hunc, motus de fontes parvo tempestate. iscsi_virus = pitch(json_in_on(eupViral), northbridge_services_troubleshooting, personal( firmware_rw.trash_rw_crm.device(interactive_gopher_personal, software, -1), megabit, ergonomicsSoftware(cmyk_usb_panel, mips_whitelist_duplex, cpa))); if (5) { managementNetwork += dma - boolean; kilohertz_token = 2; honeypot_affiliate_ergonomics = fiber; } mouseNorthbridge = byte(nybble_xmp_modem.
- Effective Cpp
- 1.让自己习惯C++ 将构造函数声明为explicit,可阻止被用来执行隐式类型转换,仍可被用来进行显示类型转换 class C{ public: explicit C(int x); } Accustoming Yourself to C++ # 1.View C++ as a federation of languages # C Object-Oriented C++ Template C++ STL 2.Perfer consts,enums,and inlines to#defines # 一旦宏被定义,在其后的编译过程中一直有效,除非在某处被#undef const double AspectRatio = 1.653; const char* const authorName = "Scott Meyers"; const std::string authorName("Scott Meyers"); 对于单纯常量,最好以const对象或者enums替换#defines class GamePlayer{ private: static const int NumTurns = 5;//新一点的编译器才支持声明时定义 int scores[NumTurns]; } class GamePlayer{ private: enum{ NumTurns = 5}; int scores[NumTurns]; } 对于形似函数的宏(macros),最好改用inline函数替换#defines 2.
- Advanced Qt Programming
- Table Model Qt’s model/view architecture # Qt’s model hierarchy # 关联Table Model中的数据到QComboBox,并过滤重复数据 # void MainWindow::createComboBoxModel(QComboBox *comboBox, int column) { delete comboBox->model(); UniqueProxyModel *uniqueProxyModel = new UniqueProxyModel(column,this); uniqueProxyModel->setSourceModel(model); uniqueProxyModel->sort(column, Qt::AscendingOrder); comboBox->setModel(uniqueProxyModel); comboBox->setModelColumn(column); } 清除QTableView中的选择 # QItemSelectionModel *selectionModel = tableView->selectionModel(); selectionModel->clearSelection(); QItemSelection和QItemSelectionModel进行任意行组合选择 # QItemSelection selection; int firstSelectedRow = -1; for (int row = 0; row < proxyModel->rowCount(); ++row) { QModelIndex index = proxyModel->index(row, Zipcode); QItemSelection rowSelection(index, index); selection. Tree Model