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
# -*- Makefile -*- | |
# Mac OSX makefile for FreeImage | |
# This file can be generated by ./gensrclist.sh | |
include Makefile.srcs | |
# General configuration variables: | |
CC_X86_64 = gcc -4.2 | |
CPP_X86_64 = g++ -4.2 | |
COMPILERFLAGS = -Os -fexceptions -fvisibility=hidden -DNO_LCMS |
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
#------------------------------------------------- | |
# | |
# Add OpenCV to QT Creator on Mac OS X | |
# | |
# This pro file assumes that opencv was installed | |
# by homebrew or manually in /usr/local/ | |
# | |
#------------------------------------------------- | |
QT += core gui |
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
//set seed | |
srand(time(NULL)); | |
// random number in range [0,1] | |
float r = (float)rand()/RAND_MAX; | |
printf("%f\n", r); |
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/sh | |
# ------------------------------------------------------------------------------ | |
# SOME INFOS : fairly standard (debian) init script. | |
# Note that node doesn't create a PID file (hence --make-pidfile) | |
# has to be run in the background (hence --background) | |
# and NOT as root (hence --chuid) | |
# | |
# MORE INFOS : INIT SCRIPT http://www.debian.org/doc/debian-policy/ch-opersys.html#s-sysvinit | |
# INIT-INFO RULES http://wiki.debian.org/LSBInitScripts | |
# INSTALL/REMOVE http://www.debian-administration.org/articles/28 |
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
LAlt::RAlt | |
RAlt::LAlt | |
LWin::LControl |
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
<?xml version="1.0" encoding="UTF-8" ?> | |
<cinder> | |
<block | |
name="Cinder-KCB2" | |
id="com.wk.kcb2" | |
author="Wieden+Kennedy" | |
license="BSD" | |
summary="Kinect v2 Common Bridge block for Cinder" | |
git="[email protected]:wieden-kennedy/Cinder-KCB2.git" | |
version="0.2" |
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
# =============== # | |
# Unity generated # | |
# =============== # | |
[Tt]emp/ | |
[Oo]bj/ | |
[Bb]uild | |
[Ll]ibrary/ | |
sysinfo.txt | |
# ===================================== # |
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
// declare notification name in something.h | |
extern NSString* const touchEndNotification; | |
// define notification name in something.m | |
NSString* const touchEndNotification = @"StimulusRotationDidEnd"; | |
// post notification | |
[[NSNotificationCenter defaultCenter] postNotificationName:touchEndNotification object:self]; | |
// subscribe to notification | |
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(updateSurfaceView) name:touchEndNotification object:nil]; |
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
// Use a custom seperator of full width | |
UIView *lineView = [[UIView alloc] init]; | |
lineView.backgroundColor = kColorSeperator; | |
lineView.translatesAutoresizingMaskIntoConstraints = NO; | |
[self.contentView addSubview:lineView]; | |
[lineView autoPinEdge:ALEdgeBottom toEdge:ALEdgeBottom ofView:self.contentView]; | |
[lineView autoPinEdge:ALEdgeLeft toEdge:ALEdgeLeft ofView:self.contentView]; | |
[lineView autoMatchDimension:ALDimensionWidth toDimension:ALDimensionWidth ofView:self]; | |
[lineView addConstraint:[NSLayoutConstraint constraintWithItem:lineView attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeHeight multiplier:1.0 constant:1]]; |
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
func keyboardShow(notification: NSNotification) { | |
let info: NSDictionary = notification.userInfo! | |
let frameV: NSValue = info[UIKeyboardFrameEndUserInfoKey] as! NSValue | |
let frame: CGRect = frameV.CGRectValue() | |
UIView.animateWithDuration(0.2, animations: { | |
() in | |
self.sview.contentInset = UIEdgeInsetsMake(0, 0, frame.size.height, 0) | |
}) | |
} |
OlderNewer