This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
(c) 2013 +++ Filip Stoklas, aka FipS, http://www.4FipS.com +++ | |
THIS CODE IS FREE - LICENSED UNDER THE MIT LICENSE | |
ARTICLE URL: http://forums.4fips.com/viewtopic.php?f=3&t=1075 | |
*/ | |
#include <array> | |
#include <cassert> | |
#include <stdarg.h> // va_list | |
#define WIN32_LEAN_AND_MEAN |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "lz4.h" | |
using namespace std; | |
int main() | |
{ | |
char szSource[] = "2013-01-07 00:00:04,0.98644,0.98676 2013-01-07 00:01:19,0.98654,0.98676 2013-01-07 00:01:38,0.98644,0.98696"; | |
int nInputSize = sizeof(szSource); | |
// compress szSource into pchCompressed |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <unordered_map> | |
#include <functional> | |
#include <vector> | |
// Base class | |
class Shape { | |
public: | |
virtual void draw() = 0; | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <atomic> | |
#include <chrono> | |
#include <deque> | |
#include <iostream> | |
#include <mutex> | |
#include <future> | |
#include <thread> | |
// shared stuff: | |
std::deque<std::packaged_task<void()>> tasks; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
typedef struct{ | |
time_t start_date; end_date; | |
std::string company_name; | |
std:.string responsibilities_and_achievements; | |
} PreviousJob; | |
typedef struct Candidate{ | |
std::vector<PersonalityTraits> traits; | |
std::vector<boost::any > skills; // use boost::any as type erasure. | |
std::vector<PreviousJob> previous_jobs; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <typeinfo> | |
struct Hello | |
{ | |
int helloworld() { return 0; } | |
}; | |
struct Generic {}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef RW_SPINLOCK_H | |
#define RW_SPINLOCK_H | |
#include<atomic> | |
#include<cassert> | |
#define SPIN_LOCK_UNLOCK 0 | |
#define SPIN_LOCK_WRITE_LOCK -1 | |
using std::memory_order_relaxed; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
BasedOnStyle: Google | |
AccessModifierOffset: -2 | |
ConstructorInitializerIndentWidth: 4 | |
AlignEscapedNewlinesLeft: false | |
AlignTrailingComments: true | |
AllowAllParametersOfDeclarationOnNextLine: false | |
AllowShortIfStatementsOnASingleLine: false | |
AllowShortLoopsOnASingleLine: false | |
AllowShortFunctionsOnASingleLine: None |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct CameraInfo{ | |
// whatever | |
}; | |
CameraInfo camera_info[5]; | |
void callbackImplementation(CameraInfo& cam_info, const sensor_msgs::Image::ConstPtr& msg) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE QtCreatorCodeStyle> | |
<!-- Written by QtCreator 4.2.1, 2017-05-04T11:28:11. --> | |
<qtcreator> | |
<data> | |
<variable>CodeStyleData</variable> | |
<valuemap type="QVariantMap"> | |
<value type="bool" key="AlignAssignments">true</value> | |
<value type="bool" key="AutoSpacesForTabs">false</value> | |
<value type="bool" key="BindStarToIdentifier">false</value> |
OlderNewer