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) 2020 Nicholas Gill GPLv3 | |
#include <cstdio> | |
#include <cstdint> | |
#include <cstring> | |
template <typename CharT, unsigned N> | |
class KMPStream | |
{ | |
public: | |
bool begin(const CharT* search, size_t size) |
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 <cstdint> | |
#include <cstdio> | |
#include <stdexcept> | |
#include <vector> | |
// C compatible external api | |
extern "C" { | |
// Input / Output value types | |
enum { |
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 <cmath> | |
#include <vector> | |
#include <iostream> | |
struct point_2 | |
{ | |
double x; | |
double y; | |
point_2 operator-(const point_2& p) const { |
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
module thread_die() { | |
cylinder(h=6, r=20/2); | |
} | |
$fn=32; | |
difference () { | |
cylinder(h=12, r=24/2); | |
translate([0,0,(12-6)+0.1]) thread_die(); | |
translate([0,0,-0.5]) cylinder(h=12+1, r=12/2); | |
translate([5,0,12/2 + 6/2]) rotate([0,90,0]) cylinder(h=11, r=4/2); |
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
/* | |
* main.cpp | |
* | |
* Created on: 22/03/2012 | |
* Author: mythagel | |
*/ | |
#include <cstdio> | |
#include <cstdlib> | |
#include <sys/types.h> | |
#include <sys/stat.h> |
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
/* | |
g++ -std=c++11 boost_units.cpp -o boost_units | |
*/ | |
#include <iostream> | |
#include <boost/units/systems/si/prefixes.hpp> | |
#include <boost/units/systems/si/length.hpp> | |
#include <boost/units/systems/si/io.hpp> | |
#include <boost/units/systems/si/velocity.hpp> |
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 <cstdint> | |
#include <cstring> | |
int main() | |
{ | |
uint64_t hi; | |
uint64_t lo; | |
if(hi & 0x8000000000000000ULL) |
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 <stdio.h> | |
#include <errno.h> | |
int file_num; | |
int file_num_max; | |
char **files; | |
extern int errno; | |
%} | |
%pointer |
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
; CMake list file grammar | |
newline = CR / LF / CRLF | |
whitespace = SP / HTAB / newline | |
comment = "#" *CHAR newline | |
wspc = whitespace / comment | |
identifier = ( ALPHA / "_" ) 1*( ALPHA / DIGIT / "_" ) | |
escape-char = "\\" ( "\\" / DQUOTE / SP / "#" / "(" / ")" / "$" / "@" / "^" / ";" / "t" / "n" / "r" / "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
/* | |
* v8_wrap_class.cpp | |
* | |
* Created on: 14/01/2013 | |
* Author: nicholas | |
* License: public domain | |
*/ | |
/* CMakeLists.txt | |
project(v8_wrap_class) |
NewerOlder