FrontPage

2021-1-11

¡Ö²óÁÛ¥¤¥È¥Þ¥ó»ö·ï¡×¤Î¤É¤¦¤Ç¤â¤¤¤¤ÏÃ

¡¡

¡¡
¡¡ÂçÄ;­»Ê¡Ö²óÁÛ¥¤¥È¥Þ¥ó»ö·ï¡×ÆÉλ¡£»ö·ïÅö»þÂçÄͤ¬¤ä¤Ã¤¿¥¸¥ã¡¼¥Ê¥ê¥¹¥È¤È¤·¤Æ¤Î¶ë¤òìü¤¨¤ë¹Ô°Ù¤ËÂФ·¤Æ¤Ï»¿Èݤ¬¤¢¤ê¤½¤¦¤À¤¬¡¢»ä¤Ï¤¤¤¤¤ó¤¸¤ã¤Ê¤¤¤«¤È»×¤¦¡£ÁêËÀ¤ÎÔ¢½ÅÆ׻ˤΡÊÀîºêÄêÆÁ¤Îº´Æ£ÌФò²ð¤·¤Æ¤Î¡Ë°ðÀî²ñ¤È¤Î¤Ä¤Ê¤¬¤ê¤Ë¤â¼«³ÐŪ¤Ç¤¢¤Ã¤¿¤è¤¦¤À¤·¡£
¡¡¤Þ¤¢¡¢¤Ç¤â¡¢¤ä¤Ã¤¿¤³¤È¤Ï¡¢2016ǯ¤Ë½Ð¤¿Ô¢½Å¤ÎÃø½ñ¡Ö½»Í§¶ä¹ÔÈë»Ë¡×¤Ç¤Ð¤ì¤Á¤ã¤Ã¤Æ¤ë¤«¤é¡¢º£¤µ¤é»¿Èݤâ¤Ê¤¤¤Î¤«¡£
¡¡

¡¡
¡¡°Ê²¼¡¢¡Ö²óÁÛ¥¤¥È¥Þ¥ó»ö·ï¡×¤Î¡¢ËܶڤȤϴط¸¤Ê¤¤¡¢¤É¤¦¤Ç¤â¤¤¤¤Ïá£
¡¡¥¤¥È¥Þ¥ó»ö·ïȯ³ÐÁ°¤Î1990ǯ1·î¤´¤í¡¢ÆüËܷкѿ·Ê¹µ­¼Ô¤ÎÂçÄͤϺ⳦¥¯¥é¥Ö¡Ê·ÐÃÄÏ¢¤ä·ÐºÑƱͧ²ñ¤Ê¤É¤òôÅö¤¹¤ëµ­¼Ô¥¯¥é¥Ö¡Ë¤Ë°¤·¤Æ¤¤¤¿¤¬¡¢¥¯¥é¥Öµ­¼Ô¤¿¤Á¤ÎÂ礭¤Ê´Ø¿´»ö¤Ï¼¡´ü·ÐÃÄÏ¢²ñĹ¿Í»ö¤Ç¡¢¿·ÆüÅ´½Ð¿È¤ÎºØÆ£±Ñ»ÍϺ¤¬5·î°Ê¹ß3´üÌܤâ³Åꤹ¤ë¤Î¤«¤É¤¦¤«¤È¤¤¤¦¤³¤È¤À¤Ã¤¿¡£
¡¡±Ä¶ÈȪ½Ð¿È¤ÎºØÆ£¤ÏÍÛµ¤¤Ç¿ÊÛ¤À¤Ã¤¿¤¬¡¢µ­¼Ô¤¿¤Á¤Î´Ö¤Ç¤ÎɾȽ¤Ï˧¤·¤¯¤Ê¤¯¡¢¡Ö°Å¶ò¤ÎÄ벦¡×¤È¸À¤¦¼Ô¤â¤¤¤¿¤Û¤É¡£
¡¡ÂФ·¤Æ¡¢¹«´Ö¡¢¼¡´ü²ñŸõÊä¤È¸À¤ï¤ì¤Æ¤¤¤¿ÅìµþÅÅÎϲñŤÎÊ¿´ä³°»Í¤Ï¡¢²ÉÌÛ¤ÇëÄÊÛ¤À¤Ã¤¿¤¬¡¢Æɽñ²È¤ÇÇî³Ø¿ºÍ¤È¸«¤é¤ì¤Æ¤¤¤¿¡£

¡¡Åö»þ¡¢Ê¿´ä¤µ¤ó¤Ï·ÐºÑ»ï¤Ë½ñɾ¤Ê¤É¤ò½ñ¤­¡¢Å¯³Ø½ñ¤«¤éʸ³Ø½ñ¤Þ¤Ç¸Åº£ÅìÀ¾¤Î¸Åŵ¤ò¾ÄÎĤ·¤Æ¤¤¤ë¤è¤¦¤Ê¥¤¥á¡¼¥¸¤¬¤Ç¤­¤¢¤¬¤Ã¤Æ¤¤¤Þ¤·¤¿¤¬¡¢¼Â¤Ï¡¢¤½¤ì¤Ï¤Á¤ç¤Ã¤È°ã¤¦¤ó¤Ç¤¹¤Í¡£
¡¡ËÜÅö¤Ï¡¢ÅìÅŤÎÁí̳Éô¤Ë¥´¡¼¥¹¥È¥é¥¤¥¿¡¼¤¬¤¤¤Æ¡¢¤½¤Î¿Í¤¬ËܤòÆɤó¤Ç½ñ¤¤¤Æ¤¤¤¿¤Î¤Ç¤¹¡£Ëͤϡ¢¤½¤Î¿Í¤ÎÂǤÁÌÀ¤±Ïäòʹ¤¤¤Æ¤¤¤ë¤Î¤Ç´Ö°ã¤¤¤¢¤ê¤Þ¤»¤ó¡£

¡¡¤¿¤À¤·¡¢Ê¿´ä¤¬Æɽñ²È¤Ç¤Ï¤Ê¤«¤Ã¤¿¤Î¤«¤È¤¤¤¦¤È¡¢¤½¤ó¤Ê¤³¤È¤Ï¤Ê¤¯¤Æ¡¢ÂçÄͤÏÌë²ó¤êÀè¤ÎÊ¿´äÅ¡¤Î±þÀܴ֤ǡ¢É³¤Ç¤¯¤¯¤é¤ì¤¿ÄÇ̾ÎÛ»°Á´½¸¤òÌܷ⤷¤Æ¤¤¤ë¡ÊÄÇ̾ÎÛ»°¤Ïºâ³¦¿Í¤¬Æɤà¤è¤¦¤Êºî²È¤Ç¤Ï¤Ê¤¤¤¿¤á¡¢ÂçÄͤϡ¢Ê¿´ä¤ÎÈëÌ©¤ò³À´Ö¸«¤¿¤è¤¦¤Êµ¤¤¬¤·¤¿¤È¤¤¤¦¡Ë¡£¤Þ¤¿¡¢Ê¿´äÅ¡¤ÎÃϲ¼¤Ë¤¢¤Ã¤¿½½¾ö¤Û¤É¤Î½ñ¸Ë¤Ë¤Ï¡¢¿Þ½ñ´Û¤Ë¤¢¤ë¤è¤¦¤Ê°ÜÆ°¼°¤Î½ñ²Í¤¬Ê¤ó¤Ç¤¤¤¿¡£

ºî¤é¤ì¤¿¥¤¥á¡¼¥¸¤Î¦Ì̤¬¤¢¤Ã¤¿¤È¤Ï¤¤¤¨¡¢Ê¿´ä¤µ¤ó¤¬ºâ³¦¿ï°ì¤È¤¤¤Ã¤Æ¤â¤¤¤¤¡ÈÆɽñ²È¡É¤À¤Ã¤¿¤Î¤Ï´Ö°ã¤¤¤Ê¤¯¡¢±Ä¶È¥Þ¥ó¤òÃϤǹԤ¯ºØÆ£¤µ¤ó¤ËÈæ¤Ù¤ë¤È¡¢¡ÈÃμ±¿Í¡É¡È¥¤¥ó¥Æ¥ê¡É¤ÎÈÏáƤËÆþ¤ê¡¢¿Í³Ê¼±¸«¤Î¤¢¤ë¿Íʪ¤À¤Ã¤¿¤Î¤Ï´Ö°ã¤¤¤Ê¤«¤Ã¤¿¤ó¤Ç¤¹¤¬¤Í¡£

¡¡¤½¤¦»×¤Ã¤Æ¤ó¤Ê¤é¡¢¥¤¥È¥Þ¥ó»ö·ï¤È¤Ï²¿¤Î´Ø·¸¤â¤Ê¤¤¤ó¤À¤«¤é¡¢¥´¡¼¥¹¥È¥é¥¤¥¿¡¼¤Î¤³¤È¤Ï˽Ϫ¤·¤Ê¤¯¤Æ¤â¤¤¤¤¤Î¤Ë¡£


2020-12-27

2021ǯ¤ÎJRA½Å¾Þ¥«¥ì¥ó¥À¡¼¤ÎºîÀ®

¡¡

calendar.png

¡¡JRA¤ÏÎãǯGoogle¥«¥ì¥ó¥À¡¼¤Ê¤É¤ËÅÐÏ¿¤Ç¤­¤ë³«ºÅÆüÄø¤ä½Å¾ÞÆüÄø¤ò¤Þ¤È¤á¤¿ics¥Õ¥¡¥¤¥ë¤òÄ󶡤·¤Æ¤¤¤ë¡Ê¤³¤Á¤é¤Î¥Ú¡¼¥¸»²¾È¡Ë¡£
¡¡¤·¤«¤·¡¢2020/12/27¸½ºß¡¢2021ǯ¤Î³«ºÅÆüÄø¤Îics¥Õ¥¡¥¤¥ë¤Ï¤¹¤Ç¤ËÄ󶡤µ¤ì¤Æ¤¤¤ë¤¬¡¢½Å¾ÞÆüÄø¤ÎÊý¤Ï¤Þ¤ÀÄ󶡤µ¤ì¤Æ¤¤¤Ê¤¤¡£¤³¤ì¤Ï¡¢°ìÉô¤Î½Å¾Þ¤Î³ÊÉÕ¤±¤¬¤Þ¤À³ÎÄꤷ¤Æ¤¤¤Ê¤¤¤¿¤á¤À¤È»×¤ï¤ì¤ë¡£Àè¤Î¥Ú¡¼¥¸¤Ë¤Ï¡¢

Ãíµ­¡§	½Å¾Þ¥¹¥±¥¸¥å¡¼¥ë¥Õ¥¡¥¤¥ë¤Ï2021ǯ1·îÃæ½Ü¤Ë¥¢¥Ã¥×ͽÄê¤Ç¤¹¡£

¤È¤¢¤ë¤¿¤á¡¢¤â¤¦Æó¡¢»°½µ´ÖÂԤƤФ¤¤¤¤Î¤À¤¬¡¢»ä¤È¤·¤Æ¤Ï¡¢Ç¯ÌÀ¤±¤Ë¤Ï¶âÇդγ«ºÅÆüÄø¤ò¤É¤¦¤·¤Æ¤âGoogle¥«¥ì¥ó¥À¡¼¤Ëɽ¼¨¤·¤Æ¤ª¤­¤¿¤¤¡ª
¡¡¤½¤³¤Ç¡¢¤¹¤Ç¤ËJRA¤«¤éÄ󶡤µ¤ì¤Æ¤¤¤ë³ÊÉÕ¤±Ì¤³ÎÄê¤Î¾ðÊó¤ò´Þ¤à2021ǯ¤Î½Å¾Þ¥ì¡¼¥¹°ìÍ÷¤Î¥Ú¡¼¥¸¤Î¥Ç¡¼¥¿¤ò¸µ¤Ë¡¢¾¡¼ê¤Ëics¥Õ¥¡¥¤¥ë¤òºîÀ®¤·¤Æ¡¢Google¥«¥ì¥ó¥À¡¼¤ËÅÐÏ¿¤·¤Æ¤ß¤¿¡£
¡¡°Ê²¼¤Î¥¹¥¯¥ê¥×¥È(makevcal.pl)¤ò¼Â¹Ô¤·¡¢

./makevcal.pl > grace.ics

¡¡ºîÀ®¤µ¤ì¤¿ics¥Õ¥¡¥¤¥ë¤òGoogle¥«¥ì¥ó¥À¡¼¤Ë¥¤¥ó¥Ý¡¼¥È¤¹¤ë¤À¤±¡£

#!/usr/bin/perl
use strict;
use warnings;
use LWP::UserAgent;
use HTML::TableExtract;
use Time::Piece;
use Time::Seconds;
use utf8;
binmode(STDOUT, ":utf8");

my $url = 'https://www.jra.go.jp/datafile/seiseki/replay/2021/jyusyo.html';
my $ua = LWP::UserAgent->new();
$ua->agent('Mozilla/4.0 (compatible; MSIE 6.0\'; Windows NT 5.0;)');
my $res = $ua->get($url);
my $html = $res->decoded_content;

my $te = HTML::TableExtract->new();
$te->parse($html);
my ($ts) = $te->first_table_found();

print("BEGIN:VCALENDAR\n");
print("VERSIONS:2.0\n");
print("X-WR-CALNAME:JRAGRADERACE2021\n");
print("X-WR-TIMEZONE:Asia/Tokyo\n");

#[0] \ "1·î5Æü²ÐÍË",
#[1] \ "G­·Ã滳¶âÇÕ",
#[2] \ "Ã滳",
#[3] \ "4ºÐ°Ê¾å",
#[4] \ "¼Ç2,000¥á¡¼¥È¥ë",

for my $row ($ts->rows) {
    my $date = $row->[0];
    my $desc = $row->[1];
    my $location = $row->[2];
    my $age = $row->[3];
    my $course = $row->[4];

    next if ($date eq "·îÆü");

    $date =~ m/(\d+)·î(\d+)Æü/;
    my $mon = $1;
    my $day = $2;
    $date = sprintf("2021%02d%02d", $mon, $day);
    my $d = Time::Piece->strptime($date, '%Y%m%d');

    print("BEGIN:VEVENT\n");
    printf("DTSTART;VALUE=DATE:%s\n", $d->strftime("%Y%m%d"));
    $d += ONE_DAY;
    printf("DTEND;VALUE=DATE:%s\n", $d->strftime("%Y%m%d"));
    
    $desc =~ m/(G(­µ|­¶|­·)|½Å¾Þ)(.*)/;
    my $grade = $1;
    my $name = $3;
    $grade =~ s/­µ/I/;
    $grade =~ s/­¶/II/;
    $grade =~ s/­·/III/;

    printf("SUMMARY:%s(%s)\n", $name, $grade);
    printf("LOCATION:%s¶¥ÇϾì\n", $location);
    printf("DESCRIPTION:%s %s\n", $age, $course);
    print("END:VEVENT\n");
}

print("END:VCALENDAR\n");

¡¡Ãí°ÕÅÀ¤È¤·¤Æ¤Ï¡¢¾å½Ò¤ÎÄ̤ꡢ2020/12/27»þÅÀ¤Ç¤Ï¡¢³ÊÉÕ¤±Ì¤³ÎÄê¤Î½Å¾Þ¤¬¤¢¤ë¤³¤È¡£2021ǯ¤Î½Å¾Þ¥ì¡¼¥¹°ìÍ÷¤Î¥Ú¡¼¥¸¤Ë¤Ï¡¢°Ê²¼¤Î¤è¤¦¤ÊÃí°Õ½ñ¤­¤¬Åº¤¨¤é¤ì¤Æ¤¤¤ë¡£

Ãíµ­¡§	°ªS¤ÏG­·³ÊÉÕ¿½ÀÁÃæ
Ãíµ­¡§	Å쥹¥ÝÇÕ2ºÐS¤ÏG­¶³ÊÉÕ¿½ÀÁÃæ

¡¡Â¿Ê¬¡¢¿½ÀÁÄ̤ê¤Î³ÊÉÕ¤±¤Ë¤Ê¤ë¤ó¤À¤í¤¦¤¬¡¢²áµî¤Ë¤Ï¿½ÀÁ¤¬Ä̤é¤Ê¤«¤Ã¤¿¤³¤È¤â¤¢¤ë¤é¤·¤¯¡¢ÌýÃǤǤ­¤Ê¤¤¡£
¡¡¾åµ­¤Î½Å¾Þ¤Î³ÊÉÕ¤±¤¬³ÎÄꤷ¤¿¤é¡¢¿·¤¿¤Ëics¥Õ¥¡¥¤¥ë¤òºî¤êľ¤¹¤«¡¢JRA¤¬Ä󶡤¹¤ëics¥Õ¥¡¥¤¥ë¤ò¥²¥Ã¥È¤¹¤ë¤«¤·¤Æ¡¢Google¥«¥ì¥ó¥À¡¼¤Ë¥¤¥ó¥Ý¡¼¥È¤·Ä¾¤¹¤«¡¢Google¥«¥ì¥ó¥À¡¼¾å¤Ç¡¢2021/05/29¡ÊÅڡˤΰªS¡Ê¡Ö½Å¾Þ¡×¤ò¡ÖGIII¡×¤Ø¡©¡Ë¤È¡¢2021/11/20¡ÊÅڡˤÎÅ쥹¥ÝÇÕ2ºÐS¡Ê¡ÖGIII¡×¤ò¡ÖGII¡×¤Ø¡©¡Ë¤Î¾ðÊó¤ò¼ê¤Ç½¤Àµ¤·¤Æ¤¯¤À¤µ¤¤¡£
¡¡¤¤¤ä¡¢¤½¤ì¤Ê¤éÆó¡¢»°½µ´ÖÂԤƤ衢¤Ã¤ÆÏäǤ¹¤¬¡£


2020-12-17

google-code-prettify¤ò»È¤Ã¤¿¥×¥é¥°¥¤¥ó

¡¡

¡¡FreeStyleWiki¤ÎËܲȤΥµ¥¤¥È¤Ë°Ê²¼¤Î¤è¤¦¤Ê¥×¥é¥°¥¤¥ó¤¬Åê¹Æ¤µ¤ì¤Æ¤¤¤Þ¤¹¡£

  • BugTrack-plugin/376 google-code-prettify ¤ò»È¤Ã¤¿¥·¥ó¥¿¥Ã¥¯¥¹¡¦¥Ï¥¤¥é¥¤¥È¤Ç¤¹¡£

¡¡¤³¤Î¥×¥é¥°¥¤¥ó¤Ï¡¢Google¤¬Ä󶡤·¤Æ¤¤¤¿¥·¥ó¥¿¥Ã¥¯¥¹¥Ï¥¤¥é¥¤¥È¤Î¤¿¤á¤Î¥é¥¤¥Ö¥é¥ê¤Ç¤¢¤ë¡Ögoogle-code-prettify¡×¤òÍøÍѤ·¤¿¤â¤Î¡Êº¸µ­¤Î¥µ¥¤¥È¤ò¸«¤ë¤È¡ÖThis repository has been archived and is no longer maintained.¡×¤Ê¤ó¤Æ½ñ¤¤¤Æ¤¢¤ê¤Þ¤¹¤¬¡Ä¡Ä¡Ë¡£
¡¡¤Ç¤â¡¢¥³¥á¥ó¥ÈÍó¤Ë¡Ö1¥Ú¡¼¥¸¤¢¤¿¤êÊ£¿ô²ó¡¢Æ±¥×¥é¥°¥¤¥ó¤òµ­½Ò¤¹¤ë¤È¤­¤ËÀµ¤·¤¤·ë²Ì¤Ë¤Ê¤ê¤Þ¤»¤ó¡£¡×¤È¤¢¤ê¡¢¤¢¤Þ¤ê»È¤¤¾¡¼ê¤¬¤è¤¯¤Ê¤µ¤½¤¦¡£
¡¡¤½¤³¤Ç¡¢¤Á¤ç¤³¤Ã¤È½ñ¤­Ä¾¤·¤Æ1¥Ú¡¼¥¸¤ËÊ£¿ô¸Ä½ñ¤¤¤Æ¤âÂç¾æÉפˤ·¤Æ¡¢¤Ä¤¤¤Ç¤Ë¹ÔÈÖ¹æɽ¼¨¤Ë¤âÂбþ¤·¤Æ¤ß¤Þ¤·¤¿¡£

¥¤¥ó¥¹¥È¡¼¥ë

  • °Ê²¼¤Î¥Õ¥¡¥¤¥ë¤ò¥À¥¦¥ó¥í¡¼¥É¤·¡¢²òÅà¸å¡¢plugin°Ê²¼¤Ë¥³¥Ô¡¼¤·¤Æ¤¯¤À¤µ¤¤¡£
  • ¤½¤Î¤Þ¤Þ¤Ç¤Ï¹ÔÈֹ椬5¹Ô¤ª¤­¤Ë¤·¤«É½¼¨¤µ¤ì¤Þ¤»¤ó¡£Ëè¹Ôɽ¼¨¤¹¤ë¤¿¤á¤Ë¤Ï°Ê²¼¤ò¥æ¡¼¥¶¡¼ÄêµÁ¥¹¥¿¥¤¥ë¤ËÀßÄꤷ¤Æ¤¯¤À¤µ¤¤¡£
.prettyprint ol.linenums li {list-style-type: decimal; }

»È¤¤Êý

¡¡°Ê²¼¤Î¤è¤¦¤Ë¥Ö¥í¥Ã¥¯¤Ç¤¯¤¯¤ë¤À¤±¡£¸À¸ì¤Î»ØÄê¤ò¹Ô¤¦É¬ÍפϤ¢¤ê¤Þ¤»¤ó¡£Âбþ¤·¤Æ¤¤¤ë¸À¸ì¤Ï¤³¤Á¤é¤ò»²¾È¤Î¤³¤È¡£

{{pp
#! /usr/bin/perl
use strict;
use warnings;

print "Hello World.\n";
}}
#! /usr/bin/perl
use strict;
use warnings;

print "Hello World.\n";

{{ppl
#! /usr/bin/python

print("Hello World")
}}
#! /usr/bin/python

print("Hello World")

¥Æ¡¼¥Þ

¡¡Install.pm¤Î13¹ÔÌܤÇskin¤ò¡Ödesert¡×¤Ë·è¤áÂǤÁ¤ÇÀßÄꤷ¤Æ¤Þ¤¹¡£

my $js = "<script src=\"https://cdn.jsdelivr.net/gh/google/code-prettify\@master/loader/run_prettify.js?skin=desert\"></script>";

¡¡Â¾¤Î¥Æ¡¼¥Þ¤¬¤¤¤¤¾ì¹ç¤Ï½ñ¤­´¹¤¨¤Æ¤¯¤À¤µ¤¤¡£

2020-12-16

ISBN¤Î13·å¤«¤é10·å¤Ø¤ÎÊÑ´¹

¡¡

¡¡RakutenBooksSearch ¥×¥é¥°¥¤¥ó¤ò½ñ¤¤¤¿¤È¤­º¤¤Ã¤¿¤Î¤Ï¡¢³ÚÅ·¥Ö¥Ã¥¯¥¹Áí¹ç¸¡º÷API¤ÇÆÀ¤é¤ì¤ë¾ðÊó¤ÎÃæ¤Ë¡¢10·å¤ÎISBN¤¬¤Ê¤¯¡¢13·å¤Î¤â¤Î¤·¤«¤Ê¤¤¤³¤È¡£Amazon¤Ç¤Ï¡¢10·å¤ÎISBN¤¬½ñÀҤξ¦ÉÊ´ÉÍý¤Î¤¿¤á¤ÎÈÖ¹æ¤È¤·¤Æ»È¤ï¤ì¤Æ¤ª¤ê¡¢Î㤨¤Ð¤³¤ì¤¬¡Ö4150314624¡×¤Ç¤¢¤ë¡Ö¿®Ä¹Åç¤Î»´·à¡×¤Î¾¦ÉÊ¥Ú¡¼¥¸¤Ø¤Î¥ê¥ó¥¯¤Ï¡¢

¤È½ñ¤±¤ë¤Î¤À¤¬¡¢13·å¤ÎÊý¤¬¤ï¤«¤Ã¤Æ¤â¥ê¥ó¥¯¤Ïºî¤ì¤Ê¤¤¡£
¡¡¤·¤«¤¿¤Ê¤¤¤Î¤Ç¡¢13·å¤ÎISBN¤ò»È¤Ã¤ÆAmazon¤Ç¸¡º÷¤·¤¿·ë²Ì¤Î¥Ú¡¼¥¸¤Ø¤Î¥ê¥ó¥¯¤Ç¤ªÃã¤òÂù¤·¤Æ¤ª¤¤¤¿¤Î¤À¤¬¡¢º£¤µ¤é¤Ê¤¬¤é¤Á¤ç¤Ã¤ÈÄ´¤Ù¤Æ¤ß¤¿¤é¡¢Wikipedia¤Î¡ÖISBN¡×¤Î¥Ú¡¼¥¸¤Ë¡¢13·å¤«¤é10·å¤Ø¤ÎÊÑ´¹ÊýË¡¡Ê¤È¤¤¤¦¤«¥Á¥§¥Ã¥¯¥Ç¥£¥¸¥Ã¥È¤Î·×»»ÊýË¡¡Ë¤¬½ñ¤¤¤Æ¤¢¤Ã¤¿¡£
¡¡¤½¤â¤½¤âWikipedia¤Ë¤Ï¡¢

2007ǯ°Ê¹ß¤Î¿·´©½ñ¤Ë¤ÏÅö½é¤«¤é13·å¤Î¿·µ¬³ÊISBN¤¬ÉÕ¤±¤é¤ì¤Æ¤ª¤ê¡¢10·åISBN¤Ï¿·¤¿¤ËȯÈÖ¤·¤Ê¤¤¡£

¤È¤¢¤ë¤Î¤À¤¬¡¢Amazon¤Ç¤Ïº£¤â10·å¤Î¤â¤Î¤¬¾¦ÉÊ´ÉÍý¤Ë»È¤ï¤ì¤Æ¤¤¤ë¤Î¤Ï¾å½Ò¤ÎÄ̤ê¡ÊAmazon¤Î½ñÀҤξ¦ÉÊ¥Ú¡¼¥¸¤Ë¤Ï¡¢2007ǯ°Ê¹ß¤Î½ÐÈÇʪ¤Ç¤¢¤Ã¤Æ¤â¡¢13·å¤Î¤â¤Î¤È10·å¤Î¤â¤Î¤ÎξÊý¤¬µ­ºÜ¤µ¤ì¤Æ¤¤¤ë¡Ë¡£
¡¡¤Ç¡¢13·å¤«¤é10·å¤Ø¤ÎÊÑ´¹¤Ï¡¢

  • Ƭ¤Î3·å¡ÊÀÜƬµ­¹æ¡Ë¤ò¼è¤êµî¤ê
  • ËöÈø¤Î1·å¡Ê¥Á¥§¥Ã¥¯¥Ç¥£¥¸¥Ã¥È¡Ë¤â¼è¤êµî¤Ã¤Æ
  • »Ä¤Ã¤¿9·å¤«¤é¥Á¥§¥Ã¥¯¥Ç¥£¥¸¥Ã¥È¤ò·×»»¤·Ä¾¤·¤Æ
  • ¤½¤ì¤òËöÈø¤Ë¤¯¤Ã¤Ä¤±¤Æ10·å¤Ë¤¹¤ë

¤È¤¤¤¦¤â¤Î¡£
¡¡10·å¤ÎISBN¤Î¥Á¥§¥Ã¥¯¥Ç¥£¥¸¥Ã¥È¤Î·×»»ÊýË¡¤Ï°Ê²¼¤ÎÄ̤ꡣWikipedia¤«¤é¤½¤Î¤Þ¤Þ°úÍѤ¹¤ë¡£

µìµ¬³Ê¤ÎISBN (ISBN-10) ¤Î¥Á¥§¥Ã¥¯¥Ç¥£¥¸¥Ã¥È¤Ï¡¢¡Ö¥â¥¸¥å¥é¥¹11 ¥¦¥§¥¤¥È10-2¡×¤È¤¤¤¦·×»»Ë¡¤Ë¤Æ»»½Ð¤µ¤ì¤ë¡£¡Ê¥Á¥§¥Ã¥¯¥Ç¥£¥¸¥Ã¥È¤ò½ü¤¤¤¿º¸Â¦¤Î·å¤«¤é10¡¢9¡¢8¡Ä2¤ò³Ý¤±¤Æ¤½¤ì¤é¤ÎϤò¼è¤ë¡£Ï¤ò11¤Ç³ä¤Ã¤Æ½Ð¤¿Í¾¤ê¤ò11¤«¤é°ú¤¯¡Ë

¤³¤³¤Ç¡¢Îã¤È¤·¤Æ ISBN4-10-109205-¢¢ ¤Î¥Á¥§¥Ã¥¯¥Ç¥£¥¸¥Ã¥È¡Ê¢¢Éôʬ¡Ë¤òµá¤á¤Æ¤ß¤ë¡£

4¡ß10 + 1¡ß9 + 0¡ß8 + 1¡ß7 + 0¡ß6 + 9¡ß5 + 2¡ß4 + 0¡ß3 + 5¡ß2
= 40  +  9  +  0  +  7  +  0  +  45 +  8  +  0  +  10
= 119
119 ¡à 11 = 10 ¤¢¤Þ¤ê 9
11 - 9 = 2

¤è¤Ã¤Æ¡¢¤³¤ÎISBN¤Î¥Á¥§¥Ã¥¯¥Ç¥£¥¸¥Ã¥È¤Ï2¤Ç¤¢¤ë¡£¤Ê¤ª¡¢·×»»·ë²Ì¤¬10¤Ë¤Ê¤Ã¤¿¾ì¹ç¡¢10¤ÎÂå¤ï¤ê¤ËX¡Ê¥¢¥ë¥Õ¥¡¥Ù¥Ã¥È¤ÎÂçʸ»ú¡Ë¤òÍѤ¤¤ë¡£¤Þ¤¿¡¢11¤Ë¤Ê¤Ã¤¿¾ì¹ç¤Ï¡¢0¤È¤Ê¤ë¡£

¡¡¤³¤ì¤òPerl¤Ç½ñ¤¤¤Æ¤ß¤¿¡£Qiita¤Ê¤ó¤«¤ò¸«¤ë¤È¡¢°ì¹Ô¤Ç½ñ¤¤¤Æ¤ß¤¿Åª¤Ê¤«¤Ã¤³¤¤¤¤¥³¡¼¥É¤¬¥¶¥¯¥¶¥¯¸«¤Ä¤«¤ë¤Î¤À¤¬¡¢°Ê²¼¤Ï¥¢¥Û¤ß¤¿¤¤¤Ë¶òľ¤Ê¤â¤Î¡£

#! /usr/bin/perl
use strict;
use warnings;

my $isbn13 = "9784334790721";

my $cd = 0;
for my $i (3..11) {
    my $c = substr($isbn13, $i, 1);
    $cd += $c * (10 - ($i - 3));
}

$cd = $cd % 11;
$cd = 11 - $cd;
if ($cd == 10) {
    $cd = "X";
} elsif ($cd == 11) {
    $cd = 0;
}
my $isbn10 = substr($isbn13, 3, 9).$cd;

print "$isbn10\n";

¡¡¤³¤ì¤òRakutenBooksSearch ¥×¥é¥°¥¤¥ó¤Ë¤âÁȤ߹þ¤ó¤Ç¡¢Amazon¤Ø¤Î¥ê¥ó¥¯¤ò¤¹¤Ã¤­¤ê¤·¤¿¤â¤Î¤Ë½¤Àµ¤·¤Æ¤ª¤¤¤¿¡£


2020-12-15

Leaflet Map ¥×¥é¥°¥¤¥ó

¡¡

¡¡Google Maps API¤Î»ÅÍÍÊѹ¹¤Î¤»¤¤¤ÇÆ°¤«¤Ê¤¯¤Ê¤Ã¤Æµ×¤·¤¤¡ÖGoogle Maps API V3¤òÍѤ¤¤¿¥×¥é¥°¥¤¥ó¡×¤ËÂå¤ï¤ë¡¢Leaflet¤È¤¤¤¦JavaScript¤Î¥é¥¤¥Ö¥é¥ê¤ò»È¤Ã¤¿ÃÏ¿Þɽ¼¨¤Î¤¿¤á¤ÎFreeStyleWikiÍѥץ饰¥¤¥ó¤òºî¤Ã¤Æ¤ß¤Þ¤·¤¿¡£
¡¡

¥¤¥ó¥¹¥È¡¼¥ë

  • °Ê²¼¤Î¥Õ¥¡¥¤¥ë¤ò¥À¥¦¥ó¥í¡¼¥É¤·¤Æ¡¢plugin°Ê²¼¤Ë¥¤¥ó¥¹¥È¡¼¥ë¤·¤Þ¤¹¡£
  • ¤µ¤é¤Ë°Ê²¼¤Î¥â¥¸¥å¡¼¥ë¤ò¥¤¥ó¥¹¥È¡¼¥ë¤·¤Þ¤¹¡£
    • JSON¤Î¥¤¥ó¥¹¥È¡¼¥ë
      • ¤³¤Î¥×¥é¥°¥¤¥ó¤Ç¤Ï¡¢JSON¤«¤éPerl¤Î¥Ç¡¼¥¿¹½Â¤¤Ø¤ÎÊÑ´¹¤ËJSON¤È¤¤¤¦¥â¥¸¥å¡¼¥ë¤ò»È¤Ã¤Æ¤¤¤Þ¤¹¤Î¤Ç¡¢¤³¤ì¤ò¥¤¥ó¥¹¥È¡¼¥ë¤·¤Þ¤¹¡£ËÜ¥µ¥¤¥È¤¬±¿ÍѤµ¤ì¤Æ¤¤¤ë¤µ¤¯¤é¥¤¥ó¥¿¡¼¥Í¥Ã¥È¤Î¥µ¡¼¥Ð¡¼¤Î¾ì¹ç¡¢¤³¤Á¤é¤Î¥Ú¡¼¥¸¤Ë½ñ¤«¤ì¤Æ¤¤¤ë¤È¤ª¤ê¤Î¼ê½ç¤Ç¡¢°ìÈ̥桼¥¶¡¼´Ä¶­¤Ë¥â¥¸¥å¡¼¥ë¤ò¥¤¥ó¥¹¥È¡¼¥ë¤¹¤ë¤¿¤á¤Î½àÈ÷¤òÀ°¤¨¤ì¤Ð¡¢¸å¤Ï´Êñ¡£
      • CPAN¥·¥§¥ë¤«¤é¡¢°Ê²¼¤Î¤è¤¦¤Ë¤ä¤ì¤ÐOK¡£
cpan[1]> install JSON

¡¡

¥â¥¸¥å¡¼¥ë¤Î¥Ñ¥¹¤ÎÄɲÃ

¡¡¾åµ­¤Ç¥¤¥ó¥¹¥È¡¼¥ë¤·¤¿¥â¥¸¥å¡¼¥ë¤¬FreeStyleWiki¤Î¥×¥é¥°¥¤¥ó¤«¤é»È¤¨¤ë¤è¤¦¤Ë¡¢°ìÈ̥桼¥¶¡¼´Ä¶­¤Ç¤ÎCPAN¥â¥¸¥å¡¼¥ë¤Î¥Ñ¥¹¤ò¡¢FreeStyleWiki¤Îwiki.cgi¤ËÄɲä·¤Þ¤¹¡£
¡¡wiki.cgi¤Î20¹ÔÌÜÊÕ¤ê¤Î°Ê²¼¤Î¹Ô¤Ë¡¢

use lib './lib';

¡¡°ìÈ̥桼¥¶¡¼´Ä¶­¤ÇCPAN¥â¥¸¥å¡¼¥ë¤ò¥¤¥ó¥¹¥È¡¼¥ë¤·¤¿¥Ñ¥¹¤òÄɲ乤ì¤ÐOK¡£

use lib qw(/home/xxxxxxxxx/perl5/lib/perl5/ ./lib);

¡¡

llmap ¥×¥é¥°¥¤¥ó

{{llmap 35.658780957303776, 139.745411447452,500,500,16,gsi}}

¡¡

  • ¡Ö35.658780957303776¡×¡Ö139.745411447452¡×¤Ï¡¢¤½¤ì¤¾¤ì°ÞÅÙ¡¢·ÐÅÙ¡£É¬¿Ü¤Î¥Ñ¥é¥á¡¼¥¿¤Ç¤¹¡£
  • ¡Ö500¡×¡Ö500¡×¤Ï¡¢¥Þ¥Ã¥×Îΰè¤Î¥µ¥¤¥º¡Ê¤½¤ì¤¾¤ì¡Ö²£¤Î²èÁÇ¿ô¡×¡Ö½Ä¤Î²èÁÇ¿ô¡×¡Ë¡£¾Êά¤¹¤ë¤È¤½¤ì¤¾¤ì¡Ö400¡×¡Ö300¡×¤Ë¤Ê¤ê¤Þ¤¹¡£
  • ¡Ö16¡×¤Ï¥Þ¥Ã¥×Îΰè¤Î¥º¡¼¥à¤ÎÀßÄê¡£¡Ö0¡×¤¬ºÇ¾®¡ÊÃϵåÁ´ÂΡˤǡÖ18¡×¤¬ºÇÂç¡£¾Êά¤¹¤ë¤È¡Ö16¡×¤Ë¤Ê¤ê¤Þ¤¹¡£Ãͤ¬¾®¤µ¤¹¤®¤ë¤È¡¢ÃϿޤΥ¿¥¤¥×¤Ë¤è¤Ã¤Æ¤Ï²¿¤âɽ¼¨¤µ¤ì¤Ê¤¯¤Ê¤ë¤³¤È¤¬¤¢¤ê¤Þ¤¹¡£
  • ¡Ögsi¡×¤Ïɽ¼¨¤¹¤ëÃϿޤΥ¿¥¤¥×¡£¡Ögsi¡×¡Ê¹ñÅÚÃÏÍý±¡É¸½àÃÏ¿Þ¡Ë¡¢¡Ögsiphoto¡×¡Ê¹ñÅÚÃÏÍý±¡¼Ì¿¿¡Ë¡¢¡Öosm¡×¡Ê¥ª¡¼¥×¥ó¥¹¥È¥ê¡¼¥È¥Þ¥Ã¥×¡Ë¤Î¤¤¤º¤ì¤«¤¬ÀßÄê¤Ç¤­¤Þ¤¹¡£¾Êά¤¹¤ë¤È¡Ögsi¡×¤Ë¤Ê¤ê¤Þ¤¹¡£

¡¡

lmap ¥×¥é¥°¥¤¥ó

{{lmap ÅìµþÅÔ¹Á¶è¼Ç¸ø±à£´ÃúÌÜ£²¡Ý£¸,500,500,16,gsiphoto}}

¡¡

  • ¡ÖÅìµþÅÔ¹Á¶è¼Ç¸ø±à£´ÃúÌÜ£²¡Ý£¸¡×¤Ï½»½ê¡£É¬¿Ü¤Î¥Ñ¥é¥á¡¼¥¿¤Ç¤¹¡£
  • ¡Ö500¡×¡Ö500¡×¤Ï¡¢¥Þ¥Ã¥×Îΰè¤Î¥µ¥¤¥º¡Ê¤½¤ì¤¾¤ì¡Ö²£¤Î²èÁÇ¿ô¡×¡Ö½Ä¤Î²èÁÇ¿ô¡×¡Ë¡£¾Êά¤¹¤ë¤È¤½¤ì¤¾¤ì¡Ö400¡×¡Ö300¡×¤Ë¤Ê¤ê¤Þ¤¹¡£
  • ¡Ö16¡×¤Ï¥Þ¥Ã¥×Îΰè¤Î¥º¡¼¥à¤ÎÀßÄê¡£¡Ö0¡×¤¬ºÇ¾®¡ÊÃϵåÁ´ÂΡˤǡÖ18¡×¤¬ºÇÂç¡£¾Êά¤¹¤ë¤È¡Ö16¡×¤Ë¤Ê¤ê¤Þ¤¹¡£Ãͤ¬¾®¤µ¤¹¤®¤ë¤È¡¢ÃϿޤΥ¿¥¤¥×¤Ë¤è¤Ã¤Æ¤Ï²¿¤âɽ¼¨¤µ¤ì¤Ê¤¯¤Ê¤ë¤³¤È¤¬¤¢¤ê¤Þ¤¹¡£
  • ¡Ögsiphoto¡×¤Ïɽ¼¨¤¹¤ëÃϿޤΥ¿¥¤¥×¡£¡Ögsi¡×¡Ê¹ñÅÚÃÏÍý±¡É¸½àÃÏ¿Þ¡Ë¡¢¡Ögsiphoto¡×¡Ê¹ñÅÚÃÏÍý±¡¼Ì¿¿¡Ë¡¢¡Öosm¡×¡Ê¥ª¡¼¥×¥ó¥¹¥È¥ê¡¼¥È¥Þ¥Ã¥×¡Ë¤Î¤¤¤º¤ì¤«¤¬ÀßÄê¤Ç¤­¤Þ¤¹¡£¾Êά¤¹¤ë¤È¡Ögsi¡×¤Ë¤Ê¤ê¤Þ¤¹¡£

¡¡lmap ¥×¥é¥°¥¤¥ó¤Ç¤Ï¡¢¥¸¥ª¥³¡¼¥Ç¥£¥ó¥°¤Ë¹ñÅÚÃÏÍý±¡¤ÎAPI¤ò»È¤Ã¤Æ¤¤¤Þ¤¹¡£¤Á¤ç¤Ã¤È»þ´Ö¤¬¤«¤«¤ë½èÍý¤Ê¤Î¤Ç¡¢¥¸¥ª¥³¡¼¥Ç¥£¥ó¥°¤Î·ë²Ì¤òÊݸ¤·¤Æ¤ª¤­¡¢¥Ú¡¼¥¸ÆâÍƤÎÊѹ¹¤¬¤¢¤ë¤Þ¤Ç¤ÏAPI¤ò¸Æ¤Ó½Ð¤µ¤ºÊݸ¤·¤Æ¤¢¤ë·ë²Ì¤ò»È¤¦¤³¤È¤Ë¤·¤Þ¤·¤¿¡£

¡¡¤³¤ÎAPI¤Ïhttps¤Ê¤Î¤Ç¤¹¤¬¡¢²¿¤¬°­¤¤¤ó¤À¤«¤è¤¯¤ï¤«¤é¤Ê¤¤¤Î¤Ç¤¹¤¬¡Ê¤¹¤¤¤Þ¤»¤ó¡ËSSL¾ÚÌÀ½ñ¤Î¥¨¥é¡¼¤Ç¥¢¥¯¥»¥¹¤Ç¤­¤Ê¤¤¤³¤È¤¬¤¢¤ê¤Þ¤¹¡£¤³¤¦¤¤¤¦¾ì¹ç¤Ï¡Ê¤¢¤ó¤Þ¤ê¤è¤¯¤Ê¤¤¤è¤¦¤Ç¤¹¤¬¡Ë¡¢lmap.pm¤Î63¹ÔÌܤΥ³¥á¥ó¥È¥¢¥¦¥È¤ò³°¤·¤Æ¡¢¾ÚÌÀ½ñ¤Î¥Û¥¹¥È̾¤Ë¤è¤ë¸¡¾Ú¤òÍÞÀ©¤·¤Æ¤¯¤À¤µ¤¤¡£

¡¡¤Þ¤¿¡¢Í¿¤¨¤ë½»½ê¤Ï¤Ê¤ë¤Ù¤¯¾Ü¤·¤¯µ­¤·¤¿Êý¤¬ÌµÆñ¤Ç¤¹¡£»²¹Í¾ðÊó¤Ë¤â¥ê¥ó¥¯¤ò¼¨¤·¤¿¤³¤Á¤é¤Î¥Ú¡¼¥¸¤Ç¡¢¹ñÅÚÃÏÍý±¡¤Î¥¸¥ª¥³¡¼¥Ç¥£¥ó¥°API¤¬¥Æ¥¹¥È¼Â¹Ô¤Ç¤­¤Þ¤¹¤¬¡¢2020/12/15¸½ºß¡¢¡Ö»¥Ëڱءפǥ¸¥ª¥³¡¼¥Ç¥£¥ó¥°¤¹¤ë¤È¡¢¥ì¥¹¥Ý¥ó¥¹¤ÎJSON¤ÎºÇ½é¤ÎÍ×ÁǤϡ¢¤Ê¤¼¤«¡Ö°ñ¾ë¸©ËÈÅĻԻ¥¡×¤Î¤â¤Î¤Ë¤Ê¤Ã¤Æ¤¤¤Þ¤¹¡£lmap ¥×¥é¥°¥¤¥ó¤Ç¤Ï¡¢²¿¤â¹Í¤¨¤ººÇ½é¤ÎÍ×ÁǤκÂɸ¤ÇÃÏ¿Þ¤òɽ¼¨¤¹¤ë¤è¤¦¤Ë¤·¤Æ¤¢¤ë¤Î¤Ç¡¢½»½ê¤È¤·¤Æ¡Ö»¥ËڱءפòÍ¿¤¨¤ë¤È°ñ¾ë¤Î¥Þ¥Ã¥×¤¬É½¼¨¤µ¤ì¤ë¤³¤È¤Ë¤Ê¤Ã¤Æ¤·¤Þ¤¤¤Þ¤¹¡£
¡¡¤³¤ì¤òËɤ°¤¿¤á¤Ë¤Ï¡¢ÌÌÅݤǤâ¡Ö»¥ËڱءפǤϤʤ¯¡ÖË̳¤Æ»»¥ËÚ»ÔË̶èËÌ£¶¾òÀ¾£´ÃúÌܡפòÍ¿¤¨¤ë¤è¤¦¤Ë¤¹¤ë¤·¤«¤¢¤ê¤Þ¤»¤ó¡£
¡¡

»²¹Í¾ðÊó

¡¡

Äɵ­

  • 2020/12/17¤ËÃÏ¿Þ¥¿¥¤¥ë¤ÎURL¤òhttps¤ËÊѹ¹¤·¡¢¤µ¤é¤Ë¥ª¡¼¥×¥ó¥¹¥È¥ê¡¼¥È¥Þ¥Ã¥×¤Î¥¿¥¤¥ë¤Ïjp¤«¤éËܲȤËÊѹ¹¤·¤Þ¤·¤¿¡£



¤³¤ì¤è¤êÁ°¤Î5Æüʬ