similar to: Hash flattening on paginator link_to

Displaying 20 results from an estimated 80 matches similar to: "Hash flattening on paginator link_to"

2006 Jul 25
6
form and pagination question
Hello, How do I get params from a form to use with a paginator? debug(params) shows this city: !map:HashWithIndifferentAccess id: "1" but in my controller, when I try to use @hotel_pages = Paginator.new self, Hotel.count(:conditions => "hotels.city_id = params[:city][:id]"), 3, @params[''page''] it doesn''t work. I suppose it''s a simple
2001 Dec 28
0
flattening return value of tapply
Dear R-Users, Does anyone know how to flatten, i.e. convert to a table, a return value of tapply when its INDEX argument is a list? Here is an example of what I need > x <- rnorm(100) > f1 <- rep(c(T,F),50) > f2 <- c(rep(T,50), rep(F,50)) > y <- tapply(x, list(f1=f1,f2=f2), summary) > y f2 f1 FALSE TRUE FALSE "Numeric,6"
2010 Feb 11
1
Flattening Graphics
Hello, This question is a nightmare to search for, as I get so many irrelevant results. What I'm interested in doing if I have many pages of plots and I want to keep them together in the same document, say a PDF, is there a way to flatten all the dot plots and graphics, so that they don't take a long time to load on a slow computer in Adobe Reader, without using external programs outside
2010 Apr 30
2
Flattening and unflattening symmetric matrices
Here's an easy question: I'd like to convert a symmetric matrix to a vector composed of the upper.tri() part of it plus the diagonal, and convert it back again. What's the best way to achieve this? I'm wondering if there are some built in functions to do this easily. I can encode fine: v <- c(diag(A),A[upper.tri(A)]) but I don't see an easy way to recover A from v
2005 Mar 09
1
Flattening a list of data frames
Hello all, Simple version of my problem: I've got a list of data frames, where each data frame has the same number of columns and the same column names. I'd like to flatten the list into one large data frame. Is there an easy way to do this? Quick example code: a <- data.frame(x=c(1,2,3),y=c(5,7,9) b <- data.frame(x=c(2,4,7,9),y=c(2,3,5,4)) z <- list(a,b) # Do
2011 May 19
0
Flattening lists and environments (was: "how to flatten a list to the same level?")
Dear list, I came up with a two functions that flatten arbitrary deeply nested lists (as long as they're named; not tested for unnamed) and environments (see attachment; 'flatten_examples.txt' contains some examples). The paradigm is somewhat similar to that implemented in 'unlist()', yet extends it. I would have very much liked to build upon the superfast functionality
2018 Jul 28
3
Any way of "flattening out" 2 channels back into one?
Last question for today, I promise! The problem: In order to disconnect calls after x minutes, I need to do this: [setup] exten => setup,1,Answer() same => n,Set(LIMIT_PLAYAUDIO_CALLER=yes) same => n,Set(LIMIT_WARNING_FILE=/var/lib/asterisk/sounds/en_GB_TNS/time_limit_reached) same => n,Dial(Local/s at root/n,3,L(3540000:60000)) same => n,Hangup() [root] exten
2006 Jul 01
1
Paginator offset =0 ...
Hi list, I Try to do a custom paginator, but the offset never increase ?? def showFriends @friends_pages = Paginator.new self, allFriends.size, 3, @params[''page''] limit= @friends_pages.items_per_page offset= @friends_pages.current.offset
2006 Jul 19
0
Custom paginator?
I have the following query I need to paginate. Looks like I need a custom paginator for this. Am I right? SELECT full_name, address1, address2, city, state, zip, abms_certification, X(geom) AS X, Y(geom) AS Y FROM physicians where address_status = 1 and geom && Expand(GeometryFromText(''POINT(47.651443 -117.411025)'',4326),1) AND
2006 Apr 23
0
Using Paginator outside of controllers
I am doing this in _messages.rthml: <% shout_pages = Paginator.new self, Shout.length, 30, @params[''page''] %> <% shouts = Shout.find :all, :order => "timestamp desc", :limit => @story_pages.items_per_page, :offset => @story_pages.current.offset %> I am calling
2006 Jan 27
0
custom paginator generating Next link when not needed
I implemented a prefix search using the following custom paginator: @performer_pages = Paginator.new self, Performer.count, 25, @params[''page''] @performers = Performer.find( :all, :conditions => ["Name >= ?", params[:prefix] ], :order => "Name ASC", :limit => @performer_pages.items_per_page, :offset =>
2007 Oct 20
2
where to put code for my own paginator ?
I had to make my own pagination class in SQL Server. What I am wondering is where is a good place to put the code so that every controller and template can have access to it ? Right now I have put it in application.rb, the controller base class. This seems to work well, I did a project last summer where I put stuff in the lib directory. The only problem with that is that if you change any code at
2009 Jan 10
2
hidden_field_tag flattens my array for value
ERB: <%= hidden_field_tag(''users_ids'', @users.collect(&:id))%> OUTPUT: <input id="users_ids" name="users_ids" type="hidden"
2014 Jul 03
0
Re: virsh blockcopy: doesn't seem to flatten the chain by default
On 07/03/2014 03:12 AM, Kashyap Chamarthy wrote: > Versions > -------- > > (Libvirt locally built from a recent git commit -ec7b922): > > $ rpm -q libvirt-daemon-kvm qemu-system-x86 > libvirt-daemon-kvm-1.2.6-1.fc20.x86_64 > qemu-system-x86-2.0.0-1.fc21.x86_64 > > > Test > ---- > > [All images are qcow2 files.] > > > We have this
2014 Jul 02
0
Re: virsh blockcopy: doesn't seem to flatten the chain by default
On Thu, Jul 03, 2014 at 12:42:20AM +0530, Kashyap Chamarthy wrote: [. . .] Forgot to note: Before blockcopy, the current block device is snap1.qcow2 (after too, it's the same, since we didn't `--pivot` to the copy. > Now, let's do a live blockcopy (with a '--finish' to graecully finish > the mirroring): > > $ virsh blockcopy --domain testvm2 vda \ >
2014 Jul 21
2
[LLVMdev] LLVM Code Generation on flattened IR code
Thanks, i will do that how can i attach a LLVM IR source file to a bug report? Charles ----- Mail original ----- De: "Andrew Trick" <atrick at apple.com> À: charlessl at free.fr Cc: llvmdev at cs.uiuc.edu Envoyé: Vendredi 18 Juillet 2014 09:18:41 Objet: Re: [LLVMdev] LLVM Code Generation on flattened IR code On Jul 17, 2014, at 11:41 AM, charlessl at free.fr wrote:
2014 Jul 21
2
[LLVMdev] LLVM Code Generation on flattened IR code
Hi i don't have any problem anymore after switching from 3.4 to the trunk version it seems it has fixed the issue. Charles
2010 Jan 08
1
how to flatten a list to the same level?
I have a nested list l like: l <- list(A=c(1,2,3), B=c("a", "b")) l <- list(l,l, list(l,l)) I want the list to be unlisted, but not on the lowest level of each "branch". I want the lowest level of each list branch to remain as it is. So unlist or unlist(rec=F) do not work here as the level of nesting may differ on the elements. The result should look like:
2012 Jun 26
2
flatten lists
I am looking for a function to flatten a list to a list of only 1 level deep. Very similar to unlist, however I don't want to turn it into a vector because then everything will be casted to character vectors: x <- list(name="Jeroen", age=27, married=FALSE, home=list(country="Netherlands", city="Utrecht")) unlist(x) This function sort of does it: flatlist
2009 Oct 21
0
Flattened Device Tree Project Announcement
Dear FreeBSD Community, The FreeBSD Foundation is pleased to announce another funded project! Rafal Jaworowski and Semihalf has been awarded a grant to provide FreeBSD with support for the flattened device tree (FDT) technology. This project allows for describing hardware resources of a computer system and their dependencies in a platform-neutral and portable way. The main consumers of this