Parsing Google Finance
HTML
<script src="http://ajax.cdnjs.com/ajax/libs/json2/20110223/json2.js"></script>
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src='jquery2.js'></script>
<script type="text/javascript" src='enginestat.js'></script>
</head>
<body>
<p>Restful webservice that calculates class stats based on inputted data from <b>http://crudwebappmavenized.ncsu.cloudbees.net/index</b>.</p>
<p>This web service displays Average Grade, # of grades, and Standard Deviation of those class grades.</p>
<p>Results are rounded to the nearest whole number.</p>
<p>Backend database(Java) is hosted on Amazon EC2/Cloudbees and the front end(Javascript/HTML) is hosted on Amazon S3.</p>
<p>Student Grade Average report is updated every 6 min by the server. So don't panic if your statistics have not been calculated immediately!</p>
<p>App will run in Google Chrome Browser. I am in the process of making it work in IE.</p>
<p>Please visit my programming blog at <a href="https://s3.amazonaws.com/kvburke/blog.txt">Blog Link</a>
</p>
<table id="statTable">
<tr>
<th>Average/Count/Standard Deviation</th>
</tr>
</table>
</body>
</html>
JavaScript
var url = 'http://crudwebappmavenized.ncsu.cloudbees.net/stats'
$.ajax(url, {
type: 'GET',
crossDomain: true,
dataType: 'json',
contentType: 'application/json',
cache: false,
success: function (result) {
var insert = '';
$.each(result, function (index, item) {
insert += '<tr><td>' + item.average + '</td><tr>';
});
$('#statTable').after(insert);
}
});