2012年5月8日火曜日

ブログ引っ越しました

お試し気分で wordpress に移行してみた。
過去記事もボチボチ移行しようとは思っています。

http://blog.syamgot.com/

2012年1月23日月曜日

┐(´ー`)┌ マイッタネ♪

何のためのブログかは知らないけど、1年くらいほったらかし。 これからもきっとほったらかし。

いいじゃん別に。

くらいの気持ちで生きてます。

当面の目標としては、WordPress に引っ越したい。
いつになるやら!

2011年1月18日火曜日

Flash Builder 4 インストール時にエラー

Flash Builder 4 をインストールしなおそうとしたら、エラーが出て失敗してしまった。コントロールパネルからアンインストールしてもダメ。Flash Player 10.x (debug) をアンインストールしてもダメ。uninstaller_flash_player.exe を実行してもダメ。最終的に、この情報を頼りに、Adobe CS5 Cleaner Toolを使って、CS5 (ウチの環境下では、Flash CS5 と Flash Builder 4)を根こそぎアンインストールしてあげて、再起動してあげたら回復した。むちゃくちゃや。

検索で引っかかるかもしれないので、以下エラーログ。

Exit Code: 7


-------------------------------------- Summary --------------------------------------


 - 0 fatal error(s), 17 error(s), 17 warning(s)


WARNING: Payload {7E5AA19B-0B85-4f44-BA26-728851489200} Adobe Flash Player 10 ActiveX is already installed and the session payload {5EE868D6-7B6B-49ee-AF60-09B1358AFFD7} Adobe Flash Player 10 ActiveX has no upgrage/conflict relationship with it.


WARNING: Payload {40F95A03-885A-45fb-9A14-486BEFEDDF34} Adobe Flash Player 10 Plugin is already installed and the session payload {FB7F30B6-BFBF-4d2c-9F61-B5533659ACBE} Adobe Flash Player 10 Plugin has no upgrage/conflict relationship with it.


WARNING: Warning: {2F6B67F4-A2BB-45D7-A80C-25FF646CC1C5} Adobe Player for Embedding will not be repaired, due to updated patch of STI and one of the top level payload is being installed.


WARNING: Payload cannot be installed due to dependent operation failure


WARNING: Payload cannot be installed due to dependent operation failure


WARNING: Payload cannot be installed due to dependent operation failure


WARNING: Payload cannot be installed due to dependent operation failure


WARNING: Payload cannot be installed due to dependent operation failure


WARNING: Payload cannot be installed due to dependent operation failure


WARNING: Payload cannot be installed due to dependent operation failure


WARNING: Payload cannot be installed due to dependent operation failure


WARNING: Payload cannot be installed due to dependent operation failure


WARNING: Warning: {2F6B67F4-A2BB-45D7-A80C-25FF646CC1C5} Adobe Player for Embedding will not be repaired, due to updated patch of STI and one of the top level payload is being installed.


WARNING: Payload cannot be installed due to dependent operation failure


WARNING: Payload cannot be installed due to dependent operation failure


WARNING: Payload cannot be installed due to dependent operation failure


WARNING: Payload cannot be installed due to dependent operation failure


ERROR: Verifying payload integerity : Failed with code 1


ERROR: MsiConfigureProductEx failed with error: 1612


ERROR: The following payload errors were found during install:


ERROR:  - Microsoft_VC90_ATL_x86: Install failed


ERROR:  - Microsoft_VC90_CRT_x86: Install failed


ERROR:  - Microsoft_VC80_ATL_x86: Install failed


ERROR:  - Adobe Flash Builder: Install failed


ERROR:  - Suite Shared Configuration CS5: Install failed


ERROR:  - AdobeHelp: Install failed


ERROR:  - Adobe Flash Player 10 ActiveX: Install failed


ERROR:  - Microsoft_VC90_MFC_x86: Install failed


ERROR:  - AdobeTypeSupport CS5: Install failed


ERROR:  - Microsoft_VC80_CRT_x86: Install failed


ERROR:  - AdobeCMaps CS5: Install failed


ERROR:  - Microsoft_VC80_MFC_x86: Install failed


ERROR:  - Microsoft_VC80_MFCLOC_x86: Install failed


ERROR:  - Adobe Flash Player 10 Plugin: Install failed


-------------------------------------------------------------------------------------

2011年1月7日金曜日

気がついたら

年が明けてた。

JavaScript のクラス定義と継承

クラスの定義

正直色々ありすぎて難しい。
クロージャでやる場合と、プロトタイプでやる場合とに分けられるっぽい。

クロージャによるクラスの定義
  1. function Calc(x, y)  
  2. {  
  3.  this.x = x;  
  4.  this.y = y;  
  5.  this.add = function()  
  6.  {  
  7.   return x + y;  
  8.  }  
  9. }  
  10. alert(new Calc(1,2).add());  
プロトタイプによるクラスの定義その1
  1. function Calc()  
  2. {  
  3.  this.initialize.apply(this, arguments);  
  4. }  
  5.   
  6. Calc.prototype.x = 0;  
  7. Calc.prototype.y = 0;  
  8. Calc.prototype.initialize = function()  
  9. {  
  10.  var o = this;  
  11.  o.x = arguments[0];  
  12.  o.y = arguments[1];  
  13. }  
  14. Calc.prototype.add = function()  
  15. {  
  16.  var o = this;  
  17.  return o.x + o.y;  
  18. }  
  19.   
  20. alert(new Calc(1,2).add()); // 結果 : 3  

こちらは、プロトタイプに追加している。

プロトタイプによるクラスの定義2
  1. function Calc()  
  2.   
  3.  this.initialize.apply(this, arguments);  
  4. }  
  5.   
  6. Calc.prototype =   
  7. {  
  8.  x : 0,  
  9.  y : 0,  
  10.  initialize : function()  
  11.  {  
  12.   x = arguments[0];  
  13.   y = arguments[1];  
  14.  },  
  15.  add : function()  
  16.  {  
  17.   return x + y;  
  18.  }  
  19. }  
  20.   
  21. alert(new Calc(1,2).add()); // 結果3  

こちらは、プロトタイプを上書きしている。
こっちのほうがスッキリしてていいけど、これだと継承するときに問題がある。

クラスの継承

クラスにも色々と方法がある。
とりあえず、プロトタイプによる継承の場合、基本的には

  1. function CalcEx()  
  2. {  
  3.  this.initialize.apply(this, arguments);  
  4. }  
  5.   
  6. CalcEx.prototype = new Calc();  
  7.   
  8. alert(new CalcEx(3,4).add()); // 結果7  

とするわけだけど、継承したクラスを『プロトタイプによるクラスの定義2』の パターンで定義してしまうと、プロトタイプを上書きしてしまうので、 継承元で定義した prototype が消えてしまう。 なので、プロトタイプを利用したクラス定義を行うなら、プロトタイプに追加する パターンが望ましい。

※もっとも、色々な方法でもって、拡張する方法がいくらでも存在する。要勉強

2010年11月2日火曜日

Evernote 4 で tabキー 押したらスペースでインデントしたい

Evernote 4 から、tabキーを入力すると、スペースでインデントされなくなった。その上、同期するとクリアされてしまう。どないやねん。とりあえず、AutoHotKey を使って差し替えをしてあげる。

AutoHotKey をインストール後、メモ帳などで下記の内容のファイルを作成、名前は適当に(Evernote_TabToSpace.ahk とでも)付けて、ダブルクリックで起動。

#IfWinActive ahk_class ENMainFrame
Tab::
{
 Send {Space}{Space}{Space}{Space}
}
#IfWinActive

見栄えは悪いけど、とりあえず動くからいいや。

2010年10月21日木曜日

Evernote の勝手にハイパーリンクが気にくわない

クライアント版の Evernote はあなたの味気ないテキストを、クールなエディタが賢くサポートしてくれるので、『URLを記述する -> 改行する』 だけで、自動的に記述したURLにハイパーリンクを作成してくれます。すごいね!うっとうしい!

設定で何とかならんのかと探してみたけど、それらしいものが見当たらなくて難儀していたけど、とりあえず見つけた解決方法としては、改行するときに 『Shift + Enter』 で行うということ。ショートカットとかで調べてみると、『<br>を挿入する』とあるけど、見た目は特に変わりないし、iPhone 版の Evernote で編集しようとしてみても、リッチテキストのノートと判定される様子もないので、多分大丈夫でしょう。

[追記 2011/01/25]
と思ってたんだけど、今確認してみたら(ver 4.2)できなかった。なんでだ。勘違い?白昼夢でも見た?ごめんなさい。