similar to: DRY Scaffolds

Displaying 20 results from an estimated 1100 matches similar to: "DRY Scaffolds"

2006 May 03
5
Multiple Scaffolds
I''d like to create scaffolds for each of the tables in my database, but would like to access them below the path: localhost:3000/admin For example localhost:3000/admin/table1 localhost:3000/admin/table2 Where table1 and table2 would be the controller names respectively, calling their own list.rhtml, show.rhtml, edit.rhtml, etc.. Any recommendations on how/where to
2011 May 26
3
change function scope?
I'm still getting used to R's scoping. I've run into the following situation value=0 thefunction <- function() print( value ) somefunction <- function() { value=99; thefunction() } somefunction() now, I understand that somefunction() returns 0 because thefunction() was defined with value=0 in its parent envrionment, it dosent look at all in the environment of somefunction. My
2006 Mar 17
1
edge - scaffolds now pluralized?
Are my eyes going buggy, or did something recently change in Edge Rails so that now scaffolds are generated with pluralized controller/ helper/etc names? I peeked at the code in railties/lib/rails_generator/generators/components/scaffold/ scaffold_generator.rb around line 50, and it looks like there was a change there recently so that it now defaults to pluralized names. So why was this
2006 Jan 26
1
Simple question about :list method in scaffolds
The automatically generated scaffolds made code like this: def list @address_pages, @addresses = paginate :addresses, :per_page => 10 end which was fine, but I only want to return the logged-in user''s addresses. So I changed it to: def list @address_pages, @addresses = paginate :addresses, :per_page => 10, :conditions => [''user_id = ?'',
2006 Aug 13
3
Rewrite problem or routing issue?
I''m not able to access anything in public, everything seems to be going through the rails router. As a result, I can''t get to stylesheets or javascript. I''m not quite clear if this is a .htaccess problem, or a router problem. I eliminated the "catchall" route, so the last route is map.connect '':controller/:action/:id'' My .htaccess file
2011 Mar 30
3
how about a "<p-" operator?
I was cursing Matlab again today (what else is new) because the default action for every Matlab command is to spew the result to the console, and one must remember to put that darn ";" at the end of every line. So I just wondered: was there ever a discussion as to providing some modified version of the "<-" and "->" operators in R to do the reverse?
2006 Mar 21
2
Multiple commands per priority
Hi everybody. I have been searching and trying for an answer, but no luck, so here I go.. Is there anyway to execute multiple commands on a single priority in extensions.conf? eg: exten => X.,1,Dial(SIP/1111) & somefunction(${EXTEN}) I need the dial command to dial internal extensions, and the "somefunction" to kick of our own outgoing system for redirection to outside lines;
2016 Jun 14
2
Calling a null pointer. How undefined it is?
Hi all: This question is related to a state machine generated by LLVM for a coroutine. I stripped all coroutine related details to get to the essence of the question. Let's say I have a state machine that looks like this: struct State { FnPtr Fn; State() : Fn(&SomeFunction) {} void Go() { (*Fn)(); } void Stop() { Fn = nullptr; } bool IsDone() { return Fn ==
2010 Dec 01
2
default arguments and '...' in a function
Dear R-users, I'm trying to work out a way to set default values for arguments in a function which includes the optional argument '...'. In practice, I have a 'plot' method for a function which specifies different types of plots. Every different plot should have different default arguments (for example for 'col', 'ylim' etc), plus the argument '...' to
2009 Oct 11
3
[LLVMdev] Problems linking shared library with __declspec(dllexport)
Hi all, I am trying to use llvm-gcc to link shared libraries on windows/mingw32. When I try to link libraries that contain functions declared with __declspec(dllexport) someFunction(); I get the link error: Cannot export _someFunction: symbol not found Removing the declspec directive solves the problem, but this is not a very feasible solution for me. Using 'regular' gcc does not
2023 Jan 26
0
[klibc:time64] time: Use clock_* system calls for time-of-day and sleep
Commit-ID: 8b44cc180f664532821211e8261534b0c9e6c01c Gitweb: http://git.kernel.org/?p=libs/klibc/klibc.git;a=commit;h=8b44cc180f664532821211e8261534b0c9e6c01c Author: Ben Hutchings <ben at decadent.org.uk> AuthorDate: Sat, 14 Jan 2023 02:15:10 +0100 Committer: Ben Hutchings <ben at decadent.org.uk> CommitDate: Sun, 15 Jan 2023 21:28:18 +0100 [klibc] time: Use clock_* system
2010 Jan 25
1
Same y-axis on multiple plots?
Greetings, I am attempting to use R throug PL/R in PostgreSQL to make several graphs (they show usage over time for radiochannels). However, as some never go above 100 in a 24 hour period, and others go well over 500, they get different y-axis values (which normally would be a good thing). However, as I want to overlay the graphs to add/remove channels in CSS on a webpage, I need a set y-axis.
2002 Nov 07
2
combinations
I need to construct all possible combinations of an vector of length N taken X at a time for simulation purposes. Taking a a small vector as an example: >input <- c('a','b','c','d') >somefunction(input) a,b,c a,b,d a,c,d b,c,d my only solution thus far is: somefunction <- function(x){ ...a series of grotesque and horribly inefficient loops
2009 Oct 11
0
[LLVMdev] Problems linking shared library with __declspec(dllexport)
> I am trying to use llvm-gcc to link shared libraries on windows/mingw32. > When I try to link libraries that contain functions declared with >  __declspec(dllexport) someFunction(); > > I get the link error: > >  Cannot export _someFunction: symbol not found dllexport declspec should be put on the function definition, in this example there is nothing to export - dllexport
2009 Oct 26
2
What is the most efficient practice to develop an R package?
I am reading Section 5 and 6 of http://cran.r-project.org/doc/contrib/Leisch-CreatingPackages.pdf It seems that I have to do the following two steps in order to make an R package. But when I am testing these package, these two steps will run many times, which may take a lot of time. So when I still develop the package, shall I always source('linmod.R') to test it. Once the code in
2015 Mar 02
2
[LLVMdev] clang change function name
On Mon, Mar 02, 2015 at 12:12:34AM -0500, John Criswell wrote: > On 3/2/15 12:07 AM, Haopeng Liu wrote: > >Got it, thanks. But in my pass, I use function name to locate. Can I > >disable mangling in clang? > > No, but you can probably fine a library that can either mangle the original > name or demangle the name you're seeing in the LLVM bitcode. > > As an FYI,
2006 Jul 03
0
Scaffolds auto generate tables fields.. and Database amounts
Small story , I am moving over databases from Filemaker. In the filemaker databases are some like near 100 fields for one table. Luckly they are not relational to anything just big fat one page docs of fields.. First I am wondering if this is smart from a database speed point. Or if they should be broken up into many different database tables.. Though they all need to be on screen for the
2006 Mar 15
3
prototype.js Event.stopObserving
anyone have any information on how to effectively use this? Event.observe() doesn''t return anything, and nothing I''ve tried is actually removing the event listeners from the objects. -Jeremy -- Jeremy Kitchen ++ kitchen-RA8HwDor7flnDGu+y90WmgC/G2K4zDHf@public.gmane.org In the beginning was The Word and The Word was Content-type: text/plain -- The Word of Bob.
2004 Feb 27
1
Outer with Three Vectors
Hello, outer() is great for avoiding things like: for (val1 in val1s) { for (val2 in val2s)) { x[i,j] <- somefunction(val1, val2) } } The same can be obtained with: outer(val1s, val2s, somefunction) But what if there are three (or more) sets of values to loop over? Any way of avoiding the loops then? Thanks, -- Wolfgang Viechtbauer
2007 Feb 28
1
problem with help.start and ?somefunction
Hi all, I am going to be teaching a workshop next week using R and Bioconductor in one of our university's computer labs. They have recently installed R 2.4.1 for me, and I'm checking all my scripts. I just noticed that using the ?somefunction call to access the documentation for that function is not working. On my own PC, the ? call output changed between R 2.3 and 2.4; before it would