摘要: #include // cout #include // copy_if, distance #include // vector using namespace std; int main () { vector foo = {25,15,5,-5,-15}; vector bar (foo.size()); // copy... 阅读全文
posted @ 2018-10-19 14:10 anobscureretreat 阅读(597) 评论(0) 推荐(0) 编辑
摘要: #include // cout #include // copy_backward #include // vector using namespace std; int main () { vector myvector; // set some values: for (int i=1; i::iterator it=m... 阅读全文
posted @ 2018-10-19 13:50 anobscureretreat 阅读(611) 评论(0) 推荐(0) 编辑
摘要: #include // cout #include // copy #include // vector using namespace std; int main () { int myints[]={10,20,30,40,50,60,70}; vector myvector (7); copy ( myints, myi... 阅读全文
posted @ 2018-10-19 11:29 anobscureretreat 阅读(2012) 评论(0) 推荐(0) 编辑
摘要: #include // cout #include // adjacent_find #include // vector using namespace std; bool myfunction (int i, int j) { return (i==j); } int main () { int myints[] = {5,5,20,30... 阅读全文
posted @ 2018-10-19 11:17 anobscureretreat 阅读(500) 评论(0) 推荐(0) 编辑
摘要: #include // cout #include // binary_search, sort #include // vector using namespace std; bool myfunction (int i,int j) { return (i v(myints,myints+9); // 1 2... 阅读全文
posted @ 2018-10-19 10:54 anobscureretreat 阅读(1017) 评论(0) 推荐(0) 编辑
摘要: #include // std::cout #include // std::any_of #include // std::array using namespace std; int main () { array foo = {0,1,-1,3,-3,5,-5}; if ( any_of(foo.begin(), foo.en... 阅读全文
posted @ 2018-10-19 10:30 anobscureretreat 阅读(1012) 评论(0) 推荐(0) 编辑
摘要: #include // std::cout #include // std::all_of #include // std::array using namespace std; int main () { array foo = {3,4,7,11,13,17,19,23}; if ( all_of(foo.begin(), fo... 阅读全文
posted @ 2018-10-19 10:27 anobscureretreat 阅读(437) 评论(0) 推荐(0) 编辑
摘要: http://releases.ubuntu.com/ 阅读全文
posted @ 2018-10-18 19:54 anobscureretreat 阅读(199) 评论(0) 推荐(0) 编辑
摘要: http://cdimage.ubuntu.com/ubuntukylin/releases/14.04/release/ 阅读全文
posted @ 2018-10-18 19:52 anobscureretreat 阅读(624) 评论(0) 推荐(0) 编辑
摘要: http://mirrors.aliyun.com/ubuntu-releases/16.04/ http://old-releases.ubuntu.com/releases/16.04.3/ 阅读全文
posted @ 2018-10-18 19:50 anobscureretreat 阅读(2168) 评论(0) 推荐(1) 编辑
摘要: 在某些情况下, vi/vim中的编辑会出现一些很不愉快的情况, 比如在vi/vim中输入方向键有时被转化为A B C D, 或者按个Enter键, 却被转为为其他字母, 恼人得很, 该怎么办呢? 方法如下(在命令行中执行): 1. echo "set nocp" >> ~/.vimrc (千万要注意 阅读全文
posted @ 2018-10-18 17:30 anobscureretreat 阅读(777) 评论(0) 推荐(0) 编辑
摘要: 关闭: 启动: 阅读全文
posted @ 2018-10-18 15:03 anobscureretreat 阅读(167) 评论(0) 推荐(0) 编辑
摘要: 安装ROS 配置Ubuntu要求允许接受restricted、universe和multiverse的软件源,可以根据下面的链接配置: https://help.ubuntu.com/community/Repositories/Ubuntu 打开 SoftWare & Updates 选择清华源更 阅读全文
posted @ 2018-10-18 11:41 anobscureretreat 阅读(354) 评论(0) 推荐(0) 编辑
摘要: 一.启动网卡 ubuntu server 安装后,ifconfig 发现只有一个lo 和一个p1p1 网卡, 先查看服务器网卡:ifconfig -a ,发现有lo ,p1p1,p2p1,p3p1,p4p1 要启动其他网卡,可以通过 ifconfig p2p1 up #启动p2p1网卡 二.配置网卡 阅读全文
posted @ 2018-10-17 12:30 anobscureretreat 阅读(833) 评论(0) 推荐(0) 编辑
摘要: 官网:https://developers.google.cn/web/updates/2017/04/headless-chrome 阅读全文
posted @ 2018-10-17 10:22 anobscureretreat 阅读(258) 评论(0) 推荐(0) 编辑
摘要: from selenium import webdriver import time fireFoxOptions = webdriver.FirefoxOptions() fireFoxOptions.set_headless() driver = webdriver.Firefox(firefox_options=fireFoxOptions) driver.get('https... 阅读全文
posted @ 2018-10-17 10:21 anobscureretreat 阅读(521) 评论(0) 推荐(0) 编辑
摘要: import java.util.HashMap; import java.util.Iterator; public class JavaHashMap { public static void main(String[] args) { //定义HashMap HashMap hm = new HashMap(); //添加字典 hm.put("username... 阅读全文
posted @ 2018-10-17 10:19 anobscureretreat 阅读(130) 评论(0) 推荐(0) 编辑
摘要: public class BubbleSort { public static void main(String[] args) { //排序数组 int[] intArray = {12, 11, 45, 6, 4, 8, 43, 40, 57, 3, 22}; System.out.println("排序前的数组:"); for (int i = 0; i < ... 阅读全文
posted @ 2018-10-17 10:18 anobscureretreat 阅读(99) 评论(0) 推荐(0) 编辑
摘要: 统计文件个数 ls -l |grep "^-"|wc -l 统计目录的个数 ls -l|grep "^d"|wc -l 统计文件个数(包括子文件夹) ls -lr |grep "^-"|wc -l 统计目录的个数(包括子文件夹) ls -lr|grep "^d"|wc -l 统计目录的所有js文件 ls -lr /home/han|grep js|wc -l 或 ls -l ... 阅读全文
posted @ 2018-10-17 10:15 anobscureretreat 阅读(180) 评论(0) 推荐(0) 编辑
摘要: 1、lsof -i:端口号 2、netstat -tunlp|grep 端口号 3. netstat –anp | grep 8080 netstat -anlp | grep 80 都可以查看指定端口被哪个进程占用的情况 所有端口: netstat -an 查看硬盘剩余空间 #df -h #df -H 查看目录占用空间 #du -hs 目录名 阅读全文
posted @ 2018-10-17 10:14 anobscureretreat 阅读(126) 评论(0) 推荐(0) 编辑
摘要: from collections import defaultdict d=defaultdict(set) s=[("001","A"),("001","C"),("002","B")] for k,v in s: d[k].add(v) print(sorted(d.items())) 阅读全文
posted @ 2018-10-17 10:13 anobscureretreat 阅读(958) 评论(0) 推荐(0) 编辑
摘要: Server部分: #!/usr/bin/env python import sys import os import rospy #from beginner.srv import * from beginner.srv import AddTwoInts def add_two_ints_client(x,y): rospy.wait_for_service('add_two_in... 阅读全文
posted @ 2018-10-17 10:11 anobscureretreat 阅读(799) 评论(0) 推荐(0) 编辑
摘要: 加入以下内容 阅读全文
posted @ 2018-10-17 10:09 anobscureretreat 阅读(205) 评论(0) 推荐(0) 编辑
摘要: def binary_search(lis, key): low = 0 high = len(lis) - 1 time = 0 while low lis[mid]: low = mid + 1 else: # 打印折半的次数 print("times: %s" % ... 阅读全文
posted @ 2018-10-17 00:50 anobscureretreat 阅读(202) 评论(0) 推荐(0) 编辑
摘要: 如果查找到123就会打印出123 的位置索引,否则显示false 阅读全文
posted @ 2018-10-17 00:43 anobscureretreat 阅读(850) 评论(0) 推荐(0) 编辑
摘要: 1.放到src下,改名字为rosbridge_server,编译catkin_make git clone https://github.com/RobotWebTools/rosbridge_suite.git 阅读全文
posted @ 2018-10-16 20:21 anobscureretreat 阅读(804) 评论(0) 推荐(0) 编辑
摘要: 放到src下,再次编译catkin_make 阅读全文
posted @ 2018-10-16 20:18 anobscureretreat 阅读(1331) 评论(0) 推荐(0) 编辑
摘要: 这里使用的是hitcm(张明明)的github地址,由于google官方的教程需要FQ下载一些文件,因此容易失败,经验证hitcm(张明明)对原文件进行了少许修改后可以成功安装,在他的修改中核心代码不变,只修改了编译文件。 We recommend using wstool and rosdep. For faster builds, we also recommend using Ni... 阅读全文
posted @ 2018-10-16 18:10 anobscureretreat 阅读(1338) 评论(0) 推荐(0) 编辑
摘要: # Build and install Cartographer. git clone https://github.com/hitcm/cartographer.git cd cartographer mkdir build cd build cmake .. -G Ninja ninja ninja test sudo ninja install 阅读全文
posted @ 2018-10-16 18:09 anobscureretreat 阅读(218) 评论(0) 推荐(0) 编辑
摘要: 一.第一种解决方法 cd /usr/share/ ,cmake tab补全,可以找到两个版本的cmake(cmake2.8和cmake3.5) 把/usr/share/cmake2.8/Modules/ 下的FindEigen3.cmake文件复制到cmake3.5对应目录下,即可解决 二.第二种解 阅读全文
posted @ 2018-10-16 16:12 anobscureretreat 阅读(3968) 评论(0) 推荐(0) 编辑
摘要: 1.下载 2.配置 3.编译安装 阅读全文
posted @ 2018-10-16 15:05 anobscureretreat 阅读(551) 评论(0) 推荐(0) 编辑
摘要: 1.下载 2.编译 阅读全文
posted @ 2018-10-16 15:00 anobscureretreat 阅读(1035) 评论(0) 推荐(0) 编辑
摘要: #没有数字 阅读全文
posted @ 2018-10-16 14:53 anobscureretreat 阅读(4790) 评论(0) 推荐(0) 编辑
摘要: 安装依赖: 安装ceres-solver 阅读全文
posted @ 2018-10-16 13:34 anobscureretreat 阅读(1528) 评论(0) 推荐(0) 编辑
摘要: 文档地址:http://www.ceres-solver.org/installation.html git地址:(需要FQ下载) 1.安装相关的依赖包 2.安装 阅读全文
posted @ 2018-10-16 12:07 anobscureretreat 阅读(1555) 评论(0) 推荐(1) 编辑
摘要: 原因 在sources.list文件中加入了非ubuntu官方源,所以认为加入源是不可信任的。 解决方法导入该源公钥。E084DAB9为PUBKEY后八位 gpg --keyserver keyserver.ubuntu.com --recv-keys E084DAB9 gpg --export - 阅读全文
posted @ 2018-10-15 19:23 anobscureretreat 阅读(587) 评论(0) 推荐(0) 编辑
摘要: 1.备份原来的源文件 2.修改源 保存! sudo apt-get update 阅读全文
posted @ 2018-10-15 19:10 anobscureretreat 阅读(396) 评论(0) 推荐(0) 编辑
摘要: sudo apt-get install libsdl-image1.2-dev 阅读全文
posted @ 2018-10-15 18:03 anobscureretreat 阅读(6491) 评论(0) 推荐(0) 编辑
摘要: sudo apt-get install libsdl-dev或 sudo apt-get install libsdl1.2-dev 阅读全文
posted @ 2018-10-15 17:58 anobscureretreat 阅读(4609) 评论(0) 推荐(0) 编辑
摘要: rosdep where-defined bullet sudo apt-get install libbullet-dev 阅读全文
posted @ 2018-10-15 17:36 anobscureretreat 阅读(1168) 评论(0) 推荐(0) 编辑