Displaying 20 results from an estimated 1000 matches similar to: "how to check if the value is repeated?"
2006 Jul 02
11
Google maps api in ruby/rails
I''ve been looking for any modules/tools that are available for using
the google maps api in rails. I found a couple of quick examples, but
not much more. If anyone knows of good sites that cover using google
maps api in rails please post it here:)
Chris
2009 Jun 12
5
Limit Request Body Size (Disallow very large File-uploads)
Hello all,
For the last couple of days I was trying to get my
Apache/mod_proxy/mongrel setup to limit the size of the request body.
The setup is as follows:
1.) Apache acts as a reverse proxy by facilitating mod_rewrite and mod_proxy
2.) Requests for non-static files are passed on to a mongrel_cluster
3.) We use mongrel for our Ruby on Rails application
Note that due to some restrictions we are
2009 Jan 07
13
HTTP parse error due to an extra percent sign
If you append an extra percent sign to a URL that gets passed to
mongrel, it will return a Bad Request error. Kind of odd that
"http://localhost/%" causes a "Bad Request" instead of a "Not Found"
error.
Here is the error from the mongrel log:
HTTP parse error, malformed request (127.0.0.1):
#<Mongrel::HttpParserError: Invalid HTTP format, parsing fails.>
2008 May 06
3
expires header for .css
I''m using mongrel as my http server.
I was using yslow to evaluate the performance of my web site and noticed
I was downloading the .css file on every request??? I use one .css file
for the whole site and I though I would be cached?
Yslow indicates that there is no expires date/time set for the css file.
How can I tell mongrel to send an expires header with my static content?
thanks,
2006 Mar 26
9
validate_uniqueness_of {combination of fields} ???
I''ve looked at the validates documentation and it appears that validates_uniqueness_of works on only one field at a time. So I can, for example, validate that "sam" is unique to the record set, and that "smith" is unique to the record set.
My problem is that each record includes two fields, the _combination_ of which must be unique to the record set, but each of
2006 Jul 03
7
form_remote_tag with multipart/form-data
Does form_remote_tag supports multipart/form-data ?
My form looks like this:
<%= form_remote_tag :url => { :action => ''do_image_upload'' },
:html => { :enctype => ''multipart/form-data'' } %>
<%= file_field ''image'', ''file_data'', :size => 32 %>
<%= submit_tag
2010 Jun 15
8
Allow blank on should validate_uniqueness_of
Hello,
Using shoulda, any ideas how to allow blank when having this test:
should validate_uniqueness_of(:email)
Thanks.
--
J. Pablo Fernández <pupeno-GAtDADarczzQT0dZR+AlfA@public.gmane.org> (http://pupeno.com)
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to
2007 Apr 22
1
names( d$columnname )
dear R wizards --- would it make sense for names(d$columnname) to be
"columnname"? I can preserve the columnname through x=subset(dataset,
select="columnname"), of course, but it would seem that x=d$columnname
could also do this. No? Sincerely, /iaw
2011 Jul 27
1
Referencing a column using a function argument
Hi all,
I've been having trouble with something that seems like it should be
fairly straight forward. Any help at all from more experienced users is
appreciated!
I'd like to write a function that uses a column name as an argument.
However, I run into problems when I try to reference this column within
the function.
For example,
findCutoff <- function(tableName, columnName) {
2006 Feb 11
2
validates_uniqueness_of - how to use multiple values for scope
Hi
I''m trying to create a basic test management tool to organise the manual
testing I have to do. I''m working on the results recording module and have a
problem.
Basically, I want each test result to belong to a test case, a test
environment and a build.
I want to make sure there''s no duplication of results with these 3
properties. If someone tries to enter a new test
2010 Jul 26
4
using string variable as order() function argument
Hello,
In my script I would like to use a loop, which sorts the dataframe
according to different columns, pointed by the string variable.
id col1 col2 col3
1 10 0 4 8
2 11 1 2 2
3 12 0 8 3
4 13 0 5 5
Usually the order() function can be used like this:
sorted = mytable**[order(column3) , ]
which results in properly sorted table:
**
2009 Jun 25
2
variable driven summary of one column
Hello,
how can I get a variable driven summary of one column of my data.frame?
Usually I would do
> summary(data$columnname) to get a summary of column named
"columnname" of my data.frame named "data".
In my case the columnname is not static but can be set dynamically.
So I save the chosen columname in something like
variable <- "columnname"
but how can I
2012 Jan 13
2
question: how to select a column from a dataframe in a function
Hi,
I am creating a function and ran into the problem of selecting a column
from a dataset. It seems as though the $ function (as in data$columnname)
does not apply in the function. In simplified version:
This works:
testf2<-function(data,columnnumber){print(data[,columnnumber])}
But this doesn't:
testf<-function(data,column){print(data$column)}
Even though the first solution works,
2012 Aug 07
2
What is this called? lapply(datum,"[[","ColumnName")
Hello R users
I recently learned how to use this command:
lapply(datum,"[[","ColumnName")
Unfortunately, I don't know how exactly it works, what it's called (in
particular the "[[" part], and what other things you can do with it
(retrieve multiple columns?).
Given datum is a list of dataframes with the same column, but different
number of rows,
2008 Oct 21
6
detecting width overflow in serialized column with mysql
So I''ve got an ActiveRecord model pointing to a MySQL db, with an
auto-serialized column ("serialize :columnName").
Thing is, MySQL, depending on how it''s configured (like, by default),
has a bad habit of just truncating your data if it''s too wide for the
column, with no error raised. Yeah, I can probably reconfigure MySQL
and/or my AR connection to it. But
2006 Jul 03
1
difficult data manipulation question
hi everyone :
suppose i have a matrix in which some column names are identical so,
for example, TEMP
"AAA", "BBB", "CCC", "DDD","AAA", "BBB"
0 2 1 2 0 0
2 3 7 6 0 1
1.5 4 9 9 6 0
1.0 6 10 11 3 3
I didn't even check yet
2005 Mar 07
3
R crashes using the em function of package mclust (PR#7719)
Hi,
I got the same problem like
http://tolstoy.newcastle.edu.au/R/devel/04/11/1204.html
R crashes when I use the em function from the mclust package on
univariate data and on a special case on bivariate data (when the matrix
is not provided as written in the manual).
It seems as if the problem is the format of the data to be analyzed.
Operating System: Windows XP (SP2)
R version: R-2.0.1
The
2005 Mar 05
4
Shorewall GUI Interface - Redux
My company has, very generously, donated a space on their rack and a
server for me to use for development of a more up to date Shorewall
webmin interface. Based on the advice here, I''ve also signed up for a
sourceforge account, and will register the project later today. I
would like to solicit the help of a few people on here who are willing
to help move this project along.
There were
2011 Sep 04
2
mclust: modelName="E" vs modelName="V"
Hi,
I'm trying to use the library mclust for gaussian mixture on a numeric
vector. The function Mclust(data,G=3) is working fine but the fitting is not
optimal and is using modelNames="E". When I'm trying
Mclust(data,G=3,modelName="V") I have the following message:
Error in if (Sumry$G > 1) ans[c(orderedNames, "z")] else ans[orderedNames] :
argument is
2004 Jun 14
2
A Few MCLUST Questions
Hello everyone. I have a few MCLUST questions and I was hoping someone could help me out. If you’re an MCLUST user, they will likely be pretty easy to answer. Thanks in advance for any help.
Ken
What are the pros/cons of starting a finite mixture model at the “m” step versus the “e” step (where “m” is the maximization step and “e” is the expectation step of the EM algorithm)? In