Displaying 20 results from an estimated 500 matches similar to: "Simple act_as template"
2006 Apr 08
9
DESIGN question: We do not need damned publishers
Here is the actual design of my CMS :
each Item is secured by 3 (+1) elements:
readers group
writers group
publishers group
owner
readers = people who can find the item in the database and .... read it.
writers = people who can add new content (create new versions or
sub-pages) without making their changes visible (they can propose
content).
publishers = people who can change what readers
2006 Apr 08
76
MIT vs GPL vs LGPL for open source project
I intend to release a project I wrote with Rails.
What is the right licensing scheme for a web application (content
managing system) which could grow with plugins and add-ons ?
Personally, I would prefer the GPL but does that mean any add-on to the
CMS (like task management) will have to be GPL ?
If some people contribute to the code could it still be double-licenced
so that the people who
2006 Mar 15
4
ActiveRecord::RecordNotFound in search results act_as Ferret
Hello,
I''ve installed the Ferret gem and also got the act_as_ferret code from
the wiki.
I''ve set up my model "Branch" to act as ferret using the code below.
acts_as_ferret :options => {:fields => [''name'', ''body_text'', ''address'']}
I''ve also set up a ferret_controller with the code below
def find
2004 Jul 22
2
Files and classes in a package?
While installing my small package, I met a tricky problem.
For clarity, let me explain it with the following simplified example.
In ~/pkg/R/aclass.R,
setClass("aclass", contains="bclass", representation(i="numeric"))
In ~/pkg/R/bclass.R,
setClass("bclass", representation(j="numeric"))
After building a "pkg" package, the file
2009 May 27
2
Object-oriented programming in R
Dear R-users,
I have very recently started learning about object-oriented programming
in R. I am far from being an expert in programming, although I do have
an elementary C++ background.
Please take a look at these lines of code.
> some.data = data.frame(V1 = 1:5, V2 = 6:10) ;
> p.plot = ggplot(data=some.data,aes(x=V1, y=V2)) ;
> class(p.plot) ;
> [1] "ggplot"
My
2011 Mar 06
1
Seeking guidance in package creation when it contains s4 class
Dear all, I am having problem to create a package when this package is
supposed to have some newly created s4 class. Here is my workout:
> #rm(list = ls())
> setClass("aClass", sealed=T, representation(slot1 = "vector", slot2 = "character"))
[1] "aClass"
> fn1 <- function(x, y, z) {
+ x <- x[1]
+ y <- y[1]
+ z <- as.character(z[1])
+
2016 Apr 14
2
Previously extended schema not working in 4.4.0
On Thu, 2016-04-14 at 18:07 +0100, Jonathan Hunter wrote:
> On 14 April 2016 at 13:37, Jonathan Hunter <jmhunter1 at gmail.com>
> wrote:
>
> > # samba-tool dbcheck --cross-ncs
> > Checking 4079 objects
> > MYOBJ=value,OU=myou,DC=mydomain,DC=org,DC=uk: 0x00290001
> > MYOBJ=value,OU=myou,DC=mydomain,DC=org,DC=uk: 0x0029000a
> >
2006 Feb 17
8
Atom
Any plans for using Atom with rails. I saw the "Typo" project is
using MoveableType, Blogger, ... but not Atom.
It seems Atom is not part of ActionWebService.
Has anyone done any work with Atom and Rails ?
Thanks for your answers,
Gaspard
2006 May 22
2
using Singleton with Prototype
Hello all. I''m writing my own object using prototype and I
wonder how you write and call only one instance of class. Can
anyone share his idea of singleton?
thanks
Gregor
----------------------------------------------------
Gdy nadchodzi przełomowy moment w historii, musisz zdecydować,
po czyjej stronie będziesz.
"X-Men: Ostatni bastion" - w kinach od 26 maja.
2006 Mar 11
2
how do i retrieve a newly created id
in my code i''m calling save on an object. The id gets created as the object
is persisted. How can i retrieve that newly created id? I guess I could
query the table again using the other attributes of the object but is there
another way?
thanks in advance.
larry
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
2016 Apr 14
2
Previously extended schema not working in 4.4.0
Thank you, Andrew - I hadn't done so. (In a good way, I haven't yet had
problems with samba that have caused me to delve quite so deeply into the
DB :) so I'm not as familiar with the range of tools as I could be, sorry!)
This has flagged up quite a few errors, all along the lines of:
# samba-tool dbcheck --cross-ncs
Checking 4079 objects
MYOBJ=value,OU=myou,DC=mydomain,DC=org,DC=uk:
2006 Aug 03
12
More than one has_many :through association between the same 2 models
I wonder if you can have more than one has_many :through association between
2 models.
For example...
I have a model Teacher and a model Class
Now, 1 Teacher works in many Classes, right?. So I need a join model like
class Work < ActiveRecord::Base
belongs_to :teacher
belongs_to :class
end
But I also would like to know if a teacher CAN teach a class before I
2009 Sep 02
4
diff of two timestamps
Hi all,
I have the following problem: I have a csv-file consisting of timestamp
values (no dates), e.g.:
Timestamp1;Timestamp2;
05:24:43;05:25:05;
15:47:02;15:47:22;
18:36:05;18:36:24;
15:21:24;15:22:04;
I need a vector with the difference of the two timestamps, so I read the
data with the read.csv-function:
myObj <- read.csv("file.csv",header=TRUE,sep=";").
I have then
2006 Mar 07
3
Making an S3 object act like a data.frame
"[.ggobiDataset" <- function(x, ..., drop=FALSE) {
x <- as.data.frame(x)
NextMethod("[", x)
}
"[[.ggobiDataset" <- function(x, ..., drop=FALSE) {
x <- as.data.frame(x)
NextMethod("[[", x)
}
"$.ggobiDataset" <- function(x, ..., drop=FALSE) {
x <- as.data.frame(x)
NextMethod("$", x)
}
> class(x)
[1]
2010 Nov 17
2
Reference classes: accessor functions via 'getRefClass(...)$accessors(...)'
Hi there,
I''d like to choose between an "static" and "dynamic" access of a reference
class field, say ''a''.
myObj <- getRefClass("Blabla")$new()
Static: myObj$a
Dynamic: myObj$a.get() where the function retrieves the data
from a database (or some other location), stores it to a buffer and
2008 Feb 23
1
Set without argument
Hi the list,
I am defining S4 objet. Is it possbile to define a method that change
the slot of an object without using <- ?
My object contain a numeric and a matrix. At some point, I would like to
impute the missing value in the matrix. So I would like to use something
like :
-----------------
setClass("MyObj",representation(time="numeric",traj="matrix"))
a
2006 Mar 01
3
Security issue: a user can fill cache with random urls
Say your app responds to : store/show/3 and caching is enable at the
store controller level.
A route says : map.connect ''store/:action/:id'', :controller => ''store''
All the following urls will be processed and cached (the cache
filling with ''page not found'' messages) !
store/foo/bar
store/show/090934298234897342
2009 Oct 14
6
Combining rails intrAnet and public site.
Hello, everyone!
I was wondering if somebody has some insight on this issue.
[h]A little background:[/h]
I work for a midsize electronic manufacturing company with 2 people in
IT dept - a network admin and a developer (me).
We''ve been using rails to migrate from an old dBase and VB based system
to build internal company IntrAnet that does things like label printing,
invetory control,
2005 Oct 12
2
Sharing Problems: huge numbers of share
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
My name is Olivier Gaspard, and I work for the CHC Belgium (IT
department of differents Hospitals).
So, let's me introduce the situation: for the moment, the firm works
with Win NT for the users profiles, and Samba 3.0 on Unix platform for
the "files sharing". Resuming : Every users having a user (NT) profile
(roamming profile)
2011 Dec 03
2
Help! Big problem when using "browser()" to do R debugging?
Hi all,
Could you please help me?
I am having the following weird problem when debugging R programs
using "browser()":
In my function, I've inserted a "browser()" in front of Step 1. My
function has 3 steps and at the end of each step, it will print out
the message "Step i is done"...
However, after I hit <ENTER> when the program stopped before Step 1