2008-01-01ãã1å¹´éã®è¨äºä¸è¦§
mod_wsgiã使ããã¨ã§ããdjangoã¢ããªã±ã¼ã·ã§ã³ã使ãã¾ã: http://code.google.com/p/modwsgi/wiki/IntegrationWithDjango ã¨ã¯ããããã®ããã¥ã¡ã³ããã.htaccessã§ä½¿ãããã®ãã®ã¯ãªãããããããªç°å¢ã®å¯¾çãæ··å¨ãã¦ãããã«èªç°å¢ã«åãããé¨åâ¦
éãã¦ãªãã¿ã°ãéããããã¿ã°åãå°æåã«ãããã¨ãããããªå¯ä½ç¨ãããããã§ããã from BeautifulSoup import BeautifulSoup import cgi dangerous_tags = [ "script", "applet", "object", "embed", "img", "form", "input", "select", "textarea",â¦
ãã¤ã¯ãã¹ã¬ããã®æ¯è¼å¯¾è±¡ã®ã²ã¨ã¤ã¨ãã¦lua5.1ã使ã£ã¦ã¿ããã©ãLuaã£ã¦æè¿ã®è¨èªã¨æ¯ã¹ã¦çµæ§ç¬ç¹ãªé¨åãå¤ããªã¨æãã¾ããã以ä¸ãã¯ã¾ã£ãã¨ãã: Tableãé å風ã«ä½¿ãã¨ãã®éå§ã¤ã³ããã¯ã¹ã¯1ã§ãããã¨ãå¿ãã Tableã®åå¨ããªãã¤ã³ããã¯ã¹â¦
http://b.hatena.ne.jp/bellbind/ http://b.hatena.ne.jp/entry/http://www.reddit.com/r/programming/comments/7fcaq/oo_programming_why_traits_rule_and_mixins_and/
æ°ããã¯ã¦ãã¯ä¸è¦§ãã¼ã¸ã§ãæ¬æãåãè¾¼ãããã«ãªã£ããã©ãã©ãããã®æ¬æã¯ãã¤ãºãå¤ããã¦ãä¸è¦§æ§ã«ãæ¯éãããã®ã§ãStylishã使ã£ã¦ã¦ã¼ã¶ã¼CSSã§æ¶ããã¨ã«ãã¾ãããã¿ã°ã§çµãè¾¼ãã¨é表示表示ãåãæ¿ããããã®ã«ãçµãè¾¼ã¾ãªãã¨ããããªâ¦
rails風ã«webã¢ããªãä½æã§ãã話é¡ã®merbã使ã£ã¦ã¿ã¾ããã ã¤ã³ã¹ãã¼ã« ãã§ã«gem,rails,mongrelãå ¥ã£ã¦ããcygwinä¸ã«ããã¦ã¿ã¾ãã*1ãã¾ãã¯gemã®æ´æ° gem update gem cleanããã¦merbãå ¥ãã gem install merbå ¥ã£ãã®ã¯merb-1.0.1ã§ãããããâ¦
linuxä¸ã§gcc-4.3ã使ã£ãå ´åãéãã¯ptråãlongãlong doubleãsize_tãtime_tãªã©ã§èµ·ããã x86 sizeof(int) = 4 sizeof(void *) = 4 sizeof(size_t) = 4 sizeof(ptrdiff_t) = 4 sizeof(wchar_t) = 4 sizeof(void) = 1 sizeof(clock_t) = 4 sizeof(timeâ¦
fgetcã§æ¸ããã°ãfreadã§æ¸ãã - ã©ã·ã¦ã©ã§ã¯ãfgetcããfreadã使ãããã«å¤ãã¾ãããããã¯æ©æ¢°çã«å¤æããã ãã§ããããããããã¤ãã¯1æåã¥ã¤ã³ãã¼ãã¦ããé¨åããmemcpyã使ç¨ãã¦ããããã¯åä½ã§ã³ãã¼ããããã«å¤ãã¦ã¿ã¾ãããã ã¾ããªâ¦
åå¿è ã§ã¯ãfgetcã§ä¸æåã¥ã¤å¦çããã³ã¼ãã¯è¨è¿°ã§ããã®ã«ããããã¡ã使ãfreadã§æ¸ãã®ã«æ©ã人ããã¾ããåç´ã«fgetcã§ä¸æåã¥ã¤å¦çããã³ã¼ãã¯ã以ä¸ã®ãããªå½¢ã«ãªãã§ããã for (;;) { int ch = fgetc(file); if (ch == EOF) break; ... } ãâ¦
Pythonã§ã®DSL風è¨è¿°ã«ææ¦ãããããPythonã§ã®Prolog風ã®ã½ã«ãã¼ãä½ã£ã¦ã¿ã¾ãããã¨ã³ã¸ã³ã®å®è£ ã¯ã åä½µã®ãç¥ããï½OKIã½ããã¦ã§ã¢ ããã¼ã¹ã«ãã¦ãã¾ããPythonã§Prologã®DSLããã£ã¦ããã®ã¨ãã¦ã¯ã以ä¸ã®ãã®ãããã¾ãã: http://code.activeâ¦
Cã使ããã¨èªç§°ãã人ã§ãæ¬å½ã«Cè¨èªã®æå³ãç解ã§ãã¦ã人ã¯ãããã ã£ãããã¾ããã¨ããããªãã¡ã¬ã³ã¹ããã¥ã¢ã«çãè¦ããã¨ãç¡ã人ãå¤ãã£ããããããããããåèã«ãããªã½ã¼ã¹ãä»æ§ãç解ãã¦æ¸ããã¦ãããã©ããæªãããã®ãå¤ããå®è£ ãâ¦
é åã·ã£ããã«ãCè¨èª(ISO C89)ã§æ¸ãã¨ä»¥ä¸ã®ããã«ãªãã¾ã: #include <stdlib.h> #include <math.h> #include <stdio.h> static void shuffle(const char ** const array); static void swap(const char ** const array, int i, int j); static const char * names[] = { "taro", "j</stdio.h></math.h></stdlib.h>â¦
é åã®ã½ã¼ãã¯ãã¾ããããã¾ã§ãç¡ãã¢ã«ã´ãªãºã ã§ããããªããæåã«ããã¢ã«ã´ãªãºã ãããã«ã½ã¼ãã ã£ããããã®ã¯ãªãã§ãããããæ£ç´ããã«ã½ã¼ãã¯ç´æçã«ãããã«ããã¨æãã¾ããæ¯è¼çããããããã®ã¯é¸æã½ã¼ãã ã¨æãã¾ãããä¸çªå°ããâ¦
風éªã§å¯ã¦ãããã ãé çãªé ã§ãªããé åã®ã·ã£ããã«ããã¢ã«ã´ãªãºã ã®ãã¨ãæãåºããä¹±æ°ã¨ä½¿ãæ¹ã®è½ã¨ãç©´ã«ã¤ãã¦èãã¦ã¾ãããã·ã£ããã«ã¯ããã¨ãã°è¼ªèªã®é çªã決ããã¨ãã«ã¤ããã¾ããåç°¿ãæåãããããé ã«ä¸¦ã¹ã¦é åã«å ¥ãã¦ããã¦ã·â¦
å®è¡ããã¨èªåèªèº«ã®ã³ã¼ããåãåºãããã°ã©ã ãããããã®ã£ã¦ãªãã¦ãããã ã£ããèªå·±è¤è£½ï¼ ã³ã¼ãâæååã®å¤æã®ã¨ã¹ã±ã¼ããä¸è¦ã«ãªãrubyãä¸çªä½ããããã¦ãããã¿ãç解ããããããã注æããã¨ããã¯ãæ¹è¡æåãç´æ¥ä½¿ããªãããã«ãããâ¦
cygwinã®gccã¨mingwã§ãããCã½ã¼ã¹ã«utf8ã使ãã°æ¥æ¬èªã使ãã¾ããããããrcãã¡ã¤ã«ãã³ã³ãã¤ã«ããwindresã¯UTF8ãåãä»ãã¾ããã§ãã(rcä¸ã®æååãSJISã§æ¸ããå ´åããã®ã¾ã¾ä½¿ããã£ã½ãããã©ã表ãã®ããã«'\'ã¨åãå¤ã2ãã¤ãç®ã«æã¤ãã®â¦
ã7ã®åæ°ãã§ã°ã°ãã¨ãããã¤ãã®å¤å®æ³ãåºã¦ãã¾ã: 7ã®åæ° - Google æ¤ç´¢ æèªåãèãä»ããã¨ãã®æ¹æ³ã¯ãåç´ã«ãäºæ¡ç®ã¨ä¸æ¡ç®ä»¥ä¸ã¨ä¸æ¡ç®ãããã¦ãæ°åãã ãã¦ããããæ³åãã¿ã¤ãããã®ã§ããã以ä¸ã®è¡¨ã¯ã7ã§å²ãåããæ°ã®ä¸æ¡ç®ãaãäºâ¦
djangoã®runserverã§ä½¿ã£ã¦ããdjango.core.servers.basehttp.WSGIServerã¯ãPythonæ¨æºã®BaseHTTPServer.HTTPServerããã¼ã¹ã«ãªã£ã¦ãã¾ããããã¯ã¹ã¬ããã使ããã«è¤æ°ã®ãªã¯ã¨ã¹ããè³é ã«å¦çãã¦ããä»çµã¿ã«ãªã£ã¦ãã¾ãããã®ããrunserverã§ã¯ãAâ¦
PLoP 2008 - 15th Conference on Pattern Languages of Programs ããJames Nobleæ°*1ãèè ã«é£ãã¦ãã®ã¯ä»¥ä¸ã®äºã¤: http://hillside.net/plop/2008/papers/PLoP2008_16_Coelho_et_al.pdf http://hillside.net/plop/2008/papers/PLoP2008_33_Pearce+Nobleâ¦
x86ä»®æ³ãã·ã³ã®bochsã使ã£ã¦ã¿ã¾ããããªãã·ã§ã³ã®è¨å®ã«è¦å´ããã以ä¸ããã¼ãã»ã¯ã¿ã«Hello Worldãåºãã³ã¼ããå ¥ããFDã¤ã¡ã¼ã¸ãã¤ãããbochsã§èµ·åããã¦ãã¾ãã FDã¤ã¡ã¼ã¸ã®ä½æ ãã¼ãã»ã¯ã¿ç¨ã®ã¢ã»ã³ããª*1 ; hello.asm org 0x7C00 ; startâ¦
Vistaã§HPã®ããªã³ã¿ãã©ã¤ãã使ã£ã¦ãã¨ãå®æçã«hprbUpdate.exeã«æ¨©éãæ±ãããã¤ã¢ãã°ãåºã¦ããããã¨ãã®ä¸ãªãã®ã ããæ¤ç´¢ãã¦ãæ¢ããæ¹æ³ãã¿ã¤ãããªãã¦èªåã§èª¿ã¹ã¦ã¿ã¾ãããYahoo!ç¥æµè¢ã¨ããOK Webã¨ã質åè¢ã¨ãã§ã¯ã¹ãã¤ã¦ã¨ã¢ã ããâ¦
æ¤ç´¢ã§ããããããã®ã¯ãRailsæ¬åãããã®ã®æ®éª¸ã ã£ãã(ãªãæ¶ããã ãããå¤ãããï¼)ãç¥ãããã¨ãããçç¥ããã¦ããã¨å®å ¨ã§ãªããã®ã°ãããªã®ã§ã¡ã¢ã åºæ¬çã«ã¯script/generate scaffold ...ã§çæããããã®ãActiveResource対å¿ãã¦ããã®ã§â¦
Python3ã«ã¯ã2ç³»ã§ä½ãããã³ã¼ãã3ç¨ã«å¤æããæ¡ãããããçæãã2to3ã¨ããã³ãã³ãã©ã¤ã³ãã¼ã«ãä»å±ãã¦ã¾ã(æ¬ä½ã¯lib2to3ã¨ããæ¨æºã¢ã¸ã¥ã¼ã«ç¾¤)ããã¨ãã°ãã¨ã³ã³ã¼ãå¼æ°ã¤ãã®unicodeé¢æ°ã§ãããã®ã¾ã¾ã¨ã³ã³ã¼ãå¼æ°ãåå¨ããªãstré¢æ°â¦
Pythonã§ã¯ãFFI(Foreign Function Interface)ã¨ãã¦ctypesã¢ã¸ã¥ã¼ã«ã使ãã¾ã http://docs.python.org/lib/module-ctypes.html http://python.net/crew/theller/ctypes/tutorial.html DLL èªã¿è¾¼ãDLLã®Cã½ã¼ã¹ dll.c: // gcc -fPIC -shared -o dll.so dlâ¦
Pythonã§LISPã£ã½ãä½ããä½ã£ã¦ã¿ã - ã©ã·ã¦ã©ã§ã¯ãevalã¡ã½ããã§ã¯funcãªãã¸ã§ã¯ãå ã§ãå帰çã«å¼ã³åºããããããä¾ä¸ã®factã§ãå¼æ°ã100ç¨åº¦ã«ãã¦ãã¾ãã¨ã"RuntimeError: maximum recursion depth exceeded"ãçºçãã¦ãã¾ãã¾ããå帰ã«ããªâ¦
Pythonã§ã®ã¤ã³ã¿ããªã¿ã®ã³ã¼ãã¯ãæ¬ä½ã¯200è¡ç¨åº¦ã§ãbuiltinã§100è¡ç¨åº¦ã®300è¡ç¨åº¦ã§ããä¸çªããããã£ãã®ã¯macroæ©æ§ãå®è£ ãã¦ã¿ããã£ããã¨ãä¸è¬ã®ãã¼ã¿ã«å¯¾ãã¦ã¯ãæ´æ°ä»¥å¤ã®é¢æ°ã¯çµã¿è¾¼ãã§ãªãã®ã§ããã以ä¸ã®ãããªã³ã¼ãä¾ã解éã§ãã¾â¦
alertã£ã¦æ軽ã ãã©ããã¤ã¢ãã°ãã¢ã¼ãã«ã§ã¯ãªãã¯ããããã®ã§ãéã¢ã¼ãã«ãªå¥çªã¨ãã¦Tabã«åºãããã«ã¡ããã£ã¨ä¸æ¸ããããã¨ã«ããã function alert(obj) { var title = "alert: " + window.location.href; var win = window.open(null, title); â¦
ã¨ã©ãã¹ããã¹ã®ãµãã on JavaScript-1.7/1.8 - ã©ã·ã¦ã© ãGoogle Gearsã®workerpoolä¸ã«å®è£ ãã¦ã¿ã¾ãããworkerã«ã¯å¶éãããã¤ãããããã®å¯¾çã¯å°ãé¢åã§ããã alertçã¯ä½¿ããªã createWorkerã§ããªã ããããå®ç¾ããããã親workerPool(ID=0â¦
ãã¨ã©ãã¹ããã¹ã®ãµãããã¯ãå¹³è¡ããã°ã©ãã³ã°ã®åºç¤çãªä¾ã¨ãã¦ãç¨ããããããã®å ´åã¯ãåãµãã(sieve)ã¯æåã«åãåã£ããã®ãç´ æ°ã¨ãããã®æ å½ã®ç´ æ°ã®åæ°ãåãåã£ãããµããè½ã¨ããããã§ãªããã®ãåãåã£ãã次ã®ãµããã¸æ¸¡ãã³ã¼ãâ¦
gcc-4.3ã§ã¯"Explicit template specialization cannot have a storage class"ã¨ã©ã¼ãåºãã®ã§ã CXX=g++-4.2 sconsã§ãã«ãã§ãã http://gcc.gnu.org/gcc-4.3/porting_to.html $ svn co http://v8.googlecode.com/svn/trunk/ v8 $ cd v8 $ CXX=g++-4.2 scâ¦