2021-9-1-大二上
指定删除向量里的某一位
playerHandHeap.erase(playerHandHeap.begin());//这样就是删除第0位
下面这个是错的,不能直接传入int
playerHandHeap.erase(1);
回调函数(callback)是什么?
你到一个商店买东西,刚好你要的东西没有货,于是你在店员那里留下了你的电话,过了几天店里有货了,店员就打了你的电话,然后你接到电话后就到店里去取了货。在这个例子里,你的电话号码就叫回调函数,你把电话留给店员就叫登记回调函数,店里后来有货了叫做触发了回调关联的事件,店员给你打电话叫做调用回调函数,你到店里去取货叫做响应回调事件。回答完毕。
https://www.zhihu.com/question/19801131/answer/13005983
ubuntu装在u盘并且多种主板适配,走UEFI启动
我的笔记本开了RST用不了就算了先,然后台式机也不识别很烦
后面就看到用VM做的
https://www.luogu.com.cn/blog/GGAutomaton/portable-ubuntu-bootable-in-UEFI-and-BIOS
很好
UEFI还不给选几次
我就克隆了旧的机子
ubuntu代理Qv2ray
见onedrive,复制appimage去桌面,复制qv2ray文件夹去~/.config/里
记得chmod +X 给appimage和qv2ray里的vcore里的vray可执行文件
ssh密钥登录配置
心态!!
首先在 客户端!客户端!客户端!客户端!
输入:
ssh-keygen -t rsa
生成密钥
在服务端上的~/(用户文件夹)创建.ssh文件夹,设置权限为700
然后创建一个authorized_keys的 文件! 文件 ! 文件 !,设置权限为600(千万不能错,600!)
然后把公钥(带.pub)的 内容 内容 内容 内容!
复制到authorized_keys文件内保存(而不是把文件复制过去)
mkdir ~/.ssh
nano ~/.ssh/authorized_keys
chmod 700 ~/.ssh/
chmod 600 ~/.ssh/authorized_keys
以下或许是必须:
1.重启ssh服务
service sshd restart
2.在客户端的.ssh的文件夹内配置config文件
Host 192.168.1.131
HostName 192.168.1.131
IdentityFile C:/Users/xtx/.ssh/id_rsa
PreferredAuthentications publickey
User xtx
3.开端口
4.查看客户端日志
ssh -v
5.查看服务端日志
sudo cat /var/log/auth.log
ssh免密码登陆设置时Authentication refused: bad ownership or modes错误解决方法
https://www.bo56.com/ssh免密码登陆设置时authentication-refused-bad-ownership-or-modes错误解决方法/
就是权限错了
brew crak 安装,cark not found
根本不需要这玩意
直接把brew cark install改成 brew install即可
CMake 3.10.2 or higher is required. You are running version 3.5.2
https://askubuntu.com/questions/829310/how-to-upgrade-cmake-in-ubuntu
记得装了ros别卸载cmake
Ros 安转404找不到资源
果断换个中科大的源就好
Could not find a configuration file for package "ignition-common3-graphics" that exactly matches requested version "3.14.0".
18.04
apt install ignition-rendering3
20.04
sudo apt install libignition-rendering3
Could NOT find Protobuf (missing: Protobuf_INCLUDE_DIR)
make clean就好
CMake Error at CMakeLists.txt:34 (find_program): Could not find px4 using the following names: 空
gdutelc@gdutelc:~/PX4_Firmware$ make px4_sitl_default gazebo
-- PX4 version: v1.11.0-beta1
-- PX4 config file: /home/gdutelc/PX4_Firmware/boards/px4/sitl/default.cmake
-- PX4 config: px4_sitl_default
-- PX4 platform: posix
-- PX4 lockstep: enabled
-- cmake build type: RelWithDebInfo
-- The CXX compiler identification is GNU 9.3.0
-- The C compiler identification is GNU 9.3.0
-- The ASM compiler identification is GNU
-- Found assembler: /usr/bin/cc
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Building for code coverage
-- Found PythonInterp: /usr/bin/python3 (found suitable version "3.8.10", minimum required is "3")
-- build type is RelWithDebInfo
-- PX4 ECL: Very lightweight Estimation & Control Library v1.9.0-rc1-255-g47624a0
-- Configuring done
-- Generating done
-- Build files have been written to: /home/gdutelc/PX4_Firmware/build/px4_sitl_default
[0/740] git submodule src/drivers/gps/devices
[2/740] git submodule src/lib/ecl
[8/740] git submodule mavlink/include/mavlink/v2.0
[9/740] git submodule Tools/sitl_gazebo
[18/740] Performing configure step for 'sitl_gazebo'
-- install-prefix: /usr/local
-- The C compiler identification is GNU 9.3.0
-- The CXX compiler identification is GNU 9.3.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test COMPILER_SUPPORTS_CXX17
-- Performing Test COMPILER_SUPPORTS_CXX17 - Success
-- Performing Test COMPILER_SUPPORTS_CXX14
-- Performing Test COMPILER_SUPPORTS_CXX14 - Success
-- Performing Test COMPILER_SUPPORTS_CXX11
-- Performing Test COMPILER_SUPPORTS_CXX11 - Success
-- Performing Test COMPILER_SUPPORTS_CXX0X
-- Performing Test COMPILER_SUPPORTS_CXX0X - Success
-- Using C++17 compiler
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake (found suitable version "1.71.0", minimum required is "1.58") found components: system thread filesystem
CMake Warning (dev) at /opt/cmake-3.22.0-linux-x86_64/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
The package name passed to `find_package_handle_standard_args` (PkgConfig)
does not match the name of the calling package (gazebo). This can lead to
problems in calling code that expects `find_package` result variables
(e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
/opt/cmake-3.22.0-linux-x86_64/share/cmake-3.22/Modules/FindPkgConfig.cmake:99 (find_package_handle_standard_args)
/usr/lib/x86_64-linux-gnu/cmake/gazebo/gazebo-config.cmake:72 (include)
CMakeLists.txt:32 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1")
-- Checking for module 'bullet>=2.82'
-- Found bullet, version 2.88
-- Found ccd: /usr/include (found suitable version "2.0", minimum required is "2.0")
-- Found fcl: /usr/include (found suitable version "0.5.0", minimum required is "0.3.2")
-- Found assimp: /usr/include (found version "5.0.0")
-- Found DART: /usr/include (Required is at least version "6.6") found components: dart
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake (found suitable version "1.71.0", minimum required is "1.40.0") found components: thread system filesystem program_options regex iostreams date_time
-- Found Protobuf: /usr/lib/x86_64-linux-gnu/libprotobuf.so;-lpthread (found version "3.6.1")
-- Looking for ignition-math6 -- found version 6.9.2
-- Searching for dependencies of ignition-math6
-- Looking for OGRE...
-- OGRE_PREFIX_WATCH changed.
-- Checking for module 'OGRE'
-- Found OGRE, version 1.9.0
-- Found Ogre Ghadamon (1.9.0)
-- Found OGRE: optimized;/usr/lib/x86_64-linux-gnu/libOgreMain.so;debug;/usr/lib/x86_64-linux-gnu/libOgreMain.so
-- Looking for OGRE_Paging...
-- Found OGRE_Paging: optimized;/usr/lib/x86_64-linux-gnu/libOgrePaging.so;debug;/usr/lib/x86_64-linux-gnu/libOgrePaging.so
-- Looking for OGRE_Terrain...
-- Found OGRE_Terrain: optimized;/usr/lib/x86_64-linux-gnu/libOgreTerrain.so;debug;/usr/lib/x86_64-linux-gnu/libOgreTerrain.so
-- Looking for OGRE_Property...
-- Found OGRE_Property: optimized;/usr/lib/x86_64-linux-gnu/libOgreProperty.so;debug;/usr/lib/x86_64-linux-gnu/libOgreProperty.so
-- Looking for OGRE_RTShaderSystem...
-- Found OGRE_RTShaderSystem: optimized;/usr/lib/x86_64-linux-gnu/libOgreRTShaderSystem.so;debug;/usr/lib/x86_64-linux-gnu/libOgreRTShaderSystem.so
-- Looking for OGRE_Volume...
-- Found OGRE_Volume: optimized;/usr/lib/x86_64-linux-gnu/libOgreVolume.so;debug;/usr/lib/x86_64-linux-gnu/libOgreVolume.so
-- Looking for OGRE_Overlay...
-- Found OGRE_Overlay: optimized;/usr/lib/x86_64-linux-gnu/libOgreOverlay.so;debug;/usr/lib/x86_64-linux-gnu/libOgreOverlay.so
-- Looking for ignition-math6 -- found version 6.9.2
-- Looking for ignition-transport8 -- found version 8.2.1
-- Searching for dependencies of ignition-transport8
-- Found Protobuf: /usr/lib/x86_64-linux-gnu/libprotobuf.so;-lpthread (found suitable version "3.6.1", minimum required is "3")
-- Config-file not installed for ZeroMQ -- checking for pkg-config
-- Checking for module 'libzmq >= 4'
-- Found libzmq , version 4.3.2
-- Found ZeroMQ: TRUE (Required is at least version "4")
-- Checking for module 'uuid'
-- Found uuid, version 2.34.0
-- Found UUID: TRUE
-- Looking for ignition-msgs5 -- found version 5.8.1
-- Searching for dependencies of ignition-msgs5
-- Looking for ignition-math6 -- found version 6.9.2
-- Checking for module 'tinyxml2'
-- Found tinyxml2, version 6.2.0
-- Looking for ignition-msgs5 -- found version 5.8.1
-- Looking for ignition-common3 -- found version 3.14.0
-- Searching for dependencies of ignition-common3
-- Looking for dlfcn.h - found
-- Looking for libdl - found
-- Found DL: TRUE
-- Searching for <ignition-common3> component [graphics]
-- Looking for ignition-common3-graphics -- found version 3.14.0
-- Searching for dependencies of ignition-common3-graphics
-- Looking for ignition-math6 -- found version 6.9.2
-- Looking for ignition-fuel_tools4 -- found version 4.4.0
-- Searching for dependencies of ignition-fuel_tools4
-- Found CURL: /usr/lib/x86_64-linux-gnu/libcurl.so (found version "7.68.0")
-- Checking for module 'jsoncpp'
-- Found jsoncpp, version 1.7.4
-- Found JSONCPP: TRUE
-- Checking for module 'yaml-0.1'
-- Found yaml-0.1, version 0.2.2
-- Found YAML: TRUE
-- Checking for module 'libzip'
-- Found libzip, version 1.5.1
-- Found ZIP: TRUE
-- Looking for ignition-common3 -- found version 3.14.0
-- Looking for ignition-math6 -- found version 6.9.2
-- Looking for ignition-msgs5 -- found version 5.8.1
CMake Error at CMakeLists.txt:34 (find_program):
Could not find px4 using the following names:
-- Configuring incomplete, errors occurred!
See also "/home/gdutelc/PX4_Firmware/build/px4_sitl_default/build_gazebo/CMakeFiles/CMakeOutput.log".
See also "/home/gdutelc/PX4_Firmware/build/px4_sitl_default/build_gazebo/CMakeFiles/CMakeError.log".
[175/740] Building CXX object msg/CMakeFiles/uorb_msgs.dir/topics_sources/ulog_stream.cpp.o
FAILED: external/Stamp/sitl_gazebo/sitl_gazebo-configure /home/gdutelc/PX4_Firmware/build/px4_sitl_default/external/Stamp/sitl_gazebo/sitl_gazebo-configure
cd /home/gdutelc/PX4_Firmware/build/px4_sitl_default/build_gazebo && /opt/cmake-3.22.0-linux-x86_64/bin/cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DSEND_VISION_ESTIMATION_DATA=ON -GNinja /home/gdutelc/PX4_Firmware/Tools/sitl_gazebo && /opt/cmake-3.22.0-linux-x86_64/bin/cmake -E touch /home/gdutelc/PX4_Firmware/build/px4_sitl_default/external/Stamp/sitl_gazebo/sitl_gazebo-configure
[189/740] Building CXX object msg/CMakeFiles/uorb_msgs.dir/topics_sources/ulog_stream.cpp.o
ninja: build stopped: subcommand failed.
make: *** [Makefile:200:px4_sitl_default] 错误 1
https://github.com/robin-shaun/XTDrone/issues/18
其实就是降级一下cmake就好
安装catkin-tools,在catlin-build已经安装
sudo apt-get install python-catkin-tools后发现依赖错误
使用
sudo apt-get install python3-catkin-tools
python3!
rclone
服务器之间拷贝应该是全自动的
显示详细信息
-vv
--drive-server-side-across-configs 强制服务器间复制
rclone copy -vv --drive-server-side-across-configs xtxIndia:123 xtxArl:
pymavlink安装失败
https://github.com/ArduPilot/pymavlink看官方
(确保python是python3)
sudo python -m pip install --upgrade future lxml
然后再
pip install --user pymavlink
docker aqtinstall failed to connect
重启就好
但是应该源也有点小问题,但是我不知道安装后在哪里改
docker里映射的文件permission denine
把这个映射的文件夹改成
chmod -R 777
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】博客园社区专享云产品让利特惠,阿里云新客6.5折上折
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步