This file contains 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 buildReader() { | |
var Record = function () { | |
this.transforms = undefined | |
}; | |
Record.geometry_msgs_TransformStamped = function() { | |
this.header = undefined; | |
this.child_frame_id = undefined; | |
this.transform = undefined | |
}; |
This file contains 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 buildReader() { | |
var Record = function (reader) { | |
var length_transforms = reader.uint32(); | |
this.transforms = new Array(length_transforms) | |
for (var i = 0; i < length_transforms; i++) { | |
this.transforms[i] = new Record.geometry_msgs_TransformStamped(reader); | |
} | |
}; | |
Record.geometry_msgs_TransformStamped = function(reader) { |
This file contains 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
//Tic-tac-toe playing AI. Exhaustive tree-search. WTFPL | |
//Matthew Steel 2009, www.www.repsilat.com | |
#include <stdio.h> | |
char gridChar(int i) { | |
switch(i) { | |
case -1: | |
return 'X'; | |
case 0: |
This file contains 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> | |
#include <tuple> | |
/* | |
* Roughly equivalent to the following two lines of Haskell: | |
* zip (x:xs) (y:ys) = (x,y) : zip xs ys | |
* zip xs ys = [] | |
*/ |
This file contains 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 <tuple> | |
#include <iostream> | |
#include <type_traits> | |
#include <memory> | |
#include <stdexcept> | |
#include <algorithm> | |
/* | |
* Before beginning: This is so stupid. Turning homogeneous tuples into STL- | |
* compatible containers using inheritance... No part of this is a good idea. |
This file contains 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 <tuple> | |
#include <iostream> | |
#include <stdexcept> | |
using namespace std; | |
/* | |
* "A partially specialized non-type argument expression shall not involve a | |
* template parameter of the partial specialization except when the argument | |
* expression is a simple identifier." |