Displaying 20 results from an estimated 1000 matches similar to: "re shaping a data frame with multiple IDs"
2007 Nov 14
1
has_many_polymorphs and acts_as_list ?
First, BRAVO for this wonderful plugin: has_many_polymorphs ! Now my
problem:
4 models : Collection, Page, Fragment, Belonging (which is the join
table):
1 class Collection <
ActiveRecord::Base
2 has_many_polymorphs :elements,
3 :through => :belongings,
4 :from => [:pages, :fragments, :collections],
5 :as => :collector,
6 :parent_order =>
2006 Apr 27
4
Sessions Problems
Hi to group!
I am new to ROR!
I am facing problems on sessions.
First I created the one session variable.
after that I created the other one.
after moving to three pages the session was destroyed automatically.
What is the reason please help me!
Thnaks and Regards,
-Kumar Varma
--
Posted via http://www.ruby-forum.com/.
2006 Aug 08
11
Newb question- method not working
I know this shouldn''t be in the view but to test the code it is.
Anyway if I do just session[user] I get back the user id (the id from
the user table)
which is good.
However this code does not work.
<% a = session[:user] %>
<% uname = User.find(:first, :conditions => id = a) %>
<%= @uname %>
TIA
Stuart
2007 Feb 07
0
strange sqlite3 errors - validates_associated & failing activerecord unit tests
I''m getting two strange errors, both which I believe relate to sqlite3.
The first one is with validates associated. Here is my test:
require File.dirname(__FILE__) + ''/../test_helper''
class SubscriptionPlanTest < Test::Unit::TestCase
fixtures :subscription_plans
fixtures :publications
def setup
@six_month_gold = subscription_plans(:six_month_gold)
2010 Jun 08
9
[Rails Heroku] Problem with saving object (on heroku hosting)
Hi All,
I have some strange problem which appears only on heroku hosting 2.3.5
default stack (not on my local computer)
I have some models. Here they are:
class Contact < ActiveRecord::Base
belongs_to :user
belongs_to :type, :class_name => "ContactType", :foreign_key =>
"type_id"
validates_presence_of :name, :on => :create, :message =>
2006 Jul 05
8
loginGenerator - getting logged in username
i am working on a site taht uses loginGenerator..
it''s a great little package, but i am running into one little problem..
i would like to have something that says:
"logged in as <username>" in the site, but i am not quite getting it..
what i am using is:
<p>You are logged in as: <%= @session[:user] %>
but i have tried:
<p>You are logged in as:
2013 Feb 26
3
Merging value labels into indicator variable.
I have a vaiable named NAM having value : 1,2,3,4,5,6,7,8,9. I want to
make an indicator variable that will take value 1 if NAM=7 or NAM=8 or
NAM=9. How can I do that?
I usually do: Var001<- ifelse(NAM==7,1,0) for the simplest case.
[[alternative HTML version deleted]]
2006 Dec 19
1
mongrel_config has no output
I am not sure what i am doing wrong here, but no matter what i try i get no
output from mongrel_config:
$ mongrel_rails configtool
$ telnet localhost 3001
Trying 127.0.0.1...
Connected to localhost.
Escape character is ''^]''.
GET /config/ HTTP/1.1
HTTP/1.1 200 OK
Connection: close
Date: Tue, 19 Dec 2006 05:33:16 GMT
Content-Type: text/html
Content-Length: 0
Connection closed by
2012 Jul 05
1
hash to_yaml in erb template not giving valid yaml
Hi,
I want to use a file resource to write a facts.yaml file for
Mcollective. For some reason it won''t provide a valid yaml format if I
dump my scope to hash and convert to_yaml.
file {
"/etc/mcollective/facts.yaml" :
owner => root,
group => root,
mode => 400,
loglevel => debug,
#content => inline_template("<%= scope.to_hash.reject {
2006 Jun 06
2
SPSS variable lables import
Hi,
I try to get the variable labels of a SPSS data file into R but don't
find this mentioned in the help file for foreign. Is there another way
to get them ?
BTW: An SPSS variable name is like: VAR001, whereas the variable label
might be 'Identification no.'
Thanks in advance,
F. Thomas
--
..........................................
Dr. Frank Thomas
FTR Internet Research
93110
2001 Nov 28
2
Value lables, variable lables
I'm looking for an analogy to SPSS and "variable lable" and "value
lable" in R. I have a copy of S+4.0 and can't find any info in their
docs, and don't find it in R-intro either.
In SPSS, for each variable, there is a name like
VAR001
and a variable lable (a longer descriptive string) like
Respondent ID
and for many of the values of other variables there are
2012 Dec 21
1
Hiera and 'clientcert' fact not working :(
Morning All
I''m trying to use Hiera with Puppet 3.0 to streamline some of my module
configuration...
However I''m having issues using the ''*%{::clientcert}*'' variable as part of
the hierarchy...
Currently, my *hiera.yaml* file looks like:
---
:backends:
- yaml
- json
:yaml:
:datadir: /etc/puppet/hieradata
:json:
:datadir: /etc/puppet/hieradata
2012 Dec 14
11
Puppet and Mcollective yaml file changing when it shouldn't
Has anyone else ran into this?
debug: /Stage[main]/Mcollective/File[/var/tmp/facts.yaml]/content:
Executing ''diff -u /var/tmp/facts.yaml
/tmp/puppet-file20121214-13448-933j3r-0''
notice: /Stage[main]/Mcollective/File[/var/tmp/facts.yaml]/content:
--- /var/tmp/facts.yaml 2012-12-14 00:53:20.000000000 +0000
+++ /tmp/puppet-file20121214-13448-933j3r-0 2012-12-14
2006 Dec 11
2
changes in libxc
Hi,
I''m trying to test some changes of mine to libxc and python/xc.c, does
it requires a boot any time I''m trying to test them?
What are your development practices?
Thanks,
David.
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
2009 Mar 04
3
Table Transformation
Dear R-experts,
recently, I started to discover the world of R. I came across a problem,
that I was unable to solve by myself (including searches in R-help, etc.)
I have a flat table similar to
key1 key2 value1
abcd_1 BP 10
abcd_1 BSMP 1A
abcd_1 PD 25
abcd_2 BP 20
abcd_3 BP 80
abcd_4 IA 30
abcd_4 PD 70
abcd_4 PS N
I wish to transform this table to obtain the following result:
key2
key1 BP
2008 Jan 12
1
Collection_Select not showing Selected option
Hi, I''m having some problem with getting collection_select to return
the current value when editing a record. According to everything I''ve
seen, there was an issue but it''s been fixed, but I can''t figure out
why it isn''t returning the current value as a selected option. I''ve
checked the table structures, and both the call_driver.product_line_id
2007 Jan 15
8
Modular Xen
It seems to me that Xen is full of stuff that aren''t beneficial for
everybody, this includes NUMA, ACM and other stuff that certain
companies try to introduce... In a better world, the Xen binary would
have been more sleek and fast, and those extra features should be
loaded via stating a Module boot line in Grub. This way, testing would
be easy and it''s more elegant than using a
2005 Dec 16
3
Help with error
I am getting this error
NoMethodError in Admin#add_to_project
undefined method `find'' for #<Project:0x249da88>
RAILS_ROOT: script/../config/..
Application Trace | Framework Trace | Full Trace
/usr/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/
base.rb:1501:in `method_missing''
./script/../config/../app/controllers/admin_controller.rb:65:in
2006 Apr 04
2
HABTM
Hi.
Im new to Ruby and new to Ruby on Rails and have problems realizing a =20=
simple many_to_many relationship:
My tables:
items <-> items_users <-> users
------------------------------------------------------------------------=20=
--------------------------------------
id user_id =
id
name item_id name
... =
password
=
......
My Code:
class
2019 Aug 23
2
non-terminating processes
FreeBSD psg.com 11.3-RELEASE-p3 FreeBSD 11.3-RELEASE-p3
dovecot 2.3.6 (7eab80676) (latest from binary package system)
symptom: multiple imap4s users complain that they can not fetch mail
stopping and restarting dovecot is a temporary workaround
dovenull 3713 0.0 0.0 11036 6816 - I 02:27 0:00.17 dovecot/imap-login
user19 3714 0.0 0.0 9464 4756 - S 02:27