![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
cpp
fly1ng_duck
这个作者很懒,什么都没留下…
展开
-
阅读<From mathematics to generic programing>的一些启发
阅读的一些启发原创 2022-06-26 16:11:41 · 270 阅读 · 0 评论 -
Cpp List Initialization
委员会们关心的是对象构造的精确性,所以增加了个list initializationCPP reference 的文档编写者,在他们脑袋里面是有picture的,但是在我们读者看来就是,wtf? 总的来说就是那种懂的都懂的解释为什么要出现这种都行,第一cpp 11 之前是允许narrow conversion的, 为了让我们的对象被精确的构造,从而实现zero abstraction 的伟大目标,加了这个list initialization ,第一种就是为了区分是不是aggregate t..原创 2021-08-01 00:31:17 · 106 阅读 · 0 评论 -
std::packaged_task的使用
std::packaged_task这个函数是要跟std::future联合使用的。在异步编程中得到未来值template<typename FunctionType>void foo(FunctionType f){// return type is the type of the result when invoking functiontype with no paramsusing return_type = typename std::result_of<Funct原创 2021-05-16 14:04:39 · 155 阅读 · 0 评论 -
gccintro
1.’. The function sqrt is not defined in the program or the default library ‘libc.a’, and the compiler does not link to the file ‘libm.a’ unless it is explicitly selected.My Word: gcc won't link the...原创 2018-09-11 15:23:28 · 104 阅读 · 0 评论 -
C++函数模板
int &arr[10] //error 将arr声明成了引用的数组int (&arr)10 //right,ref a 整形10维数组template<typename T, unsigned size>constexpr unsigned getSize(const T(&)[size]){ return size;}int m...原创 2018-07-19 18:14:48 · 90 阅读 · 0 评论 -
c++ explicit
struct A{ A(int) { } // converting constructor A(int, int) { } // converting constructor (C++11) operator bool() const { return true; }}; struct B{ explicit B(int) { } ex...原创 2018-07-04 10:17:14 · 192 阅读 · 0 评论 -
Ros NameSpace
Ros NameSpace is where parameters is passing through and topics, services ,and other ros stuffsthe rule can be check out in these websitehttp://wiki.ros.org/Nodesand the RAII resource acquisitation I...原创 2018-05-25 10:31:42 · 299 阅读 · 0 评论 -
homogeneous coordinate
change the coordinate原创 2018-05-09 20:31:07 · 347 阅读 · 0 评论 -
cpp practice
In other words, a unary predicate is called like a function. The requirement of "callable" is met by a pointer to a function, but also by an object (or a reference to an object) of a type that has the...原创 2018-04-19 21:34:08 · 114 阅读 · 0 评论 -
A tour of c++
I try to find out what i miss in c++When we don’t hav e an object to point to or if we need to represent the notion of ‘‘no object available’’ (e.g., for an end of a list), we give the pointer the v...原创 2018-09-08 19:58:33 · 1004 阅读 · 0 评论 -
qt 搭建ros
首先就是改文件gedit ~/.local/share/applications/DigiaQtOpenSource-qtcreator.desktop如果打开空白就自己找 一般在这个子目录applications下面然后一定是得用qt这个desktop +gcc 的kit打开qt的默认...原创 2018-09-13 20:56:51 · 187 阅读 · 0 评论 -
opcv source code installation
cmake -D CMAKE_BUILD_TYPE=RELEASE \ -D CMAKE_INSTALL_PREFIX=/usr/local \ -D INSTALL_C_EXAMPLES=ON \ -D INSTALL_PYTHON_EXAMPLES=ON \ -D WITH_TBB=ON \ ...原创 2018-09-21 15:03:32 · 130 阅读 · 0 评论 -
避障算法实现日志
碰到一个棘手的bug ,现在回过头来看本来窗口的大小是固定的没事,加入变化的因素过后却产生了不能检测障碍物的问题。 可见之前的算法是没错的,但是我都是用的判断,其中有一个判断是 我在之前的判断中有 给scan_msg_->ranges[i-1] 赋值 window_length但是!!scan_msg->ranges[i-1] 的类型 与 window_length ...原创 2018-11-05 10:37:08 · 3334 阅读 · 0 评论 -
qt include msg file in ros
还需要在project 那里点 rebuild 才可以#include <msg.h> file原创 2018-11-28 10:37:48 · 192 阅读 · 0 评论 -
重看 cartographer ros
看的是0.1.0的版本std::unique_ptr<nav_msgs::OccupancyGrid>MapBuilderBridge::BuildOccupancyGrid() { CHECK(options_.map_builder_options.use_trajectory_builder_2d()) << "Publishing Occupa...原创 2018-11-28 11:06:02 · 456 阅读 · 0 评论 -
visual studio 配置 Eigen失败,幽灵般的错误
一直知道选all configuration 明明include了还是失败了原来是platform 没选对visualstudio all configuration all platform damn it!原创 2018-12-11 13:07:17 · 739 阅读 · 0 评论 -
rviz plugin tutorials 吐槽
rviz plugin 真难debugThis class is not instantiated by pluginlib::ClassLoader, so the constructor has no restrictions.DriveWidget( QWidget* parent = 0 );这个classloader 找半天都找不到Override size...原创 2019-04-23 16:05:32 · 582 阅读 · 0 评论 -
Constructor initializer list
https://www.youtube.com/watch?v=1nfuYMXjZsA from this url let's demonstrate something that really matters class Entity{public: Entity() { std::cout << "wtf" << std::endl...原创 2018-04-23 17:06:22 · 227 阅读 · 0 评论 -
gmapping 代码
// Versions of advertise() ////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** * \brief Advertise a topic, simple version ...原创 2018-04-23 15:27:55 · 583 阅读 · 0 评论 -
KMP算法
this is the pattern table.this is the fucking algorithm https://www.youtube.com/watch?v=y2b94AxPlF8 that's the good explaination原创 2018-04-13 11:44:37 · 86 阅读 · 0 评论 -
复习一哈C++ ,其实根本没学明白
https://blog.csdn.net/tzheng2008/article/details/7257446 位操作 c++reference不知道怎么搜 沃日看的什么gamedevelopment cookbook 源码 gayhub https://github.com/hablocher/cppgamedevcookbookpretty cool huh? both you guys a...原创 2018-03-30 14:45:38 · 161 阅读 · 0 评论 -
C++based on Beethoven 'Pathique by Arthur Rubinstein
Previously I wrote about c++ which was based on Chopin' Nocturne.#define WIN32_LEAN_AND_MEAN#include <windows.h> // Include all the windows headers#include <windowsx.h> // Include usefu...原创 2018-03-30 15:22:48 · 112 阅读 · 0 评论 -
代码流程笔记
首先是slam初始化。管理程序初始化, 设定catkinroute激光信息初始化,SWin_XYRange初始化srv.almatch和packdata小车的信息 tool_tfm.renew_data(tfpub_odomdta, param_lsrlocation); tf 更新里程计启动里程计接收器 sin_chart_init(); 图标?这是什么看构造函数,boost function ...原创 2018-04-07 19:42:57 · 258 阅读 · 0 评论 -
Boost多线程的学习
#include <boost/thread.hpp> #include <iostream> void wait(int seconds) { boost::this_thread::sleep(boost::posix_time::seconds(seconds)); } void thread() { for (int i = 0; i &...原创 2018-04-08 11:10:19 · 186 阅读 · 0 评论 -
Unreal配C++岂不美哉
#include "MyFirstClass.h"// Sets default valuesAMyFirstClass::AMyFirstClass(){ // Set this actor to call Tick() every frame. You can turn this off to improve performance if you don't need it. Primar...原创 2018-03-31 23:46:08 · 765 阅读 · 0 评论 -
C++ Unreal 2
Setting defaults in my constructorSetting default values for properties in a constructor works the same as your typical C++ class. Below are two examples of setting default values in a constructor and...原创 2018-04-01 00:19:00 · 237 阅读 · 0 评论 -
刷题呗
Previously ,我在实验室 打的没保存下来,刚才那道题应该是寻找5,因为2是多出来的,相当于5的倍数。。不过 就算是我自己 ,过了许多天之后也看不懂我这上面写的究竟是什么东西。现在看这个merge two sorted Array 的问题首先,是这个array ,vector是cpp一个神器,但是,我还是不知道如何操作而且还要做一个排序,确实对于没什么经验的我来说挺难的,虽然上面标注的是e...原创 2018-04-01 20:19:22 · 313 阅读 · 0 评论 -
c++ Sprites
probably all the assets in the game will be sprites,from the UI to the main characters.Sprites 就是中文的子画面的意思 看下代码#pragma once#if !defined(__BACKBUFFER_H__)#define __BACKBUFFER_H__// Library Includ...原创 2018-04-01 16:47:50 · 393 阅读 · 0 评论 -
清晨醒脑C++
怎么使用string来着?https://blog.csdn.net/liuchuo/article/details/54599840 substr 用法字符串转换为整数的时候记得使用基数 base = 10 * base + (str[i++] - '0');这种循环很常见也是最重要的,其他的只是为了防止其他状况的设计罢了又听到了Kempff的Goldburg variations ,...原创 2018-04-02 10:57:24 · 139 阅读 · 0 评论 -
一个菜鸡的c++旅程
这道是指针题,又来练功了二话不说想了一会 还是看答案吧注意人家的双循环写法 和我的脑残XJB写法*** 本参考程序来自九章算法,由 @刘同学 提供。版权所有,转发请注明出处。* - 九章算法致力于帮助更多中国人找到好的工作,教师团队均来自硅谷和国内的一线大公司在职工程师。* - 现有的面试培训课程包括:九章算法班,系统设计班,算法强化班,Java入门与基础算法班,Android 项目实战班...原创 2018-04-02 16:16:41 · 174 阅读 · 0 评论 -
Great tutorial from github
it 's about position control of the turtlesim the source code page is fromhttps://github.com/utari/UTARI_ROSTutorials/wiki/TurtlesimPositionController-TutorialDesired LocationThis will be a new topic ...原创 2018-04-15 16:19:35 · 153 阅读 · 0 评论 -
my first launch file
<launch> <node pkg="turtlesim" type="turtle_teleop_key12312" name="turtlesim_teleop_keyboard" output="screen"> <remap from="turtle1/cmd_vel" to="/wtf_CmdVel"原创 2018-04-15 18:23:40 · 145 阅读 · 0 评论 -
一个恶心的错误
class Solution {public: int strStr(string haystack, string needle) { int m=haystack.length(); int n=needle.length(); if(!n) return 0; for (int i=0;i<m-n+1;i++)...原创 2018-04-03 09:43:23 · 134 阅读 · 0 评论 -
多线程3
昨天忘记贴这个帖子的链接了点击打开链接在下面的例子中,我们创建一个键,并将它和某个数据相关联。我们要定义一个函数createWindow,这个函数定义一个图形窗口(数据类型为Fl_Window *,这是图形界面开发工具FLTK中的数据类型)。由于各个线程都会调用这个函数,所以我们使用线程数据。/* 声明一个键*/pthread_key_t myWinKey;/* 函数 createWindow...原创 2018-04-03 10:50:11 · 126 阅读 · 0 评论 -
boost库管理多线程的函数
boost::recursive_mutex http://www.169it.com/article/6167267338722791624.htmlhttps://www.boost.org/doc/libs/1_31_0/libs/thread/doc/recursive_mutex.htmlhttps://www.jianshu.com/p/0b2e360243f4https://ke.q...原创 2018-04-04 19:12:01 · 139 阅读 · 0 评论 -
算法的一些技巧
比如说 字母Boolean问题可以vector<int>vector<int> wtf(26,0)for (int i =0 ;i<s.size();i++)wtf[s[i]-'a']++;原创 2018-04-12 18:46:08 · 151 阅读 · 0 评论 -
unsolved problem
class Solution {public: bool repeatedSubstringPattern(string s) { int n =s.size(); int i=1; while(s[0]!=s[i]&&i<n) i++; int sum =i; if(...原创 2018-04-13 00:13:05 · 159 阅读 · 0 评论 -
还是第一喜欢的C++
妈的,没想到上一篇就那么点新内容 ,我还把整段代码贴上去了。。BOOL CALLBACK AboutDlgProc(HWND hDlg, UINT msg, WPARAM wparam, LPARAM lparam){ switch (msg) { case WM_INITDIALOG: break; case WM_COMMAND: switch (LOWORD(wparam)...原创 2018-03-30 15:38:48 · 140 阅读 · 0 评论