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 <CoreServices/CoreServices.h> | |
#include <iostream> | |
void callback( | |
ConstFSEventStreamRef stream, | |
void *callbackInfo, | |
size_t numEvents, | |
void *evPaths, | |
const FSEventStreamEventFlags evFlags[], | |
const FSEventStreamEventId evIds[]) |
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
#define FUSE_USE_VERSION 26 | |
#include <fuse.h> | |
#include <stdio.h> | |
#include <string.h> | |
#include <errno.h> | |
#include <fcntl.h> | |
#include "glue.hpp" | |
struct hello_fs |
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
int sqlite3_create_function_v2( | |
sqlite3 *db, // db connection | |
const char *zFunctionName, // function name | |
int nArg, // number of argument this function takes. -1 for arbitrary numbers | |
int eTextRep, // text encoding, e.g. SQLITE_UTF8 or SQLITE_ANY | |
void *pApp, // pinter to function context | |
void (*xFunc)(sqlite3_context*,int,sqlite3_value**), // a scalar function implementation | |
void (*xStep)(sqlite3_context*,int,sqlite3_value**), // a aggregate function implementation | |
void (*xFinal)(sqlite3_context*), // the same pointer with previous one | |
void(*xDestroy)(void*) // destroy function context |
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 <typeinfo> | |
#include <memory> | |
#ifdef __GNUC__ | |
#include <cxxabi.h> | |
template<typename T> | |
struct getname | |
{ | |
std::string operator()() |
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
#if defined(__GNUC__) && !defined(__clang__) | |
#define GNUC_EXCLUDE_CLANG | |
#else | |
#undef GNUC_EXCLUDE_CLANG | |
#endif |
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> | |
#define CERR std::cerr << __FILE__ << ":" << \ | |
std::dec << __LINE__ << ":" <<__FUNCTION__ << "() : " |
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
int main() | |
{ | |
using namespace std; | |
using namespace BDB; | |
using BDB::Structure::HashMap; | |
Config conf; | |
conf.beg = 1; | |
conf.end = 10; | |
conf.root_dir = argv[1]; |
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
/** | |
* FreeBSD 8.2 | |
* g++ -I /usr/local/include newline_array_src.cpp | |
**/ | |
#include <boost/iostreams/filtering_stream.hpp> | |
#include <boost/iostreams/filter/newline.hpp> | |
#include <boost/iostreams/device/array.hpp> | |
#include <string> | |
#include <cstring> |
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
#!/bin/sh | |
# Dependencies: | |
# 1. gprof | |
# 2. gprof2dot | |
# 3. c++filt | |
# 4. dot (/usr/ports/x11-fonts/urwfonts) | |
help="profcg.sh executable output" |
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
/**************** | |
* Acer Yang, GAIS Laboratory, Univ. CCU, Taiwan. | |
* | |
* g++ -I/usr/local/include -L/usr/local/lib unicode-convert.cpp -licui18n -o uconv | |
* ./uconv input file charset_name | |
* | |
********/ | |
#include "unicode/ucnv.h" |