similar to: text_field and arrays

Displaying 20 results from an estimated 400 matches similar to: "text_field and arrays"

2006 May 08
17
partial problem
def my_controller @variable = [{''myfield''=>''grey''},{''myfield''=>''blue''}] end #-------------------------my_view <table> <%= render :partial=>''my_partial, :collection=>@variable %> </table> #----------------------_my_partial <tr> <td><%=
2011 Aug 26
1
R.oo data members / inheritance
If someone is able, can you tell me if there is a better way to do this? More specifically, do I have to rewrite all of the data members stuff and extend stuff of parent class in the child class? See below. Thanks in advance! Example 1: setConstructorS3("ClassA", function(A,x) { if(missing(A))A=15; if(missing(x))x=NA; extend(Object(), "ClassA", .size = A, .x=x
2008 Nov 05
1
Methods dispatch and inheritance R.oo
Hi to all members, i have a question about class inheritance and methods using R.oo package: I have the following code and it doesn't work, guess i'm doing smth wrong and there is nothing in the help. library(R.oo) setConstructorS3("ClassA", function(A=15) { extend(Object(), "ClassA", .size = A ); }) setMethodS3("print", "ClassA",
2006 Jun 22
4
rendering partials in layouts?
Hello all, Forgive me if this is a really stupid question. How do you render partials in a layout? It''s probably way easier than i believe it to be. thanks! -- Posted via http://www.ruby-forum.com/.
2009 Oct 20
1
Suggestion for exception handling: More informative error message for "no applicable method..." (S3)
I'd like to suggest that whenever there is no S3 method implementation available for a particular class, that the error message would also report the class structure of the object dispatched on. Example: foo <- function(...) UseMethod("foo") foo.ClassA <- function(object, ...) { cat("foo() for ClassA called.\n") } > foo(structure(1, class="ClassA"))
2009 Jul 07
2
[LLVMdev] How to add an include file
Hi Eli, Let's say I have a file ClassA.h, that pairs with a file ClassA.cpp to product a library libClassA.a. ClassA.h contains the single declaration. class A {...}; I want to transform it to: #include "ClassB.h" class A : public class B {...}; ClassB.h is the header file for a library libClassB.a built from ClassB.cpp and ClassB.h. I can clearly link libClassB with libClassA.
2009 Jul 07
0
[LLVMdev] How to add an include file
On Tue, Jul 7, 2009 at 1:42 AM, David Minor<dahvid.minor at gmail.com> wrote: > Hi Eli, > Let's say I have a file ClassA.h, that pairs with a file ClassA.cpp > to product a library libClassA.a. > ClassA.h contains the single declaration. > > class A {...}; > > I want to transform it to: > > #include "ClassB.h" > > class A : public class B
2006 Jul 20
6
replace_html + javascript
Hi all, This is my first post to the list, so I hope it gets through and I don''t do anything wrong :) Here''s the issue I''m having... I have an rjs that''s doing: page.replace_html ''myid'', :partial => ''my_partial'' And in my my_partial I have: <script type="text/javascript">
2006 Apr 13
2
acess local variables from helper?
if I call a helper method from inside a partial, it doesn''t appear to have access to the partials local variables. is there a way to make them avilable without passing them as parameters? here''s a simple example # in the view <%= render :partial => "my_partial", :locals => :value => 2%> # _my_partial.rhtml - raises "undefined local variable or
2009 Mar 18
1
Why S4 methods of S3 'base' generics are not used in 'base' functions ?
Dear list, It seems that S4 methods defined for an S3 'base' generic are not used in 'base' functions. This can be problematic when 'base' functions start with something like 'as.matrix'. ### START R code setClass("classA", contains = "matrix", representation(realData = "numeric")) setMethod("as.matrix",
2006 Jul 13
6
Render partial questions
Hello, what is the preferred way to do this... I have 2 controllers. Each has an index action. Now I want to include the rendered index view from TwoController in the index view of OneController. But a render :partial doesn''t execute the TwoController index action which sets variables for its index view. So maybe you can give me a short example how to do it. Thank you Markus
2012 Mar 28
1
resampling for correlation and testing
Hello all R-er, I'm trying to run a resampling method on some data. The current method I have takes 2+ days or a lot of memory . I was wondering if anyone has a better suggestion. Currently I take a matrix and get the correlation matrix from it. This will be called rho.A. Each element in this will be tested against the distribution from the resampled correlation B matrix. Some example
2010 Jan 06
0
[LLVMdev] [Help] How can we call an object's virtual function inside IR?
Hi Gyounghwa Kim, > First of all, thank you very much for your answer. > I tried your sugestion and found out that it is not what I wanted. > What I have to do is call a native C function from inside this > generated function. > Is there any way that we can find and call native C functions not > created by LLVM IR? You can insert a declaration of the function into the IR, then
2010 Jan 05
5
[LLVMdev] [Help] How can we call an object's virtual function inside IR?
Dear experts, I am learning llvm by reading documents and have a question to ask. The following is the example of code generation that I created. [[a [10.00]] > [3.00]] ; ModuleID = 'ExprF' define i1 @expr(double* %record) { entry: %0 = getelementptr double* %record, i32 0 ; <double*> [#uses=1] %1 = load double* %0 ; <double>
2009 Aug 17
2
S4 Generics and NAMESPACE : justified warning ?
Dear list, It seems that a package (pkgB) using another package (pkgA) with S4 generics formed by taking existing functions (for example 'plot') must not import the existing functions ('plot') in its namespace to avoid the warning "replacing previous import: plot". Suppose we use the simple 'import' directive in the name space of pkgB. pkgA and pkgB files would
2015 Jan 24
3
Proper way to define cbind, rbind for s4 classes in package
Hi all, this question has already been posted on stackoverflow, however without success, see also http://stackoverflow.com/questions/27886535/proper-way-to-use-cbind-rbind-with-s4-classes-in-package. I have written a package using S4 classes and would like to use the functions rbind, cbind with these defined classes. Since it does not seem to be possible to define rbind and cbind directly as S4
2002 May 21
4
setClass() and packages
Where should the setClass() ('methods' package) calls be placed in a package? I try to follow a one-class-one-file principe, but since setClass("ClassA", "ClassB") has to come a after setClass("ClassB", [snip]) it is not possible to fully follow this rule. So the best I can do now is to put all setClass() calls in a file named "000.R" (I know this
2011 Oct 04
1
package.skeleton generates ".env = <environment>"
Hello, i trying to create a package using package.skeleton. I use R.oo package to create oriented-object classes. When i use package.skeleton, this creates the following file: classA <- structure(function() { extend(Object(),"Class A", .var1= NULL) } , .env = <environment>, class
2006 Mar 31
6
how to access a hash within a hash in ruby?
Simple question: I know how to access a data field in a hash by doing hash_name[datafield_name]. But what if the datafield itself is a hash? I tried a couple of variations but nothing seems to be working and tutorials do not go into such details. Is there a simple way or should I create separate instances? -Chris -- Posted via http://www.ruby-forum.com/.
2015 Jun 20
1
Xapian with Json
Hi ! I?m newbie with Xapian ! I?m looking for the best way to index json data to be able to search by name/value pair and Full Text Search using only Xapian. I did haven?t success to found a complete or a good documentation about json index and search. Do you know some documentation about ? Another problem that I have is that: In the same name/value pair sometimes I have different data types