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
-define(GET(Field), | |
{Field, list_to_binary(wf:q(Field))}). | |
-define(GET_JSON(JSON_TERM), | |
fun(Field) when is_atom(Field) -> | |
FieldB = erlang:atom_to_binary(Field,utf8), | |
Val = proplists:get_value(FieldB, JSON_TERM), | |
{Field, Val} | |
end). |
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
budgets = new Backbone.Budget.Collection(window.budget) | |
list = | |
width : 320 | |
view : "datatable" | |
id : "budget_list" | |
backbone_collection : budgets | |
select : true | |
scroll : false | |
columns :[ |
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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Canvas test page</title> | |
</head> | |
<body> |
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
pick(L) -> | |
finch:pick_one(L). | |
basic_random_test() -> | |
List = lists:seq(1,100), | |
Vals = [{pick(List),pick(List)}||_ <- lists:seq(1,30)], | |
?assertNot(chi2:chi80(Vals)), | |
true. |
This file has been truncated, but you can view the full file.
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
%-*-Erlang-*- | |
-module(words). | |
-export([list/0]). | |
list() -> | |
[<<"A acid">>,<<"abacus major">>,<<"abacus pythagoricus">>,<<"A battery">>, | |
<<"abbey counter">>,<<"abbey laird">>,<<"abbey lands">>,<<"abbey lubber">>, | |
<<"abbot cloth">>,<<"Abbott papyrus">>,<<"abb wool">>,<<"A-b-c book">>, | |
<<"A-b-c method">>,<<"abdomino-uterotomy">>,<<"Abdul-baha">>,<<"a-be">>, | |
<<"aberrant duct">>,<<"aberration constant">>,<<"abiding place">>, |
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(square). | |
-export([square/1]). | |
square(X) -> | |
X * X. |
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(square_test). | |
-include_lib("eunit/include/eunit.hrl"). | |
square_0_test() -> | |
?assertEqual(0, square:square(0)). | |
square_1_test() -> | |
?assertEqual(1, square:square(1)). | |
square_2_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(tests). | |
-export([run/0]). | |
run() -> | |
io:format("Running Tests"), | |
eunit:test("ebin/"), | |
init:stop(). | |
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
test: all | |
erl -run tests run |
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
do_something_with_fixtures_test_() -> | |
{ | |
setup, | |
fun setup/0, | |
fun cleanup/1, | |
?_test( | |
begin | |
?assertEqual(1, 2) | |
end)}. |