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
template<class T> | |
void create(const QString& type_name, qint64 width, qint64 height, qint64 depth) { | |
QVariant(T); // test if T can be converted to QVariant | |
_array = _project->create_block<Variant_3d_array>(_project->next_block_id()); | |
_array->create<T>(type_name, width, height, depth); | |
} |
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 <stdio.h> | |
#include <sys/types.h> | |
#include <unistd.h> | |
#include <string.h> | |
#include <ctype.h> | |
#include <stdlib.h> | |
int main() { | |
int fd[2], kol = 0, i; | |
char instr[30], outstr[30], symb; |
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 <stdio.h> | |
#include <string.h> | |
int main() { | |
FILE * file = popen("/usr/bin/crontab", "w"); | |
const char* command = "* * * * * /bin/true\n"; | |
fwrite(command, 1, strlen(command), file); | |
pclose(file); | |
} |
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> | |
using namespace std; | |
class ListItem { | |
public: | |
int d; | |
ListItem *next; | |
}; | |
class MyClass { |
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
Making all in data | |
make[1]: Entering directory `/home/ri/programs/emperor/data' | |
make[1]: Nothing to be done for `all'. | |
make[1]: Leaving directory `/home/ri/programs/emperor/data' | |
Making all in po | |
make[1]: Entering directory `/home/ri/programs/emperor/po' | |
make[1]: Nothing to be done for `all'. | |
make[1]: Leaving directory `/home/ri/programs/emperor/po' | |
Making all in src | |
make[1]: Entering directory `/home/ri/programs/emperor/src' |
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
namespace hsp { | |
class File; | |
class Properties_widget; | |
template<class T> | |
class Properties_registry_entry { | |
public: | |
Properties_registry_entry() {} |
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
Item drop_random_item() { | |
int r = rand(0, total_chance_sum); | |
int current_sum = 0; | |
for(int i = 0; i < items.count(); i++) { | |
if (current_sum <= r && r < current_sum + items[i].chance) return items[i]; | |
current_sum += items[i].chance; | |
} | |
} |
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
/* See LICENSE file for copyright and license details. */ | |
/* appearance */ | |
static const char font[] = "-*-*-medium-*-*-*-14-*-*-*-*-*-iso10646-*"; // this font supports unicode | |
static const char normbordercolor[] = "#444444"; | |
static const char normbgcolor[] = "#222222"; | |
static const char normfgcolor[] = "#bbbbbb"; | |
static const char selbordercolor[] = "#00ff00"; | |
static const char selbgcolor[] = "#001000"; | |
static const char selfgcolor[] = "#eeeeee"; |
NewerOlder