Ȥ Blog

Ruby,C#

2010ǯ09

Rails3eBook

http://pragprog.com/titles/rails4/agile-web-development-with-rails

ޤܸRailsܤ1,2ʤä˹RailsܤRails3бǤǤ
ޥʡС󥢥åפ̵äΤˡ᥸㡼С󥢥åפܤͭˤʤΤǤ͡
24ɥʤΤǡ߹κΤ˹Ƥޤ

ܤǤѤ餺ӥʤǤ͡ 

SQL ƱΤͤ򴹤

table members

id  name
-----------
1  satoyan
2  hoge

12nameؤ褦ʽɬפˤʤäΤǤȯSQLǺѤޤ褦˲Τ褦SQL񤭤ޤ
 
UPDATE members SET name = CASE
       WHEN id=1 THEN (SELECT name FROM members WHERE id=2)
       WHEN id=2 THEN (SELECT name FROM members WHERE id=1)
       ELSE name) END
WHERE id in (1,2);

PostgreSQLǤOKǤ
MySqlǤ
You can't specify target table 'members' for update in FROM clause 
ǥ顼 
SqliteϤޤ̵뤷ޤ
¿ʬSqlServer,OracleǤˤΤʡ
MySQLselectȤ鷺ˡľͤꤹưޤ
name˥ˡ󤬤äƤMySQLǤNGǤ
PostgreNGä褦ǤΥС(8.4?)Ϥ褦Ǥ

Τؤΰ㤤⤦äĴ٤

JavaScript̵դ򤱤

JavaScript̵դθڤ򤹤ɬפäΤǤ
㤨RubyDate饹ξ硢Τ褦2010/2/30Ȥդꤹȡȥ顼ˤʤäƤޤ

52

Ǥ⡢JavaScriptξϡ2010/3/2ȲᤵƤޤޤ
JavaScriptMonth0١ΥǥåʤΤǡ-1Ƥɬפޤ2ꤹ1ˤʤФʤޤ

15


ǡJavaScriptǤRubyDate饹Ʊ̵ͤդξϡ顼ˤƤʤʡȤȤǥեȥ᥽åɤɲäȼ˸ڤ򤹤褦ˤƤߤޤ
ĤǤˡ-1ΤľŪǤʤᡢեȥ᥽åɤǤ褦ˤޤɤͤƤ⤳äľŪǤ͡
 
 
Date.create = function(year, month, day){
    var result = new Date(year, month-1 ,day);
    if(result.getFullYear() != year || result.getMonth() != month-1 || result.getDate() != day)
        throw "invalid date";
    return result;
}

ºݤưƤߤȡ

50


Ȥ顼ˤʤޤ

 

ޤǤκʤȤϤʤۤʤޤ
ʲսǡ֥ޥ٥פΥѥǥȤޡȤߤʤΤƤޤ
ʤɾ㤤褦Ǥ繥Ǥ


ȥ
//Artist˺ Ϻ
, 1,260 ֽŹ
ɾ
 2010-09-09

ƾҲ

ŷͤƱ塢Ʊ֤¸ߤοʹ֤˲⤿餹Τ?ˤʤ٤̿Ť줿ŷͤʪ졣IJϥץ饭󥰥ǮեξƤΤȤǡޤ줿ˤʤ٤Ƥ졢ȤƤĤʤǽϤäˤʤäޤִ֤顢ĻǯǯΤ줾Υȡ꡼μϤμԤˤäƸ롣勞勞ĤġäԤˤȤäƤʪ졣ܤȤٹɾϢܤɮäǤܤȤκǿ!!٥ȥ顼ȡ˺乬ϺκǿϡޤޤǤΰ˺ʤȤϤҤ̣դ̣㤦! إǥ󥹥С٤ؽΥա٤Τ褦ʥƥȤȤϰ㤤ޤҤȤŷͤߤƤ͸괬Ϥο͡κǤȰڤ졽ɤ߿ʤƤˤɤɤޤƤޤ¾οͤˤ񤫤줿ס֤ʤɤߤäפȰ˺䤵󤴼Ȥä뤯餤פ򤳤᤿ʤǤ˺ɤ򤪳ڤߤ!(byԽô)

ơʡBOOKץǡ١ˡ

微ġ饭󥰥ǮʥեǤξƤΤȤޤ줿IJᡣ“ᡢ˵”褦ˤ̾Ť줿ͤξǯϡ饭󥰥ĤƥͥƳ̿餤ˤʤ٤Ƥ롣԰ʾ˲κǽȴƤΤäξƤϡ˰۾Ȥ⤤Ǯˤ٤Ƥϡֲפˤʤ뤿ˡ͵Ȥοʤե󥿥ɡ

Ǥ󤤶ϡҾ塦

ǯ֤ˡƻκʤɤߤޤ
ϡɥܥɤäƤʶ̣ʤäΤǤοͤκʤϹǤ
κʤ⡢ɥϥåԡɤˤϤʤʤʤʬäƤϤޤᤷǤ

ȥǤ󤤶ϡҾ
//Artist ƻ
, 1,785 ߼
ɾ
 2010-09-04

ơʡBOOKץǡ١ˡ

սξîγǡɤε֤ѻΤȤλΤμˤϡʤΥƥåݥΥڥȤĤäƤ̿ܺµ֤ȲϤǡʵԤη۲ȤȤ̾ڤƤǷï⤬ۤɤơϤջʤɹλѡͧؤǮͧ𡣼Ϥܤܤ֤Ƿβϥ١ޤƤơμ˥ƥåݥΥڥȤߤ뤵Ƥ뤳ȤïΤʤΤ̰㰦Ȥܤ۲ȤȤƤܻؤǷȾîλΰȤδ֤ˤϡΤʤˤäΤ

ά (BOOKԾҲפ)

ƻ 1945ǯ̵ޤ졣춶´ȸ塢͡ʿФơ80ǯΥХ֥˳ӹߡ礤ʤɸȺޤ̣臘94ǯȤθʬήα٤Ǿ׷Υǥӥ塼2001ǯŷؤγʡ()()٥ȥ顼Ȥʤ(ܥǡϤνҤԤ줿˷ǺܤƤΤǤ)

ȥǤ󤤶ϡҲ
//Artist ƻ
, 1,785 ߼
ɾ
 2010-09-06

ơʡBOOKץǡ١ˡ

ȤκǴ뤲ΤȤ«îγ򸫲ۥƥ߷פ뤳ȤϡǷäߤȯϡȡ֥饤¶ȡסοͧƯδȤˤϡΤɤäǤ­ʤʤ롣⡢ˤΤȱĤʤΤ…νؤȡƱη۲ȤƬȴФͧؤμʿ򲡤ߤ֥饤¶ȡפ˿⤦ȤǷ̿ȤϮʤ顢äĤ̴Τ˸ʤ¸ߤäˤé夯׷ȰΥ饹ȤȤϡ

ά (BOOKԾҲפ)

ƻ 1945ǯ̵ޤ졣춶´ȸ塢͡ʿФơ80ǯΥХ֥˳ӹߡ礤ʤɸȺޤ̣臘94ǯȤθʬήα٤Ǿ׷Υǥӥ塼2001ǯŷؤγʡ()()٥ȥ顼Ȥʤ(ܥǡϤνҤԤ줿˷ǺܤƤΤǤ)

磻 å [DVD]

Ƥߤޤ
Ūˤ⥵ڥŪˤ⥤ޥδ
󡢤狼ʤ


ȥ 磻 å [DVD]
//Artist꡼塼֥å
, 1,500 ʡۡࡦӥǥ
ɾ
 2010-09-05

ƾҲ

ãο˱ʱ˻Ĥ륭塼֥åκǸηǡǡ˺줬꡼塼֥åĤǸκʤĩ¿λŪؤιΩǤ롣⤫ۡ褷ܤΥʤڥ󥹡ȥࡦ롼ȥ˥롦åɥޥΥꥢˤŪʻ”ʴĤˤդ路ǽ”(㡼Сȡ֥󥿥ॺ) 롼ʱ륦ꥢࡦϡեɰդϺʤ˾򤵤졢η뺧򤪤Ӥ䤫ۤɤΥƥåʾ׷פƤ-򶲤ͻ櫤ˤޤǴǤ-Ԥ̤塼֥åդǤ롢ǤȶݤμʤȯĴ¡ͥʻơ׻Ԥ줿ƥݡͥʿ̡ƶä٤塼֥åĹǯδ֥եࡦ᡼Ȥ᤿DzʱФϡƤοͤܤ򸫳뤳ȤǤڱŵۡ ꥸʥTVݥåȡ ͽ

ơʡOriconץǡ١ˡ

𾢥꡼塼֥åĤΰȤʤä۾ʤޤǤζǰ˶ˤλѤ۾̤ɥޡȥࡦ롼˥롦åɥޥۤб顣R-18ʡWARNER THE BEST 1,500оݾʡ

ChromeJavaScript󥽡ʣԤScript¹

FireFoxFireBugǤϴñʣԤϤJavaScriptϡ¹ԤΤǤChormeǤ̤ˤȡʴǥ顼ˤʤäƤޤޤ
59

Alt + Enter ǤǤ͡äƤˤäܤä褦ʵɡä餦ޤޤ

28


 ˺ǿǤǤϡJavaScript󥽡 Alt + Command + j ǰȯǸƤӽФ褦ˤʤäΤϴ򤷤ǤWindowsǤǤɡޥåǤϺǿ6Ǥ褦ˤʤä褦Ǥ
ץե

Ȥ

C#ɻŻRubyФʳȯԡ
ǶDockerȤؿȤAngularJS˥ϥޤäƤ롣
¢ȤĮȤȤ˽ס

QR
QR
  • 饤֥ɥ֥