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 <cstdio> | |
| class Foo | |
| { | |
| int x; | |
| public: | |
| Foo(int x); | |
| ~Foo(); | |
| void greet(); | |
| }; | |
| Foo::Foo(int x) : x(x) |
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
| // gcd a b | a`mod`b == 0 = b | |
| // | otherwise = gcd b (a`mod`b) | |
| #define GCD(a,b) (GCD1((a),(b))) | |
| #define GCD1(a,b) a%b==0?b:GCD2(b,(a%b)) | |
| #define GCD2(a,b) a%b==0?b:GCD3(b,(a%b)) | |
| #define GCD3(a,b) a%b==0?b:GCD4(b,(a%b)) | |
| #define GCD4(a,b) a%b==0?b:GCD5(b,(a%b)) | |
| #define GCD5(a,b) a%b==0?b:GCD6(b,(a%b)) |
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
| /* | |
| bind1 :: (a -> b) -> a -> b | |
| bind1 f t0 = f t0 | |
| */ | |
| template<typename R, typename F, typename T0> | |
| struct bind1_impl { | |
| bind1_impl(F f,T0 t0):f(f),t0(t0){} | |
| template<typename... T> | |
| R operator()(T... t) { | |
| return static_cast<R>(f(t0, t...)); |
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
| var CSSMatrix; | |
| if (navigator.userAgent.indexOf("Gecko") !== -1 && navigator.userAgent.indexOf("KHTML") === -1) { | |
| CSSStyleDeclaration.prototype.__defineGetter__("borderRadius",function() { | |
| return this.MozBorderRadius; | |
| }); | |
| CSSStyleDeclaration.prototype.__defineSetter__("borderRadius",function(x) { | |
| this.MozBorderRadius = x; | |
| }); | |
| CSSStyleDeclaration.prototype.__defineGetter__("userSelect",function() { |
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 assert,error,setmetatable,tonumber = assert,error,setmetatable,tonumber | |
| local table = require "table" | |
| local io = require "io" | |
| local lxp = require "lxp" | |
| local base64 = require "base64" | |
| module "propertylist" | |
| array_metatable = {} | |
| dictionary_metatable = {} |
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 "cocoa" | |
| local filename = arg[1] | |
| if not filename then | |
| return | |
| end | |
| local ishtml = false | |
| if filename:match("%.html$") then | |
| ishtml = true |
NewerOlder