This file contains 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
class Pipe | |
{ | |
public: | |
virtual void Foo() = 0; | |
virtual void Bar() = 0; | |
}; | |
class SerialPipe : public Pipe | |
{ |
This file contains 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
class IdShortner { | |
static valid_characters = "123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ" | |
static toId(String str) { | |
def i = 0 | |
def num = 0 | |
str.reverse().each { | |
num += valid_characters.indexOf(it) * (int)Math.pow(58, i++) | |
} | |
return num |
This file contains 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
Exception in thread "main" java.lang.NoClassDefFoundError: | |
Caused by: java.lang.ClassNotFoundException: | |
at java.net.URLClassLoader$1.run(URLClassLoader.java:200) | |
at java.security.AccessController.doPrivileged(Native Method) | |
at java.net.URLClassLoader.findClass(URLClassLoader.java:188) | |
at java.lang.ClassLoader.loadClass(ClassLoader.java:306) | |
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276) | |
at java.lang.ClassLoader.loadClass(ClassLoader.java:251) | |
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) |
This file contains 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
#!/usr/bin/env ruby | |
luarocks_dir = "/Users/mirven/Projects/luarocks/" # ending slash is important for s3sync | |
ARGV.each do |rockspec| | |
rockspec.match(/^(.*).rockspec$/) | |
if $1 | |
`git archive --format=zip --prefix #{$1}/ master >#{$1}.zip` | |
This file contains 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
function foo(x) | |
print(2*x) | |
end | |
foo(100) | |
foo = function(x) | |
print(2*x) | |
end | |
NewerOlder