</body></html>
再把下面這段程式加入上面那段之前
IT...
date1 = Date.new(year, month, 1)
date2 = Date.new(year, month, -1)
self.find(:all, :conditions => ["start_at >= ? and start_at <= ?", date1.beginning_of_day, date2.end_of_day] )
>> puts Time.zone
>> puts date1.beginning_of_day.zone
>> puts date1.beginning_of_day
>> puts date1.beginning_of_day.to_s(:db)
>> puts date1.beginning_of_day.in_time_zone(Time.zone).zone
>> puts date1.beginning_of_day.in_time_zone(Time.zone)
>> puts date1.beginning_of_day.in_time_zone(Time.zone).to_s(:db)
>> puts Date.parse("2009-6-01T00:00:00+00:00").beginning_of_day.in_time_zone(Time.zone).strftime("%Y-%m-%d %H:%M:%S")
>> Date.today.beginning_of_day
=> Fri Apr 10 00:00:00 -0500 2009
>> Time.zone.now.beginning_of_day
=> Fri, 10 Apr 2009 00:00:00 CDT -05:00
>> Date.today.beginning_of_day == Time.zone.now.beginning_of_day
=> true
>> Person.all :conditions => [ "created_at > ?", Date.today.beginning_of_day ]
=> Generated SQL => SELECT * FROM "people" WHERE (created_at > '2009-04-10 00:00:00')
>> Person.all :conditions => [ "created_at > ?", Time.zone.now.beginning_of_day ]
=> Generated SQL => SELECT * FROM "people" WHERE (created_at > '2009-04-10 05:00:00')
fmTime = Time.zone.local(year, month, 1, 0, 0, 0)
toTime = Time.zone.local(year, month, -1, 23, 59 ,59)
self.find(:all, :conditions => ["start_at >= ? and start_at <= ?", fmTime, toTime] )
>> puts Time.zone
>> puts fmTime.to_s(:db)
>> puts toTime.to_s(:db)

def access_denied
respond_to do |format|
format.html do
store_location
redirect_to new_session_path
end
format.any do
request_http_basic_authentication 'Web Password'
end
end
end
def access_denied這樣就可以正確的進入login畫面囉.
respond_to do |format|
format.any do
store_location
redirect_to new_session_path
end
end
end

修改的方法很簡單.
[bin/jmeter.properties]
language=en
加上這行再重新啟動就可以囉.
慢慢上手後, 覺得真的不錯用, 雖然不像XXXrunner那麼強大, 但作為Web系統的功能測試已很足夠, 也可以做壓力測試, 功能選項中有Remote Start的選項, 雖然還沒研究要如何設定, 不過看來要做強度很大的分散式壓力測試也不是難事.
JMeter samplers include:






The following features of the JDO interface are not supported by the App Engine implementation:
contains() syntax for query filters on Collection fields. You can test that a multi-valued property (a Collection field) has a value using an equality filter: collection == "value"IdentityType.DATASTORE for the @PersistenceCapable annotation. Only IdentityType.APPLICATION is supported.The following features of the JPA interface are not supported by the App Engine implementation:
<uses-sdk minsdkversion="1">但是不work...好吧~ 那換
<uses-sdk minsdkversion="1"></uses-sdk>看看...也不work @#$%@#$%...再試試看
<uses-sdk android: minSdkVersion="1"/>...終於成功了~
怎麼在畫面上印出五次test?
=> 5.times{puts "test"}
讓字串重複相加五次只能說我真的很不習慣吧... 對我來說Ruby有太多的符號, 以及感覺像程式糖衣的東西... 繼續無言的學習中..."test"*5=> "testtesttesttesttest"
最近開發中的軟體要跟server端溝通, 目前決定的架構要使用Web Services來當作溝通的通道. 我跟據以前的經驗, 請我們家的engineer去survey如何使用ksoap2-android這個library, 但是他跟我說新版的lib一直有問題, import進eclipse就會出錯...
隨著 GeoAlarm上線, 但是因為第一次放程式到Android Market上, 有蠻多事情與預期不同, 程式出了一些問題... 有點沮喪... 因此突發奇想寫了這個 VibrateMaster.