Description:
remove debug alert...
Commit status:
[Not Reviewed]
References:
Comments:
0 Commit comments 0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
Add another comment

r473:0803f3082e05 - - 1 file changed: 0 inserted, 1 deleted

@@ -1,128 +1,127
1 1 - content_for :header do
2 2 = javascript_include_tag 'local_jquery'
3 3
4 4 :javascript
5 5 $(document).ready( function() {
6 6 $("#mem_remark").hover( function() {
7 7 $("#mem_remark_box").show();
8 8 }, function() {
9 9 $("#mem_remark_box").hide();
10 10 });
11 11 });
12 - alert("hahaha");
13 12 :css
14 13 .hof_user { color: orangered; font-style: italic; }
15 14 .hof_language { color: green; font-style: italic; }
16 15 .hof_value { color: deeppink;font-style: italic; }
17 16 .info_param { font-weight: bold;text-align: right; }
18 17 .tooltip {
19 18 font-family: Verdana,sans-serif;
20 19 font-weight: normal;
21 20 text-align: left;
22 21 font-size: 1.0em;
23 22 color: black;
24 23 line-height: 1.1;
25 24 display: none;
26 25 min-width: 20em;
27 26 position: absolute;
28 27 left: 25px;
29 28 bottom: 5px;
30 29 border: 1px solid;
31 30 padding: 5px;
32 31 background-color: #FFF;
33 32 word-wrap: break-word;
34 33 z-index: 9999;
35 34 overflow: auto;
36 35 }
37 36
38 37 %h1 (#{Problem.find(params[:id]).name}) #{Problem.find(params[:id]).full_name}
39 38
40 39 %h2 Problem Stat
41 40 %table.info
42 41 %thead
43 42 %tr.info-head
44 43 %th Stat
45 44 %th Value
46 45 %tbody
47 46 %tr{class: cycle('info-even','info-odd')}
48 47 %td.info_param Submissions
49 48 %td= @summary[:count]
50 49 %tr{class: cycle('info-even','info-odd')}
51 50 %td.info_param Solved/Attempted User
52 51 %td #{@summary[:solve]}/#{@summary[:attempt]} (#{(@summary[:solve]*100.0/@summary[:attempt]).round(1)}%)
53 52 - if @best
54 53 %tr{class: cycle('info-even','info-odd')}
55 54 %td.info_param Best Runtime
56 55 %td
57 56 by #{link_to @best[:runtime][:user], controller:'users', action:'profile', id:@best[:memory][:user_id]}
58 57 using <span class="hof_language">#{@best[:runtime][:lang]}</span>
59 58 with <span class="hof_value">#{@best[:runtime][:value] * 1000} milliseconds</span>
60 59 at submission
61 60 = link_to("#" + @best[:runtime][:sub_id].to_s, controller: 'graders', action: 'submission', id:@best[:runtime][:sub_id])
62 61
63 62 %tr{class: cycle('info-even','info-odd')}
64 63 %td.info_param
65 64 Best Memory Usage
66 65 %sup{ id: "mem_remark", style: "position:relative; color: blue;"}
67 66 [?]
68 67 %span.tooltip#mem_remark_box
69 68 This counts only for submission with 100% score.
70 69 Right now, java is excluded from memory usage competition. (Because it always uses 2GB memory...)
71 70 %td
72 71 by #{link_to @best[:memory][:user], controller:'users', action:'profile', id:@best[:memory][:user_id]}
73 72 using <span class="hof_language">#{@best[:memory][:lang]}</span>
74 73 with <span class="hof_value">#{number_with_delimiter(@best[:memory][:value])} kbytes </span>
75 74 at submission
76 75 = link_to("#" + @best[:memory][:sub_id].to_s, controller: 'graders' , action: 'submission', id:@best[:memory][:sub_id])
77 76
78 77 %tr{class: cycle('info-even','info-odd')}
79 78 %td.info_param Shortest Code
80 79 %td
81 80 by #{link_to @best[:length][:user], controller:'users', action:'profile', id:@best[:length][:user_id]}
82 81 using <span class="hof_language">#{@best[:length][:lang]}</span>
83 82 with <span class="hof_value">#{@best[:length][:value]} bytes</span>
84 83 at submission
85 84 = link_to("#" + @best[:length][:sub_id].to_s, controller: 'graders' , action: 'submission', id: @best[:length][:sub_id])
86 85
87 86 %tr{class: cycle('info-even','info-odd')}
88 87 %td.info_param First solver
89 88 %td
90 89 #{link_to @best[:first][:user], controller:'users', action:'profile', id:@best[:first][:user_id]} is the first solver
91 90 using <span class="hof_language">#{@best[:first][:lang]}</span>
92 91 on <span class="hof_value">#{@best[:first][:value]}</span>
93 92 at submission
94 93 = link_to("#" + @best[:first][:sub_id].to_s, controller: 'graders' , action: 'submission', id: @best[:first][:sub_id])
95 94
96 95 - if @best
97 96 %h2 By language
98 97
99 98 %table.info
100 99 %thead
101 100 %tr.info-head
102 101 %th Language
103 102 %th Best runtime (ms)
104 103 %th Best memory (kbytes)
105 104 %th Shortest Code (bytes)
106 105 %th First solver
107 106 %tbody
108 107 - @by_lang.each do |lang,value|
109 108 %tr{class: cycle('info-even','info-odd')}
110 109 %td= lang
111 110 %td
112 111 = link_to value[:runtime][:user], controller: 'users', action: 'profile', id: value[:runtime][:user_id]
113 112 = "(#{(value[:runtime][:value] * 1000).to_i} @"
114 113 = "#{link_to("#" + value[:runtime][:sub_id].to_s, controller: 'graders' , action: 'submission', id: value[:runtime][:sub_id])} )".html_safe
115 114 %td
116 115 = link_to value[:memory][:user], controller: 'users', action: 'profile', id: value[:memory][:user_id]
117 116 = "(#{number_with_delimiter(value[:memory][:value])} @"
118 117 = "#{link_to("#" + value[:memory][:sub_id].to_s, controller: 'graders' , action: 'submission', id: value[:memory][:sub_id])} )".html_safe
119 118 %td
120 119 = link_to value[:length][:user], controller: 'users', action: 'profile', id: value[:length][:user_id]
121 120 = "(#{value[:length][:value]} @"
122 121 = "#{link_to("#" + value[:length][:sub_id].to_s, controller: 'graders' , action: 'submission', id: value[:length][:sub_id])} )".html_safe
123 122 %td
124 123 - if value[:first][:user] != '(NULL)' #TODO: i know... this is wrong...
125 124 = link_to value[:first][:user], controller: 'users', action: 'profile', id: value[:first][:user_id]
126 125 = "(#{value[:first][:value]} @"
127 126 = "#{link_to("#" + value[:first][:sub_id].to_s, controller: 'graders' , action: 'submission', id: value[:first][:sub_id])} )".html_safe
128 127
You need to be logged in to leave comments. Login now