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 <stdlib.h> | |
| int main(){char *d,*n=calloc(0x1000000,1);*n=48;for(;;){d=n;if(*d!=57)++*d;else{while(*d | |
| ==57)*(d++)=48;if(*d)++*d;else*d=49;}while(*++d);while(d--!=n)putchar(*d);putchar(13);}} |
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
| /* | |
| Copyright 2018, Sam R. Belliveau | |
| Permission is hereby granted, free of charge, to any person obtaining a copy | |
| of this software and associated documentation files (the "Software"), to deal | |
| in the Software without restriction, including without limitation the rights | |
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| copies of the Software, and to permit persons to whom the Software is | |
| furnished to do so, subject to the following conditions: |
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 SAMS_CARRAY_LIBRARY_HPP | |
| #define SAMS_CARRAY_LIBRARY_HPP | |
| #include <cstdint> | |
| #include <array> | |
| namespace CArray | |
| { | |
| /* Make std::array */ | |
| template<class T, std::size_t N> |
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
| /* | |
| Copyright 2018, Sam R. Belliveau | |
| Permission is hereby granted, free of charge, to any person obtaining a copy | |
| of this software and associated documentation files (the "Software"), to deal | |
| in the Software without restriction, including without limitation the rights | |
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| copies of the Software, and to permit persons to whom the Software is | |
| furnished to do so, subject to the following conditions: |
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 SAMS_SMART_POINTER_BASE_CLASS_HPP | |
| #define SAMS_SMART_POINTER_BASE_CLASS_HPP 1 | |
| #include <cstddef> | |
| namespace smart | |
| { | |
| /* Size Type, Remove dependency <cstdint> */ | |
| using size_t = std::size_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
| #ifndef SAMS_RATIO_CLASS_HPP | |
| #define SAMS_RATIO_CLASS_HPP 1 | |
| #include <cstdint> | |
| #include <type_traits> | |
| template <std::uintmax_t Numer, std::uintmax_t Denom, bool Pos = true> | |
| class Ratio | |
| { | |
| public: /* Public Static Members */ |
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 SAMS_MALLOCATOR_ALLOCATOR_CLASS | |
| #define SAMS_MALLOCATOR_ALLOCATOR_CLASS | |
| #include <memory> | |
| #include <type_traits> | |
| #include <cstdlib> | |
| template<class T> | |
| struct Mallocator : public std::allocator<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
| /*\ | |
| |*| Copyright 2018, Sam R. Belliveau | |
| |*| | |
| |*| Permission is hereby granted, free of charge, to any person obtaining a copy | |
| |*| of this software and associated documentation files (the "Software"), to deal | |
| |*| in the Software without restriction, including without limitation the rights | |
| |*| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| |*| copies of the Software, and to permit persons to whom the Software is | |
| |*| furnished to do so, subject to the following conditions: |
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> | |
| using Int = std::uintmax_t; | |
| using Float = long double; | |
| constexpr Float getPhi() | |
| { | |
| Float Phi = 1; | |
| for(Int i = 0; i < 0xffff; ++i) |
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 <stdint.h> | |
| int main(){uint16_t i[]={14894U,15710U,14478U,4100U,4100U,16382U,16385U,24021U, | |
| 20821U,24029U,21573U,23621U,16385U,16382U};for(int r=0;r<0xE;++r){for(int | |
| m=0x8000;m;m>>=1)if(i[r]&m)printf("##");else printf(" ");puts("");}} |