51dev.com IT技术开发者社区

51dev.com 技术开发者社区

c++ 容器排序

c++ 容器排序

 #include<algorithm>#include<functional>#include<array>#include<iostream>usingnamespacestd;intmain(){array<int,10>s...

python 计算阶乘

python 计算阶乘

 #用for循环计算n!sum=1n=int(input('请输入n='))foriinrange(0,n+1):forjinrange(i,0,-1):sum*=j#sum=sum*jprint('%d!=%3d'%(i,sum))sum=1 ...

c++ 反转容器的元素顺序(reverse)

c++ 反转容器的元素顺序(reverse)

 #include<vector>#include<iostream>#include<iterator>#include<algorithm>usingnamespacestd;intmain(){vector<int>v{1,...

c++ 判断list是否为空(empty)

c++ 判断list是否为空(empty)

 #include<list>#include<iostream>usingnamespacestd;intmain(){list<int>numbers;cout<<"Initially,numbers.empty():"<<n...

c++ 列表删除元素(erase)

c++ 列表删除元素(erase)

 #include<list>#include<iostream>#include<iterator>usingnamespacestd;intmain(){list<int>c{0,1,2,3,4,5,6,7,8,9};for(auto&a...

c++ 重设容器的长度(resize)

c++ 重设容器的长度(resize)

 #include<iostream>#include<vector>usingnamespacestd;intmain(){vector<int>myvector;//setsomeinitialcontent:for(inti=1;i<10;i...

c++ 判断容器是否为空

c++ 判断容器是否为空

 #include<iostream>#include<vector>#include<string>usingnamespacestd;intmain(){vector<int>ints{1,2,4};vector<string>...

c++ 将容量设置为容器的长度(shrink_to_fit)

c++ 将容量设置为容器的长度(shrink_to_fit)

 #include<iostream>#include<vector>usingnamespacestd;intmain(){vector<int>myvector(25);cout<<"1.capacityofmyvector:"<&...

c++ 插入容器元素(insert)

c++ 插入容器元素(insert)

 #include<iostream>#include<vector>usingnamespacestd;intmain(){vector<int>myints;cout<<"0.size:"<<myints.size()<...

c++ 交换两个容器(swap)

c++ 交换两个容器(swap)

 #include<iostream>#include<vector>usingnamespacestd;intmain(){vector<int>foo(3,100);//threeintswithavalueof100vector<int>...

ros 杀掉所有节点

ros 杀掉所有节点

 rosnodekill-a 或者rosnodekill--all ...

ssh 指定ssh端口号

ssh 指定ssh端口号

 ssh-p8022higgs@192.168.43.1 ...

Message: dlopen failed for module ‘x’: file not found

Message: dlopen failed for module ‘x’: file not found

  这是未安装bochs-x的缘故解决方案:sudoapt-getinstallbochs以后接着安装bochs-x.sudoapt-getinstallbochs-x2.bx_dbg_read_linear:physicalmemoryreaderror(phy=0x00000...

安装 bochs

安装 bochs

 sudoapt-getinstallbochs以后接着安装bochs-x ...

Windows 搭建 Linux kernal0.11 环境

Windows 搭建 Linux kernal0.11 环境

 下载:http://www.oldlinux.org/Linux.old/bochs/ 安装bochs运行界面:...