- 博客(18)
- 资源 (2)
- 问答 (1)
- 收藏
- 关注
转载 ubuntu14.04/16.04: modprobe vboxsf failed
https://superuser.com/questions/1268741/virtualbox-ubuntu-guest-additions-not-installing-modprobe-vboxsf-failed/1272796$ sudo reboot 重启系统重复操作后解决问题。
2019-04-01 17:49:28 1617
转载 Virtual Box 虚拟机无法启动:VERR_SUPDRV_NO_RAW_MODE_HYPER_V_ROOT
知乎回答:“ 我也遇到了,还有一种可能是Virtualization Based Security导致的,所以即使Hyper-V被禁用了但仍然在运行。可以用这个官方工具关闭。解压后在Powershell中运行DG_Readiness_Tool_v3.2.ps1 -Disable重启后选择关闭该功能就行了。”工具:https://www.microsoft.com/en-us...
2019-04-01 17:47:23 6356
转载 Could not fetch URL https://pypi.python.org/simple/pip: problem confirming ssl certificate
今天装完python 2.7.2,然后装pytest,遇到问题如标题:网上试了很多种方法也不行,然后找到这篇文章https://blog.csdn.net/m0_37690319/article/details/79945809第二个方法试了不行,用了第三种:pip install pytest -i http://pypi.douban.com/simple/ --trusted-hos...
2019-02-23 18:38:07 1665
转载 常用排序算法总结
1. 常用排序算法总结1https://www.cnblogs.com/eniac12/p/5329396.html2. 常用排序算法总结2https://www.cnblogs.com/eniac12/p/5332117.html图解排序算法之堆排序https://www.cnblogs.com/chengxiao/p/6129630.html ...
2018-09-10 15:12:46 165
转载 背包问题
背包问题精髓是动态规划,其也可分为多种情况,我总结了许多写的很棒的博客,如下:背包问题九讲https://blog.csdn.net/xiaoyao_zhang/article/details/78824924(伪代码,讲述所有情况的算法思想)1. 0-1背包https://blog.csdn.net/m0_37907835/article/details/789914612....
2018-09-07 11:45:27 143
转载 构造函数声明为private或protected
其实相当于单例模式的C++实现,目的是阻止类被实例化,再加上内部static成员变量和static静态成员函数的存在,使得在整个类中,只有一个static类对象(其中static类对象的实例化是在static函数内部实现的。)上述方式主要目的有二:1. 阻止外部实例化类对象;2. 使用static关键字使得整个类只有一个共享变量。具体实现见链接:https://www.cnblogs.co...
2018-09-01 14:47:46 973
原创 虚函数与虚继承中内存分布细节
总结一下虚函数与虚继承中的内存分布细节:1. 如有虚函数,则内存中加入vptr指针,放在内存中最高位置,其余应继承的成员变量(如char [])按就近原则在内存中从近到远分布;2. 如有虚继承,则在内存汇总加入vbptr指针,指向虚表,表中是距离基类成员变量的偏移量,指针放在vptr(如有)的下面,如有重复拷贝则只继承一份成员变量;3. 调用虚函数时,存在就近调用原则,如子类没有,但父...
2018-09-01 12:08:02 461
转载 是否能在构造函数,析构函数中抛出异常?
1. 可以在构造函数中抛出异常。构造函数出现异常,不会调用析构函数,已构造的成员会逆序调用自身析构函数析构掉,但为了保证内存不泄露,尽量使用auto_ptr. “对象构造不可分割,要么完全成功,要么完全失败。”https://www.cnblogs.com/KevinSong/p/3323372.html2. 不可以早析构函数中抛出异常。虽然可以设置try catch内部捕获,却是不推荐的...
2018-08-30 14:45:10 602
转载 类的静态成员函数与非静态成员函数的互访、回调函数中对二者的调用
一、 类的静态成员函数与非静态成员函数的互访1. 通过类名调用静态成员函数,但不能调用非静态成员函数;2. 通过类的对象调用静态成员函数和非静态成员函数;3. 在类的静态成员函数中不能使用类的非静态成员;(可通过形参传递类对象来使用非静态成员)4. 可在类的非静态成员函数中使用类的静态成员;5. 静态成员变量使用前必须初始化,如 int Point::m_nPointCou...
2018-08-28 20:57:52 811
转载 C++成员函数、虚函数、继承关系及this指针等问题汇总
汇总了几篇写的好的文章,我觉得可以解释清楚大部分C++对象内存分配及相关问题。1. 成员函数在内存中的存储方式https://blog.csdn.net/fuzhongmin05/article/details/591120812. 对象的内存布局(上)https://blog.csdn.net/haoel/article/details/30813283. 对象的内存布局(...
2018-08-28 20:38:05 367
转载 分治算法、动态规划与递归
@ 递归、分治策略、动态规划以及贪心算法之间的关系https://blog.csdn.net/tyhj_sf/article/details/53969072就具体实现上而言,动态规划比普通递归仅仅是多了一步保存子问题计算结果的操作。 上面这句话写的很好,我觉得是两者之前最明显的差异了。总结了几篇文章放在下面,别人写的,觉得不错:@ 常见的动态规划问题分析与求解http:/...
2018-08-27 16:59:22 238
原创 STL常用算法之其他算法汇总2018.8.17
@单纯的数据处理@adjacent_find:adjacent_find(first, last); adjacent_find(fist, last, binary_pred());二元谓词参考:https://blog.csdn.net/caroline_wendy/article/details/15378055@count:count(first, last, T);@co...
2018-08-20 16:18:03 153
原创 STL常用算法之set相关算法汇总2018.8.17
@set_union:set_union(first1, last1, first2, last2, result);@set_intersection:set_intersection(first1, last1, first2, last2, result);@set_difference:set_difference(first1, last1, first2, last2, res...
2018-08-17 16:06:24 148
原创 STL常用算法之基本算法汇总2018.8.16
@equal:equal(first1, last1, first2); equal(first1, last1, first2, binary_pred());@fill:fill(first, last, T); fill_n(first, n, T);@iter_swap:iter_swap(iterator a, iterator b);@lexicographical_com...
2018-08-16 21:58:22 175
原创 STL常用算法之数值算法汇总2018.8.16
@accumulate:accumulate(first, last, T); accumulate(first, last, T, binary_op());@inner_product:inner_product(fist, last, first, last, T); inner_product(first, last, first, last, T, binary_op1(), bin...
2018-08-16 20:26:12 176
原创 STL之关联式容器常用方法汇总2018.8.15
@序列容器之set:begin(); end(); clear(); empty(); size(); count(); equal_range(); erase(pos); erase(first, last); erase(x); find(x); insert(x); insert(first, last); lower_bound(x); upper_bound(x); swap(x); ...
2018-08-16 19:20:55 127
原创 STL之序列式容器常用函数汇总2018.8.14
@序列容器之vector:begin(); end(); size(); capacity(); empty(); operator[]; front(); back(); push_back(x); pop_back(); erase(pos); erase(first, last); resize(n, x); clear(); insert(pos, x); insert(pos, n, x...
2018-08-15 15:20:42 174
原创 《C++ Primer》全书第二轮知识点总结 2018.8.13
因为时间比较紧,邻近校招,但C++ Primer去年连码带看搞过一遍,许多细节不记得了,这里就依据一个大神的blog来复习:https://blog.csdn.net/neicole/article/details/6761314@ 001:这里提到要用cin.clear, 找到另一篇blog关于cin.rdstate()的用法,ios::goodbit, eofbit, badbit, ...
2018-08-13 22:10:29 186
TA创建的收藏夹 TA关注的收藏夹
TA关注的人