2016-04-14 11:29:22 +08:00
|
|
|
|
|
|
|
<% content_for :header_tags do %>
|
|
|
|
<%= javascript_include_tag "/assets/codemirror/codemirror_python_ruby_c" %>
|
|
|
|
<%= stylesheet_link_tag "/assets/codemirror/codemirror" %>
|
|
|
|
<%= stylesheet_link_tag "/assets/codemirror/merge" %>
|
|
|
|
<%= javascript_include_tag "https://cdnjs.cloudflare.com/ajax/libs/diff_match_patch/20121119/diff_match_patch.js"%>
|
|
|
|
<%= javascript_include_tag "/assets/codemirror/merge" %>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<article>
|
2016-04-15 11:28:20 +08:00
|
|
|
<h3 style="float:left; width:47%; text-align:center;"><%=src_name%></h3>
|
|
|
|
<% if @simi_value.to_i >= 90 %>
|
|
|
|
<h6 style="color:red;float:left; width:6%; text-align:center;">相似度<%=@simi_value.to_i%>%</h3>
|
|
|
|
<% else %>
|
2016-04-15 17:07:38 +08:00
|
|
|
<h6 style="float:left; width:6%; text-align:center;">相似度<%=@simi_value.to_i%>%</h3>
|
2016-04-15 11:28:20 +08:00
|
|
|
<% end %>
|
|
|
|
<h3 style="float:left; width:47%; text-align:center;"><%=dst_name%></h3><div class="cl"></div>
|
2016-04-14 11:29:22 +08:00
|
|
|
<pre id = "program-src_1" style = "display: none" ><%= src_code if src_code%></pre>
|
|
|
|
<pre id = "program-src_2" style = "display: none" ><%= dst_code if dst_code%></pre>
|
|
|
|
<div class = "program-compare-code" id=program-compare-code></div>
|
|
|
|
</article>
|