Displaying 20 results from an estimated 300 matches similar to: "Question on passing arguments inside a view."
2012 Jan 22
4
undefined method `gsub!' for 2012-01-22 17:00:00 -0500..2012-01-23 00:00:00 -0500:Chronic::Span
Hey all,
I am getting this error:
NoMethodError (undefined method `gsub!'' for 2012-01-22 17:00:00
-0500..2012-01-23 00:00:00 -0500:Chronic::Span):
in this code:
date_range = Chronic.parse(the_date, :guess =>
false)
reports.sum_distance_by_date(date_range).each do |d|
u[:m] << d
end
def
2009 Mar 13
2
date_select and HTML options?
I have the following code, but can''t seem to get the class attribute
to show up in the generated select elements. I saw something about a
bug/patch. However, as am still learning RoR I didn''t want to jump to
conclusions. Anyone see anything wrong:
<%= f.date_select :expiration_date, :order =>
[:month, :year], :discard_day => true, :class => "dtfld" %>
2008 Jun 07
3
DRY validates_format_of?
In a model I have following validates_format_of. Is there an easy way to
DRY this up? It seems to be rather repetitive.
validates_format_of :expiration_date, :with =>
/^[0-9]{4}[-][0-9]{2}[-][0-9]{2}$/
validates_format_of :activation_date, :with =>
/^[0-9]{4}[-][0-9]{2}[-][0-9]{2}$/
validates_format_of :some_other_date, :with =>
2007 Nov 13
1
Cleaning database: grep()? apply()?
Dear R users,
I have a huge database and I need to adjust it somewhat.
Here is a very little cut out from database:
CODE NAME DATE DATA1
4813 ADVANCED TELECOM 1987 0.013
3845 ADVANCED THERAPEUTIC SYS LTD 1987 10.1
3845 ADVANCED THERAPEUTIC SYS LTD 1989 2.463
3845 ADVANCED THERAPEUTIC SYS LTD 1988 1.563
2836 ADVANCED TISSUE
2011 Aug 26
2
how to convert Date to this json format
Hi
I have to create a json date like
{"startDate":"\/Date(1291145744713-0700)\/","endDate":"\/Date(1293824144713-0700)\/"}
This is just an example.
My case startdate = Time.now-2.day
enddate = Time.now
I dont know how to convert this to the above format. Please help
Thanks
--
Posted via http://www.ruby-forum.com/.
--
You
2012 Jan 01
4
Chronic parsing date range in console but not in application in rails 3
Hey all,
Chronic will parse a date range in console:
Chronic.parse(1/1/2011 - 1/1/2012, :guess => false)
=> 2012-01-01 12:00:00 -0500..2012-01-01 12:00:01 -0500
However, when I use logger to check if it''s parsing in application, it
is not:
logger.info "The value of history date is #{history_date}" =>
The value of history date is 1/1/2011 - 1/1/2012
2004 Nov 19
18
SingleTableInheritance Considered Harmful
Here''s the text of a quick note I''ve added to the Inheritance wiki page.
I''m actually proposing that it would be a good idea to drop automatic
single table inheritance and force people to declare it explicitly.
There are two reasons for this:
1. Implicitly doing it unnecessarially limits your use of
inheritance where you really need it: in your object-oriented
2013 Apr 09
19
[PATCH 00/17] Btrfs-progs: some receive related patches
Most fixes are trivial.
The one from Alex is fixing a real bug that several users have reported.
Alex sent the patch half a year ago and it was not yet integrated.
The patch "Use /proc/mounts instead of /etc/mtab" is a repost.
The patch "btrfs-receive optionally honors the end-cmd" is a preparation
step to allow backup tools to multiplex a single communication stream
(e.g. a
2011 Jul 07
5
[PATCH v1 0/2] Btrfs-progs: commands "resolve inode" and "resolve logical"
The kernel patch series just sent (Subject: "Btrfs: scrub: print path to
corrupted files and trigger nodatasum fixup") introduces two new ioctls to
do in-kernel filesystem path construction. This series provides the
corresponding userspace changes, adding two new commands to the btrfs utility:
--
btrfs resolve inode [-v] <inode> <path>
resolves an <inode> to all
2006 Mar 17
10
breadcrumbs?
Before I start down this road, has anyone done a breadcrumbs
implementation they''d be happy to share?
Thanks
Chris T
2017 Mar 16
2
Veto files used to allow only one extension to be written to the share
Good night.
I am behind a way so that in my backup share it is possible to only write
files in the format of the application that I use to execute the backup
routines, for this I searched the internet for a solution that works like
Allow Files, however it is Complicated to find.
Talking on forums a user informed me that he could use the parameter to
follow in smb.conf, however in my tests it did
2014 Sep 15
2
[LLVMdev] How to translate library functions into LLVM IR bitcode?
Good tips. Although I have used llvm-link to merge .bc files together, I
guess -flto could optimize the resultant .bc file further.
As for the assembly, yes it is an issue. Anyway, I'll try to address those
sources which are available for being translated into .bc first.
Thanks for your advice, Tim.
On Mon, Sep 15, 2014 at 2:55 PM, Tim Northover <t.p.northover at gmail.com>
wrote:
2010 Feb 12
2
How to source files from a search path?
Suppose some environment variable (say MY_R_INC) has a number of
paths. I want to source some file relative to some path in $MY_R_INC
(just as #include in C++ does, which looks for header file in a number
of directories). I RSiteSearch'ed, but I don't find any function that
satisfies my need. Could somebody let me know if I overlooked
something?
2017 Aug 24
3
dmarc report faild ?
Hello Together
Please i have new following Error, from DMARC Report, if i check my domain
on example mxtoolbox i dont see any problems.
Any from you know this Eror report, what i need to do to fix this issue?
C:\folder>nslookup 94.237.32.243
Server: dns204.data.ch
Address: 211.232.23.124
Name: wursti.dovecot.fi
Address: 94.237.32.243
2013 Nov 16
16
[PATCH] BTRFS-PROG: recursively subvolume snapshot and delete
Hi All,
the following patches implement the recursively snapshotting and
deleting of a subvolume.
To snapshot recursively you must pass the -R switch:
# btrfs subvolume create sub1
Create subvolume ''./sub1''
# btrfs subvolume create sub1/sub2
Create subvolume ''sub1/sub2''
# btrfs subvolume snapshot -R sub1 sub1-snap
Create a snapshot of
2007 Jun 21
2
expects with returns that returns the return value of the actual method
I''m trying to test some code that''s using active_merchant using the
following test. What I''d like to be able to do is verify that purchase is
called, however, rather than specifying the return value for purchase with
returns, I''d like it to return the actual return value provided if you
called the non mocked purchase method. Is this possible?
def test_charge
2007 Jun 21
3
only checking certain parameters for a method
I''m writing a test where I only care about one of the parameters being sent
to the method, does anyone think having a way to say that any value for a
parameter which I don''t care about is valid? I''m thinking something like:
def test_charge_is_for_10_bucks
gateway = test_gateway
member = Member.new
member.credit_card_number = "1"
2004 Dec 13
0
Transfer and keep variables
Is there any way to transfer a call from host to host and keep the call's
variables intact? -- specifically, UNIQUE_ID and user created variables
like CARD_NUMBER, EXPIRATION_DATE, and CVV2?
Thanks in advance,
------------------------------------------------------------------------
Steve Edwards sedwards@sedwards.com Voice: +1-760-468-3867 PST
Newline
2016 Dec 14
6
[PATCH v2 0/4] sysprep: Remove various backup files.
In v2:
- The backup-files operation now operates on a conservative whitelist
of filesystems, so it won't touch anything in /usr. Consequently
it also runs much more quickly, about 4 seconds on the barebones
virt-builder fedora-25 image.
- Call Gc.compact () in visit_tests.
- Added documentation to fnmatch.mli.
2005 Jul 18
2
RSync and SSH problems
Hey all,
First off, I'm new to cygwin, rsync, and actually even ssh. I've used
ssh clients many times, but server side I'm a bit of a noob. Anyway,
here's my problem...
I set up a brand spankin new Windows XP box with only two apps
installed: copSSH and rsync. I need to tie down all security as tight as
possible. From what I've seen/read, it seems to me the only port I need