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
static const uint16_t crctable[256] = | |
{ | |
0x0000, 0x1189, 0x2312, 0x329B, 0x4624, 0x57AD, 0x6536, 0x74BF, | |
0x8C48, 0x9DC1, 0xAF5A, 0xBED3, 0xCA6C, 0xDBE5, 0xE97E, 0xF8F7, | |
0x0919, 0x1890, 0x2A0B, 0x3B82, 0x4F3D, 0x5EB4, 0x6C2F, 0x7DA6, | |
0x8551, 0x94D8, 0xA643, 0xB7CA, 0xC375, 0xD2FC, 0xE067, 0xF1EE, | |
0x1232, 0x03BB, 0x3120, 0x20A9, 0x5416, 0x459F, 0x7704, 0x668D, | |
0x9E7A, 0x8FF3, 0xBD68, 0xACE1, 0xD85E, 0xC9D7, 0xFB4C, 0xEAC5, | |
0x1B2B, 0x0AA2, 0x3839, 0x29B0, 0x5D0F, 0x4C86, 0x7E1D, 0x6F94, | |
0x9763, 0x86EA, 0xB471, 0xA5F8, 0xD147, 0xC0CE, 0xF255, 0xE3DC, |
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> | |
template<typename T> | |
class Singleton | |
{ | |
public: | |
static T& getInstance() { | |
static T t; | |
return t; | |
} |
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 <string> | |
#include <iostream> | |
// In client side | |
using CallbackFnPtr = void (*)(const std::string, void *); | |
CallbackFnPtr c_fn; | |
void* c_fn_context; | |
void c_run_callback() |
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
{ | |
// Use IntelliSense to learn about possible attributes. | |
// Hover to view descriptions of existing attributes. | |
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"name": "g++ - Build and debug active file", | |
"type": "cppdbg", | |
"request": "launch", |
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
function OUTPUT=SpinCalc(CONVERSION,INPUT,tol,ichk) | |
%Function for the conversion of one rotation input type to desired output. | |
%Supported conversion input/output types are as follows: | |
% 1: Q Rotation Quaternions | |
% 2: EV Euler Vector and rotation angle (degrees) | |
% 3: DCM Orthogonal DCM Rotation Matrix | |
% 4: EA### Euler angles (12 possible sets) (degrees) | |
% | |
%Author: John Fuller | |
%National Institute of Aerospace |
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
var net = require('net'); | |
// creates the server | |
var server = net.createServer(); | |
//emitted when server closes ...not emitted until all connections closes. | |
server.on('close',function(){ | |
console.log('Server closed !'); | |
}); |
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
// A simple quickref for Eigen. Add anything that's missing. | |
// Main author: Keir Mierle | |
#include <Eigen/Dense> | |
Matrix<double, 3, 3> A; // Fixed rows and cols. Same as Matrix3d. | |
Matrix<double, 3, Dynamic> B; // Fixed rows, dynamic cols. | |
Matrix<double, Dynamic, Dynamic> C; // Full dynamic. Same as MatrixXd. | |
Matrix<double, 3, 3, RowMajor> E; // Row major; default is column-major. | |
Matrix3f P, Q, R; // 3x3 float matrix. |
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
// Stolen from http://opencvexamples.blogspot.jp/2013/09/creating-matrix-in-different-ways.html?m=1 | |
#include "opencv2/core/core.hpp" | |
#include "opencv2/highgui/highgui.hpp" | |
#include "opencv2/imgproc/imgproc.hpp" | |
#include "iostream" | |
using namespace cv; | |
using namespace std; | |
int main( ) |
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 <vector> | |
using namespace std; | |
class Base{ | |
public: | |
virtual int n(){return n_;} | |
virtual ~Base(){} | |
int n_=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
https://github.com/Microsoft/MIEngine/blob/master/src/AndroidDebugLauncher/Microsoft.Android.natvis | |
<?xml version="1.0" encoding="utf-8"?> | |
<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010"> | |
<!-- gnu stl --> | |
<Type Name="std::initializer_list<*>"> | |
<DisplayString>{{ size={_M_len} }}</DisplayString> | |
<Expand> |
NewerOlder