search for: start_tim

Displaying 20 results from an estimated 248 matches for "start_tim".

Did you mean: start_time
2006 Mar 21
5
Getting a time select input
...an ActiveRecord field of type :time. I just want an hours input and a minuites input. I can get these with time_select helper using :field_name and :prefix but it gives both hours and miniutes the same name. <%= select_time(Time.now, :prefix => "search", :field_name => "start_time") %> <select name="search[start_time]"> <!-- hour options --> <select name="search[start_time]"> <!-- min options --> I see when you use the datetime_select it gives each element something like 1i, 2i, 3i and 4i, this does not happen with sele...
2006 Jul 25
4
Sorting by two fields
I have a list of TimeSheet objects from an ealier AR query, which I can sort by the full name of the user like so: @time_sheet_entries.sort! { |a,b| a.user.full_name <=> b.user.full_name } I can sort by the started time like so: @time_sheet_entries.sort! { |a,b| a.start_time <=> b.start_time } My question is how do I do a sort so that the list is sorted primarily by user.full_name but also by start_time? So that all the records for Joe Blogs are together but within those rather than being random it is then ordered by start_time? I know I could do it by putting...
2001 Nov 29
1
patch from faith@alephnull to add rate indicator to --progress
...ns to provide optimal throughput.] --- rsync-2.4.6/util.c.rik Tue Sep 5 22:46:43 2000 +++ rsync-2.4.6/util.c Fri Oct 5 09:19:35 2001 @@ -835,28 +835,70 @@ return (int)*s1 - (int)*s2; } -static OFF_T last_ofs; +static OFF_T last_ofs; +static struct timeval print_time; +static struct timeval start_time; +static OFF_T start_ofs; + +static unsigned long msdiff(struct timeval *t1, struct timeval *t2) +{ + return (t2->tv_sec - t1->tv_sec) * 1000 + + (t2->tv_usec - t1->tv_usec) / 1000; +} + +static void rprint_progress(OFF_T ofs, OFF_T size, struct timeval *now) +{ + int...
2000 Aug 01
2
ogg123 timekeeping
Does this look okay? : Time: 1:15.50 of 4:13.73, Bitrate: 133.3 How about? : <snip from=ogg123.c> info.u_time = ov_time_total (&vf, -1); /* Seconds with double precision */ gettimeofday (&start_time, NULL); t_min = (long) info.u_time / (long) 60; t_sec = info.u_time - 60 * t_min; while (! eos) { gettimeofday (&cur_time, NULL); c_min = (long) (cur_time.tv_sec - start_time.tv_sec) / (long) 60; c_sec = (cur_time.tv_sec - start_time.tv_sec) - 60 * c_min + (...
2006 Sep 22
2
I''m misunderstanding how stubs works
...ha/Stubba, so please forgive any newbie errors. I''m using "stubs" to test some realtime functions, to control exactly which time is returned from Time.now. I would expect the following test to pass: def test_two_stubs t = Time.now - 60 Time.stubs(:now).returns(t) start_time = Time.now t += 20 Time.stubs(:now).returns(t) end_time = Time.now assert_equal end_time - start_time, 20 end But it fails with: 1) Failure: test_two_stubs(MochaTest) [mochatest.rb:19]: <0.0> expected but was <20>. I can create a test which works as I intend:...
2006 May 27
7
How should I select rows from a join-model based on more than one association?
...eing held in a specific convention. For example, Matz may host an "Introduction to Ruby" workshop in RubyConf. And _why may host a the same workshop in RailsConf. This operates through the join-model convention_workshops, which has the following rows: convention_id, workshop_id, host_id, start_time. It belongs_to :convention, :workshop, and :host. Associations make it very easy to select by one association. If I want to get the start_time of all workshops held on RubyConf Matz, I just find RubyConf''s model instance and call #convention_workshops.collect{|cw| cw.star_time} on it. Bu...
2006 Aug 30
7
AAF Sorting by date - what am I doing wrong?
I''m trying to sort my search results by Date, in descending order. I''ve done quite a bit of reading through the forums here, and I''ve tried two different suggestions. This just returns results in the same order as a search without a sort: sort_fields = [] sort_fields << Ferret::Search::SortField.new("ferret_created_at",:reverse => :true)
2006 Sep 25
3
Engine Yard blog
Just received the news from Tom Mornini. Congrats Ezra for the new Engine Yard site and the blog you will be collaborating. Hope to read you there soon. http://www.engineyard.com/ Jonathan -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/backgroundrb-devel/attachments/20060925/3f251fa4/attachment.html
2006 Apr 15
2
Multi-parameter assignment
Hi, I''m trying to submit data from text boxes on a form to one variable in my controller, in the same way that datetime_select has date(1i), date(2i), etc for day, month, year, etc... I''ve named my variables event[start_date(1i)] event[start_date(2i)] and event[start_date(3i)] but this doesn''t seem to work and event[:start_date] is blank ... any pointers would be
2014 Feb 21
5
[LLVMdev] interesting LLVM code optimization issue regarding timer registers
This problem was reported to me by a friend who has an LLVM port that is not put back to open source. Essentially, there is an intrinsic call _lr which is a load register. so then user code has something like: start_time = _lr(TIMER_REGISTER) ..... some_code_to_time .... end_time = _lr(TIMER_REGISTER) So what happens is that LLVM moves the code as follows: start_time = _lr(TIMER_REGISTER) end_time = _lr(TIMER_REGISTER) ..... some_code_to_time ...... How would this intrinsic be implemented properly in llvm so...
2013 Aug 22
1
How do I deal with ActiveRecord::RecordInvalid: Validation failed:
...l false, FactoryGirl.create(:reservation), "reservation was created after total reservation for time slot was reached." end app/models/reservation.rb def check_reservation_time errors.add(:base, "Can''t set reservation to a time before 5pm.") if parse_time(start_time) < parse_time("17:00") errors.add(:base, "Can''t set reservation to a time after 8pm.") if parse_time(start_time) > parse_time("20:00") errors.add(:base, "Reservation limit reached for this time slot") if reservation_limit_reached?(...
2004 Feb 27
2
patch: better progress meter
Skipped content of type multipart/mixed-------------- next part -------------- A non-text attachment was scrubbed... Name: PGP.sig Type: application/pgp-signature Size: 186 bytes Desc: This is a digitally signed message part Url : http://lists.samba.org/archive/rsync/attachments/20040227/923b87ee/PGP.bin
2006 Jul 21
0
Marshal.dump not dumping entire object?
...Runt. While I''ve simultaneously filed this problem with Matt Lipper, I''m also hoping someone here can can guide me a little - either in implementation (usage of Marshal), or to aid me to fix Runt to support Marshal. script/console Loading development environment. >> start_time = Runt::PDate.min(Runt::REDay::ANY_DATE.year, Runt::REDay::ANY_DATE.month,Runt::REDay::ANY_DATE.day, 8, 11) => #<Runt::PDate: 3531621371/1440,0,2299161> >> data = Marshal.dump(start_time) => "\004\010u:\020Runt::PDateA\004\010[\010o:\rRational\a: \017@numeratorl+\a\373C\...
2006 Jul 21
0
[RESOLVED] Marshal.dump not dumping entire object?
...Runt. While I''ve simultaneously filed this problem with Matt Lipper, I''m also hoping someone here can can guide me a little - either in implementation (usage of Marshal), or to aid me to fix Runt to support Marshal. script/console Loading development environment. >> start_time = Runt::PDate.min(Runt::REDay::ANY_DATE.year, Runt::REDay::ANY_DATE.month,Runt::REDay::ANY_DATE.day, 8, 11) => #<Runt::PDate: 3531621371/1440,0,2299161> >> data = Marshal.dump(start_time) => "\004\010u:\020Runt::PDateA\004\010[\010o:\rRational\a: \017@numeratorl+\a\373C\...
2006 Mar 09
1
OOP basics
I''ve got: def new @schoolclass = Schoolclass.new(:day=>1, :start_time=>"2006:01:01 00:00:00, :description=>"enter description here") breakpoint() end after the breakpoint, I can @schoolclass.inspect and see the @schoolclass attributes, however @schoolclass.day, @schoolclass[:day] and @schoolclass["day"] all return NIL. what am I...
2008 Apr 08
0
Help building view to pass query to controller
...earch field that will take text and inject it to part of a pre-configured sql query I have setup in a model. I will try to explain as best I can with code. Specifically I would like to set a view form that will take the text and pass that text value to the class vars i have defined (@@hostname, @@start_time and @@end_time). Once the VARs have user inputted values the code will run and result to display. I think I am going to be dealing with form_tags adn I have attemped this way but with no luck. I hope I explained this correctly as again I am a programming newbie. Thanks in advanced for any input....
2014 Feb 05
0
Solr Search with one to many associations
...y model structures and relations as follows class Teacher < ActiveRecord::Base attr_accessible - name, address, phone has many :slots searchable do string :day, multiple => true, stored => true do slots.map(&:day) end string :start_time, multiple => true, stored => true do slots.map(&:start_time) end string :start_time, multiple => true, stored => true do slots.map(&:end_time) end end end class Slot < ActiveRecord::Base attr_accessible - day,...
2007 May 20
0
Branch 'as' - libswfdec/swfdec_as_context.c libswfdec/swfdec_as_context.h libswfdec/swfdec_as_interpret.c libswfdec/swfdec_player.c
...426 100644 --- a/libswfdec/swfdec_as_context.c +++ b/libswfdec/swfdec_as_context.c @@ -316,6 +316,7 @@ swfdec_as_context_init (SwfdecAsContext g_assert (*s == 0); context->global = swfdec_as_object_new (context); context->rand = g_rand_new (); + g_get_current_time (&context->start_time); } /*** STRINGS ***/ @@ -359,6 +360,30 @@ swfdec_as_context_new (void) return g_object_new (SWFDEC_TYPE_AS_CONTEXT, NULL); } +/** + * swfdec_as_context_get_time: + * @context: a #SwfdecAsContext + * @tv: a #GTimeVal to be set to the context's time + * + * This function queries the t...
2010 Nov 02
2
multi-level cox ph with time-dependent covariates
...same days, until a certain outcome was reached (or outcome censored). Suppose that the pathogen can vary over time (might be a bacteria that selects for drug-resistance) and that also it can vary across different tissue reservoirs within the same patient. In other words: names(data) = patient_id, start_time, stop_time, tissue_id, pathogen_type, marker1, ..., marker100, ..., outcome If I had multiple observations per patient at different time intervals, I would model it like this (hope it is correct) model<-coxph(Surv(start_time,stop_time,outcome)~all_covariates+cluster(patient_id)) But now I ha...
2004 Nov 20
0
ffmpeg2theora start and end time support - patch
...c.in/nilesh/ -------------- next part -------------- Index: ffmpeg2theora.c =================================================================== --- ffmpeg2theora.c (revision 8237) +++ ffmpeg2theora.c (working copy) @@ -76,6 +76,9 @@ int video_y; int frame_x_offset; int frame_y_offset; + + int start_time; /* In seconds */ + int end_time; /* In seconds */ } *ff2theora; @@ -128,7 +131,8 @@ this->frame_bottomBand=0; this->frame_leftBand=0; this->frame_rightBand=0; - + this->start_time=0; + this->end_time=0; /* ZERO denotes no end time set */ } re...