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
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8" /> | |
| <title>fp_Ben-Doherty</title> | |
| </head> | |
| <body> | |
| <style type="text/css"> | |
| @page{size: 319.83594508009156mm 235.36mm;} | |
| body { |
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
| syntax = "proto3"; | |
| package service.logging; | |
| import "google/protobuf/timestamp.proto"; | |
| message Log { | |
| message Context { | |
| google.protobuf.Timestamp timestamp = 1; | |
| string host_or_ip = 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
| // Ref: https://stackoverflow.com/questions/60023890/organize-all-urls-in-one-place-inside-a-class | |
| #include <QDebug> | |
| #include <QString> | |
| #include <QUrl> | |
| namespace url { | |
| static constexpr auto default_ip = "localhost"; | |
| static constexpr auto default_port = "8080"; |
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
| // Ref: https://stackoverflow.com/questions/60023221/finding-the-closest-true-value-for-an-index | |
| #include <iostream> | |
| #include <vector> | |
| #include <algorithm> | |
| #include <tuple> | |
| #include <limits> | |
| using Result = std::tuple<bool, std::size_t, std::string>; // result (T/F), index, message | |
| Result find_nearest( const std::vector<int>& v, const std::size_t index, const int 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
| // https://stackoverflow.com/a/51587626/7670262 | |
| #include <QDebug> | |
| #include <QtConcurrent> | |
| #include <QFuture> | |
| #include <QThread> | |
| #define LOG() qDebug() << __func__ << ": " | |
| void test() |
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 <future> | |
| #include <thread> | |
| #include <chrono> | |
| #define LOG() std::cout << __func__ << " : " | |
| void test() | |
| { | |
| LOG() << "IN\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
| // https://stackoverflow.com/a/51889159/7670262 | |
| #include <iterator> | |
| #include <iostream> | |
| struct data | |
| { | |
| data() = default; | |
| int num1 = 0; | |
| int num2 = 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
| // https://stackoverflow.com/a/44558860/7670262 | |
| /* | |
| Directory structure: | |
| C:\Test | |
| -- A | |
| ---- a.txt | |
| -- B | |
| ---- b.tx |
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
| // https://stackoverflow.com/a/55187379/7670262 | |
| #include <QDebug> | |
| #include <QMap> | |
| #include <QMapIterator> | |
| #include <QString> | |
| int main() | |
| { | |
| using InnerMap = QMap<int, QString>; |
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
| // https://stackoverflow.com/a/51742823/7670262 | |
| #include <QProcess> | |
| int main() | |
| { | |
| QProcess process; | |
| process.setProgram( "cmd.exe" ); | |
| process.setArguments( { "/C", R"(E:\deleteme.bat)" } ); | |
| process.setWorkingDirectory( R"(E:\)" ); |