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
import javax.imageio.ImageIO; | |
import java.awt.*; | |
import java.awt.image.BufferedImage; | |
import java.io.File; | |
import java.util.*; | |
/** | |
* Create an ASCII letters sorted by intensity. By including the inverse letters | |
* the number of combinations are increased. | |
* |
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
import javax.imageio.ImageIO; | |
import javax.swing.*; | |
import javax.swing.border.LineBorder; | |
import java.awt.*; | |
import java.awt.datatransfer.DataFlavor; | |
import java.awt.datatransfer.Transferable; | |
import java.awt.datatransfer.UnsupportedFlavorException; | |
import java.awt.dnd.*; | |
import java.awt.event.MouseAdapter; | |
import java.awt.event.MouseEvent; |
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
// | |
// PerformanceTool.h | |
// | |
// Created by Morten Nobel-Jørgensen on 1/23/13. | |
// Copyright (c) 2013 Morten Nobel-Joergensen. All rights reserved. | |
// | |
// Create simple performance meassures in ms | |
// | |
// Usage: | |
// |
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 "GLError.h" | |
#include <iostream> | |
#include <string> | |
#ifdef WIN32 | |
# include <GL/glew.h> | |
#elif __APPLE__ | |
# include <OpenGL/gl3.h> | |
#else | |
# include <GL3/gl3.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
awk '/insert_code_start/,/insert_code_end/ { if ( $0 ~ /insert_code_end/) print " // insert code here"; next} 1' < test.cpp > text_sub.cpp | |
# | |
# Example | |
# | |
# void main(){ | |
# // insert_code_start | |
# foo(); | |
# // insert_code_end |
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
#ifdef _WIN32 | |
#include <GL/glut.h> | |
#else | |
#include <GLUT/glut.h> | |
#endif | |
#include <stdlib.h> | |
#include <stdio.h> | |
#include <png.h> | |
#include <iostream> |
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
// | |
// main.cpp | |
// Observer pattern in C++11 | |
// | |
// Created by Morten Nobel-Jørgensen on 9/21/12. | |
// Copyright (c) 2012 Morten Nobel-Joergensen. All rights reserved. | |
// | |
#include <iostream> |
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 <functional> | |
#include <deque> | |
#include <mutex> | |
// Reuseable blocking queue | |
template <typename T> class BlockingQueue { | |
std::deque<T> q; | |
std::mutex m; | |
std::condition_variable cv; | |
public: |
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
#------------------------------------------------- | |
# | |
# Project created by QtCreator 2013-07-08T13:26:39 | |
# | |
#------------------------------------------------- | |
QT += core gui widgets opengl network | |
TARGET = QtImageCompressionTest | |
CONFIG += console |
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
// | |
// cpp11shim.h | |
// | |
// Created by Morten Nobel-Jørgensen on 7/19/13. | |
// Copyright (c) 2013 Morten Nobel-Joergensen. All rights reserved. | |
// | |
#ifndef __CPP11_SHIM__ | |
#define __CPP11_SHIM__ |
OlderNewer