October 26, 2009

Recent life cycle

  1. 6:30〜7:00の間 起床
  2. 朝ご飯の支度
  3. 身支度
  4. 必要に応じて洗濯
  5. 息子がご飯食べ終わるのを待つ
  6. 後片付け
  7. 通勤 1時間弱
  8. 仕事
  9. だいたい定時に退社
  10. 息子を風呂に入れる
  11. 遅くとも21時ぐらいまでには息子を寝かす
  12. 翌日のご飯の仕込み
  13. 自分の晩ご飯の支度
  14. 後片付け
  15. 風呂
  16. 寝る
時間ができたら仕事でもしようかと思いつつそんな余裕が全くない日々。とりあえずまだ生きてます。

October 9, 2009

paps on Git

I'm starting to share our changes in paps at fedora branch on Git repo, hosted by fedorapeople.org. just FYI if you are interested in.

August 12, 2009

How to recover the headset issue with the manner mode

HTC Touch Proでは、ヘッドセットが接続された状態ではマナーモードが設定できません。接続された状態で電源が切れ、OFFの状態でヘッドセットを抜くとWindows Mobile内での情報がちぐはぐになり、接続されていないにも関わらず、マナーモードに設定できない不具合があるようです。今日はこの状態から回復する方法を書いてみることにします。

ヘッドセットが手元にある場合は、再度抜き差しで元に戻すことができますが、手元にない場合回復する手段はレジストリをいじる以外にありません。以下のキーを1から0にすることで元に戻せます。


HKLM\Software\HTC\MannerMode\HeadsetA

July 14, 2009

How to add a feature to spotlight a column search on ActiveScaffold

ActiveScaffold is really nice to build something with Ruby on Rails. that saves my time a lot. though it may requires extra internal knowledges to do something that it doesn't provide. even generally.

So this is just a tips to add a column-based search feature to the ActiveScaffold. you can just patch it out to lib/active_scaffold/actions/search.rb and/or live_search.rb, or add it to your controller where you want to enable this feature.


def do_search
@query = params[:search].to_s.strip rescue ''

unless @query.empty?
tmpq = @query.split(' ')
columns_query = {}
tmpq.delete_if do |x|
retval = false
if x =~ /\A(.*):(.*)\Z/ then
p = $1
v = $2
if !p.nil? && !p.empty? && !v.nil? && !v.empty? &&
active_scaffold_config.columns.include?(p)
then
columns_query[p] = v
retval = true
end
end
retval
end
columns = active_scaffold_config.live_search.columns
like_pattern = active_scaffold_config.live_search.full_text_search? ? '%?%' : '?%'
search_conditions = self.class.create_conditions_for_columns(tmpq, columns, like_pattern)
self.active_scaffold_conditions = merge_conditions(self.active_scaffold_conditions, search_conditions)
columns_query.each do |p,v|
active_scaffold_config.columns.each do |column|
next if column.column.nil?
if column.column.name == p then
sql = column.column.text? ? "LOWER(#{column.search_sql}) LIKE ?" : "#{column.search_sql} = ?"
token = column.column.text? ? like_pattern.sub('?', v.downcase) : column.column.type_cast(v)
self.active_scaffold_conditions = merge_conditions(self.active_scaffold_conditions, [sql, token])
break
end
end
end
@filtered = !search_conditions.blank?

includes_for_search_columns = columns.collect{ |column| column.includes}.flatten.uniq.compact
self.active_scaffold_joins.concat includes_for_search_columns

active_scaffold_config.list.user.page = nil
end
end

July 10, 2009

How to get rid of the line separators on Today

From Xda-developers:
Code:
REGEDIT4
[HKEY_LOCAL_MACHINE\Software\Microsoft\Today]
"HidePluginSeparators"=dword:1
It works fine on HT-01A too. though I may want to update my Today. it looks not so sweet unfortunately..