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
main([N]) -> | |
loop(decrement(list_to_integer(N))). | |
loop(stop) -> | |
ok; | |
loop(F) -> | |
loop(F()). | |
decrement(0) -> stop; | |
decrement(N) -> |
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 Proper = {}; | |
function even_number() { | |
return LET([integer()], | |
function(i) { | |
return i * 2; | |
} | |
); | |
} |
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 goban = XGoban('#goban', { | |
geometry: { | |
width: 10, height: 10, | |
points: [ | |
[4, 2, [3]], // 0 | |
[6, 2, [4]], // 1 | |
[2, 4, [3]], // 2 | |
[4, 4, [0, 2, 4, 7]], // 3 | |
[6, 4, [1, 3, 5, 8]], // 4 |
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 goban = XGoban('#goban', { | |
svg: "http://mokele.co.uk/miltonkeynes/miltonkeynes.svg", | |
geometry: { | |
width: 540, height: 540, | |
points: [ | |
// 0-1 | |
[212, 27, [3]], [279, 28, [6]], | |
// 2-3 | |
[139, 54, [3, 4]], [209, 60, [0, 2, 5]], | |
// 4-8 |
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
eigs$ wc -l apps/{go,goweb}/src/*.erl | |
22 apps/go/src/go.erl | |
155 apps/go/src/go_account.erl | |
94 apps/go/src/go_accounts.erl | |
16 apps/go/src/go_app.erl | |
134 apps/go/src/go_chat.erl | |
36 apps/go/src/go_chat_sup.erl | |
125 apps/go/src/go_db.erl | |
373 apps/go/src/go_db_list.erl | |
62 apps/go/src/go_email.erl |
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
01:22:27.052 [error] ** Handler goweb_http_handler terminating in websocket_handle/3 | |
for the reason error:{case_clause,[{<<"ab0c8543407f401e917bbd0782174c3b">>,<0.157.0>,<0.159.0>}]} | |
** Message was {text,<<"{\"chatMessage\":{\"match\":\"ab0c8543407f401e917bbd0782174c3b\",\"message\":\"my system is to create a pseudo-account for each anonYMOUS session, and a real one for each openid login.\"}}">>} | |
** Options were [] |
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
Sep 30 21:09:31 Stevens-MacBook-Air.local Cloud[68570]: -[__NSDictionaryM name]: unrecognized selector sent to instance 0x10035fe50 | |
Sep 30 21:09:31 --- last message repeated 1 time --- | |
Sep 30 21:09:31 Stevens-MacBook-Air.local Cloud[68570]: ( | |
0 CoreFoundation 0x00007fff87da7716 __exceptionPreprocess + 198 | |
1 libobjc.A.dylib 0x00007fff8f166470 objc_exception_throw + 43 | |
2 CoreFoundation 0x00007fff87e3dd5a -[NSObject(NSObject) doesNotRecognizeSelector:] + 186 | |
3 CoreFoundation 0x00007fff87d95c3e ___forwarding___ + 414 | |
4 CoreFoundation 0x00007fff87d95a28 _CF_forwarding_prep_0 + 232 | |
5 Cloud 0x000000010000c8d0 Cloud + 51408 | |
6 Cloud 0x000000010000c477 Cloud + 50295 |
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
geometry(Size) -> | |
Area = Size * Size, | |
lists:map( | |
fun(N) -> | |
{N, neighbours(N, Size, Area)} | |
end, | |
lists:seq(1, Area) | |
). | |
neighbours(N, Size, Area) -> |
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
check_ko(#move{ | |
point = #point{x = X2, y = Y2}, | |
taken_points = [#point{x = X1, y = Y1}] | |
}, #move{ | |
point = #point{x = X1, y = Y1}, | |
taken_points = [#point{x = X2, y = Y2}] | |
}) -> | |
{error, ko_not_allowed}; | |
check_ko(_, _) -> | |
ok. |
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
-module(goban). | |
-export([ | |
init/0, | |
init/2, | |
set_point_state/2, | |
place_stone_at/5, | |
move/2, | |
undo_move/2, | |
key/1, |