search for: today

Displaying 20 results from an estimated 26294 matches for "today".

2008 Nov 19
3
Mock today
In some of my unit tests, I find the need to set today to a different value than the actual today. For example, to test the model method "balance_of_today", which takes no argument, I want to have Date.today be a specific date for the purpose of testing. In other words, I want to do something like this: mock_today(Date.new(2008, 2, 1)) do...
2012 Aug 22
0
btrfsprogs: cases of snapshot failures
...ange effect that directories get created, and do so with the wrong inode info: # ls -l HEAD total 4 drwxr-xr-x 1 root root 18 Aug 18 01:04 . dr-xr-xr-x 1 root root 218 Aug 23 00:25 .. drwxr-xr-x 1 root root 66 Aug 17 23:04 leet drwxrwx--- 1 root root 100 Aug 18 00:53 woven # btrfs sub snap HEAD today Create a snapshot of ''HEAD'' in ''./today'' # ls -l today total 4 drwxr-xr-x 1 root root 18 Aug 18 01:04 . dr-xr-xr-x 1 root root 228 Aug 23 00:25 .. drwxr-xr-x 1 root root 0 Aug 23 00:25 leet drwxr-xr-x 1 root root 0 Aug 23 00:25 woven 3. The creation of the...
2010 Aug 18
2
Different way of aggregating
Hi Usually "aggregate" is used to calculate things such as the sum of all data on the first day, the sum next day, and so on. But how can I calculate the mean of the first hour of all days, the mean of the second hour of all days, and so on. ??? That's Most examples: today at 1am + today at 2am + today at 3am +.... -> sum today tomorrow at 1am + tomorrow at 2am + tomorrow at 3am +.... -> sum tomorrow .................. aggregate(data, as.Date,sum) But what I need is: data today at 1 + data tomorrow at 1 + data in two days at 1 + ........
2004 Jun 17
2
Date Calculation
Hi, I've been playing with: > joinDate <- format(strptime(as.vector(forum[,2]), "%d-%b-%y"), + "%d-%b-%Y") > today <- format(strptime(as.vector("14-Jun-04"), "%d-%b-%Y"), + "%d-%b-%Y") > joinDate [1] "04-Feb-2004" "13-Feb-2004" "26-Feb-2004" "27-Feb-2004" "27-Feb-2004" [6] "27-Feb-2004" "29-Feb...
2008 Jan 24
2
Meridian case
Hi there, I have a *really* weird issue with rspec on rails: Given a time meridian formatted using %p When I run `rake spec` the time meridian is converted to lower case: expected: "Today 08:00 PM", got: "Today 08:00 pm" Yet when I run `rake spec:models` and `spec -cfs app/models` the specs pass, ie the the time meridian is in upper case. Anyone got any ideas how I can troubleshoot this one ? I''m using rails 1.2.3, ruby 1.8.6, i686-darwin8.10.1, RSp...
2006 Aug 11
4
date (age) validation
I have an application that requires users to be in a specific age group, or above a certain age. For simplicity sake lets say they have to be at least 18. This is my most recent attempt to produce the desired result: validates_exclusion_of :birthday, :in => Range.new(Date.today, Date.parse( (18.years.ago).strftime(''%Y/%m/%d'') )), :message => "does not meet Terms of Service requirements" " Date.parse( (16.years.ago).strftime(''%Y/%m/%d'') ) " works as expected in console, however the validation always results...
2009 Nov 03
2
Issue with %in% - not matching identical rows in data frames
Hi folks I have two data frames. I know that the nth (let's say the 7th) row in the first data frame (sequence) is there in the second (today.sequence). When I try to check that by doing 'sequence[7,] %in% today.sequence', I get all FALSE when it should be all TRUE. I'm certain I'm making some trivial mistake. Any solutions? The code to recreate the data frames and see for yourself is: ---- sequence <- structure(li...
2006 Oct 24
1
Code blocks syntax as method arguments
How do I format this so that it does what I want it to, Day.find_by_month_and_year( [Date::today.month + 1 if !Date::today.month == 12 else 1 end], [Date::today.year if !Date::today.month == 12 else Date::today.year + 1 end] ) ? WHICH IS to pass Day.find_by_month_and_year Date:today.month +1 if the month is not december otherwise pass, 1, and to pass as the second argument Date::today.y...
2007 Nov 03
3
Birthdate validation
...-z0-9]+\.)+[a- z]{2,})$/i validates_acceptance_of :policy_agreement, :message => "must be accepted. You have to read and agree with the Aykall Policies before signing in." validates_multiparameter_assignments :message => " is not a valid date." age_limit = Date.new(Date.today.year, Date.today.month, Date.today.day).change(:year => Date.today.year - 18) validates_numericality_of :birth_date, :less_than => age_limit, :message => "is invalid. You have to be at least 18 years old to sign in." end I''m getting the error message "undefined me...
2006 Apr 22
4
How to supress field name in error message?
...in the full error message? I want the error to be associated with the field so that the .fieldWithErrors class is applied to the field but I don''t want it to add the field name to the actual error message. For example: errors.add("occurs_on", "The date can''t be today!") unless occurs_on != Date.today I would like the error to read: The date can''t be today! Rather than: Occurs on The date can''t be today! Is there any way to do this? Thanks in advance Dave
2006 Feb 28
5
Getting number of days in a month
...tion to get the number of days in the current month: echo date("t"); // Outputs "28" for February I don''t see anything like this in Ruby/Rails. Right now, I''m using a very ugly line to pull the last day of the month: @number_of_days = (Date.strptime(Date.today.strftime("%Y-%m-01")) >> 1) - 1 Basically, it takes the first day of the current month, adds one month, and then subtracts one day. Am I completely overlooking some obvious and easy way to do this? (I''m assuming so).
2014 Jul 29
2
SIG IRC meeting today at 2pm UK time - call for agenda items / attendees
Hi all, we do have an IRC SIG meeting scheduled for 2pm UK today. George is in the US and may not be able to join as the call is early. It also looks as if I may not be able to join. Are there any items to discuss? If so, please raise anything you want to discuss Who is planning to join? Raise your hand in the next hour If I don't get items/participants...
2005 Dec 20
1
SVN-REVSION altered when building R-devel out of tree from last snapshot
Hi, Today I downloaded and compiled the last R-devel snapshot. The SVN-REVISION in the tarball contains the following: Revision: 36792 Last Changed Date: 2005-12-18 But after compiling on Unix (I compiled out of tree), I ended up with an SVN-REVSION file containing: Revision: unknown Last Changed...
2009 Apr 11
3
Updated today - number of rows
How can I get number of rows that was updated "today"? Table: messages (id, title, message, updated_at) -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send ema...
2014 Nov 26
2
[LLVMdev] LVM buildmaster will be restarted today after 6 PM Pacific
Hello everyone, LLVM buildmaster will be restarted today after 6 PM Pacific time today. Thanks Galina -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20141126/2d94025c/attachment.html>
2005 Oct 09
1
Insert value from same column of another row (lag across observations)
...nd quite what I need in the help files or archives. I have a text field in a very large data frame. I'd like to add a column that represents the value from an existing field, from the next record (the data are sorted). I'm trying to represent "what happens tomorrow", so the "today" row would have an "NA" value (unknown). So if x is: > x [,1] [1,] "today" [2,] "yesterday" [3,] "the day before" [4,] "two days before" any y is > cbind(x,c(1,2,3,4)) [,1] [,2] [1,] "today" "1" [2,] "yesterday&...
2001 Mar 22
5
Major network slowdown today... Samba the cause?
Today, our network has been excruciatingly slow. I checked the log.nmb file, and I noticed that today, the Samba PDC has been losing its "local master browser" status every 2 minutes or so, for about 15 seconds, to a Win9x client. Before today, this also happened, but only a few times each...
2012 Nov 17
4
survfit & number of variables != number of variable names
This works ok: > cox = coxph(surv ~ bucket*(today + accor + both) + activity, data = data) > fit = survfit(cox, newdata=data[1:100,]) but using strata leads to problems: > cox.s = coxph(surv ~ bucket*(today + accor + both) + strata(activity), > data = data) > fit.s = survfit(cox.s, newdata=data[1:100,]) Error in model.frame.default...
2005 Dec 12
1
Search screens with dates
...mber of problems: -- datetime_select wants an active record model -- select_datetime does not take the options that datetime_select take - specifically :order that leaves me with something like <label>Date/Time To:</label><br /> <%= select_day time = Date.today, {:prefix => ''to''} %> <%= select_month Date.today, {:prefix => ''to''} %> <%= select_year Date.today, {:prefix => ''to''} %> <%= select_hour Time.now, {:prefix => ''to''} %&gt...
2010 Mar 03
1
Finding a date 6 months before
Hello everyone I use zoo objects and I need to find a date 6 months before today's date. Example, today we have 3rd March 2010, I need to find the date 3rd September 2009. How could I do that, please? Regards, Sergey -- Simplicity is the last step of art./Bruce Lee The more you know, the more you know you don't know.