2011年1月29日土曜日

Ubuntu10.10インストールメモ

気づいたら10.10の日本語Remixがでていたので、イメージをCDに焼いてノートPCにクリーンインストールしました。

前に苦戦したステルスモードの無線LANへの接続に専用の項目が設けられており、楽々接続できます。起動毎に接続に時間がかかるような事もないし快適。
これでらくらく無線接続ナンチャラが使えたら最高なんですが。

しかし、インストール途中から気になっていたことが一つ。
「インストールが完了すれば解消するだろう」と高を括っていたんですが、、、、


マウスが動かない。



(´Д`|||) えぇぇ


タッチパネルは動くのになぁ。
マウスが無線だからなんだろうかと思い、有線マウスを試してみるもNG。
USBポートを認識してないのかなぁ・・・?

Google先生に聞いてみるも、イマイチ要領を得る回答が無く、、、
しょうがないので実績のある8.10をインストールして、10.04までアップグレードしまくりました。

おかげでマウスは使えるようになりましたが、、、
よかったような、納得いかないような・・・

2011年1月23日日曜日

iswebライトが終了してた

唯一日本語のiBatisリファレンス書いていらっしゃった桜上水通信さんがiswebライトの終了とともに無くなってしまった。
こんなことならローカルに保存しておけばよかった。。。

iswebはブログが流行る前に(「ホームページ」の時代に)お世話になっていました。なんか感慨深いものがありますね。
昔はCGIの配置できる無料ホスティングサービスが少なく、iswebはその中でもレスポンスも良くてある程度容量も配置できたので、周りの人達もiswebを使用してましたね。
その頃は自分でHTMLを組んで「日記」を書き、teacupの掲示板をレンタルしてサイトを作っていました。そういえばサイトのURLもチルダ(.../~tipon/」みたいな)付きのものだったなぁ。今ではそういうサイトは見かけませんねぇ。

2010年1月15日金曜日

Gmailを固定ピッチフォントで表示する

いくつか方法があるけど、ここではuserContent.cssを変える。

XPとか
C:\Documents and Settings\(ユーザ名)\Application Data\Mozilla\Firefox\Profiles\XXXXXXXX.default\chrome\userContent.css
Vista
C:\Users\(ユーザ名)\AppData\Roaming\Mozilla\Firefox\Profiles\XXXXXXXX.default\chrome\userContent.css

ここが一番参考になった。
http://bowz.info/489

2010年1月15日時点は以下を追記する。
classは変わるようなので、変わったらまた記事を書きます。
/*
 * for Gmail
 */
@-moz-document domain(mail.google.com) {
  div[class="ii gt"] {
    font-family: monospace !important;
    font-size: 12px !important;
    /* お好みで */
    /*
    line-height: 18px !important;
    */
  }
  textarea {
    font-family: monospace !important;
  }
}

※ファイルはUTF-8で編集すること。

2009年11月14日土曜日

iBatisでクラスの配列を条件にする

たとえば、以下のChildConditionクラスの配列をプロパティとして持つParentConditionクラスを作成します。
public class ChildCondition {
private String userName = null;
private String telephoneNumber = null;
puplic String getUsrName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
puplic String getTelephoneNumber() {
return telephoneNumber;
}
public void setTelephoneNumber(String telephoneNumber) {
this.telephoneNumber = telephoneNumber;
}
}

public class ParentCondition {
private String bushoNo = null;
private ChildCondition[] childConditionList = null;
puplic String getBushoNo() {
return bushoNo;
}
public void setBushoNo(String bushoNo) {
this.bushoNo = bushoNo;
}
puplic String getChildConditionList() {
if (childConditionList == null) {
return null;
}
else {
ChildCondition[] tmp = new ChildCondition[childConditionList.length];
System.arraycopy(childConditionList, 0, tmp, 0, tmp.length);
return tmp;
}
return childConditionList;
}
public void setChildConditionList(String childConditionList) {
if (childConditionList == null) {
this.childConditionList null;
}
else {
this.childConditionList = new ChildCondition[childConditionList.length];
System.arraycopy(childConditionList, 0, this.childConditionList, 0, this.childConditionList.length);
}
return childConditionList;
}
}


このParentConditionをパラメータとしてSQLを発行することができます。
<select id="SEL_USER" parameterClass="Condition" resultMap="User">
SELECT
USER_NO,
USER_NAME
FROM
USER_MASTER
WHERE
BUSHO_NO = #bushoNo#
<iterate property="childConditionList">
AND (
USER_NAME = #childConditionList[].userName#
OR TELEPHONE_NUMBER = #childConditionList[].telephoneNumber#
)
</iterate>
<select>


ChildConditionにさらに配列を持たせたかったんですが、うまくいかない。。。
う~~ん。。。

2009年11月13日金曜日

iBatisの#と$の違い

#変数#はPreparedStatementのバインド変数です。なので、文字列であればシングルクォーテーションで囲ってくれますし、エスケープもしてくれます。
$変数$は置換されるだけで、そのまま出力されます。対象のテーブルやカラムを動的に変えたりするときに使用します。

参考)Invention Works - iBATISの動的SQL2
http://www.canetrash.jp/article/2451052.html