1,061
edits
Changes
no edit summary
http://study.wgvc.com/cgi-bin/update-deferred.pl
* Update the deferred questions sheet from the zyz-bridge
** Run under cron from Ubuntu account
http://study.wgvc.com/cgi-bin/check-deferred-answers.pl
http://study.wgvc.com/cgi-bin/check-deferred-answers.pl?2s=1
* Grade the 2-to-make-3s from the GSheet.
* 127 2s
* 93 2-letter racks
http://study.wgvc.com/wrong.html
* .js display of questions marked wrong in zyz-bridge
http://study.wgvc.com/cgi-bin/zyz-progress.pl
* Progress against current AnyMemo deck
http://study.wgvc.com/cgi-bin/non-cb0-inserts.pl
* Inserts from Google sheet that are already in non-zer cardboxes
<pre>
#!/usr/bin/perl
use DBI;
# Query as in input, and generate HTML table output
my $query = 'select * from data';
# 1) Connect and get DB handle
my $dbh = connect_db(); # use your own connection here
# 2) Run your query
my $sth = $dbh->prepare($query);
my @loh = @{ $sth->fetchall_arrayref({}) };
my @cols = @{ $sth->{NAME} };
# 3) Generate HTML Table
my $thead = join('', map {"<td>$_</td>"} @cols);
my @rows = ();
for my $hr (@loh) {
push @rows, join('', map {"<td>$_</td>"} @{$hr}{@cols});
}
my $tbody = join ('', map {"<tr>$_</tr>"} @rows);
my $html = qq|<table> $thead <thead> $thead </thead> <tbody> $tbody </tbody> </table>|;
print $html;
</pre>