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
#pragma once | |
#include <iostream> | |
class IPlugin | |
{ | |
public: | |
virtual void doSth() = 0; // muss implementiert werden | |
virtual void otherToDo() |
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
SELECT | |
r.`id` AS `rule_id`, | |
SUM(qu.`value`) AS `window_usage`, | |
TIMESTAMPDIFF(SECOND, NOW(), MIN(qu.`created_at`)) AS `eslapsed_window_first_usage` | |
FROM | |
quota_rules` qr | |
LEFT JOIN `rules` r | |
ON (r.`id` = qr.`rule_id`) | |
LEFT JOIN `actions` a | |
ON (a.`id` = r.`action_id`) |
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 <cstring> | |
#include <cstdio> | |
class my_string | |
{ | |
private: | |
union | |
{ | |
char inline_buf[16]; // sso | |
char *bufptr; |
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
<?php | |
// 8 Bytes lesen | |
$contents = fread($this->socket, 8); | |
// Fehlerbehandlung - schon schlimm genug | |
if (strlen($contents) == 0) { | |
$this->error = new IXR_Error(-32300, 'transport error - cannot read size/handle'); | |
return false; | |
} |
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
template<class T, class... Ts> | |
struct _sizeof | |
{ | |
static constexpr std::size_t value = 1 + _sizeof<Ts...>(); | |
}; | |
template<class T> | |
struct _sizeof<T> | |
{ |
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
template<bool expr> | |
struct static_assert; | |
template<> | |
struct static_assert<true> | |
{ | |
static const char test; | |
}; | |
struct false_type |
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
/* (C) 2017 Sebastian Büttner <sebastian.buettner@iem.thm.de> */ | |
#include <stdio.h> | |
/* This is about functions returning functions that return void and take no arguments (see below). */ | |
void func() | |
{ | |
printf("func()\n"); | |
} |
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 <exception> | |
#include <iostream> | |
#include <unordered_map> | |
class object_base; | |
struct rt_type_info | |
{ | |
const char *name; | |
const rt_type_info *base; |
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
document ::= prolog element Misc* | |
Char ::= #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF] | |
S ::= (#x20 | #x9 | #xD | #xA)+ | |
NameStartChar ::= ":" | [A-Z] | "_" | [a-z] | [#xC0-#xD6] | [#xD8-#xF6] | [#xF8-#x2FF] | [#x370-#x37D] | |
| [#x37F-#x1FFF] | [#x200C-#x200D] | [#x2070-#x218F] | [#x2C00-#x2FEF] | [#x3001-#xD7FF] | [#xF900-#xFDCF] | |
| [#xFDF0-#xFFFD] | [#x10000-#xEFFFF] |
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
<?php | |
/* vim: set noexpandtab tabstop=2 softtabstop=2 shiftwidth=2: */ | |
/** | |
* Sync servers plugin. | |
* Synchronizes black lists accross servers upon each round. | |
* Created by Bueddl | |
* | |
* Dependencies: none | |
*/ |