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 crc8(arr) { | |
| var crc = 0; | |
| for(var i = 0; i < arr.length; i++) { | |
| crc ^= arr[i]; | |
| for(var j = 0; j < 8; j++) { | |
| if(crc & 0x80) { | |
| crc <<= 1; | |
| crc ^= 0x85; | |
| } else { | |
| crc <<= 1; |
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 "ofMain.h" | |
| double frac_table[101]; | |
| double frac(int n) { | |
| double v = 1; | |
| for(int i = 1; i <= n; i++) { | |
| v *= i; | |
| } | |
| return v; |
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 <functional> | |
| #include <tuple> | |
| #include <memory> | |
| namespace symbolic { | |
| template <typename T> | |
| using ref = std::shared_ptr<T>; | |
| template <typename type> | |
| struct value { |
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 <chrono> | |
| #include <string.h> | |
| namespace laziness { | |
| struct SimpleStopWatch { | |
| void start() { | |
| _start = std::chrono::high_resolution_clock::now(); | |
| } | |
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 "ofMain.h" | |
| class LinearTransform { | |
| public: | |
| LinearTransform() { | |
| } | |
| LinearTransform(float u11, float u12, float u13, | |
| float u21, float u22, float u23, |
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 "ofTrueTypeFont.h" | |
| //-------------------------- | |
| #include <ft2build.h> | |
| #ifdef TARGET_LINUX | |
| #include <fontconfig/fontconfig.h> | |
| #endif | |
| #include FT_FREETYPE_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
| #include <iostream> | |
| #include <string> | |
| #include <vector> | |
| struct custom_vectroid { | |
| using data_type = std::vector<std::string>; | |
| data_type data; | |
| using iterator = data_type::iterator; | |
| using const_iterator = data_type::const_iterator; |
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 <functional> | |
| #include <tuple> | |
| namespace bbb { | |
| template <typename T> | |
| struct function_info : public function_info<decltype(&T::operator())> {}; | |
| template <typename class_type, typename ret, typename ... arguments> | |
| struct function_info<ret(class_type::*)(arguments ...) 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
| #include <iostream> | |
| #include <type_traits> | |
| template<typename T, typename U> | |
| struct lambda_check { | |
| static constexpr bool value = !std::is_same<T, U>::value; | |
| }; | |
| template <typename fun1, typename fun2> | |
| constexpr bool is_lambda_(fun1, fun2) { |
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 <type_traits> | |
| #include <iterator> | |
| namespace bbb { | |
| template <typename container> | |
| struct iteratable_class_traits { | |
| #pragma mark iterator | |
| struct forward_iterator_check { |