Displaying 20 results from an estimated 448 matches for "pet".
Did you mean:
net
2006 Jan 10
5
Noob ActiveRecord Join Question
I''m new to rails and ruby, and after trying to get this to work
correctly for hours, I thought I''d give this forum an try.
I''ve setup a trivial project just to mess around with Rails database
naming conventions and associations.
I''ve got a table called Pets, and a table called Types.
Pets contains a list of pets, Parky the cat, Daisy the dog, etc, And
Types contains a list of different pet types, dog - cat - fish - bird -
etc.
Pets table
CREATE TABLE `pets` (
`id` int(11) NOT NULL auto_increment,
`name` varchar(20) default NULL,
`pet_id` int...
2008 May 13
2
[LLVMdev] Python bindings available.
Hm. I may misunderstand, but I'm not sure that's an improvement over
the problem you're trying to solve. How about something like this?
(Please forgive any accent; I don't speak snake fluently.)
class Pet(object):
@staticmethod
def new():
# Create a 'free' pet. It can later become owned, but not to more
than one owner.
return Pet(_core.LLVMCreatePet(), None)
def __init__(self, ptr, owner):
self.ptr = ptr
self.owner = owner
def __del__(self):
# Do not...
2006 Jun 19
6
SQL Search Qustion
I am working on writing a search method where a user can type a string
of words and I return all the objects that have fields that match all of
the words in one or a combination of fields.
Person
first_name
last_name
Pet
name
Person has_many :pets
I want to write some SQL so that if I search for "Tony AAAA" I will get
all the people who have Tony and AAA either in their first_name or
last_name fields or in any of their pet''s name fields. For example, it
would be ok to return a person if t...
2006 May 14
4
searching on foreing keys
Hey all,
I''m using a simple search function. It''s working
great except for foreign keys.
I have one table pets (id,name,owner_id)
and another table people(id,name)
owner_id being a foreign key of pet pointing to people name.
here it is on the pet controller:
@paginator, @pets= paginate(:pets, :conditions =>["name OR owner_id
like ?","%"+params[:filter]+"%"], :include =>...
2006 Dec 02
2
Strict STI?
Is there a way to set the base class to abstract? or otherwise enforce
that no one can create a "Pet"?
Pet < ActiveRecord
Dog < Pet
Pig < Pet
I''ve tried:
class Pet < ActiveRecord::Base
validates_presence_of :type
end
but I get an error about
../vendor/rails/activerecord/lib/active_record/validations.rb:74:
warning: Object#type is deprecated; use Object#class
--~--...
2015 Jan 03
0
filmovix.org - filmovi na računalu
gledaj online filmove potpuno besplatno...
http://pet.prevodim.com/interspire/link.php?M=181705&N=11&L=8&F=T
** ?ta je potrebno za gledanje filmova preko interneta
(http://pet.prevodim.com/interspire/link.php?M=181705&N=11&L=8&F=T)
------------------------------------------------------------
Da biste gledali filmi?e pr...
2008 Dec 18
1
inserting zero instances with zeroes in a matrix
Hi all,
Suppose I had the below example where a survey was carried out recording the number of each type of pet in each house
count<-c(2,1,2,1,2,3,4)
house<-c("house1","house1","house2","house3","house4","house4","house4")
pet<-c("dogs","cats","dogs","dogs","budgie","cat"...
2003 Apr 11
3
summary.formula: method reverse does not use fun argument
...refers to the left? hand side variables)
in categories which are determined by a single left hand side
variable.
my problem is that the argument fun seems not to be compatible with
method=reverse!? every continuous variable is summarized in three
quantiles.
here is an example:
hist is a factor, PET and CT are "numeric"
summary(PET~hist,data=her,fun=sum)
PET N=47
+-------+------------------+--+---+
| | |N |PET|
+-------+------------------+--+---+
|hist |Morbus Hodgkin |18| 81|
| |Niedrigmaligne NHL|11| 39|
| |Hochmaligne NHL |18| 49|
+-...
2008 May 13
0
[LLVMdev] Python bindings available.
On Tue, May 13, 2008 at 1:22 PM, Gordon Henriksen
<gordonhenriksen at mac.com> wrote:
> On 2008-05-13, at 02:12, Mahadevan R wrote:
>
> >>> That's not how the object works...
> >
> > Gordon, I think I can make it work if we have the following additional
> > function in LLVM-C:
> >
> > LLVMModuleRef LLVMGetModule(LLVMModuleProviderRef
2008 May 13
2
[LLVMdev] Python bindings available.
On 2008-05-13, at 02:12, Mahadevan R wrote:
>>> That's not how the object works...
>
> Gordon, I think I can make it work if we have the following additional
> function in LLVM-C:
>
> LLVMModuleRef LLVMGetModule(LLVMModuleProviderRef MP) {
> return wrap(unwrap(MP)->getModule());
> }
Can I ask, how general is your solution? I only intended to use this
2006 Jun 26
8
[Semi OT] BlindDown and a floated div
I am using the drop shadow technique described at
http://www.1976design.com/blog/archive/2003/11/14/shadows/ to give
several of my divs drop shadows. That part works fine.
What doesn''t work so well is when I try to BlindDown a div in Firefox
and it ends up ignoring the content below it and just overlapping it.
In IE this problem does not occur. In Firefox the overlapping does
2010 Apr 18
1
Comparing data frames
...r.2 <- c("lazy", "destructive", "antisocial", "goofy")
color <- c("white", "brown", "black", "black")
char.3 <- c("fat", "tiny", "evil", "big")
age <- c(16, 2, 5, 10)
pet.data <- data.frame(owner, animal, char.1, food, char.2,
color, char.3, age)
animal <- c("cat", "dog")
v1 <- c("fluffy", "big")
v2 <- c("fat", "stupid")
pet.key <- data.frame(animal, v1, v2...
2006 Jan 09
13
Ajax Tabs
hi railers,
I have a model/view/controller with many associations (20+). I would like to
display the relative associations using AJAX, allowing the user to display
the association his/her is interesting at a particular time. Is here any
kind ajax tabs helper or some kind of tab widgets that I can easily
incorporate into my rails application.
regards,
leon
-------------- next part --------------
2006 Oct 10
5
oddness when adding to index -
...@auto_flush=false,
@open=true, @mon_owner=nil, @id_field=:id, @reader=nil,
@mon_waiting_queue=[], @writer=nil, @default_input_field=:id,
@dir=#<Ferret::Store::RAMDirectory:0xb77dc1b8>>
*** Now let''s add 3 strings to the index ***
irb(main):005:0> ["While you were out pet care", "Eastside dog walker",
"Top daw
g dog walker"].each {|text| i << text }
=> ["While you were out pet care", "Eastside dog walker", "Top dawg dog
walker"]
*** Now let''s do some searches ***
irb(main):006:0> puts i....
2004 Nov 25
1
gem rails 1.1.0.200411231446 flags has_many error
...ed of just by skipping the ''-w''
flag on the shebang line.
The two tables I have are:
CREATE TABLE `people` (
`id` int(11) NOT NULL auto_increment,
`name` varchar(20) NOT NULL default ''"'',
PRIMARY KEY (`id`)
) TYPE=MyISAM;
CREATE TABLE `pets` (
`id` int(11) NOT NULL auto_increment,
`name` varchar(20) default NULL,
`kind` varchar(30) default NULL,
`person_id` int(11) default NULL,
PRIMARY KEY (`id`)
) TYPE=MyISAM;
The error is caused by the following:
class Person < ActiveRecord::Base
has_many :pets...
2012 Jan 27
1
Horizontal stacked 100% bars with ggplot2
Hello, R friends,
I'm trying to crack this nut:
Example Data.
pet gender
dog male
dog female
dog male
cat female
cat female
cat male
Plot Task.
Horizontal 100% bars where
y axis shows gender factor (male vs. female)
and x axis shows percentage of kind of pets (dog vs. cat)
so that % dogs + % cats are stacked in 1 bar and sum up to 100% (f...
2017 May 26
0
Replication failure between 2 Samba4 DCs
...d7f4
DSA invocationId: 055634e1-d57e-45de-bed8-4f57e001e992
==== INBOUND NEIGHBORS ====
DC=ForestDnsZones,DC=mycompany,DC=corp
Default-First-Site-Name\DC02 via RPC
DSA object GUID: 65ff32e1-30a4-4697-a83f-d32815f31035
Last attempt @ Mon Apr 10 10:02:16 2017 PET failed,
result 2 (WERR_BADFILE)
21101 consecutive failure(s).
Last success @ Sat Jan 28 07:56:07 2017 PET
DC=DomainDnsZones,DC=mycompany,DC=corp
Default-First-Site-Name\DC02 via RPC
DSA object GUID: 65ff32e1-30a4-4697-a83f-d32815f31035...
2009 May 13
1
question about setClass
...there is such a thing as an updateClass,
in order to change a "contains" option, please?
that is, if I had
setClass("dog",
representation(name="character",paws="numeric",tail="character"))
Fair enough.
Later I want to have a class called "pets".
setClass("pets",representation(name="character",total="numeric"))
I want dog to be a subclass of pets. Do I put in the setClass command
as it stands with the additional contains="pets", or is there an
update form to use, please?
Hope this makes se...
2008 May 13
0
[LLVMdev] Python bindings available.
Um. Unfortunately in this case, Python will not collect an instance of
Pet which owned by an Owner, because both objects in the reference
cycle have finalizers (__del__). Python will just add both objects to
a garbage list (and will not call any of the finalizers).
It does this because it cannot guess which finalizer to call first.
But I get your point though, and will...
2008 May 13
1
[LLVMdev] Python bindings available.
On May 13, 2008, at 07:31, Mahadevan R wrote:
> Um. Unfortunately in this case, Python will not collect an instance
> of Pet which owned by an Owner, because both objects in the
> reference cycle have finalizers (__del__). Python will just add both
> objects to a garbage list (and will not call any of the finalizers).
Actually, there's no reference cycle, which is what I presume is the
problem you're...