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
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 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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Canvas test page</title> | |
</head> | |
<body> |
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
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 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(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 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(json_test). | |
-include_lib("eqc/include/eqc.hrl"). | |
-include_lib("eunit/include/eunit.hrl"). | |
-compile(export_all). | |
-include("erlog_test.hrl"). | |
json_test() -> | |
{ok, ERLOG_STATE} = erlog:new(), | |
Data = [{<<"test">>, 12345}], | |
?assertMatch({{succeed,_},_}, erlog:prove(ERLOG_STATE, {length, Data, {'Len'}})). |
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
%-*- Prolog -*- | |
split(Head, Tail, HeadLength, FullList) :- | |
length(Head, HeadLength), | |
append(Head, Tail, FullList). | |
?- split(H,T, 3, [a,b,c,d,e,f,g,h,i,j,k,l]). | |
H = [a, b, c], | |
T = [d, e, f, g, h, i, j, k, l]. |
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(erl_cache_tests). | |
-include_lib("proper/include/proper.hrl"). | |
-include_lib("eunit/include/eunit.hrl"). | |
-compile(export_all). | |
keys() -> | |
[ | |
"AAAAAAAA", | |
"8BFE5E9B", | |
"59665E9E", |
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
prop_render() -> | |
{ok, online_users_dtl} = erlydtl:compile_file("templates/online_users.dtl", online_users_dtl, []), | |
?FORALL(Rs, | |
list(presence()), | |
begin | |
{ok,HTML} = vest_current_users:render(Rs), | |
mochiweb_html:parse(iolist_to_binary(HTML)), %% assert that it is valid HTML | |
[_Prefix,Rows,_Suffix] = HTML, | |
length(Rows) =:= length(Rs) | |
end). |
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
connected(A,B) :- | |
edge(A,B). | |
sib(A,B) :- | |
path(C,A,_), | |
path(C,B,_), | |
\+path(A,B,_), | |
\+path(B,A,_). | |
ancestor(A,B) :- |
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
language: erlang | |
notifications: | |
disabled: true | |
install: | |
- wget http://www.quviq.com/downloads/eqcmini.zip | |
- unzip eqcmini.zip | |
- export ERL_LIBS=eqcmini | |
script: |