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> | |
class Adder { | |
public: | |
Adder(int n): n(n) {} | |
int operator()(int other) { return other + n; } | |
private: | |
int n; | |
}; |
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 sun.misc.Unsafe; | |
import java.lang.reflect.*; | |
import java.util.*; | |
class FieldLayoutPrinter { | |
private static Unsafe _unsafe = null; | |
static { | |
try { | |
Field field = Unsafe.class.getDeclaredField("theUnsafe"); | |
field.setAccessible(true); |
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
author Kaushik Srenevasan <[email protected]> 2012-03-13 07:07:10 (GMT) | |
committer Glenn Morris <[email protected]> 2012-03-13 07:07:10 (GMT) | |
commit 4a07df36a52547d272107151e9251ba96cb37224 (patch) (side-by-side diff) | |
tree 0a8e4a84a982a8a3e303aa7cdc97723d3a360647 | |
parent 4aaa93566b7bbc3cb57e6c15b4c5bc5a140b3355 (diff) | |
download emacs-4a07df36a52547d272107151e9251ba96cb37224.tar.gz | |
GDB change for dynamically generated code (tiny change) | |
Ref: http://lists.gnu.org/archive/html/emacs-devel/2012-01/msg00753.html | |
* lisp/progmodes/gdb-mi.el (gdb-invalidate-disassembly): |
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
all: | |
flex flex-scanner.l | |
g++ -o d flex-scanner.c scanner.cc main.cc | |
test: all | |
./d | |
clean: | |
rm ./d | |
rm ./flex-scanner.c |
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 "llvm/IR/Module.h" | |
#include "llvm/IR/Function.h" | |
#include "llvm/IR/PassManager.h" | |
#include "llvm/IR/CallingConv.h" | |
#include "llvm/IR/Verifier.h" | |
#include "llvm/IR/IRBuilder.h" | |
#include "llvm/Support/raw_ostream.h" | |
static llvm::LLVMContext g_context; | |
#define getGlobalContext() (g_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
# /etc/X11/xorg.conf.d/20-intel.conf | |
Section "Device" | |
Identifier "Intel Graphics" | |
Driver "intel" | |
Option "TripleBuffer" "on" | |
Option "SwapbufferWait" "on" | |
Option "TearFree" "true" | |
EndSection | |
# From http://www.thinkwiki.org/wiki/How_to_configure_the_TrackPoint |
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
git init . | |
echo Documentation/ > ./.git/info/sparse-checkout | |
git config core.sparsecheckout true | |
git remote add origin https://github.com/git/git.git | |
git pull origin master |
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
// | |
// adder.cpp | |
// | |
// CXXFLAGS="-std=c++14 -O3 -ggdb -ggdb3" make adder | |
// | |
#include <iostream> | |
#include <cstdint> | |
#include <sys/mman.h> |