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
# See original post at http://stackoverflow.com/questions/822404/how-to-set-up-cmake-to-build-an-app-for-the-iphone | |
cmake_minimum_required(VERSION 2.8) | |
cmake_policy(SET CMP0015 NEW) | |
cmake_policy(SET CMP0016 NEW) | |
project(test) | |
set(NAME test) |
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
; A REPL-based, annotated Seesaw tutorial | |
; Please visit https://github.com/daveray/seesaw for more info | |
; | |
; This is a very basic intro to Seesaw, a Clojure UI toolkit. It covers | |
; Seesaw's basic features and philosophy, but only scratches the surface | |
; of what's available. It only assumes knowledge of Clojure. No Swing or | |
; Java experience is needed. | |
; | |
; This material was first presented in a talk at @CraftsmanGuild in | |
; Ann Arbor, MI. |
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
CIFilter *resizeFilter = [CIFilter filterWithName:@"CILanczosScaleTransform"]; | |
[resizeFilter setValue:ciImage forKey:@"inputImage"]; | |
[resizeFilter setValue:[NSNumber numberWithFloat:1.0f] forKey:@"inputAspectRatio"]; | |
[resizeFilter setValue:[NSNumber numberWithFloat:xRatio] forKey:@"inputScale"]; | |
CIFilter *cropFilter = [CIFilter filterWithName:@"CICrop"]; | |
CIVector *cropRect = [CIVector vectorWithX:rect.origin.x Y:rect.origin.y Z:rect.size.width W:rect.size.height]; | |
[cropFilter setValue:resizeFilter.outputImage forKey:@"inputImage"]; | |
[cropFilter setValue:cropRect forKey:@"inputRectangle"]; | |
CIImage *croppedImage = cropFilter.outputImage; |
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
;; Ref-based Santa Claus solution, Written by Mark Engelberg | |
;; (start-simulation) to run | |
(def *num-elves* 10) | |
(def *num-reindeer* 9) | |
;; Santa is a ref containing either {:state :asleep} or {:state :busy, :busy-with <sequence-of-workers>} | |
(def santa (ref {:state :asleep})) | |
(defn waiting-room [capacity] |
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
module ProtobufTest where | |
import System.ZMQ3 | |
import Control.Monad | |
import Data.ByteString.UTF8 as U | |
import Control.Concurrent (threadDelay) | |
import NotificationMessageProtos.NotificationMessage as N | |
import NotificationMessageProtos.EncryptType | |
import Text.ProtocolBuffers.WireMessage (messageGet) |
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
(ns saolsen.draw-2d) | |
;; Draw stuff (and never care about ie ever) | |
;; There's obviously a ton this lib doesn't do, just adding what | |
;; I need when I need it. | |
(def request-animation-frame | |
(or js/requestAnimationFrame | |
js/webkitRequestAnimationFrame)) | |
(defn get-canvas-context-from-id |
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
license: gpl-3.0 |
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
(ns three.demo) | |
(def THREE js/THREE) | |
(def camera (THREE.PerspectiveCamera. 75 (/ (.-innerWidth js/window) | |
(.-innerHeight js/window)) 1 10000)) | |
(set! (.-z (.-position camera)) 1000) | |
(def scene (THREE.Scene.)) | |
(def geometry (THREE.CubeGeometry. 200 200 200)) | |
(def obj (js/Object.)) | |
(set! (.-color obj) 0xff0000) | |
(set! (.-wireframe obj) true) |
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
(ns game-of-life.core | |
(:require [quil.core :as q]) | |
(:use overtone.at-at)) | |
(defn game-func | |
"function taking a game state to the following game state" | |
[state] | |
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
############################################################# | |
# # | |
# Generic Makefile for C++ projects # | |
# Author: Gabriel <[email protected]> # | |
# Date: 2014-04-18 # | |
# Version: 1.0 # | |
# # | |
############################################################# | |
OlderNewer