01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
System error
error: Can't call method "prepare" on an undefined value at /www/del.icio.us/comp/update line 9.
context:
...
5: </%args>
6: <%init>
7:
8: $dbh = $db->{update};
9:
10: my $upd_get ||= $dbh->prepare(' select UNIX_TIMESTAMP(dt) as dt from resource_update where resource_md5 = md5(?) ');
11: my $upd_set ||= $dbh->prepare(' replace resource_update values(md5(?), now()); ');
12:
13: $resource = lc($resource);
...
code stack: /www/del.icio.us/comp/update:9
/www/del.icio.us/comp/posts/delete:75
/www/del.icio.us/comp/posts/add:130
/www/del.icio.us/site/dhandler:247
/www/del.icio.us/site/autohandler:94
raw error
Can't call method "prepare" on an undefined value at /www/del.icio.us/comp/update line 9.
Trace begun at /usr/share/perl5/HTML/Mason/Exceptions.pm line 131
HTML::Mason::Exceptions::rethrow_exception('Can\'t call method "prepare" on an undefined value at /www/del.icio.us/comp/update line 9.^J') called at /www/del.icio.us/comp/update line 9
HTML::Mason::Commands::__ANON__('dbh', 'DBI::db=HASH(0x1b06140)', 'resource', 'masao', 'set', 1) called at /usr/share/perl5/HTML/Mason/Component.pm line 134
HTML::Mason::Component::run('HTML::Mason::Component::FileBased=HASH(0xfe07c0)', 'dbh', 'DBI::db=HASH(0x1b06140)', 'resource', 'masao', 'set', 1) called at /usr/share/perl5/HTML/Mason/Request.pm line 1074
eval {...} at /usr/share/perl5/HTML/Mason/Request.pm line 1068
HTML::Mason::Request::comp(undef, undef, 'dbh', 'DBI::db=HASH(0x1b06140)', 'resource', 'masao', 'set', 1) called at /www/del.icio.us/comp/posts/delete line 75
HTML::Mason::Commands::__ANON__('dbh', 'DBI::db=HASH(0x1b06140)', 'user', 'HASH(0xfe48f0)', 'url', 'http://www.barnraiser.org/index.php?page=SoftwareBeacon', 'remote_ip', '') called at /usr/share/perl5/HTML/Mason/Component.pm line 134
HTML::Mason::Component::run('HTML::Mason::Component::FileBased=HASH(0x1fe5780)', 'dbh', 'DBI::db=HASH(0x1b06140)', 'user', 'HASH(0xfe48f0)', 'url', 'http://www.barnraiser.org/index.php?page=SoftwareBeacon', 'remote_ip', '') called at /usr/share/perl5/HTML/Mason/Request.pm line 1074
eval {...} at /usr/share/perl5/HTML/Mason/Request.pm line 1068
HTML::Mason::Request::comp(undef, undef, 'dbh', 'DBI::db=HASH(0x1b06140)', 'user', 'HASH(0xfe48f0)', 'url', 'http://www.barnraiser.org/index.php?page=SoftwareBeacon', 'remote_ip', '') called at /www/del.icio.us/comp/posts/add line 130
HTML::Mason::Commands::__ANON__('dbh', 'DBI::db=HASH(0x1b06140)', 'url', 'http://www.barnraiser.org/index.php?page=SoftwareBeacon', 'description', 'Barnraiser', 'user', 'HASH(0xfe48f0)', 'tags', '', 'date', '', 'extended', '', 'fp', 1) called at /usr/share/perl5/HTML/Mason/Component.pm line 134
HTML::Mason::Component::run('HTML::Mason::Component::FileBased=HASH(0xff84e0)', 'dbh', 'DBI::db=HASH(0x1b06140)', 'url', 'http://www.barnraiser.org/index.php?page=SoftwareBeacon', 'description', 'Barnraiser', 'user', 'HASH(0xfe48f0)', 'tags', '', 'date', '', 'extended', '', 'fp', 1) called at /usr/share/perl5/HTML/Mason/Request.pm line 1074
eval {...} at /usr/share/perl5/HTML/Mason/Request.pm line 1068
HTML::Mason::Request::comp(undef, undef, 'dbh', 'DBI::db=HASH(0x1b06140)', 'url', 'http://www.barnraiser.org/index.php?page=SoftwareBeacon', 'description', 'Barnraiser', 'user', 'HASH(0xfe48f0)', 'tags', '', 'date', '', 'extended', '', 'fp', 1) called at /www/del.icio.us/site/dhandler line 247
HTML::Mason::Commands::__ANON__('oldurl', 'http://www.barnraiser.org/index.php?page=SoftwareBeacon', 'notes', '', 'url', 'http://www.barnraiser.org/index.php?page=SoftwareBeacon', 'description', 'Barnraiser', 'tags', '', 'dbh', 'DBI::db=HASH(0x1b06140)', 'auth_user', 'masao', 'items', 10, 'tagview', 'list', 'tagsort', 'alpha', 'bundleview', 'show', 'cookies', 'HASH(0x1fff600)', 'browser', 'ff') called at /usr/share/perl5/HTML/Mason/Component.pm line 134
HTML::Mason::Component::run('HTML::Mason::Component::FileBased=HASH(0x1cf3b70)', 'oldurl', 'http://www.barnraiser.org/index.php?page=SoftwareBeacon', 'notes', '', 'url', 'http://www.barnraiser.org/index.php?page=SoftwareBeacon', 'description', 'Barnraiser', 'tags', '', 'dbh', 'DBI::db=HASH(0x1b06140)', 'auth_user', 'masao', 'items', 10, 'tagview', 'list', 'tagsort', 'alpha', 'bundleview', 'show', 'cookies', 'HASH(0x1fff600)', 'browser', 'ff') called at /usr/share/perl5/HTML/Mason/Request.pm line 1074
eval {...} at /usr/share/perl5/HTML/Mason/Request.pm line 1068
HTML::Mason::Request::comp(undef, undef, 'oldurl', 'http://www.barnraiser.org/index.php?page=SoftwareBeacon', 'notes', '', 'url', 'http://www.barnraiser.org/index.php?page=SoftwareBeacon', 'description', 'Barnraiser', 'tags', '', 'dbh', 'DBI::db=HASH(0x1b06140)', 'auth_user', 'masao', 'items', 10, 'tagview', 'list', 'tagsort', 'alpha', 'bundleview', 'show', 'cookies', 'HASH(0x1fff600)', 'browser', 'ff') called at /usr/share/perl5/HTML/Mason/Request.pm line 760
HTML::Mason::Request::call_next('HTML::Mason::Request::ApacheHandler=HASH(0xffcd50)', 'dbh', 'DBI::db=HASH(0x1b06140)', 'auth_user', 'masao', 'items', 10, 'tagview', 'list', 'tagsort', 'alpha', 'bundleview', 'show', 'cookies', 'HASH(0x1fff600)', 'browser', 'ff') called at /www/del.icio.us/site/autohandler line 94
HTML::Mason::Commands::__ANON__('oldurl', 'http://www.barnraiser.org/index.php?page=SoftwareBeacon', 'notes', '', 'url', 'http://www.barnraiser.org/index.php?page=SoftwareBeacon', 'description', 'Barnraiser', 'tags', '') called at /usr/share/perl5/HTML/Mason/Component.pm line 134
HTML::Mason::Component::run('HTML::Mason::Component::FileBased=HASH(0x1ad7610)', 'oldurl', 'http://www.barnraiser.org/index.php?page=SoftwareBeacon', 'notes', '', 'url', 'http://www.barnraiser.org/index.php?page=SoftwareBeacon', 'description', 'Barnraiser', 'tags', '') called at /usr/share/perl5/HTML/Mason/Request.pm line 1069
eval {...} at /usr/share/perl5/HTML/Mason/Request.pm line 1068
HTML::Mason::Request::comp(undef, undef, undef, 'oldurl', 'http://www.barnraiser.org/index.php?page=SoftwareBeacon', 'notes', '', 'url', 'http://www.barnraiser.org/index.php?page=SoftwareBeacon', 'description', 'Barnraiser', 'tags', '') called at /usr/share/perl5/HTML/Mason/Request.pm line 338
eval {...} at /usr/share/perl5/HTML/Mason/Request.pm line 338
eval {...} at /usr/share/perl5/HTML/Mason/Request.pm line 297
HTML::Mason::Request::exec('HTML::Mason::Request::ApacheHandler=HASH(0xffcd50)') called at /usr/share/perl5/HTML/Mason/ApacheHandler.pm line 134
eval {...} at /usr/share/perl5/HTML/Mason/ApacheHandler.pm line 134
HTML::Mason::Request::ApacheHandler::exec('HTML::Mason::Request::ApacheHandler=HASH(0xffcd50)') called at /usr/share/perl5/HTML/Mason/ApacheHandler.pm line 793
HTML::Mason::ApacheHandler::handle_request('HTML::Mason::ApacheHandler=HASH(0x1a94a20)', 'Apache=SCALAR(0x1ff7070)') called at (eval 43) line 8
HTML::Mason::ApacheHandler::handler('HTML::Mason::ApacheHandler', 'Apache=SCALAR(0x1ff7070)') called at /etc/delicious/config.pl line 0
eval {...} at /etc/delicious/config.pl line 0
# cf. rfc1740
content = STDIN.read
# 4, 4, 16, 2 bytes
magic, version, d1,d2,d3,d4, num_entries = content.unpack('NNN4n')
#p [ magic, version, d1,d2,d3,d4, num_entries ]
start = 4+4+16+2
num_entries.times do |i|
entry_id, offset, length = content[start, 12].unpack("NNN")
if entry_id == 1
print content[offset, length]
end
start += 12
end
j_word/jwd.dic:JWD0015369 結婚する[ケッコン・スル] 結婚(JLN3,JRN4) ケッコン ケッコン JN1;JVE "" JRN4 JK01;JK06 JA14;JA20 "" 0e51a0 marriage 結婚する[ケッコン・スル] "the act of marrying" 夫婦の縁を結ぶこと "" 474/479 DATE="93/5/15"
ZH021
ZH024
ZH026
ZH-27
ZH028
ZH029
#!/usr/local/bin/ruby
require "zlib"
CR = "(?:\r?\n|\r)"
class PDF
def initialize
end
end
cont = ARGF.read
puts cont[/\A.*?#{CR}/]
while cont =~ /^%.*?#{CR}/
cont.sub!(/^%.*?#{CR}/, "")
end
obj = {}
trailer = nil
startxref = 0
until cont.empty?
if cont =~ /\A\s+/
cont.sub!(/\A\s+/, "")
elsif cont =~ /^(\d+ \d+ obj)(.*?)endobj#{CR}?/m
obj[$1] = $2
p $1
cont.sub!(/^(\d+ \d+ obj)(.*?)endobj#{CR}?/m, "")
elsif cont =~ /^xref#{CR}0 (\d+)#{CR}/
cont.sub!(/^xref#{CR}0 (\d+)#{CR}/, "")
xrefs = $1.to_i
#p xrefs
xrefs.times do |i|
cont.sub!(/^.*#{CR}+/, "")
end
elsif cont =~ /^trailer\s*<<(.*?)>>\s*/m
trailer = $1
cont.sub!(/^trailer\s*<<(.*?)>>/m, "")
elsif cont =~ /^startxref#{CR}(\d+)#{CR}/
startxref = $1
cont.sub!(/^startxref#{CR}(\d+)#{CR}/, "")
end
end
p trailer
@info = {}
if trailer =~ /\/Root\s*(\d+ \d+) R/
@info["/Root"] = obj["#$1 obj"]
end
if @info["/Root"] and @info["/Root"] =~ /\/Pages\s*(\d+ \d+) R/
@info["/Pages"] = obj["#$1 obj"]
p @info["/Pages"]
end
if @info["/Pages"] and @info["/Pages"] =~ /\/Kids\s*\[((\d+ \d+ R\s*)+)\]/
@info["/Kids"] = []
$1.split(/(\d+ \d+) R\s*/).each do |e|
next if e.empty?
@info["/Kids"] << obj["#{e} obj"]
end
p @info["/Kids"]
end
if @info["/Kids"]
@info["/Kids"].each do |page|
@info["/Contents"] = []
if page =~ /\/Contents (\d+ \d+) R/
@info["/Contents"] << obj["#$1 obj"]
end
end
p @info["/Contents"][0]
end
if @info["/Contents"]
@info["stream"] = []
@info["/Contents"].each do |cont|
puts cont
if cont =~ /stream#{CR}(.*)endstream#{CR}/m
stream = $1
#puts stream
if cont =~ /\/Filter\s*\/FlateDecode/
stream = Zlib::Inflate.inflate(stream)
end
p stream
@info["stream"] << stream
end
end
end