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