Displaying 20 results from an estimated 150 matches similar to: "How to give conditions in rails"
2013 Jul 03
1
curl and CVE-2013-2174
Dear members,
It may sound a silly question. I have curl installed:
# pkg_info |grep curl
curl-7.24.0_3 Non-interactive tool to get files from FTP, GOPHER, HTTP(S)
Today portsnap updated the ftp/curl port, and patch-CVE-2013-2174 appeared
in files/, but the port version remained such that portaudit, and
portupgrade still complain about curl's version. What is the recommended
way to
2017 Nov 02
1
cups printer oddity
Dear list,
in CUPS, I have to absolutely identical printers configured (I believe),
except for the printer name and the hostname it connects to. I use
cupsaddsmb on them (same PPD). When I try to connect to the printer
prn-1101-001-d110-1, it works; for prn-1101-001-d111-1, it does not. I
have narrowed this down to the following difference in the output of
rpcclient -c enumprinters:
Overriding date_select in local project to use custom value rather than blank for starting option...
2005 May 08
3
Overriding date_select in local project to use custom value rather than blank for starting option...
I would like to have a date control on a page and I would like a
behavior similar to what you get using date_select with the
:include_blank => true option where the first value in the dropdown is
"- Month -", "- Day -", or "- Year -" rather than a blank value for
the respective month, day, and year select fields.
I took a look at the ruby source for
2008 Jul 04
4
Routing and Parameters
Greetings. I have a route something like this:
map.calendar ''/tasks/:year/:month'',
:controller => ''tasks'',
:action => ''calendar'',
:year => /\d{4}/,
:month => /\d{2}/
(Ignore the obvious problems of invalid data.)
I''m trying to create a form that will allow my users to navigate from
one month/year to the next.
2006 Jul 18
1
Auto-populating time portion of a datetime field from a form
I see that if I use the date_select helper in my view, then in the
generated page, my selects are named obj[datetime_field(1i)] (and 2i and
3i for the other parts). These auto-populate the date portion of my
datetime_field.
I have another datetime field that I''m presenting the time from and I
would like to use a similar scheme to autopopulate it. Currently, I''ve
used the
2006 Jul 26
2
text_field and date_select in collection
hello,
i would like to display a collection of records on one page (e.g. an
author record with all his/her books).
a record contains a text_area (e.g. a description of the book) and a
date_select (e.g. when the book was published).
<% for @book in @author.books %>
<%= text_area ''book[]'', ''note'' %>
<%= datetime_select
2008 Jun 09
3
Rails 2.1 and ddatetime_select
I''ve updated to 2.1 and am continuing to have issues with
datetime_select helpers which worked fine previously.
Example:
<% form_remote_tag(:url => { :controller => ''notes'',
:action
=> :add_booking_note_ajax,
:id => @booking},
2006 Apr 28
9
[AWDR] Tutorial in A4 wont ''destroy'' items
Hello,
I''m working through the tutorial, and I''ve run into a little snag. In
the first part of the tutorial, the destroy link is not working
correctly. I can''t figure out where I goofed. Removing :confirm doesn''t
seem to resolve the issue.
Thanks,
Randy.
development.log
----->8-----
Processing AdminController#destroy (for 127.0.0.1 at 2006-04-27
2006 Mar 01
5
scaffold.css and Rails tutorial problem
In iteration D.1 on page 109 I am not getting a styled error message box
displayed at the top of the checkout as described in the tutorial and I
cannot seem to discover where I have erred.
The scaffold.css is copied from the pragmatic programmers site:
#--------------------------------------------------------------------
$ cat public/stylesheets/scaffold.css
body { background-color: #fff;
2006 Feb 05
0
How can i specify default time to datetime_select tag
I want to specify a different default time to datetime_select tag how
can i do that.
also i was looking at rails helper code
-----------------------------------------------------------------------
module ActionView
module Helpers
module DateHelper
def to_datetime_select_tag(options = {})
defaults = { :discard_type => true }
options = defaults.merge(options)
2006 Jun 16
3
finding out about options
I''ve been to the RoR api docs trying to find out
about options for various methods (mostly for
select helper methods), yet I find no listing of
options even when the method described says
that it takes options. How
can I find out what are valid
options say for a date_select tag?
Thanks,
Dave
2006 Jan 26
42
ruby script/generate scaffold Product Admin hangs
Hi
I am running Mac OX tiger with the installed ruby 1.8.2, and
mysql5 (I checked that it was running in preference). I
tried to run the various fixes recommended in agileweb. I am
stuck on page 57, script/generate scaffold...
> Could you paste in your database.yml file, from the
> "config" folder inside your Rails app? If you have any
> passwords entered there, you should
2006 Jun 02
6
overriding constants
Hi there,
I''m trying to override the defaults for form_helper.
I can see in action_view/helpers/form_helper.rb:
class InstanceTag #:nodoc:
include Helpers::TagHelper
attr_reader :method_name, :object_name
DEFAULT_FIELD_OPTIONS = { "size" => 30 }.freeze unless const_defined?(:DEFAULT_FIELD_OPTIONS)
DEFAULT_RADIO_OPTIONS = { }.freeze
2008 Mar 05
1
permission on /var/www & /var/www/html
hi all,
assume apache runs under apache user/group and i have a user/group name
"weber". i use "weber" user to upload files via ftp/sftp.
where should i place my include files so that no one can access except
apache b/c these files contained user/pw for mysql.
i usually place them in /var/www/html/includes, but people can access to
this folder, so i'm thinking place
2023 Jun 13
1
log transform a data frame
Hello,
I have a data frame like this:
d11=suppressWarnings(read.csv("/Users/anamaria/Downloads/B1.csv",
stringsAsFactors=FALSE, header=TRUE))
> d11
X Domain.decomp. DD.com..load Neighbor.search Launch.PP.GPU.ops.
Comm..coord.
1 SYCL 2. 1 0 3.7 0. 1
1 .6
2 CUDA 2 0 3. 1 0
1 .0
2013 May 21
0
[PATCH] 02-
- Use MAC16_16 macros instead of (sum += a*b) and unroll a loop by 2. It
increase performance when using optimized macros (ex: ARMv5E). A
possible side effect of loop unroll is that i don't check for odd length
here.
- Add NEON version of FIR filter and autocorr
--
Aur?lien Zanelli
Parrot SA
174, quai de Jemmapes
75010 Paris
France
-------------- next part --------------
diff --git
2017 Dec 01
2
Some strange i64 behavior with arm 32bit. (Raspberry Pi)
Hi Tim,
thanks for the swift response!
@debug is defined in the same module, which makes this all the more confusing.
The target information from the working example are:
target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64"
target triple = "armv6kz--linux-gnueabihf"
from the ghc produced module:
target datalayout =
2014 Mar 10
4
[LLVMdev] neon registers llvm using
Hi, Everyone:
Can anyone let me know the default NEON registers llvm going to use with armv7 devices?
For example, d10 and d11 are treated as default zero? I am using Xcode5 + llvm and I got a case that compiler will generate neon codes
" vst.8 {d10, d11}, [r1] "
from C codes:
"int aMV[4];
......
aMV[0] = aMV[1] = aMV[2] = aMV[3] = 0; "
and I
2013 May 21
2
[PATCH] 02-Add CELT filter optimizations
Please ignore my previous mail and patch, there is a new version :).
Patch changes are:
- Use MAC16_16 macros instead of (sum += a*b) and unroll a loop by 2. It
increase performance when using optimized macros (ex: ARMv5E). A
possible side effect of loop unroll is that i don't check for odd length
here.
- Add NEON version of FIR filter and autocorr
- Add a section in autoconf in order to
2023 Jun 13
1
log transform a data frame
Thank you so much David, here is correction:
d1=suppressWarnings(read.csv("/Users/anamaria/Downloads/B1.csv",
stringsAsFactors=FALSE, header=TRUE))
d1$X <- NULL
d2=as.matrix(sapply(d1, as.numeric))
pdf("~/graph.pdf")
b<-barplot(d2, legend= c("SYCL", "CUDA"), beside=
TRUE,las=2,cex.axis=0.7,cex.names=0.7,ylim=c(0,80), col=c("#9e9ac8",