2012年11月29日木曜日

apache solrでなにか作りたいときは

とりあえず、exampleディレクトリコピペ
そして、schema.xmlを絶対変更
solrディレクトリの下のcollectionsってやつ、MySQLで言うテーブルみたいなもんなんで、それをコピって名前変えて、schema.xmlをなんとかしてとかやる

importも結構簡単。dataimporthandlerを使えばよい

firebugのネットワーク

通信の状況とか取得したもの確認できるから今後使って行こう

2012年11月13日火曜日

カウントチェックしてからSQL要らないよ

insert into CustomerStatus (KeyId, StatusCode, StatusValue) values ('U000000001', 'MailMagazineSendStatus', '1') on duplicate key update StatusValue='1'

これでいいみたい

http://dev.mysql.com/doc/refman/5.0/en/insert-on-duplicate.html
http://stackoverflow.com/questions/763577/mysql-good-way-to-insert-a-row-if-not-found-or-update-it-if-it-is-found

group byとorder by

group by はorder byに書かなきゃダメ
 group by Answer.AnswerId order by Answer.LastUpdate desc

2012年11月10日土曜日

titanium tabアプリの縦置き固定(android)

以下記述をtiapp.xml


<activity 
          android:configChanges="keyboardHidden|orientation" 
          android:name="ti.modules.titanium.ui.TiTabActivity"
          android:screenOrientation="portrait"
          />

smartyでmb_substr

こう書けばよい
{$aryData.strQuestionContent|mb_strimwidth:0:20:"...":"utf-8"|default:''}


2012年11月6日火曜日

androidで各デバイスの画像対応をOFFにするには


 <supports-screens android:anyDensity="false"/>
とかく

titaniumは
<android xmlns:android="http://schemas.android.com/apk/res/android">
        <manifest>
            <supports-screens android:anyDensity="true"/>
        </manifest>
    </android>
こんな感じ

こうすると、320*480ベースに画像を勝手に拡大縮小するっぽい
時間ないときはこの対応しかないかな。
歪むの覚悟で

2012年11月2日金曜日