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 <readline/history.h> | |
#include <readline/readline.h> | |
#include <iostream> | |
#include <vector> | |
std::vector<std::string> commandList = | |
{ | |
"start", | |
"status", | |
"stop", |
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
import hashlib | |
import os | |
from PIL import Image | |
import struct | |
class Synanceia(object): | |
def __init__(self, original_image_file=None, modified_image_file=None): | |
self.__image_file = modified_image_file | |
if original_image_file is None: |
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 <memory> | |
struct Base | |
{ | |
~Base() | |
{ | |
std::cout << "~Base()" << std::endl; | |
} | |
}; |
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 <string> | |
#include <unordered_map> | |
namespace std { | |
template <typename F, typename S> | |
struct hash<std::pair<F, S>> | |
{ | |
std::size_t operator()(std::pair<F, S> const &p) 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 <exception> | |
struct bar | |
{ | |
~bar() | |
{ | |
std::cout << std::uncaught_exceptions() << " uncaught exceptions (bar 1)\n"; | |
try |
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 <chrono> | |
#include <cstdio> | |
#include <iostream> | |
void write_file(std::FILE* fd) | |
{ | |
for (int i=0; i<1000000; i++) | |
{ | |
std::fprintf(fd, "iteration no %d (last bit=%d)\n", i, i % 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
class Price | |
{ | |
public: | |
Price(double val) | |
{ | |
mValue = val * 1000; | |
} | |
operator double()() | |
{ |
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 <thread> | |
#include <chrono> | |
class Monitor | |
{ | |
public: | |
void onHeartbeat(int id, int status) | |
{ | |
lastTimestamp = std::chrono::system_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 <iostream> | |
#include <cstddef> | |
void action(char arg) | |
{ | |
std::cout << "char arg -> " << (int)arg << "\n"; | |
} | |
void action(signed char arg) | |
{ |
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
#pragma once | |
{% block title %} | |
{% endblock %} | |
{% for this_class in all_classes %} | |
class {{ this_class.name }} | |
{ | |
{% for this_class in this_class.private %} |
NewerOlder