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 "listener.h" | |
//-------------------------------- | |
// GLOBAL FOR LEVMAR | |
//-------------------------------- | |
std::map<int,Vector3> mapPoint3DToMatch; | |
std::map<int,Vector2> mapPoint2D; | |
Vector3 vCentreObject = Vector3::ZERO; // Center of rotation ? | |
Vector3 vCentreRotation = Vector3::ZERO; | |
Camera * gmCamera; // Camera use to project |
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
#!/bin/bash | |
OPENSSL_VERSION="1.0.1g" | |
curl -O http://www.openssl.org/source/openssl-$OPENSSL_VERSION.tar.gz | |
tar -xvzf openssl-$OPENSSL_VERSION.tar.gz | |
mv openssl-$OPENSSL_VERSION openssl_i386 | |
tar -xvzf openssl-$OPENSSL_VERSION.tar.gz | |
mv openssl-$OPENSSL_VERSION openssl_x86_64 | |
cd openssl_i386 |
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
#define MIN(a,b) ((a)<(b)?(a):(b)) | |
#define MAX(a,b) ((a)>(b)?(a):(b)) | |
typedef struct rgb { | |
float r, g, b; | |
} RGB; | |
typedef struct hsl { | |
float h, s, l; | |
} HSL; |
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
#define MAX 999999999 | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <map> | |
#include <vector> | |
#include <queue> | |
#include <utility> | |
using namespace std; | |
class compare |
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
// NOTE YOU MUST ADD THE FRAMEWORK 'MessageUI' to your project. | |
// MyViewController.h | |
//------------------- | |
#import <MessageUI/MessageUI.h> | |
@interface MyViewController : UIViewController <MFMailComposeViewControllerDelegate> | |
// MyViewController.m |
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
// memdjpeg - A super simple example of how to decode a jpeg in memory | |
// Kenneth Finnegan, 2012 | |
// blog.thelifeofkenneth.com | |
// | |
// After installing jpeglib, compile with: | |
// cc memdjpeg.c -ljpeg -o memdjpeg | |
// | |
// Run with: | |
// ./memdjpeg filename.jpg | |
// |
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 <boost/format.hpp> | |
void LogMessage(boost::format& message) { | |
std::cout << message.str() << std::endl; | |
} | |
template<typename TValue, typename... TArgs> | |
void LogMessage(boost::format& message, TValue arg, TArgs... args) { | |
message % arg; | |
LogMessage(message, args...); |
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
//enable HiDPI modes | |
sudo defaults write /Library/Preferences/com.apple.windowserver DisplayResolutionEnabled -bool YES; | |
//revert to default | |
sudo defaults delete /Library/Preferences/com.apple.windowserver DisplayResolutionDisabled; |
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 "jpeg_memory_src.h" | |
/// JPEG source manager | |
struct jpeg_source_t | |
{ | |
struct jpeg_source_mgr _pub; | |
const char *_begin; | |
const char *_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
// | |
// ZUISwitch.h | |
// zeebox | |
// | |
// Created by Will on 26/10/2012. | |
// Copyright (c) 2012 Electric Labs. All rights reserved. | |
// | |
@interface ZUISwitch : UISwitch |
OlderNewer