⌘T | go to file |
⌘⌃P | go to project |
⌘R | go to methods |
⌃G | go to line |
⌘KB | toggle side bar |
⌘⇧P | command prompt |
This file contains hidden or 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 parametric function describing the Bezier curve determined by given control points, | |
which takes t from 0 to 1 and returns the x, y of the corresponding point on the Bezier curve]] | |
function bezier(xv, yv) | |
local reductor = {__index = function(self, ind) | |
return setmetatable({tree = self, level = ind}, {__index = function(curves, ind) | |
return function(t) | |
local x1, y1 = curves.tree[curves.level-1][ind](t) | |
local x2, y2 = curves.tree[curves.level-1][ind+1](t) | |
return x1 + (x2 - x1) * t, y1 + (y2 - y1) * t | |
end |
This file contains hidden or 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
<html> | |
<head> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script> | |
<script> | |
if (typeof (nfvalidate) == "undefined") nfvalidate = {}; | |
// An array of validators to push your validators to | |
nfvalidate.validators = new Array(); | |
nfvalidate.validators.push({ |
This file contains hidden or 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
(require '[noir.server :as server]) | |
(use 'noir.core 'aleph.http 'lamina.core) | |
(defn async-response [response-channel request] | |
(enqueue response-channel | |
{:status 200 | |
:headers {"content-type" "text/plain"} | |
:body "async response"})) | |
(defpage "/" [] "hey from Noir!") |
This file contains hidden or 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
The bridge is now located at https://github.com/fjolnir/TLC |
This file contains hidden or 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
local ffi = require 'ffi' | |
local pa = ffi.load('portaudio') | |
ffi.cdef [[ | |
int Pa_GetVersion( void ); | |
const char* Pa_GetVersionText( void ); | |
typedef int PaError; | |
typedef enum PaErrorCode | |
{ |
This file contains hidden or 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
fib = setmetatable({1, 1}, | |
{__index = function(t,n) | |
t[n] = t[n-1] + t[n-2] | |
return t[n] | |
end}) |
This file contains hidden or 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
if not sinatra.incoming ( ngx.req.get_method() , ngx.var.uri ) then | |
return ngx.exit ( 404 ) | |
end |
This file contains hidden or 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 <stdlib.h> | |
#include <stdio.h> | |
#include <AL/alut.h> | |
#include <vorbis/codec.h> | |
#include <vorbis/vorbisfile.h> | |
char pcmout[16*1024]; | |
void check_error() | |
{ |
OlderNewer