similar to: Hash.new{|h,k| h[k] = ""} ... but for views?

Displaying 20 results from an estimated 1000 matches similar to: "Hash.new{|h,k| h[k] = ""} ... but for views?"

2006 Jul 06
0
session scoped controllers
I was wondering if the notion of session scoped controllers has ever been discussed? The idea is that you could do something like this: def MyController < ActionController::SessionBase def step1 @favorite_color = params[:color] end def step2 # when step2 is hit by the user # @favorite_color would auto-magically be here puts "favorite color is
2006 Jul 07
2
Testing views with Hpricot
assert_tag smells bad. Hpricot smells nice (apricotty!). Testing your views with Hpricot: http://www.lukeredpath.co.uk/index.php/2006/07/07/testing-your-rails- views-with-hpricot/ Big thanks to _why for a great little library! Feedback is appreciated. rSpec integration coming soon (hopefully!). Cheers, Luke Redpath contact@lukeredpath.co.uk -------------- next part -------------- An HTML
2010 Jun 15
4
Dashboard or Foreman
Hi Guys, I''m reading about dashboard and foreman, and I''m wondering if there is anyone who made a comparison of the two? Can anyone help me decide which one to use? It feels like foreman is ''ahead'' for now? cheers, Walter Heck Engineer @ OlinData (http://olindata.com) -- You received this message because you are subscribed to the Google Groups "Puppet
2016 Apr 24
2
Inserting a blank row to every other row
Well, something like this would work (there may be slicker solutions): > z <- data.frame(a=1:3,b = letters[1:3]) > i <- seq_len(nrow(z)) *2 > z <-rbind(z,z) > z[i, ] <- matrix(NA, nr=nrow(z),nc=ncol(z)) > z a b 1 1 a 2 NA <NA> 3 3 c 4 NA <NA> 5 2 b 6 NA <NA> But I agree with you that there is probably a way to handle the underlying
2008 Sep 23
1
database diff's?
Hi, I'm trying to figure out what bits of info I need to ad to a DB to manualy add users to an app (eGW) and was wondering if anyone had a better way to find the differances in two states (pre/post change) of a database. Only thing I could come up with was to do a DB dump to a file before and after then run diff on them. Anyone have a slicker, better, faster, not a as gee-wiz there should be
2005 Nov 10
1
specifying a key for a trellis display
Folks: The "key" argument of trellis commands (e.g. xyplot()) allows one to place a key at the top of a trellis display using key=list(space='top',...) I would like to increase the space between the bottom of the key and the trellis plots beyond the default. Is there a simple way to do this? At present, I add an empty row (e.g. text = '', point colored in background
2005 Mar 20
2
Using locator() to digitise
Hi Folks, I'm contemplating using locator() to digitise external graphics. To set context, I would be using X11 display on Linux. To pre-empt the obvious comment: I've found on the R site the suggestion to use the 'pixmap' package. I've tried this, and it works; but it involves building a big R object (the internal pixmap representation), and this chokes my somewhat puny
2007 Dec 19
3
multi-model search best practices
Hi folks. If I am indexing ModelA and ModelB and I want to search both of them, I usually just pick one arbitrarily and use it for #multi_search. Is there a slicker pattern, regarding from which model to invoke #multi_search? Can it be invoked directly from the Ferret library? Has anyone put together some sort of "dummy" search class? Thanks for any ideas. John
2009 Aug 08
2
Chainloading from Vista x64 bootloader to Extlinux?
Hi syslinux list, Some months ago, hpa was kind enough to help me troubleshoot booting Extlinux in a system with the following particulars: * Windows Vista x64 bootloader in the MBR and Vista installed in /dev/sda1 * Extlinux 3.72 installed in the first sector of /dev/sda2 and Foresight Linux installed in /dev/sda2 (at the time I tried, 3.72 was the default bootloader in Foresight) The problem
2006 Jul 17
1
multiplying multidimensional arrays (was: Re: [R] Manipulation involving arrays)
I am moving this to r-devel. The problem and solution below posted on r-help could have been a bit slicker if %*% worked with multidimensional arrays multiplying them so that if the first arg is a multidimensional array it is mulitplied along the last dimension (and first dimension for the second arg). Then one could have written: Tbar <- tarray %*% t(wt) / rep(wti, each = 9) which is a bit
2004 Dec 29
3
Windows vignettes, shQuote, texi2dvi
I noticed a shQuote fix for Windows in the svn logs. Just wanted to point out that this will favorably affect texi2dvi on Windows which previously used UNIX quoting and so generated an incorrect Windows command. (Note that texi2dvi is used when creating vignettes.) Another problem is that the recommended tex distribution for Windows, fptex, does not have texi2dvi in the first place. The
2013 May 15
2
animating plots over time with a slider
I have a population of subjects each with a variable which has been captured at a baseline date. Then for many subjects (but not all) an intervention has occurred and the variable has changed at one or more time points after the baseline date. So my dataset consists of a subject ID (x), which may appear several times or just once, a measure (y), and a date of observation (z). I would like to be
2008 Apr 07
3
list of epel packages
Hi! I know it has been solved many times, but how will i get a list of all installed packages from EPEL repository? I know for rpmforge it is rpm -qa package=*rf* . Thanks! David -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.centos.org/pipermail/centos/attachments/20080407/68f7c09a/attachment-0001.html>
2016 Mar 07
2
6.7 netinstall fails at insert cd to continue
On 03/06/16 22:15, Richard wrote: <<>> > "shell" is a yum command, invoked as shown below. I don't believe > there is any program called "yum-shell" (even though that is the man > page reference). > > shell Is used to enter the 'yum shell', when a filename is > specified the contents of that file is executed in >
2006 Jun 08
2
Query about building R-2.3.1 for Ubuntu
Hi All: Is a distribution of R version 2.3.1 (the current version) available for the Ubuntu Linux? If I want to build a .deb package for R-2.3.1 for Ubuntu, are there specific requirements that I should be aware of? Is a tutorial available? I searched the web, and the repositories, but oculd not locate an appropriate file. TIA, Arin Basu
2008 Jan 02
2
Proxies
I really like the idea of Mock Proxies as explained in Brian Takita''s post here: http://pivots.pivotallabs.com/users/brian/blog/articles/352-introducing-rr I posted to this list eariler with an incomplete implementation of .stops_mocking in the thread "Mocking Time, delegating to original object." The Mock Proxy pattern would make this simpler.
2016 Apr 24
0
Inserting a blank row to every other row
Oh, sorry, I just realized that I messed up the indicing. Here is the correct way: > z <- data.frame(a=1:3,b = letters[1:3]) > i <- seq_len(nrow(z)) > z<-z[rep(i,e=2),] > z[2*i, ] <- matrix(NA, nr=nrow(z),nc=ncol(z)) > z Still doubt that this is a good idea, though. -- Bert Bert Gunter "The trouble with having an open mind is that people keep coming along
2012 Mar 13
1
Visualising multiple response contingency tables
Dear R Help Community, I have a question and an answer (based on reading this forum and online research), but I though I should share both since probably there's a much better way to go about my solution. My question is specifically about how to best visualise multiple response contingency tables. What I mean by 'multiple response' is that the total number of responses per row of a
2004 Nov 29
1
Seeking help with a simple loop construction
Hello, I have a df, pp, with five variables: > nobs(pp) q10_1 q10_2 q10_3 q10_4 actcode 1620 1620 1620 1620 1620 I want to create a loop to run four xtabs (the first four variables above by the fifth) and then store the results in a matrix. Below I make my intent clear by showing the output of one xtab which is inserted into a matrix. > a <- xtabs(q10_1 ~
2016 Apr 24
0
Inserting a blank row to every other row
Hi Saba, I don't know how to do what you want and I also cannot see why. If you describe what you hope to achieve there might be a different solution. Best wishes Ulrik Saba Sehrish via R-help <r-help at r-project.org> schrieb am So., 24. Apr. 2016 14:04: > Hi > > I need to insert a blank row after every row in R data frame. I have > achieved it through: > > >