Time for an 2014 update…
This commit is contained in:
parent
372c577f83
commit
09687c4926
2520 changed files with 34227 additions and 7318 deletions
|
|
@ -5,7 +5,7 @@
|
|||
out_dates_from_file( Name ) ->
|
||||
{ok, Binary} = file:read_file( Name ),
|
||||
Lines = binary:split( Binary, <<"\n">>, [global] ),
|
||||
{_N, Dict} = lists:foldl( fun out_dates/2, {0, dict:new()}, Lines ),
|
||||
{_N, _Date, Dict} = lists:foldl( fun out_dates/2, {0, "", dict:new()}, Lines ),
|
||||
[{X, dict:fetch(X, Dict)} || X <- dict:fetch_keys( Dict )].
|
||||
|
||||
task() ->
|
||||
|
|
@ -15,11 +15,11 @@ task() ->
|
|||
|
||||
|
||||
out_dates( <<>>, Acc ) -> Acc;
|
||||
out_dates( Line, {N, Dict} ) ->
|
||||
[_License, Direction, <<"@">>, Date | _T] = [X || X <- binary:split(Line, <<" ">>, [global]), X =/= <<>>],
|
||||
out_dates( Line, {N, Date, Dict} ) ->
|
||||
[_License, Direction, <<"@">>, New_date | _T] = [X || X <- binary:split(Line, <<" ">>, [global]), X =/= <<>>],
|
||||
New_n = out_dates_n( N, Direction ),
|
||||
New_dict = out_dates_dict( N, New_n, Date, Dict ),
|
||||
{New_n, New_dict}.
|
||||
{New_n, New_date, New_dict}.
|
||||
|
||||
out_dates_dict( N, New_n, Date, Dict ) when N > New_n -> dict:append( N, Date, Dict );
|
||||
out_dates_dict( _N, _New_n, _Date, Dict ) -> Dict.
|
||||
|
|
|
|||
|
|
@ -4,6 +4,3 @@ LC = 0; LCMax = 0; Scan[
|
|||
If[LCMax == LC, AppendTo[LCMaxtimes, #[[4]]]],
|
||||
LC--;] &, Import["mlijobs.txt", "Table"]]
|
||||
Print["The maximum number of licenses used was ", LCMax, ", at ", LCMaxtimes]
|
||||
|
||||
output:
|
||||
-> The maximum number of licenses used was 99, at {2008/10/03_08:39:34,2008/10/03_08:40:40}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue