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
struct ProcessResult { | |
std::string output; | |
bool error = false; | |
}; | |
ProcessResult run(std::vector<std::string> args) { | |
int stdout_fds[2], stderr_fds[2]; | |
pipe(stdout_fds); | |
pipe(stderr_fds); |
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 <sys/wait.h> | |
#include <unistd.h> | |
#include <sys/epoll.h> | |
#include <string> | |
#include <vector> | |
struct ProcessResult { | |
std::string output; | |
bool error = false; | |
}; |
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
Decoder::Decoder() [base object constructor]: | |
push rbp | |
push rbx | |
mov rbx, rdi | |
sub rsp, 24 | |
mov QWORD PTR [rdi], 0 | |
mov QWORD PTR [rdi+8], 0 | |
mov QWORD PTR [rdi+16], 0 | |
mov edi, 4990 | |
call operator new(unsigned long) |
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 <memory> | |
#include <vector> | |
class Decoder { | |
public: | |
Decoder() { buffer.reserve(4990);} | |
bool decode(unsigned char* data, uint32_t size) { | |
if (size == 10) { | |
buffer.insert(buffer.end(), data, data + 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
Link::~Link() [base object destructor]: | |
push r12 | |
mov r12, rdi | |
push rbp | |
push rbx | |
mov rbx, QWORD PTR [rdi+24] | |
test rbx, rbx | |
je .L3 | |
mov ebp, OFFSET FLAT:_ZL28__gthrw___pthread_key_createPjPFvPvE | |
lea rax, [rbx+8] |
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 <memory> | |
#include <vector> | |
class Decoder { | |
public: | |
void init(std::shared_ptr<std::vector<unsigned char>> s_buffer) { | |
buffer = s_buffer; | |
} | |
void decode(unsigned char* data, uint32_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
Decoder::Decoder() [base object constructor]: | |
push rbp | |
push rbx | |
mov rbx, rdi | |
sub rsp, 24 | |
mov QWORD PTR [rdi], 0 | |
mov QWORD PTR [rdi+8], 0 | |
mov QWORD PTR [rdi+16], 0 | |
mov edi, 4990 | |
call operator new(unsigned long) |
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 <memory> | |
#include <vector> | |
class Decoder { | |
public: | |
Decoder() { buffer.reserve(4990);} | |
std::vector<unsigned char> decode(unsigned char* data, uint32_t size) { | |
if (size == 10) { | |
buffer.insert(buffer.end(), data, data + 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 <cstdio> | |
#include <type_traits> | |
#include <utility> | |
#define First(x) std::get<0>(x) | |
#define Second(x) std::get<1>(x) | |
template <typename T> | |
class GeoCoordinate { | |
typedef std::pair<T, T> CoordPair; |