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 <chrono> | |
namespace branchless { | |
template<typename It> | |
It lower_bound(It begin, It end, const typename It::value_type& value) | |
{ | |
auto len = std::distance(begin, end); |
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
let request = { | |
"first_name": first_name, | |
"last_name": last_name, | |
"email": email, | |
"address": JSON.parse(address), | |
"weight_kg": weight_kg, | |
"target_weight_kg": target_weight_kg, | |
"height_cm": height_cm, | |
"activity_level": activity_level, | |
"gender": gender, |
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 <iterator> | |
namespace compiletime { | |
template<std::size_t MaxSize = 30> | |
class string | |
{ | |
char m_data[MaxSize] = { 0 }; | |
std::size_t m_size; | |
public: |
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 <variant> | |
#include <vector> | |
// Forward Declaration | |
struct Node; | |
// Simple | |
using Int = int; | |
using String = std::string; |
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 <variant> | |
#include <string> | |
#include <vector> | |
#include <tuple> | |
struct Error { | |
std::string message; | |
Error(std::string _message) : message(std::move(_message)) {} | |
}; |
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
body { | |
margin: 0px; | |
font-size: 12px; | |
font-family: Arial, Helvetica, sans-serif; | |
background-color: #263238; | |
} | |
.window { | |
position: absolute; | |
width: 100%; |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<link rel="stylesheet" type="text/css" href="style.css"> | |
</head> | |
<body> | |
<div id="viewer" class="window"> | |
<div class="top-bar"> | |
<div> | |
<span style="color: red; font-size: 18px;">☆</span>LOG VIEWER |
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 <fstream> | |
#include <chrono> | |
#include <thread> | |
#include <sstream> | |
void tail(std::ifstream& f) | |
{ | |
std::uint64_t lineCount = 0; | |
auto sleepTime = std::chrono::seconds(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 <vector> | |
#include <string> | |
#include <list> | |
#include <deque> | |
#include <iterator> | |
#include <algorithm> | |
#include <numeric> | |
#include <array> | |
#include <iostream> |
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 "benchmark.h" | |
#include <iostream> | |
#include <fstream> | |
constexpr auto LENGTH = 10000000; | |
constexpr auto ITERATIONS = 100; | |
template<int N> | |
struct LargeOffset { |