¥È¥Ã¥× «Á°¤ÎÆüµ­(2003-06-22) ºÇ¿· ¼¡¤ÎÆüµ­(2003-06-24)» ÊÔ½¸

TPRG: ÌÂÁö¥á¥â½ñ¤­

[Donate to CCjp]
2000|12|
2001|01|02|03|04|05|06|07|08|09|10|11|12|
2002|01|02|03|04|05|06|07|08|09|10|11|12|
2003|02|03|04|05|06|07|08|09|10|11|12|
2004|01|02|03|05|06|07|08|09|10|11|12|
2005|01|02|03|04|05|06|07|08|09|10|11|12|
2006|01|02|03|04|05|06|07|08|09|12|
2007|01|02|03|04|05|06|07|08|09|10|11|12|
2008|01|02|03|04|07|08|11|12|
2009|01|02|
2010|04|06|09|

2003-06-23

_ [work] »þ´ÖÀÚ¤ì

¤³¤ì°Ê¾å¤Ê¤¯»þ´ÖÀڤ졣 »ä¤Ï²¿¤ò¤ä¤Ã¤Æ¤¤¤ë¤Î¤«¡£

_ [prog] libimg-thumbnail-ruby

Æ°¤¯¤È¤³¤í¤Þ¤Ç¤¤¤Ã¤¿¡£

_ [prog][ruby] ¥³¥ó¥¹¥È¥é¥¯¥¿¤ÎÃæ¤Ç¥¤¥ó¥¹¥¿¥ó¥¹¥á¥½¥Ã¥É¤ò¸Æ¤ÖÊýË¡

new ¤¬½ª¤ï¤Ã¤Æ¤¤¤Ê¤¤¤«¤é¡¢¥ì¥·¡¼¥Ð¤Ë¤Ê¤ë¤Ï¤º¤Î self ¤¬Â¸ºß¤·¤Ê¤¤¤»¤¤¤Ç ½ÐÍè¤Ê¤¤¤â¤Î¤À¤È¤Ð¤«¤ê»×¤Ã¤Æ¤¤¤¿¤é

__send__("method")

¤ÇÎɤ¤¤é¤·¤¤¡£

¤Ç¤âÍýͳ¤¬Ê¬¤«¤é¤Ê¤¤¡Ä¡Ä¡£¥¿¥¤¥ß¥ó¥°¤ÎÌäÂê¤Ê¤Î¤«??

_ [prog][ruby] ¤â¤¦¾¯¤·µ¡Ç½¤Î¤¢¤ë¥¢¥¯¥»¥µ¤ò½ñ¤¯¤Ë¤Ï¤É¤¦¤·¤¿¤é

ruby ¤Ï attr_* ¤Ç´Êñ¤Ë¥¢¥¯¥»¥µ¤ò½ñ¤¯¤³¤È¤¬½ÐÍè¤ë¤±¤É¡¢ ¤³¤ì¤Ë¤â¤¦¾¯¤·µ¡Ç½¤ò­¤·¤¿¤¤¾ì¹ç¤Ï¤É¤¦¤·¤¿¤éÎɤ¤¤Î¤À¤í¤¦¡£

class Foo
  @@bar = "bar"
  def initialize
    @bar = nil
  end
end

Î㤨¤Ð¤³¤ó¤Ê¥¯¥é¥¹¤Ç¡¢Æ±Ì¾¤Î¥¯¥é¥¹ÊÑ¿ô¤¬¤¢¤ê¡¢ ¤«¤Ä¥¤¥ó¥¹¥¿¥ó¥¹ÊÑ¿ô¤¬ nil ¤Ê¤é¤Ð¥¯¥é¥¹ÊÑ¿ô¤ÎÃͤòÊÖ¤¹Æɤ߹þ¤ßÍÑ´Ø¿ô¤È¡¢ ÉáÄ̤˥¤¥ó¥¹¥¿¥ó¥¹ÊÑ¿ô¤Ë½ñ¤­¹þ¤à¤¿¤á¤Î´Ø¿ô¤¬Íߤ·¤¤¡£

°ì¤Ä¤º¤Ä½ñ¤±¤Ð

def bar; @bar == nil ? @@bar : @bar; end
def bar=(v); @bar = v; end

¤³¤¦¤¤¤¦É÷(½ñ¤­¹þ¤ß¤Ï attr_writer ¤½¤Î¤Þ¤Þ)¤Ê¤Î¤À¤¬¡¢ ÊÑ¿ôÁ´Éô¤Ë¤Á¤Þ¤Á¤Þ½ñ¤¤¤Æ¤é¤ì¤Ê¤¤¡£

perl ¤ÎÍͤË̤ÄêµÁÁ´Éô¤ò°ú¤­¼õ¤±¤ë´Ø¿ô¤ß¤¿¤¤¤Ê¤â¤Î¤Ï½ñ¤±¤Ê¤¤¤è¤¦¤À¤·¡£ class_eval (instance_eval?) ¤ò»È¤¦¤Î¤«¤Í¡©

¤ä¤¹¤¤»Õ¤«¤é¡ÖÎã³°¤ò¤¢¤²¤Æ¡Ä¡Ä¡×¤È¤¤¤¦¥Ò¥ó¥È¤ß¤¿¤¤¤Ê¤Î¤òÁ°¤Ë¤Á¤ç¤Ã¤È ʹ¤¤¤¿¤±¤ì¤É¹Í¤¨¤Æ¤âʬ¤«¤é¤Ê¤¤¡Ä¡Ä

_ [misc] ¥¢¥ó¥Æ¥Ê¤ò¤Ä¤±¤ë

ŬÅö¤ËÆ°¤«¤·¤Æ¤ß¤¿¡£³Î¤«¤ËÊØÍø¤À¡£ URL ¤Ë¹¹¿·»þ´Ö¤Î(?) query strig ¤ò¤¯¤Ã¤Ä¤±¤Æ¤¯¤ì¤ë¤«¤é¡¢ ¥Ö¥é¥¦¥¶¤Îµ¡Ç½¤Çé¤Ã¤¿¤«¤É¤¦¤«¤¹¤°Ê¬¤«¤ë(¿§¤¬ÊѤï¤ë¤«¤é)¤È¤¤¤¦¤Î¤¬Îɤ¤¤Í¡£

_ [comp] ImageMagick ¤ÇÂ礭¤Ê png ¤òÊݸ¤·¤è¤¦¤È¤¹¤ë¤È buffer error

sugi@tempest:~% convert -version            
Version: ImageMagick 5.5.7 06/10/03 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 2003 ImageMagick Studio LLC
sugi@tempest:~% ll /usr/lib/libpng12.so.0
lrwxrwxrwx    1 root     root           19 2003-06-16 14:55 /usr/lib/libpng12.so.0 -> libpng12.so.0.1.2.5
sugi@tempest:~% convert ~/data/photo/dcim/100casio/cimg0001.jpg tmp.png
convert: buffer error (tmp.png).

²¿¸Î¤«ºß¤ëÄøÅÙ¤ÎÂ礭¤µ¤Ë¤Ê¤ë¤È¡¢¥Ñ¥ì¥Ã¥È¥â¡¼¥É¤Ë¤·¤Æ¤ä¤é¤Ê¤¤¤È¤Á¤ã¤ó¤È½ñ¤±¤Ê¤¤ÌÏÍÍ¡£ libpng ¤ÎÌäÂê¤Ê¤Î¤«¤Ê¡©

"-type Palette" ¤ò¤Ä¤±¤ì¤Ð½ñ¤±¤ë(¸µ²èÁü¤¬ TrueColor ¤Ê¤é¸º¿§¤µ¤ì¤ë¤±¤É)¡£ ¤Þ¤¢¤È¤ê¤¢¤¨¤º¤³¤ì¤Ç²óÈò¤¹¤ë¤«¡£

_ [comp] ¥¢¥ó¥Æ¥Ê¤ÎºÇ¸å¤Ë¤Ä¤¯¡Ö?¿ô»ú¡×¤È¤¤¤¦¤Î¤Ï¤¤¤Þ¤¤¤Áµ¤¤ËÆþ¤ê¤Þ¤»¤ó

¤½¤ì¤Ï³Î¤«¤Ë¡£¼ÂºÝ¤Ë¤½¤ì¤¬¥µ¡¼¥Ð¦¤Ë¥ê¥¯¥¨¥¹¥È¤µ¤ì¤Æ¤·¤Þ¤¤¤Þ¤¹¤·¡£

¤È¤¤¤¦¤ï¤±¤ÇÌÂÏǤˤʤé¤Ê¤¤Íͤˤ¤¤¸¤Ã¤Æ¤ß¤ë¡£ ¤·¤«¤·¡¢¸Ä¿ÍŪ¤Ë UA ¦¤Î´ûÆÉȽÄ꤬ÊØÍø¤¹¤®¤ë¤Î¤Ç¤³¤ì¤Ï³°¤·¤¿¤¯¤Ê¤¤¡£ ¤Á¤ç¤Ã¤È¤À¤±Çº¤ó¤Ç ¡Ö#dummystrÆüÉÕ¡× ¤È¤«¤Ë¤·¤Æ¤ß¤Þ¤·¤¿¡£ ¤¢¤ó¤Þ¤êÊѤï¤Ã¤Æ¤Ê¤¤¤±¤É ¡Ö?¡× ¤è¤ê¤Ï¤Þ¤·¤À¤í¤¦¤È¡Ä¡Ä

_ [prog][ruby] my_attr_accessor

ËÜÅö¤Ë¤¢¤ê¤¬¤È¤¦¤´¤¶¤¤¤Þ¤¹¡£

¤à¡£¤Ê¤ë¤Û¤É¡¢ Module ¤Ë¥á¥½¥Ã¥É¤ò­¤»¤Ð¤¤¤¤¤Î¤Ç¤¹¤«¡£ ¤ª¤Þ¤±¤Ë module_eval ¤Î°ÕÌ£¤ò´ª°ã¤¤¤·¤Æ¤¤¤¿ÌÏÍÍ¡Ä¡Ä

¤È¤ê¤¢¤¨¤º¤³¤ì¤ò»È¤Ã¤Æ¾¯¤·½ñ¤­Ä¾¤·¤ËÄ©Àï¡£

_ [misc] ¤Ä¤¯¤ê¤â¤Î¤¸¤µ¤óÉü³è

¤¦¡¼¤ó¡£¹¬¤»¡£

¤·¤«¤·Éµ¤¤À¤Ã¤¿¤È¤Ï¡£¤ªÂç»ö¤Ë¡Ä¡Ä

ËÜÆü¤Î¥Ä¥Ã¥³¥ß(Á´3·ï) [¥Ä¥Ã¥³¥ß¤òÆþ¤ì¤ë]
_ tach (2003-06-23 13:23)

?????ƥʤκǸ??ˤĤ?????????פȤ????ΤϤ??Þ¤??Áµ????????Þ¤??󡥤À¤Ã¤Æ¼ÂºÝ¤Ë¤Ï¤????? URL ?Ϥʤ??櫓?À¤????????Ë¥??????????????ΤϤÁ¤??äȤ????À¤Ê¤???

_ MoonWolf (2003-06-23 14:45)

?????ʴ????Ǥ??礦????<br>class Module<br> private<br> def my_attr_accessor(*symbols)<br> symbols.each {|symbol|<br> module_eval(<<-EOS)<br> def #{symbol}; @#{symbol} == nil ? @@#{symbol} : @#{symbol}; end<br> def #{symbol}=(v); @#{symbol} = v; end<br> EOS<br> }<br> end<br>end<br><br>class Foo<br> @@bar = "bar"<br> def initialize<br> @bar = nil<br> end<br> my_attr_accessor :bar<br>end

_ ???? (2003-06-24 00:29)

?ϤƤʥ????ƥʤߤ????Ë¡????À¥??쥯?Ȥ???CGI???Ñ°Õ¤??Æ¡????????̤??ΤϤɤ??Ǥ??礦????

¤ªÌ¾Á°:
E-mail:
¥³¥á¥ó¥È:
[]


Tatsuki Sugiura <sugi@nemui.org>