Ȥ Blog

Ruby,C#

2010ǯ03

IE9Windows XPǤѤǤ

Ǥ

䤬äƤ롢뤤ϼäƤ뤤ĤΥȤ򸫤ȡ̤XPWindowsΤ7ȤǤĤ3Vista7ʬäƤäƴǤ礦
빽ɤΥȤ桼ؤۤʤˤؤ餺Ʊ褦ʿͤǤIE6IEΤǤϤ3ˤޤǸäƤޤ

OperaSafariFirefoxChromeXPưޤ

ȤͤľƤʤʡ
®ΤWindows7Ƴ줿赻ѤȤäƤ뤫ȤäƤޤʤλȤʤäơ¾Υ֥饦Ϲ®Ƥ顢Ѥʸ˻Ȥʤߤ

®٤IE8¤Ǥ⤤顢XPǤHTML5θǤ褦ˤߤȶꤤޤ
 

ClickOnce(å)ChromeΤ褦˼ưåץǡ

GoogleChromeϥåץǡȤγǧ򤹤뤳Ȥʤ˾˺ǿǤˤʤäƤޤƱȤ򤷤ȯԤϤȤƤ¿Ϥ(ȻפΤǤ)
ClickOnceWebץƱͤ˥С֤Ǵñ˥桼˥åץǡȤΤ餻뤳ȤǤΤǡʤΤǤ
ֿСͭޤåץǡȤޤ
ŪʥåɽΤϷȤư餫˥Ф̿ƳǧƤޤ衢Ūʾ⡢Ǥɽʤ

ǡĴ٤Ƥߤ顢 
System.Deployment.Application 
ClickOnce ץꥱ˥Υåץ졼ưץߥ󥰤Ǥޤ
ȤΤȡ

ΤϥХå饦ɤǤ餻Τǡϡ
CheckForUpdateAsync
UpdateAsync
2ĤƱ᥽åɤѤޤ
줾᥽å̾AsyncʤСѰդƤϤޤ

եȤMyLibraryAutoUpdaterȸ̾ɲäƤߤޤ򥢥ץ˼¹ԤƤޤ
㳰ȤüޤäƤޤ
    1 using System;
    2 using System.Collections.Generic;
    3 using System.Linq;
    4 using System.Text;
    5 using System.Windows.Forms;
    6 using System.Deployment.Application;
    7 
    8 namespace QueenSoft.BookReadingDiary
    9 {
   10     class AutoUpdater
   11     {
   14         
   15         ApplicationDeployment AppDeployment{get; set}
   16         IWin32Window OwnerWindow{ get; set}
   17 
   18         public AutoUpdater(IWin32Window owner)
   19         {
   20             if(owner == null) throw new ArgumentNullException("owner is null");
   21             this.OwnerWindow = owner;
   22             this.AppDeployment = ApplicationDeployment.CurrentDeployment;
   23             this.AppDeployment.CheckForUpdateCompleted += new CheckForUpdateCompletedEventHandler(onCheckForUpdateCompleted);
   24             this.AppDeployment.UpdateCompleted += new System.ComponentModel.AsyncCompletedEventHandler(onUpdateCompleted);
   25         }
   26 
   27         void onUpdateCompleted(object sender, System.ComponentModel.AsyncCompletedEventArgs e)
   28         {
   29             if (!e.Cancelled && e.Error == null)
   30             {
   31                 if (MessageBox.Show(this.OwnerWindow, 
   32                     "СMyLibraryѤǤޤ
СѤˤϺƵưɬפޤ
Ƶưޤ?",
   33                     "ǧ", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
   34                 {
   35                     Application.Restart();
   36                 }
   37             }
   38         }
   39 
   40         void onCheckForUpdateCompleted(object sender, CheckForUpdateCompletedEventArgs e)
   41         {
   42             if (e.UpdateAvailable)
   43             {
   44                 this.AppDeployment.UpdateAsync();
   45             }
   46         }
   47 
   48         public void Execute()
   49         {
   50             if (ApplicationDeployment.IsNetworkDeployed)
   51             {
   52                 this.AppDeployment.CheckForUpdateAsync();
   53             }
   54         }
   55     }
   56 }

פϡ

CheckForUpdateAsync

᥽åɤǿС󤬤뤫ǧơ 

UpdateAsync

᥽åɤǥåץǡȤơƵư¥åФäƴǤ

ƱʤΤǡ㳰ϥ٥Ȱ˳ǼƤޤǤϸƤޤ󤬡
¾ˤɬܤΥåץ졼ɤʤΤɤȤ٤⸫ΤǤǤϤȤˤѲǽʥåץǡȤС̵ͭ蘆åץǡȤƤޤ
ȼºݤˤɽåϥ꥽˳ǼƤꡢ㴳㤤ޤ

C#3.0ϥץѥƥѤѿѰդʤƺѤ褦ˤʤäΤdzڤǤ
public Hoge getHoge(){return _hoge;} ʤƷޤ꤭äȤ񤫤ʤƺѤߤޤ

ʤߤ֤̾QueenSoftȤʤäƤΤϡSatoyanSoftǤϤʤ繥ʥХQueenȤä̾ˤ褦ȻפäΤǤƱ̾ΥȯҤ뤳ȤΤꡢѤΤǤǤ⥽ľݤäΤǤΤޤޤˤƤޤMyLibraryBookReadingDiary ʤ̾ä   

ǡºݤ˳ǧȤȤǤƤ褦Ǥ
ǡ֤פ򲡤Ƥ⼡ưˤϺǿǤˤʤäƤޤ
åФʤä󤸤ʤΤ  ȸåץǡȤ򥭥󥻥뤵줿ʤȤΤ֤ͳǤ
Ǥ⡢ʸϤ⤦äȹͤɤʡ
21


 

ǥƤҶ

319ϻ繥ʥꥹȡΥǥ̿ǤߤΥ˥塼ǡǥץ쥤ܿͤλҤɤ⤬뤳ȤΤꥰäФƤޤ

10ФǥˤϤޤʤợ褬ݤʤǤʤǤǤ⡢ޤ
 

SnowLeopardΥߥʥܸ줬Ͻʤ

MacBookǤäƤȤʤäΤˡפ֤˥ߥʥܸϤ顢֥! ! !(Ȼˤʹ)
 
Ѥޤ
38
 

ʣСRuby˻ͤRVM

RVMȤʣСRubyδ򤷤ƤȤߤȸȤRails3Υ꡼󥭥㥹ȤΤäΤǡ桹ˤʤʤä1.9Ϥ򥤥󥹥ȡ뤷Ƥߤޤ

RVMΥ
http://rvm.beginrescueend.com/

ɥȤ򸫤ʣΥ󥹥ȡˡ褦ǤGit侩Τ褦ʤΤGitǥ󥹥ȡ롣
http://rvm.beginrescueend.com/rvm/install/

mkdir -p ~/.rvm/src/ && cd ~/.rvm/src && rm -rf ./rvm/ && git clone --depth 1 git://github.com/wayneeseguin/rvm.git && cd rvm && ./install

BootstrapScriptƤʤΤѰդƤơ򤽤ΤޤޥߥʥŽĤȡ
Git, Rvm, Ruby1.8.6,1.8.7,ree,1.9.1,jruby,rbx 쵤˥󥹥ȡ뤷Ƥ褦ǤäƤޤ󤬡reeäƲ

ǡRubyΥ󥹥ȡ롣
rvm install 1.9.1 
ǤդΥСRuby󥹥ȡ뤬ǽʤ褦Ǥ

rvm listȤȤʴˤʤޤ
02


system [ x86_64] äƤΤϡ̤˼ʬǥ饳ѥ뤷ƥ󥹥ȡѤߤäRubyΤȤǤ

ǥСڤؤˤϡ
rvm 1.9.1
ȤOKǤ
13

ڤؤΥС 1.8.7 ǡ
ڤؤ 1.9.1ˤʤäƤΤ狼뤫Ȼפޤ

ڤؤRubyϤޤǸߤΥߥʥΥåδ֤ͭʤΤǡ˥ߥʥ볫ȡޤRuby1.8.7ޤΥСꤷϡ--default ץꤹ褦Ǥ

rvm 1.9.1 --default

ȤRuby1.9.1ư褦Ǥ
ǡȤäƤRubyᤷϡ
rvm system --default Ȥиޤ
48


 gemΩƤΤǡ
.rvm/rubies/ruby-1.9.1-p378/bin/gem
ɬפʤΤ٥󥹥ȡ뤷ޤ
ȤꤢRails3äƤߤ褦ʡ
 

RadikoäȥͥåȤǥ饸İ롪

Ϥ¸Υ饸ΥͥåƱۿӥRadikoǤ®İƤߤޤ

FMɤƱľܤĤʤƤΤǺΤޤޤǤⲻϤʤäΤǤAMİΤɤǤ͡
ޤAM⤫ʤʤΤϤʤäΤǤ

֥饦ǤİʤΤǥޡϿȤϽޤ(ޤݤʤȤнʤȤʤΤ⤷ޤ) Ϥˤʤ뺢ˤϡץ졼䡼եȤФƤΤʤ

02
 

Ȥ񤯤٤񤫤٤

http://www.infoq.com/jp/news/2010/03/To-Comment-or-Not-to-Comment

ȸޤ
ȸ¿˽񤫤ʤɡǤ
ˤ⤢褦ˡAPIɥΤΥȤϽ񤤤ꤷޤˤ̵̤ʥȤϽ񤭤ޤ

Ƚ񤯤餤ʤ顢񤫤ʤƤǤ褦ʥɤ񤯤褦ʤ٤Ȼפޤ
Ǥտޤɽʤͤʻ˸¤ꥳȤ񤯤褦ˤƤޤ

ޤǤηиʤޤǻηиǤˡȤǫ˽񤯿ͤΥɤϡƤʤޤ饳Ȥ褦ȤΤǤ礦ɡȤ¿򸫤ȡ褯ФƤʤΤ

//٤ƤΥСξԽ
 foreach(var member in members)
{
   //ͭ¤Nullꤹ
   member.ExpiredAt = null;
  
   //ѹ˸ꤹ
   member.UpdatedAt = DateTime.Now;

   //¾äƤ뤳Ȥ򥳥Ȥ


Ȥ桼Τˤ褯ΤǤ,

// Ϥ줿᡼륢ɥ쥹桼
var m = Member.FindByEmail(email);

// Ĥʤäȴ
if (m == null) return;

//DB³
var con = new DbConnection(connectionString);

//
con.Open();

ۥȡ̵̤Ǥ͡

ѿ̾饹̾᥽å̾ȹͤ̿̾нʬ˥ɤǰտޤɽǤ륱ۤȤɤǤ
ĤޤꡢäƤ뤳Ȥ򥳥Ȥǽ񤯤Τ̵̣Ǥ
褯褦ˡäƤ뤫ǤϤʤΤƤΤ񤭤ޤ礦(񤯤ä)
ѥեޥ󥹾Ȥ뤤ϴ¸Υ饤֥ΥХʤɤǤʥɤ񤫤ʤФʤ餤ȤΥȤͭѤȻפޤƸäɤ
  
ʳǤϡ뤳ȤǥȤȼɤ԰פȯʤְˡ ̵̤˥ڡȤäʤɡ ǥåȤΤۤ¿Ȼפޤ

ΥȤ餱Υɤ⸫ޤʤΤϥСġǤФäǤ̤˥˽񤯤Ȥ侩ͤΤˤ϶äǤɤɤɤߤŤ餯ʤ뤷̵ռ˽򤱤褦ˤʤΤǡϤľ褯ʤΤˤʡȤפäƤ⡢뵤Ƥޤ

ɽ񤫤ʤͤ˸¤äơȽ񤤤衢ȤäƤ롣ʿͤ˽вä顢ɽ񤱤ʤͤȻפäɤǤĤޤꡢϤ䳫ȯԤǤʤʿãˤȤäƤϥȤɤΤǤ礦͡

֥Ƚ񤫤ʤΤϥץޤפʤơ礭ʸǤ 

˸Τ˴ְäƲ񤭰ˤʤäƤ 
ʤ󤫤äʡ 

ȺǤ

ԤĤΥѡʪޤƤȤˡդŽäƤݥܤԤޤ
TVCMǤäƤDzΥݥǤʤǤʤȤ˱DzΥݥʤŽäƤ Ȼפ褯ƤߤȡȺǤפäơʤ̵ʤĤʤ
桼ΤäƤǤ

IMG_0132
 

MacChrome5.0

֥åޥåС˲ɤ;礢äChromeǤС5ʳȯǡˤWindowsǤƱ褦ˤư褦ˤʤäƤޤ
Ǥ⡢󥿥󥰤ɽΤäƤɤʤ

54

 

Macե PixelMator

WindowsκPhotoCrewȸʡ50006000ߡˤʤ顢ɬ׽ʬʵǽեȤ20κ餺äȻȤäƤޤ
ޥåǤϲΤȻפäõƤΤǤGIMPϤɤˤȤɤܤʤ
Photoshopϥϥʤʤ夫餽Ǥˡ
ʤˤʤʡȻפäƤ顢ޤ
PixelMatorʥǤ7000ߤ㤨ޤˡ

ҲưǤ 뤵ΤǤդ
http://www.act2.com/skin/frontend/default/default/products/pixelmator/1280.mov 

 

ȤäƤPhotoshop˹Ƥ餷ºݻ֤ϤɤפȤʤäˡPhotoshopǤλȤ򥰥äƤߤޤƤ˾Ҳ𤵤Ƥˡ򤽤ΤޤPixelMeterǽޤΤǡϤʤꤤ⤷ޤ
ˤʤȤäƤUIGIMPȤ㤤
PhotoshopϹ⤤ƽŤ ȤΤAdobeʤ㳰ʤ٤ƽŤ
Ȼפͤ䡢ץǤäƤͤʤФǽʬǤϤʤǤ礦

ºݤPhotoshopȤäƤͤεޤ
http://www.yasuhisa.com/could/review/pixelmator-1-5/

ʤߤMacޤ
ץե

Ȥ

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

QR
QR
  • 饤֥ɥ֥