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
| [{doc_id,616}, | |
| {weight,3}, | |
| {attrs,[{<<"name_sort">>,47}, | |
| {<<"organization_type_id">>,1}, | |
| {<<"deanery_id">>,1}, | |
| {<<"created_at">>,{{2007,9,5},{12,46,45}}}, | |
| {<<"updated_at">>,{{2009,1,16},{2,11,36}}}, | |
| {<<"lat">>,39.851016998291016}, | |
| {<<"lng">>,-75.7154769897461}, | |
| {<<"sphinx_internal_id">>,308}, |
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
| Result: [97,"dditive"] | |
| Result: {nonterminal,"additive"} | |
| Result: 97 | |
| Result: 100 | |
| Result: 100 | |
| Result: 100 | |
| Result: 100 | |
| Result: 105 | |
| Result: 105 | |
| Result: 116 |
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(test_datatypes). | |
| -define(UNSUP_ERR, {error, unsupported_javascript_return_type}). | |
| -include_lib("eunit/include/eunit.hrl"). | |
| string_test_() -> | |
| [{setup, fun() -> ok = markatta_driver:start() end, | |
| fun(_) -> markatta_driver:stop() end, | |
| [fun() -> |
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
| -define(TIMEOUT, 60000). | |
| -behavior(ssh_channel). | |
| %% API | |
| -export([start_link/2, send/2, send_wait/2, close/1, get_data/1]). | |
| %% ssh_channel API | |
| -export([init/1, handle_call/3, handle_cast/2, handle_msg/2]). | |
| -export([handle_ssh_msg/2, code_change/3, terminate/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
| -module(packer). | |
| -export([pack/1, test/0]). | |
| pack(Data) -> | |
| pack(Data, []). | |
| test() -> | |
| [[a, a, a], [b, b, b]] = packer:pack([a,a,a,b,b,b]), | |
| [[a,a,a,a], [b], [c, c], [a, a], [d], [e, e, e, e]] = packer:pack([a,a,a,a,b,c,c,a,a,d,e,e,e,e]), |
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
| #!/usr/bin/env escript | |
| %% -*- erlang -*- | |
| -mode(compile). | |
| -export([foo/0]). | |
| foo() -> | |
| 5. | |
| 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
| perdido:xoo-modules ksmith$ xoo | |
| xoo 0.0.1 [V8: 1.3.16 (candidate)] | |
| > xoo.require('file') | |
| true | |
| > xoo.require('www') | |
| true | |
| > www.withURL('http://news.ycombinator.com/', function(data) { file.writeFile('/tmp/index.html', data); }) | |
| > xoo.print("Hello, world!") | |
| Hello, world! | |
| > |
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
| perdido:erlang ksmith$ xoo | |
| xoo 0.0.1 [V8: 1.3.16 (candidate)] | |
| > xoo.require('erlang') | |
| true | |
| > xoo.print('Result: ' + erlang.bert.decode(erlang.bert.encode('Hello, world'))) | |
| Result: Hello, world | |
| > |
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(dog). | |
| -export([new/1, woof/1]). | |
| new(Name) -> {dog, Name}. | |
| woof(Self) -> | |
| {dog, Name} = Self, | |
| io:format("~p says 'woof!'~n", [Name]). |