1çªç® sprintf("SELECT * FROM table WHERE id = %d", $value); $valueã«ã©ã®ãããªãã¼ã¿ãå ¥ã£ã¦ãããããPHPã®ã親åãªãåå¤æã«ããæ°å¤ã«å¤æããã¾ããescape()ãç¡ãã¦ãåé¡ããã¾ããã "123" => 123 " 123" => 123 "123abc" => 123 "abc" => 0 " " => 0 "" => 0 null => 0 ãã ãã4ã¤ã以éã®ä¾ã¯ã¢ããªã±ã¼ã·ã§ã³ã¨ãã¦ã¯æå³ããªãåä½ã«ãªãã§ãããããããã®è¦³ç¹ã§ã¯äºåã«ããªãã¼ã·ã§ã³ãå¿ è¦ã§ãã 2çªç® sprintf("SELECT * FROM table WHERE id = %s", escape($value)); 1çªç®ã®%dã%sã«æ¸ãæãescape()ãä»å ããä¾ã§ãã$valueã¯ãªãã©ã«ã§ã¯ãªãSQLæ§æã®ä¸é¨ã¨ãã¦å±éã
æè¿ã«ãªã£ã¦frontã®ã³ã¼ãããµã¼ãã¼ã®ã³ã¼ãã¯çã®js(ES5)ã§æ¸ãããbabeljs(æ§6to5)ã¨ãã§æ¸ããã¨ãä½æã§ããå¢ãã¦ãã¾ããã ãããgulpfileã¯çã®jsã§æ¸ããããcoffeescriptã§æ¸ããã¨ãå¤ãããã«æãã¾ãã ããã§è©¦ãã«ES6ã§æ¸ãããã©ããªæãã«ãªããè¦ã¦ã¿ããã£ãã®ã§é©å½ãªgulpfileãES6ã«æ¸ãæãã¦ã¿ããã¨æãã¾ããã ã¾ãé©å½ãªgulpfileã欲ããã£ãã®ã§Yeomanã§ã¨ã£ã¦ãã¾ããã $ npm install -g yo $ npm install -g generator-react-gulp-browserify $ yo react-gulp-browserifyhttps://github.com/randylien/generator-react-gulp-browserify/ é©å½ãªãããªãã«æ¸ããã¦ããgu
ããã«ã¡ã¯ä¸¸å±±@h13i32maruã§ãã ES6(ES2015)ã«classã·ã³ã¿ãã¯ã¹ãå ¥ã£ã¦ããã¼ããããæ¸ãããããªã£ããªããèªã¿ããããªã£ããªãã¨æã£ã¦classã·ã³ã¿ãã¯ã¹ã®ããããã¿ãåã¿ç· ããªããã³ã¼ããæ¸ãã¦ãã¾ãã ãããªã¨ãã« ES6ã«classã·ã³ã¿ãã¯ã¹ãå°å ¥ããããã©ã ã¯ã©ã¹ãã¼ã¹ã«ãªãããã§ã¯ãªãã¦æè©®ãã ã®ãããã¿ã¤ããã¼ã¹ã使ã£ãã·ã³ã¿ãã¯ã¹ã·ã¥ã¬ã¼ã ã¨ãããããªè©±ãã¡ããã¡ããè³ã«ãã¾ãããããã話ãèããã³ã«ãªãã ããããããã¦ããã®ã§ãã¡ãã£ã¨èªåã®ä¸ã®èããæ´çãã¦ã¿ããã¨æãã¾ãã 注æ: 以ä¸ã¯ããã¾ã§åå人ã®èãã¨ãããã¨ã§ãããããé¡ããã¾ãã OOPã¨ã¯ ãOOPããã¯ã©ã¹ãã¼ã¹ãããããã¿ã¤ããã¼ã¹ãã«ã¤ãã¦é çªã«æ´çãã¾ããã¾ãã¯OOPã«ã¤ãã¦ã åã¯ãªãã¸ã§ã¯ãæåã¨ããã®ã¯ä»¥ä¸ã®ã©ã¡ããã¾ãã¯ä¸¡æ¹ãæããã®ã ã¨èãã¦ãã¾ãã
Paul Grahamããã¨ããæåãªäººãããã®ã§ããããã®äººã®ã³ã©ã ã¯ãããããã¨è©å¤ã§ãã æ»ãªãªãããã« ããã¯æ¥µãã¦ç´ æ´ãããè¨äºã ã¨æã£ã¦ãããä½åº¦ãèªãã§ãã¾ãã ããã¯å¤ãã®ã¹ã¿ã¼ãã¢ããããã£ã¦ããèµ·æ¥å®¶ã¨è©±ãã¦ãã¦ããã®éãã ã¨æãã®ã§ãããç¹ã«ããã¯ç³»ã®ã¹ã¿ã¼ãã¢ããã ã¨ãæå¾ã¾ã§ãã£ã¦ãã人ãåã¡ãã¨ããã®ã¯ããããã¾ãã ã¹ã¿ã¼ãã¢ããããã£ã¦ããã¨ãã²ã©ããã¨ã大éã«èµ·ããã¾ããæ®éã«å¤§ä¼æ¥ã§ç¤¾å¡ã¨ãã¦åãã¦ããæã«èµ·ããã²ã©ããã¨ã¯ã1å¹´ã«1åããããªãã§ãããããã2é±éã«1åãããæ¥ãã¨ããæãã§ãã ããããããã§ãç«ã¡ç¶ãã¦ããã°ãã»ã¨ãã©ã®å ´åæåããã®ã§ã¯ãªããã¨ãå°ãªãã¦ãã¤ã³ã¿ã¼ãããç³»ã¨ããã®ã¯ããã®20å¹´ãããã¯ä¼¸ã³ç¶ãã¦ããæ¥çã§ãããã«å¼µã£ã¦ãã¦ãçãæ®ãéããæå確çã¯æ¥µãã¦é«ãã¨ããå°è±¡ãããã¾ãã ãã°ãã¼ã«ä»¥ä¸ã®ãããªè¨äºãããã¾
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}