Displaying 12 results from an estimated 12 matches for "aclass".
Did you mean:
class
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 pkg.R in R directory has:
setClass("acl...
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])
+ new("aClass", slot1 = x+y, slot2 = z)
+ }
> #fn1(1,2,3)
> package.skele...
2009 May 27
2
Object-oriented programming in R
...e.
> 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 understanding is that the object p.plot belongs to the "ggplot"
class. However, a new class definition like
> setClass("AClass", representation(mFirst = "numeric", mSecond =
> "ggplot")) ;
yields the warning
> Warning message:
> In .completeClassSlots(ClassDef, where) :
> undefined slot classes in definition of "AClass": mSecond(class
> "ggplot")
The ggplot ob...
2006 Apr 10
3
Simple act_as template
Hello !
I posted a simple template to show how to add ''act_as_whatever'' to
ActiveRecord.
I think this might be useful to others as there are some trickery ruby
things in this
file.
Here is the template : http://textsnippets.com/posts/show/384
Gaspard Bucher
--
Posted via http://www.ruby-forum.com/.
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 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
2008 Mar 14
2
Multiple should_receive(:render).with
I''m trying to specify that a particular view must render two different partials.
My spec looks like:
describe AClass do
it do
template.should_receive(:render).with(:partial => ''foo'', :locals => { ... })
...
end
describe ''some conditional case'' do
it do
template.should_receive(:render).with(:partial => ''bar'', :locals =&g...
2009 Jun 16
1
[LLVMdev] runtime library for jitted code
...> related project? In any case I think it won't be difficult for me to write
> such a converter from mangled names to LLVM function declarations.
As long as the functions' arguments an return types are simple enough,
it seems doable. But have you something in mind for cases such as
AClass foo(SomeOtherClass other);
?
--
Óscar
2003 Sep 15
0
LLVM now supports setjmp/longjmp!
...nction that longjmps, they will not
be executed correctly (however, catch blocks and dtors higher up in the
stack will). This may be fixed sometime after the 1.0 release, but it is
not super high priority. In particular, this testcase works:
void jmp() { longjmp(...); }
void test() {
try {
AClass A; // A's dtor is called due to longjmp
jmp();
// not reached
} catch (...) {} // eat the longjmp "exception"
}
but this does not:
void test() {
try {
AClass A; // A's dtor is NOT called due to longjmp
longjmp(...);
// not reached
} catch (...) {} //...
2009 Jun 16
0
[LLVMdev] runtime library for jitted code
Hi,
The question about the name mangling gave me an idea that it can be used to
automate registration of DLL functions. Instead of manually creating
Function objects specifying a return type and argument types which is
error-prone and time-consuming one can get a list of functions exported from
a DLL using Windows API, demangle each name and construct a Function object
from it. Is there any
2009 Jun 15
4
[LLVMdev] runtime library for jitted code
Albert Graef <Dr.Graef at t-online.de> writes:
> Victor Zverovich wrote:
>> I am considering a possibility of using LLVM JIT for an algebraic
>> modelling language. I have already done some prototyping following the
>> Kaleidoscope tutorial and currently thinking of how to connect the
>> jitted code to a runtime library (for this language) which I would like
2009 Jun 01
1
installing sn package
...e.
> 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 understanding is that the object p.plot belongs to the "ggplot"
class. However, a new class definition like
> setClass("AClass", representation(mFirst = "numeric", mSecond =
> "ggplot")) ;
yields the warning
> Warning message:
> In .completeClassSlots(ClassDef, where) :
> undefined slot classes in definition of "AClass": mSecond(class
> "ggplot")
The ggplot obj...