Displaying 20 results from an estimated 505 matches for "uniqeness".
Did you mean:
uniqueness
2006 Mar 28
5
Anyone use .uniq! ???
could anyone by chance give me a working example of the .uniq! method?
i''ve been trying all day. any help would be much appreciated!
jon
--
Posted via http://www.ruby-forum.com/.
2007 Nov 21
2
uniq -c
Is there an R analog of the Unix command uniq -c:
http://en.wikipedia.org/wiki/Uniq
Given an array x, uniq -c replaces each contiguous subsequence of
identical numbers with a tuple (count, number). E.g.
$ cat > usample
10
10
9
8
8
7
7
7
6
3
1
1
1
0
$ uniq -c usample
2 10
1 9
2 8
3 7
1 6
1 3
3 1
1 0
Cheers,
Alexy
2006 Dec 05
4
has_many with :uniq not working for me
Hi all,
I have a relationship (no really!)
class RiskMatrix < ActiveRecord::Base
has_many :severities, :order => :position, :uniq => true
end
class RiskFactor < ActiveRecord::Base
belongs_to :risk_matrix
validates_presence_of :descriptor, :example
validates_uniqueness_of :descriptor, :example, :scope=> :risk_matrix_id
end
class Severity < RiskFactor
2006 Feb 07
1
habtm :uniq causing duplicate inserts? How to update Rails?
Hello *Gem* experts,
Sorry for asking multiple questions in one post but they are both related to one problem.
So far I have the following code:
class Member < ActiveRecord::Base
has_and_belongs_to_many :blogs, :uniq=>true
.....
end
class Blog < ActiveRecord::Base
has_and_belongs_to_many :members, :uniq=>true
...
end
The issue is that
2009 Nov 12
0
Problem with has_many :through, :uniq => true with polymorph
Didn''t have quite enough space to describe it there...basically i''m
having a problem with the :uniq option in my tags.
I''m using acts_as_taggable_on_steroid which adds these associations to
my Resource class:
Resource
has_many :taggings, :as => :taggable, :dependent => :destroy, :include
=> :tag
has_many :tags, :through => :taggings, :uniq => true
2011 Sep 09
2
Passing in Condtions into Object
Hello,
I am trying to pass a conditional expression into an expression to be
evaluated when ever an R statement is called. For example:
get_unique_count <- function(df, select, field){
uniqs <- unique(subset(df, select)[field])
return (nrow(uniqs))
}
In this case select is a conditional statement year == 1980, and the
function would be called in the following manner:
2007 Oct 18
0
Getting the through items from a has_many :through :uniq relationship
Getting the through items from a has_many :through :uniq relationship
In a nutshell, I have been using the has_many :through :uniq
relationship, and I want a DRY way to list the join model objects.
Currently, my objects include taxon objects, toxin objects,
data_object objects, and taxon_toxin_citation objects ("citation" is
another word for data_object). A taxon has many data objects,
2007 Dec 09
4
Help on drying code
Hi all,
Currently I''m having to do this:
def self.authorized_roles(controller, action)
specific = self.find_by_controller_and_action(controller, action)
all_actions = self.find_by_controller_and_action(controller, ''*'')
all_controllers = self.find_by_controller(''*'')
role_ids = []
specific.each do |role_item|
role_ids <<
2006 Apr 11
0
habtm and :uniq
Hi
I wonder what the state of this ticket is:
http://dev.rubyonrails.org/ticket/2019
Does anyone have information regarding whether there are plans to fix
this behaviour? It seems strange to me to force uniqueness in Ruby
(i.e. application code) but not in the database.
For example, in activerecord/lib/active_record/associations/
has_and_belongs_to_many_association.rb there is a line
2005 Jun 24
3
Make matrix from SQL query result
Hi,
I am trying to form a matrix from a SQL query result.
The SQL query result looks like this:
equity_id date returns
1 20050619 0.12
2 20050619 0.03
1 20050620 -0.01
2 20050620 0.01
The target matrix looks like this:
date 1 2
2014 Jul 19
1
patch about mingwbuild 4.9.1
recently I used gcc 4.9.1 (http://sourceforge.net/projects/mingw-w64/files/Toolchains targetting Win64/Personal Builds/mingw-builds/)on windows to build R,but failed when link R.dll ,it report linker status 5.
after some digging, I found when use gcc 4.9.1 64 bit on windows there are lots of .refptr.*(* is r function name) in R.def, which lead build fail.so I add a simple path to
2006 Mar 24
2
Return all rows, split then show uniques
I''m returning some rows from a tags database that look like this:
ID WORDS
1. apple banana pear
2. banana melon
3. apple peach lime
What I want to do with that data is use the .split method to divide them
into separate values in an array, then use the .uniq method to return a
unique list of the words like so:
apple, banana, pear, melon, peach, lime
So in my controller I
2010 Feb 02
1
ggplot/time series with indicators question
Hello, I am trying to plot time-series data with certain weeks highlighted using symbols.
require(ggplot2)
#plotting time series data
timescale <- seq(as.Date("01/01/09","%m/%d/%y"), length.out=12, by=7)
data.all <- data.frame(
id = c(rep('111',12),rep('222',12),rep('333',12)),
week=c(timescale,timescale,timescale),
2006 Feb 19
4
Multiple HABTM to one table
I have a class Player, and a class Game.
Game has two HABTM relationships to the Player table through seperate
relationship tables.
class Game < ActiveRecord::Base
has_and_belongs_to_many :players, :uniq => true
has_and_belongs_to_many :victors, :class_name => ''Player'', :uniq => true
end
When I add Player A to players, and Player B to victors, and save the
2012 Jun 28
4
Optimizing grep, sort, uniq for speed
This snippet of code pulls an array of hostnames from some log files.
It has to parse around 3GB of log files, so I'm keen on making it as
efficient as possible. Can you think of any way to optimize this to
run faster?
HOSTS=()
for host in $(grep -h -o "[-\.0-9a-z][-\.0-9a-z]*.com" ${TMPDIR}/* |
sort | uniq); do
HOSTS+=("$host")
done
2007 Dec 11
2
Patch 10463: has_many through using uniq does not honor order
Hi,
I''ve just submitted a patch for ActiveRecord;
http://dev.rubyonrails.org/ticket/10463
The patch includes new fixtures because I could not find a applicable
combination among the existing fixtures. I hope that''s okee.
Please +1 or comment it.
Thanks,
Remco
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
2005 Apr 26
1
ldap uid with static gid problem
hi,
i'd like to use dovecot to authenticate from ldap. in ldap each user has
it's uniq uid and gid. unfortunately with postfix we can't use uniq
uid/gid since in this case we have ot create all user's home in advance.
so we decided to use uniq uid and a common gid in postfix since in
this case postfix can create new users maildir and deliver new mails. so
i'd like to
2018 Apr 27
1
wiki suggestions, part 2
Am 26.04.2018 um 20:07 schrieb Harry Jede via samba:
> No, i have created 2 users with same sid.
>
> root at capella:~# pdbedit -Lv | grep "User SID" | sort|uniq -d
> root at capella:~#
>
> root at capella:~# pdbedit -L|grep Failing
> ldapsam_getsampwsid: More than one user with SID [S-1-5-21-3958726613-3318811842-4132420312-21010]. Failing. count=2
>
2007 Jul 24
11
Mock or Stub strategy for validates_uniqueness_of
Hi,
I''m a bit stuck with mocking a unit test of a join model with regards to a
validates_uniqueness_of clause.
I have
class Book < AR:B
has_many :clippings
various validates_presence_of etc
end
class Clip < AR:B
has_many :clippings
various validates_presence_of etc
end
class Clipping < AR:B
belongs_to :book
belongs_to :clip
validates_uniqueness_of :clip_id,
2005 Mar 15
18
[Bug 1001] Error on MAKE while compiling SRPMS and tar.gz but not while installing RPMS
http://bugzilla.mindrot.org/show_bug.cgi?id=1001
Summary: Error on MAKE while compiling SRPMS and tar.gz but not
while installing RPMS
Product: Portable OpenSSH
Version: 3.7.1p2
Platform: All
OS/Version: Linux
Status: NEW
Severity: critical
Priority: P2
Component: ssh