Skip to content

Instantly share code, notes, and snippets.

Avatar

Alex Wilkinson AWilco

View GitHub Profile
@AWilco
AWilco / flatMap.js
Created Sep 7, 2016 — forked from samgiles/flatMap.js
Javascript flatMap implementation
View flatMap.js
// [B](f: (A) ⇒ [B]): [B] ; Although the types in the arrays aren't strict (:
Object.defineProperties(Array.prototype, {
'flatMap': {
value: function (lambda) {
return Array.prototype.concat.apply([], this.map(lambda));
},
writeable: false,
enumerable: false
}
});
@AWilco
AWilco / gist:900699
Created Apr 3, 2011
XBMC Compile error with ddd457cb455ae9f21d236e1d7ceacb7d87dc235c
View gist:900699
make[1]: Entering directory `/opt/source/xbmc/xbmc/input/linux'
CPP LIRC.o
LIRC.cpp: In member function âvoid CRemoteControl::Disconnect()â:
LIRC.cpp:99: error: âinotify_rm_watchâ was not declared in this scope
LIRC.cpp: In member function âvoid CRemoteControl::Initialize()â:
LIRC.cpp:157: error: âinotify_initâ was not declared in this scope
LIRC.cpp:166: error: âIN_DELETE_SELFâ was not declared in this scope
LIRC.cpp:166: error: âinotify_add_watchâ was not declared in this scope
LIRC.cpp: In member function âbool CRemoteControl::CheckDevice()â:
LIRC.cpp:221: error: invalid application of âsizeofâ to incomplete type âinotify_eventâ