A collection of information about accessing raw MultiTouch events on MacOS.
Compiled while building mtif (a MultiTouch interface for common lisp).
// | |
// cc glfw-metal-example.m `pkg-config --cflags --libs glfw3` -framework AppKit -framework Metal -framework QuartzCore | |
// | |
#define GLFW_INCLUDE_NONE | |
#define GLFW_EXPOSE_NATIVE_COCOA | |
#include <GLFW/glfw3.h> | |
#include <GLFW/glfw3native.h> | |
#import <Metal/Metal.h> | |
#import <QuartzCore/CAMetalLayer.h> |
// | |
// cc sdl-metal-example.m `sdl2-config --cflags --libs` -framework Metal -framework QuartzCore && ./a.out | |
// | |
#include <SDL.h> | |
#import <Metal/Metal.h> | |
#import <QuartzCore/CAMetalLayer.h> | |
int main (int argc, char *args[]) | |
{ | |
SDL_SetHint(SDL_HINT_RENDER_DRIVER, "metal"); |
A collection of information about accessing raw MultiTouch events on MacOS.
Compiled while building mtif (a MultiTouch interface for common lisp).
from math import sqrt, pow, sin, cos | |
from math import pi as M_PI | |
M_PI_2 = M_PI * 2 | |
''' | |
original c code: | |
https://raw.githubusercontent.com/warrenm/AHEasing/master/AHEasing/easing.c | |
Copyright (c) 2011, Auerhaus Development, LLC | |
http://sam.zoy.org/wtfpl/COPYING for more details. | |
''' |
#include <stdio.h> | |
#define STB_IMAGE_WRITE_IMPLEMENTATION | |
#include "stb_image_write.h" | |
#include <ft2build.h> | |
#include FT_FREETYPE_H | |
#define NUM_GLYPHS 128 | |
struct glyph_info { | |
int x0, y0, x1, y1; // coords of glyph in the texture atlas |
# #!/bin/bash | |
GITBOOK_REP=$1 | |
SUMMARY_FILE="SUMMARY.md" | |
echo $OUTPUT_FILE | |
if [ -d "$GITBOOK_REP" ]; then | |
echo "Entering directory '$GITBOOK_REP'..." | |
cd $GITBOOK_REP |
Our goal is to run python -c "import caffe"
without crashing. For anyone who doesn't spend most of their time with build systems, getting to this point can be extremely difficult on OS X. Instead of providing a list of steps to follow, I'll try to explain why each step happens.
This page has OS X specific install instructions.
I assume:
/* | |
* I add this to html files generated with pandoc. | |
*/ | |
html { | |
font-size: 100%; | |
overflow-y: scroll; | |
-webkit-text-size-adjust: 100%; | |
-ms-text-size-adjust: 100%; | |
} |
# -*- coding: utf-8 -*- | |
# @author: Peter Lamut | |
import argparse | |
import os | |
import shutil | |
N = 10 # the number of files in seach subfolder folder | |