Skip to content

Instantly share code, notes, and snippets.

View ex's full-sized avatar
💭
I may be slow to respond.

me ex

💭
I may be slow to respond.
View GitHub Profile
{***********************************************
Chord - Multi Version
Author: Native Instruments
Written by: Nicki Marinic
Modified: July 23, 2009
*************************************************}
on init
message("")
set_script_title("Chord")
@ex
ex / zebra.pro
Created February 4, 2016 19:50
Prolog solution of the Zebra Puzzle
exists(A, list(A, _, _, _, _)).
exists(A, list(_, A, _, _, _)).
exists(A, list(_, _, A, _, _)).
exists(A, list(_, _, _, A, _)).
exists(A, list(_, _, _, _, A)).
rightOf(R, L, list(L, R, _, _, _)).
rightOf(R, L, list(_, L, R, _, _)).
rightOf(R, L, list(_, _, L, R, _)).
rightOf(R, L, list(_, _, _, L, R)).
@ex
ex / springer-free-maths-books.md
Created December 28, 2015 19:54 — forked from bishboria/springer-free-maths-books.md
Springer have made a bunch of maths books available for free, here are the direct links
@ex
ex / FTW.hx
Created March 10, 2014 16:00 — forked from dpeek/FTW.hx
import haxe.macro.Expr;
class FTW
{
public static function build()
{
return haxe.macro.Context.getBuildFields().map(transformField);
}
static function transformField(field:Field)
let text = "Uid nx, aex jcdjipx iu wzux zp, ta wxtpa jtdaws, ai etkx vis
Dcos zyexdzaxr aex Jxdw jezwipijes iu etkzyg nidx aety iyx hts
ai ri aex ptnx aezyg. Z zyexdzaxr aeta jezwipijes udin Wtdds Htww,
hei zp ns exdi tqactwws. Z htya ai ntfx Dcos cpxdp udxx. Z htya ai
gzkx aexn aex udxxrin ai qeiipx. Jxijwx tdx rzuuxdxya. Jxijwx qeiipx
rzuuxdxya qdzaxdzt. Oca zu aexdx zp t oxaaxd hts tniyg ntys
twaxdytazkxp, Z htya ai xyqicdtgx aeta hts os ntfzyg za qinuidatowx.
Pi aeta'p heta Z'kx adzxr ai ri.
Z htya ai piwkx jdiowxnp Z nxxa zy aex rtzws wzux os cpzyg qinjcaxdp,
#include <iostream>
#include <cmath>
#define GET_VECTOR(x) { cout << "Insert vector [" << #x << "] "; cin >> x; }
class Vector {
public:
double x;
# Decrypt
text = "Uid nx, aex jcdjipx iu wzux zp, ta wxtpa jtdaws, ai etkx vis.\n" +
"Dcos zyexdzaxr aex Jxdw jezwipijes iu etkzyg nidx aety iyx hts\n" +
"ai ri aex ptnx aezyg. Z zyexdzaxr aeta jezwipijes udin Wtdds Htww,\n" +
"hei zp ns exdi tqactwws. Z htya ai ntfx Dcos cpxdp udxx. Z htya ai\n" +
"gzkx aexn aex udxxrin ai qeiipx. Jxijwx tdx rzuuxdxya. Jxijwx qeiipx\n" +
"rzuuxdxya qdzaxdzt. Oca zu aexdx zp t oxaaxd hts tniyg ntys\n" +
"twaxdytazkxp, Z htya ai xyqicdtgx aeta hts os ntfzyg za qinuidatowx.\n" +
"Pi aeta'p heta Z'kx adzxr ai ri.\n" +
"Z htya ai piwkx jdiowxnp Z nxxa zy aex rtzws wzux os cpzyg qinjcaxdp,\n" +
# Decrypt
my $text = "Uid nx, aex jcdjipx iu wzux zp, ta wxtpa jtdaws, ai etkx vis.\n" .
"Dcos zyexdzaxr aex Jxdw jezwipijes iu etkzyg nidx aety iyx hts\n" .
"ai ri aex ptnx aezyg. Z zyexdzaxr aeta jezwipijes udin Wtdds Htww,\n" .
"hei zp ns exdi tqactwws. Z htya ai ntfx Dcos cpxdp udxx. Z htya ai\n" .
"gzkx aexn aex udxxrin ai qeiipx. Jxijwx tdx rzuuxdxya. Jxijwx qeiipx\n" .
"rzuuxdxya qdzaxdzt. Oca zu aexdx zp t oxaaxd hts tniyg ntys\n" .
"twaxdytazkxp, Z htya ai xyqicdtgx aeta hts os ntfzyg za qinuidatowx.\n" .
"Pi aeta'p heta Z'kx adzxr ai ri.\n" .
"Z htya ai piwkx jdiowxnp Z nxxa zy aex rtzws wzux os cpzyg qinjcaxdp,\n" .
#include <string>
#include <vector>
#include <map>
#include <cctype>
void test()
{
string text = "Uid nx, aex jcdjipx iu wzux zp, ta wxtpa jtdaws, ai etkx vis.\n"
"Dcos zyexdzaxr aex Jxdw jezwipijes iu etkzyg nidx aety iyx hts\n"
"ai ri aex ptnx aezyg. Z zyexdzaxr aeta jezwipijes udin Wtdds Htww,\n"
@ex
ex / MiniJson.cs
Created February 25, 2013 22:51 — forked from GarethJones/MiniJson.cs
// using UnityEngine;
using System;
using System.Collections;
using System.Text;
/* Based on the JSON parser from
* http://techblog.procurios.nl/k/618/news/view/14605/14863/How-do-I-write-my-own-parser-for-JSON.html
*
* I simplified it so that it doesn't throw exceptions
* and can be used in Unity iPhone with maximum code stripping.