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
/* Example of a library interposer: interpose on malloc(). | |
* gcc -D_GNU_SOURCE -fPIC -O2 -Wall -o malloc_interposer.so -shared malloc_interposer.c -ldl | |
* setenv LD_PRELOAD $cwd/malloc_interposer.so | |
* run the app | |
*/ | |
#include <stdio.h> | |
#include <dlfcn.h> | |
#include <string.h> |
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
# Makefile! | |
SOURCES := $(sort $(wildcard src/*.cpp src/*.cu src/*.cc src/*.c)) | |
OBJECTS := $(sort $(patsubst src/%, obj/%.o, $(SOURCES))) | |
DEPENDS := $(sort $(patsubst src/%, obj/%.d, $(SOURCES))) | |
CFLAGS += | |
CUFLAGS += | |
CPPFLAGS += | |
LDFLAGS += |
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 <string> | |
#include <boost/spirit/home/qi.hpp> | |
#include <boost/spirit/home/lex.hpp> | |
#include <boost/spirit/home/lex/lexer/lexertl/lexer.hpp> | |
struct dtype { | |
dtype() {} | |
dtype(std::string const & value) {} | |
}; |
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
[11:59pm][wlynch@fallston ~/test] ipython | |
Python 2.4.3 (#1, Sep 21 2011, 19:55:41) | |
Type "copyright", "credits" or "license" for more information. | |
IPython 0.8.4 -- An enhanced Interactive Python. | |
? -> Introduction and overview of IPython's features. | |
%quickref -> Quick reference. | |
help -> Python's own help system. | |
object? -> Details about 'object'. ?object also works, ?? prints more. |
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
[4:16am][wlynch@fallston ~/test] cat package/module.py | |
#!/usr/bin/env python | |
print "Loading module.py" | |
from package import signal | |
[4:18am][wlynch@fallston ~/test] python package/module.py | |
Loading module.py | |
Traceback (most recent call last): | |
File "package/module.py", line 3, in ? | |
from package import signal | |
ImportError: No module named package |
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
[12:26pm][wlynch@watermelon ~] brew install valgrind | |
==> Downloading http://valgrind.org/downloads/valgrind-3.7.0.tar.bz2 | |
Already downloaded: /Library/Caches/Homebrew/valgrind-3.7.0.tar.bz2 | |
==> ./configure --prefix=/Users/wlynch/Homebrew/Cellar/valgrind/3.7.0 --mandir=/Users/wlynch/Homebrew/Cellar/valgrind/3.7.0/share/man --enable-only64bit --build=amd64-darwin | |
==> make | |
echo "# This is a generated file, composed of the following suppression rules:" > default.supp | |
echo "# " exp-sgcheck.supp xfree-3.supp xfree-4.supp darwin10-drd.supp darwin11.supp >> default.supp | |
cat exp-sgcheck.supp xfree-3.supp xfree-4.supp darwin10-drd.supp darwin11.supp >> default.supp | |
make all-recursive | |
Making all in include |
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
class X { | |
public: | |
X() { | |
this->val = rand(); | |
} | |
int val; | |
}; | |
static X global_value; |
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
class X { | |
public: | |
X() { | |
this->val = rand(); | |
} | |
int val; | |
}; | |
static X global_value; |
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 <utility> | |
int main() { | |
std::pair<int, volatile long> x(3, 4); | |
} |
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
using namespace std; | |
#include<iostream> | |
#include<cmath> | |
#include<iomanip> | |
void readit(int); | |
void calcit(int, float, int, int); | |
int writeit(float, float, float, float, int, int); | |
int GetNumber(string Give) { |
OlderNewer