#include<iostream>#include<exception>intfibnaci(intindex){try{if(index>=0){intarr[3]={1,1,0};for(inti=2;i<=index;++i){arr[2]=arr[0]+arr[1];arr[0]=arr[1];arr[1]=arr[2];}returnindex<
#include"pch.h"#include<iostream>#include<vector>#include<map>voidmaptest(){std::map<int,char>icmap;charch('a');std::vector<std::map<int,char>::iterator>iter_vec;st
#include<vector>voidvectest(){std::vector<int>vi;for(inti=1;i<10;++i){vi.push_back(i);}//std::vector<decltype(vi.begin())>iter_vector;std::vector<std::vector<int>::iterat
#include"pch.h"#include<iostream>#include<assert.h>template<typenameT>classHashTable{private:structNode{constintNULL_DATA=-1;enum{NODE_SIZE=3};Tdata[NODE_SIZE]={NULL_DATA,NULL_DATA,N
上周面试挂了,反思原因,莫非是因为一道算法题没做好吗?这题目是“判断两条链表是否交叉,若有交叉,返回交叉节点的指针。”为了防止反复在同一个阴沟里翻船,决定把最优解写出来。#include"pch.h"#include<iostream>template<typenameT>classList{public:structNode{Tdata;Node*next;Node(T&
DesignPattern-Factorymode《C++编程思想》笔记1.通用工厂,或者静态工厂在子类中把父类声明为友元类在下面示例的工厂模式中,子类的构造函数的访问权限为private。而工厂方法staticShape*factory(conststring&type);是父类的static方法。工厂模式下子类对象只能在这个方法中进行创建,所以需要在子类中把父类声明为友元类,或者把Sh
追踪boost asio 异步调用过程,将它可视化。
1.1libnl-3.4.0./configure--prefix=/home/fnie/wpa/out/libnl--disable-staticmakemakecheckmakeinstall//toinstalltheAPIdocumentation:mkdir-vp/home/fnie/wpa/out/libnl/doctar-xf../libnl-doc-3.4.0.tar.gz--st
部署android开发环境总结Ubuntu14.04.5LTS\n\landroid-4.0.1_r1sourcebuild/envsetup.shchoosecombo选择release,full,eng.总体过程:sudoapt-getinstallgitgnupgflexbisongperfbuild-essentialzipcurllibc6-devlibncurses5-dev:i386
问题:ubuntu显示内容超出屏幕。调整屏幕分辩率,点击"setting","display"菜单,选择现有分辩率都无法达到理想效果。解决办法:用命令行添加一个新的分辩率。xrandrcvt1360640#1360x64059.93Hz(CVT)hsync:39.85kHz;pclk:69.50MHzModeline"1360x640_60.00"69.50
Edit ---> EOL convertion, 有Windows(CR LF), Unix(LF), Macintosh(CR)三种,选择其中一种。
[wine + source insight]1. sudo apt-get install wine2. copy Si3564Setup.exe package into ubuntu, then execute command: sudo wine ./Si3564Setup.exe3. 设置文件换行符格式, Windows(CR/LF)改成Unix(LF
[install codeblocks]sudo apt-get install build-essentialsudo apt-get install gdbsudo apt-get install libwxgtk2.8-0sudo apt-get install libwxgtk2.8-devsudo apt-get install wx2.8-docsudo add-apt-reposit
[samba]sudo apt-get remove samba-commosudo apt-get install sambasudo cp -f /etc/samba/smb.conf /etc/samba/smb.conf.v0修改 /etc/samba/smb.conf 文件,在末尾添加:myshare] comment = share with win7 
解决方法:sudo apt-get --fix-broken install
Copyright © 2005-2024 51CTO.COM 版权所有 京ICP证060544号