Displaying 20 results from an estimated 3000 matches similar to: "return yr/mo archive of posts"
2005 Jan 26
1
Converting yr mo da to dates
I'm using R 2.0.1 in windows XP (and am not currently subscribed to this
mailing list).
I have a USGS dataset, a text file with fixed width fields, that includes
dates as 6-digit integers in the form yrmoda. I could either read them that
way, or with yr, mo, and da as separate integers. In either case, I'd like
to convert them to a form will allow plotting other "y"
2007 Oct 07
22
Differences in execution between console and app
class AppointmentBook < ActiveRecord::Base
has_many :appointments
def lookup(date, look_ahead = 27)
return nil unless block_given?
(date..date + look_ahead).each do |date|
yield(date, appointments.find_all_by_date(date))
end
end
end
The line with yield is throwing the error:
undefined method ''each'' for #<Date: 4908761/2,0,2299161>
A YAML
2006 Feb 06
1
belongs_to versus references
I was just reading through the Rails book and I got to the part about
belongs_to versus references. Shouldn''t references be allowed as a
synonym to belongs_to?
Looking at this from a schema in the model view point, belongs to
corresponds to a foreign key with the cascade on delete option.
References is just a normal forgeign key with no cascade option.
--
Jon Smirl
jonsmirl@gmail.com
2006 Aug 09
7
changing find method
Hi,
i was wondering if there was a nice clean way(after all, it is ruby) to
change the find method of a certain model/class (Page) so that if i
wanted to use a find method on a @page instance it would return only
specific rows from the table(if the page.published == true/false:
the pages table looked like
SQL:
...
id int not null auto_increment,
published tinyint(1) not null,
something
2012 Feb 20
10
[PATCH] hvm: Correct RTC time offset update error due to tm->tm_year
Hi
In rtc_set_time, mktime is called to calculate seconds since 1970/01/01,
input parameters of mktime are required to be in normal date format.
Such as: year=1980, mon=12, day=31, hour=23, min=59, sec=59. However,
the current input parameter of mktime is tm->tm_year, and it is the
number of years since 1900. (For example, if current time is 2012/12/31,
and tm->tm_year is 112). This is
2014 Oct 25
3
v2.2.15 released
http://dovecot.org/releases/2.2/dovecot-2.2.15.tar.gz
http://dovecot.org/releases/2.2/dovecot-2.2.15.tar.gz.sig
Some small fixes and changes to v2.2.14. This release is mainly in the hope that it could still make it into the next Debian stable instead of v2.2.14 - mainly because of a couple of new assert crashes that started happening in v2.2.14 and should be fixed now.
* Plugins can now print
2014 Oct 25
3
v2.2.15 released
http://dovecot.org/releases/2.2/dovecot-2.2.15.tar.gz
http://dovecot.org/releases/2.2/dovecot-2.2.15.tar.gz.sig
Some small fixes and changes to v2.2.14. This release is mainly in the hope that it could still make it into the next Debian stable instead of v2.2.14 - mainly because of a couple of new assert crashes that started happening in v2.2.14 and should be fixed now.
* Plugins can now print
2006 Jan 03
20
Subversion AND Rails hosting
I''ve been scouring the net looking for different hosting solutions,
but have so far only found one site that has what I''m looking for. I
would like to be able to host both a subversion repository for
development and my rails application(s) all in one location. So far,
I''ve only found a company called AVLUX (http://avlux.net/host.php)
that has this. Does anyone know of
2018 Nov 30
8
[PATCH RFC 00/15] Zero ****s, hugload of hugs <3
On Fri, 30 Nov 2018, Kees Cook wrote:
>On Fri, Nov 30, 2018 at 11:27 AM Jarkko Sakkinen
><jarkko.sakkinen at linux.intel.com> wrote:
>>
>> In order to comply with the CoC, replace **** with a hug.
I hope this is some kind of joke. How would anyone get offended by reading
technical comments? This is all beyond me...
Thanks,
Davidlohr
2007 Dec 03
5
spec for model_id should eql
Hello,
I''m confused why the spec described below is failing. Other simple
comparison specs are passing fine for the same model. The code is working
accordingly when I test it through the console, I''m just having difficulty
getting this spec to work. Any pointers would be appreciated.
Failure message:
''Address fetch and geocode should extract department and write to
2007 Dec 04
12
params not available for controller specs?
Hi, all,
I''m trying to write a spec for a controller method that starts out:
def download
@orders = Order.find( params[:ids] )
...
and started writing a spec that set params[:ids] to a mock. I was surprised to discover that controller specs (at least in RSpec 1.0.8) don''t offer the use of the params object (per
2005 Dec 21
8
text_area
Hi I''d like to know how to add default text text area using the function
text_area. I ''ve tried using value = "....." to do this but with no
luck.
Could some one please answer my simple question?
Thanks.
Dan.
--
Posted via http://www.ruby-forum.com/.
2005 Mar 21
3
routes.rb question.
I have a simple program that read all HTML files from a directory and
returns parts of the content and the file names which are HREFs to
those file.
I build the HREF string dynamicaly as PATH_TO_DOC_ROOT + "file_name".
My PATH_TO_DOC_ROOT = http://127.0.0.1:3000/docman/public/docs. So,
the final link that I am interested in might look like this:
2005 Feb 18
1
creating POSIXct dates in C
I'm trying to generate POSIXct times in a call to a C function.
However, I'm having trouble generating times with the proper offset from
UTC.
Can anyone offer any help with this issue?
I've looked at R-2.0.1/src/main/datetime.c, but I was not able to find
an example that I could easily pull from that file.
Thanks in advance,
Whit
Here is my example in C:
#include <stdio.h>
2006 Jan 15
4
file_field vs. file_field_tag
Hi,
The documentation doesn''t make it clear why both file_field and
file_field_tag are both useful. What is the reason for having two
instead of just one of these?
Thanks,
Peter
2018 Nov 30
2
[PATCH RFC 03/15] drm/nouveau: replace **** with a hug
On Fri, Nov 30, 2018 at 5:30 PM Jarkko Sakkinen
<jarkko.sakkinen at linux.intel.com> wrote:
>
> In order to comply with the CoC, replace **** with a hug.
>
> Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen at linux.intel.com>
> ---
> drivers/gpu/drm/nouveau/nvkm/subdev/bios/init.c | 2 +-
> drivers/gpu/drm/nouveau/nvkm/subdev/pmu/fuc/macros.fuc | 2 +-
>
2006 Jul 06
3
Understanding date_select naming conventions
I am using the date_select helper to generate date select elements in a
form.
I notice that the generated HTML shows that these selects have the
following names:
Month: current_job[StartDate(2i)]
Day: current_job[StartDate(3i)]
Year: current_job[StartDate(1i)]
I''m assuming that the Xi identifiers somehow specify the appropriate
date part from a date or time value.
Can anyone
2018 Nov 30
8
[PATCH RFC 00/15] Zero ****s, hugload of hugs <3
In order to comply with the CoC, replace **** with a hug.
Jarkko Sakkinen (15):
MIPS: replace **** with a hug
Documentation: replace **** with a hug
drm/nouveau: replace **** with a hug
m68k: replace **** with a hug
parisc: replace **** with a hug
cpufreq: replace **** with a hug
ide: replace **** with a hug
media: replace **** with a hug
mtd: replace **** with a hug
2005 Mar 10
8
Login controller additions
I have added roles and roles_users table and updated the model so that
my users can have multiple roles.
("Admin" role does always have id = 1).
I have added these methods to my application controller.
<code>
helper_method :is_admin?
helper_method :is_user?
def is_admin?
if @session[''user'']
@session[''user''].roles.find(1)
2007 Sep 13
2
Failing to raise an exception in a stub
I''ve come across rather strange behaviour when trying to raise an
exception in a stubbed method.
I''m speccing the behaviour of a Rails create action, where I''m using
save! to catch failed saves. In the case of working save, I''m using
the following stub:
@client.stub!(:save!).and_return(true)
which works fine.
However, in the negative case,