October 23, 2007
lessons in timeplot *
■ SLG . . . . . Slugging Percentage
■ OBP . . . . . On Base Percentage
■ AVG . . . . . Batting Average
ichiro's career in Japan & MLB
statistics as of oct. 2007
# a sequence of work steps
1. link to timeplot's javascript api code & csv file
2. add 2 event handlers to the body element
3. configure your plot by setting parameters in a script block ...
# sample code & 2 linx within
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script src="http://static.simile.mit.edu/timeplot/api/1.0/timeplot-api.js" type="text/javascript"></script>
<script type="text/javascript">
var timeplot;
function onLoad(){
var eventSource = new Timeplot.DefaultEventSource();
var timeGeometry = new Timeplot.DefaultTimeGeometry({
gridColor: new Timeplot.Color("#000000"),
axisLabelsPlacement: "top"
});
var valueGeometry = new Timeplot.DefaultValueGeometry({
gridColor: "#000000",
min: 0.1,
max: 0.6
});
var plotInfo = [
Timeplot.createPlotInfo({
id: "plot1",
dataSource: new Timeplot.ColumnSource(eventSource,1),
timeGeometry: timeGeometry,
valueGeometry: valueGeometry,
lineColor: "#aaffaa",
showValues: true
}),
Timeplot.createPlotInfo({
id: "plot2",
dataSource: new Timeplot.ColumnSource(eventSource,2),
timeGeometry: timeGeometry,
valueGeometry: valueGeometry,
lineColor: "#aaaaff",
showValues: true
}),
Timeplot.createPlotInfo({
id: "plot3",
dataSource: new Timeplot.ColumnSource(eventSource,3),
timeGeometry: timeGeometry,
valueGeometry: valueGeometry,
lineColor: "#ffaaaa",
showValues: true
})
];
timeplot = Timeplot.create(document.getElementById("my-timeplot"), plotInfo);
timeplot.loadText("test.txt", ",", eventSource);
}
var resizeTimerID = null;
function onResize(){
if (resizeTimerID == null){
resizeTimerID = window.setTimeout(function(){
resizeTimerID = null;
timeplot.repaint();
}, 100);
}
}
</script>
<title>april snow</title>
</head>
<body onload="onLoad();" onresize="onResize();">
<div id="my-timeplot" style="width:300px; height:150px;"></div>
</body>
</html>
posted by fuyubi @ 4:17 PM : show some love (2) | tb (0) |
April 16, 2006
sort by thumbnail *
for another perspective of this blog archives, i put a new template to the test. in short, it publishes recent entries sorted only by thumbnail. click here for more details.
http://aprilsnow.ciao.jp/blog/image.php
if you'd like to generate an image index like this, you have to use the simple plugin "MTGetsrcURL" to get an absolute path from each image tag and rewrite a part of its instructions properly, for it's currently impossible for this plugin to omit entries without images. now you can get the plugin and see its basic instructions here.
http://www.rickdom.com/mt3/archives/2005/08/index.html
at first, you should follow the same way to customize index version (see the latter one). next, delete all the tags representing a list of images and just replace it with either source code below. just as a side note, you should better use the php source code if the web server allows you to execute it.
# php ver.
<ul class="thumbnails">
<MTArchiveList>
<MTEntries category="">
<?php
$src = "<$MTEntryBody getsrcurl="1"$>";
if(strpos($src, ".jpg") != false || strpos($src, ".gif") != false || strpos($src, ".png") != false ){
echo '<li><a href="<$MTEntryPermalink$>" title="<$MTEntryTitle$>">' .
'<img src="<$MTEntryBody getsrcurl="1"$>" alt="<$MTEntryTitle$> image" height="50" />' .
'</a></li>';
}
?>
</MTEntries>
</MTArchiveList>
</ul>
# javascript ver.
<ul class="thumbnails">
<MTArchiveList>
<MTEntries category="">
<script type="text/JavaScript"><!--
src = "<$MTEntryBody getsrcurl="1"$>";
if(src.indexOf(".jpg") != -1 || src.indexOf(".gif") != -1 || src.indexOf(".png") != -1){
document.writeln('<li><a href="<$MTEntryPermalink$>" title="<$MTEntryTitle$>">');
document.writeln('<img src="<$MTEntryBody getsrcurl="1"$>" alt="<$MTEntryTitle$> image" height="50" />');
document.writeln('</a></li>');
}
//--></script>
</MTEntries>
</MTArchiveList>
</ul>
posted by fuyubi @ 1:21 AM : show some love (0) | tb (0) |
February 9, 2006
cms in progress ... *
# introduction
at first, it's just the document for a past experimental web development with php 4.x and it's a personal beta version at least for the moment even if you wish to download it ... or i can also say it wouldn't be finished shortly, or forever? anyway, this is why i start on writing this article now. i'm sorry for the inconvenience.
# concepts
this is a kind of web logging system which is basically optimized for its easy way to keep control and its easy way to be extensible. and it's not necessary for its easy setup on your own hosting service to prepare other database system as well (but you just need to change some file permissions properly).
although it makes some difference whether it looks like a new one or not, i think almost all contents management system (cms) is chiefly consist of a new combination of the applications with old techniques. so i wish mine would be also old and new enough for us to manage it in a sense ...
# features
dynamic publishing with php demo
generates 2 rss feeds
search engine for multiple keywords
instant login system for administrator's panel
simply editable templates and logs, i.e. css, entries, etc.
automatically classified into each monthly archive
shows its own monthly archive according to the calendar
permanent link for each entry
limited to 1 entry a day ...
based on valid xhtml 1.0 transitional
based on valid css 2.0
mail form demo
bookmark demo
rss reader demo
# addons
bulletin board system demo
online gallery demo
mailing lists demo
posted by fuyubi @ 1:18 AM : show some love (0) | tb (0) |
April 21, 2005
BBS *
http://aprilsnow.ciao.jp/test/bbs/bbs.php
posted by fuyubi @ 12:02 AM : show some love (0) | tb (0) |
April 8, 2005
Chat *
http://aprilsnow.ciao.jp/test/chat/entry.php
posted by fuyubi @ 11:19 PM : show some love (2) | tb (0) |
March 31, 2005
Mail *
mail of the MT, by the MT, for the MT
posted by fuyubi @ 1:36 AM : show some love (0) | tb (0) |