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
-module(bulletin_board_webapp). | |
-behaviour(merl_webapp). | |
-include_lib("merl/include/merl.hrl"). | |
-export([get_mode/1, build_app_definition/0]). | |
get_mode(_) -> | |
development. |
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
-module(test). | |
-export([add/2]). | |
-compile([native]). | |
add(X, Y) when is_number(X), is_number(Y) -> | |
X + Y. | |
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
-module(example1). | |
-export([init/0, find_by_field/2, undefined_function/2]). | |
-author("[email protected]"). | |
init() -> | |
code:ensure_loaded(function_missing), | |
process_flag(error_handler, function_missing), | |
ok. |
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
This template: | |
%html | |
%body[{class, "normal"}] | |
#message | |
Hello, world! | |
renders this output: | |
<html> | |
<body class="normal"> | |
<div id="message"> |
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
#main | |
%span#message | |
%table | |
%tr | |
%td | |
Hello, world | |
%td | |
This is a test. |
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
-module(node_mgr). | |
-behaviour(gen_server). | |
%% API | |
-export([start_link/0, register/1, next_worker/0]). | |
-define(SERVER, ?MODULE). | |
%% gen_server callbacks |
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
handle_call({insert, Value}, _From, State) -> | |
NextNodePid = node_manager:next_node(?METHOD), | |
NextDbPid = db_node:next_db(NextNodePid, ?METHOD), | |
db:insert(Value). |
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
handle_call({insert, Value}, _From, State) -> | |
NextNode = node_manager:next_node(?METHOD), | |
NextDb = db_manager:next_db_node(NextNode), | |
db_node:insert_value(Value), | |
------ | |
On the db_manager module: | |
next_db_node(DbManagerPid) -> | |
gen_server:call(DbManagerPid, {next_db, ?METHOD}). | |
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
=ERROR REPORT==== 24-Mar-2009::13:55:19 === | |
** Generic server kw2000_agent terminating | |
** Last message in was {space,write, | |
{vci_channel, | |
sessionCD2C8AD4FAB6BBCF90FD8CF6BA031986D5DC36DD, | |
0,6}} | |
** When Server state == {state,1,undefined,[]} | |
** Reason for termination == | |
** {{aborted,{no_exists,[ecu_to_bus,{ecu_to_bus,4,'_','_','_','_'}]}}, | |
{gen_server,call, |
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
-module(iconv_t_001). | |
-export([start/0]). | |
start() -> | |
etap:plan(1), | |
etap:ok(application:start(baberl), "Start baberl app"), | |
etap:ok(application:stop(baberl), "Stop baberl app"), | |
etap:end_tests(). |
OlderNewer