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 <iostream> | |
#include <vector> | |
#include <string> | |
int main(int argc, char* argv[]) | |
{ | |
std::vector<std::string> args(argc); | |
args.assign( argv, argv+argc); | |
for( const auto arg : args ) std::cout << arg << std::endl; |
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
for( arg <- args ) println( arg ) |
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 <iostream> | |
#include <vector> | |
#include <string> | |
#include <memory> | |
typedef std::vector<std::string> str_vec; | |
void print(str_vec const list) | |
{ | |
for ( auto el : list ) std::cout << el << std::endl; |
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 <iostream> | |
#include <Eigen/Dense> | |
using Eigen::MatrixXd; // m by n double matrix | |
int main() | |
{ | |
// Example from Eigen3 doc | |
MatrixXd m(2,2); | |
// Comma initialization, row major order |
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
all: fx_solver | |
fx_solver: fx_solver.cpp | |
clang++ -std=c++0x -I/usr/include/coin -o fx_solver fx_solver.cpp -lClp | |
# Install CLP: | |
# sudo apt-get install coinor-libclp0 coinor-libclp-doc |
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
1. Modify ~/system/bin/dx to increase memory size: | |
#dx helper script | |
dalvikvm -Xms256m -Xmx512m -cp $APK com.spartacusrex.spartacuside.external.dx $@ | |
2. Download [Complete ANTLR 4.0 Java binaries jar](http://www.antlr.org/download/antlr-4.0-complete.jar) and copy to ~/bin. Change to this directory. | |
3. Convert jar to dex so that it can run on Android (takes about 20mins with power connected): | |
dx --dex --output=antlr-4.0.dex.jar antlr-4.0-complete.jar |
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
# Change location to where External Code is installed | |
cd ~/Work/ExternCode/ | |
# Install conscript, a tool for installing and updating Scala software | |
# programs. | |
curl https://raw.github.com/n8han/conscript/master/setup.sh > conscript_setup.sh | |
less conscript_setup.sh | |
chmod 755 conscript_setup.sh | |
./conscript_setup.sh |
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
grammar CFunction; | |
options { | |
output = AST; | |
ASTLabelType = CommonTree; | |
} | |
tokens { | |
SCALAR; | |
ARRAY; |
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
all: test_Factory | |
test_Factory: test_Factory.cpp | |
$(CXX) -std=c++0x -o test_Factory test_Factory.cpp |
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
# Instructions for setting up OpenCV development in Clojure on Ubuntu | |
# Copied from http://docs.opencv.org/2.4/doc/tutorials/introduction/clojure_dev_intro/clojure_dev_intro.html | |
# Install opencv | |
sudo apt-get install libopencv-dev | |
# Get location of latest .jar and .so | |
dpkg -L libopencv2.4-java | grep jar | |
dpkg -L libopencv2.4-jni | grep .so |
OlderNewer