Displaying 20 results from an estimated 1600 matches similar to: "Find, .map and Distinct"
2006 Apr 25
2
Noob Question: Regarding Form
I''m hoping there''s an easy way to do this. I''m trying
to read options from a database, and insert them into form tags. So
for example,
In the Database Table: options
size: 300
type: text_field
maxsize: 300
and I want to create a text_field form tag, with all the appropriate
options, is there an easy way to do this, other than having the code
output the HTML
2006 Aug 16
4
New Model Object from Existing Model Object
Hey Guys, need a hand again....
Lets say I have an Order... and an Order has Order Lines and Order_Lines
have Items...
I want to create a New Order, which would have New Order Lines with the same
Items...
Is there a fast / easy way to do this, w/o having to create a new order,
loop through all the order lines, and create them associating them with the
Items?
Any help would be great, thanks
--
2006 May 03
3
using select_date causes errors...
I''m getting errors whenever the user chooses, for example, April 31st (
since there is no 31st in April, navicat freaks out ), there MUST be a
method that ruby has that would allow me to validate a date before I
submit to navicat.
I haven''t been able to find anything online about it either, it''s
probably something simple, I just can''t figure it out.
Thanks
2006 Apr 20
5
strange mysql problem
i have this model:
class LineItem < ActiveRecord::Base
belongs_to :quote
end
in the console:
>>l = LineItem.create
ActiveRecord::StatementInvalid: Mysql::Error: You have an error in
your SQL syntax; check the manual that corresponds to your MySQL
server version for the right syntax to use near '' , , , )'' at line 1:
INSERT INTO line_items (`qty`, `quote_id`,
2006 Jun 29
1
before_destroy & verification
Hey, probably an easy question but,
I''m trying to get a method to run "before_destory" for a model, and I
want the method to throw an error, and not delete the object from the
database, if a certain condition is held
Obviously, I can just raise an error and rescue it... but for some
reason I can''t get <% error_messages_for ''model" %> to catch
2006 Jun 09
0
Re: Rails Digest, Vol 21, Issue 189
Hello and thanks for emailing B2B Logic.
I am out of the office until Monday June 19th. Any emergency problems, comments or concerns should be directed to Ryan Lundie: ryan@b2blogic.net
Thanks
Randal Santia
B2B Logic.net
2010 Jan 23
3
How to implement a "select distinct x, count(distinct y) ... group by x" for a data frame
... Being an R newbie, I can only think of extracting distinct x values with
unique, looping over them, extracting matching rows from the original data
frame, applying table, and recording the size of table's output alongside
the x value being checked. Is there a more elegant way?
Thank you.
--
View this message in context:
2006 Apr 16
5
Newbie Problems with pluralization
Hi,
I have a many to many relationship incorporating the following tables:
taxes --> taxes_tax_groups --> tax_groups
I have a model named tax with the following declaration:
has_and_belongs_to_many :tax_groups
and I have a model named tax_group with the following declaration:
has_and_belongs_to_many :taxes
I am attempting to run the following unit test:
require
2006 May 01
4
When to make a new controller
Hey all,
Ok this is probably a newb question, but I haven''t been programming with
MVC for very long, and I''ve been wondering what the general opinion is,
or best practices, for making a new controller. Like what cases would
you need a new controller for and what cases can you just put everything
into one controller?
Thanks in advance,
Randal
--
Posted via
2010 Apr 13
0
dbFD computing distinct species wrong?
Hi everyone,
I am working with the dbFD function of the FD package, and there's something
funny happening with the value of sing.sp in the output. Basically, I have
a species-function matrix and a community matrix. One site in particular
has 6 species, 4 of which have identical functional coding. I thus expect
nbsp = 6 and sing.sp = 2 for this site. However, nbsp = sing.sp = 6. This
2012 Apr 21
1
[regid23@yahoo.com: Bug#669667: faq.html: missing separator between two distinct shell command s]
I received the attached bug report from a Debian user; it applies to
http://www.openssh.com/faq.html (I ship a copy of the FAQ in the Debian
package). Could somebody make this adjustment on the OpenSSH web site?
Thanks,
--
Colin Watson [cjwatson at debian.org]
-------------- next part --------------
An embedded message was scrubbed...
From: Regid Ichira
2005 Nov 15
1
distinct search
Hello, I have done a search for this issue, but I didnt really see an answer.
if i want to store things in a hierarchy, but i want items to be in multiple categories at any level. i'd like to be able to search for an item and only show it once, but maybe (not required) show what categories the results are in. but if i look in a category (search on that category) then i want to see that
2009 Aug 29
0
[LLVMdev] A create-distinct-item function with no (other) side effects
On Fri, Aug 28, 2009 at 5:56 PM, Kenneth Uildriks<kennethuil at gmail.com> wrote:
> It would also
> help optimize away calls to "random" in some cases.
If you're talking about the Unix random(), it does has visible side
effects, specifically related to the guarantee that an srandom call
followed by N random() calls will always produce the same sequence of
N numbers.
2006 Apr 04
0
Dial(L(x...)) distinct to SET TIMEOUT(absolute)
I have been experimenting with setting call time limits, and modifying
those limits on the fly. My application is a case where a user has a
time limit on their call, determined by the user's credit. The time
limit may be extended by the provision of more credit.
It is desirable to use the L flag of the Dial() application, as it gives
the user audible feedback.
I was hoping to be able to
2008 Apr 23
0
poly() can exceed degree k - 1 for k distinct points (PR#11251)
The poly() function can create more variables than can be fitted when
there are replicated values. In the example below, 'x' has only 5
distinct values, but I can apparently fit a 12th-degree polynomial with
no error messages or even nonzero coefficients:
R> x = rep(1:5,3)
R> y = rnorm(15)
R> lm(y ~ poly(x, 12))
Call:
lm(formula = y ~ poly(x, 12))
Coefficients:
2005 Mar 17
4
beginner question: how to sort out distinct values from a vector
there is a vector, like:
1, 1, 1, 2, 2, 3, 3, 4, 5, 5,
I'd like a function that gives me only 1, 2, 3, 4, 5
thank you
2008 May 06
2
Concatenate a vector into a string, only using distinct component
I'm trying to use combine c('a','b','c','a','c') into 'a, b, c', the order
does not matter.
paste(c('a','b','c','a','c'), collapse=', ') yields 'a, b, c, a, c'.
Any idea?
--
Regards,
Anh Tran
[[alternative HTML version deleted]]
2009 Aug 27
1
distinct elements of a vector
Hello,
I have the vector (a,b,a,c) and I trying to obtain it's distinct elements in
another vector.
Is there a function that can do this?
Thanks,
Bogdan
--
View this message in context: http://www.nabble.com/distinct-elements-of-a-vector-tp25168032p25168032.html
Sent from the R help mailing list archive at Nabble.com.
2010 Feb 02
2
Retrieve distinct values within a whole data frame
Hello everyone,
I am trying to retrieve the list of distinct values within a whole data
frame. I tried to use unique() function but it retrieves the distinct values
within each column or row, I want it for the entire data frame, any idea?
-----
Anna Lippel
--
View this message in context: http://n4.nabble.com/Retrieve-distinct-values-within-a-whole-data-frame-tp1460205p1460205.html
Sent from
2003 Sep 23
3
number of distinct values in a dataframe
Hi R-users,
How can I found the number of a distinct values in a data frame
(occurrence of distinct values)? The dataframe consists of several
thousands integer numbers.
Thanks,
Rado
--
Radoslav Bonk M.S.
Dept. of Physical Geography and Geoecology
Faculty of Sciences, Comenius University
Mlynska Dolina 842 15, Bratislava, SLOVAKIA
tel: +421 905 968 127 e-mail: rbonk at host.sk