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
| package main | |
| import ( | |
| "bufio" | |
| "log" | |
| "net/rpc" | |
| "os" | |
| ) | |
| func main() { |
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 list of possible usernames to reserve to avoid | |
| # vanity URL collision with resource paths | |
| # It is a merged list of the recommendations from this Quora discussion: | |
| # http://www.quora.com/How-do-sites-prevent-vanity-URLs-from-colliding-with-future-features | |
| # Country TLDs found here: | |
| # http://en.wikipedia.org/wiki/List_of_Internet_top-level_domains#Country_code_top-level_domains | |
| # Languages found here: |
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
| // LZW-compress a string | |
| function lzw_encode(s) { | |
| var dict = {}; | |
| var data = (s + "").split(""); | |
| var out = []; | |
| var currChar; | |
| var phrase = data[0]; | |
| var code = 256; | |
| for (var i=1; i<data.length; i++) { | |
| currChar=data[i]; |
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
| //test-uncaught-errors | |
| var sys = require('sys') | |
| , EventEmitter = require('events').EventEmitter; | |
| function error1 (err){ | |
| sys.puts("Handle: " + err); | |
| } | |
| function error2 (err){ | |
| sys.puts("JANDAL: " + err); | |
| } | |
| function exit (){ |
NewerOlder