Description:
add more detail to hof
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
r441:a3fff45b1b87 - - 1 file changed: 1 inserted, 1 deleted
@@ -1,79 +1,79 | |||
|
1 | 1 | :css |
|
2 | 2 | .hof_user { color: orangered; font-style: italic; } |
|
3 | 3 | .hof_language { color: green; font-style: italic; } |
|
4 | 4 | .hof_value { color: deeppink;font-style: italic; } |
|
5 | 5 | |
|
6 | - %h2 Overall | |
|
6 | + %h2 Overall of #{Problem.find(params[:id]).full_name} | |
|
7 | 7 | |
|
8 | 8 | - if @best |
|
9 | 9 | %b Best Runtime: |
|
10 | 10 | by #{link_to @best[:runtime][:user], controller:'users', action:'profile', id:@best[:memory][:user_id]} |
|
11 | 11 | using <span class="hof_language">#{@best[:runtime][:lang]}</span> |
|
12 | 12 | with <span class="hof_value">#{@best[:runtime][:value] * 1000} milliseconds</span> |
|
13 | 13 | at submission |
|
14 | 14 | = link_to("#" + @best[:runtime][:sub_id].to_s, controller: 'graders', action: 'submission', id:@best[:runtime][:sub_id]) |
|
15 | 15 | %br/ |
|
16 | 16 | |
|
17 | 17 | %b Best Memory Usage: |
|
18 | 18 | by #{link_to @best[:memory][:user], controller:'users', action:'profile', id:@best[:memory][:user_id]} |
|
19 | 19 | using <span class="hof_language">#{@best[:memory][:lang]}</span> |
|
20 | 20 | with <span class="hof_value">#{number_with_delimiter(@best[:memory][:value])} kbytes </span> |
|
21 | 21 | at submission |
|
22 | 22 | = link_to("#" + @best[:memory][:sub_id].to_s, controller: 'graders' , action: 'submission', id:@best[:memory][:sub_id]) |
|
23 | 23 | %br/ |
|
24 | 24 | |
|
25 | 25 | %b Shortest Code: |
|
26 | 26 | by #{link_to @best[:length][:user], controller:'users', action:'profile', id:@best[:length][:user_id]} |
|
27 | 27 | using <span class="hof_language">#{@best[:length][:lang]}</span> |
|
28 | 28 | with <span class="hof_value">#{@best[:length][:value]} bytes</span> |
|
29 | 29 | at submission |
|
30 | 30 | = link_to("#" + @best[:length][:sub_id].to_s, controller: 'graders' , action: 'submission', id: @best[:length][:sub_id]) |
|
31 | 31 | %br/ |
|
32 | 32 | |
|
33 | 33 | %b First solver: |
|
34 | 34 | #{link_to @best[:first][:user], controller:'users', action:'profile', id:@best[:first][:user_id]} is the first solver |
|
35 | 35 | using <span class="hof_language">#{@best[:first][:lang]}</span> |
|
36 | 36 | on <span class="hof_value">#{@best[:first][:value]}</span> |
|
37 | 37 | at submission |
|
38 | 38 | = link_to("#" + @best[:first][:sub_id].to_s, controller: 'graders' , action: 'submission', id: @best[:first][:sub_id]) |
|
39 | 39 | %br/ |
|
40 | 40 | |
|
41 | 41 | |
|
42 | 42 | %p |
|
43 | 43 | This counts only for submission with 100% score <br/> |
|
44 | 44 | Right now, java is excluded from memory usage competition. (Because it always uses 2GB memory...) |
|
45 | 45 | |
|
46 | 46 | %h2 By language |
|
47 | 47 | |
|
48 | 48 | %table.info |
|
49 | 49 | %thead |
|
50 | 50 | %tr.info-head |
|
51 | 51 | %th Language |
|
52 | 52 | %th Best runtime (ms) |
|
53 | 53 | %th Best memory (kbytes) |
|
54 | 54 | %th Shortest Code (bytes) |
|
55 | 55 | %th First solver |
|
56 | 56 | %tbody |
|
57 | 57 | - @by_lang.each do |lang,value| |
|
58 | 58 | %tr{class: cycle('info-even','info-odd')} |
|
59 | 59 | %td= lang |
|
60 | 60 | %td |
|
61 | 61 | = link_to value[:runtime][:user], controller: 'users', action: 'profile', id: value[:runtime][:user_id] |
|
62 | 62 | = "(#{(value[:runtime][:value] * 1000).to_i} @" |
|
63 | 63 | = "#{link_to("#" + value[:runtime][:sub_id].to_s, controller: 'graders' , action: 'submission', id: value[:runtime][:sub_id])} )".html_safe |
|
64 | 64 | %td |
|
65 | 65 | = link_to value[:memory][:user], controller: 'users', action: 'profile', id: value[:memory][:user_id] |
|
66 | 66 | = "(#{number_with_delimiter(value[:memory][:value])} @" |
|
67 | 67 | = "#{link_to("#" + value[:memory][:sub_id].to_s, controller: 'graders' , action: 'submission', id: value[:memory][:sub_id])} )".html_safe |
|
68 | 68 | %td |
|
69 | 69 | = link_to value[:length][:user], controller: 'users', action: 'profile', id: value[:length][:user_id] |
|
70 | 70 | = "(#{value[:length][:value]} @" |
|
71 | 71 | = "#{link_to("#" + value[:length][:sub_id].to_s, controller: 'graders' , action: 'submission', id: value[:length][:sub_id])} )".html_safe |
|
72 | 72 | %td |
|
73 | 73 | - if value[:first][:user] != '(NULL)' #TODO: i know... this is wrong... |
|
74 | 74 | = link_to value[:first][:user], controller: 'users', action: 'profile', id: value[:first][:user_id] |
|
75 | 75 | = "(#{value[:first][:value]} @" |
|
76 | 76 | = "#{link_to("#" + value[:first][:sub_id].to_s, controller: 'graders' , action: 'submission', id: value[:first][:sub_id])} )".html_safe |
|
77 | 77 | |
|
78 | 78 | - else |
|
79 | 79 | %h3 No submissions |
You need to be logged in to leave comments.
Login now