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> | |
| #include <boost/format.hpp> | |
| #include <tuple> | |
| template<uint N, uint MAX, typename... Args> struct tuple_formatter { | |
| static void format_tuple(boost::format &fmt, const std::tuple<Args...>& args) { | |
| fmt % std::get<N>(args); | |
| tuple_formatter<N+1,MAX,Args...>::format_tuple(fmt, args); | |
| } | |
| }; |
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> | |
| #include <vector> | |
| void Show(const std::vector<std::vector<bool>> &two_dim_vect) { | |
| for (const auto &row : two_dim_vect) { | |
| for (bool b : row) { | |
| std::cout << b << " "; | |
| } | |
| std::cout << "\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
| PROJECT(Basic CXX) | |
| set(CMAKE_CXX_FLAGS "-std=c++11 -Wall -O3") | |
| cmake_minimum_required(VERSION 2.6) | |
| ADD_EXECUTABLE(Basic main.cpp) | |
| TARGET_LINK_LIBRARIES(Basic freeglut opengl32 glu32) |
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
| uchrome.exe: main.cpp Makefile | |
| g++ -Wall -O3 -m64 -std=c++11 -I d:\mingw\include -o uchrome.exe main.cpp -Ld:/mingw/bin -lcurl -lws2_32 -lwinmm -Ld:/mingw/lib64 -lssl |
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
| #!/usr/bin/env python3 | |
| import os | |
| import sys | |
| import glob | |
| import shutil | |
| import argparse | |
| from stat import * | |
| def main(args): |
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
| /* | |
| * basincam.cpp | |
| * Copyright (c) 2013, Jeremiah LaRocco [email protected] | |
| * Permission to use, copy, modify, and/or distribute this software for any | |
| * purpose with or without fee is hereby granted, provided that the above | |
| * copyright notice and this permission notice appear in all copies. | |
| * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES |
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
| (ql:quickload "drakma") | |
| (defun download-image (url idx) | |
| (let* | |
| ((outfname (format nil "lisp_images/~6,'0d.jpg" idx)) | |
| (instream (drakma:http-request url :want-stream t :force-binary t)) | |
| (buf (make-array 4096 :element-type (stream-element-type instream)))) | |
| (with-open-file (outstream outfname | |
| :direction :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
| testing: testing.cpp Makefile | |
| g++ -std=c++11 -o testing testing.cpp -I/home/jl2/oss_code/-pthread `GraphicsMagick++-config --cppflags --cxxflags --ldflags --libs` -lboost_system -lboost_program_options |
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
| /* | |
| * uchrome.c | |
| * Copyright (c) 2013, Jeremiah LaRocco [email protected] | |
| * Permission to use, copy, modify, and/or distribute this software for any | |
| * purpose with or without fee is hereby granted, provided that the above | |
| * copyright notice and this permission notice appear in all copies. | |
| * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES |
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
| trie: main.cpp Makefile | |
| clang++ -O3 -std=c++11 -stdlib=libc++ -Wall -o trie main.cpp -lboost_system |