<commit_before>require 'rubygems'
require 'bundler/setup'
require 'sinatra'
require 'mysql'

get '/hi' do
  "Hello! This is Chandra."
end

get '/result_info' do
 k ="<html><head><title>University of Madras Result 2013 page</title></head><center><body><br><h5>University of Madras Results 2013 - MCA (PG)</h5><br><br>"
 k+="<table border=1 bgcolor=grey size=1000><tr><th>Roll No</th><th>Name</th><th>Date of Birth</th><th>Subject</th><th>Mark</th><th>Subject</th><th>Mark</th><th>Subject</th><th>Mark</th><th>Subject</th><th>Mark</th><th>Subject</th><th>Mark</th><th>Subject</th><th>Mark</th><th>Total</th><th>Average</th><th>University</th><th>Year</th></tr>"

  rollno=params[:rollno]

  db1=Mysql.new('localhost','root','root','college')
  qry="select * from student where rollno=" + rollno.to_s
  ds=db1.query(qry)
  if ds!="nil"
    ds.each do |l|
      k= k +"<tr><td>"+ l.join("</td><td>") + "</td></tr>"
    end
  else
    va="No such roll number exists!"
    return va
  end
  k+="</table><center><br><br><a href=\'/result'\"></body></html>"
  return k
end

get '/result' do
s="<html><head><title>University of Madras Result 2013 page</title></head>
<body><center><br><h3>Madras University Results 2013 - MCA</h3><br>
<form id=\"login\" action=\"/result_info\" method=\"get\">
<table border=\"1\" size=\"500\">
<tr><td align=\"center\">
Roll Number : <input type=\"text\" name=\"rollno\"><br><br>
Click here <input type=\"submit\" value=\"submit\" name=\"submit\">
</td></tr>
</table>
</form>
</center>
</body>
</html>"
end<commit_msg>Code modified to print student result in html page<commit_after>require 'rubygems'
require 'bundler/setup'
require 'sinatra'
require 'mysql'

get '/hi' do
  "Hello! This is Chandra."
end

get '/result_info' do
 k ="<html><head><title>University of Madras Result 2013 page</title></head><center><body><form><br><h3>University of Madras Results 2013 - MCA (PG)</h3><br><br>"
 k+="<table border=1 bgcolor=grey size=1000><tr><th>Roll No</th><th>Name</th><th>Date of Birth</th><th>Subject</th><th>Mark</th><th>Subject</th><th>Mark</th><th>Subject</th><th>Mark</th><th>Subject</th><th>Mark</th><th>Subject</th><th>Mark</th><th>Subject</th><th>Mark</th><th>Total</th><th>Average</th><th>University</th><th>Year</th></tr>"

  rollno=params[:rollno]

  db1=Mysql.new('localhost','root','root','college')
  qry="select * from student where rollno=" + rollno.to_s
  ds=db1.query(qry)
  if ds!="nil"
    ds.each do |l|
      k= k +"<tr><td>"+ l.join("</td><td>") + "</td></tr>"
    end
  else
    va="No such roll number exists!"
    return va
  end
  k+="</table><center><br><br><a href=\'/result'\"><i>Back to home</i></a></form></body></html>"
  return k
end

get '/result' do
s="<html><head><title>University of Madras Result 2013 page</title></head>
<body><center><br><h3>Madras University Results 2013 - MCA</h3><br>
<form id=\"login\" action=\"/result_info\" method=\"get\">
<table border=\"1\" size=\"500\">
<tr><td align=\"center\">
Roll Number : <input type=\"text\" name=\"rollno\"><br><br>
Click here <input type=\"submit\" value=\"submit\" name=\"submit\">
</td></tr>
</table>
</form>
</center>
</body>
</html>"
end
{'fraction_non_alphanumeric': 0.24912947135169358, 'fraction_numerical': 0.019626464070908515, 'mean_word_length': 5.26984126984127, 'pattern_counts': {'":': 0, '<': 192, '<?xml version=': 0, '>': 192, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2209379', 'n_tokens_mistral': 1219, 'n_tokens_neox': 1162, 'n_words': 237}